AliPhysics  2b88e80 (2b88e80)
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 #include "AliMCEvent.h"
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  AliGenEventHeader* GetGenEventHeader() const
63  {
64  if ( GetMC() ) return GetMC()->GenEventHeader();
65  else return 0x0;
66  }
67 
68  void GetVertex(Double_t v[3]) const ;
69  Double_t* GetVertex(Int_t evtIndex) const {return fVertex[evtIndex];}
70  void GetVertex(Double_t vertex[3], Int_t evtIndex) const
71  { vertex[0]=fVertex[evtIndex][0]; vertex[1]=fVertex[evtIndex][1]; vertex[2]=fVertex[evtIndex][2]; }
72 
73  // Particle type, status, arrays
75  { fNeutralParticlesArray = new TArrayI(array) ; }
77  Bool_t SkipNeutralParticles(Int_t pdg) const ;
78 
80  { fChargedParticlesArray = new TArrayI(array) ; }
82  Bool_t KeepChargedParticles(Int_t pdg) const ;
83 
84  void AddStatusArray(TArrayI & array)
85  { fStatusArray = new TArrayI(array) ; }
86  TArrayI * GetStatusArray() const { return fStatusArray ; }
87 
90  Bool_t KeepParticleWithStatus(Int_t status) const ;
91 
94 
95  // Pi0 Overlapps, decays
96 
97  void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; }
98  void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; }
99  Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; }
100 
101  void SwitchOnOverlapCheck() { fCheckOverlap = kTRUE ; }
102  void SwitchOffOverlapCheck() { fCheckOverlap = kFALSE ; }
103 
106 
108  void SetPHOSOverlapAngle (Float_t angle) { fPHOSOverlapAngle = angle ; }
109 
110 private:
111 
122 
123  TLorentzVector fMomentum;
124  TLorentzVector fPi0Momentum;
125  TLorentzVector fGamDecayMom1;
126  TLorentzVector fGamDecayMom2;
127 
130 
133 
135  ClassDef(AliCaloTrackMCReader,5) ;
137 
138 } ;
139 
140 #endif //ALICALOTRACKMCREADER_H
141 
142 
143 
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.
AliGenEventHeader * GetGenEventHeader() const
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