]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/PartCorrBase/AliCaloTrackMCReader.h
Allow only generated particles by MC generator and not MC transport particles to...
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliCaloTrackMCReader.h
CommitLineData
1c5acb87 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/* $Id: $ */
6
7//_________________________________________________________________________
29b2ceec 8// Class for reading data (Kinematics) in order to do prompt gamma
9// or other particle correlations
10// Separates generated particles into charged (CTS)
11// and neutral (PHOS or EMCAL acceptance)
1c5acb87 12//
2007809d 13// Now, it only works with data stored in Kinematics.root and
14// not in filtered Kinematics branch in AODs
15//
29b2ceec 16//*-- Author: Gustavo Conesa (LNF-INFN)
17//////////////////////////////////////////////////////////////////////////////
1c5acb87 18
19//-- Author: Gustavo Conesa (INFN-LNF)
20
21// --- ROOT system ---
477d6cee 22class TArrayI ;
23class TParticle ;
1c5acb87 24
25// --- AliRoot system ---
26#include "AliCaloTrackReader.h"
0ae57829 27class AliVCluster ;
1c5acb87 28class AliAODTrack ;
477d6cee 29class AliAODEvent ;
30class AliMCEvent ;
31class AliVEvent ;
1c5acb87 32
33class AliCaloTrackMCReader : public AliCaloTrackReader {
34
35 public:
1c5acb87 36 AliCaloTrackMCReader() ; // ctor
1c5acb87 37 virtual ~AliCaloTrackMCReader() ;//virtual dtor
78219bac 38 private :
39 AliCaloTrackMCReader(const AliCaloTrackMCReader & g) ; // cpy ctor
03190ad7 40 AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & g) ;//cpy assignment
41
42public:
1c5acb87 43 void InitParameters();
44
45 void Print(const Option_t * opt) const;
46
47 void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; }
48 void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; }
49 Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; }
50
1c5acb87 51 void AddNeutralParticlesArray(TArrayI & array)
52 { fNeutralParticlesArray = new TArrayI(array) ; }
53 TArrayI * GetNeutralParticlesArray() const {return fNeutralParticlesArray;}
54 Bool_t SkipNeutralParticles(Int_t pdg) const ;
55
56 void AddChargedParticlesArray(TArrayI & array)
57 { fChargedParticlesArray = new TArrayI(array) ; }
58 TArrayI * GetChargedParticlesArray() const {return fChargedParticlesArray;}
59 Bool_t KeepChargedParticles(Int_t pdg) const ;
60
61 void AddStatusArray(TArrayI & array)
62 { fStatusArray = new TArrayI(array) ; }
63 TArrayI * GetStatusArray() const {return fStatusArray;}
64
65 void SwitchOnStatusSelection() {fKeepAllStatus = kFALSE;}
66 void SwitchOffStatusSelection() {fKeepAllStatus = kTRUE;}
67 Bool_t KeepParticleWithStatus(Int_t status) const ;
68
2007809d 69 void SwitchOnOnlyGeneratorParticles() {fOnlyGeneratorParticles = kTRUE;}
70 void SwitchOffOnlyGeneratorParticles() {fOnlyGeneratorParticles = kFALSE;}
71
1c5acb87 72 void GetVertex(Double_t v[3]) const ;
f8006433 73 Double_t* GetVertex(const Int_t evtIndex) const {return fVertex[evtIndex];}
74 void GetVertex(Double_t vertex[3], const Int_t evtIndex) const
75 {vertex[0]=fVertex[evtIndex][0]; vertex[1]=fVertex[evtIndex][1]; vertex[2]=fVertex[evtIndex][2];}
76
29b2ceec 77 Bool_t FillInputEvent(const Int_t iEntry, const char * currentFileName) ;
477d6cee 78 AliVEvent* GetInputEvent() const {return (AliVEvent *) GetMC();}
79 void SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ;
1c5acb87 80
0ae57829 81 void SetCaloClusterPID(const Int_t pdgCode, AliVCluster *calo) const ;
1c5acb87 82 void SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track) const ;
83
691bdd02 84 void SwitchOnOverlapCheck() {fCheckOverlap = kTRUE;}
85 void SwitchOffOverlapCheck() {fCheckOverlap = kFALSE;}
86
87 Float_t GetEMCALOverlapAngle() const {return fEMCALOverlapAngle ;}
88 Float_t GetPHOSOverlapAngle() const {return fPHOSOverlapAngle ;}
89 void SetEMCALOverlapAngle(Float_t angle) {fEMCALOverlapAngle = angle;}
90 void SetPHOSOverlapAngle(Float_t angle) {fPHOSOverlapAngle = angle;}
2007809d 91
eb3e2665 92 AliESDCentrality* GetCentrality() const {return 0x0;}
93
1c5acb87 94 private:
95
691bdd02 96 void CheckOverlap(const Float_t anglethres, const Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg);
1c5acb87 97 void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle);
d7c10d78 98 void FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector & momentum) ;
1c5acb87 99
100 private:
477d6cee 101 Bool_t fDecayPi0 ; // If not decayed, decay pi0 by hand
102 TArrayI * fNeutralParticlesArray ; // Do not keep neutral particles of this list in calorimeter.
103 TArrayI * fChargedParticlesArray ; // Keep charged particles of this list in calorimeter.
104 TArrayI * fStatusArray ; // Keep particles with status of the list.
105 Bool_t fKeepAllStatus ; // Do or do not select particles depending on their status code.
106 Bool_t fCheckOverlap; // Check of overlapped photons from pi0 enter the calorimeter
107 Float_t fEMCALOverlapAngle; // Aperture angle of photons from decay that is not resolved by EMCAL, in radians
108 Float_t fPHOSOverlapAngle; // Aperture angle of photons from decay that is not resolved by PHOS, in radians
109 Int_t fIndex2ndPhoton; // Check overlap of first decay photon already done, internal use.
2007809d 110 Bool_t fOnlyGeneratorParticles; // Use particles only generated by PYTHIA/HERWIG/... and not by the MC tranport G3/G4/FLUKA ...
111
112 ClassDef(AliCaloTrackMCReader,4)
477d6cee 113} ;
1c5acb87 114
115
116#endif //ALICALOTRACKMCREADER_H
117
118
119