Protection added in case no ESD files have been chained.
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliAnaPartCorrBaseClass.h
CommitLineData
1c5acb87 1#ifndef ALIANAPARTCORRBASECLASS_H
2#define ALIANAPARTCORRBASECLASS_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 analysis algorithms
9//-- Author: Gustavo Conesa (INFN-LNF)
10
fbeaf916 11#include <cstdlib>
12
1c5acb87 13//ROOT
14class TClonesArray ;
591cc579 15class TObjArray ;
a3aebfff 16#include <TList.h>
1c5acb87 17#include <TObject.h>
18
19//Analysis
20class AliAODCaloCluster;
21class AliAODCaloCells;
1c5acb87 22class AliCaloTrackReader ;
23class AliCaloPID ;
ff45398a 24class AliFiducialCut ;
1c5acb87 25class AliIsolationCut ;
6639984f 26class AliMCAnalysisUtils ;
1c5acb87 27class AliNeutralMesonSelection ;
28class AliStack ;
29class AliHeader ;
30class AliGenEventHeader ;
a3aebfff 31#include "AliAODPWG4ParticleCorrelation.h"
1c5acb87 32
33class AliAnaPartCorrBaseClass : public TObject {
34
35public:
36
477d6cee 37 AliAnaPartCorrBaseClass() ; // default ctor
38 AliAnaPartCorrBaseClass(const AliAnaPartCorrBaseClass & g) ; // cpy ctor
39 AliAnaPartCorrBaseClass & operator = (const AliAnaPartCorrBaseClass & g) ;//cpy assignment
40 virtual ~AliAnaPartCorrBaseClass() ; //virtual dtor
41
42// virtual void AddAODCaloCluster(AliAODCaloCluster calo) ;
a3aebfff 43 virtual void AddAODParticle(AliAODPWG4Particle part) ;
44
477d6cee 45// virtual void ConnectAODCaloClusters();
46 virtual void ConnectAODPHOSCells();
47 virtual void ConnectAODEMCALCells();
48 virtual void ConnectInputOutputAODBranches();
49
50 virtual TList * GetCreateOutputObjects() { return (new TList) ;}
51
a3aebfff 52 virtual void AddToHistogramsName(TString add) { fAddToHistogramsName = add; }
53 virtual TString GetAddedHistogramsStringToName() {return fAddToHistogramsName ;}
54
477d6cee 55 virtual void Init() {;}
56 virtual void InitParameters() ;
57
58 virtual void Print(const Option_t * ) const ;
59
60 virtual void MakeAnalysisFillAOD() {;}
61
62 virtual void MakeAnalysisFillHistograms() {;}
63
64 virtual Int_t GetDebug() const { return fDebug ; }
65 virtual void SetDebug(Int_t d) { fDebug = d ; }
66
67 virtual Int_t GetEventNumber() const ;
7cd4e982 68
477d6cee 69 virtual AliCaloTrackReader * GetReader() const {return fReader ; }
42dc8e7d 70 virtual void SetReader(AliCaloTrackReader * const reader) { fReader = reader ; }
477d6cee 71
a5cc4f03 72 virtual void Terminate(TList * /*outputList*/) {;}
73
477d6cee 74 //analysis AOD branch
75 virtual TClonesArray * GetCreateOutputAODBranch() ;
76 virtual TString GetInputAODName() const {return fInputAODName ; }
77 virtual void SetInputAODName(TString name) { fInputAODName = name; }
78 virtual TString GetOutputAODName() const {return fOutputAODName ; }
79 virtual void SetOutputAODName(TString name) { fNewAOD = kTRUE ; fOutputAODName = name; }
80 virtual Bool_t NewOutputAOD() const {return fNewAOD;}
81 virtual TString GetOutputAODClassName() const {return fOutputAODClassName;}
82 virtual void SetOutputAODClassName(TString name) {fOutputAODClassName = name; }
83
591cc579 84 virtual TString GetAODObjArrayName() const {return fAODObjArrayName;}
85 virtual void SetAODObjArrayName(TString name) {fAODObjArrayName = name; }
a3aebfff 86
477d6cee 87 virtual TClonesArray* GetInputAODBranch() const {return fInputAODBranch ;}
88 virtual TClonesArray* GetOutputAODBranch() const {return fOutputAODBranch ;}
42dc8e7d 89 virtual TClonesArray* GetAODBranch(TString aodBranchName) const ;
90
477d6cee 91// virtual TClonesArray* GetAODCaloClusters() const {return fAODCaloClusters ;}
92 virtual TClonesArray* GetAODCaloClusters() const ;
93 virtual TClonesArray* GetAODTracks() const ;
94 virtual AliAODCaloCells* GetAODCaloCells() const {return fAODCaloCells ;}
95
591cc579 96 virtual TObjArray* GetAODCTS() const ;
97 virtual TObjArray* GetAODEMCAL() const ;
98 virtual TObjArray* GetAODPHOS() const ;
477d6cee 99
100 virtual TString GetBaseParametersList();
101
102 virtual TNamed * GetEMCALCells() const ;
103 virtual TNamed * GetPHOSCells() const ;
104
105 virtual AliStack * GetMCStack() const ;
106 virtual AliHeader* GetMCHeader() const ;
107 virtual AliGenEventHeader* GetMCGenEventHeader() const ;
108
109 //Analysis helpers classes pointers setters and getters
110 virtual AliCaloPID * GetCaloPID() const {return fCaloPID ;}
42dc8e7d 111 virtual void SetCaloPID(AliCaloPID * const pid) { fCaloPID = pid ;}
477d6cee 112
ff45398a 113 virtual AliFiducialCut * GetFiducialCut() const {return fFidCut ;}
114 virtual void SetFiducialCut(AliFiducialCut * const fc) { fFidCut = fc ;}
477d6cee 115
116 virtual AliIsolationCut * GetIsolationCut() const {return fIC ;}
42dc8e7d 117 virtual void SetIsolationCut(AliIsolationCut * const ic) { fIC = ic ;}
477d6cee 118
119 virtual AliMCAnalysisUtils * GetMCAnalysisUtils() const {return fMCUtils ;}
42dc8e7d 120 virtual void SetMCAnalysisUtils(AliMCAnalysisUtils * const mcutils) { fMCUtils = mcutils ;}
477d6cee 121
122 virtual AliNeutralMesonSelection * GetNeutralMesonSelection() const {return fNMS ;}
42dc8e7d 123 virtual void SetNeutralMesonSelection(AliNeutralMesonSelection * const nms) { fNMS = nms ;}
477d6cee 124
125 virtual Bool_t IsDataMC() const {return fDataMC ; }
126 virtual void SwitchOnDataMC() {fDataMC = kTRUE ; }
127 virtual void SwitchOffDataMC() {fDataMC = kFALSE ; }
128
ff45398a 129 virtual Bool_t IsFiducialCutOn() const {return fCheckFidCut ; }
130 virtual void SwitchOnFiducialCut() { fCheckFidCut = kTRUE;}
131 virtual void SwitchOffFiducialCut() { fCheckFidCut = kFALSE;}
477d6cee 132
133 virtual Bool_t IsCaloPIDOn() const {return fCheckCaloPID ; }
134 virtual void SwitchOnCaloPID() { fCheckCaloPID = kTRUE;}
135 virtual void SwitchOffCaloPID() { fCheckCaloPID = kFALSE;}
136
137 virtual Bool_t IsCaloPIDRecalculationOn() const {return fRecalculateCaloPID ; }
138 virtual void SwitchOnCaloPIDRecalculation() { fRecalculateCaloPID = kTRUE;}
139 virtual void SwitchOffCaloPIDRecalculation() { fRecalculateCaloPID = kFALSE;}
140
141 virtual Float_t GetMaxPt() const {return fMaxPt ; }
142 virtual Float_t GetMinPt() const {return fMinPt ; }
143 virtual void SetMaxPt(Float_t pt) {fMaxPt = pt ; }
144 virtual void SetMinPt(Float_t pt) {fMinPt = pt ; }
145 void SetPtCutRange(Double_t ptmin, Double_t ptmax)
146 { fMaxPt=ptmax; fMinPt=ptmin;}
147
148 //Histogrammes setters and getters
149 virtual void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n) {
150 fHistoNPtBins = n ;
151 fHistoPtMax = max ;
152 fHistoPtMin = min ;
153 }
154
155 Int_t GetHistoNPtBins() const { return fHistoNPtBins ; }
156 Float_t GetHistoPtMin() const { return fHistoPtMin ; }
157 Float_t GetHistoPtMax() const { return fHistoPtMax ; }
158
159 virtual void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n) {
160 fHistoNPhiBins = n ;
161 fHistoPhiMax = max ;
162 fHistoPhiMin = min ;
163 }
164
165 Int_t GetHistoNPhiBins() const { return fHistoNPhiBins ; }
166 Float_t GetHistoPhiMin() const { return fHistoPhiMin ; }
167 Float_t GetHistoPhiMax() const { return fHistoPhiMax ; }
168
169 virtual void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n) {
170 fHistoNEtaBins = n ;
171 fHistoEtaMax = max ;
172 fHistoEtaMin = min ;
173 }
174
175 Int_t GetHistoNEtaBins() const { return fHistoNEtaBins ; }
176 Float_t GetHistoEtaMin() const { return fHistoEtaMin ; }
177 Float_t GetHistoEtaMax() const { return fHistoEtaMax ; }
a3aebfff 178
477d6cee 179 private:
180
181 Bool_t fDataMC ; // Flag to access MC data when using ESD or AOD
182 Int_t fDebug ; // Debug level
183 Bool_t fCheckFidCut ; // Do analysis for clusters in defined region
184 Bool_t fCheckCaloPID ; // Do analysis for calorimeters
185 Bool_t fRecalculateCaloPID ; // Recalculate PID or use PID weights in calorimeters
186 Float_t fMinPt ; // Maximum pt of (trigger) particles in the analysis
187 Float_t fMaxPt ; // Minimum pt of (trigger) particles in the analysis
591cc579 188
477d6cee 189 AliCaloTrackReader * fReader; // Acces to ESD/AOD/MC data
190
191 TClonesArray* fInputAODBranch ; //! Selected input particles branch
192 TString fInputAODName ; // Name of input AOD branch;
193 TClonesArray* fOutputAODBranch ; //! Selected output particles branch
194 Bool_t fNewAOD ; // Flag, new aod branch added to the analysis or not.
195 TString fOutputAODName ; // Name of output AOD branch;
196 TString fOutputAODClassName; // Type of aod objects to be stored in the TClonesArray (AliAODPWG4Particle, AliAODPWG4ParticleCorrelation ...)
591cc579 197 TString fAODObjArrayName ; // Name of ref array kept in a TList in AliAODParticleCorrelation with clusters or track references.
a3aebfff 198 TString fAddToHistogramsName;// Add this string to histograms name
477d6cee 199
200 //TClonesArray* fAODCaloClusters ; //! selected PHOS/EMCAL CaloClusters
201 AliAODCaloCells * fAODCaloCells ; //! selected PHOS/EMCAL CaloCells
202
203 //Analysis helper classes access pointers
204 AliCaloPID * fCaloPID; // PID calculation
ff45398a 205 AliFiducialCut * fFidCut; // Acceptance cuts
477d6cee 206 AliIsolationCut * fIC; // Isolation cut
207 AliMCAnalysisUtils * fMCUtils; // MonteCarlo Analysis utils
208 AliNeutralMesonSelection * fNMS; // Neutral Meson Selection
209
210 //Histograms binning and range
211 Int_t fHistoNPtBins ; // Number of bins in pt axis
212 Float_t fHistoPtMax ; // Maximum value of pt histogram range
213 Float_t fHistoPtMin ; // Minimum value of pt histogram range
214 Int_t fHistoNPhiBins ; // Number of bins in phi axis
215 Float_t fHistoPhiMax ; // Maximum value of phi histogram range
216 Float_t fHistoPhiMin ; // Minimum value of phi histogram range
217 Int_t fHistoNEtaBins ; // Number of bins in eta axis
218 Float_t fHistoEtaMax ; // Maximum value of eta histogram range
219 Float_t fHistoEtaMin ; // Minimum value of eta histogram range
220
7cd4e982 221 ClassDef(AliAnaPartCorrBaseClass,5)
477d6cee 222 } ;
1c5acb87 223
224
225#endif //ALIANAPARTCORRBASECLASS_H
226
227
228