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 */
6 //_________________________________________________________________________
7 // Class for reading data (Kinematics) in order to do prompt gamma
8 // or other particle correlations
9 // Separates generated particles into charged (CTS)
10 // and neutral (PHOS or EMCAL acceptance)
12 // Now, it only works with data stored in Kinematics.root and
13 // not in filtered Kinematics branch in AODs
15 //*-- Author: Gustavo Conesa (LNF-INFN)
16 //////////////////////////////////////////////////////////////////////////////
18 //-- Author: Gustavo Conesa (INFN-LNF)
20 // --- ROOT system ---
24 // --- AliRoot system ---
25 #include "AliCaloTrackReader.h"
32 class AliCaloTrackMCReader : public AliCaloTrackReader {
36 AliCaloTrackMCReader() ; // ctor
37 virtual ~AliCaloTrackMCReader() ; // virtual dtor
39 // Main methos in source file
41 void CheckOverlap(Float_t anglethres, Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg);
43 void FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector & momentum) ;
45 Bool_t FillInputEvent(Int_t iEntry, const char * currentFileName) ;
47 void InitParameters();
49 void MakePi0Decay(TLorentzVector p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle);
51 void Print(const Option_t * opt) const;
53 void SetCaloClusterPID (Int_t pdgCode, AliVCluster *calo ) const ;
55 void SetTrackChargeAndPID(Int_t pdgCode, AliAODTrack *track) const ;
57 void SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ;
59 // Data members setters and getters
61 AliVEvent* GetInputEvent() const { return (AliVEvent *) GetMC() ; }
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]; }
68 // Particle type, status, arrays
69 void AddNeutralParticlesArray(TArrayI & array)
70 { fNeutralParticlesArray = new TArrayI(array) ; }
71 TArrayI * GetNeutralParticlesArray() const { return fNeutralParticlesArray ; }
72 Bool_t SkipNeutralParticles(Int_t pdg) const ;
74 void AddChargedParticlesArray(TArrayI & array)
75 { fChargedParticlesArray = new TArrayI(array) ; }
76 TArrayI * GetChargedParticlesArray() const { return fChargedParticlesArray ; }
77 Bool_t KeepChargedParticles(Int_t pdg) const ;
79 void AddStatusArray(TArrayI & array)
80 { fStatusArray = new TArrayI(array) ; }
81 TArrayI * GetStatusArray() const { return fStatusArray ; }
83 void SwitchOnStatusSelection() { fKeepAllStatus = kFALSE ; }
84 void SwitchOffStatusSelection() { fKeepAllStatus = kTRUE ; }
85 Bool_t KeepParticleWithStatus(Int_t status) const ;
87 void SwitchOnOnlyGeneratorParticles() { fOnlyGeneratorParticles = kTRUE ; }
88 void SwitchOffOnlyGeneratorParticles() { fOnlyGeneratorParticles = kFALSE ; }
90 // Pi0 Overlapps, decays
92 void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; }
93 void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; }
94 Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; }
96 void SwitchOnOverlapCheck() { fCheckOverlap = kTRUE ; }
97 void SwitchOffOverlapCheck() { fCheckOverlap = kFALSE ; }
99 Float_t GetEMCALOverlapAngle() const { return fEMCALOverlapAngle ; }
100 void SetEMCALOverlapAngle(Float_t angle) { fEMCALOverlapAngle = angle ; }
102 Float_t GetPHOSOverlapAngle() const { return fPHOSOverlapAngle ; }
103 void SetPHOSOverlapAngle (Float_t angle) { fPHOSOverlapAngle = angle ; }
108 Bool_t fDecayPi0 ; // If not decayed, decay pi0 by hand
109 TArrayI * fNeutralParticlesArray ; // Do not keep neutral particles of this list in calorimeter.
110 TArrayI * fChargedParticlesArray ; // Keep charged particles of this list in calorimeter.
111 TArrayI * fStatusArray ; // Keep particles with status of the list.
112 Bool_t fKeepAllStatus ; // Do or do not select particles depending on their status code.
113 Bool_t fCheckOverlap; // Check of overlapped photons from pi0 enter the calorimeter
114 Float_t fEMCALOverlapAngle; // Aperture angle of photons from decay that is not resolved by EMCAL, in radians
115 Float_t fPHOSOverlapAngle; // Aperture angle of photons from decay that is not resolved by PHOS, in radians
116 Int_t fIndex2ndPhoton; // Check overlap of first decay photon already done, internal use.
117 Bool_t fOnlyGeneratorParticles; // Use particles only generated by PYTHIA/HERWIG/... and not by the MC tranport G3/G4/FLUKA ...
119 AliCaloTrackMCReader( const AliCaloTrackMCReader & r) ; // cpy ctor
120 AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & r) ; // cpy assignment
122 ClassDef(AliCaloTrackMCReader,4)
126 #endif //ALICALOTRACKMCREADER_H