]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/PartCorrDep/AliAnaPi0.h
addapt array of histograms for different SM combinations to new EMCAL SM
[u/mrichter/AliRoot.git] / PWG4 / PartCorrDep / AliAnaPi0.h
CommitLineData
1c5acb87 1#ifndef ALIANAPI0_H
2#define ALIANAPI0_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//_________________________________________________________________________
6175da48 8// Class to fill two-photon invariant mass histograms
1c5acb87 9// to be used to extract pi0 raw yield.
6175da48 10// Input is produced by AliAnaPhoton (or any other analysis producing output AliAODPWG4Particles),
11// it will do nothing if executed alone
1c5acb87 12//
13//-- Author: Dmitri Peressounko (RRC "KI")
14//-- Adapted to PartCorr frame by Lamia Benhabib (SUBATECH)
15//-- and Gustavo Conesa (INFN-Frascati)
16
17//Root
18class TList;
19class TH3D ;
50f39b97 20class TH2D ;
0c1383b5 21class TObjString;
1c5acb87 22
23//Analysis
5025c139 24#include "AliAnaPartCorrBaseClass.h"
1c5acb87 25class AliAODEvent ;
26class AliESDEvent ;
c8fe2783 27class AliAODPWG4Particle ;
1c5acb87 28
1c5acb87 29class AliAnaPi0 : public AliAnaPartCorrBaseClass {
6639984f 30
78219bac 31 public:
6639984f 32 AliAnaPi0() ; // default ctor
6639984f 33 virtual ~AliAnaPi0() ;//virtual dtor
78219bac 34 private:
35 AliAnaPi0(const AliAnaPi0 & g) ; // cpy ctor
614701c6 36 AliAnaPi0 & operator = (const AliAnaPi0 & api0) ;//cpy assignment
6639984f 37
78219bac 38 public:
39
6175da48 40 //-------------------------------
41 // General analysis frame methods
42 //-------------------------------
43
0c1383b5 44 TObjString * GetAnalysisCuts();
45 TList * GetCreateOutputObjects();
6175da48 46 void Terminate(TList* outputList);
47 void ReadHistograms(TList * outputList); //Fill histograms with histograms in ouput list, needed in Terminate.
48 void Print(const Option_t * opt) const;
6639984f 49 //void MakeAnalysisFillAOD() {;} //Not needed
50 void MakeAnalysisFillHistograms();
6175da48 51 //void Init();
52 void InitParameters();
53
54 //Calorimeter options
156549ae 55 TString GetCalorimeter() const { return fCalorimeter; }
56 void SetCalorimeter(TString & det) { fCalorimeter = det ; }
57 void SetNumberOfModules(Int_t nmod) { fNModules = nmod; }
c8fe2783 58
6175da48 59 //-------------------------------
60 // EVENT Bin Methods
61 //-------------------------------
62
c8fe2783 63 virtual Int_t GetEventIndex(AliAODPWG4Particle * part, Double_t * vert) ;
64
6175da48 65 //Setters for parameters of event buffers
66 void SetNCentrBin(Int_t n=5) {fNCentrBin=n ;} //number of bins in centrality
67//void SetNZvertBin(Int_t n=5) {fNZvertBin=n ;} //number of bins for vertex position
68//void SetNRPBin(Int_t n=6) {fNrpBin=n ;} //number of bins in reaction plain
69 void SetNMaxEvMix(Int_t n=20) {fNmaxMixEv=n ;} //Maximal number of events for mixing
70
71 //Switchs for event multiplicity bin option, by default, centrality
72 void SwitchOnTrackMultBins() {fUseTrackMultBins = kTRUE ; }
73 void SwitchOffTrackMultBins() {fUseTrackMultBins = kFALSE ; }
74
75 void SwitchOnPhotonMultBins() {fUsePhotonMultBins = kTRUE ; }
76 void SwitchOffPhotonMultBins() {fUsePhotonMultBins = kFALSE ; }
77
78 void SwitchOnClusterEBins() {fUseAverClusterEBins = kTRUE ; }
79 void SwitchOffClusterEBins() {fUseAverClusterEBins = kFALSE ; }
398c93cc 80
6175da48 81 void SwitchOnCellEBins() {fUseAverCellEBins = kTRUE ; }
82 void SwitchOffCellEBins() {fUseAverCellEBins = kFALSE ; }
7e7694bb 83
156549ae 84 void SwitchOnClusterEDenBins() {fUseAverClusterEDenBins = kTRUE ; }
85 void SwitchOffClusterEDenBins() {fUseAverClusterEDenBins = kFALSE ; }
86
87// void SwitchOnClusterPairRBins() {fUseAverClusterPairRBins = kTRUE ; }
88// void SwitchOffClusterPairRBins() {fUseAverClusterPairRBins = kFALSE ; }
89//
90// void SwitchOnClusterPairRWeightBins() {fUseAverClusterPairRWeightBins = kTRUE ; }
91// void SwitchOffClusterPairRWeightBins(){fUseAverClusterPairRWeightBins = kFALSE ; }
92
93// void SwitchOnEMaxBins() {fUseEMaxBins = kTRUE ; }
94// void SwitchOffEMaxBins() {fUseEMaxBins = kFALSE ; }
95
6175da48 96 //-------------------------------
97 //Opening angle pair selection
98 //-------------------------------
99 void SwitchOnAngleSelection() {fUseAngleCut = kTRUE ; }
100 void SwitchOffAngleSelection() {fUseAngleCut = kFALSE ; }
101 void SwitchOnAngleEDepSelection() {fUseAngleEDepCut = kTRUE ; }
102 void SwitchOffAngleEDepSelection() {fUseAngleEDepCut = kFALSE ; }
103 void SetAngleCut(Float_t a) {fAngleCut = a ; }
104 void SetAngleMaxCut(Float_t a) {fAngleMaxCut = a ; }
105
106 //-------------------------------
107 // Use mixing code of this class
108 //-------------------------------
109 void SwitchOnOwnMix() {fDoOwnMix = kTRUE ; }
110 void SwitchOffOwnMix() {fDoOwnMix = kFALSE ; }
111
112 //------------------------------------------
113 //Do analysis only with clusters in same SM
114 //------------------------------------------
115 void SwitchOnSameSM() {fSameSM = kTRUE ; }
116 void SwitchOffSameSM() {fSameSM = kFALSE ; }
117
118 //-------------------------------
119 //Histogram filling options off by default
120 //-------------------------------
121 void SwitchOnInvPtWeight() {fMakeInvPtPlots = kTRUE ; }
122 void SwitchOffInvPtWeight() {fMakeInvPtPlots = kFALSE ; }
af7b3903 123
6175da48 124 void SwitchOnFillBadDistHisto() {fFillBadDistHisto = kTRUE;}
125 void SwitchOffFillBadDistHisto() {fFillBadDistHisto = kFALSE;}
126
127 //-------------------------------------------
128 //Cuts for multiple analysis, off by default
129 //-------------------------------------------
156549ae 130 void SwitchOnMultipleCutAnalysis() {fMultiCutAna = kTRUE ;}
6175da48 131 void SwitchOffMultipleCutAnalysis() {fMultiCutAna = kFALSE;}
5ae09196 132
6175da48 133 void SetNPtCuts (Int_t size) {if(size <= 10)fNPtCuts = size; }
134 void SetNAsymCuts (Int_t size) {if(size <= 10)fNAsymCuts = size; }
135 void SetNNCellCuts(Int_t size) {if(size <= 10)fNCellNCuts = size; }
136 void SetNPIDBits (Int_t size) {if(size <= 10)fNPIDBits = size; }
d7c10d78 137
af7b3903 138 void SetPtCutsAt (Int_t pos,Float_t val) {if(pos < 10)fPtCuts[pos] = val;}
139 void SetAsymCutsAt (Int_t pos,Float_t val) {if(pos < 10)fAsymCuts[pos] = val;}
140 void SetNCellCutsAt(Int_t pos,Int_t val) {if(pos < 10)fCellNCuts[pos] = val;}
141 void SetPIDBitsAt (Int_t pos,Int_t val) {if(pos < 10)fPIDBits[pos] = val;}
d7c10d78 142
6175da48 143 //MC analysis related methods
144 void FillAcceptanceHistograms();
145 void FillMCVersusRecDataHistograms(const Int_t index1, const Int_t index2,
146 const Float_t pt1, const Float_t pt2,
147 const Int_t ncells1, const Int_t ncells2,
148 const Double_t mass, const Double_t pt, const Double_t asym,
149 const Double_t deta, const Double_t dphi);
150
151 void SwitchOnMultipleCutAnalysisInSimulation() {fMultiCutAnaSim = kTRUE;}
152 void SwitchOffMultipleCutAnalysisInSimulation() {fMultiCutAnaSim = kFALSE;}
153
6639984f 154
155 private:
6175da48 156 Bool_t fDoOwnMix; // Do combinatorial background not the one provided by the frame
157 Int_t fNCentrBin ; // Number of bins in event container for centrality
158//Int_t fNZvertBin ; // Number of bins in event container for vertex position
159//Int_t fNrpBin ; // Number of bins in event container for reaction plain
160 Int_t fNmaxMixEv ; // Maximal number of events stored in buffer for mixing
161 TString fCalorimeter ; // Select Calorimeter for IM
162 Int_t fNModules ; // Number of EMCAL/PHOS modules, set as many histogras as modules
163 Bool_t fUseAngleCut ; // Select pairs depending on their opening angle
164 Bool_t fUseAngleEDepCut ; // Select pairs depending on their opening angle
165 Float_t fAngleCut ; // Select pairs with opening angle larger than a threshold
166 Float_t fAngleMaxCut ; // Select pairs with opening angle smaller than a threshold
167 TList ** fEventsList ; //![fNCentrBin*GetNZvertBin()*GetNRPBin()] Containers for photons in stored events
168
169 //Multiple cuts analysis
170 Bool_t fMultiCutAna; // Do analysis with several or fixed cut
171 Bool_t fMultiCutAnaSim; // Do analysis with several or fixed cut, in the simulation related part
172 Int_t fNPtCuts; // Number of pt cuts
173 Float_t fPtCuts[10]; // Array with different pt cuts
174 Int_t fNAsymCuts; // Number of assymmetry cuts
175 Float_t fAsymCuts[10]; // Array with different assymetry cuts
176 Int_t fNCellNCuts; // Number of cuts with number of cells in cluster
177 Int_t fCellNCuts[10]; // Array with different cell number cluster cuts
178 Int_t fNPIDBits ; // Number of possible PID bit combinations
179 Int_t fPIDBits[10]; // Array with different PID bits
180
181 //Switchs of different analysis options
182 Bool_t fMakeInvPtPlots; // D plots with inverse pt weight
183 Bool_t fSameSM; // Select only pairs in same SM;
184 Bool_t fUseTrackMultBins; // Use track multiplicity and not centrality bins
185 Bool_t fUsePhotonMultBins; // Use photon multiplicity and not centrality bins
6175da48 186 Bool_t fUseAverCellEBins; // Use cell average energy and not centrality bins
156549ae 187 Bool_t fUseAverClusterEBins; // Use cluster average energy and not centrality bins
188 Bool_t fUseAverClusterEDenBins; // Use cluster average energy density and not centrality bins
189// Bool_t fUseAverClusterPairRBins; // Use cluster average energy and not centrality bins
190// Bool_t fUseAverClusterPairRWeightBins; // Use cluster average energy and not centrality bins
191// Bool_t fUseEMaxBins; // Use Emax bins
6175da48 192 Bool_t fFillBadDistHisto; // Do plots for different distances to bad channels
af7b3903 193
6639984f 194 //Histograms
6175da48 195
156549ae 196 //Event characterization
6175da48 197 TH1F* fhAverTotECluster; //! Average number of clusters in SM
198 TH1F* fhAverTotECell; //! Average number of cells in SM
156549ae 199 TH2F* fhAverTotECellvsCluster; //! Average number of cells in SM
200 TH1F* fhEDensityCluster; //! Deposited energy in event per cluster
201 TH1F* fhEDensityCell; //! Deposited energy in event per cell vs cluster
202 TH2F* fhEDensityCellvsCluster; //! Deposited energy in event per cell vs cluster
203// TH1F* fhClusterPairDist; //! Distance between clusters
204// TH1F* fhClusterPairDistWeight; //! Distance between clusters weighted by pair energy
205// TH1F* fhAverClusterPairDist; //! Average distance between cluster pairs
206// TH1F* fhAverClusterPairDistWeight;//! Average distance between cluster pairs weighted with pair energy
207// TH2F* fhAverClusterPairDistvsAverE; //! Average distance between cluster pairs vs average cluster energy
208// TH2F* fhAverClusterPairDistWeightvsAverE; //! Average distance between cluster pairs weighted with pair energy vs average cluster energy
209// TH2F* fhAverClusterPairDistvsN; //! Average distance between cluster pairs vs number of clusters
210// TH2F* fhAverClusterPairDistWeightvsN; //! Average distance between cluster pairs weighted with pair energy vs number of clusters
211// TH2F* fhMaxEvsClustMult; //!
212// TH2F* fhMaxEvsClustEDen; //!
213
6175da48 214
215 TH2D ** fhReMod ; //![fNModules] REAL two-photon invariant mass distribution for different calorimeter modules.
8d230fa8 216 TH2D ** fhReSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
217 TH2D ** fhReSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
218 TH2D ** fhReDiffPHOSMod ; //![fNModules] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
6175da48 219 TH2D ** fhMiMod ; //![fNModules] MIXED two-photon invariant mass distribution for different calorimeter modules.
8d230fa8 220 TH2D ** fhMiSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
221 TH2D ** fhMiSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
222 TH2D ** fhMiDiffPHOSMod ; //![fNModules-1] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
6175da48 223
224 // Pairs with at least one cluster tagged as conversion
225 TH2D * fhReConv ; //! REAL two-photon invariant mass distribution one of the pair was 2 clusters with small mass
226 TH2D * fhMiConv ; //! MIXED two-photon invariant mass distribution one of the pair was 2 clusters with small mass
227 TH2D * fhReConv2 ; //! REAL two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
228 TH2D * fhMiConv2 ; //! MIXED two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
229
230 TH2D ** fhRe1 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
231 TH2D ** fhMi1 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
232 TH2D ** fhRe2 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
233 TH2D ** fhMi2 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
234 TH2D ** fhRe3 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
235 TH2D ** fhMi3 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
236
237 //Histograms weighted by inverse pT
238 TH2D ** fhReInvPt1 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
239 TH2D ** fhMiInvPt1 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
240 TH2D ** fhReInvPt2 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
241 TH2D ** fhMiInvPt2 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
242 TH2D ** fhReInvPt3 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
243 TH2D ** fhMiInvPt3 ; //![fNCentrBin*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
244
245 //Multiple cuts: Assymmetry, pt, n cells, PID
246 TH2D ** fhRePtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
247 TH2D ** fhRePtNCellAsymCutsSM0 ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
248 TH2D ** fhRePtNCellAsymCutsSM1 ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
249 TH2D ** fhRePtNCellAsymCutsSM2 ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
250 TH2D ** fhRePtNCellAsymCutsSM3 ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
251 TH2D ** fhMiPtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Mixed two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
252 TH2D ** fhRePIDBits ; //![fNPIDBits] REAL two-photon invariant mass distribution for different PID bits
253 TH3D ** fhRePtMult ; //![fNAsymCuts] REAL two-photon invariant mass distribution for different track multiplicity and assymetry cuts
254
255 // Asymmetry vs pt, in pi0/eta regions
256 TH2D * fhRePtAsym ; //! REAL two-photon pt vs asymmetry
257 TH2D * fhRePtAsymPi0 ; //! REAL two-photon pt vs asymmetry, close to pi0 mass
258 TH2D * fhRePtAsymEta ; //! REAL two-photon pt vs asymmetry, close to eta mass
259
260 TH3D * fhEvents; //! Number of events per centrality, RP, zbin
261
262 // Pair opening angle
263 TH2D * fhRealOpeningAngle ; //! Opening angle of pair versus pair energy
264 TH2D * fhRealCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
265 TH2D * fhMixedOpeningAngle ; //! Opening angle of pair versus pair energy
266 TH2D * fhMixedCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
267
268 //MC analysis histograms
269 //Pi0 Acceptance
270 TH1D * fhPrimPi0Pt ; //! Spectrum of Primary
271 TH1D * fhPrimPi0AccPt ; //! Spectrum of primary with accepted daughters
156549ae 272 TH2D * fhPrimPi0Y ; //! Rapidity distribution of primary particles vs pT
273 TH2D * fhPrimPi0AccY ; //! Rapidity distribution of primary with accepted daughters vs pT
274 TH2D * fhPrimPi0Phi ; //! Azimutal distribution of primary particles vs pT
275 TH2D * fhPrimPi0AccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
6175da48 276 TH2D * fhPrimPi0OpeningAngle ; //! Opening angle of pair versus pair energy, primaries
277 TH2D * fhPrimPi0CosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy, primaries
278 //Eta acceptance
279 TH1D * fhPrimEtaPt ; //! Spectrum of Primary
280 TH1D * fhPrimEtaAccPt ; //! Spectrum of primary with accepted daughters
156549ae 281 TH2D * fhPrimEtaY ; //! Rapidity distribution of primary particles vs pT
282 TH2D * fhPrimEtaAccY ; //! Rapidity distribution of primary with accepted daughters vs pT
283 TH2D * fhPrimEtaPhi ; //! Azimutal distribution of primary particles vs pT
284 TH2D * fhPrimEtaAccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
6175da48 285
08a56f5f 286 // Primaries origin
287 TH2D * fhPrimPi0PtOrigin ; //! Spectrum of generated pi0 vs mother
288 TH2D * fhPrimEtaPtOrigin ; //! Spectrum of generated eta vs mother
289
6175da48 290 //Pair origin
291 //Array of histograms ordered as follows: 0-Photon, 1-electron, 2-pi0, 3-eta, 4-a-proton, 5-a-neutron, 6-stable particles,
292 // 7-other decays, 8-string, 9-final parton, 10-initial parton, intermediate, 11-colliding proton, 12-unrelated
293 TH2D * fhMCOrgMass[13]; //! Mass vs pt of real pairs, check common origin of pair
294 TH2D * fhMCOrgAsym[13]; //! Asymmetry vs pt of real pairs, check common origin of pair
295 TH2D * fhMCOrgDeltaEta[13]; //! Delta Eta vs pt of real pairs, check common origin of pair
296 TH2D * fhMCOrgDeltaPhi[13]; //! Delta Phi vs pt of real pairs, check common origin of pair
297
298 //Multiple cuts in simulation, origin pi0 or eta
299 TH2D ** fhMCPi0MassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs reconstructed pt of original pair
300 TH2D ** fhMCPi0MassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs generated pt of original pair
301 TH2D ** fhMCPi0PtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed pt vs generated pt of pair
302 TH2D ** fhMCEtaMassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs reconstructed pt of original pair
303 TH2D ** fhMCEtaMassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs generated pt of original pair
304 TH2D ** fhMCEtaPtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed pt vs generated pt of pair
08a56f5f 305
306 TH2D * fhMCPi0PtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
307 TH2D * fhMCEtaPtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
6175da48 308
8d230fa8 309 ClassDef(AliAnaPi0,16)
1c5acb87 310} ;
311
312
313#endif //ALIANAPI0_H
314
315
316