2 class AliESDComparisonDraw: public AliComparisonDraw{
4 AliESDComparisonDraw(){fTree = 0;}
5 void SetIO(const char *fname = "cmpESDTracks.root");
6 ClassDef(AliESDComparisonDraw,1)
8 ClassImp(AliESDComparisonDraw)
11 /////////////////////////////////////////////////////////////////////////
12 class AliESDRecInfo: public TObject {
17 void UpdatePoints(AliESDtrack* track);
18 void Update(AliMCInfo* info,AliTPCParam * par, Bool_t reconstructed, AliESD *event);
20 Float_t fTPCPoints[10]; //start , biggest end points,max density .. density at the last 30 pad-rows
21 Double_t fTPCinR0[5]; //generated position of the track at inner tpc - radius [3] and fi [4]
22 Double_t fTPCinR1[5]; //reconstructed postion of the track - radius [3] and fi [
23 Double_t fTPCinP0[5]; //generated position of the track at inner tpc
24 Double_t fTPCinP1[5]; //reconstructed postion of the track
25 Double_t fTPCAngle0[2]; // generated angle
26 Double_t fTPCAngle1[2]; //refconstructed angle
27 Double_t fTPCDelta[5]; // deltas
28 Double_t fTPCPools[5]; // pools
29 Double_t fITSinR0[5]; //generated position of the track at inner tpc
30 Double_t fITSinR1[5]; //reconstructed postion of the track
31 Double_t fITSinP0[5]; //generated position of the track at inner tpc
32 Double_t fITSinP1[5]; //reconstructed postion of the track
33 Double_t fITSAngle0[2]; // generated angle
34 Double_t fITSAngle1[2]; //refconstructed angle
35 Double_t fITSDelta[5]; // deltas
36 Double_t fITSPools[5]; // pools
37 AliESDtrack fESDTrack; // tpc track
38 AliESDfriendTrack fTrackF; // friend track
39 AliITStrackMI fITStrack; //its track
40 AliTRDtrack fTRDtrack; //its track
41 Float_t fBestTOFmatch; //best matching between times
42 Float_t fTRLocalCoord[3]; //local coordinates of the track ref.
43 Int_t fReconstructed; //flag if track was reconstructed
44 Int_t fFake; // fake track
45 Int_t fMultiple; // number of reconstructions
46 Bool_t fTPCOn; // TPC refitted inward
47 Int_t fStatus[4]; // status -0 not found - 1 -only in - 2 -in-out -3 -in -out-refit
48 Bool_t fITSOn; // ITS refitted inward
49 Bool_t fTRDOn; // ITS refitted inward
50 Float_t fDeltaP; //delta of momenta
51 Double_t fSign; // sign
52 Int_t fLabels[2]; // labels
53 ClassDef(AliESDRecInfo,2) // container for
55 ClassImp(AliESDRecInfo)
57 void AliESDRecInfo::Reset()
65 /////////////////////////////////////////////////////////
66 /////////////////////////////////////////////////////////
67 /////////////////////////////////////////////////////////
70 class AliESDRecV0Info: public TObject {
72 void Update(Float_t vertex[3]);
73 AliESDRecInfo fT1; //track1
74 AliESDRecInfo fT2; //track2
75 Double_t fDist1; //info about closest distance according closest MC - linear DCA
76 Double_t fDist2; //info about closest distance parabolic DCA
77 Double_t fInvMass; //reconstructed invariant mass -
79 Double_t fPdr[3]; //momentum at vertex daughter - according approx at DCA
80 Double_t fXr[3]; //rec. position according helix
82 Double_t fRs[2]; // minimum radius in rphi intersection
83 Double_t fDistMinR; // distance at minimal radius
84 Double_t fPm[3]; //momentum at the vertex mother
85 Double_t fAngle[3]; //three angles
86 Double_t fRr; // rec position of the vertex
87 Int_t fLab[2]; //MC label of the partecle
88 Float_t fPointAngleFi; //point angle fi
89 Float_t fPointAngleTh; //point angle theta
90 Float_t fPointAngle; //point angle full
91 Int_t fV0Status; // status of the kink
92 AliV0 fV0tpc; // Vo information from reconsturction according TPC
93 AliV0 fV0its; // Vo information from reconsturction according ITS
94 AliV0 fV0rec; // V0 information form the reconstruction
97 Int_t fRecStatus; // status form the reconstuction
98 ClassDef(AliESDRecV0Info,2) // container for
101 ClassImp(AliESDRecV0Info)
104 class AliESDRecKinkInfo: public TObject {
107 AliESDRecInfo fT1; //track1
108 AliESDRecInfo fT2; //track2
109 AliESDkink fKink; //kink
110 Double_t fDist1; //info about closest distance according closest MC - linear DCA
111 Double_t fDist2; //info about closest distance parabolic DCA
112 Double_t fInvMass; //reconstructed invariant mass -
114 Double_t fPdr[3]; //momentum at vertex daughter - according approx at DCA
115 Double_t fXr[3]; //rec. position according helix
117 Double_t fPm[3]; //momentum at the vertex mother
118 Double_t fAngle[3]; //three angles
119 Double_t fRr; // rec position of the vertex
120 Double_t fMinR; // minimum radius in rphi intersection
121 Double_t fDistMinR; // distance at minimal radius
122 Int_t fLab[2]; //MC label of the partecle
123 Float_t fPointAngleFi; //point angle fi
124 Float_t fPointAngleTh; //point angle theta
125 Float_t fPointAngle; //point angle full
126 Int_t fStatus; //status -tracks
127 Int_t fRecStatus; //kink -status- 0 - not found 1-good - fake
130 ClassDef(AliESDRecKinkInfo,1) // container for
133 ClassImp(AliESDRecKinkInfo)
137 ////////////////////////////////////////////////////////////////////////
139 // Start of implementation of the class ESDCmpTr
141 ////////////////////////////////////////////////////////////////////////
147 ESDCmpTr(const char* fnGenTracks,
148 const char* fnCmpRes ="cmpTracks.root",
149 const char* fnGalice ="galice.root", Int_t direction=0,
150 Int_t nEvents=1, Int_t firstEvent=0);
154 Int_t Exec(Int_t nEvents, Int_t firstEventNr);
156 Int_t SetIO(Int_t eventNr );
157 void CreateTreeCmp();
158 void CloseOutputFile();
159 Bool_t ConnectGenTree();
160 Int_t TreeGenLoop(Int_t eventNr);
162 Int_t BuildKinkInfo0(Int_t eventNr); // build kink info 0
163 Int_t BuildV0Info(Int_t eventNr); // build kink info 0
164 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
165 void SetNEvents(Int_t i) {fNEvents = i;}
166 void SetDebug(Int_t level) {fDebug = level;}
168 // tmp method, should go to TrackReferenceESD
169 static TVector3 TR2Local(AliTrackReference *trackRef,
170 AliTPCParam *paramTPC);
174 Int_t fEventNr; //! current event number
175 Int_t fNEvents; //! number of events to process
176 Int_t fFirstEventNr; //! first event to process
178 char fFnCmp[1000]; //! output file name with cmp tracks
179 TFile *fFileCmp; //! output file with cmp tracks
180 TTree *fTreeCmp; //! output tree with cmp tracks
181 TTree *fTreeCmpKinks; //! output tree with cmp Kinks
182 TTree *fTreeCmpV0; //! output tree with cmp V0
184 char fFnGenTracks[1000]; //! input file name with gen tracks
185 TFile *fFileGenTracks;
186 TTree *fTreeGenTracks;
187 TTree *fTreeGenKinks; // tree with gen kinks
188 TTree *fTreeGenV0; // tree with gen V0
193 AliRunLoader * fLoader; //! pointer to the run loader
194 //TTree *fTreeRecTracks; //! tree with reconstructed tracks
196 Short_t *fIndexRecTracks; //! index of particle label in the TreeT_ESD
197 Short_t *fFakeRecTracks; //! number of fake tracks
198 Short_t *fMultiRecTracks; //! number of multiple reconstructions
200 Short_t *fIndexRecKinks; //! index of particle label in treeesd
201 Short_t *fMultiRecKinks; //! number of multiple reconstructions
202 Short_t *fSignedKinks; //! indicator that kink was not fake
204 Short_t *fIndexRecV0; //! index of particle label in treeesd
205 Short_t *fMultiRecV0; //! number of multiple reconstructions
206 Short_t *fSignedV0; //! indicator that kink was not fake
208 TObjArray *fRecArray; // container with rec infos
209 AliESD *fEvent; //!event
210 AliESDfriend *fESDfriend; //!event friend
212 AliTPCParam* fParamTPC; //! AliTPCParam
213 Int_t fNParticles; //! number of particles in the input tree genTracks
214 Int_t fDebug; //! debug flag
215 Int_t fNextTreeGenEntryToRead; //! last entry already read from genTracks tree
216 Int_t fNextKinkToRead; //! last entry already read from genKinks tree
217 Int_t fNextV0ToRead; //! last entry already read from genV0 tree
219 AliMCInfo* fMCInfo; //! MC information writen per particle
220 AliGenKinkInfo* fGenKinkInfo; //! MC information writen per Kink
221 AliGenV0Info* fGenV0Info; //! MC information writen per Kink
222 AliESDRecInfo* fRecInfo; //! Rec. information writen per particle
223 AliESDfriendTrack* fFriend; //! friend track
224 AliESDRecKinkInfo* fRecKinkInfo; //! reconstructed kink info
225 AliESDRecV0Info* fRecV0Info; //! reconstructed kink info
228 ClassDef(ESDCmpTr,1) // class which creates and fills tree with ESDGenTrack objects