StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AgUStep.h
1 #ifndef __AgUStep_h__
2 #define __AgUStep_h__
3 
4 #include "TNamed.h"
5 #include "TTree.h"
6 #include "TFile.h"
7 #include "TRefArray.h"
8 #include "TGiant3.h"
9 
10 
11 // // class AgUTrackStep : public TObject
12 // {
13 // public:
14 // Int_t idTruth; // Track id
15 // Double_t x0,x1;
16 // Double_t y0,y1;
17 // Double_t z0,z1;
18 // Double_t dEstep, adEstep;
19 // ClassDef(AgUTrackStep,1);
20 // };
21 
22 class Track;
23 class Step;
24 class Event;
25 
26 class Event : public TObject
27 {
28 public:
29  Event();
30  ~Event(){ Clear(); }
31 
32  Int_t idEvent;
33  Int_t nTracks;
34  Int_t nSteps;
35  //TObjArray tracks;
36  TClonesArray *tracks;
37  TClonesArray *steps;
38 
39  Track *AddTrack();
40  Step *AddStep();
41 
42  void Clear( const Option_t *opts="" );
43 
44  ClassDef(Event,1);
45 };
46 
47 class Track : public TObject
48 {
49 public:
50  Track();
51  ~Track(){ Clear(); }
52 
53  Int_t idTruth; // ID truth for the track
54  Float_t eta; // initial eta
55  Float_t phi; // initial phi
56  Float_t x, y, z; // track 1st position
57  Float_t px, py, pz; // track momentum
58  Float_t mass, charge;
59  Int_t nSteps; // number of tracking steps
60  //TObjArray steps; // track history
61  TRefArray steps;//[nSteps]
62 
63  Step *AddStep();
64  void Clear(const Option_t *opts="" );
65 
66  ClassDef(Track,1);
67 };
68 
69 class Step;
70 
71 class Step : public TObject
72 {
73 public:
74  Step();
75 
76  void Clear( const Option_t *opts="" );
77 
78  Int_t idStep; // Number of tracking steps in this track
79  Int_t idTruth; // idTruth of the parent track
80  Float_t x,y,z,r; // Position of step;
81  Int_t state; // Tracking state (inwvol)
82  Float_t dEstep; // energy lost in this step [GeV]
83  Float_t adEstep; // accumulated energy lost by this point [GeV]
84  Int_t nStep; // accumulated number of steps to this point
85  Float_t step; // step size [cm]
86  Float_t dens; // density of material in this tracking step
87  Float_t A, Z; // A and Z of material in this tracking step
88  UShort_t vnums[15]; // Volume numbers
89  UShort_t cnums[15]; // Copy numbers
90  Int_t isvol; // Sensitive volume flag
91 
92  TString path();
93  TString volume();
94 
95  ClassDef(Step,1);
96 };
97 
98 
99 class AgUStep : public TNamed
100 {
101 public:
102  AgUStep();
103  ~AgUStep(){ };
104 
105  static AgUStep *Instance();
106  void operator()();
107 
108  void Finish();
109 
111  void Init( const Char_t *filename="" );
112 
113  static Float_t rmin;// = 0.0;
114  static Float_t rmax;//= 200.0;
115  static Float_t zmin;//=-200;
116  static Float_t zmax;//= 200.0;
117  static Int_t verbose;// = 0;
118  static Int_t mnTruth;//=0;
119  static Int_t mxTruth;//=-1;
120 
121 private:
122 protected:
123 
124  static AgUStep *sInstance;
125  TTree *mTree;
126  TFile *mFile;
127 
128 public:
129  Event *mEvent; // Current event
130  Track *mTrack; // Current track
131 
132  static TGiant3 *geant3;
133  static Quest_t *cquest;
134  static Gclink_t *clink;
135  static Gcflag_t *cflag;
136  static Gcvolu_t *cvolu;
137  static Gcnum_t *cnum;
138  static Gcsets_t *csets;
139  static Gckine_t *ckine;
140  static Gcking_t *cking;
141  static Gctrak_t *ctrak;
142  static Gcmate_t *cmate;
143  static Gccuts_t *ccuts;
144  static Gcphys_t *cphys;
145  static Gctmed_t *ctmed;
146  static Int_t nlev;
147 
148 private:
149 protected:
150  Int_t idEvent; // current event number
151  Int_t idTruth; // current track number
152  Float_t aDeStep; // accumulated energy loss
153  Int_t nStep; // accumulated number of steps
154  Float_t aStep; // accumulated path length
155 
156  Float_t vect0[7]; // previous step
157 
158  Int_t oldEvent;
159 
160  ClassDef(AgUStep,1);
161 
162 };
163 
164 #endif
void Init(const Char_t *filename="")
Initialize stepping routine. Opens TFile and creates TTree.
Definition: AgUStep.cxx:383
Definition: AgUStep.h:26
C++ STL includes.
Definition: AgUStep.h:47
Definition: AgUStep.h:71