LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
MCShower.cxx
Go to the documentation of this file.
2 
3 #include <stdexcept> // std::out_of_range
4 #include <string> // std::out_of_range
5 
6 namespace sim {
7 
8  //-------------------------------------------------------------
9  MCShower::~MCShower() = default;
10 
11  //-------------------------------------------------------------
13  //-------------------------------------------------------------
14  {
15  TLorentzVector invalid(kINVALID_DOUBLE,
19  MCStep invalid_step(invalid,invalid);
20 
22 
25  fProcess = "";
26  fStart = invalid_step;
27  fEnd = invalid_step;
28 
31  fMotherProcess = "";
32  fMotherStart = invalid_step;
33  fMotherEnd = invalid_step;
34 
37  fAncestorProcess = "";
38  fAncestorStart = invalid_step;
39  fAncestorEnd = invalid_step;
40 
41  fDetProfile = invalid_step;
42 
43  fDaughterTrackID.clear();
44  fPlaneCharge.clear();
46  fdQdx.clear();
47  }
48 
49  //----------------------------------------------------
50  double MCShower::Charge(size_t plane) const
51  //----------------------------------------------------
52  {
53  if (plane >= fPlaneCharge.size())
54  throw std::out_of_range("No charge stored for plane " + std::to_string(plane));
55  return fPlaneCharge[plane];
56  } // MCShower::Charge()
57 
58  //----------------------------------------------------
59  double MCShower::dQdx(size_t plane) const
60  //----------------------------------------------------
61  {
62  if (plane >= fdQdx.size())
63  throw std::out_of_range("No dQ/dx stored for plane " + std::to_string(plane));
64  return fdQdx[plane];
65  } // MCShower::dQdx()
66 
67 }
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:12
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
Monte Carlo Simulation.
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
std::string to_string(Flag_t< Storage > const flag)
Convert a flag into a stream (shows its index).
Definition: BitMask.h:187
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
MCStep fAncestorEnd
Definition: MCShower.h:159