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 */
7 //_________________________________________________________________________
8 // Class for reading data (Kinematics) in order to do prompt gamma or other particle correlations
11 //-- Author: Gustavo Conesa (INFN-LNF)
13 // --- ROOT system ---
15 // --- AliRoot system ---
16 #include "AliCaloTrackReader.h"
17 class AliAODCaloCluster ;
20 class AliCaloTrackMCReader : public AliCaloTrackReader {
24 AliCaloTrackMCReader() ; // ctor
25 AliCaloTrackMCReader(const AliCaloTrackMCReader & g) ; // cpy ctor
26 AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & g) ;//cpy assignment
27 virtual ~AliCaloTrackMCReader() ;//virtual dtor
29 enum clonesType {kTParticle, kAliAOD};
31 void InitParameters();
33 void Print(const Option_t * opt) const;
35 void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; }
36 void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; }
37 Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; }
39 void SetClonesArrayType(Int_t type){fClonesArrayType = type ;}
40 Bool_t GetClonesArrayType() const {return fClonesArrayType ;}
42 void AddNeutralParticlesArray(TArrayI & array)
43 { fNeutralParticlesArray = new TArrayI(array) ; }
44 TArrayI * GetNeutralParticlesArray() const {return fNeutralParticlesArray;}
45 Bool_t SkipNeutralParticles(Int_t pdg) const ;
47 void AddChargedParticlesArray(TArrayI & array)
48 { fChargedParticlesArray = new TArrayI(array) ; }
49 TArrayI * GetChargedParticlesArray() const {return fChargedParticlesArray;}
50 Bool_t KeepChargedParticles(Int_t pdg) const ;
52 void AddStatusArray(TArrayI & array)
53 { fStatusArray = new TArrayI(array) ; }
54 TArrayI * GetStatusArray() const {return fStatusArray;}
56 void SwitchOnStatusSelection() {fKeepAllStatus = kFALSE;}
57 void SwitchOffStatusSelection() {fKeepAllStatus = kTRUE;}
58 Bool_t KeepParticleWithStatus(Int_t status) const ;
60 void GetVertex(Double_t v[3]) const ;
62 void FillInputEvent(Int_t iEntry) ;
63 AliVEvent* GetInputEvent() const {return GetMC();}
64 void SetInputEvent(TObject* esd, TObject* aod, TObject* mc) ;
66 void SetCaloClusterPID(const Int_t pdgCode, AliAODCaloCluster *calo) const ;
67 void SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track) const ;
69 void SwitchOnOverlapCheck() {fCheckOverlap = kTRUE;}
70 void SwitchOffOverlapCheck() {fCheckOverlap = kFALSE;}
72 Float_t GetEMCALOverlapAngle() const {return fEMCALOverlapAngle ;}
73 Float_t GetPHOSOverlapAngle() const {return fPHOSOverlapAngle ;}
74 void SetEMCALOverlapAngle(Float_t angle) {fEMCALOverlapAngle = angle;}
75 void SetPHOSOverlapAngle(Float_t angle) {fPHOSOverlapAngle = angle;}
79 void CheckOverlap(const Float_t anglethres, const Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg);
80 void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle);
81 void FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector momentum,
82 Int_t &indexPHOS, Int_t &indexEMCAL) ;
85 Bool_t fDecayPi0; //If not decayed, decay pi0 by hand
86 TArrayI * fNeutralParticlesArray ; //Do not keep neutral particles of this list in calorimeter.
87 TArrayI * fChargedParticlesArray ; //Keep charged particles of this list in calorimeter.
88 TArrayI * fStatusArray ; //Keep particles with status of the list.
89 Bool_t fKeepAllStatus ; //Do or do not select particles depending on their status code.
90 Int_t fClonesArrayType; //Analysis with TParticles or AliAODCaloCluster/Track?
91 Bool_t fCheckOverlap; //Check of overlapped photons from pi0 enter the calorimeter
92 Float_t fEMCALOverlapAngle; //Aperture angle of photons from decay that is not resolved by EMCAL, in radians
93 Float_t fPHOSOverlapAngle; //Aperture angle of photons from decay that is not resolved by PHOS, in radians
94 Int_t fIndex2ndPhoton; //Check overlap of first decay photon already done, internal use.
96 ClassDef(AliCaloTrackMCReader,2)
100 #endif //ALICALOTRACKMCREADER_H