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 void CountAndGetAverages(Int_t &nClus,Int_t &nCell, Float_t &eClusTot,Float_t &eCellTot, Float_t &eDenClus,Float_t &eDenCell) ;
61 //Switchs for event multiplicity bin option, by default, centrality
63 void SwitchOnTrackMultBins() { fUseTrackMultBins = kTRUE ; }
64 void SwitchOffTrackMultBins() { fUseTrackMultBins = kFALSE ; }
66 void SwitchOnPhotonMultBins() { fUsePhotonMultBins = kTRUE ; }
67 void SwitchOffPhotonMultBins() { fUsePhotonMultBins = kFALSE ; }
69 void SwitchOnClusterEBins() { fUseAverClusterEBins = kTRUE ; }
70 void SwitchOffClusterEBins() { fUseAverClusterEBins = kFALSE ; }
72 void SwitchOnCellEBins() { fUseAverCellEBins = kTRUE ; }
73 void SwitchOffCellEBins() { fUseAverCellEBins = kFALSE ; }
75 void SwitchOnClusterEDenBins() { fUseAverClusterEDenBins = kTRUE ; }
76 void SwitchOffClusterEDenBins() { fUseAverClusterEDenBins = kFALSE ; }
78 //-------------------------------
79 //Opening angle pair selection
80 //-------------------------------
81 void SwitchOnAngleSelection() { fUseAngleCut = kTRUE ; }
82 void SwitchOffAngleSelection() { fUseAngleCut = kFALSE ; }
84 void SwitchOnAngleEDepSelection() { fUseAngleEDepCut = kTRUE ; }
85 void SwitchOffAngleEDepSelection() { fUseAngleEDepCut = kFALSE ; }
87 void SetAngleCut(Float_t a) { fAngleCut = a ; }
88 void SetAngleMaxCut(Float_t a) { fAngleMaxCut = a ; }
90 void SwitchOnFillAngleHisto() { fFillAngleHisto = kTRUE ; }
91 void SwitchOffFillAngleHisto() { fFillAngleHisto = kFALSE ; }
93 //-------------------------------
94 // Use mixing code of this class
95 //-------------------------------
96 void SwitchOnOwnMix() { fDoOwnMix = kTRUE ; }
97 void SwitchOffOwnMix() { fDoOwnMix = kFALSE ; }
99 //------------------------------------------
100 //Do analysis only with clusters in same SM or different combinations of SM
101 //------------------------------------------
102 void SwitchOnSameSM() { fSameSM = kTRUE ; }
103 void SwitchOffSameSM() { fSameSM = kFALSE ; }
105 void SwitchOnSMCombinations() { fFillSMCombinations = kTRUE ; }
106 void SwitchOffSMCombinations() { fFillSMCombinations = kFALSE ; }
108 //-------------------------------
109 //Histogram filling options off by default
110 //-------------------------------
111 void SwitchOnInvPtWeight() { fMakeInvPtPlots = kTRUE ; }
112 void SwitchOffInvPtWeight() { fMakeInvPtPlots = kFALSE ; }
114 void SwitchOnFillBadDistHisto() { fFillBadDistHisto = kTRUE ; }
115 void SwitchOffFillBadDistHisto() { fFillBadDistHisto = kFALSE ; }
117 //-------------------------------------------
118 //Cuts for multiple analysis, off by default
119 //-------------------------------------------
120 void SwitchOnMultipleCutAnalysis() { fMultiCutAna = kTRUE ; }
121 void SwitchOffMultipleCutAnalysis() { fMultiCutAna = kFALSE ; }
123 void SetNPtCuts (Int_t s) { if(s <= 10)fNPtCuts = s ; }
124 void SetNAsymCuts (Int_t s) { if(s <= 10)fNAsymCuts = s ; }
125 void SetNNCellCuts(Int_t s) { if(s <= 10)fNCellNCuts = s ; }
126 void SetNPIDBits (Int_t s) { if(s <= 10)fNPIDBits = s ; }
128 void SetPtCutsAt (Int_t p,Float_t v) { if(p < 10)fPtCuts[p] = v ; }
129 void SetAsymCutsAt(Int_t p,Float_t v) { if(p < 10)fAsymCuts[p] = v ; }
130 void SetNCellCutsAt(Int_t p,Int_t v) { if(p < 10)fCellNCuts[p]= v ; }
131 void SetPIDBitsAt (Int_t p,Int_t v) { if(p < 10)fPIDBits[p] = v ; }
133 void SwitchOnFillSSCombinations() { fFillSSCombinations = kTRUE ; }
134 void SwitchOffFillSSCombinations() { fFillSSCombinations = kFALSE ; }
136 void SwitchOnFillAsymmetryHisto() { fFillAsymmetryHisto = kTRUE ; }
137 void SwitchOffFillAsymmetryHisto() { fFillAsymmetryHisto = kFALSE ; }
140 //MC analysis related methods
142 void SwitchOnConversionChecker() { fCheckConversion = kTRUE ; }
143 void SwitchOffConversionChecker() { fCheckConversion = kFALSE ; }
145 void SwitchOnMultipleCutAnalysisInSimulation() { fMultiCutAnaSim = kTRUE ; }
146 void SwitchOffMultipleCutAnalysisInSimulation() { fMultiCutAnaSim = kFALSE ; }
148 void FillAcceptanceHistograms();
149 void FillMCVersusRecDataHistograms(const Int_t index1, const Int_t index2,
150 const Float_t pt1, const Float_t pt2,
151 const Int_t ncells1, const Int_t ncells2,
152 const Double_t mass, const Double_t pt, const Double_t asym,
153 const Double_t deta, const Double_t dphi);
157 Bool_t fDoOwnMix; // Do combinatorial background not the one provided by the frame
158 TList ** fEventsList ; //![GetNCentrBin()*GetNZvertBin()*GetNRPBin()] Containers for photons in stored events
160 TString fCalorimeter ; // Select Calorimeter for IM
161 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
168 //Multiple cuts analysis
169 Bool_t fMultiCutAna; // Do analysis with several or fixed cut
170 Bool_t fMultiCutAnaSim; // Do analysis with several or fixed cut, in the simulation related part
171 Int_t fNPtCuts; // Number of pt cuts
172 Float_t fPtCuts[10]; // Array with different pt cuts
173 Int_t fNAsymCuts; // Number of assymmetry cuts
174 Float_t fAsymCuts[10]; // Array with different assymetry cuts
175 Int_t fNCellNCuts; // Number of cuts with number of cells in cluster
176 Int_t fCellNCuts[10]; // Array with different cell number cluster cuts
177 Int_t fNPIDBits ; // Number of possible PID bit combinations
178 Int_t fPIDBits[10]; // Array with different PID bits
180 //Switchs of different analysis options
181 Bool_t fMakeInvPtPlots; // D plots with inverse pt weight
182 Bool_t fSameSM; // Select only pairs in same SM;
183 Bool_t fFillSMCombinations; // Fill histograms with different cluster pairs in SM combinations
184 Bool_t fCheckConversion; // Fill histograms with tagged photons as conversion
185 Bool_t fUseTrackMultBins; // Use track multiplicity and not centrality bins
186 Bool_t fUsePhotonMultBins; // Use photon multiplicity and not centrality bins
187 Bool_t fUseAverCellEBins; // Use cell average energy and not centrality bins
188 Bool_t fUseAverClusterEBins; // Use cluster average energy and not centrality bins
189 Bool_t fUseAverClusterEDenBins; // Use cluster average energy density and not centrality bins
190 Bool_t fFillBadDistHisto; // Do plots for different distances to bad channels
191 Bool_t fFillSSCombinations; // Do invariant mass for different combination of shower shape clusters
192 Bool_t fFillAngleHisto; // Fill histograms with pair opening angle
193 Bool_t fFillAsymmetryHisto; // Fill histograms with asymmetry vs pt
197 //Event characterization
198 TH1F * fhAverTotECluster; //! Average number of clusters in SM
199 TH1F * fhAverTotECell; //! Average number of cells in SM
200 TH2F * fhAverTotECellvsCluster; //! Average number of cells in SM
201 TH1F * fhEDensityCluster; //! Deposited energy in event per cluster
202 TH1F * fhEDensityCell; //! Deposited energy in event per cell vs cluster
203 TH2F * fhEDensityCellvsCluster; //! Deposited energy in event per cell vs cluster
205 TH2F ** fhReMod ; //![fNModules] REAL two-photon invariant mass distribution for different calorimeter modules.
206 TH2F ** fhReSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
207 TH2F ** fhReSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
208 TH2F ** fhReDiffPHOSMod ; //![fNModules] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
209 TH2F ** fhMiMod ; //![fNModules] MIXED two-photon invariant mass distribution for different calorimeter modules.
210 TH2F ** fhMiSameSideEMCALMod ; //![fNModules-2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
211 TH2F ** fhMiSameSectorEMCALMod ; //![fNModules/2] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
212 TH2F ** fhMiDiffPHOSMod ; //![fNModules-1] REAL two-photon invariant mass distribution for different clusters in different calorimeter modules.
214 // Pairs with at least one cluster tagged as conversion
215 TH2F * fhReConv ; //! REAL two-photon invariant mass distribution one of the pair was 2 clusters with small mass
216 TH2F * fhMiConv ; //! MIXED two-photon invariant mass distribution one of the pair was 2 clusters with small mass
217 TH2F * fhReConv2 ; //! REAL two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
218 TH2F * fhMiConv2 ; //! MIXED two-photon invariant mass distribution both pair photons recombined from 2 clusters with small mass
220 TH2F ** fhRe1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
221 TH2F ** fhMi1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
222 TH2F ** fhRe2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
223 TH2F ** fhMi2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
224 TH2F ** fhRe3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry
225 TH2F ** fhMi3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry
227 //Histograms weighted by inverse pT
228 TH2F ** fhReInvPt1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
229 TH2F ** fhMiInvPt1 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
230 TH2F ** fhReInvPt2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
231 TH2F ** fhMiInvPt2 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
232 TH2F ** fhReInvPt3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] REAL two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
233 TH2F ** fhMiInvPt3 ; //![GetNCentrBin()*fNPIDBits*fNAsymCuts] MIXED two-photon invariant mass distribution for different centralities and Asymmetry, inverse pT
235 //Multiple cuts: Assymmetry, pt, n cells, PID
236 TH2F ** fhRePtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts*] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
237 TH2F ** fhMiPtNCellAsymCuts ; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Mixed two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry
238 TH2F ** fhRePtNCellAsymCutsSM[12] ; //![fNPtCuts*fNAsymCuts*fNCellNCutsfNModules] REAL two-photon invariant mass distribution for different pt cut, n cell cuts and assymetry for each module
240 TH2F ** fhRePIDBits ; //![fNPIDBits] REAL two-photon invariant mass distribution for different PID bits
241 TH3F ** fhRePtMult ; //![fNAsymCuts] REAL two-photon invariant mass distribution for different track multiplicity and assymetry cuts
242 TH2F * fhReSS[3] ; //! Combine clusters with 3 different cuts on shower shape
244 // Asymmetry vs pt, in pi0/eta regions
245 TH2F * fhRePtAsym ; //! REAL two-photon pt vs asymmetry
246 TH2F * fhRePtAsymPi0 ; //! REAL two-photon pt vs asymmetry, close to pi0 mass
247 TH2F * fhRePtAsymEta ; //! REAL two-photon pt vs asymmetry, close to eta mass
249 //Centrality, Event plane bins
250 TH3F * fhEvents; //! Number of events per centrality, RP, zbin
251 TH1F * fhCentrality; //! Histogram with centrality bins with at least one pare
252 TH1F * fhCentralityNoPair; //! Histogram with centrality bins with no pair
254 TH1F * fhEventPlaneAngle; //! Histogram with Event plane angle
255 TH2F * fhEventPlaneResolution; //! Histogram with Event plane resolution vs centrality
257 // Pair opening angle
258 TH2F * fhRealOpeningAngle ; //! Opening angle of pair versus pair energy
259 TH2F * fhRealCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
260 TH2F * fhMixedOpeningAngle ; //! Opening angle of pair versus pair energy
261 TH2F * fhMixedCosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy
263 //MC analysis histograms
265 TH1F * fhPrimPi0Pt ; //! Spectrum of Primary
266 TH1F * fhPrimPi0AccPt ; //! Spectrum of primary with accepted daughters
267 TH2F * fhPrimPi0Y ; //! Rapidity distribution of primary particles vs pT
268 TH2F * fhPrimPi0AccY ; //! Rapidity distribution of primary with accepted daughters vs pT
269 TH2F * fhPrimPi0Phi ; //! Azimutal distribution of primary particles vs pT
270 TH2F * fhPrimPi0AccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
271 TH2F * fhPrimPi0OpeningAngle ; //! Opening angle of pair versus pair energy, primaries
272 TH2F * fhPrimPi0CosOpeningAngle ; //! Cosinus of opening angle of pair version pair energy, primaries
274 TH1F * fhPrimEtaPt ; //! Spectrum of Primary
275 TH1F * fhPrimEtaAccPt ; //! Spectrum of primary with accepted daughters
276 TH2F * fhPrimEtaY ; //! Rapidity distribution of primary particles vs pT
277 TH2F * fhPrimEtaAccY ; //! Rapidity distribution of primary with accepted daughters vs pT
278 TH2F * fhPrimEtaPhi ; //! Azimutal distribution of primary particles vs pT
279 TH2F * fhPrimEtaAccPhi; //! Azimutal distribution of primary with accepted daughters vs pT
282 TH2F * fhPrimPi0PtOrigin ; //! Spectrum of generated pi0 vs mother
283 TH2F * fhPrimEtaPtOrigin ; //! Spectrum of generated eta vs mother
286 //Array of histograms ordered as follows: 0-Photon, 1-electron, 2-pi0, 3-eta, 4-a-proton, 5-a-neutron, 6-stable particles,
287 // 7-other decays, 8-string, 9-final parton, 10-initial parton, intermediate, 11-colliding proton, 12-unrelated
288 TH2F * fhMCOrgMass[13]; //! Mass vs pt of real pairs, check common origin of pair
289 TH2F * fhMCOrgAsym[13]; //! Asymmetry vs pt of real pairs, check common origin of pair
290 TH2F * fhMCOrgDeltaEta[13]; //! Delta Eta vs pt of real pairs, check common origin of pair
291 TH2F * fhMCOrgDeltaPhi[13]; //! Delta Phi vs pt of real pairs, check common origin of pair
293 //Multiple cuts in simulation, origin pi0 or eta
294 TH2F ** fhMCPi0MassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs reconstructed pt of original pair
295 TH2F ** fhMCPi0MassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed mass vs generated pt of original pair
296 TH2F ** fhMCPi0PtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real pi0 pairs, reconstructed pt vs generated pt of pair
297 TH2F ** fhMCEtaMassPtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs reconstructed pt of original pair
298 TH2F ** fhMCEtaMassPtTrue; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed mass vs generated pt of original pair
299 TH2F ** fhMCEtaPtTruePtRec; //![fNPtCuts*fNAsymCuts*fNCellNCuts] Real eta pairs, reconstructed pt vs generated pt of pair
301 TH2F * fhMCPi0PtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
302 TH2F * fhMCEtaPtOrigin ; //! Mass of reoconstructed pi0 pairs in calorimeter vs mother
304 TH2F * fhReMCFromConversion ; //! Invariant mass of 2 clusters originated in conversions
305 TH2F * fhReMCFromNotConversion ; //! Invariant mass of 2 clusters not originated in conversions
306 TH2F * fhReMCFromMixConversion ; //! Invariant mass of 2 clusters one from conversion and the other not
308 AliAnaPi0( const AliAnaPi0 & api0) ; // cpy ctor
309 AliAnaPi0 & operator = (const AliAnaPi0 & api0) ; // cpy assignment
311 ClassDef(AliAnaPi0,22)