eic-smear
1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
Main Page
Related Pages
Classes
Files
File List
File Members
Pid.cxx
Go to the documentation of this file.
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
erhic::Pid::Code
Int_t Code() const
Definition:
Pid.h:105
erhic::Pid::~Pid
virtual ~Pid()
Definition:
Pid.cxx:24
Pid.h
erhic::Pid::Pid
Pid(Int_t pdg=Pid::InvalidCode())
Definition:
Pid.cxx:20
erhic::Pid::InvalidCode
static Int_t InvalidCode()
Definition:
Pid.cxx:44
erhic::Pid::Info
TParticlePDG * Info() const
Definition:
Pid.cxx:31
eic-smear
src
erhic
Pid.cxx
Generated on Thu Jul 24 2014 15:18:39 for eic-smear by
1.8.7