LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
MCTrack.h
Go to the documentation of this file.
1 
15 #ifndef MCTRACK_H
16 #define MCTRACK_H
17 
18 #include <vector>
19 #include "MCStep.h"
21 
22 namespace sim{
23 
27  class MCTrack : public std::vector<sim::MCStep> {
28 
29  public:
30 
32  MCTrack() : std::vector<sim::MCStep>() {Clear();}
33 
35  virtual ~MCTrack(){}
36 
37  void Clear();
38 
39 
40  simb::Origin_t Origin () const { return fOrigin; }
41  int PdgCode () const { return fPDGCode; }
42  unsigned int TrackID () const { return fTrackID; }
43  const std::string& Process () const { return fProcess; }
44  const MCStep& Start () const { return fStart; }
45  const MCStep& End () const { return fEnd; }
46  const std::vector< std::vector<double> >& dQdx() const{ return fdQdx;} // dQdx[# of MCSteps][# of plane]
47  const std::vector<double>& dEdx() const {return fdEdx;} // dEdx[# of MCSteps]
48 
49  int MotherPdgCode () const { return fMotherPDGCode; }
50  unsigned int MotherTrackID () const { return fMotherTrackID; }
51  const std::string& MotherProcess () const { return fMotherProcess; }
52  const MCStep& MotherStart () const { return fMotherStart; }
53  const MCStep& MotherEnd () const { return fMotherEnd; }
54 
55  int AncestorPdgCode () const { return fAncestorPDGCode; }
56  unsigned int AncestorTrackID () const { return fAncestorTrackID; }
57  const std::string& AncestorProcess () const { return fMotherProcess; }
58  const MCStep& AncestorStart () const { return fAncestorStart; }
59  const MCStep& AncestorEnd () const { return fAncestorEnd; }
60 
61  void Origin ( simb::Origin_t o ) { fOrigin = o; }
62  void PdgCode ( int id ) { fPDGCode = id; }
63  void TrackID ( unsigned int id ) { fTrackID = id; }
64  void Process ( std::string name ) { fProcess = name; }
65  void Start ( const MCStep s ) { fStart = s; }
66  void End ( const MCStep s ) { fEnd = s; }
67  void dEdx ( const std::vector<double> s) { fdEdx = s;}
68  void dQdx ( const std::vector<std::vector<double> > s) { fdQdx = s;}
69 
70 
71  void MotherPdgCode ( int id ) { fMotherPDGCode = id; }
72  void MotherTrackID ( unsigned int id ) { fMotherTrackID = id; }
73  void MotherProcess ( const std::string& n ) { fMotherProcess = n; }
74  void MotherStart ( const MCStep& s ) { fMotherStart = s; }
75  void MotherEnd ( const MCStep& s ) { fMotherEnd = s; }
76 
77  void AncestorPdgCode ( int id ) { fAncestorPDGCode = id; }
78  void AncestorTrackID ( unsigned int id ) { fAncestorTrackID = id; }
79  void AncestorProcess ( const std::string& n ) { fAncestorProcess = n; }
80  void AncestorStart ( const MCStep& s ) { fAncestorStart = s; }
81  void AncestorEnd ( const MCStep& s ) { fAncestorEnd = s; }
82 
83 
84  protected:
85 
87  int fPDGCode;
88  unsigned int fTrackID;
89  std::string fProcess;
92  std::vector<std::vector<double> > fdQdx; //< the G4 electron yeild per plane between each step // [N Plane][MCSteps - 1]
93  std::vector<double> fdEdx;//< the G4 "ionization" energy loss between each step // [MCSteps - 1]
94 
96  unsigned int fMotherTrackID;
97  std::string fMotherProcess;
100 
102  unsigned int fAncestorTrackID;
103  std::string fAncestorProcess;
106  };
107 }
108 #endif
109  // end of doxygen group
Float_t s
Definition: plot.C:23
MCStep fStart
G4 start position/momentum of this track particle.
Definition: MCTrack.h:90
MCStep fMotherEnd
This particle&#39;s mother&#39;s G4 end position/momentum.
Definition: MCTrack.h:99
unsigned int fAncestorTrackID
This particle&#39;s ancestor&#39;s G4 track ID.
Definition: MCTrack.h:102
simb::Origin_t Origin() const
Definition: MCTrack.h:40
void Origin(simb::Origin_t o)
Definition: MCTrack.h:61
void dEdx(const std::vector< double > s)
Definition: MCTrack.h:67
std::string fProcess
G4 creation process of this track particle.
Definition: MCTrack.h:89
void dQdx(const std::vector< std::vector< double > > s)
Definition: MCTrack.h:68
const std::string & AncestorProcess() const
Definition: MCTrack.h:57
std::vector< double > fdEdx
Definition: MCTrack.h:93
void Clear()
Definition: MCTrack.cxx:8
enum simb::_ev_origin Origin_t
event origin types
const MCStep & MotherEnd() const
Definition: MCTrack.h:53
unsigned int AncestorTrackID() const
Definition: MCTrack.h:56
void AncestorTrackID(unsigned int id)
Definition: MCTrack.h:78
STL namespace.
int AncestorPdgCode() const
Definition: MCTrack.h:55
const MCStep & End() const
Definition: MCTrack.h:45
const std::vector< std::vector< double > > & dQdx() const
Definition: MCTrack.h:46
Class def header for mcstep data container.
void TrackID(unsigned int id)
Definition: MCTrack.h:63
unsigned int MotherTrackID() const
Definition: MCTrack.h:50
int fPDGCode
PDG code of this track particle.
Definition: MCTrack.h:87
int fMotherPDGCode
This particle&#39;s mother&#39;s PDG code.
Definition: MCTrack.h:95
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
void MotherTrackID(unsigned int id)
Definition: MCTrack.h:72
void PdgCode(int id)
Definition: MCTrack.h:62
void AncestorProcess(const std::string &n)
Definition: MCTrack.h:79
MCStep fEnd
G4 end position/momentum of this track particle.
Definition: MCTrack.h:91
int fAncestorPDGCode
This particle&#39;s ancestor&#39;s PDG code.
Definition: MCTrack.h:101
const MCStep & AncestorStart() const
Definition: MCTrack.h:58
Monte Carlo Simulation.
void Start(const MCStep s)
Definition: MCTrack.h:65
int PdgCode() const
Definition: MCTrack.h:41
simb::Origin_t fOrigin
Origin of this particle (see simb::Origin_t)
Definition: MCTrack.h:86
void AncestorEnd(const MCStep &s)
Definition: MCTrack.h:81
void AncestorStart(const MCStep &s)
Definition: MCTrack.h:80
const MCStep & MotherStart() const
Definition: MCTrack.h:52
MCStep fAncestorEnd
This particle&#39;s ancestor&#39;s G4 start position/momentum.
Definition: MCTrack.h:105
int MotherPdgCode() const
Definition: MCTrack.h:49
std::string fMotherProcess
This particle&#39;s mother&#39;s G4 process name.
Definition: MCTrack.h:97
unsigned int fTrackID
G4 track ID.
Definition: MCTrack.h:88
MCStep fAncestorStart
This particle&#39;s ancestor&#39;s G4 start position/momentum.
Definition: MCTrack.h:104
unsigned int fMotherTrackID
This particle&#39;s mother&#39;s G4 track ID.
Definition: MCTrack.h:96
const std::string & Process() const
Definition: MCTrack.h:43
const std::string & MotherProcess() const
Definition: MCTrack.h:51
std::vector< std::vector< double > > fdQdx
Definition: MCTrack.h:92
MCStep fMotherStart
This particle&#39;s mother&#39;s G4 start position/momentum.
Definition: MCTrack.h:98
void Process(std::string name)
Definition: MCTrack.h:64
void MotherStart(const MCStep &s)
Definition: MCTrack.h:74
const MCStep & Start() const
Definition: MCTrack.h:44
Char_t n[5]
void End(const MCStep s)
Definition: MCTrack.h:66
unsigned int TrackID() const
Definition: MCTrack.h:42
const std::vector< double > & dEdx() const
Definition: MCTrack.h:47
virtual ~MCTrack()
Default destructor.
Definition: MCTrack.h:35
std::string fAncestorProcess
This particle&#39;s ancestor&#39;s G4 process name.
Definition: MCTrack.h:103
void MotherPdgCode(int id)
Definition: MCTrack.h:71
const MCStep & AncestorEnd() const
Definition: MCTrack.h:59
void AncestorPdgCode(int id)
Definition: MCTrack.h:77
MCTrack()
Default constructor.
Definition: MCTrack.h:32
void MotherProcess(const std::string &n)
Definition: MCTrack.h:73
void MotherEnd(const MCStep &s)
Definition: MCTrack.h:75