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