]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/PartCorrDep/AliAnaPi0.h
Add histograms with shower shape selections, remove commented code and some cosmetics
[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;
0333ede6 19class TH3F ;
20class TH2F ;
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();
0333ede6 45
0c1383b5 46 TList * GetCreateOutputObjects();
0333ede6 47
48 void Print(const Option_t * opt) const;
49
50 void MakeAnalysisFillHistograms();
51
52 void InitParameters();
6175da48 53
54 //Calorimeter options
0333ede6 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
0333ede6 63 Int_t GetEventIndex(AliAODPWG4Particle * part, Double_t * vert) ;
c8fe2783 64
0333ede6 65 void CountAndGetAverages(Int_t &nClus,Int_t &nCell, Float_t &eClusTot,Float_t &eCellTot, Float_t &eDenClus,Float_t &eDenCell) ;
20218aea 66
6175da48 67 //Switchs for event multiplicity bin option, by default, centrality
6175da48 68
0333ede6 69 void SwitchOnTrackMultBins() { fUseTrackMultBins = kTRUE ; }
70 void SwitchOffTrackMultBins() { fUseTrackMultBins = kFALSE ; }
6175da48 71
0333ede6 72 void SwitchOnPhotonMultBins() { fUsePhotonMultBins = kTRUE ; }
73 void SwitchOffPhotonMultBins() { fUsePhotonMultBins = kFALSE ; }
398c93cc 74
0333ede6 75 void SwitchOnClusterEBins() { fUseAverClusterEBins = kTRUE ; }
76 void SwitchOffClusterEBins() { fUseAverClusterEBins = kFALSE ; }
77
78 void SwitchOnCellEBins() { fUseAverCellEBins = kTRUE ; }
79 void SwitchOffCellEBins() { fUseAverCellEBins = kFALSE ; }
156549ae 80
0333ede6 81 void SwitchOnClusterEDenBins() { fUseAverClusterEDenBins = kTRUE ; }
82 void SwitchOffClusterEDenBins() { fUseAverClusterEDenBins = kFALSE ; }
156549ae 83
6175da48 84 //-------------------------------
85 //Opening angle pair selection
86 //-------------------------------
0333ede6 87 void SwitchOnAngleSelection() { fUseAngleCut = kTRUE ; }
88 void SwitchOffAngleSelection() { fUseAngleCut = kFALSE ; }
89
90 void SwitchOnAngleEDepSelection() { fUseAngleEDepCut = kTRUE ; }
91 void SwitchOffAngleEDepSelection() { fUseAngleEDepCut = kFALSE ; }
92
93 void SetAngleCut(Float_t a) { fAngleCut = a ; }
94 void SetAngleMaxCut(Float_t a) { fAngleMaxCut = a ; }
6175da48 95
96 //-------------------------------
97 // Use mixing code of this class
98 //-------------------------------
0333ede6 99 void SwitchOnOwnMix() { fDoOwnMix = kTRUE ; }
100 void SwitchOffOwnMix() { fDoOwnMix = kFALSE ; }
6175da48 101
102 //------------------------------------------
20218aea 103 //Do analysis only with clusters in same SM or different combinations of SM
6175da48 104 //------------------------------------------
0333ede6 105 void SwitchOnSameSM() { fSameSM = kTRUE ; }
106 void SwitchOffSameSM() { fSameSM = kFALSE ; }
6175da48 107
0333ede6 108 void SwitchOnSMCombinations() { fFillSMCombinations = kTRUE ; }
109 void SwitchOffSMCombinations() { fFillSMCombinations = kFALSE ; }
20218aea 110
6175da48 111 //-------------------------------
112 //Histogram filling options off by default
113 //-------------------------------
0333ede6 114 void SwitchOnInvPtWeight() { fMakeInvPtPlots = kTRUE ; }
115 void SwitchOffInvPtWeight() { fMakeInvPtPlots = kFALSE ; }
af7b3903 116
0333ede6 117 void SwitchOnFillBadDistHisto() { fFillBadDistHisto = kTRUE ; }
118 void SwitchOffFillBadDistHisto() { fFillBadDistHisto = kFALSE ; }
6175da48 119
120 //-------------------------------------------
121 //Cuts for multiple analysis, off by default
122 //-------------------------------------------
0333ede6 123 void SwitchOnMultipleCutAnalysis() { fMultiCutAna = kTRUE ; }
124 void SwitchOffMultipleCutAnalysis() { fMultiCutAna = kFALSE ; }
5ae09196 125
0333ede6 126 void SetNPtCuts (Int_t s) { if(s <= 10)fNPtCuts = s ; }
127 void SetNAsymCuts (Int_t s) { if(s <= 10)fNAsymCuts = s ; }
128 void SetNNCellCuts(Int_t s) { if(s <= 10)fNCellNCuts = s ; }
129 void SetNPIDBits (Int_t s) { if(s <= 10)fNPIDBits = s ; }
d7c10d78 130
0333ede6 131 void SetPtCutsAt (Int_t p,Float_t v) { if(p < 10)fPtCuts[p] = v ; }
132 void SetAsymCutsAt(Int_t p,Float_t v) { if(p < 10)fAsymCuts[p] = v ; }
133 void SetNCellCutsAt(Int_t p,Int_t v) { if(p < 10)fCellNCuts[p]= v ; }
134 void SetPIDBitsAt (Int_t p,Int_t v) { if(p < 10)fPIDBits[p] = v ; }
d7c10d78 135
6175da48 136 //MC analysis related methods
0333ede6 137
138 void SwitchOnConversionChecker() { fCheckConversion = kTRUE ; }
139 void SwitchOffConversionChecker() { fCheckConversion = kFALSE ; }
140
141 void SwitchOnMultipleCutAnalysisInSimulation() { fMultiCutAnaSim = kTRUE ; }
142 void SwitchOffMultipleCutAnalysisInSimulation() { fMultiCutAnaSim = kFALSE ; }
20218aea 143
0333ede6 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);
6639984f 150
151 private:
0333ede6 152
153 Bool_t fDoOwnMix; // Do combinatorial background not the one provided by the frame
154 TList ** fEventsList ; //![GetNCentrBin()*GetNZvertBin()*GetNRPBin()] Containers for photons in stored events
155
156 TString fCalorimeter ; // Select Calorimeter for IM
157 Int_t fNModules ; // Number of EMCAL/PHOS modules, set as many histogras as modules
158
159 Bool_t fUseAngleCut ; // Select pairs depending on their opening angle
160 Bool_t fUseAngleEDepCut ; // Select pairs depending on their opening angle
161 Float_t fAngleCut ; // Select pairs with opening angle larger than a threshold
162 Float_t fAngleMaxCut ; // Select pairs with opening angle smaller than a threshold
6175da48 163
164 //Multiple cuts analysis
0333ede6 165 Bool_t fMultiCutAna; // Do analysis with several or fixed cut
166 Bool_t fMultiCutAnaSim; // Do analysis with several or fixed cut, in the simulation related part
167 Int_t fNPtCuts; // Number of pt cuts
168 Float_t fPtCuts[10]; // Array with different pt cuts
169 Int_t fNAsymCuts; // Number of assymmetry cuts
170 Float_t fAsymCuts[10]; // Array with different assymetry cuts
171 Int_t fNCellNCuts; // Number of cuts with number of cells in cluster
172 Int_t fCellNCuts[10]; // Array with different cell number cluster cuts
173 Int_t fNPIDBits ; // Number of possible PID bit combinations
174 Int_t fPIDBits[10]; // Array with different PID bits
6175da48 175
176 //Switchs of different analysis options
0333ede6 177 Bool_t fMakeInvPtPlots; // D plots with inverse pt weight
178 Bool_t fSameSM; // Select only pairs in same SM;
179 Bool_t fFillSMCombinations; // Fill histograms with different cluster pairs in SM combinations
180 Bool_t fCheckConversion; // Fill histograms with tagged photons as conversion
181 Bool_t fUseTrackMultBins; // Use track multiplicity and not centrality bins
182 Bool_t fUsePhotonMultBins; // Use photon multiplicity and not centrality bins
183 Bool_t fUseAverCellEBins; // Use cell average energy and not centrality bins
184 Bool_t fUseAverClusterEBins; // Use cluster average energy and not centrality bins
185 Bool_t fUseAverClusterEDenBins; // Use cluster average energy density and not centrality bins
186 Bool_t fFillBadDistHisto; // Do plots for different distances to bad channels
af7b3903 187
6639984f 188 //Histograms
6175da48 189
156549ae 190 //Event characterization
0333ede6 191 TH1F * fhAverTotECluster; //! Average number of clusters in SM
192 TH1F * fhAverTotECell; //! Average number of cells in SM
193 TH2F * fhAverTotECellvsCluster; //! Average number of cells in SM
194 TH1F * fhEDensityCluster; //! Deposited energy in event per cluster
195 TH1F * fhEDensityCell; //! Deposited energy in event per cell vs cluster
196 TH2F * fhEDensityCellvsCluster; //! Deposited energy in event per cell vs cluster
156549ae 197
0333ede6 198 TH2F ** fhReMod ; //![fNModules] REAL two-photon invariant mass distribution for different calorimeter modules.
199 TH2F ** fhReSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
200 TH2F ** fhReSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
201 TH2F ** fhReDiffPHOSMod ; //![fNModules] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
202 TH2F ** fhMiMod ; //![fNModules] MIXED two-photon invariant mass distribution for different calorimeter modules.
203 TH2F ** fhMiSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
204 TH2F ** fhMiSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
205 TH2F ** fhMiDiffPHOSMod ; //![fNModules-1] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
6175da48 206
207 // Pairs with at least one cluster tagged as conversion
0333ede6 208 TH2F * fhReConv ; //! REAL two-photon invariant mass distribution one of the pair was 2 clusters with small mass
209 TH2F * fhMiConv ; //! MIXED two-photon invariant mass distribution one of the pair was 2 clusters with small mass
210 TH2F * fhReConv2 ; //! REAL two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
211 TH2F * fhMiConv2 ; //! MIXED two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
212
213 TH2F ** fhRe1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
214 TH2F ** fhMi1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
215 TH2F ** fhRe2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
216 TH2F ** fhMi2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
217 TH2F ** fhRe3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
218 TH2F ** fhMi3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
6175da48 219
6175da48 220 //Histograms weighted by inverse pT
0333ede6 221 TH2F ** fhReInvPt1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
222 TH2F ** fhMiInvPt1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
223 TH2F ** fhReInvPt2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
224 TH2F ** fhMiInvPt2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
225 TH2F ** fhReInvPt3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
226 TH2F ** fhMiInvPt3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
6175da48 227
228 //Multiple cuts: Assymmetry, pt, n cells, PID
0333ede6 229 TH2F ** fhRePtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts*] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
230 TH2F ** fhMiPtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Mixed two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
231 TH2F ** fhRePtNCellAsymCutsSM[12] ; //![fNPtCuts*fNAsymCuts*fNCellNCutsfNModules] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry for each module
232
233 TH2F ** fhRePIDBits ; //![fNPIDBits] REAL two-photon invariant mass distribution for different PID bits
234 TH3F ** fhRePtMult ; //![fNAsymCuts] REAL two-photon invariant mass distribution for different track multiplicity and assymetry cuts
235 TH2F * fhReSS[3] ; //! Combine clusters with 3 different cuts on shower shape
6175da48 236
237 // Asymmetry vs pt, in pi0/eta regions
0333ede6 238 TH2F * fhRePtAsym ; //! REAL two-photon pt vs asymmetry
239 TH2F * fhRePtAsymPi0 ; //! REAL two-photon pt vs asymmetry, close to pi0 mass
240 TH2F * fhRePtAsymEta ; //! REAL two-photon pt vs asymmetry, close to eta mass
c4a7d28a 241
72542aba 242 //Centrality, Event plane bins
0333ede6 243 TH3F * fhEvents; //! Number of events per centrality, RP, zbin
244 TH1F * fhCentrality; //! Histogram with centrality bins with at least one pare
245 TH1F * fhCentralityNoPair; //! Histogram with centrality bins with no pair
20218aea 246
0333ede6 247 TH1F * fhEventPlaneAngle; //! Histogram with Event plane angle
248 TH2F * fhEventPlaneResolution; //! Histogram with Event plane resolution vs centrality
72542aba 249
6175da48 250 // Pair opening angle
0333ede6 251 TH2F * fhRealOpeningAngle ; //! Opening angle of pair versus pair energy
252 TH2F * fhRealCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
253 TH2F * fhMixedOpeningAngle ; //! Opening angle of pair versus pair energy
254 TH2F * fhMixedCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
6175da48 255
256 //MC analysis histograms
257 //Pi0 Acceptance
0333ede6 258 TH1F * fhPrimPi0Pt ; //! Spectrum of Primary
259 TH1F * fhPrimPi0AccPt ; //! Spectrum of primary with accepted daughters
260 TH2F * fhPrimPi0Y ; //! Rapidity distribution of primary particles vs pT
261 TH2F * fhPrimPi0AccY ; //! Rapidity distribution of primary with accepted daughters vs pT
262 TH2F * fhPrimPi0Phi ; //! Azimutal distribution of primary particles vs pT
263 TH2F * fhPrimPi0AccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
264 TH2F * fhPrimPi0OpeningAngle ; //! Opening angle of pair versus pair energy, primaries
265 TH2F * fhPrimPi0CosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy, primaries
6175da48 266 //Eta acceptance
0333ede6 267 TH1F * fhPrimEtaPt ; //! Spectrum of Primary
268 TH1F * fhPrimEtaAccPt ; //! Spectrum of primary with accepted daughters
269 TH2F * fhPrimEtaY ; //! Rapidity distribution of primary particles vs pT
270 TH2F * fhPrimEtaAccY ; //! Rapidity distribution of primary with accepted daughters vs pT
271 TH2F * fhPrimEtaPhi ; //! Azimutal distribution of primary particles vs pT
272 TH2F * fhPrimEtaAccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
6175da48 273
08a56f5f 274 // Primaries origin
0333ede6 275 TH2F * fhPrimPi0PtOrigin ; //! Spectrum of generated pi0 vs mother
276 TH2F * fhPrimEtaPtOrigin ; //! Spectrum of generated eta vs mother
08a56f5f 277
6175da48 278 //Pair origin
279 //Array of histograms ordered as follows: 0-Photon, 1-electron, 2-pi0, 3-eta, 4-a-proton, 5-a-neutron, 6-stable particles,
280 // 7-other decays, 8-string, 9-final parton, 10-initial parton, intermediate, 11-colliding proton, 12-unrelated
0333ede6 281 TH2F * fhMCOrgMass[13]; //! Mass vs pt of real pairs, check common origin of pair
282 TH2F * fhMCOrgAsym[13]; //! Asymmetry vs pt of real pairs, check common origin of pair
283 TH2F * fhMCOrgDeltaEta[13]; //! Delta Eta vs pt of real pairs, check common origin of pair
284 TH2F * fhMCOrgDeltaPhi[13]; //! Delta Phi vs pt of real pairs, check common origin of pair
6175da48 285
286 //Multiple cuts in simulation, origin pi0 or eta
0333ede6 287 TH2F ** fhMCPi0MassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs reconstructed pt of original pair
288 TH2F ** fhMCPi0MassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs generated pt of original pair
289 TH2F ** fhMCPi0PtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed pt vs generated pt of pair
290 TH2F ** fhMCEtaMassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs reconstructed pt of original pair
291 TH2F ** fhMCEtaMassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs generated pt of original pair
292 TH2F ** fhMCEtaPtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed pt vs generated pt of pair
293
294 TH2F * fhMCPi0PtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
295 TH2F * fhMCEtaPtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
6175da48 296
0333ede6 297 ClassDef(AliAnaPi0,20)
1c5acb87 298} ;
299
300
301#endif //ALIANAPI0_H
302
303
304