]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliGenInfo.h
Final version used to produce the ALICE NOTE on gamma-tagging jets studies
[u/mrichter/AliRoot.git] / STEER / AliGenInfo.h
CommitLineData
ae7d73d2 1
2
3
4////////////////////////////////////////////////////////////////////////
5//
6// Start of implementation of the class digitRow
7//
8////////////////////////////////////////////////////////////////////////
9const Int_t kgRowBytes = 32;
10
11class digitRow: public TObject {
12
13public:
14 digitRow();
15 virtual ~digitRow(){;}
16 void SetRow(Int_t row);
17 Bool_t TestRow(Int_t row);
18 digitRow & operator=(const digitRow &digOld);
19 Int_t RowsOn(Int_t upto=8*kgRowBytes);
20 Int_t Last();
21 Int_t First();
22 void Reset();
23
24//private:
25 UChar_t fDig[kgRowBytes];
26 ClassDef(digitRow,1) // container for digit pattern
27};
28ClassImp(digitRow)
29
30
31////////////////////////////////////////////////////////////////////////
32//
33// Start of implementation of the class AliMCInfo
34//
35////////////////////////////////////////////////////////////////////////
36
37class AliMCInfo: public TObject {
38
39public:
40 AliMCInfo();
41 ~AliMCInfo();
42 void Update();
43
44 AliTrackReference fTrackRef; // track reference saved in the output tree
45 AliTrackReference fTrackRefOut; // decay track reference saved in the output tree
46 AliTrackReference fTRdecay; // track reference at decay point
47 //
51ad6848 48 Int_t fPrimPart; // index of primary particle in TreeH
ae7d73d2 49 TParticle fParticle; // generated particle
50 Float_t fMass; // mass of the particle
51 Float_t fCharge; //
52 Int_t fLabel; // track label
53 Int_t fEventNr; // event number
54 Int_t fMCtracks; // indication of how many times the track is retuturned back
55 Int_t fPdg; //pdg code
56 Float_t fDecayCoord[3]; // position of particle decay
57 Double_t fVDist[4]; //distance of the particle vertex from primary vertex
58 Bool_t fTPCdecay; //indicates decay in TPC
59 Int_t fRowsWithDigitsInn; // number of rows with digits in the inner sectors
60 Int_t fRowsWithDigits; // number of rows with digits in the outer sectors
61 Int_t fRowsTrackLength; // last - first row with digit
62 Float_t fPrim; // theoretical dedx in tpc according particle momenta and mass
63 digitRow fTPCRow; // information about digits row pattern
64 Int_t fNTPCRef; // tpc references counter
51ad6848 65 Int_t fNITSRef; // ITS references counter
66 Int_t fNTRDRef; // TRD references counter
67 Int_t fNTOFRef; // TOF references counter
ae7d73d2 68 TClonesArray * fTPCReferences; //containner with all track references -in the TPC
69 TClonesArray * fITSReferences; //container with ITS references
70 TClonesArray * fTRDReferences; //container with TRD references
51ad6848 71 TClonesArray * fTOFReferences; //container with TRD references
ae7d73d2 72 //
73 ClassDef(AliMCInfo,3) // container for
74};
75ClassImp(AliMCInfo)
76
77
78
79class AliGenV0Info: public TObject {
80public:
51ad6848 81 AliMCInfo fMCd; //info about daughter particle - second particle for V0
82 AliMCInfo fMCm; //info about mother particle - first particle for V0
83 void Update(Float_t vertex[3]); // put some derived info to special field
ae7d73d2 84 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
85 Double_t fMCDist2; //info about closest distance parabolic DCA
86 //
87 Double_t fMCPdr[3]; //momentum at vertex daughter - according approx at DCA
88 Double_t fMCPd[4]; //exact momentum from MC info
89 Double_t fMCX[3]; //exact position of the vertex
90 Double_t fMCXr[3]; //rec. position according helix
91 //
92 Double_t fMCPm[3]; //momentum at the vertex mother
93 Double_t fMCAngle[3]; //three angels
94 Double_t fMCRr; // rec position of the vertex
95 Double_t fMCR; //exact r position of the vertex
96 Int_t fPdg[2]; //pdg code of mother and daugter particles
97 Int_t fLab[2]; //MC label of the partecle
51ad6848 98 //
99 Double_t fInvMass; //reconstructed invariant mass -
100 Float_t fPointAngleFi; //point angle fi
101 Float_t fPointAngleTh; //point angle theta
102 Float_t fPointAngle; //point angle full
103 //
ae7d73d2 104 ClassDef(AliGenV0Info,1) // container for
105};
106ClassImp(AliGenV0Info)
107
108
109
110
51ad6848 111class AliGenKinkInfo: public TObject {
112public:
113 AliMCInfo fMCd; //info about daughter particle - second particle for V0
114 AliMCInfo fMCm; //info about mother particle - first particle for V0
115 void Update(); // put some derived info to special field
116 Float_t GetQt(); //
117 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
118 Double_t fMCDist2; //info about closest distance parabolic DCA
119 //
120 Double_t fMCPdr[3]; //momentum at vertex daughter - according approx at DCA
121 Double_t fMCPd[4]; //exact momentum from MC info
122 Double_t fMCX[3]; //exact position of the vertex
123 Double_t fMCXr[3]; //rec. position according helix
124 //
125 Double_t fMCPm[3]; //momentum at the vertex mother
126 Double_t fMCAngle[3]; //three angels
127 Double_t fMCRr; // rec position of the vertex
128 Double_t fMCR; //exact r position of the vertex
129 Int_t fPdg[2]; //pdg code of mother and daugter particles
130 Int_t fLab[2]; //MC label of the partecle
131 ClassDef(AliGenKinkInfo,1) // container for
132};
133ClassImp(AliGenKinkInfo)
134
135
136
137
ae7d73d2 138////////////////////////////////////////////////////////////////////////
139//
140// Start of implementation of the class AliGenInfoMaker
141//
142////////////////////////////////////////////////////////////////////////
143
144class AliGenInfoMaker {
145
146public:
147 AliGenInfoMaker();
148 AliGenInfoMaker(const char * fnGalice, const char* fnRes ="genTracks.root",
149 Int_t nEvents=1, Int_t firstEvent=0);
150 virtual ~AliGenInfoMaker();
151 void Reset();
152 Int_t Exec();
153 Int_t Exec(Int_t nEvents, Int_t firstEventNr);
154 void CreateTreeGenTracks();
155 void CloseOutputFile();
156 Int_t TreeKLoop();
157 Int_t TreeTRLoop();
158 Int_t TreeDLoop();
51ad6848 159 Int_t BuildKinkInfo(); // build information about MC kinks
160 Int_t BuildV0Info(); // build information about MC kinks
161 Int_t BuildHitLines(); // build information about MC kinks
ae7d73d2 162 //void FillInfo(Int_t iParticle);
163 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
164 void SetNEvents(Int_t i) {fNEvents = i;}
165 void SetDebug(Int_t level) {fDebug = level;}
166 Int_t SetIO(Int_t eventNr);
167 Int_t CloseIOEvent();
168 Int_t CloseIO();
169 Int_t SetIO();
170 Float_t TR2LocalX(AliTrackReference *trackRef,
171 AliTPCParam *paramTPC);
172 AliMCInfo * GetInfo(UInt_t i){return (i<fNParticles)? fGenInfo[i]:0;}
173 AliMCInfo * MakeInfo(UInt_t i);
174
175public:
176 Int_t fDebug; //! debug flag
177 Int_t fEventNr; //! current event number
178 Int_t fLabel; //! track label
179 Int_t fNEvents; //! number of events to process
180 Int_t fFirstEventNr; //! first event to process
181 UInt_t fNParticles; //! number of particles in TreeK
51ad6848 182 TTree * fTreeGenTracks; //! output tree with generated tracks
183 TTree * fTreeKinks; //! output tree with Kinks
184 TTree * fTreeV0; //! output tree with V0
185 TTree * fTreeHitLines; //! tree with hit lines
186 char fFnRes[1000]; //! output file name with stored tracks
ae7d73d2 187 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
188 //
189 AliRunLoader * fLoader; //! pointer to the run loader
190 TTree * fTreeD; //! current tree with digits
191 TTree * fTreeTR; //! current tree with TR
192 AliStack *fStack; //! current stack
193 //
194 AliMCInfo ** fGenInfo; //! array with pointers to gen info
195 Int_t fNInfos; //! number of tracks with infos
196 //
197 AliTPCParam* fParamTPC; //! AliTPCParam
51ad6848 198 Float_t fVPrim[3]; //! primary vertex position
ae7d73d2 199 // the fVDist[3] contains size of the 3-vector
200
201private:
202
203// some constants for the original non-pareller tracking (by Y.Belikov)
204 static const Int_t seedRow11 = 158; // nRowUp - 1
205 static const Int_t seedRow12 = 139; // nRowUp - 1 - (Int_t) 0.125*nRowUp
206 static const Int_t seedRow21 = 149; // seedRow11 - shift
207 static const Int_t seedRow22 = 130; // seedRow12 - shift
208 static const Double_t kRaddeg = 180./3.14159265358979312;
209 //
51ad6848 210 static const Double_t fgTPCPtCut = 0.03; // do not store particles with generated pT less than this
ae7d73d2 211 static const Double_t fgITSPtCut = 0.2; // do not store particles with generated pT less than this
212 static const Double_t fgTRDPtCut = 0.2; // do not store particles with generated pT less than this
51ad6848 213 static const Double_t fgTOFPtCut = 0.15; // do not store particles with generated pT less than this
ae7d73d2 214
215 ClassDef(AliGenInfoMaker,1) // class which creates and fills tree with TPCGenTrack objects
216};
217ClassImp(AliGenInfoMaker)
218
219
220
221class AliComparisonDraw: public TObject{
222public:
51ad6848 223 AliComparisonDraw(){fPoints=0; fView=0;}
224 void InitView();
ae7d73d2 225 TH1F * DrawXY(const char * chx, const char *chy, const char* selection,
226 const char * quality,Int_t nbins, Float_t minx, Float_t maxx,
f007cb5f 227 Float_t miny, Float_t maxy, Int_t nBinsRes=30);
ae7d73d2 228 TH1F * DrawLogXY(const char * chx, const char *chy, const char* selection,
229 const char * quality, Int_t nbins,Float_t minx, Float_t maxx,
230 Float_t miny, Float_t maxy);
231 TH1F * Eff(const char *variable, const char* selection, const char * quality,
232 Int_t nbins,Float_t min, Float_t max);
233 TH1F * EffLog(const char *variable, const char* selection, const char * quality,
234 Int_t nbins,Float_t min, Float_t max);
235 //
236 static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle);
237 static Double_t* CreateLogBins(Int_t nBins, Double_t xMin, Double_t xMax);
238 //
239 static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec);
240 static TH1F* CreateResHisto(TH2F* hRes2, TH1F **phMean,
241 Bool_t drawBinFits = kTRUE,Bool_t overflowBinFits = kFALSE);
51ad6848 242 void DrawFriend2D(const char * chx, const char *chy, const char* selection, TTree * tfriend);
243 void GetPoints3D(const char * label, const char * chpoints, const char* selection, TTree * tpoints, Int_t color=6, Float_t rmin=4.);
244 void Draw3D(Int_t min=0, Int_t max = 10000);
245 void SavePoints(const char* name);
ae7d73d2 246 public:
247 TTree * fTree;
248 TH1F * fRes; //temporary file
249 TH1F * fMean; //temporary file
51ad6848 250 TView * fView; //3D view
251 TCanvas *fCanvas; //canvas
252 TObjArray *fPoints;
ae7d73d2 253 ClassDef(AliComparisonDraw,1)
254};
255ClassImp(AliComparisonDraw)
256
257
51ad6848 258class AliPointsMI: public TObject{
259 public:
260 AliPointsMI();
261 AliPointsMI(Int_t n, Float_t *x,Float_t *y, Float_t *z);
262 void Reset();
263 void Reset(AliDetector * det, Int_t particle); //load points for given particle
264 ~AliPointsMI();
265 Int_t fN; //number of points;
266 Float_t *fX; //[fN] pointer to x
267 Float_t *fY; //[fN] pointer to y
268 Float_t *fZ; //[fN] pointer to Z
269 Int_t fCapacity; //!allocated size of the x,y,x
270 Int_t fLabel0; //label
271 Int_t fLabel1; //label
272 ClassDef(AliPointsMI,1)
273};
274ClassImp(AliPointsMI)
275
ae7d73d2 276
277AliTPCParam * GetTPCParam();
278Float_t TPCBetheBloch(Float_t bg);