]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliGenInfo.h
TOF index initialized with -1 (S.Kiselev)
[u/mrichter/AliRoot.git] / STEER / AliGenInfo.h
1
2
3
4 ////////////////////////////////////////////////////////////////////////
5 //
6 // Start of implementation of the class digitRow
7 //
8 ////////////////////////////////////////////////////////////////////////
9 const Int_t kgRowBytes = 32;
10
11 class digitRow: public TObject {
12
13 public:
14   digitRow();
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);
20   Int_t Last();
21   Int_t First();
22   void Reset();
23
24 //private:
25   UChar_t fDig[kgRowBytes];
26   ClassDef(digitRow,1)  // container for digit pattern
27 };
28 ClassImp(digitRow)
29
30
31 ////////////////////////////////////////////////////////////////////////
32 //
33 // Start of implementation of the class AliMCInfo
34 //
35 ////////////////////////////////////////////////////////////////////////
36
37 class AliMCInfo: public TObject {
38
39 public:
40   AliMCInfo();
41   ~AliMCInfo();
42   void Update();
43
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
47   //
48   TParticle fParticle;           // generated particle 
49   Float_t   fMass;               // mass of the particle
50   Float_t fCharge;               //
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  
68   //
69   ClassDef(AliMCInfo,3)  // container for 
70 };
71 ClassImp(AliMCInfo)
72
73
74
75 class AliGenV0Info: public TObject {
76 public:
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
82   //
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
87   //
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  
95 };
96 ClassImp(AliGenV0Info)
97
98
99
100
101 ////////////////////////////////////////////////////////////////////////
102 // 
103 // Start of implementation of the class AliGenInfoMaker
104 //
105 ////////////////////////////////////////////////////////////////////////
106
107 class AliGenInfoMaker {
108
109 public:
110   AliGenInfoMaker();
111   AliGenInfoMaker(const char * fnGalice, const char* fnRes    ="genTracks.root",
112                    Int_t nEvents=1, Int_t firstEvent=0);
113   virtual ~AliGenInfoMaker();
114   void Reset();
115   Int_t Exec();
116   Int_t Exec(Int_t nEvents, Int_t firstEventNr);
117   void CreateTreeGenTracks();
118   void CloseOutputFile();
119   Int_t TreeKLoop();
120   Int_t TreeTRLoop();
121   Int_t TreeDLoop();
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();
128   Int_t CloseIO();
129   Int_t SetIO();
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);
134
135 public:
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
145   //
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
150   // 
151   AliMCInfo **   fGenInfo;    //! array with pointers to gen info
152   Int_t fNInfos;                  //! number of tracks with infos
153   //
154   AliTPCParam* fParamTPC;         //! AliTPCParam
155   Double_t fVPrim[3];             //! primary vertex position
156                                   // the fVDist[3] contains size of the 3-vector
157
158 private:
159
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;
166   // 
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
170  
171   ClassDef(AliGenInfoMaker,1)    // class which creates and fills tree with TPCGenTrack objects
172 };
173 ClassImp(AliGenInfoMaker)
174
175
176
177 class AliComparisonDraw: public TObject{
178 public:
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);
189   //
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);
192   //
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);
196  public: 
197   TTree * fTree;
198   TH1F  * fRes;  //temporary file
199   TH1F  * fMean;  //temporary file
200   ClassDef(AliComparisonDraw,1)
201 };
202 ClassImp(AliComparisonDraw)
203
204
205
206 AliTPCParam * GetTPCParam();
207 Float_t TPCBetheBloch(Float_t bg);