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() ;
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 ;
71 void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle);
72 void FillCalorimeters(const Int_t iParticle, TParticle* particle, TLorentzVector momentum,
73 Int_t &indexPHOS, Int_t &indexEMCAL) ;
76 Bool_t fDecayPi0; //If not decayed, decay pi0 by hand
77 TArrayI * fNeutralParticlesArray ; //Do not keep neutral particles of this list in calorimeter.
78 TArrayI * fChargedParticlesArray ; //Keep charged particles of this list in calorimeter.
79 TArrayI * fStatusArray ; //Keep particles with status of the list.
80 Bool_t fKeepAllStatus ; //Do or do not select particles depending on their status code.
81 Int_t fClonesArrayType; //Analysis with TParticles or AliAODCaloCluster/Track?
83 ClassDef(AliCaloTrackMCReader,1)
87 #endif //ALICALOTRACKMCREADER_H