]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/TPC/AliMCInfo.h
PWGPP-4 Functionality to make a program snapshot -core file
[u/mrichter/AliRoot.git] / PWGPP / TPC / AliMCInfo.h
1 #ifndef ALIMCINFO_H
2 #define ALIMCINFO_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6
7
8 //////////////////////////////////////////////////////////////////////////////
9 //                          Class AliGenInfo                               //
10 //   collect together MC info for comparison purposes - effieciency studies and so on//                                                                 //
11 //   marian.ivanov@cern.ch                                                  //
12 //////////////////////////////////////////////////////////////////////////////
13
14
15
16 ////////////////////////////////////////////////////////////////////////
17 //
18 // Start of implementation of the class AliTPCdigitRow
19 //
20 ////////////////////////////////////////////////////////////////////////
21
22 #include <TParticle.h>
23 #include "AliTrackReference.h"
24
25 class TFile;
26 class AliRunLoader;
27 class AliStack;
28
29
30 class AliTPCdigitRow: public TObject {
31 public:
32   AliTPCdigitRow();
33   virtual ~AliTPCdigitRow(){;}
34   void SetRow(Int_t row);
35   Bool_t TestRow(Int_t row) const ;
36   AliTPCdigitRow & operator=(const AliTPCdigitRow &digOld);
37   Int_t RowsOn(Int_t upto=8*32) const;
38   Int_t Last() const;
39   Int_t First() const ;
40   void Reset();
41
42 private:
43   UChar_t fDig[32];   // bitmask of the digits presence
44   ClassDef(AliTPCdigitRow,1)  // container for digit pattern
45 };
46
47
48 ////////////////////////////////////////////////////////////////////////
49 //
50 // Start of implementation of the class AliMCInfo
51 //
52 ////////////////////////////////////////////////////////////////////////
53
54 class AliMCInfo: public TObject {
55   friend class  AliGenInfoMaker;
56   friend class  AliRecInfoMaker;
57   friend class  AliESDRecInfo;
58 public:
59   AliMCInfo();
60   ~AliMCInfo();   
61   AliMCInfo(const AliMCInfo& info);
62   AliMCInfo& operator=(const AliMCInfo& info);
63   void Update(TParticle * part, TClonesArray * arrayTr, Double_t pvertex[4], Int_t label);
64   void Clear(Option_t* = "");
65   //
66   void Update();
67   Int_t     GetEventNr() const   {return fEventNr;}
68   const AliTrackReference&  GetTrackRef() const {return fTrackRef;}
69   const AliTrackReference&  GetTrackRefOut() const {return fTrackRefOut;}
70   const AliTrackReference&  GetTRdecay() const {return fTRdecay;} 
71   TParticle& GetParticle()   {return fParticle;}
72   //
73   Int_t     GetPrimPart() const  {return fPrimPart;}
74   Float_t   GetMass()   const    {return fMass;}                  
75   Float_t   GetCharge() const    {return fCharge;}
76   Int_t     GetLabel()  const    {return fLabel;}
77
78   Int_t     GetMCtracks() const  {return fMCtracks;}
79   Int_t     GetPdg()      const  {return fPdg;}
80   const Float_t*   GetDecayCoord() const {return fDecayCoord;}
81   const Double_t*  GetVDist()      const {return fVDist;}
82
83   Bool_t   IsTPCdecay() const   {return fTPCdecay;}
84
85   Int_t    GetRowsWithDigitsInn() const {return fRowsWithDigitsInn;}
86   Int_t    GetRowsWithDigits() const  {return fRowsWithDigits;}
87   Int_t    GetRowsTrackLength() const {return fRowsTrackLength;}
88   Float_t GetPrim() const { return fPrim;}
89   
90   AliTPCdigitRow & GetTPCRow() {return fTPCRow;}
91   Int_t GetNTPCRef() const {return fNTPCRef;}      
92   Int_t GetNITSRef() const {return fNITSRef;}
93   Int_t GetNTRDRef() const {return fNTRDRef;}
94   Int_t GetNTOFRef() const {return fNTOFRef;}
95   const TClonesArray *GetTPCReferences() const { return fTPCReferences;}  
96   const TClonesArray * GetTRDReferences() const { return fTRDReferences;}  
97   const TClonesArray * GetITSReferences() const { return fITSReferences;}  
98   const TClonesArray * GetTOFReferences() const { return fTOFReferences;}  
99   void CalcTPCrows(TClonesArray *arrayTR);
100 private:
101   AliTrackReference  fTrackRef;      // track reference saved in the output tree
102   AliTrackReference  fTrackRefOut;   // decay track reference saved in the output tree
103   AliTrackReference  fTRdecay;       // track reference at decay point
104   //
105   Int_t     fPrimPart;               // index of primary particle in TreeH
106   TParticle fParticle;               // generated particle 
107   Float_t   fMass;                   // mass of the particle
108   Float_t   fCharge;                 // charge of the particle
109   Int_t     fLabel;                  // track label
110   Int_t     fEventNr;                // event number
111   Int_t     fMCtracks;               // indication of how many times the track is retuturned back
112   Int_t fPdg;                        //pdg code
113   Float_t fDecayCoord[3];            // position of particle decay
114   Double_t fVDist[4];                //distance of the particle vertex from primary vertex
115   Bool_t fTPCdecay;                  //indicates decay in TPC
116   //
117   // TPC row information using digits
118   Int_t fRowsWithDigitsInn;          // number of rows with digits in the inner sectors
119   Int_t fRowsWithDigits;             // number of rows with digits in the outer sectors
120   Int_t fRowsTrackLength;            // last - first row with digit
121   //
122   // TPC track refernce information
123   Float_t fTPCtrackLength;           // distance between first and last track reference
124   //
125   Float_t fPrim;                     // theoretical dedx in tpc according particle momenta and mass
126   AliTPCdigitRow fTPCRow;                  // information about digits row pattern
127   //
128   Int_t fNTPCRef;                    // tpc references counter
129   Int_t fNITSRef;                    // ITS references counter
130   Int_t fNTRDRef;                    // TRD references counter
131   Int_t fNTOFRef;                    // TOF references counter
132   //
133   Int_t fNTPCRefOut;                    // tpc references counter - out
134   Int_t fNITSRefOut;                    // ITS references counter - out
135   Int_t fNTRDRefOut;                    // TRD references counter - out
136   Int_t fNTOFRefOut;                    // TOF references counter - out
137
138   TClonesArray * fTPCReferences;     //containner with all track references -in the TPC
139   TClonesArray * fITSReferences;     //container with ITS references
140   TClonesArray * fTRDReferences;     //container with TRD references  
141   TClonesArray * fTOFReferences;     //container with TRD references  
142   //
143   ClassDef(AliMCInfo,2);  // container for 
144 };
145
146
147
148 #endif