MCShower.cxx
Go to the documentation of this file.
2 
3 #include <stdexcept> // std::out_of_range
4 
5 namespace sim {
6 
7  //-------------------------------------------------------------
8  MCShower::~MCShower() = default;
9 
10  //-------------------------------------------------------------
12  //-------------------------------------------------------------
13  {
14  TLorentzVector invalid(kINVALID_DOUBLE,
18  MCStep invalid_step(invalid,invalid);
19 
21 
24  fProcess = "";
25  fStart = invalid_step;
26  fEnd = invalid_step;
27 
30  fMotherProcess = "";
31  fMotherStart = invalid_step;
32  fMotherEnd = invalid_step;
33 
36  fAncestorProcess = "";
37  fAncestorStart = invalid_step;
38  fAncestorEnd = invalid_step;
39 
40  fDetProfile = invalid_step;
41 
42  fDaughterTrackID.clear();
43  fPlaneCharge.clear();
45  fdQdx.clear();
46  }
47 
48  //----------------------------------------------------
49  double MCShower::Charge(size_t plane) const
50  //----------------------------------------------------
51  {
52  if (plane >= fPlaneCharge.size())
53  throw std::out_of_range("No charge stored for plane " + std::to_string(plane));
54  return fPlaneCharge[plane];
55  } // MCShower::Charge()
56 
57  //----------------------------------------------------
58  double MCShower::dQdx(size_t plane) const
59  //----------------------------------------------------
60  {
61  if (plane >= fdQdx.size())
62  throw std::out_of_range("No dQ/dx stored for plane " + std::to_string(plane));
63  return fdQdx[plane];
64  } // MCShower::dQdx()
65 
66 }
const std::vector< double > & dQdx() const
Definition: MCShower.h:78
const double kINVALID_DOUBLE
Definition: MCLimits.h:10
virtual ~MCShower()
Default destructor.
const int kINVALID_INT
Definition: MCLimits.h:16
int fMotherPDGCode
Shower&#39;s mother PDG code.
Definition: MCShower.h:146
void ClearData()
Clears the fields of this class.
Definition: MCShower.cxx:11
unsigned int fAncestorTrackID
Shower&#39;s ancestor G4 track ID.
Definition: MCShower.h:156
MCStep fStart
Shower particle&#39;s G4 start point.
Definition: MCShower.h:138
unsigned int fTrackID
Shower particle G4 track ID.
Definition: MCShower.h:136
MCStep fDetProfile
Combined energy deposition information.
Definition: MCShower.h:165
unsigned int fMotherTrackID
Shower&#39;s mother G4 track ID.
Definition: MCShower.h:147
std::string fAncestorProcess
Shower&#39;s ancestor creation process.
Definition: MCShower.h:157
int fPDGCode
Shower particle PDG code.
Definition: MCShower.h:135
int fAncestorPDGCode
Shower&#39;s ancestor PDG code.
Definition: MCShower.h:155
std::string fProcess
Shower particle&#39;s creation process.
Definition: MCShower.h:137
double fdEdx
Shower True dEdx.
Definition: MCShower.h:166
std::string fMotherProcess
Shower&#39;s mother creation process.
Definition: MCShower.h:148
MCStep fMotherStart
Shower&#39;s mother G4 start point.
Definition: MCShower.h:149
std::vector< double > fdQdx
Definition: MCShower.h:174
Code to link reconstructed objects back to the MC truth information.
simb::Origin_t fOrigin
Definition: MCShower.h:130
MCStep fEnd
Shower particle&#39;s G4 end point.
Definition: MCShower.h:139
std::vector< unsigned int > fDaughterTrackID
Daughters&#39; track ID.
Definition: MCShower.h:164
const std::vector< double > & Charge() const
Definition: MCShower.h:77
Class def header for MCShower data container.
const unsigned int kINVALID_UINT
Definition: MCLimits.h:14
std::vector< double > fPlaneCharge
Charge deposit per plane.
Definition: MCShower.h:173
MCStep fMotherEnd
Definition: MCShower.h:150
MCStep fAncestorStart
Shower&#39;s ancestor G4 start point.
Definition: MCShower.h:158
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
MCStep fAncestorEnd
Definition: MCShower.h:159