correct the increment of the cycle during reconstruction
[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
e6e63685 20class AliESDCaloCluster;
1c5acb87 21class AliAODCaloCluster;
22class AliAODCaloCells;
e6e63685 23#include "AliCaloTrackReader.h"
24#include "AliCaloTrackESDReader.h"
25#include "AliCaloTrackAODReader.h"
1c5acb87 26class AliCaloPID ;
ff45398a 27class AliFiducialCut ;
1c5acb87 28class AliIsolationCut ;
6639984f 29class AliMCAnalysisUtils ;
1c5acb87 30class AliNeutralMesonSelection ;
31class AliStack ;
32class AliHeader ;
33class AliGenEventHeader ;
a3aebfff 34#include "AliAODPWG4ParticleCorrelation.h"
1c5acb87 35
36class AliAnaPartCorrBaseClass : public TObject {
37
38public:
39
477d6cee 40 AliAnaPartCorrBaseClass() ; // default ctor
41 AliAnaPartCorrBaseClass(const AliAnaPartCorrBaseClass & g) ; // cpy ctor
42 AliAnaPartCorrBaseClass & operator = (const AliAnaPartCorrBaseClass & g) ;//cpy assignment
43 virtual ~AliAnaPartCorrBaseClass() ; //virtual dtor
44
45// virtual void AddAODCaloCluster(AliAODCaloCluster calo) ;
a3aebfff 46 virtual void AddAODParticle(AliAODPWG4Particle part) ;
47
477d6cee 48// virtual void ConnectAODCaloClusters();
49 virtual void ConnectAODPHOSCells();
50 virtual void ConnectAODEMCALCells();
51 virtual void ConnectInputOutputAODBranches();
52
4a745797 53 virtual TList * GetCreateOutputObjects() { return (new TList) ;}
54 //virtual TList * GetAnalysisOutputContainer() { return fAnaOutContainer ;}
55
a3aebfff 56 virtual void AddToHistogramsName(TString add) { fAddToHistogramsName = add; }
57 virtual TString GetAddedHistogramsStringToName() {return fAddToHistogramsName ;}
58
477d6cee 59 virtual void Init() {;}
60 virtual void InitParameters() ;
61
62 virtual void Print(const Option_t * ) const ;
63
64 virtual void MakeAnalysisFillAOD() {;}
65
66 virtual void MakeAnalysisFillHistograms() {;}
67
68 virtual Int_t GetDebug() const { return fDebug ; }
69 virtual void SetDebug(Int_t d) { fDebug = d ; }
70
71 virtual Int_t GetEventNumber() const ;
7cd4e982 72
477d6cee 73 virtual AliCaloTrackReader * GetReader() const {return fReader ; }
42dc8e7d 74 virtual void SetReader(AliCaloTrackReader * const reader) { fReader = reader ; }
477d6cee 75
e6e63685 76 //Calorimeter indexes information
77 Int_t GetModuleNumberCellIndexes(const Int_t absId, const TString calo, Int_t & icol, Int_t & irow, Int_t &iRCU) const {
78 return fReader->GetModuleNumberCellIndexes(absId, calo, icol, irow,iRCU);}
b05a14a3 79 Int_t GetModuleNumber(AliAODPWG4Particle * part) const {
80 return fReader->GetModuleNumber(part);}
e6e63685 81 Int_t GetModuleNumber(AliESDCaloCluster * cluster) const {
82 return ((AliCaloTrackESDReader*)fReader)->GetModuleNumber(cluster);}
83 Int_t GetModuleNumber(AliAODCaloCluster * cluster) const {
84 return ((AliCaloTrackAODReader*)fReader)->GetModuleNumber(cluster);}
85
a5cc4f03 86 virtual void Terminate(TList * /*outputList*/) {;}
87
477d6cee 88 //analysis AOD branch
89 virtual TClonesArray * GetCreateOutputAODBranch() ;
90 virtual TString GetInputAODName() const {return fInputAODName ; }
91 virtual void SetInputAODName(TString name) { fInputAODName = name; }
92 virtual TString GetOutputAODName() const {return fOutputAODName ; }
93 virtual void SetOutputAODName(TString name) { fNewAOD = kTRUE ; fOutputAODName = name; }
94 virtual Bool_t NewOutputAOD() const {return fNewAOD;}
95 virtual TString GetOutputAODClassName() const {return fOutputAODClassName;}
96 virtual void SetOutputAODClassName(TString name) {fOutputAODClassName = name; }
97
591cc579 98 virtual TString GetAODObjArrayName() const {return fAODObjArrayName;}
99 virtual void SetAODObjArrayName(TString name) {fAODObjArrayName = name; }
a3aebfff 100
477d6cee 101 virtual TClonesArray* GetInputAODBranch() const {return fInputAODBranch ;}
1e86c71e 102 virtual TClonesArray* GetOutputAODBranch() const {if(fNewAOD) return fOutputAODBranch; else return fInputAODBranch ;}
42dc8e7d 103 virtual TClonesArray* GetAODBranch(TString aodBranchName) const ;
104
477d6cee 105// virtual TClonesArray* GetAODCaloClusters() const {return fAODCaloClusters ;}
106 virtual TClonesArray* GetAODCaloClusters() const ;
107 virtual TClonesArray* GetAODTracks() const ;
108 virtual AliAODCaloCells* GetAODCaloCells() const {return fAODCaloCells ;}
109
591cc579 110 virtual TObjArray* GetAODCTS() const ;
111 virtual TObjArray* GetAODEMCAL() const ;
112 virtual TObjArray* GetAODPHOS() const ;
477d6cee 113
114 virtual TString GetBaseParametersList();
115
116 virtual TNamed * GetEMCALCells() const ;
117 virtual TNamed * GetPHOSCells() const ;
118
119 virtual AliStack * GetMCStack() const ;
120 virtual AliHeader* GetMCHeader() const ;
121 virtual AliGenEventHeader* GetMCGenEventHeader() const ;
122
123 //Analysis helpers classes pointers setters and getters
124 virtual AliCaloPID * GetCaloPID() const {return fCaloPID ;}
42dc8e7d 125 virtual void SetCaloPID(AliCaloPID * const pid) { fCaloPID = pid ;}
477d6cee 126
ff45398a 127 virtual AliFiducialCut * GetFiducialCut() const {return fFidCut ;}
128 virtual void SetFiducialCut(AliFiducialCut * const fc) { fFidCut = fc ;}
477d6cee 129
130 virtual AliIsolationCut * GetIsolationCut() const {return fIC ;}
42dc8e7d 131 virtual void SetIsolationCut(AliIsolationCut * const ic) { fIC = ic ;}
477d6cee 132
133 virtual AliMCAnalysisUtils * GetMCAnalysisUtils() const {return fMCUtils ;}
42dc8e7d 134 virtual void SetMCAnalysisUtils(AliMCAnalysisUtils * const mcutils) { fMCUtils = mcutils ;}
477d6cee 135
136 virtual AliNeutralMesonSelection * GetNeutralMesonSelection() const {return fNMS ;}
42dc8e7d 137 virtual void SetNeutralMesonSelection(AliNeutralMesonSelection * const nms) { fNMS = nms ;}
477d6cee 138
139 virtual Bool_t IsDataMC() const {return fDataMC ; }
140 virtual void SwitchOnDataMC() {fDataMC = kTRUE ; }
141 virtual void SwitchOffDataMC() {fDataMC = kFALSE ; }
142
ff45398a 143 virtual Bool_t IsFiducialCutOn() const {return fCheckFidCut ; }
144 virtual void SwitchOnFiducialCut() { fCheckFidCut = kTRUE;}
145 virtual void SwitchOffFiducialCut() { fCheckFidCut = kFALSE;}
477d6cee 146
147 virtual Bool_t IsCaloPIDOn() const {return fCheckCaloPID ; }
148 virtual void SwitchOnCaloPID() { fCheckCaloPID = kTRUE;}
149 virtual void SwitchOffCaloPID() { fCheckCaloPID = kFALSE;}
150
151 virtual Bool_t IsCaloPIDRecalculationOn() const {return fRecalculateCaloPID ; }
152 virtual void SwitchOnCaloPIDRecalculation() { fRecalculateCaloPID = kTRUE;}
153 virtual void SwitchOffCaloPIDRecalculation() { fRecalculateCaloPID = kFALSE;}
154
155 virtual Float_t GetMaxPt() const {return fMaxPt ; }
156 virtual Float_t GetMinPt() const {return fMinPt ; }
157 virtual void SetMaxPt(Float_t pt) {fMaxPt = pt ; }
158 virtual void SetMinPt(Float_t pt) {fMinPt = pt ; }
159 void SetPtCutRange(Double_t ptmin, Double_t ptmax)
160 { fMaxPt=ptmax; fMinPt=ptmin;}
161
162 //Histogrammes setters and getters
5a2dbc3c 163 //Pt, Energy
477d6cee 164 virtual void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n) {
5a2dbc3c 165 fHistoPtBins = n ;
477d6cee 166 fHistoPtMax = max ;
167 fHistoPtMin = min ;
168 }
169
5a2dbc3c 170 Int_t GetHistoPtBins() const { return fHistoPtBins; }
477d6cee 171 Float_t GetHistoPtMin() const { return fHistoPtMin ; }
172 Float_t GetHistoPtMax() const { return fHistoPtMax ; }
173
5a2dbc3c 174 //Azimuthal angle
477d6cee 175 virtual void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n) {
5a2dbc3c 176 fHistoPhiBins = n ;
177 fHistoPhiMax = max ;
178 fHistoPhiMin = min ;
477d6cee 179 }
180
5a2dbc3c 181 Int_t GetHistoPhiBins() const { return fHistoPhiBins; }
477d6cee 182 Float_t GetHistoPhiMin() const { return fHistoPhiMin ; }
183 Float_t GetHistoPhiMax() const { return fHistoPhiMax ; }
184
5a2dbc3c 185 //Pseudorapidity-rapidity
477d6cee 186 virtual void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n) {
5a2dbc3c 187 fHistoEtaBins = n ;
188 fHistoEtaMax = max ;
189 fHistoEtaMin = min ;
477d6cee 190 }
191
5a2dbc3c 192 Int_t GetHistoEtaBins() const { return fHistoEtaBins; }
477d6cee 193 Float_t GetHistoEtaMin() const { return fHistoEtaMin ; }
194 Float_t GetHistoEtaMax() const { return fHistoEtaMax ; }
5a2dbc3c 195
196 //Mass
197 virtual void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n) {
198 fHistoMassBins = n ;
199 fHistoMassMax = max ;
200 fHistoMassMin = min ;
201 }
202
203 Int_t GetHistoMassBins() const { return fHistoMassBins ; }
204 Float_t GetHistoMassMin() const { return fHistoMassMin ; }
205 Float_t GetHistoMassMax() const { return fHistoMassMax ; }
206
207 //Asymetry
208 virtual void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n) {
209 fHistoAsymBins = n ;
210 fHistoAsymMax = max ;
211 fHistoAsymMin = min ;
212 }
213
214 Int_t GetHistoAsymmetryBins() const { return fHistoAsymBins ; }
215 Float_t GetHistoAsymmetryMin() const { return fHistoAsymMin ; }
216 Float_t GetHistoAsymmetryMax() const { return fHistoAsymMax ; }
217
477d6cee 218 private:
219
220 Bool_t fDataMC ; // Flag to access MC data when using ESD or AOD
221 Int_t fDebug ; // Debug level
222 Bool_t fCheckFidCut ; // Do analysis for clusters in defined region
223 Bool_t fCheckCaloPID ; // Do analysis for calorimeters
224 Bool_t fRecalculateCaloPID ; // Recalculate PID or use PID weights in calorimeters
225 Float_t fMinPt ; // Maximum pt of (trigger) particles in the analysis
226 Float_t fMaxPt ; // Minimum pt of (trigger) particles in the analysis
591cc579 227
39ffdc47 228 AliCaloTrackReader * fReader; // Acces to ESD/AOD/MC data
477d6cee 229
230 TClonesArray* fInputAODBranch ; //! Selected input particles branch
231 TString fInputAODName ; // Name of input AOD branch;
232 TClonesArray* fOutputAODBranch ; //! Selected output particles branch
233 Bool_t fNewAOD ; // Flag, new aod branch added to the analysis or not.
234 TString fOutputAODName ; // Name of output AOD branch;
235 TString fOutputAODClassName; // Type of aod objects to be stored in the TClonesArray (AliAODPWG4Particle, AliAODPWG4ParticleCorrelation ...)
591cc579 236 TString fAODObjArrayName ; // Name of ref array kept in a TList in AliAODParticleCorrelation with clusters or track references.
a3aebfff 237 TString fAddToHistogramsName;// Add this string to histograms name
477d6cee 238
239 //TClonesArray* fAODCaloClusters ; //! selected PHOS/EMCAL CaloClusters
240 AliAODCaloCells * fAODCaloCells ; //! selected PHOS/EMCAL CaloCells
241
242 //Analysis helper classes access pointers
614701c6 243 AliCaloPID * fCaloPID; //! PID calculation
244 AliFiducialCut * fFidCut; //! Acceptance cuts
245 AliIsolationCut * fIC; //! Isolation cut
246 AliMCAnalysisUtils * fMCUtils; //! MonteCarlo Analysis utils
247 AliNeutralMesonSelection * fNMS; //! Neutral Meson Selection
477d6cee 248
4a745797 249 //TList * fAnaOutContainer; // Temporal histogram output container, contents to be added to the main container passed to the main analysis frame
250
477d6cee 251 //Histograms binning and range
5a2dbc3c 252 Int_t fHistoPtBins ; // Number of bins in pt axis
253 Float_t fHistoPtMax ; // Maximum value of pt histogram range
254 Float_t fHistoPtMin ; // Minimum value of pt histogram range
255 Int_t fHistoPhiBins ; // Number of bins in phi axis
256 Float_t fHistoPhiMax ; // Maximum value of phi histogram range
257 Float_t fHistoPhiMin ; // Minimum value of phi histogram range
258 Int_t fHistoEtaBins ; // Number of bins in eta axis
259 Float_t fHistoEtaMax ; // Maximum value of eta histogram range
260 Float_t fHistoEtaMin ; // Minimum value of eta histogram range
261 Int_t fHistoMassBins ; // Number of bins in mass axis
262 Float_t fHistoMassMax ; // Maximum value of mass histogram range
263 Float_t fHistoMassMin ; // Minimum value of mass histogram range
264 Int_t fHistoAsymBins ; // Number of bins in asymmetry axis
265 Float_t fHistoAsymMax ; // Maximum value of asymmetry histogram range
266 Float_t fHistoAsymMin ; // Minimum value of asymmetry histogram range
267
268 ClassDef(AliAnaPartCorrBaseClass,6)
477d6cee 269 } ;
1c5acb87 270
271
272#endif //ALIANAPARTCORRBASECLASS_H
273
274
275