LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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  {
15  MCStep invalid_step(invalid, invalid);
16 
18 
21  fProcess = "";
22  fStart = invalid_step;
23  fEnd = invalid_step;
24 
27  fMotherProcess = "";
28  fMotherStart = invalid_step;
29  fMotherEnd = invalid_step;
30 
33  fAncestorProcess = "";
34  fAncestorStart = invalid_step;
35  fAncestorEnd = invalid_step;
36 
37  fDetProfile = invalid_step;
38 
39  fDaughterTrackID.clear();
40  fPlaneCharge.clear();
42  fdQdx.clear();
43  }
44 
45  //----------------------------------------------------
46  double MCShower::Charge(size_t plane) const
47  //----------------------------------------------------
48  {
49  if (plane >= fPlaneCharge.size())
50  throw std::out_of_range("No charge stored for plane " + std::to_string(plane));
51  return fPlaneCharge[plane];
52  } // MCShower::Charge()
53 
54  //----------------------------------------------------
55  double MCShower::dQdx(size_t plane) const
56  //----------------------------------------------------
57  {
58  if (plane >= fdQdx.size())
59  throw std::out_of_range("No dQ/dx stored for plane " + std::to_string(plane));
60  return fdQdx[plane];
61  } // MCShower::dQdx()
62 
63 }
const std::vector< double > & dQdx() const
Definition: MCShower.h:76
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:138
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:148
MCStep fStart
Shower particle&#39;s G4 start point.
Definition: MCShower.h:131
unsigned int fTrackID
Shower particle G4 track ID.
Definition: MCShower.h:129
MCStep fDetProfile
Combined energy deposition information.
Definition: MCShower.h:157
unsigned int fMotherTrackID
Shower&#39;s mother G4 track ID.
Definition: MCShower.h:139
std::string fAncestorProcess
Shower&#39;s ancestor creation process.
Definition: MCShower.h:149
int fPDGCode
Shower particle PDG code.
Definition: MCShower.h:128
int fAncestorPDGCode
Shower&#39;s ancestor PDG code.
Definition: MCShower.h:147
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
std::string fProcess
Shower particle&#39;s creation process.
Definition: MCShower.h:130
double fdEdx
Shower True dEdx.
Definition: MCShower.h:158
std::string fMotherProcess
Shower&#39;s mother creation process.
Definition: MCShower.h:140
MCStep fMotherStart
Shower&#39;s mother G4 start point.
Definition: MCShower.h:141
std::vector< double > fdQdx
Definition: MCShower.h:165
Monte Carlo Simulation.
simb::Origin_t fOrigin
Definition: MCShower.h:123
MCStep fEnd
Shower particle&#39;s G4 end point.
Definition: MCShower.h:132
std::vector< unsigned int > fDaughterTrackID
Daughters&#39; track ID.
Definition: MCShower.h:156
const std::vector< double > & Charge() const
Definition: MCShower.h:75
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:164
MCStep fMotherEnd
Definition: MCShower.h:142
MCStep fAncestorStart
Shower&#39;s ancestor G4 start point.
Definition: MCShower.h:150
MCStep fAncestorEnd
Definition: MCShower.h:151