]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/AliCaloTrackMCReader.h
Correcting the expected string to VZERO, it was V0, for accessing survey objects...
[u/mrichter/AliRoot.git] / PWG4 / AliCaloTrackMCReader.h
CommitLineData
d92b41ad 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
d92b41ad 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]);
61
2cc4014d 62 void FillInputEvent();
d92b41ad 63 void SetInputEvent(TObject* esd, TObject* aod, TObject* mc);
64
65 void SetCaloClusterPID(const Int_t pdgCode, AliAODCaloCluster *calo);
66 void SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track);
67
68 private:
69
70 void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2);//, Double_t &angle);
2cc4014d 71 void FillCalorimeters(const Int_t iParticle, TParticle* particle, TLorentzVector momentum,
d92b41ad 72 Int_t &indexPHOS, Int_t &indexEMCAL);
73
74 private:
75 Bool_t fDecayPi0; //If not decayed, decay pi0 by hand
76 TArrayI * fNeutralParticlesArray ; //Do not keep neutral particles of this list in calorimeter.
77 TArrayI * fChargedParticlesArray ; //Keep charged particles of this list in calorimeter.
78 TArrayI * fStatusArray ; //Keep particles with status of the list.
79 Bool_t fKeepAllStatus ; //Do or do not select particles depending on their status code.
80 Int_t fClonesArrayType; //Analysis with TParticles or AliAODCaloCluster/Track?
81
82 ClassDef(AliCaloTrackMCReader,1)
83 } ;
84
85
86#endif //AliCaloMCTrackReader_H
87
88
89