1)Terminate() method implemented in the frame. Simple examples on what to do with...
[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
69 private:
70
71 void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle);
72 void FillCalorimeters(const Int_t iParticle, TParticle* particle, TLorentzVector momentum,
73 Int_t &indexPHOS, Int_t &indexEMCAL) ;
74
75 private:
76 Bool_t fDecayPi0; //If not decayed, decay pi0 by hand
77 TArrayI * fNeutralParticlesArray ; //Do not keep neutral particles of this list in calorimeter.
78 TArrayI * fChargedParticlesArray ; //Keep charged particles of this list in calorimeter.
79 TArrayI * fStatusArray ; //Keep particles with status of the list.
80 Bool_t fKeepAllStatus ; //Do or do not select particles depending on their status code.
81 Int_t fClonesArrayType; //Analysis with TParticles or AliAODCaloCluster/Track?
82
83 ClassDef(AliCaloTrackMCReader,1)
84 } ;
85
86
87#endif //ALICALOTRACKMCREADER_H
88
89
90