]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/CaloTrackCorrBase/AliCaloTrackMCReader.h
coverity
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / 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
03190ad7 38
be518ab0 39 void InitParameters();
1c5acb87 40
be518ab0 41 void Print(const Option_t * opt) const;
1c5acb87 42
be518ab0 43 void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; }
44 void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; }
45 Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; }
1c5acb87 46
be518ab0 47 void AddNeutralParticlesArray(TArrayI & array)
48 { fNeutralParticlesArray = new TArrayI(array) ; }
49 TArrayI * GetNeutralParticlesArray() const {return fNeutralParticlesArray;}
50 Bool_t SkipNeutralParticles(Int_t pdg) const ;
1c5acb87 51
be518ab0 52 void AddChargedParticlesArray(TArrayI & array)
53 { fChargedParticlesArray = new TArrayI(array) ; }
54 TArrayI * GetChargedParticlesArray() const {return fChargedParticlesArray;}
55 Bool_t KeepChargedParticles(Int_t pdg) const ;
1c5acb87 56
57 void AddStatusArray(TArrayI & array)
be518ab0 58 { fStatusArray = new TArrayI(array) ; }
59 TArrayI * GetStatusArray() const {return fStatusArray;}
1c5acb87 60
be518ab0 61 void SwitchOnStatusSelection() { fKeepAllStatus = kFALSE ; }
62 void SwitchOffStatusSelection() { fKeepAllStatus = kTRUE ; }
1c5acb87 63 Bool_t KeepParticleWithStatus(Int_t status) const ;
64
be518ab0 65 void SwitchOnOnlyGeneratorParticles() {fOnlyGeneratorParticles = kTRUE ; }
66 void SwitchOffOnlyGeneratorParticles() {fOnlyGeneratorParticles = kFALSE ; }
2007809d 67
be518ab0 68 void GetVertex(Double_t v[3]) const ;
f8006433 69 Double_t* GetVertex(const Int_t evtIndex) const {return fVertex[evtIndex];}
be518ab0 70 void GetVertex(Double_t vertex[3], const Int_t evtIndex) const
f8006433 71 {vertex[0]=fVertex[evtIndex][0]; vertex[1]=fVertex[evtIndex][1]; vertex[2]=fVertex[evtIndex][2];}
72
29b2ceec 73 Bool_t FillInputEvent(const Int_t iEntry, const char * currentFileName) ;
477d6cee 74 AliVEvent* GetInputEvent() const {return (AliVEvent *) GetMC();}
be518ab0 75 void SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ;
1c5acb87 76
be518ab0 77 void SetCaloClusterPID(const Int_t pdgCode, AliVCluster *calo) const ;
78 void SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track) const ;
1c5acb87 79
be518ab0 80 void SwitchOnOverlapCheck() {fCheckOverlap = kTRUE ; }
81 void SwitchOffOverlapCheck() {fCheckOverlap = kFALSE ; }
691bdd02 82
be518ab0 83 Float_t GetEMCALOverlapAngle() const {return fEMCALOverlapAngle ; }
84 Float_t GetPHOSOverlapAngle() const {return fPHOSOverlapAngle ; }
85 void SetEMCALOverlapAngle(Float_t angle) {fEMCALOverlapAngle = angle ; }
86 void SetPHOSOverlapAngle(Float_t angle) {fPHOSOverlapAngle = angle ; }
87
1c5acb87 88 private:
89
be518ab0 90 void CheckOverlap(const Float_t anglethres, const Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg);
f3138ecf 91 void MakePi0Decay(const TLorentzVector p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle);
be518ab0 92 void FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector & momentum) ;
1c5acb87 93
94 private:
477d6cee 95 Bool_t fDecayPi0 ; // If not decayed, decay pi0 by hand
96 TArrayI * fNeutralParticlesArray ; // Do not keep neutral particles of this list in calorimeter.
97 TArrayI * fChargedParticlesArray ; // Keep charged particles of this list in calorimeter.
98 TArrayI * fStatusArray ; // Keep particles with status of the list.
99 Bool_t fKeepAllStatus ; // Do or do not select particles depending on their status code.
100 Bool_t fCheckOverlap; // Check of overlapped photons from pi0 enter the calorimeter
101 Float_t fEMCALOverlapAngle; // Aperture angle of photons from decay that is not resolved by EMCAL, in radians
102 Float_t fPHOSOverlapAngle; // Aperture angle of photons from decay that is not resolved by PHOS, in radians
103 Int_t fIndex2ndPhoton; // Check overlap of first decay photon already done, internal use.
2007809d 104 Bool_t fOnlyGeneratorParticles; // Use particles only generated by PYTHIA/HERWIG/... and not by the MC tranport G3/G4/FLUKA ...
105
c5693f62 106 AliCaloTrackMCReader(const AliCaloTrackMCReader & g) ; // cpy ctor
107 AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & g) ;//cpy assignment
108
2007809d 109 ClassDef(AliCaloTrackMCReader,4)
477d6cee 110} ;
1c5acb87 111
112
113#endif //ALICALOTRACKMCREADER_H
114
115
116