]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWGGA/CaloTrackCorrelations/AliAnaPi0.h
Merge branch 'master' of http://git.cern.ch/pub/AliRoot
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / AliAnaPi0.h
... / ...
CommitLineData
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
6//_________________________________________________________________________
7// Class to fill two-photon invariant mass histograms
8// to be used to extract pi0 raw yield.
9// Input is produced by AliAnaPhoton (or any other analysis producing output AliAODPWG4Particles),
10// it will do nothing if executed alone
11//
12//-- Author: Dmitri Peressounko (RRC "KI")
13//-- Adapted to CaloTrackCorr frame by Lamia Benhabib (SUBATECH)
14//-- and Gustavo Conesa (INFN-Frascati)
15
16//Root
17class TList;
18class TH3F ;
19class TH2F ;
20class TObjString;
21
22//Analysis
23#include "AliAnaCaloTrackCorrBaseClass.h"
24class AliAODEvent ;
25class AliESDEvent ;
26class AliAODPWG4Particle ;
27
28class AliAnaPi0 : public AliAnaCaloTrackCorrBaseClass {
29
30 public:
31 AliAnaPi0() ; // default ctor
32 virtual ~AliAnaPi0() ;//virtual dtor
33
34 //-------------------------------
35 // General analysis frame methods
36 //-------------------------------
37
38 TObjString * GetAnalysisCuts();
39
40 TList * GetCreateOutputObjects();
41
42 void Print(const Option_t * opt) const;
43
44 void MakeAnalysisFillHistograms();
45
46 void InitParameters();
47
48 //Calorimeter options
49 TString GetCalorimeter() const { return fCalorimeter ; }
50 void SetCalorimeter(TString & det) { fCalorimeter = det ; }
51
52 //-------------------------------
53 // EVENT Bin Methods
54 //-------------------------------
55
56 Int_t GetEventIndex(AliAODPWG4Particle * part, Double_t * vert) ;
57
58 //-------------------------------
59 //Opening angle pair selection
60 //-------------------------------
61 void SwitchOnAngleSelection() { fUseAngleCut = kTRUE ; }
62 void SwitchOffAngleSelection() { fUseAngleCut = kFALSE ; }
63
64 void SwitchOnAngleEDepSelection() { fUseAngleEDepCut = kTRUE ; }
65 void SwitchOffAngleEDepSelection() { fUseAngleEDepCut = kFALSE ; }
66
67 void SetAngleCut(Float_t a) { fAngleCut = a ; }
68 void SetAngleMaxCut(Float_t a) { fAngleMaxCut = a ; }
69
70 void SwitchOnFillAngleHisto() { fFillAngleHisto = kTRUE ; }
71 void SwitchOffFillAngleHisto() { fFillAngleHisto = kFALSE ; }
72
73 //------------------------------------------
74 //Do analysis only with clusters in same SM or different combinations of SM
75 //------------------------------------------
76 void SwitchOnSameSM() { fSameSM = kTRUE ; }
77 void SwitchOffSameSM() { fSameSM = kFALSE ; }
78
79 void SwitchOnSMCombinations() { fFillSMCombinations = kTRUE ; }
80 void SwitchOffSMCombinations() { fFillSMCombinations = kFALSE ; }
81
82 //-------------------------------
83 //Histogram filling options off by default
84 //-------------------------------
85 void SwitchOnInvPtWeight() { fMakeInvPtPlots = kTRUE ; }
86 void SwitchOffInvPtWeight() { fMakeInvPtPlots = kFALSE ; }
87
88 void SwitchOnFillBadDistHisto() { fFillBadDistHisto = kTRUE ; }
89 void SwitchOffFillBadDistHisto() { fFillBadDistHisto = kFALSE ; }
90
91 //-------------------------------------------
92 //Cuts for multiple analysis, off by default
93 //-------------------------------------------
94 void SwitchOnMultipleCutAnalysis() { fMultiCutAna = kTRUE ; }
95 void SwitchOffMultipleCutAnalysis() { fMultiCutAna = kFALSE ; }
96
97 void SetNPtCuts (Int_t s) { if(s <= 10)fNPtCuts = s ; }
98 void SetNAsymCuts (Int_t s) { if(s <= 10)fNAsymCuts = s ; }
99 void SetNNCellCuts(Int_t s) { if(s <= 10)fNCellNCuts = s ; }
100 void SetNPIDBits (Int_t s) { if(s <= 10)fNPIDBits = s ; }
101
102 void SetPtCutsAt (Int_t p,Float_t v) { if(p < 10)fPtCuts[p] = v ; }
103 void SetAsymCutsAt(Int_t p,Float_t v) { if(p < 10)fAsymCuts[p] = v ; }
104 void SetNCellCutsAt(Int_t p,Int_t v) { if(p < 10)fCellNCuts[p]= v ; }
105 void SetPIDBitsAt (Int_t p,Int_t v) { if(p < 10)fPIDBits[p] = v ; }
106
107 void SwitchOnFillSSCombinations() { fFillSSCombinations = kTRUE ; }
108 void SwitchOffFillSSCombinations() { fFillSSCombinations = kFALSE ; }
109
110 void SwitchOnFillAsymmetryHisto() { fFillAsymmetryHisto = kTRUE ; }
111 void SwitchOffFillAsymmetryHisto() { fFillAsymmetryHisto = kFALSE ; }
112
113 void SwitchOnFillOriginHisto() { fFillOriginHisto = kTRUE ; }
114 void SwitchOffFillOriginHisto() { fFillOriginHisto = kFALSE ; }
115
116 void SwitchOnFillArmenterosThetaStarHisto() { fFillArmenterosThetaStar = kTRUE ; }
117 void SwitchOffFillArmenterosThetaStarHisto() { fFillArmenterosThetaStar = kFALSE ; }
118
119 //MC analysis related methods
120
121 void SwitchOnConversionChecker() { fCheckConversion = kTRUE ; }
122 void SwitchOffConversionChecker() { fCheckConversion = kFALSE ; }
123
124 void SwitchOnMultipleCutAnalysisInSimulation() { fMultiCutAnaSim = kTRUE ; }
125 void SwitchOffMultipleCutAnalysisInSimulation() { fMultiCutAnaSim = kFALSE ; }
126
127 void SwitchOnCheckAcceptanceInSector() { fCheckAccInSector = kTRUE ; }
128 void SwitchOffCheckAcceptanceInSector(){ fCheckAccInSector = kFALSE ; }
129
130 void FillAcceptanceHistograms();
131 void FillMCVersusRecDataHistograms(Int_t index1, Int_t index2,
132 Float_t pt1, Float_t pt2,
133 Int_t ncells1, Int_t ncells2,
134 Double_t mass, Double_t pt, Double_t asym,
135 Double_t deta, Double_t dphi);
136
137 void FillArmenterosThetaStar(Int_t pdg, TLorentzVector meson,
138 TLorentzVector daugh1, TLorentzVector daugh2);
139
140
141 private:
142
143 TList ** fEventsList ; //![GetNCentrBin()*GetNZvertBin()*GetNRPBin()] Containers for photons in stored events
144
145 TString fCalorimeter ; // Select Calorimeter for IM
146 Int_t fNModules ; // Number of EMCAL/PHOS modules, set as many histogras as modules
147
148 Bool_t fUseAngleCut ; // Select pairs depending on their opening angle
149 Bool_t fUseAngleEDepCut ; // Select pairs depending on their opening angle
150 Float_t fAngleCut ; // Select pairs with opening angle larger than a threshold
151 Float_t fAngleMaxCut ; // Select pairs with opening angle smaller than a threshold
152
153 //Multiple cuts analysis
154 Bool_t fMultiCutAna; // Do analysis with several or fixed cut
155 Bool_t fMultiCutAnaSim; // Do analysis with several or fixed cut, in the simulation related part
156 Int_t fNPtCuts; // Number of pt cuts
157 Float_t fPtCuts[10]; // Array with different pt cuts
158 Int_t fNAsymCuts; // Number of assymmetry cuts
159 Float_t fAsymCuts[10]; // Array with different assymetry cuts
160 Int_t fNCellNCuts; // Number of cuts with number of cells in cluster
161 Int_t fCellNCuts[10]; // Array with different cell number cluster cuts
162 Int_t fNPIDBits ; // Number of possible PID bit combinations
163 Int_t fPIDBits[10]; // Array with different PID bits
164
165 //Switchs of different analysis options
166 Bool_t fMakeInvPtPlots; // D plots with inverse pt weight
167 Bool_t fSameSM; // Select only pairs in same SM;
168 Bool_t fFillSMCombinations; // Fill histograms with different cluster pairs in SM combinations
169 Bool_t fCheckConversion; // Fill histograms with tagged photons as conversion
170 Bool_t fFillBadDistHisto; // Do plots for different distances to bad channels
171 Bool_t fFillSSCombinations; // Do invariant mass for different combination of shower shape clusters
172 Bool_t fFillAngleHisto; // Fill histograms with pair opening angle
173 Bool_t fFillAsymmetryHisto; // Fill histograms with asymmetry vs pt
174 Bool_t fFillOriginHisto; // Fill histograms depending on their origin
175 Bool_t fFillArmenterosThetaStar; // Fill armenteros histograms
176
177 Bool_t fCheckAccInSector; // Check that the decay pi0 falls in the same SM or sector
178
179 //Histograms
180
181 //Event characterization
182 TH1F * fhAverTotECluster; //! Average number of clusters in SM
183 TH1F * fhAverTotECell; //! Average number of cells in SM
184 TH2F * fhAverTotECellvsCluster; //! Average number of cells in SM
185 TH1F * fhEDensityCluster; //! Deposited energy in event per cluster
186 TH1F * fhEDensityCell; //! Deposited energy in event per cell vs cluster
187 TH2F * fhEDensityCellvsCluster; //! Deposited energy in event per cell vs cluster
188
189 TH2F ** fhReMod ; //![fNModules] REAL two-photon invariant mass distribution for different calorimeter modules.
190 TH2F ** fhReSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
191 TH2F ** fhReSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
192 TH2F ** fhReDiffPHOSMod ; //![fNModules] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
193 TH2F ** fhMiMod ; //![fNModules] MIXED two-photon invariant mass distribution for different calorimeter modules.
194 TH2F ** fhMiSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
195 TH2F ** fhMiSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
196 TH2F ** fhMiDiffPHOSMod ; //![fNModules-1] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
197
198 // Pairs with at least one cluster tagged as conversion
199 TH2F * fhReConv ; //! REAL two-photon invariant mass distribution one of the pair was 2 clusters with small mass
200 TH2F * fhMiConv ; //! MIXED two-photon invariant mass distribution one of the pair was 2 clusters with small mass
201 TH2F * fhReConv2 ; //! REAL two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
202 TH2F * fhMiConv2 ; //! MIXED two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
203
204 TH2F ** fhRe1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
205 TH2F ** fhMi1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
206 TH2F ** fhRe2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
207 TH2F ** fhMi2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
208 TH2F ** fhRe3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
209 TH2F ** fhMi3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
210
211 //Histograms weighted by inverse pT
212 TH2F ** fhReInvPt1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
213 TH2F ** fhMiInvPt1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
214 TH2F ** fhReInvPt2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
215 TH2F ** fhMiInvPt2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
216 TH2F ** fhReInvPt3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
217 TH2F ** fhMiInvPt3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
218
219 //Multiple cuts: Assymmetry, pt, n cells, PID
220 TH2F ** fhRePtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts*] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
221 TH2F ** fhMiPtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Mixed two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
222 TH2F ** fhRePtNCellAsymCutsSM[12] ; //![fNPtCuts*fNAsymCuts*fNCellNCutsfNModules] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry for each module
223
224 TH2F ** fhRePIDBits ; //![fNPIDBits] REAL two-photon invariant mass distribution for different PID bits
225 TH3F ** fhRePtMult ; //![fNAsymCuts] REAL two-photon invariant mass distribution for different track multiplicity and assymetry cuts
226 TH2F * fhReSS[3] ; //! Combine clusters with 3 different cuts on shower shape
227
228 // Asymmetry vs pt, in pi0/eta regions
229 TH2F * fhRePtAsym ; //! REAL two-photon pt vs asymmetry
230 TH2F * fhRePtAsymPi0 ; //! REAL two-photon pt vs asymmetry, close to pi0 mass
231 TH2F * fhRePtAsymEta ; //! REAL two-photon pt vs asymmetry, close to eta mass
232
233 //Centrality, Event plane bins
234 TH1I * fhEventBin; //! Number of real pairs in a particular bin (cen,vz,rp)
235 TH1I * fhEventMixBin; //! Number of mixed pairs in a particular bin (cen,vz,rp)
236 TH1F * fhCentrality; //! Histogram with centrality bins with at least one pare
237 TH1F * fhCentralityNoPair; //! Histogram with centrality bins with no pair
238
239 TH2F * fhEventPlaneResolution; //! Histogram with Event plane resolution vs centrality
240
241 // Pair opening angle
242 TH2F * fhRealOpeningAngle ; //! Opening angle of pair versus pair energy
243 TH2F * fhRealCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
244 TH2F * fhMixedOpeningAngle ; //! Opening angle of pair versus pair energy
245 TH2F * fhMixedCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
246
247 //MC analysis histograms
248 //Pi0 Acceptance
249 TH1F * fhPrimPi0E ; //! Spectrum of Primary
250 TH1F * fhPrimPi0Pt ; //! Spectrum of Primary
251 TH1F * fhPrimPi0PtRejected ; //! Spectrum of Primary,rejected
252 TH1F * fhPrimPi0AccE ; //! Spectrum of primary with accepted daughters
253 TH1F * fhPrimPi0AccPt ; //! Spectrum of primary with accepted daughters
254 TH2F * fhPrimPi0Y ; //! Rapidity distribution of primary particles vs pT
255 TH2F * fhPrimPi0AccY ; //! Rapidity distribution of primary with accepted daughters vs pT
256 TH2F * fhPrimPi0Yeta ; //! PseudoRapidity distribution of primary particles vs pT
257 TH2F * fhPrimPi0YetaYcut ; //! PseudoRapidity distribution of primary particles vs pT, Y<1
258 TH2F * fhPrimPi0AccYeta ; //! PseudoRapidity distribution of primary with accepted daughters vs pT
259 TH2F * fhPrimPi0Phi ; //! Azimutal distribution of primary particles vs pT
260 TH2F * fhPrimPi0AccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
261 TH2F * fhPrimPi0OpeningAngle ; //! Opening angle of pair versus pair energy, primaries
262 TH2F * fhPrimPi0OpeningAngleAsym ; //! Opening angle of pair versus pair E asymmetry, pi0 primaries
263 TH2F * fhPrimPi0CosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy, pi0 primaries
264 TH2F * fhPrimPi0PtCentrality ; //! primary pi0 reconstructed centrality vs pT
265 TH2F * fhPrimPi0PtEventPlane ; //! primary pi0 reconstructed event plane vs pT
266 TH2F * fhPrimPi0AccPtCentrality ; //! primary pi0 with accepted daughters reconstructed centrality vs pT
267 TH2F * fhPrimPi0AccPtEventPlane ; //! primary pi0 with accepted daughters reconstructed event plane vs pT
268
269 //Eta acceptance
270 TH1F * fhPrimEtaE ; //! Spectrum of Primary
271 TH1F * fhPrimEtaPt ; //! Spectrum of Primary
272 TH1F * fhPrimEtaPtRejected ; //! Spectrum of Primary, rejected
273 TH1F * fhPrimEtaAccE ; //! Spectrum of primary with accepted daughters
274 TH1F * fhPrimEtaAccPt ; //! Spectrum of primary with accepted daughters
275 TH2F * fhPrimEtaY ; //! Rapidity distribution of primary particles vs pT
276 TH2F * fhPrimEtaAccY ; //! Rapidity distribution of primary with accepted daughters vs pT
277 TH2F * fhPrimEtaYeta ; //! PseudoRapidity distribution of primary particles vs pT
278 TH2F * fhPrimEtaYetaYcut ; //! PseudoRapidity distribution of primary particles vs pT, Y<1
279 TH2F * fhPrimEtaAccYeta ; //! PseudoRapidity distribution of primary with accepted daughters vs pT
280 TH2F * fhPrimEtaPhi ; //! Azimutal distribution of primary particles vs pT
281 TH2F * fhPrimEtaAccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
282 TH2F * fhPrimEtaOpeningAngle ; //! Opening angle of pair versus pair energy, eta primaries
283 TH2F * fhPrimEtaOpeningAngleAsym ; //! Opening angle of pair versus pair E asymmetry, eta primaries
284 TH2F * fhPrimEtaCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy, eta primaries
285 TH2F * fhPrimEtaPtCentrality ; //! primary eta reconstructed centrality vs pT
286 TH2F * fhPrimEtaPtEventPlane ; //! primary eta reconstructed event plane vs pT
287 TH2F * fhPrimEtaAccPtCentrality ; //! primary eta with accepted daughters reconstructed centrality vs pT
288 TH2F * fhPrimEtaAccPtEventPlane ; //! primary eta with accepted daughters reconstructed event plane vs pT
289
290 // Primaries origin
291 TH2F * fhPrimPi0PtOrigin ; //! Spectrum of generated pi0 vs mother
292 TH2F * fhPrimEtaPtOrigin ; //! Spectrum of generated eta vs mother
293
294 //Pair origin
295 //Array of histograms ordered as follows: 0-Photon, 1-electron, 2-pi0, 3-eta, 4-a-proton, 5-a-neutron, 6-stable particles,
296 // 7-other decays, 8-string, 9-final parton, 10-initial parton, intermediate, 11-colliding proton, 12-unrelated
297 TH2F * fhMCOrgMass[13]; //! Mass vs pt of real pairs, check common origin of pair
298 TH2F * fhMCOrgAsym[13]; //! Asymmetry vs pt of real pairs, check common origin of pair
299 TH2F * fhMCOrgDeltaEta[13]; //! Delta Eta vs pt of real pairs, check common origin of pair
300 TH2F * fhMCOrgDeltaPhi[13]; //! Delta Phi vs pt of real pairs, check common origin of pair
301
302 //Multiple cuts in simulation, origin pi0 or eta
303 TH2F ** fhMCPi0MassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs reconstructed pt of original pair
304 TH2F ** fhMCPi0MassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs generated pt of original pair
305 TH2F ** fhMCPi0PtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed pt vs generated pt of pair
306 TH2F ** fhMCEtaMassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs reconstructed pt of original pair
307 TH2F ** fhMCEtaMassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs generated pt of original pair
308 TH2F ** fhMCEtaPtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed pt vs generated pt of pair
309
310 TH2F * fhMCPi0PtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
311 TH2F * fhMCEtaPtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
312
313 TH2F * fhReMCFromConversion ; //! Invariant mass of 2 clusters originated in conversions
314 TH2F * fhReMCFromNotConversion ; //! Invariant mass of 2 clusters not originated in conversions
315 TH2F * fhReMCFromMixConversion ; //! Invariant mass of 2 clusters one from conversion and the other not
316
317 TH2F * fhArmPrimPi0[4]; //! Armenteros plots for primary pi0 in 6 energy bins
318 TH2F * fhArmPrimEta[4]; //! Armenteros plots for primary eta in 6 energy bins
319 TH2F * fhCosThStarPrimPi0; //! cos(theta*) plots vs E for primary pi0, same as asymmetry ...
320 TH2F * fhCosThStarPrimEta; //! cos(theta*) plots vs E for primary eta, same as asymmetry ...
321
322 AliAnaPi0( const AliAnaPi0 & api0) ; // cpy ctor
323 AliAnaPi0 & operator = (const AliAnaPi0 & api0) ; // cpy assignment
324
325 ClassDef(AliAnaPi0,27)
326} ;
327
328
329#endif //ALIANAPI0_H
330
331
332