LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 <vector>
30 # include <utility> // std::move()
31 
32 namespace sim {
33 
34  class MCShower {
35 
36  public:
37 
40 
42  virtual ~MCShower();
43 
44 
46  virtual void Clear() { ClearData(); }
47 
48  //--- Getters ---//
49 
50  simb::Origin_t Origin () const { return fOrigin; }
51 
52  int PdgCode () const { return fPDGCode; }
53  unsigned int TrackID () const { return fTrackID; }
54  const std::string& Process () const { return fProcess; }
55  const MCStep& Start () const { return fStart; }
56  const MCStep& End () const { return fEnd; }
57 
58  int MotherPdgCode () const { return fMotherPDGCode; }
59  unsigned int MotherTrackID () const { return fMotherTrackID; }
60  const std::string& MotherProcess () const { return fMotherProcess; }
61  const MCStep& MotherStart () const { return fMotherStart; }
62  const MCStep& MotherEnd () const { return fMotherEnd; }
63 
64  int AncestorPdgCode () const { return fAncestorPDGCode; }
65  unsigned int AncestorTrackID () const { return fAncestorTrackID; }
66  const std::string& AncestorProcess () const { return fAncestorProcess; }
67  const MCStep& AncestorStart () const { return fAncestorStart; }
68  const MCStep& AncestorEnd () const { return fAncestorEnd; }
69 
70  const MCStep& DetProfile () const { return fDetProfile; }
71 
72  const std::vector<unsigned int>& DaughterTrackID() const { return fDaughterTrackID; }
73 
74  double Charge(size_t plane) const;
75  double dQdx(size_t plane) const;
76 
77  const std::vector<double>& Charge() const { return fPlaneCharge; }
78  const std::vector<double>& dQdx() const { return fdQdx; }
79 
80 
81  double dEdx() const { return fdEdx; }
82  const TVector3& StartDir() const {return fStartDir;}
83 
84  //--- Setters ---//
85  void Origin ( simb::Origin_t o ) { fOrigin = o; }
86 
87  void PdgCode ( int id ) { fPDGCode = id; }
88  void TrackID ( unsigned int id ) { fTrackID = id; }
89  void Process ( const std::string &name ) { fProcess = name; }
90  void Start ( const MCStep &s ) { fStart = s; }
91  void End ( const MCStep &s ) { fEnd = s; }
92  void StartDir ( const TVector3 &sdir) { fStartDir = sdir; }
93 
94  void MotherPdgCode ( int id ) { fMotherPDGCode = id; }
95  void MotherTrackID ( unsigned int id ) { fMotherTrackID = id; }
96  void MotherProcess ( const std::string& name ) { fMotherProcess = name; }
97  void MotherStart ( const MCStep& s ) { fMotherStart = s; }
98  void MotherEnd ( const MCStep& s ) { fMotherEnd = s; }
99 
100  void AncestorPdgCode ( int id ) { fAncestorPDGCode = id; }
101  void AncestorTrackID ( unsigned int id ) { fAncestorTrackID = id; }
102  void AncestorProcess ( const std::string& name ) { fAncestorProcess = name; }
103  void AncestorStart ( const MCStep& s ) { fAncestorStart = s; }
104  void AncestorEnd ( const MCStep& s ) { fAncestorEnd = s; }
105 
106  void DetProfile ( const MCStep& s) { fDetProfile = s; }
107 
108  void DaughterTrackID ( const std::vector<unsigned int>& id_v ) { fDaughterTrackID = id_v; }
109 
111  void Charge (const std::vector<double>& q) { fPlaneCharge = q; }
113  void Charge (std::vector<double>&& q) { fPlaneCharge = std::move(q); }
114 
116  void dQdx (const std::vector<double>& dqdx) { fdQdx = dqdx; }
118  void dQdx (std::vector<double>&& dqdx) { fdQdx = std::move(dqdx); }
119 
120  void dEdx (double dedx) {fdEdx = dedx;}
121  void dEdxRAD (double dedx) {fdEdx_radial = dedx;}
122 
123 
124 
125 
126  protected:
127 
131 
135  int fPDGCode;
136  unsigned int fTrackID;
137  std::string fProcess;
140  TVector3 fStartDir;
141 
143 
147  unsigned int fMotherTrackID;
148  std::string fMotherProcess;
151 
156  unsigned int fAncestorTrackID;
157  std::string fAncestorProcess;
160 
164  std::vector<unsigned int> fDaughterTrackID;
166  double fdEdx;
167  double fdEdx_radial;
168 
170 
173  std::vector<double> fPlaneCharge;
174  std::vector<double> fdQdx;
175 
177 
179  void ClearData();
180 
181  }; // class MCShower
182 
183 } // namespace sim
184 
185 #endif // MCSHOWER_H
186  // end of doxygen group
const std::vector< double > & dQdx() const
Definition: MCShower.h:78
Float_t s
Definition: plot.C:23
virtual ~MCShower()
Default destructor.
int fMotherPDGCode
Shower&#39;s mother PDG code.
Definition: MCShower.h:146
const MCStep & End() const
Definition: MCShower.h:56
void AncestorPdgCode(int id)
Definition: MCShower.h:100
void ClearData()
Clears the fields of this class.
Definition: MCShower.cxx:12
void PdgCode(int id)
Definition: MCShower.h:87
void dQdx(std::vector< double > &&dqdx)
Moves the specified dQ/dx vector (one entry per plane) into this object.
Definition: MCShower.h:118
void MotherPdgCode(int id)
Definition: MCShower.h:94
unsigned int TrackID() const
Definition: MCShower.h:53
unsigned int fAncestorTrackID
Shower&#39;s ancestor G4 track ID.
Definition: MCShower.h:156
void Origin(simb::Origin_t o)
Definition: MCShower.h:85
enum simb::_ev_origin Origin_t
event origin types
void MotherTrackID(unsigned int id)
Definition: MCShower.h:95
void Charge(std::vector< double > &&q)
Moves the specified charge vector (one entry per plane) into this object.
Definition: MCShower.h:113
int PdgCode() const
Definition: MCShower.h:52
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
void AncestorTrackID(unsigned int id)
Definition: MCShower.h:101
Class def header for mcstep data container.
void StartDir(const TVector3 &sdir)
Definition: MCShower.h:92
void dQdx(const std::vector< double > &dqdx)
Copies the specified dQ/dx vector (one entry per plane) into this object.
Definition: MCShower.h:116
void MotherStart(const MCStep &s)
Definition: MCShower.h:97
unsigned int fMotherTrackID
Shower&#39;s mother G4 track ID.
Definition: MCShower.h:147
void Charge(const std::vector< double > &q)
Copies the specified charge vector (one entry per plane) into this object.
Definition: MCShower.h:111
std::string fAncestorProcess
Shower&#39;s ancestor creation process.
Definition: MCShower.h:157
int fPDGCode
Shower particle PDG code.
Definition: MCShower.h:135
const std::vector< unsigned int > & DaughterTrackID() const
Definition: MCShower.h:72
const TVector3 & StartDir() const
Definition: MCShower.h:82
void AncestorEnd(const MCStep &s)
Definition: MCShower.h:104
int fAncestorPDGCode
Shower&#39;s ancestor PDG code.
Definition: MCShower.h:155
simb::Origin_t Origin() const
Definition: MCShower.h:50
double fdEdx_radial
Definition: MCShower.h:167
int MotherPdgCode() const
Definition: MCShower.h:58
const std::string & AncestorProcess() const
Definition: MCShower.h:66
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
void Start(const MCStep &s)
Definition: MCShower.h:90
void DaughterTrackID(const std::vector< unsigned int > &id_v)
Definition: MCShower.h:108
const MCStep & AncestorStart() const
Definition: MCShower.h:67
const std::string & MotherProcess() const
Definition: MCShower.h:60
Monte Carlo Simulation.
simb::Origin_t fOrigin
Definition: MCShower.h:130
void DetProfile(const MCStep &s)
Definition: MCShower.h:106
void AncestorStart(const MCStep &s)
Definition: MCShower.h:103
double dEdx() const
Definition: MCShower.h:81
unsigned int AncestorTrackID() const
Definition: MCShower.h:65
const MCStep & AncestorEnd() const
Definition: MCShower.h:68
const MCStep & DetProfile() const
Definition: MCShower.h:70
void MotherProcess(const std::string &name)
Definition: MCShower.h:96
const MCStep & Start() const
Definition: MCShower.h:55
void dEdxRAD(double dedx)
Definition: MCShower.h:121
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
void End(const MCStep &s)
Definition: MCShower.h:91
const MCStep & MotherEnd() const
Definition: MCShower.h:62
const std::vector< double > & Charge() const
Definition: MCShower.h:77
MCShower()
Default constructor; clears the local data.
Definition: MCShower.h:39
TVector3 fStartDir
Definition: MCShower.h:140
unsigned int MotherTrackID() const
Definition: MCShower.h:59
const std::string & Process() const
Definition: MCShower.h:54
std::vector< double > fPlaneCharge
Charge deposit per plane.
Definition: MCShower.h:173
const MCStep & MotherStart() const
Definition: MCShower.h:61
void dEdx(double dedx)
Definition: MCShower.h:120
void TrackID(unsigned int id)
Definition: MCShower.h:88
int AncestorPdgCode() const
Definition: MCShower.h:64
MCStep fMotherEnd
Definition: MCShower.h:150
virtual void Clear()
Clear method.
Definition: MCShower.h:46
MCStep fAncestorStart
Shower&#39;s ancestor G4 start point.
Definition: MCShower.h:158
MCStep fAncestorEnd
Definition: MCShower.h:159
void MotherEnd(const MCStep &s)
Definition: MCShower.h:98
void Process(const std::string &name)
Definition: MCShower.h:89
void AncestorProcess(const std::string &name)
Definition: MCShower.h:102