All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCTrack.h
Go to the documentation of this file.
1 /**
2  * \file MCTrack.h
3  *
4  * \ingroup MCBase
5  *
6  * \brief Class def header for mctrack data container
7  *
8  * @author Kazu - Nevis 2014
9  */
10 
11 /** \addtogroup MCBase
12 
13  @{*/
14 
15 #ifndef MCTRACK_H
16 #define MCTRACK_H
17 
18 #include <vector>
20 #include "nusimdata/SimulationBase/MCTruth.h"
21 
22 namespace sim{
23 
24  /**
25  \class MCTrack
26  */
27  class MCTrack : public std::vector<sim::MCStep> {
28 
29  public:
30 
31  /// Default constructor
32  MCTrack() : std::vector<sim::MCStep>() {Clear();}
33 
34  /// Default destructor
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 
86  simb::Origin_t fOrigin; ///< Origin of this particle (see simb::Origin_t)
87  int fPDGCode; ///< PDG code of this track particle
88  unsigned int fTrackID; ///< G4 track ID
89  std::string fProcess; ///< G4 creation process of this track particle
90  MCStep fStart; ///< G4 start position/momentum of this track particle
91  MCStep fEnd; ///< G4 end position/momentum of this track particle
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 
95  int fMotherPDGCode; ///< This particle's mother's PDG code
96  unsigned int fMotherTrackID; ///< This particle's mother's G4 track ID
97  std::string fMotherProcess; ///< This particle's mother's G4 process name
98  MCStep fMotherStart; ///< This particle's mother's G4 start position/momentum
99  MCStep fMotherEnd; ///< This particle's mother's G4 end position/momentum
100 
101  int fAncestorPDGCode; ///< This particle's ancestor's PDG code
102  unsigned int fAncestorTrackID; ///< This particle's ancestor's G4 track ID
103  std::string fAncestorProcess; ///< This particle's ancestor's G4 process name
104  MCStep fAncestorStart; ///< This particle's ancestor's G4 start position/momentum
105  MCStep fAncestorEnd; ///< This particle's ancestor's G4 start position/momentum
106  };
107 }
108 #endif
109 
110 /** @} */ // end of doxygen group
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
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
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:5
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
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
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
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
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
then echo fcl name
const MCStep & Start() const
Definition: MCTrack.h:44
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