EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Pid.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Pid.cxx
1
10
#include "
eicsmear/erhic/Pid.h
"
11
12
#include <exception>
13
#include <iostream>
14
#include <limits>
15
16
#include <TDatabasePDG.h>
17
18
namespace
erhic {
19
20
Pid::Pid
(Int_t code)
21
: mCode(code) {
22
}
23
24
Pid::~Pid
() {
25
}
26
31
TParticlePDG*
Pid::Info
()
const
{
32
try
{
33
return
TDatabasePDG::Instance()->GetParticle(
Code
());
34
}
// try
35
catch
(std::exception&
e
) {
36
std::cerr
37
<<
"Caught exception in Pid::Info(): "
<< e.what()
38
<< std::endl;
39
return
NULL;
40
}
// catch
41
}
42
43
// CINT can't handle <limits> in header files so we hide it away here.
44
Int_t
Pid::InvalidCode
() {
45
return
std::numeric_limits<Int_t>::max
();
46
}
47
48
}
// namespace erhic
eic-smear
blob
master
src
erhic
Pid.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:32
using
1.8.2 with
EIC GitHub integration