3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
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
12 //-- Author: Dmitri Peressounko (RRC "KI")
13 //-- Adapted to CaloTrackCorr frame by Lamia Benhabib (SUBATECH)
14 //-- and Gustavo Conesa (INFN-Frascati)
23 #include "AliAnaCaloTrackCorrBaseClass.h"
26 class AliAODPWG4Particle ;
28 class AliAnaPi0 : public AliAnaCaloTrackCorrBaseClass {
31 AliAnaPi0() ; // default ctor
32 virtual ~AliAnaPi0() ;//virtual dtor
34 //-------------------------------
35 // General analysis frame methods
36 //-------------------------------
38 TObjString * GetAnalysisCuts();
40 TList * GetCreateOutputObjects();
42 void Print(const Option_t * opt) const;
44 void MakeAnalysisFillHistograms();
46 void InitParameters();
49 TString GetCalorimeter() const { return fCalorimeter ; }
50 void SetCalorimeter(TString & det) { fCalorimeter = det ; }
51 void SetNumberOfModules(Int_t nmod) { fNModules = nmod ; }
53 //-------------------------------
55 //-------------------------------
57 Int_t GetEventIndex(AliAODPWG4Particle * part, Double_t * vert) ;
59 //-------------------------------
60 //Opening angle pair selection
61 //-------------------------------
62 void SwitchOnAngleSelection() { fUseAngleCut = kTRUE ; }
63 void SwitchOffAngleSelection() { fUseAngleCut = kFALSE ; }
65 void SwitchOnAngleEDepSelection() { fUseAngleEDepCut = kTRUE ; }
66 void SwitchOffAngleEDepSelection() { fUseAngleEDepCut = kFALSE ; }
68 void SetAngleCut(Float_t a) { fAngleCut = a ; }
69 void SetAngleMaxCut(Float_t a) { fAngleMaxCut = a ; }
71 void SwitchOnFillAngleHisto() { fFillAngleHisto = kTRUE ; }
72 void SwitchOffFillAngleHisto() { fFillAngleHisto = kFALSE ; }
74 //------------------------------------------
75 //Do analysis only with clusters in same SM or different combinations of SM
76 //------------------------------------------
77 void SwitchOnSameSM() { fSameSM = kTRUE ; }
78 void SwitchOffSameSM() { fSameSM = kFALSE ; }
80 void SwitchOnSMCombinations() { fFillSMCombinations = kTRUE ; }
81 void SwitchOffSMCombinations() { fFillSMCombinations = kFALSE ; }
83 //-------------------------------
84 //Histogram filling options off by default
85 //-------------------------------
86 void SwitchOnInvPtWeight() { fMakeInvPtPlots = kTRUE ; }
87 void SwitchOffInvPtWeight() { fMakeInvPtPlots = kFALSE ; }
89 void SwitchOnFillBadDistHisto() { fFillBadDistHisto = kTRUE ; }
90 void SwitchOffFillBadDistHisto() { fFillBadDistHisto = kFALSE ; }
92 //-------------------------------------------
93 //Cuts for multiple analysis, off by default
94 //-------------------------------------------
95 void SwitchOnMultipleCutAnalysis() { fMultiCutAna = kTRUE ; }
96 void SwitchOffMultipleCutAnalysis() { fMultiCutAna = kFALSE ; }
98 void SetNPtCuts (Int_t s) { if(s <= 10)fNPtCuts = s ; }
99 void SetNAsymCuts (Int_t s) { if(s <= 10)fNAsymCuts = s ; }
100 void SetNNCellCuts(Int_t s) { if(s <= 10)fNCellNCuts = s ; }
101 void SetNPIDBits (Int_t s) { if(s <= 10)fNPIDBits = s ; }
103 void SetPtCutsAt (Int_t p,Float_t v) { if(p < 10)fPtCuts[p] = v ; }
104 void SetAsymCutsAt(Int_t p,Float_t v) { if(p < 10)fAsymCuts[p] = v ; }
105 void SetNCellCutsAt(Int_t p,Int_t v) { if(p < 10)fCellNCuts[p]= v ; }
106 void SetPIDBitsAt (Int_t p,Int_t v) { if(p < 10)fPIDBits[p] = v ; }
108 void SwitchOnFillSSCombinations() { fFillSSCombinations = kTRUE ; }
109 void SwitchOffFillSSCombinations() { fFillSSCombinations = kFALSE ; }
111 void SwitchOnFillAsymmetryHisto() { fFillAsymmetryHisto = kTRUE ; }
112 void SwitchOffFillAsymmetryHisto() { fFillAsymmetryHisto = kFALSE ; }
114 void SwitchOnFillOriginHisto() { fFillOriginHisto = kTRUE ; }
115 void SwitchOffFillOriginHisto() { fFillOriginHisto = kFALSE ; }
117 void SwitchOnFillArmenterosThetaStarHisto() { fFillArmenterosThetaStar = kTRUE ; }
118 void SwitchOffFillArmenterosThetaStarHisto() { fFillArmenterosThetaStar = kFALSE ; }
120 //MC analysis related methods
122 void SwitchOnConversionChecker() { fCheckConversion = kTRUE ; }
123 void SwitchOffConversionChecker() { fCheckConversion = kFALSE ; }
125 void SwitchOnMultipleCutAnalysisInSimulation() { fMultiCutAnaSim = kTRUE ; }
126 void SwitchOffMultipleCutAnalysisInSimulation() { fMultiCutAnaSim = kFALSE ; }
128 void FillAcceptanceHistograms();
129 void FillMCVersusRecDataHistograms(Int_t index1, Int_t index2,
130 Float_t pt1, Float_t pt2,
131 Int_t ncells1, Int_t ncells2,
132 Double_t mass, Double_t pt, Double_t asym,
133 Double_t deta, Double_t dphi);
135 void FillArmenterosThetaStar(Int_t pdg, TLorentzVector meson,
136 TLorentzVector daugh1, TLorentzVector daugh2);
141 TList ** fEventsList ; //![GetNCentrBin()*GetNZvertBin()*GetNRPBin()] Containers for photons in stored events
143 TString fCalorimeter ; // Select Calorimeter for IM
144 Int_t fNModules ; // Number of EMCAL/PHOS modules, set as many histogras as modules
146 Bool_t fUseAngleCut ; // Select pairs depending on their opening angle
147 Bool_t fUseAngleEDepCut ; // Select pairs depending on their opening angle
148 Float_t fAngleCut ; // Select pairs with opening angle larger than a threshold
149 Float_t fAngleMaxCut ; // Select pairs with opening angle smaller than a threshold
151 //Multiple cuts analysis
152 Bool_t fMultiCutAna; // Do analysis with several or fixed cut
153 Bool_t fMultiCutAnaSim; // Do analysis with several or fixed cut, in the simulation related part
154 Int_t fNPtCuts; // Number of pt cuts
155 Float_t fPtCuts[10]; // Array with different pt cuts
156 Int_t fNAsymCuts; // Number of assymmetry cuts
157 Float_t fAsymCuts[10]; // Array with different assymetry cuts
158 Int_t fNCellNCuts; // Number of cuts with number of cells in cluster
159 Int_t fCellNCuts[10]; // Array with different cell number cluster cuts
160 Int_t fNPIDBits ; // Number of possible PID bit combinations
161 Int_t fPIDBits[10]; // Array with different PID bits
163 //Switchs of different analysis options
164 Bool_t fMakeInvPtPlots; // D plots with inverse pt weight
165 Bool_t fSameSM; // Select only pairs in same SM;
166 Bool_t fFillSMCombinations; // Fill histograms with different cluster pairs in SM combinations
167 Bool_t fCheckConversion; // Fill histograms with tagged photons as conversion
168 Bool_t fFillBadDistHisto; // Do plots for different distances to bad channels
169 Bool_t fFillSSCombinations; // Do invariant mass for different combination of shower shape clusters
170 Bool_t fFillAngleHisto; // Fill histograms with pair opening angle
171 Bool_t fFillAsymmetryHisto; // Fill histograms with asymmetry vs pt
172 Bool_t fFillOriginHisto; // Fill histograms depending on their origin
173 Bool_t fFillArmenterosThetaStar; // Fill armenteros histograms
177 //Event characterization
178 TH1F * fhAverTotECluster; //! Average number of clusters in SM
179 TH1F * fhAverTotECell; //! Average number of cells in SM
180 TH2F * fhAverTotECellvsCluster; //! Average number of cells in SM
181 TH1F * fhEDensityCluster; //! Deposited energy in event per cluster
182 TH1F * fhEDensityCell; //! Deposited energy in event per cell vs cluster
183 TH2F * fhEDensityCellvsCluster; //! Deposited energy in event per cell vs cluster
185 TH2F ** fhReMod ; //![fNModules] REAL two-photon invariant mass distribution for different calorimeter modules.
186 TH2F ** fhReSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
187 TH2F ** fhReSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
188 TH2F ** fhReDiffPHOSMod ; //![fNModules] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
189 TH2F ** fhMiMod ; //![fNModules] MIXED two-photon invariant mass distribution for different calorimeter modules.
190 TH2F ** fhMiSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
191 TH2F ** fhMiSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
192 TH2F ** fhMiDiffPHOSMod ; //![fNModules-1] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
194 // Pairs with at least one cluster tagged as conversion
195 TH2F * fhReConv ; //! REAL two-photon invariant mass distribution one of the pair was 2 clusters with small mass
196 TH2F * fhMiConv ; //! MIXED two-photon invariant mass distribution one of the pair was 2 clusters with small mass
197 TH2F * fhReConv2 ; //! REAL two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
198 TH2F * fhMiConv2 ; //! MIXED two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
200 TH2F ** fhRe1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
201 TH2F ** fhMi1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
202 TH2F ** fhRe2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
203 TH2F ** fhMi2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
204 TH2F ** fhRe3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
205 TH2F ** fhMi3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
207 //Histograms weighted by inverse pT
208 TH2F ** fhReInvPt1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
209 TH2F ** fhMiInvPt1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
210 TH2F ** fhReInvPt2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
211 TH2F ** fhMiInvPt2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
212 TH2F ** fhReInvPt3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
213 TH2F ** fhMiInvPt3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
215 //Multiple cuts: Assymmetry, pt, n cells, PID
216 TH2F ** fhRePtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts*] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
217 TH2F ** fhMiPtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Mixed two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
218 TH2F ** fhRePtNCellAsymCutsSM[12] ; //![fNPtCuts*fNAsymCuts*fNCellNCutsfNModules] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry for each module
220 TH2F ** fhRePIDBits ; //![fNPIDBits] REAL two-photon invariant mass distribution for different PID bits
221 TH3F ** fhRePtMult ; //![fNAsymCuts] REAL two-photon invariant mass distribution for different track multiplicity and assymetry cuts
222 TH2F * fhReSS[3] ; //! Combine clusters with 3 different cuts on shower shape
224 // Asymmetry vs pt, in pi0/eta regions
225 TH2F * fhRePtAsym ; //! REAL two-photon pt vs asymmetry
226 TH2F * fhRePtAsymPi0 ; //! REAL two-photon pt vs asymmetry, close to pi0 mass
227 TH2F * fhRePtAsymEta ; //! REAL two-photon pt vs asymmetry, close to eta mass
229 //Centrality, Event plane bins
230 TH1I * fhEventBin; //! Number of real pairs in a particular bin (cen,vz,rp)
231 TH1I * fhEventMixBin; //! Number of mixed pairs in a particular bin (cen,vz,rp)
232 TH1F * fhCentrality; //! Histogram with centrality bins with at least one pare
233 TH1F * fhCentralityNoPair; //! Histogram with centrality bins with no pair
235 TH2F * fhEventPlaneResolution; //! Histogram with Event plane resolution vs centrality
237 // Pair opening angle
238 TH2F * fhRealOpeningAngle ; //! Opening angle of pair versus pair energy
239 TH2F * fhRealCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
240 TH2F * fhMixedOpeningAngle ; //! Opening angle of pair versus pair energy
241 TH2F * fhMixedCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
243 //MC analysis histograms
245 TH1F * fhPrimPi0E ; //! Spectrum of Primary
246 TH1F * fhPrimPi0Pt ; //! Spectrum of Primary
247 TH1F * fhPrimPi0AccE ; //! Spectrum of primary with accepted daughters
248 TH1F * fhPrimPi0AccPt ; //! Spectrum of primary with accepted daughters
249 TH2F * fhPrimPi0Y ; //! Rapidity distribution of primary particles vs pT
250 TH2F * fhPrimPi0AccY ; //! Rapidity distribution of primary with accepted daughters vs pT
251 TH2F * fhPrimPi0Phi ; //! Azimutal distribution of primary particles vs pT
252 TH2F * fhPrimPi0AccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
253 TH2F * fhPrimPi0OpeningAngle ; //! Opening angle of pair versus pair energy, primaries
254 TH2F * fhPrimPi0OpeningAngleAsym ; //! Opening angle of pair versus pair E asymmetry, pi0 primaries
255 TH2F * fhPrimPi0CosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy, pi0 primaries
256 TH2F * fhPrimPi0PtCentrality ; //! primary pi0 reconstructed centrality vs pT
257 TH2F * fhPrimPi0PtEventPlane ; //! primary pi0 reconstructed event plane vs pT
258 TH2F * fhPrimPi0AccPtCentrality ; //! primary pi0 with accepted daughters reconstructed centrality vs pT
259 TH2F * fhPrimPi0AccPtEventPlane ; //! primary pi0 with accepted daughters reconstructed event plane vs pT
262 TH1F * fhPrimEtaE ; //! Spectrum of Primary
263 TH1F * fhPrimEtaPt ; //! Spectrum of Primary
264 TH1F * fhPrimEtaAccE ; //! Spectrum of primary with accepted daughters
265 TH1F * fhPrimEtaAccPt ; //! Spectrum of primary with accepted daughters
266 TH2F * fhPrimEtaY ; //! Rapidity distribution of primary particles vs pT
267 TH2F * fhPrimEtaAccY ; //! Rapidity distribution of primary with accepted daughters vs pT
268 TH2F * fhPrimEtaPhi ; //! Azimutal distribution of primary particles vs pT
269 TH2F * fhPrimEtaAccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
270 TH2F * fhPrimEtaOpeningAngle ; //! Opening angle of pair versus pair energy, eta primaries
271 TH2F * fhPrimEtaOpeningAngleAsym ; //! Opening angle of pair versus pair E asymmetry, eta primaries
272 TH2F * fhPrimEtaCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy, eta primaries
273 TH2F * fhPrimEtaPtCentrality ; //! primary eta reconstructed centrality vs pT
274 TH2F * fhPrimEtaPtEventPlane ; //! primary eta reconstructed event plane vs pT
275 TH2F * fhPrimEtaAccPtCentrality ; //! primary eta with accepted daughters reconstructed centrality vs pT
276 TH2F * fhPrimEtaAccPtEventPlane ; //! primary eta with accepted daughters reconstructed event plane vs pT
279 TH2F * fhPrimPi0PtOrigin ; //! Spectrum of generated pi0 vs mother
280 TH2F * fhPrimEtaPtOrigin ; //! Spectrum of generated eta vs mother
283 //Array of histograms ordered as follows: 0-Photon, 1-electron, 2-pi0, 3-eta, 4-a-proton, 5-a-neutron, 6-stable particles,
284 // 7-other decays, 8-string, 9-final parton, 10-initial parton, intermediate, 11-colliding proton, 12-unrelated
285 TH2F * fhMCOrgMass[13]; //! Mass vs pt of real pairs, check common origin of pair
286 TH2F * fhMCOrgAsym[13]; //! Asymmetry vs pt of real pairs, check common origin of pair
287 TH2F * fhMCOrgDeltaEta[13]; //! Delta Eta vs pt of real pairs, check common origin of pair
288 TH2F * fhMCOrgDeltaPhi[13]; //! Delta Phi vs pt of real pairs, check common origin of pair
290 //Multiple cuts in simulation, origin pi0 or eta
291 TH2F ** fhMCPi0MassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs reconstructed pt of original pair
292 TH2F ** fhMCPi0MassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs generated pt of original pair
293 TH2F ** fhMCPi0PtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed pt vs generated pt of pair
294 TH2F ** fhMCEtaMassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs reconstructed pt of original pair
295 TH2F ** fhMCEtaMassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs generated pt of original pair
296 TH2F ** fhMCEtaPtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed pt vs generated pt of pair
298 TH2F * fhMCPi0PtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
299 TH2F * fhMCEtaPtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
301 TH2F * fhReMCFromConversion ; //! Invariant mass of 2 clusters originated in conversions
302 TH2F * fhReMCFromNotConversion ; //! Invariant mass of 2 clusters not originated in conversions
303 TH2F * fhReMCFromMixConversion ; //! Invariant mass of 2 clusters one from conversion and the other not
305 TH2F * fhArmPrimPi0[4]; //! Armenteros plots for primary pi0 in 6 energy bins
306 TH2F * fhArmPrimEta[4]; //! Armenteros plots for primary eta in 6 energy bins
307 TH2F * fhCosThStarPrimPi0; //! cos(theta*) plots vs E for primary pi0, same as asymmetry ...
308 TH2F * fhCosThStarPrimEta; //! cos(theta*) plots vs E for primary eta, same as asymmetry ...
310 AliAnaPi0( const AliAnaPi0 & api0) ; // cpy ctor
311 AliAnaPi0 & operator = (const AliAnaPi0 & api0) ; // cpy assignment
313 ClassDef(AliAnaPi0,26)