star-travex
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TGeaEvent.h
Go to the documentation of this file.
1 #ifndef TGeaEvent_h
2 #define TGeaEvent_h
3 
4 #include <string>
5 #include <set>
6 
7 #include "TObject.h"
8 #include "TClonesArray.h"
9 #include "TRefArray.h"
10 
11 class TGiant3;
12 class TGeaTrack;
13 class TGeaStep;
14 
15 
16 class TGeaEvent : public TObject
17 {
18 public:
19  TGeaEvent();
20  ~TGeaEvent(){ Clear(); }
21 
22  static std::string DecodeHashedPath(size_t hashValue);
23 
24  static void *fgHash2PathMap;
25  static TGiant3 *geant3;
26 
27  Int_t idEvent;
28  Int_t nTracks;
29  Int_t nSteps;
30  TClonesArray *tracks;
31  TClonesArray *steps;
32 
34 
35  void Clear( const Option_t *opts="" );
36 
38 };
39 
40 
41 class TGeaTrack : public TObject
42 {
43 public:
44  explicit TGeaTrack(TGeaEvent *parentEvent=nullptr);
45  ~TGeaTrack(){ Clear(); }
46 
48  Int_t idTruth; // ID truth for the track
49  Float_t eta; // initial eta
50  Float_t phi; // initial phi
51  Float_t x, y, z; // track 1st position
52  Float_t px, py, pz; // track momentum
53  Float_t mass, charge;
54  Int_t nSteps; // number of tracking steps
55  //TObjArray steps; // track history
56  TRefArray steps;//[nSteps]
57 
58  TGeaStep *AddStep();
59  void Clear(const Option_t *opts="" );
60 
62 };
63 
64 
65 class TGeaStep : public TObject
66 {
67 public:
68  TGeaStep();
69  bool MatchedVolName(const std::string & pattern) const;
70  bool MatchedVolName(const std::set<std::string> & patterns) const;
71 
72  void Clear( const Option_t *opts="" );
73 
74  Int_t idStep; // Number of tracking steps in this track
75  Int_t idTruth; // idTruth of the parent track
76  Float_t x,y,z,r; // Position of step;
77  Int_t state; // Tracking state (inwvol)
78  Float_t dEstep; // energy lost in this step [GeV]
79  Float_t adEstep; // accumulated energy lost by this point [GeV]
80  Float_t step; // step size [cm]
81  Float_t dens; // density of material in this tracking step
82  Float_t relRadLength;
83  size_t volNameHash;
84 
85  ClassDef(TGeaStep,1);
86 };
87 
88 #endif
static std::string DecodeHashedPath(size_t hashValue)
Definition: TGeaEvent.cxx:74
Int_t idEvent
Definition: TGeaEvent.h:27
ClassDef(TGeaEvent, 1)
Float_t dEstep
Definition: TGeaEvent.h:78
Int_t idTruth
Definition: TGeaEvent.h:75
static void * fgHash2PathMap
Definition: TGeaEvent.h:24
TGeaTrack * AddTrack()
Definition: TGeaEvent.cxx:31
Float_t pz
Definition: TGeaEvent.h:52
Float_t adEstep
Definition: TGeaEvent.h:79
TClonesArray * steps
Definition: TGeaEvent.h:31
void Clear(const Option_t *opts="")
Definition: TGeaEvent.cxx:65
ClassDef(TGeaStep, 1)
void Clear(const Option_t *opts="")
Definition: TGeaEvent.cxx:125
size_t volNameHash
Definition: TGeaEvent.h:83
TClonesArray * tracks
Definition: TGeaEvent.h:30
~TGeaEvent()
Definition: TGeaEvent.h:20
Float_t phi
Definition: TGeaEvent.h:50
static TGiant3 * geant3
Pointer to all geant3 structures.
Definition: TGeaEvent.h:25
Float_t dens
Definition: TGeaEvent.h:81
Float_t z
Definition: TGeaEvent.h:76
Int_t nSteps
Definition: TGeaEvent.h:29
Float_t step
Definition: TGeaEvent.h:80
Int_t nTracks
Definition: TGeaEvent.h:28
Int_t nSteps
Definition: TGeaEvent.h:54
TGeaEvent * mParentEvent
Transient pointer to parent event.
Definition: TGeaEvent.h:47
Float_t relRadLength
Definition: TGeaEvent.h:82
Float_t py
Definition: TGeaEvent.h:52
Float_t mass
Definition: TGeaEvent.h:53
Float_t eta
Definition: TGeaEvent.h:49
TGeaStep * AddStep()
Definition: TGeaEvent.cxx:93
ClassDef(TGeaTrack, 1)
Int_t idTruth
Definition: TGeaEvent.h:48
TRefArray steps
Definition: TGeaEvent.h:56
Int_t idStep
Definition: TGeaEvent.h:74
Float_t px
Definition: TGeaEvent.h:52
Float_t charge
Definition: TGeaEvent.h:53
bool MatchedVolName(const std::string &pattern) const
Definition: TGeaEvent.cxx:158
Float_t x
Definition: TGeaEvent.h:51
TGeaTrack(TGeaEvent *parentEvent=nullptr)
Definition: TGeaEvent.cxx:90
~TGeaTrack()
Definition: TGeaEvent.h:45
Float_t y
Definition: TGeaEvent.h:51
Float_t z
Definition: TGeaEvent.h:51
Int_t state
Definition: TGeaEvent.h:77
Float_t x
Definition: TGeaEvent.h:76
Float_t r
Definition: TGeaEvent.h:76
Float_t y
Definition: TGeaEvent.h:76
void Clear(const Option_t *opts="")
Definition: TGeaEvent.cxx:151