1)Terminate() method implemented in the frame. Simple examples on what to do with...
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliCaloTrackReader.h
CommitLineData
1c5acb87 1#ifndef ALICALOTRACKREADER_H
2#define ALICALOTRACKREADER_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// Base class for reading data: MonteCarlo, ESD or AOD, of PHOS EMCAL and
9// Central Barrel Tracking detectors.
10// Not all MC particles/tracks/clusters are kept, some kinematical restrictions are done.
11// Mother class of : AliCaloTrackESDReader: Fills ESD data in 3 TClonesArrays (PHOS, EMCAL, CTS)
12// : AliCaloTrackMCReader: Fills Kinematics data in 3 TClonesArrays (PHOS, EMCAL, CTS)
13// : AliCaloTrackAODReader: Fills AOD data in 3 TClonesArrays (PHOS, EMCAL, CTS)
14//
15// -- Author: Gustavo Conesa (INFN-LNF)
16
17// --- ROOT system ---
18#include "TObject.h"
19class TClonesArray ;
20class TLorentzVector ;
21class TString ;
22#include "TArrayF.h"
23
24//--- ANALYSIS system ---
25class AliStack ;
26class AliHeader ;
27class AliGenEventHeader ;
28#include "AliESDEvent.h"
29#include "AliAODEvent.h"
30#include "AliMCEvent.h"
31class AliLog ;
32#include "AliFidutialCut.h"
33
34class AliCaloTrackReader : public TObject {
35
36public:
37
38 AliCaloTrackReader() ; // ctor
39 AliCaloTrackReader(const AliCaloTrackReader & g) ; // cpy ctor
40 AliCaloTrackReader & operator = (const AliCaloTrackReader & g) ;//cpy assignment
41 virtual ~AliCaloTrackReader() ;//virtual dtor
42
43 enum inputDataType {kESD, kAOD, kMC};
44
45 virtual void InitParameters();
46 virtual void Print(const Option_t * opt) const;
47
48 virtual Int_t GetDebug() const { return fDebug ; }
49 virtual void SetDebug(Int_t d) { fDebug = d ; }
50 virtual Int_t GetDataType() const { return fDataType ; }
51 virtual void SetDataType(Int_t data ) { fDataType = data ; }
52
6639984f 53 virtual Int_t GetEventNumber() const {return fEventNumber ; }
1c5acb87 54
55 //Minimum pt setters and getters
56 virtual Float_t GetEMCALPtMin() const { return fEMCALPtMin ; }
57 virtual Float_t GetPHOSPtMin() const { return fPHOSPtMin ; }
58 virtual Float_t GetCTSPtMin() const { return fCTSPtMin ; }
59
60 virtual void SetEMCALPtMin(Float_t pt) { fEMCALPtMin = pt ; }
61 virtual void SetPHOSPtMin(Float_t pt) { fPHOSPtMin = pt ; }
62 virtual void SetCTSPtMin(Float_t pt) { fCTSPtMin = pt ; }
63
64 //Input setters and getters
65
66 Bool_t IsCTSSwitchedOn() const { return fFillCTS ; }
67 void SwitchOnCTS() {fFillCTS = kTRUE ; }
68 void SwitchOffCTS() {fFillCTS = kFALSE ; }
69
70 Bool_t IsEMCALSwitchedOn() const { return fFillEMCAL ; }
71 void SwitchOnEMCAL() {fFillEMCAL = kTRUE ; }
72 void SwitchOffEMCAL() {fFillEMCAL = kFALSE ; }
73
74 Bool_t IsPHOSSwitchedOn() const { return fFillPHOS ; }
75 void SwitchOnPHOS() {fFillPHOS = kTRUE ; }
76 void SwitchOffPHOS() {fFillPHOS = kFALSE ; }
77
78 Bool_t IsEMCALCellsSwitchedOn() const { return fFillEMCALCells ; }
79 void SwitchOnEMCALCells() {fFillEMCALCells = kTRUE ; }
80 void SwitchOffEMCALCells() {fFillEMCALCells = kFALSE ; }
81
82 Bool_t IsPHOSCellsSwitchedOn() const { return fFillPHOSCells ; }
83 void SwitchOnPHOSCells() {fFillPHOSCells = kTRUE ; }
84 void SwitchOffPHOSCells() {fFillPHOSCells = kFALSE ; }
85
6639984f 86 virtual void FillInputEvent(Int_t iEntry) ;
1c5acb87 87 virtual void FillInputCTS() {;}
88 virtual void FillInputEMCAL() {;}
89 virtual void FillInputPHOS() {;}
90 virtual void FillInputEMCALCells() {;}
91 virtual void FillInputPHOSCells() {;}
92
93 virtual TClonesArray* GetAODCTS() const {return fAODCTS ;}
94 virtual TClonesArray* GetAODEMCAL() const {return fAODEMCAL ;}
95 virtual TClonesArray* GetAODPHOS() const {return fAODPHOS ;}
96 virtual TNamed* GetEMCALCells() const {return fEMCALCells ;}
97 virtual TNamed* GetPHOSCells() const {return fPHOSCells ;}
98
99 virtual AliStack* GetStack() const ;
100 virtual AliHeader* GetHeader() const ;
101 virtual AliGenEventHeader* GetGenEventHeader() const ;
102 virtual AliESDEvent* GetESD() const {return fESD;}
103 virtual AliAODEvent* GetAOD() const {return fAOD;}
104 virtual AliMCEvent* GetMC() const {return fMC;}
105 virtual AliVEvent* GetInputEvent() const {return (new AliESDEvent());}
106 virtual void GetVertex(Double_t * ) const {;}
107
108 virtual void SetESD( AliESDEvent* esd) {fESD = esd;}
109 virtual void SetAOD(AliAODEvent* aod) {fAOD = aod;}
110 virtual void SetMC(AliMCEvent* mc) {fMC = mc;}
111
112 virtual void ResetLists();
113
114 virtual AliFidutialCut * GetFidutialCut() const {return fFidutialCut ;}
115 virtual void SetFidutialCut(AliFidutialCut * fc) { fFidutialCut = fc ;}
116
117 virtual void SetInputEvent(TObject* /*esd*/, TObject* /*aod*/, TObject* /*mc*/) {;}
118
119 protected:
6639984f 120 Int_t fEventNumber; // Event number
1c5acb87 121 Int_t fDataType ; // Select MC:Kinematics, Data:ESD/AOD, MCData:Both
122 Int_t fDebug; // Debugging level
123 AliFidutialCut * fFidutialCut; // Acceptance cuts
6639984f 124
1c5acb87 125 Float_t fCTSPtMin; // pT Threshold on charged particles
126 Float_t fEMCALPtMin; // pT Threshold on emcal clusters
127 Float_t fPHOSPtMin; // pT Threshold on phos clusters
128
129 TClonesArray * fAODCTS ; //! temporal array with tracks
130 TClonesArray * fAODEMCAL ; //! temporal array with EMCAL CaloClusters
131 TClonesArray * fAODPHOS ; //! temporal array with PHOS CaloClusters
132 TNamed * fEMCALCells ; //! temporal array with EMCAL CaloCells, ESD or AOD
133 TNamed * fPHOSCells ; //! temporal array with PHOS CaloCells, ESD or AOD
134
135 AliESDEvent * fESD; //! pointer to esd
136 AliAODEvent * fAOD; //! pointer to aod
137 AliMCEvent * fMC; //! Monte Carlo Event Handler
138
139 Bool_t fFillCTS; // use data from CTS
140 Bool_t fFillEMCAL; // use data from EMCAL
141 Bool_t fFillPHOS; // use data from PHOS
142 Bool_t fFillEMCALCells; // use data from EMCAL
143 Bool_t fFillPHOSCells; // use data from PHOS
144
145 ClassDef(AliCaloTrackReader,1)
146} ;
147
148
149#endif //ALICALOTRACKREADER_H
150
151
152