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