Fix compilation warnings
[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
c8fe2783 7 //_________________________________________________________________________
8 // Base class for analysis algorithms
9 //-- Author: Gustavo Conesa (INFN-LNF)
5025c139 10//-Add the possibality for event selection analysis based on vertex and multiplicity bins (Yaxian Mao, 10/10/2010)
fbeaf916 11#include <cstdlib>
12
c8fe2783 13 //ROOT
1c5acb87 14class TClonesArray ;
591cc579 15class TObjArray ;
a3aebfff 16#include <TList.h>
1c5acb87 17#include <TObject.h>
0c1383b5 18class TObjString;
1c5acb87 19
c8fe2783 20 //Analysis
f37fa8d2 21class AliVCaloCells;
e6e63685 22#include "AliCaloTrackReader.h"
decca433 23#include "AliCaloPID.h"
24#include "AliFiducialCut.h"
25#include "AliIsolationCut.h"
26#include "AliMCAnalysisUtils.h"
27#include "AliNeutralMesonSelection.h"
8cfc6870 28#include "AliCalorimeterUtils.h"
1c5acb87 29class AliStack ;
30class AliHeader ;
31class AliGenEventHeader ;
a3aebfff 32#include "AliAODPWG4ParticleCorrelation.h"
765d44e7 33class AliEMCALGeoUtils;
34class AliPHOSGeoUtils;
c8fe2783 35#include "AliMixedEvent.h"
1c5acb87 36
37class AliAnaPartCorrBaseClass : public TObject {
38
c8fe2783 39public:
477d6cee 40 AliAnaPartCorrBaseClass() ; // default ctor
78219bac 41 virtual ~AliAnaPartCorrBaseClass() ; //virtual dtor
42
c8fe2783 43private:
477d6cee 44 AliAnaPartCorrBaseClass(const AliAnaPartCorrBaseClass & g) ; // cpy ctor
45 AliAnaPartCorrBaseClass & operator = (const AliAnaPartCorrBaseClass & g) ;//cpy assignment
477d6cee 46
c8fe2783 47public:
f37fa8d2 48
a3aebfff 49 virtual void AddAODParticle(AliAODPWG4Particle part) ;
50
477d6cee 51 virtual void ConnectInputOutputAODBranches();
52
4a745797 53 virtual TList * GetCreateOutputObjects() { return (new TList) ;}
4a745797 54
a3aebfff 55 virtual void AddToHistogramsName(TString add) { fAddToHistogramsName = add; }
56 virtual TString GetAddedHistogramsStringToName() {return fAddToHistogramsName ;}
57
477d6cee 58 virtual void Init() {;}
59 virtual void InitParameters() ;
60
61 virtual void Print(const Option_t * ) const ;
62
63 virtual void MakeAnalysisFillAOD() {;}
64
65 virtual void MakeAnalysisFillHistograms() {;}
f37fa8d2 66
0c1383b5 67 virtual TObjString * GetAnalysisCuts() {return 0x0;}
68
477d6cee 69 virtual Int_t GetDebug() const { return fDebug ; }
70 virtual void SetDebug(Int_t d) { fDebug = d ; }
71
72 virtual Int_t GetEventNumber() const ;
c8fe2783 73
477d6cee 74 virtual AliCaloTrackReader * GetReader() const {return fReader ; }
42dc8e7d 75 virtual void SetReader(AliCaloTrackReader * const reader) { fReader = reader ; }
798a9b04 76
f37fa8d2 77 //Calorimeter helper class access methods
765d44e7 78 AliEMCALGeoUtils * GetEMCALGeometry() const { return fCaloUtils->GetEMCALGeometry(); }
79 AliPHOSGeoUtils * GetPHOSGeometry() const { return fCaloUtils->GetPHOSGeometry() ; }
c8fe2783 80
e6e63685 81 Int_t GetModuleNumberCellIndexes(const Int_t absId, const TString calo, Int_t & icol, Int_t & irow, Int_t &iRCU) const {
765d44e7 82 return fCaloUtils->GetModuleNumberCellIndexes(absId, calo, icol, irow,iRCU);}
b05a14a3 83 Int_t GetModuleNumber(AliAODPWG4Particle * part) const {
765d44e7 84 return fCaloUtils->GetModuleNumber(part, fReader->GetInputEvent());}
c8fe2783 85 Int_t GetModuleNumber(AliVCluster * cluster) const {
765d44e7 86 return fCaloUtils->GetModuleNumber(cluster);}
f37fa8d2 87
a5cc4f03 88 virtual void Terminate(TList * /*outputList*/) {;}
89
f37fa8d2 90 //analysis AOD branch
477d6cee 91 virtual TClonesArray * GetCreateOutputAODBranch() ;
92 virtual TString GetInputAODName() const {return fInputAODName ; }
93 virtual void SetInputAODName(TString name) { fInputAODName = name; }
94 virtual TString GetOutputAODName() const {return fOutputAODName ; }
95 virtual void SetOutputAODName(TString name) { fNewAOD = kTRUE ; fOutputAODName = name; }
96 virtual Bool_t NewOutputAOD() const {return fNewAOD;}
97 virtual TString GetOutputAODClassName() const {return fOutputAODClassName;}
98 virtual void SetOutputAODClassName(TString name) {fOutputAODClassName = name; }
765d44e7 99 virtual AliCalorimeterUtils * GetCaloUtils() const {return fCaloUtils ; }
100 void SetCaloUtils(AliCalorimeterUtils * caloutils) { fCaloUtils = caloutils ; }
101
591cc579 102 virtual TString GetAODObjArrayName() const {return fAODObjArrayName;}
103 virtual void SetAODObjArrayName(TString name) {fAODObjArrayName = name; }
c8fe2783 104
477d6cee 105 virtual TClonesArray* GetInputAODBranch() const {return fInputAODBranch ;}
1e86c71e 106 virtual TClonesArray* GetOutputAODBranch() const {if(fNewAOD) return fOutputAODBranch; else return fInputAODBranch ;}
42dc8e7d 107 virtual TClonesArray* GetAODBranch(TString aodBranchName) const ;
108
477d6cee 109 virtual TClonesArray* GetAODCaloClusters() const ;
110 virtual TClonesArray* GetAODTracks() const ;
f37fa8d2 111 virtual AliVCaloCells* GetPHOSCells() const {return fReader->GetPHOSCells() ;}
112 virtual AliVCaloCells* GetEMCALCells() const {return fReader->GetEMCALCells() ;}
113
591cc579 114 virtual TObjArray* GetAODCTS() const ;
115 virtual TObjArray* GetAODEMCAL() const ;
116 virtual TObjArray* GetAODPHOS() const ;
477d6cee 117
118 virtual TString GetBaseParametersList();
f37fa8d2 119
477d6cee 120 virtual AliStack * GetMCStack() const ;
121 virtual AliHeader* GetMCHeader() const ;
122 virtual AliGenEventHeader* GetMCGenEventHeader() const ;
123
f37fa8d2 124 //Analysis helpers classes pointers setters and getters
decca433 125 virtual AliCaloPID * GetCaloPID() {if(!fCaloPID) fCaloPID = new AliCaloPID(); return fCaloPID ;}
42dc8e7d 126 virtual void SetCaloPID(AliCaloPID * const pid) { fCaloPID = pid ;}
477d6cee 127
2ebb9054 128 virtual AliFiducialCut * GetFiducialCut() {if(!fFidCut) fFidCut = new AliFiducialCut(); return fFidCut ;}
ff45398a 129 virtual void SetFiducialCut(AliFiducialCut * const fc) { fFidCut = fc ;}
477d6cee 130
decca433 131 virtual AliIsolationCut * GetIsolationCut() {if(!fIC) fIC = new AliIsolationCut(); return fIC ;}
42dc8e7d 132 virtual void SetIsolationCut(AliIsolationCut * const ic) { fIC = ic ;}
477d6cee 133
decca433 134 virtual AliMCAnalysisUtils * GetMCAnalysisUtils() {if(!fMCUtils) fMCUtils = new AliMCAnalysisUtils(); return fMCUtils ;}
42dc8e7d 135 virtual void SetMCAnalysisUtils(AliMCAnalysisUtils * const mcutils) { fMCUtils = mcutils ;}
477d6cee 136
decca433 137 virtual AliNeutralMesonSelection * GetNeutralMesonSelection() {if(!fNMS) fNMS = new AliNeutralMesonSelection(); return fNMS ;}
42dc8e7d 138 virtual void SetNeutralMesonSelection(AliNeutralMesonSelection * const nms) { fNMS = nms ;}
765d44e7 139
1e274f1c 140 virtual Bool_t IsDataMC() {return fDataMC ; }
141 virtual void SwitchOnDataMC() {fDataMC = kTRUE ; if(!fMCUtils)fMCUtils = new AliMCAnalysisUtils();}
decca433 142 virtual void SwitchOffDataMC() {fDataMC = kFALSE ; }
c8fe2783 143
1e274f1c 144 virtual Bool_t IsFiducialCutOn() { return fCheckFidCut ; }
145 virtual void SwitchOnFiducialCut() { fCheckFidCut = kTRUE; if(!fFidCut)fFidCut = new AliFiducialCut();}
decca433 146 virtual void SwitchOffFiducialCut() { fCheckFidCut = kFALSE;}
477d6cee 147
1e274f1c 148 virtual Bool_t IsCaloPIDOn() { return fCheckCaloPID ; }
149 virtual void SwitchOnCaloPID() { fCheckCaloPID = kTRUE; if(!fCaloPID)fCaloPID = new AliCaloPID();}
decca433 150 virtual void SwitchOffCaloPID() { fCheckCaloPID = kFALSE;}
477d6cee 151
1e274f1c 152 virtual Bool_t IsCaloPIDRecalculationOn() { return fRecalculateCaloPID ; }
decca433 153 virtual void SwitchOnCaloPIDRecalculation() { fRecalculateCaloPID = kTRUE;}
154 virtual void SwitchOffCaloPIDRecalculation() { fRecalculateCaloPID = kFALSE;}
477d6cee 155
156 virtual Float_t GetMaxPt() const {return fMaxPt ; }
157 virtual Float_t GetMinPt() const {return fMinPt ; }
decca433 158 virtual void SetMaxPt(Float_t pt) {fMaxPt = pt ; }
159 virtual void SetMinPt(Float_t pt) {fMinPt = pt ; }
765d44e7 160 virtual void SetPtCutRange(Double_t ptmin, Double_t ptmax)
477d6cee 161 { fMaxPt=ptmax; fMinPt=ptmin;}
5025c139 162 //Setters for parameters of event buffers
163 virtual void SetMultiBin(Int_t n=1) {fMultiBin=n ;} //number of bins in Multiplicity
164 virtual void SetNZvertBin(Int_t n=1) {fNZvertBin=n ;} //number of bins for vertex position
165 virtual void SetNRPBin(Int_t n=1) {fNrpBin=n ;} //number of bins in reaction plain
166 virtual void SetZvertexCut(Float_t zcut=40.){fZvtxCut=zcut ;} //cut on vertex position
167 virtual void SetMultiplicity(Int_t multimin, Int_t multimax) {fMinMulti = multimin ; fMaxMulti = multimax ; }
168 virtual void SwitchOnEventSelection() {fUseSelectEvent = kTRUE ; }
169 virtual void SwitchOffEventSelection() {fUseSelectEvent = kFALSE ; }
170 //Getters for event selection
171 virtual Int_t GetMultiBin() const {return fMultiBin ;} //number of bins in Multiplicity
172 virtual Int_t GetNZvertBin() const {return fNZvertBin ;} //number of bins in vertex
173 virtual Int_t GetNRPBin() const {return fNrpBin ;} //number of bins in reaction plain
174 //Getters for event selection
175 virtual Float_t GetZvertexCut() const {return fZvtxCut ;} //cut on vertex position
176 virtual Int_t GetMaxMulti() const {return fMaxMulti ; }
177 virtual Int_t GetMinMulti() const {return fMinMulti ; }
178
179 // Do correlation analysis with different event buffers
180 virtual Bool_t DoEventSelect() const {return fUseSelectEvent ; }
477d6cee 181
f37fa8d2 182 //Histogrammes setters and getters
183 //Pt, Energy
477d6cee 184 virtual void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n) {
5a2dbc3c 185 fHistoPtBins = n ;
477d6cee 186 fHistoPtMax = max ;
187 fHistoPtMin = min ;
188 }
189
765d44e7 190 virtual Int_t GetHistoPtBins() const { return fHistoPtBins; }
191 virtual Float_t GetHistoPtMin() const { return fHistoPtMin ; }
192 virtual Float_t GetHistoPtMax() const { return fHistoPtMax ; }
477d6cee 193
c8fe2783 194 //Azimuthal angle
477d6cee 195 virtual void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n) {
5a2dbc3c 196 fHistoPhiBins = n ;
197 fHistoPhiMax = max ;
198 fHistoPhiMin = min ;
477d6cee 199 }
200
765d44e7 201 virtual Int_t GetHistoPhiBins() const { return fHistoPhiBins; }
202 virtual Float_t GetHistoPhiMin() const { return fHistoPhiMin ; }
203 virtual Float_t GetHistoPhiMax() const { return fHistoPhiMax ; }
477d6cee 204
f37fa8d2 205 //Pseudorapidity-rapidity
477d6cee 206 virtual void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n) {
5a2dbc3c 207 fHistoEtaBins = n ;
208 fHistoEtaMax = max ;
209 fHistoEtaMin = min ;
477d6cee 210 }
211
765d44e7 212 virtual Int_t GetHistoEtaBins() const { return fHistoEtaBins; }
213 virtual Float_t GetHistoEtaMin() const { return fHistoEtaMin ; }
214 virtual Float_t GetHistoEtaMax() const { return fHistoEtaMax ; }
5a2dbc3c 215
f37fa8d2 216 //Mass
5a2dbc3c 217 virtual void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n) {
c8fe2783 218 fHistoMassBins = n ;
219 fHistoMassMax = max ;
220 fHistoMassMin = min ;
5a2dbc3c 221 }
222
765d44e7 223 virtual Int_t GetHistoMassBins() const { return fHistoMassBins ; }
224 virtual Float_t GetHistoMassMin() const { return fHistoMassMin ; }
225 virtual Float_t GetHistoMassMax() const { return fHistoMassMax ; }
5a2dbc3c 226
f37fa8d2 227 //Asymetry
5a2dbc3c 228 virtual void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n) {
c8fe2783 229 fHistoAsymBins = n ;
230 fHistoAsymMax = max ;
231 fHistoAsymMin = min ;
5a2dbc3c 232 }
233
765d44e7 234 virtual Int_t GetHistoAsymmetryBins() const { return fHistoAsymBins ; }
235 virtual Float_t GetHistoAsymmetryMin() const { return fHistoAsymMin ; }
236 virtual Float_t GetHistoAsymmetryMax() const { return fHistoAsymMax ; }
c8fe2783 237
798a9b04 238
239 //VZero
240 virtual void SetHistoV0SignalRangeAndNBins(Int_t min, Int_t max, Int_t n) {
241 fHistoV0SBins = n ;
242 fHistoV0SMax = max ;
243 fHistoV0SMin = min ;
244 }
245
246 virtual Int_t GetHistoV0SignalBins() const { return fHistoV0SBins ; }
247 virtual Float_t GetHistoV0SignalMin() const { return fHistoV0SMin ; }
248 virtual Float_t GetHistoV0SignalMax() const { return fHistoV0SMax ; }
249
250 virtual void SetHistoV0MultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n) {
251 fHistoV0MBins = n ;
252 fHistoV0MMax = max ;
253 fHistoV0MMin = min ;
254 }
255
256 virtual Int_t GetHistoV0MultiplicityBins() const { return fHistoV0MBins ; }
257 virtual Float_t GetHistoV0MultiplicityMin() const { return fHistoV0MMin ; }
258 virtual Float_t GetHistoV0MultiplicityMax() const { return fHistoV0MMax ; }
259
260 virtual void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n) {
261 fHistoTrMBins = n ;
262 fHistoTrMMax = max ;
263 fHistoTrMMin = min ;
264 }
265
266 virtual Int_t GetHistoTrackMultiplicityBins() const { return fHistoTrMBins ; }
267 virtual Float_t GetHistoTrackMultiplicityMin() const { return fHistoTrMMin ; }
268 virtual Float_t GetHistoTrackMultiplicityMax() const { return fHistoTrMMax ; }
269
270
f8006433 271 virtual AliMixedEvent * GetMixedEvent() { return GetReader()->GetMixedEvent() ; }
272 virtual Int_t GetNMixedEvent() const { return GetReader()->GetNMixedEvent() ; }
273
274 virtual void GetVertex(Double_t vertex[3]) const { GetReader()->GetVertex(vertex) ; }
275 virtual void GetVertex(Double_t vertex[3],const Int_t evtIndex) const { GetReader()->GetVertex(vertex,evtIndex) ; }
276 virtual Double_t* GetVertex(const Int_t evtIndex) const { return GetReader()->GetVertex(evtIndex) ; }
c8fe2783 277
f2ccb5b8 278 virtual Bool_t IsTrackMatched(const AliVCluster * cluster) const { return fCaloPID->IsTrackMatched(cluster, fCaloUtils); }
f37fa8d2 279
d7c10d78 280 void SwitchOnPlotsMaking() {fMakePlots = kTRUE ;}
281 void SwitchOffPlotsMaking() {fMakePlots = kFALSE ;}
282 Bool_t MakePlotsOn() const {return fMakePlots;}
283
798a9b04 284 //MULTIPLICITY
285 Int_t GetTrackMultiplicity() const {return fReader->GetTrackMultiplicity();}
286 //VZERO
287 Int_t GetV0Signal(Int_t i ) const {return fReader->GetV0Signal(i);}
288 Int_t GetV0Multiplicity(Int_t i ) const {return fReader->GetV0Multiplicity(i);}
289
c8fe2783 290private:
477d6cee 291
798a9b04 292 Bool_t fDataMC ; // Flag to access MC data when using ESD or AOD
293 Int_t fDebug ; // Debug level
294 Bool_t fCheckFidCut ; // Do analysis for clusters in defined region
295 Bool_t fCheckCaloPID ; // Do analysis for calorimeters
296 Bool_t fRecalculateCaloPID ; // Recalculate PID or use PID weights in calorimeters
297 Float_t fMinPt ; // Maximum pt of (trigger) particles in the analysis
298 Float_t fMaxPt ; // Minimum pt of (trigger) particles in the analysis
299 Int_t fMultiBin ; // Number of bins in event container for multiplicity
300 Int_t fNZvertBin ; // Number of bins in event container for vertex position
301 Int_t fNrpBin ; // Number of bins in event container for reaction plain
302 Float_t fZvtxCut ; // Cut on vertex position
303 Int_t fMaxMulti ; // Maximum multiplicity of particles in the analysis
304 Int_t fMinMulti ; // Maximum multiplicity of particles in the analysis
305 Bool_t fUseSelectEvent ; // Select events based on multiplicity and vertex cuts
306 Bool_t fMakePlots ; // Print plots
d7c10d78 307
591cc579 308
39ffdc47 309 AliCaloTrackReader * fReader; // Acces to ESD/AOD/MC data
477d6cee 310
311 TClonesArray* fInputAODBranch ; //! Selected input particles branch
312 TString fInputAODName ; // Name of input AOD branch;
313 TClonesArray* fOutputAODBranch ; //! Selected output particles branch
314 Bool_t fNewAOD ; // Flag, new aod branch added to the analysis or not.
315 TString fOutputAODName ; // Name of output AOD branch;
316 TString fOutputAODClassName; // Type of aod objects to be stored in the TClonesArray (AliAODPWG4Particle, AliAODPWG4ParticleCorrelation ...)
591cc579 317 TString fAODObjArrayName ; // Name of ref array kept in a TList in AliAODParticleCorrelation with clusters or track references.
a3aebfff 318 TString fAddToHistogramsName;// Add this string to histograms name
477d6cee 319
f37fa8d2 320 //Analysis helper classes access pointers
614701c6 321 AliCaloPID * fCaloPID; //! PID calculation
322 AliFiducialCut * fFidCut; //! Acceptance cuts
323 AliIsolationCut * fIC; //! Isolation cut
324 AliMCAnalysisUtils * fMCUtils; //! MonteCarlo Analysis utils
325 AliNeutralMesonSelection * fNMS; //! Neutral Meson Selection
765d44e7 326 AliCalorimeterUtils * fCaloUtils ; // Pointer to CalorimeterUtils
f37fa8d2 327
328 //Histograms binning and range
5a2dbc3c 329 Int_t fHistoPtBins ; // Number of bins in pt axis
330 Float_t fHistoPtMax ; // Maximum value of pt histogram range
331 Float_t fHistoPtMin ; // Minimum value of pt histogram range
332 Int_t fHistoPhiBins ; // Number of bins in phi axis
333 Float_t fHistoPhiMax ; // Maximum value of phi histogram range
334 Float_t fHistoPhiMin ; // Minimum value of phi histogram range
335 Int_t fHistoEtaBins ; // Number of bins in eta axis
336 Float_t fHistoEtaMax ; // Maximum value of eta histogram range
337 Float_t fHistoEtaMin ; // Minimum value of eta histogram range
338 Int_t fHistoMassBins ; // Number of bins in mass axis
339 Float_t fHistoMassMax ; // Maximum value of mass histogram range
340 Float_t fHistoMassMin ; // Minimum value of mass histogram range
341 Int_t fHistoAsymBins ; // Number of bins in asymmetry axis
342 Float_t fHistoAsymMax ; // Maximum value of asymmetry histogram range
343 Float_t fHistoAsymMin ; // Minimum value of asymmetry histogram range
798a9b04 344 Int_t fHistoV0SBins ; // Number of bins in V0 signal axis
345 Int_t fHistoV0SMax ; // Maximum value of V0 signal histogram range
346 Int_t fHistoV0SMin ; // Minimum value of V0 signal histogram range
347 Int_t fHistoV0MBins ; // Number of bins in V0 multiplicity axis
348 Int_t fHistoV0MMax ; // Maximum value of V0 multiplicity histogram range
349 Int_t fHistoV0MMin ; // Minimum value of V0 multiplicity histogram range
350 Int_t fHistoTrMBins ; // Number of bins in V0 multiplicity axis
351 Int_t fHistoTrMMax ; // Maximum value of track multiplicity histogram range
352 Int_t fHistoTrMMin ; // Minimum value of track multiplicity histogram range
353
354 ClassDef(AliAnaPartCorrBaseClass,13)
c8fe2783 355} ;
1c5acb87 356
357
358#endif //ALIANAPARTCORRBASECLASS_H
359
360
361