AliPhysics  5eaf189 (5eaf189)
AliCaloTrackMCReader.h
Go to the documentation of this file.
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 
6 //_________________________________________________________________________
19 //_________________________________________________________________________
20 
21 // --- ROOT system ---
22 class TArrayI ;
23 
24 // --- AliRoot system ---
25 #include "AliCaloTrackReader.h"
26 class AliVCluster ;
27 class AliAODTrack ;
28 class AliAODEvent ;
29 class AliMCEvent ;
30 class AliVEvent ;
31 
33 
34  public:
35 
36  AliCaloTrackMCReader() ; // ctor
37  virtual ~AliCaloTrackMCReader() ; // virtual dtor
38 
39  // Main methods in source file
40 
41  void CheckOverlap(Float_t anglethres, Int_t imom, Int_t & iPrimary, Int_t & index, Int_t & pdg);
42 
43  void FillCalorimeters(Int_t & iParticle, Int_t motherIndex, Int_t pdg) ;
44 
45  Bool_t FillInputEvent(Int_t iEntry, const char * currentFileName) ;
46 
47  void InitParameters();
48 
49  void MakePi0Decay() ;//, Double_t &angle);
50 
51  void Print(const Option_t * opt) const;
52 
53  void SetCaloClusterPID (Int_t pdgCode, AliVCluster *calo ) const ;
54 
55  void SetTrackChargeAndPID(Int_t pdgCode, AliAODTrack *track) const ;
56 
57  void SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ;
58 
59  // Data members setters and getters
60 
61  AliVEvent* GetInputEvent() const { return (AliVEvent *) GetMC() ; }
62 
63  void GetVertex(Double_t v[3]) const ;
64  Double_t* GetVertex(Int_t evtIndex) const {return fVertex[evtIndex];}
65  void GetVertex(Double_t vertex[3], Int_t evtIndex) const
66  { vertex[0]=fVertex[evtIndex][0]; vertex[1]=fVertex[evtIndex][1]; vertex[2]=fVertex[evtIndex][2]; }
67 
68  // Particle type, status, arrays
70  { fNeutralParticlesArray = new TArrayI(array) ; }
72  Bool_t SkipNeutralParticles(Int_t pdg) const ;
73 
75  { fChargedParticlesArray = new TArrayI(array) ; }
77  Bool_t KeepChargedParticles(Int_t pdg) const ;
78 
79  void AddStatusArray(TArrayI & array)
80  { fStatusArray = new TArrayI(array) ; }
81  TArrayI * GetStatusArray() const { return fStatusArray ; }
82 
85  Bool_t KeepParticleWithStatus(Int_t status) const ;
86 
89 
90  // Pi0 Overlapps, decays
91 
92  void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; }
93  void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; }
94  Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; }
95 
96  void SwitchOnOverlapCheck() { fCheckOverlap = kTRUE ; }
97  void SwitchOffOverlapCheck() { fCheckOverlap = kFALSE ; }
98 
101 
103  void SetPHOSOverlapAngle (Float_t angle) { fPHOSOverlapAngle = angle ; }
104 
105 private:
106 
117 
118  TLorentzVector fMomentum;
119  TLorentzVector fPi0Momentum;
120  TLorentzVector fGamDecayMom1;
121  TLorentzVector fGamDecayMom2;
122 
125 
128 
130  ClassDef(AliCaloTrackMCReader,5) ;
132 
133 } ;
134 
135 #endif //ALICALOTRACKMCREADER_H
136 
137 
138 
Int_t pdg
virtual AliMCEvent * GetMC() const
TLorentzVector fGamDecayMom2
! Gamma decay 2 momentum
double Double_t
Definition: External.C:58
virtual ~AliCaloTrackMCReader()
Destructor.
void InitParameters()
Initialize the parameters of the analysis.
void SetCaloClusterPID(Int_t pdgCode, AliVCluster *calo) const
Give a PID weight for CaloClusters equal to 1 depending on the particle type.
TLorentzVector fGamDecayMom1
! Gamma decay 1 momentum
AliCaloTrackMCReader & operator=(const AliCaloTrackMCReader &r)
Assignment operator not implemented.
Bool_t fOnlyGeneratorParticles
Use particles only generated by PYTHIA/HERWIG/... and not by the MC tranport G3/G4/FLUKA ...
void AddChargedParticlesArray(TArrayI &array)
Double_t * GetVertex(Int_t evtIndex) const
void CheckOverlap(Float_t anglethres, Int_t imom, Int_t &iPrimary, Int_t &index, Int_t &pdg)
Check overlap of decay photons.
void SetInputOutputMCEvent(AliVEvent *esd, AliAODEvent *aod, AliMCEvent *mc)
Connect the input data pointer.
Bool_t SkipNeutralParticles(Int_t pdg) const
Double_t ** fVertex
! Vertex array 3 dim for each mixed event buffer.
Bool_t fDecayPi0
If not decayed, decay pi0 by hand.
void SetPHOSOverlapAngle(Float_t angle)
AliCaloTrackMCReader()
Default constructor. Initialize parameters.
TArrayI * GetStatusArray() const
TLorentzVector fMomentum
! Momentum
void SetEMCALOverlapAngle(Float_t angle)
TLorentzVector fPi0Momentum
! Pi0 momentum
Float_t fPHOSOverlapAngle
Aperture angle of photons from decay that is not resolved by PHOS, in radians.
int Int_t
Definition: External.C:63
Int_t fIndex2ndPhoton
Check overlap of first decay photon already done, internal use.
Bool_t FillInputEvent(Int_t iEntry, const char *currentFileName)
Fill the event counter and input lists that are needed, called by AliAnaCaloTrackCorrMaker.
float Float_t
Definition: External.C:68
Class for filtering generated MC particles and prepare them as input for the analysis.
Int_t IsPi0DecaySwitchedOn() const
Base class for event, clusters and tracks filtering and preparation for the analysis.
Bool_t KeepParticleWithStatus(Int_t status) const
void SetTrackChargeAndPID(Int_t pdgCode, AliAODTrack *track) const
Give a PID weight for tracks equal to 1 depending on the particle type.
void AddNeutralParticlesArray(TArrayI &array)
TArrayI * fNeutralParticlesArray
Do not keep neutral particles of this list in calorimeter.
void AddStatusArray(TArrayI &array)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Float_t fEMCALOverlapAngle
Aperture angle of photons from decay that is not resolved by EMCAL, in radians.
Float_t GetEMCALOverlapAngle() const
Float_t GetPHOSOverlapAngle() const
TArrayI * fChargedParticlesArray
Keep charged particles of this list in calorimeter.
Bool_t fCheckOverlap
Check of overlapped photons from pi0 enter the calorimeter.
AliVEvent * GetInputEvent() const
void GetVertex(Double_t v[3]) const
Bool_t fKeepAllStatus
Do or do not select particles depending on their status code.
void FillCalorimeters(Int_t &iParticle, Int_t motherIndex, Int_t pdg)
Fill CaloClusters or AliVParticles lists of PHOS or EMCAL.
TArrayI * GetNeutralParticlesArray() const
TArrayI * fStatusArray
Keep particles with status of the list.
void GetVertex(Double_t vertex[3], Int_t evtIndex) const
const char Option_t
Definition: External.C:48
Bool_t KeepChargedParticles(Int_t pdg) const
bool Bool_t
Definition: External.C:53
TArrayI * GetChargedParticlesArray() const