LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MCShower.h
Go to the documentation of this file.
1 
15 #ifndef MCSHOWER_H
16 #define MCSHOWER_H
17 
18 // LArSoft libraries
20 
21 // Supporting tools
23 
24 // ROOT libraries
25 #include <TVector3.h>
26 
27 // Standard C/C++ libraries
28 #include <string>
29 #include <utility> // std::move()
30 #include <vector>
31 
32 namespace sim {
33 
34  class MCShower {
35 
36  public:
39 
41  virtual ~MCShower();
42 
44  virtual void Clear() { ClearData(); }
45 
46  //--- Getters ---//
47 
48  simb::Origin_t Origin() const { return fOrigin; }
49 
50  int PdgCode() const { return fPDGCode; }
51  unsigned int TrackID() const { return fTrackID; }
52  const std::string& Process() const { return fProcess; }
53  const MCStep& Start() const { return fStart; }
54  const MCStep& End() const { return fEnd; }
55 
56  int MotherPdgCode() const { return fMotherPDGCode; }
57  unsigned int MotherTrackID() const { return fMotherTrackID; }
58  const std::string& MotherProcess() const { return fMotherProcess; }
59  const MCStep& MotherStart() const { return fMotherStart; }
60  const MCStep& MotherEnd() const { return fMotherEnd; }
61 
62  int AncestorPdgCode() const { return fAncestorPDGCode; }
63  unsigned int AncestorTrackID() const { return fAncestorTrackID; }
64  const std::string& AncestorProcess() const { return fAncestorProcess; }
65  const MCStep& AncestorStart() const { return fAncestorStart; }
66  const MCStep& AncestorEnd() const { return fAncestorEnd; }
67 
68  const MCStep& DetProfile() const { return fDetProfile; }
69 
70  const std::vector<unsigned int>& DaughterTrackID() const { return fDaughterTrackID; }
71 
72  double Charge(size_t plane) const;
73  double dQdx(size_t plane) const;
74 
75  const std::vector<double>& Charge() const { return fPlaneCharge; }
76  const std::vector<double>& dQdx() const { return fdQdx; }
77 
78  double dEdx() const { return fdEdx; }
79  const TVector3& StartDir() const { return fStartDir; }
80 
81  //--- Setters ---//
82  void Origin(simb::Origin_t o) { fOrigin = o; }
83 
84  void PdgCode(int id) { fPDGCode = id; }
85  void TrackID(unsigned int id) { fTrackID = id; }
86  void Process(const std::string& name) { fProcess = name; }
87  void Start(const MCStep& s) { fStart = s; }
88  void End(const MCStep& s) { fEnd = s; }
89  void StartDir(const TVector3& sdir) { fStartDir = sdir; }
90 
91  void MotherPdgCode(int id) { fMotherPDGCode = id; }
92  void MotherTrackID(unsigned int id) { fMotherTrackID = id; }
93  void MotherProcess(const std::string& name) { fMotherProcess = name; }
94  void MotherStart(const MCStep& s) { fMotherStart = s; }
95  void MotherEnd(const MCStep& s) { fMotherEnd = s; }
96 
97  void AncestorPdgCode(int id) { fAncestorPDGCode = id; }
98  void AncestorTrackID(unsigned int id) { fAncestorTrackID = id; }
99  void AncestorProcess(const std::string& name) { fAncestorProcess = name; }
100  void AncestorStart(const MCStep& s) { fAncestorStart = s; }
101  void AncestorEnd(const MCStep& s) { fAncestorEnd = s; }
102 
103  void DetProfile(const MCStep& s) { fDetProfile = s; }
104 
105  void DaughterTrackID(const std::vector<unsigned int>& id_v) { fDaughterTrackID = id_v; }
106 
108  void Charge(const std::vector<double>& q) { fPlaneCharge = q; }
110  void Charge(std::vector<double>&& q) { fPlaneCharge = std::move(q); }
111 
113  void dQdx(const std::vector<double>& dqdx) { fdQdx = dqdx; }
115  void dQdx(std::vector<double>&& dqdx) { fdQdx = std::move(dqdx); }
116 
117  void dEdx(double dedx) { fdEdx = dedx; }
118  void dEdxRAD(double dedx) { fdEdx_radial = dedx; }
119 
120  protected:
124 
128  int fPDGCode;
129  unsigned int fTrackID;
130  std::string fProcess;
133  TVector3 fStartDir;
134 
139  unsigned int fMotherTrackID;
140  std::string fMotherProcess;
143 
148  unsigned int fAncestorTrackID;
149  std::string fAncestorProcess;
152 
156  std::vector<unsigned int> fDaughterTrackID;
158  double fdEdx;
159  double fdEdx_radial;
160 
164  std::vector<double> fPlaneCharge;
165  std::vector<double> fdQdx;
166 
169  void ClearData();
170 
171  }; // class MCShower
172 
173 } // namespace sim
174 
175 #endif // MCSHOWER_H
176  // end of doxygen group
const std::vector< double > & dQdx() const
Definition: MCShower.h:76
virtual ~MCShower()
Default destructor.
int fMotherPDGCode
Shower&#39;s mother PDG code.
Definition: MCShower.h:138
const MCStep & End() const
Definition: MCShower.h:54
void AncestorPdgCode(int id)
Definition: MCShower.h:97
void ClearData()
Clears the fields of this class.
Definition: MCShower.cxx:11
void PdgCode(int id)
Definition: MCShower.h:84
void dQdx(std::vector< double > &&dqdx)
Moves the specified dQ/dx vector (one entry per plane) into this object.
Definition: MCShower.h:115
void MotherPdgCode(int id)
Definition: MCShower.h:91
unsigned int TrackID() const
Definition: MCShower.h:51
unsigned int fAncestorTrackID
Shower&#39;s ancestor G4 track ID.
Definition: MCShower.h:148
void Origin(simb::Origin_t o)
Definition: MCShower.h:82
enum simb::_ev_origin Origin_t
event origin types
void MotherTrackID(unsigned int id)
Definition: MCShower.h:92
void Charge(std::vector< double > &&q)
Moves the specified charge vector (one entry per plane) into this object.
Definition: MCShower.h:110
int PdgCode() const
Definition: MCShower.h:50
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
void AncestorTrackID(unsigned int id)
Definition: MCShower.h:98
Class def header for mcstep data container.
void StartDir(const TVector3 &sdir)
Definition: MCShower.h:89
void dQdx(const std::vector< double > &dqdx)
Copies the specified dQ/dx vector (one entry per plane) into this object.
Definition: MCShower.h:113
void MotherStart(const MCStep &s)
Definition: MCShower.h:94
unsigned int fMotherTrackID
Shower&#39;s mother G4 track ID.
Definition: MCShower.h:139
void Charge(const std::vector< double > &q)
Copies the specified charge vector (one entry per plane) into this object.
Definition: MCShower.h:108
std::string fAncestorProcess
Shower&#39;s ancestor creation process.
Definition: MCShower.h:149
int fPDGCode
Shower particle PDG code.
Definition: MCShower.h:128
const std::vector< unsigned int > & DaughterTrackID() const
Definition: MCShower.h:70
const TVector3 & StartDir() const
Definition: MCShower.h:79
void AncestorEnd(const MCStep &s)
Definition: MCShower.h:101
int fAncestorPDGCode
Shower&#39;s ancestor PDG code.
Definition: MCShower.h:147
simb::Origin_t Origin() const
Definition: MCShower.h:48
double fdEdx_radial
Definition: MCShower.h:159
int MotherPdgCode() const
Definition: MCShower.h:56
const std::string & AncestorProcess() const
Definition: MCShower.h:64
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
void Start(const MCStep &s)
Definition: MCShower.h:87
void DaughterTrackID(const std::vector< unsigned int > &id_v)
Definition: MCShower.h:105
const MCStep & AncestorStart() const
Definition: MCShower.h:65
const std::string & MotherProcess() const
Definition: MCShower.h:58
Monte Carlo Simulation.
simb::Origin_t fOrigin
Definition: MCShower.h:123
void DetProfile(const MCStep &s)
Definition: MCShower.h:103
void AncestorStart(const MCStep &s)
Definition: MCShower.h:100
double dEdx() const
Definition: MCShower.h:78
unsigned int AncestorTrackID() const
Definition: MCShower.h:63
const MCStep & AncestorEnd() const
Definition: MCShower.h:66
const MCStep & DetProfile() const
Definition: MCShower.h:68
void MotherProcess(const std::string &name)
Definition: MCShower.h:93
const MCStep & Start() const
Definition: MCShower.h:53
void dEdxRAD(double dedx)
Definition: MCShower.h:118
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
void End(const MCStep &s)
Definition: MCShower.h:88
const MCStep & MotherEnd() const
Definition: MCShower.h:60
const std::vector< double > & Charge() const
Definition: MCShower.h:75
MCShower()
Default constructor; clears the local data.
Definition: MCShower.h:38
TVector3 fStartDir
Definition: MCShower.h:133
unsigned int MotherTrackID() const
Definition: MCShower.h:57
const std::string & Process() const
Definition: MCShower.h:52
std::vector< double > fPlaneCharge
Charge deposit per plane.
Definition: MCShower.h:164
const MCStep & MotherStart() const
Definition: MCShower.h:59
void dEdx(double dedx)
Definition: MCShower.h:117
void TrackID(unsigned int id)
Definition: MCShower.h:85
int AncestorPdgCode() const
Definition: MCShower.h:62
MCStep fMotherEnd
Definition: MCShower.h:142
virtual void Clear()
Clear method.
Definition: MCShower.h:44
MCStep fAncestorStart
Shower&#39;s ancestor G4 start point.
Definition: MCShower.h:150
MCStep fAncestorEnd
Definition: MCShower.h:151
void MotherEnd(const MCStep &s)
Definition: MCShower.h:95
void Process(const std::string &name)
Definition: MCShower.h:86
void AncestorProcess(const std::string &name)
Definition: MCShower.h:99