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