]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/AliESDComparisonMI.h
some coding convention fixies (Marian)
[u/mrichter/AliRoot.git] / PWG1 / AliESDComparisonMI.h
CommitLineData
60f3fd0b 1#ifndef ALIESDCOMPARISONMI_H
2#define ALIESDCOMPARISONMI_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
c92725b7 5
60f3fd0b 6
7
8//////////////////////////////////////////////////////////////////////////////
9// Class AliESDComparisonMI //
10// collect together MC info and Rec info for comparison purposes
11// - effieciency studies and so on// //
12// marian.ivanov@cern.ch //
13//////////////////////////////////////////////////////////////////////////////
14
15
16#include "TObject.h"
17#include "AliESDtrack.h"
18#include "AliESD.h"
19#include "AliV0.h"
20#include "AliESDfriendTrack.h"
21#include "AliITStrackMI.h"
22#include "AliTRDtrack.h"
c92725b7 23
24
25/////////////////////////////////////////////////////////////////////////
26class AliESDRecInfo: public TObject {
60f3fd0b 27
c92725b7 28public:
29 AliESDRecInfo(){}
30 ~AliESDRecInfo(){}
31 void UpdatePoints(AliESDtrack* track);
32 void Update(AliMCInfo* info,AliTPCParam * par, Bool_t reconstructed, AliESD *event);
33 void Reset();
34 Float_t fTPCPoints[10]; //start , biggest end points,max density .. density at the last 30 pad-rows
35 Double_t fTPCinR0[5]; //generated position of the track at inner tpc - radius [3] and fi [4]
36 Double_t fTPCinR1[5]; //reconstructed postion of the track - radius [3] and fi [
37 Double_t fTPCinP0[5]; //generated position of the track at inner tpc
38 Double_t fTPCinP1[5]; //reconstructed postion of the track
39 Double_t fTPCAngle0[2]; // generated angle
40 Double_t fTPCAngle1[2]; //refconstructed angle
41 Double_t fTPCDelta[5]; // deltas
42 Double_t fTPCPools[5]; // pools
43 Double_t fITSinR0[5]; //generated position of the track at inner tpc
44 Double_t fITSinR1[5]; //reconstructed postion of the track
45 Double_t fITSinP0[5]; //generated position of the track at inner tpc
46 Double_t fITSinP1[5]; //reconstructed postion of the track
47 Double_t fITSAngle0[2]; // generated angle
48 Double_t fITSAngle1[2]; //refconstructed angle
49 Double_t fITSDelta[5]; // deltas
50 Double_t fITSPools[5]; // pools
51 AliESDtrack fESDTrack; // tpc track
52 AliESDfriendTrack fTrackF; // friend track
53 AliITStrackMI fITStrack; //its track
54 AliTRDtrack fTRDtrack; //its track
55 Float_t fBestTOFmatch; //best matching between times
56 Float_t fTRLocalCoord[3]; //local coordinates of the track ref.
57 Int_t fReconstructed; //flag if track was reconstructed
58 Int_t fFake; // fake track
59 Int_t fMultiple; // number of reconstructions
60 Bool_t fTPCOn; // TPC refitted inward
61 Int_t fStatus[4]; // status -0 not found - 1 -only in - 2 -in-out -3 -in -out-refit
62 Bool_t fITSOn; // ITS refitted inward
63 Bool_t fTRDOn; // ITS refitted inward
64 Float_t fDeltaP; //delta of momenta
65 Double_t fSign; // sign
66 Int_t fLabels[2]; // labels
67 ClassDef(AliESDRecInfo,2) // container for
68};
c92725b7 69
c92725b7 70
71
72/////////////////////////////////////////////////////////
73/////////////////////////////////////////////////////////
74/////////////////////////////////////////////////////////
75
76
77class AliESDRecV0Info: public TObject {
78public:
79 void Update(Float_t vertex[3]);
80 AliESDRecInfo fT1; //track1
81 AliESDRecInfo fT2; //track2
82 Double_t fDist1; //info about closest distance according closest MC - linear DCA
83 Double_t fDist2; //info about closest distance parabolic DCA
84 Double_t fInvMass; //reconstructed invariant mass -
85 //
86 Double_t fPdr[3]; //momentum at vertex daughter - according approx at DCA
87 Double_t fXr[3]; //rec. position according helix
88 //
89 Double_t fRs[2]; // minimum radius in rphi intersection
90 Double_t fDistMinR; // distance at minimal radius
91 Double_t fPm[3]; //momentum at the vertex mother
92 Double_t fAngle[3]; //three angles
93 Double_t fRr; // rec position of the vertex
94 Int_t fLab[2]; //MC label of the partecle
95 Float_t fPointAngleFi; //point angle fi
96 Float_t fPointAngleTh; //point angle theta
97 Float_t fPointAngle; //point angle full
98 Int_t fV0Status; // status of the kink
99 AliV0 fV0tpc; // Vo information from reconsturction according TPC
100 AliV0 fV0its; // Vo information from reconsturction according ITS
101 AliV0 fV0rec; // V0 information form the reconstruction
102 Int_t fMultiple;
103 Int_t fV0Multiple;
104 Int_t fRecStatus; // status form the reconstuction
105 ClassDef(AliESDRecV0Info,2) // container for
106};
107
c92725b7 108
109
110class AliESDRecKinkInfo: public TObject {
111public:
112 void Update();
113 AliESDRecInfo fT1; //track1
114 AliESDRecInfo fT2; //track2
115 AliESDkink fKink; //kink
116 Double_t fDist1; //info about closest distance according closest MC - linear DCA
117 Double_t fDist2; //info about closest distance parabolic DCA
118 Double_t fInvMass; //reconstructed invariant mass -
119 //
120 Double_t fPdr[3]; //momentum at vertex daughter - according approx at DCA
121 Double_t fXr[3]; //rec. position according helix
122 //
123 Double_t fPm[3]; //momentum at the vertex mother
124 Double_t fAngle[3]; //three angles
125 Double_t fRr; // rec position of the vertex
126 Double_t fMinR; // minimum radius in rphi intersection
127 Double_t fDistMinR; // distance at minimal radius
128 Int_t fLab[2]; //MC label of the partecle
129 Float_t fPointAngleFi; //point angle fi
130 Float_t fPointAngleTh; //point angle theta
131 Float_t fPointAngle; //point angle full
132 Int_t fStatus; //status -tracks
133 Int_t fRecStatus; //kink -status- 0 - not found 1-good - fake
134 Int_t fMultiple;
135 Int_t fKinkMultiple;
136 ClassDef(AliESDRecKinkInfo,1) // container for
137};
138
c92725b7 139
140
141
142////////////////////////////////////////////////////////////////////////
143//
60f3fd0b 144// Start of implementation of the class AliESDComparisonMI
c92725b7 145//
146////////////////////////////////////////////////////////////////////////
147
60f3fd0b 148class AliESDComparisonMI {
c92725b7 149
150public:
60f3fd0b 151 AliESDComparisonMI();
152 AliESDComparisonMI(const char* fnGenTracks,
c92725b7 153 const char* fnCmpRes ="cmpTracks.root",
154 const char* fnGalice ="galice.root", Int_t direction=0,
155 Int_t nEvents=1, Int_t firstEvent=0);
60f3fd0b 156 virtual ~AliESDComparisonMI();
c92725b7 157 void Reset();
158 Int_t Exec();
159 Int_t Exec(Int_t nEvents, Int_t firstEventNr);
160 Int_t SetIO();
161 Int_t SetIO(Int_t eventNr );
162 void CreateTreeCmp();
163 void CloseOutputFile();
164 Bool_t ConnectGenTree();
165 Int_t TreeGenLoop(Int_t eventNr);
166 Int_t TreeTLoop();
167 Int_t BuildKinkInfo0(Int_t eventNr); // build kink info 0
168 Int_t BuildV0Info(Int_t eventNr); // build kink info 0
169 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
170 void SetNEvents(Int_t i) {fNEvents = i;}
171 void SetDebug(Int_t level) {fDebug = level;}
172
173// tmp method, should go to TrackReferenceESD
174 static TVector3 TR2Local(AliTrackReference *trackRef,
175 AliTPCParam *paramTPC);
176
177private:
178
179 Int_t fEventNr; //! current event number
180 Int_t fNEvents; //! number of events to process
181 Int_t fFirstEventNr; //! first event to process
182 //
183 char fFnCmp[1000]; //! output file name with cmp tracks
184 TFile *fFileCmp; //! output file with cmp tracks
185 TTree *fTreeCmp; //! output tree with cmp tracks
186 TTree *fTreeCmpKinks; //! output tree with cmp Kinks
187 TTree *fTreeCmpV0; //! output tree with cmp V0
188 //
189 char fFnGenTracks[1000]; //! input file name with gen tracks
190 TFile *fFileGenTracks;
191 TTree *fTreeGenTracks;
192 TTree *fTreeGenKinks; // tree with gen kinks
193 TTree *fTreeGenV0; // tree with gen V0
194 //
195 //
196 Int_t fDirection;
197 //
198 AliRunLoader * fLoader; //! pointer to the run loader
199 //TTree *fTreeRecTracks; //! tree with reconstructed tracks
200 //
201 Short_t *fIndexRecTracks; //! index of particle label in the TreeT_ESD
202 Short_t *fFakeRecTracks; //! number of fake tracks
203 Short_t *fMultiRecTracks; //! number of multiple reconstructions
204 //
205 Short_t *fIndexRecKinks; //! index of particle label in treeesd
206 Short_t *fMultiRecKinks; //! number of multiple reconstructions
207 Short_t *fSignedKinks; //! indicator that kink was not fake
208 //
209 Short_t *fIndexRecV0; //! index of particle label in treeesd
210 Short_t *fMultiRecV0; //! number of multiple reconstructions
211 Short_t *fSignedV0; //! indicator that kink was not fake
212 //
213 TObjArray *fRecArray; // container with rec infos
214 AliESD *fEvent; //!event
215 AliESDfriend *fESDfriend; //!event friend
216 //
217 AliTPCParam* fParamTPC; //! AliTPCParam
218 Int_t fNParticles; //! number of particles in the input tree genTracks
219 Int_t fDebug; //! debug flag
220 Int_t fNextTreeGenEntryToRead; //! last entry already read from genTracks tree
221 Int_t fNextKinkToRead; //! last entry already read from genKinks tree
222 Int_t fNextV0ToRead; //! last entry already read from genV0 tree
223 //
224 AliMCInfo* fMCInfo; //! MC information writen per particle
225 AliGenKinkInfo* fGenKinkInfo; //! MC information writen per Kink
226 AliGenV0Info* fGenV0Info; //! MC information writen per Kink
227 AliESDRecInfo* fRecInfo; //! Rec. information writen per particle
228 AliESDfriendTrack* fFriend; //! friend track
229 AliESDRecKinkInfo* fRecKinkInfo; //! reconstructed kink info
230 AliESDRecV0Info* fRecV0Info; //! reconstructed kink info
231 //
232
60f3fd0b 233 ClassDef(AliESDComparisonMI,1) // class which creates and fills tree with ESDGenTrack objects
c92725b7 234};
c92725b7 235
236
60f3fd0b 237#endif