]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/CaloTrackCorrBase/AliCaloTrackMCReader.h
Coverity 18392+18321 and fix leaky assignment operator
[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 */
1c5acb87 5
6//_________________________________________________________________________
29b2ceec 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)
1c5acb87 11//
2007809d 12// Now, it only works with data stored in Kinematics.root and
13// not in filtered Kinematics branch in AODs
14//
29b2ceec 15//*-- Author: Gustavo Conesa (LNF-INFN)
16//////////////////////////////////////////////////////////////////////////////
1c5acb87 17
18//-- Author: Gustavo Conesa (INFN-LNF)
19
20// --- ROOT system ---
477d6cee 21class TArrayI ;
22class TParticle ;
1c5acb87 23
24// --- AliRoot system ---
25#include "AliCaloTrackReader.h"
0ae57829 26class AliVCluster ;
1c5acb87 27class AliAODTrack ;
477d6cee 28class AliAODEvent ;
29class AliMCEvent ;
30class AliVEvent ;
1c5acb87 31
32class AliCaloTrackMCReader : public AliCaloTrackReader {
33
34 public:
0de1814a 35
36 AliCaloTrackMCReader() ; // ctor
37 virtual ~AliCaloTrackMCReader() ; // virtual dtor
03190ad7 38
0de1814a 39 // Main methos in source file
40
41 void CheckOverlap(const Float_t anglethres, const Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg);
42
43 void FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector & momentum) ;
44
45 Bool_t FillInputEvent(const Int_t iEntry, const char * currentFileName) ;
46
be518ab0 47 void InitParameters();
1c5acb87 48
0de1814a 49 void MakePi0Decay(const TLorentzVector p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle);
50
be518ab0 51 void Print(const Option_t * opt) const;
1c5acb87 52
0de1814a 53 void SetCaloClusterPID (const Int_t pdgCode, AliVCluster *calo ) const ;
54
55 void SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track) const ;
56
57 void SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ;
58
59 // Data members setters and getters
1c5acb87 60
0de1814a 61 AliVEvent* GetInputEvent() const { return (AliVEvent *) GetMC() ; }
62
63 void GetVertex(Double_t v[3]) const ;
64 Double_t* GetVertex(const Int_t evtIndex) const {return fVertex[evtIndex];}
65 void GetVertex(Double_t vertex[3], const 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
be518ab0 69 void AddNeutralParticlesArray(TArrayI & array)
70 { fNeutralParticlesArray = new TArrayI(array) ; }
0de1814a 71 TArrayI * GetNeutralParticlesArray() const { return fNeutralParticlesArray ; }
be518ab0 72 Bool_t SkipNeutralParticles(Int_t pdg) const ;
1c5acb87 73
be518ab0 74 void AddChargedParticlesArray(TArrayI & array)
75 { fChargedParticlesArray = new TArrayI(array) ; }
0de1814a 76 TArrayI * GetChargedParticlesArray() const { return fChargedParticlesArray ; }
be518ab0 77 Bool_t KeepChargedParticles(Int_t pdg) const ;
1c5acb87 78
0de1814a 79 void AddStatusArray(TArrayI & array)
be518ab0 80 { fStatusArray = new TArrayI(array) ; }
0de1814a 81 TArrayI * GetStatusArray() const { return fStatusArray ; }
1c5acb87 82
0de1814a 83 void SwitchOnStatusSelection() { fKeepAllStatus = kFALSE ; }
84 void SwitchOffStatusSelection() { fKeepAllStatus = kTRUE ; }
85 Bool_t KeepParticleWithStatus(Int_t status) const ;
2007809d 86
0de1814a 87 void SwitchOnOnlyGeneratorParticles() { fOnlyGeneratorParticles = kTRUE ; }
88 void SwitchOffOnlyGeneratorParticles() { fOnlyGeneratorParticles = kFALSE ; }
f8006433 89
0de1814a 90 // Pi0 Overlapps, decays
1c5acb87 91
0de1814a 92 void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; }
93 void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; }
94 Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; }
1c5acb87 95
0de1814a 96 void SwitchOnOverlapCheck() { fCheckOverlap = kTRUE ; }
97 void SwitchOffOverlapCheck() { fCheckOverlap = kFALSE ; }
691bdd02 98
0de1814a 99 Float_t GetEMCALOverlapAngle() const { return fEMCALOverlapAngle ; }
100 void SetEMCALOverlapAngle(Float_t angle) { fEMCALOverlapAngle = angle ; }
1c5acb87 101
0de1814a 102 Float_t GetPHOSOverlapAngle() const { return fPHOSOverlapAngle ; }
103 void SetPHOSOverlapAngle (Float_t angle) { fPHOSOverlapAngle = angle ; }
104
1c5acb87 105
0de1814a 106private:
107
477d6cee 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.
2007809d 117 Bool_t fOnlyGeneratorParticles; // Use particles only generated by PYTHIA/HERWIG/... and not by the MC tranport G3/G4/FLUKA ...
118
0de1814a 119 AliCaloTrackMCReader( const AliCaloTrackMCReader & r) ; // cpy ctor
120 AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & r) ; // cpy assignment
c5693f62 121
2007809d 122 ClassDef(AliCaloTrackMCReader,4)
477d6cee 123} ;
1c5acb87 124
125
126#endif //ALICALOTRACKMCREADER_H
127
128
129