4 ////////////////////////////////////////////////////////////////////////
6 // Start of implementation of the class digitRow
8 ////////////////////////////////////////////////////////////////////////
9 const Int_t kgRowBytes = 32;
11 class digitRow: public TObject {
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);
25 UChar_t fDig[kgRowBytes];
26 ClassDef(digitRow,1) // container for digit pattern
31 ////////////////////////////////////////////////////////////////////////
33 // Start of implementation of the class AliMCInfo
35 ////////////////////////////////////////////////////////////////////////
37 class AliMCInfo: public TObject {
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
48 Int_t fPrimPart; // index of primary particle in TreeH
49 TParticle fParticle; // generated particle
50 Float_t fMass; // mass of the particle
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
65 Int_t fNITSRef; // ITS references counter
66 Int_t fNTRDRef; // TRD references counter
67 Int_t fNTOFRef; // TOF references counter
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
71 TClonesArray * fTOFReferences; //container with TRD references
73 ClassDef(AliMCInfo,3) // container for
79 class AliGenV0Info: public TObject {
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
84 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
85 Double_t fMCDist2; //info about closest distance parabolic DCA
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
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
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
104 ClassDef(AliGenV0Info,1) // container for
106 ClassImp(AliGenV0Info)
111 class AliGenKinkInfo: public TObject {
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
117 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
118 Double_t fMCDist2; //info about closest distance parabolic DCA
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
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
133 ClassImp(AliGenKinkInfo)
138 ////////////////////////////////////////////////////////////////////////
140 // Start of implementation of the class AliGenInfoMaker
142 ////////////////////////////////////////////////////////////////////////
144 class AliGenInfoMaker {
148 AliGenInfoMaker(const char * fnGalice, const char* fnRes ="genTracks.root",
149 Int_t nEvents=1, Int_t firstEvent=0);
150 virtual ~AliGenInfoMaker();
153 Int_t Exec(Int_t nEvents, Int_t firstEventNr);
154 void CreateTreeGenTracks();
155 void CloseOutputFile();
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
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();
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);
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
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
187 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
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
194 AliMCInfo ** fGenInfo; //! array with pointers to gen info
195 Int_t fNInfos; //! number of tracks with infos
197 AliTPCParam* fParamTPC; //! AliTPCParam
198 Float_t fVPrim[3]; //! primary vertex position
199 // the fVDist[3] contains size of the 3-vector
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;
210 static const Double_t fgTPCPtCut = 0.03; // do not store particles with generated pT less than this
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
213 static const Double_t fgTOFPtCut = 0.15; // do not store particles with generated pT less than this
215 ClassDef(AliGenInfoMaker,1) // class which creates and fills tree with TPCGenTrack objects
217 ClassImp(AliGenInfoMaker)
221 class AliComparisonDraw: public TObject{
223 AliComparisonDraw(){fPoints=0; fView=0;}
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,
227 Float_t miny, Float_t maxy, Int_t nBinsRes=30);
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);
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);
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);
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);
248 TH1F * fRes; //temporary file
249 TH1F * fMean; //temporary file
250 TView * fView; //3D view
251 TCanvas *fCanvas; //canvas
253 ClassDef(AliComparisonDraw,1)
255 ClassImp(AliComparisonDraw)
258 class AliPointsMI: public TObject{
261 AliPointsMI(Int_t n, Float_t *x,Float_t *y, Float_t *z);
263 void Reset(AliDetector * det, Int_t particle); //load points for given particle
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)
274 ClassImp(AliPointsMI)
277 AliTPCParam * GetTPCParam();
278 Float_t TPCBetheBloch(Float_t bg);