]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDComparisonMI.h
Record changes.
[u/mrichter/AliRoot.git] / STEER / AliESDComparisonMI.h
1
2 class AliESDComparisonDraw: public AliComparisonDraw{
3 public:
4   AliESDComparisonDraw(){fTree = 0;}
5   void SetIO(const char *fname = "cmpESDTracks.root");  
6   ClassDef(AliESDComparisonDraw,1)
7 };
8 ClassImp(AliESDComparisonDraw)
9
10
11 /////////////////////////////////////////////////////////////////////////
12 class AliESDRecInfo: public TObject {
13
14 public:
15   AliESDRecInfo(){}
16   ~AliESDRecInfo(){}
17   void UpdatePoints(AliESDtrack* track);
18   void Update(AliMCInfo* info,AliTPCParam * par, Bool_t reconstructed, AliESD *event);
19   void Reset();
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   AliITStrackMI fITStrack;        //its track
39   AliTRDtrack fTRDtrack;        //its track
40   Float_t fBestTOFmatch;        //best matching between times
41   Float_t fTRLocalCoord[3];       //local coordinates of the track ref.
42   Int_t   fReconstructed;         //flag if track was reconstructed
43   Int_t fFake;             // fake track
44   Int_t fMultiple;         // number of reconstructions
45   Bool_t fTPCOn;           // TPC refitted inward
46   Int_t  fStatus[4];        // status -0 not found - 1 -only in - 2 -in-out -3 -in -out-refit
47   Bool_t fITSOn;           // ITS refitted inward
48   Bool_t fTRDOn;           // ITS refitted inward
49   Float_t fDeltaP;          //delta of momenta
50   Double_t fSign;           // sign
51   Int_t fLabels[2];         // labels
52   ClassDef(AliESDRecInfo,2)  // container for 
53 };
54 ClassImp(AliESDRecInfo)
55
56 void AliESDRecInfo::Reset()
57 {
58   fMultiple =0; 
59   fFake     =0;
60   fReconstructed=0;
61 }
62
63
64 /////////////////////////////////////////////////////////
65 /////////////////////////////////////////////////////////
66 /////////////////////////////////////////////////////////
67
68
69 class AliESDRecV0Info: public TObject {
70 public:
71   void Update(Float_t vertex[3]);
72   AliESDRecInfo  fT1;      //track1
73   AliESDRecInfo  fT2;      //track2  
74   Double_t       fDist1;    //info about closest distance according closest MC - linear DCA
75   Double_t       fDist2;    //info about closest distance parabolic DCA
76   Double_t       fInvMass;  //reconstructed invariant mass -
77   //
78   Double_t       fPdr[3];    //momentum at vertex daughter  - according approx at DCA
79   Double_t       fXr[3];     //rec. position according helix
80   //
81   Double_t       fRs[2];     // minimum radius in rphi intersection
82   Double_t       fDistMinR; // distance at minimal radius
83   Double_t       fPm[3];    //momentum at the vertex mother
84   Double_t       fAngle[3]; //three angles
85   Double_t       fRr;       // rec position of the vertex 
86   Int_t          fLab[2];   //MC label of the partecle
87   Float_t        fPointAngleFi; //point angle fi
88   Float_t        fPointAngleTh; //point angle theta
89   Float_t        fPointAngle;   //point angle full
90   Int_t          fV0Status;       // status of the kink
91   AliESDV0MI     fV0tpc;           // Vo information from reconsturction according TPC
92   AliESDV0MI     fV0its;           // Vo information from reconsturction according ITS
93   AliESDV0MI     fV0rec;           // V0 information form the reconstruction
94   Int_t          fMultiple;
95   Int_t          fV0Multiple;
96   Int_t          fRecStatus;    // status form the reconstuction
97   ClassDef(AliESDRecV0Info,1)   // container for  
98 };
99
100 ClassImp(AliESDRecV0Info)
101
102
103 class AliESDRecKinkInfo: public TObject {
104 public:
105   void Update();
106   AliESDRecInfo  fT1;      //track1
107   AliESDRecInfo  fT2;      //track2  
108   AliESDkink     fKink;    //kink
109   Double_t       fDist1;    //info about closest distance according closest MC - linear DCA
110   Double_t       fDist2;    //info about closest distance parabolic DCA
111   Double_t       fInvMass;  //reconstructed invariant mass -
112   //
113   Double_t       fPdr[3];    //momentum at vertex daughter  - according approx at DCA
114   Double_t       fXr[3];     //rec. position according helix
115   //
116   Double_t       fPm[3];    //momentum at the vertex mother
117   Double_t       fAngle[3]; //three angles
118   Double_t       fRr;       // rec position of the vertex 
119   Double_t       fMinR;     // minimum radius in rphi intersection
120   Double_t       fDistMinR; // distance at minimal radius
121   Int_t          fLab[2];   //MC label of the partecle
122   Float_t        fPointAngleFi; //point angle fi
123   Float_t        fPointAngleTh; //point angle theta
124   Float_t        fPointAngle;   //point angle full
125   Int_t          fStatus;       //status -tracks 
126   Int_t          fRecStatus;    //kink -status- 0 - not found  1-good -  fake
127   Int_t          fMultiple;
128   Int_t          fKinkMultiple;
129   ClassDef(AliESDRecKinkInfo,1)   // container for  
130 };
131
132 ClassImp(AliESDRecKinkInfo)
133
134
135
136 ////////////////////////////////////////////////////////////////////////
137 // 
138 // Start of implementation of the class ESDCmpTr
139 //
140 ////////////////////////////////////////////////////////////////////////
141
142 class ESDCmpTr {
143
144 public:
145   ESDCmpTr();
146   ESDCmpTr(const char* fnGenTracks,
147            const char* fnCmpRes      ="cmpTracks.root", 
148            const char* fnGalice      ="galice.root", Int_t direction=0,
149            Int_t nEvents=1, Int_t firstEvent=0);
150   virtual ~ESDCmpTr();
151   void Reset();
152   Int_t Exec();
153   Int_t Exec(Int_t nEvents, Int_t firstEventNr);
154   Int_t SetIO();
155   Int_t SetIO(Int_t eventNr );
156   void CreateTreeCmp();
157   void CloseOutputFile();
158   Bool_t ConnectGenTree();
159   Int_t TreeGenLoop(Int_t eventNr);
160   Int_t TreeTLoop();
161   Int_t BuildKinkInfo0(Int_t eventNr); // build kink info 0
162   Int_t BuildV0Info(Int_t eventNr); // build kink info 0
163   void  MakePoints(AliESDtrack * track, AliPointsMI &points);
164   void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
165   void SetNEvents(Int_t i) {fNEvents = i;}
166   void SetDebug(Int_t level) {fDebug = level;}
167
168 // tmp method, should go to TrackReferenceESD
169   static TVector3 TR2Local(AliTrackReference *trackRef,
170                     AliTPCParam *paramTPC);
171
172 private:
173
174   Int_t fEventNr;                 //! current event number
175   Int_t fNEvents;                 //! number of events to process
176   Int_t fFirstEventNr;            //! first event to process
177   //
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
183   //
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
189   //
190   //
191   Int_t  fDirection;
192   //
193   AliRunLoader * fLoader;         //! pointer to the run loader
194   //TTree *fTreeRecTracks;          //! tree with reconstructed tracks
195   //
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
199   //
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
203   //
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
207   //
208   TObjArray *fRecArray;           // container with rec infos
209   AliESD *fEvent;                 //!event
210   //
211   AliTPCParam* fParamTPC;         //! AliTPCParam
212   Int_t fNParticles;              //! number of particles in the input tree genTracks
213   Int_t fDebug;                   //! debug flag  
214   Int_t fNextTreeGenEntryToRead;    //! last entry already read from genTracks tree
215   Int_t fNextKinkToRead;            //! last entry already read from genKinks tree
216   Int_t fNextV0ToRead;            //! last entry already read from genV0 tree
217   //
218   AliMCInfo*  fMCInfo;           //! MC information writen per particle
219   AliGenKinkInfo* fGenKinkInfo;      //! MC information writen per Kink
220   AliGenV0Info* fGenV0Info;      //! MC information writen per Kink
221   AliESDRecInfo*  fRecInfo;          //! Rec. information writen per particle
222   AliESDRecKinkInfo* fRecKinkInfo;    //! reconstructed kink info
223   AliESDRecV0Info* fRecV0Info;    //! reconstructed kink info
224   //
225
226   ClassDef(ESDCmpTr,1)    // class which creates and fills tree with ESDGenTrack objects
227 };
228 ClassImp(ESDCmpTr)
229
230
231