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 TParticle fParticle; // generated particle
49 Float_t fMass; // mass of the particle
51 Int_t fLabel; // track label
52 Int_t fEventNr; // event number
53 Int_t fMCtracks; // indication of how many times the track is retuturned back
54 Int_t fPdg; //pdg code
55 Float_t fDecayCoord[3]; // position of particle decay
56 Double_t fVDist[4]; //distance of the particle vertex from primary vertex
57 Bool_t fTPCdecay; //indicates decay in TPC
58 Int_t fRowsWithDigitsInn; // number of rows with digits in the inner sectors
59 Int_t fRowsWithDigits; // number of rows with digits in the outer sectors
60 Int_t fRowsTrackLength; // last - first row with digit
61 Float_t fPrim; // theoretical dedx in tpc according particle momenta and mass
62 digitRow fTPCRow; // information about digits row pattern
63 Int_t fNTPCRef; // tpc references counter
64 Int_t fNITSRef; // tpc references counter
65 TClonesArray * fTPCReferences; //containner with all track references -in the TPC
66 TClonesArray * fITSReferences; //container with ITS references
67 TClonesArray * fTRDReferences; //container with TRD references
69 ClassDef(AliMCInfo,3) // container for
75 class AliGenV0Info: public TObject {
77 AliMCInfo fMCd; //info about daughter particle
78 AliMCInfo fMCm; //info about mother particle
79 void Update(); // put some derived info to special field
80 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
81 Double_t fMCDist2; //info about closest distance parabolic DCA
83 Double_t fMCPdr[3]; //momentum at vertex daughter - according approx at DCA
84 Double_t fMCPd[4]; //exact momentum from MC info
85 Double_t fMCX[3]; //exact position of the vertex
86 Double_t fMCXr[3]; //rec. position according helix
88 Double_t fMCPm[3]; //momentum at the vertex mother
89 Double_t fMCAngle[3]; //three angels
90 Double_t fMCRr; // rec position of the vertex
91 Double_t fMCR; //exact r position of the vertex
92 Int_t fPdg[2]; //pdg code of mother and daugter particles
93 Int_t fLab[2]; //MC label of the partecle
94 ClassDef(AliGenV0Info,1) // container for
96 ClassImp(AliGenV0Info)
101 ////////////////////////////////////////////////////////////////////////
103 // Start of implementation of the class AliGenInfoMaker
105 ////////////////////////////////////////////////////////////////////////
107 class AliGenInfoMaker {
111 AliGenInfoMaker(const char * fnGalice, const char* fnRes ="genTracks.root",
112 Int_t nEvents=1, Int_t firstEvent=0);
113 virtual ~AliGenInfoMaker();
116 Int_t Exec(Int_t nEvents, Int_t firstEventNr);
117 void CreateTreeGenTracks();
118 void CloseOutputFile();
122 //void FillInfo(Int_t iParticle);
123 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
124 void SetNEvents(Int_t i) {fNEvents = i;}
125 void SetDebug(Int_t level) {fDebug = level;}
126 Int_t SetIO(Int_t eventNr);
127 Int_t CloseIOEvent();
130 Float_t TR2LocalX(AliTrackReference *trackRef,
131 AliTPCParam *paramTPC);
132 AliMCInfo * GetInfo(UInt_t i){return (i<fNParticles)? fGenInfo[i]:0;}
133 AliMCInfo * MakeInfo(UInt_t i);
136 Int_t fDebug; //! debug flag
137 Int_t fEventNr; //! current event number
138 Int_t fLabel; //! track label
139 Int_t fNEvents; //! number of events to process
140 Int_t fFirstEventNr; //! first event to process
141 UInt_t fNParticles; //! number of particles in TreeK
142 TTree *fTreeGenTracks; //! output tree with generated tracks
143 char fFnRes[1000]; //! output file name with stored tracks
144 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
146 AliRunLoader * fLoader; //! pointer to the run loader
147 TTree * fTreeD; //! current tree with digits
148 TTree * fTreeTR; //! current tree with TR
149 AliStack *fStack; //! current stack
151 AliMCInfo ** fGenInfo; //! array with pointers to gen info
152 Int_t fNInfos; //! number of tracks with infos
154 AliTPCParam* fParamTPC; //! AliTPCParam
155 Double_t fVPrim[3]; //! primary vertex position
156 // the fVDist[3] contains size of the 3-vector
160 // some constants for the original non-pareller tracking (by Y.Belikov)
161 static const Int_t seedRow11 = 158; // nRowUp - 1
162 static const Int_t seedRow12 = 139; // nRowUp - 1 - (Int_t) 0.125*nRowUp
163 static const Int_t seedRow21 = 149; // seedRow11 - shift
164 static const Int_t seedRow22 = 130; // seedRow12 - shift
165 static const Double_t kRaddeg = 180./3.14159265358979312;
167 static const Double_t fgTPCPtCut = 0.1; // do not store particles with generated pT less than this
168 static const Double_t fgITSPtCut = 0.2; // do not store particles with generated pT less than this
169 static const Double_t fgTRDPtCut = 0.2; // do not store particles with generated pT less than this
171 ClassDef(AliGenInfoMaker,1) // class which creates and fills tree with TPCGenTrack objects
173 ClassImp(AliGenInfoMaker)
177 class AliComparisonDraw: public TObject{
179 TH1F * DrawXY(const char * chx, const char *chy, const char* selection,
180 const char * quality,Int_t nbins, Float_t minx, Float_t maxx,
181 Float_t miny, Float_t maxy);
182 TH1F * DrawLogXY(const char * chx, const char *chy, const char* selection,
183 const char * quality, Int_t nbins,Float_t minx, Float_t maxx,
184 Float_t miny, Float_t maxy);
185 TH1F * Eff(const char *variable, const char* selection, const char * quality,
186 Int_t nbins,Float_t min, Float_t max);
187 TH1F * EffLog(const char *variable, const char* selection, const char * quality,
188 Int_t nbins,Float_t min, Float_t max);
190 static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle);
191 static Double_t* CreateLogBins(Int_t nBins, Double_t xMin, Double_t xMax);
193 static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec);
194 static TH1F* CreateResHisto(TH2F* hRes2, TH1F **phMean,
195 Bool_t drawBinFits = kTRUE,Bool_t overflowBinFits = kFALSE);
198 TH1F * fRes; //temporary file
199 TH1F * fMean; //temporary file
200 ClassDef(AliComparisonDraw,1)
202 ClassImp(AliComparisonDraw)
206 AliTPCParam * GetTPCParam();
207 Float_t TPCBetheBloch(Float_t bg);