]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliCaloTrackMCReader.h
- added the pad status regarding the calibration and the saturation to the TObject...
[u/mrichter/AliRoot.git] / PWG4 / AliCaloTrackMCReader.h
1 #ifndef AliCaloTrackMCReader_H
2 #define AliCaloTrackMCReader_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id:  $ */
6
7 /* History of cvs commits:
8  *
9  * $Log$
10  *
11  */
12
13 //_________________________________________________________________________
14 // Class for reading data (Kinematics) in order to do prompt gamma or other particle  correlations
15 //
16
17 //-- Author: Gustavo Conesa (INFN-LNF)
18
19 // --- ROOT system ---
20
21 // --- AliRoot system ---
22 #include "AliCaloTrackReader.h" 
23 class AliAODCaloCluster ;
24 class AliAODTrack ;
25
26 class AliCaloTrackMCReader : public AliCaloTrackReader {
27   
28  public: 
29   
30   AliCaloTrackMCReader() ; // ctor
31   AliCaloTrackMCReader(const AliCaloTrackMCReader & g) ; // cpy ctor
32   AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & g) ;//cpy assignment
33   virtual ~AliCaloTrackMCReader() ;//virtual dtor
34   
35   enum clonesType {kTParticle, kAliAOD};
36   
37   void InitParameters();
38   
39   void Print(const Option_t * opt) const; 
40   
41   void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; } 
42   void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; } 
43   Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; } 
44   
45   void SetClonesArrayType(Int_t type){fClonesArrayType = type ;} 
46   Bool_t GetClonesArrayType() const {return fClonesArrayType ;} 
47     
48   void AddNeutralParticlesArray(TArrayI & array)  
49   { fNeutralParticlesArray   = new TArrayI(array) ; }
50   TArrayI * GetNeutralParticlesArray() const   {return  fNeutralParticlesArray;}
51   Bool_t SkipNeutralParticles(Int_t pdg) const ;
52   
53   void AddChargedParticlesArray(TArrayI & array)  
54   { fChargedParticlesArray   = new TArrayI(array) ; }
55   TArrayI * GetChargedParticlesArray() const   {return  fChargedParticlesArray;}
56   Bool_t KeepChargedParticles(Int_t pdg) const ;
57
58   void AddStatusArray(TArrayI & array)  
59   { fStatusArray   = new TArrayI(array) ; }
60   TArrayI * GetStatusArray() const   {return  fStatusArray;}
61   
62   void SwitchOnStatusSelection() {fKeepAllStatus = kFALSE;}
63   void SwitchOffStatusSelection() {fKeepAllStatus = kTRUE;}
64   Bool_t KeepParticleWithStatus(Int_t status) const ;
65   
66   void GetVertex(Double_t v[3]);
67
68   void FillInputEvent();
69   void SetInputEvent(TObject* esd, TObject* aod, TObject* mc);
70   
71   void SetCaloClusterPID(const Int_t pdgCode, AliAODCaloCluster *calo);
72   void SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track);
73   
74  private:
75   
76   void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2);//, Double_t &angle); 
77   void FillCalorimeters(const Int_t iParticle, TParticle* particle, TLorentzVector momentum,   
78                         Int_t &indexPHOS, Int_t &indexEMCAL);
79   
80   private:
81   Bool_t      fDecayPi0; //If not decayed, decay pi0 by hand
82   TArrayI * fNeutralParticlesArray ; //Do not keep neutral particles of this list in calorimeter.
83   TArrayI * fChargedParticlesArray ; //Keep charged particles of this list in calorimeter.
84   TArrayI * fStatusArray ; //Keep particles with status of the list.
85   Bool_t fKeepAllStatus ; //Do or do not select particles depending on their status code.
86   Int_t fClonesArrayType; //Analysis with TParticles or AliAODCaloCluster/Track?
87   
88   ClassDef(AliCaloTrackMCReader,1)
89     } ;
90
91
92 #endif //AliCaloMCTrackReader_H
93
94
95