]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/PartCorrBase/AliCaloTrackMCReader.h
Fix for improper corrections from revision 30849
[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//_________________________________________________________________________
8// Class for reading data (Kinematics) in order to do prompt gamma or other particle correlations
9//
10
11//-- Author: Gustavo Conesa (INFN-LNF)
12
13// --- ROOT system ---
14
15// --- AliRoot system ---
16#include "AliCaloTrackReader.h"
17class AliAODCaloCluster ;
18class AliAODTrack ;
19
20class AliCaloTrackMCReader : public AliCaloTrackReader {
21
22 public:
23
24 AliCaloTrackMCReader() ; // ctor
25 AliCaloTrackMCReader(const AliCaloTrackMCReader & g) ; // cpy ctor
26 AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & g) ;//cpy assignment
27 virtual ~AliCaloTrackMCReader() ;//virtual dtor
28
29 enum clonesType {kTParticle, kAliAOD};
30
31 void InitParameters();
32
33 void Print(const Option_t * opt) const;
34
35 void SwitchOnPi0Decay() { fDecayPi0 = kTRUE ; }
36 void SwitchOffPi0Decay() { fDecayPi0 = kFALSE ; }
37 Int_t IsPi0DecaySwitchedOn() const { return fDecayPi0 ; }
38
39 void SetClonesArrayType(Int_t type){fClonesArrayType = type ;}
40 Bool_t GetClonesArrayType() const {return fClonesArrayType ;}
41
42 void AddNeutralParticlesArray(TArrayI & array)
43 { fNeutralParticlesArray = new TArrayI(array) ; }
44 TArrayI * GetNeutralParticlesArray() const {return fNeutralParticlesArray;}
45 Bool_t SkipNeutralParticles(Int_t pdg) const ;
46
47 void AddChargedParticlesArray(TArrayI & array)
48 { fChargedParticlesArray = new TArrayI(array) ; }
49 TArrayI * GetChargedParticlesArray() const {return fChargedParticlesArray;}
50 Bool_t KeepChargedParticles(Int_t pdg) const ;
51
52 void AddStatusArray(TArrayI & array)
53 { fStatusArray = new TArrayI(array) ; }
54 TArrayI * GetStatusArray() const {return fStatusArray;}
55
56 void SwitchOnStatusSelection() {fKeepAllStatus = kFALSE;}
57 void SwitchOffStatusSelection() {fKeepAllStatus = kTRUE;}
58 Bool_t KeepParticleWithStatus(Int_t status) const ;
59
60 void GetVertex(Double_t v[3]) const ;
61
6639984f 62 void FillInputEvent(Int_t iEntry) ;
1c5acb87 63 AliVEvent* GetInputEvent() const {return GetMC();}
64 void SetInputEvent(TObject* esd, TObject* aod, TObject* mc) ;
65
66 void SetCaloClusterPID(const Int_t pdgCode, AliAODCaloCluster *calo) const ;
67 void SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track) const ;
68
691bdd02 69 void SwitchOnOverlapCheck() {fCheckOverlap = kTRUE;}
70 void SwitchOffOverlapCheck() {fCheckOverlap = kFALSE;}
71
72 Float_t GetEMCALOverlapAngle() const {return fEMCALOverlapAngle ;}
73 Float_t GetPHOSOverlapAngle() const {return fPHOSOverlapAngle ;}
74 void SetEMCALOverlapAngle(Float_t angle) {fEMCALOverlapAngle = angle;}
75 void SetPHOSOverlapAngle(Float_t angle) {fPHOSOverlapAngle = angle;}
76
1c5acb87 77 private:
78
691bdd02 79 void CheckOverlap(const Float_t anglethres, const Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg);
1c5acb87 80 void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle);
691bdd02 81 void FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector momentum,
1c5acb87 82 Int_t &indexPHOS, Int_t &indexEMCAL) ;
83
84 private:
85 Bool_t fDecayPi0; //If not decayed, decay pi0 by hand
86 TArrayI * fNeutralParticlesArray ; //Do not keep neutral particles of this list in calorimeter.
87 TArrayI * fChargedParticlesArray ; //Keep charged particles of this list in calorimeter.
88 TArrayI * fStatusArray ; //Keep particles with status of the list.
89 Bool_t fKeepAllStatus ; //Do or do not select particles depending on their status code.
90 Int_t fClonesArrayType; //Analysis with TParticles or AliAODCaloCluster/Track?
691bdd02 91 Bool_t fCheckOverlap; //Check of overlapped photons from pi0 enter the calorimeter
92 Float_t fEMCALOverlapAngle; //Aperture angle of photons from decay that is not resolved by EMCAL, in radians
93 Float_t fPHOSOverlapAngle; //Aperture angle of photons from decay that is not resolved by PHOS, in radians
94 Int_t fIndex2ndPhoton; //Check overlap of first decay photon already done, internal use.
95
96 ClassDef(AliCaloTrackMCReader,2)
1c5acb87 97 } ;
98
99
100#endif //ALICALOTRACKMCREADER_H
101
102
103