]>
Commit | Line | Data |
---|---|---|
1c5acb87 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
134792d1 | 13 | * provided "as is" without express or implied warranty. * |
1c5acb87 | 14 | **************************************************************************/ |
1c5acb87 | 15 | |
16 | //_________________________________________________________________________ | |
17 | // Class to collect two-photon invariant mass distributions for | |
6175da48 | 18 | // extracting raw pi0 yield. |
2db10729 | 19 | // Input is produced by AliAnaPhoton (or any other analysis producing output AliAODPWG4Particles), |
6175da48 | 20 | // it will do nothing if executed alone |
1c5acb87 | 21 | // |
2db10729 | 22 | //-- Author: Dmitri Peressounko (RRC "KI") |
745913ae | 23 | //-- Adapted to CaloTrackCorr frame by Lamia Benhabib (SUBATECH) |
1c5acb87 | 24 | //-- and Gustavo Conesa (INFN-Frascati) |
25 | //_________________________________________________________________________ | |
26 | ||
27 | ||
28 | // --- ROOT system --- | |
29 | #include "TH3.h" | |
0333ede6 | 30 | #include "TH2F.h" |
1c5acb87 | 31 | //#include "Riostream.h" |
6639984f | 32 | #include "TCanvas.h" |
33 | #include "TPad.h" | |
34 | #include "TROOT.h" | |
477d6cee | 35 | #include "TClonesArray.h" |
0c1383b5 | 36 | #include "TObjString.h" |
6175da48 | 37 | #include "TDatabasePDG.h" |
1c5acb87 | 38 | |
39 | //---- AliRoot system ---- | |
40 | #include "AliAnaPi0.h" | |
41 | #include "AliCaloTrackReader.h" | |
42 | #include "AliCaloPID.h" | |
6639984f | 43 | #include "AliStack.h" |
ff45398a | 44 | #include "AliFiducialCut.h" |
477d6cee | 45 | #include "TParticle.h" |
477d6cee | 46 | #include "AliVEvent.h" |
6921fa00 | 47 | #include "AliESDCaloCluster.h" |
48 | #include "AliESDEvent.h" | |
49 | #include "AliAODEvent.h" | |
50f39b97 | 50 | #include "AliNeutralMesonSelection.h" |
c8fe2783 | 51 | #include "AliMixedEvent.h" |
6175da48 | 52 | #include "AliAODMCParticle.h" |
591cc579 | 53 | |
2db10729 | 54 | // --- Detectors --- |
c5693f62 | 55 | #include "AliPHOSGeoUtils.h" |
56 | #include "AliEMCALGeometry.h" | |
57 | ||
1c5acb87 | 58 | ClassImp(AliAnaPi0) |
59 | ||
be894c1d | 60 | //______________________________________________________ |
745913ae | 61 | AliAnaPi0::AliAnaPi0() : AliAnaCaloTrackCorrBaseClass(), |
0cea6003 | 62 | fEventsList(0x0), |
63 | fNModules(22), | |
0333ede6 | 64 | fUseAngleCut(kFALSE), fUseAngleEDepCut(kFALSE), fAngleCut(0), fAngleMaxCut(7.), |
65 | fMultiCutAna(kFALSE), fMultiCutAnaSim(kFALSE), | |
2db10729 | 66 | fNPtCuts(0), fNAsymCuts(0), fNCellNCuts(0), fNPIDBits(0), |
67 | fMakeInvPtPlots(kFALSE), fSameSM(kFALSE), | |
2e876d85 | 68 | fFillSMCombinations(kFALSE), fCheckConversion(kFALSE), |
2db10729 | 69 | fFillBadDistHisto(kFALSE), fFillSSCombinations(kFALSE), |
29555e96 | 70 | fFillAngleHisto(kFALSE), fFillAsymmetryHisto(kFALSE), fFillOriginHisto(0), fFillArmenterosThetaStar(0), |
07fc077e | 71 | fCheckAccInSector(kFALSE), |
1a8c88c1 | 72 | fPhotonMom1(), fPhotonMom1Boost(), fPhotonMom2(), fPi0Mom(), |
73 | fProdVertex(), | |
74 | ||
7a972c0c | 75 | //Histograms |
0333ede6 | 76 | fhAverTotECluster(0), fhAverTotECell(0), fhAverTotECellvsCluster(0), |
77 | fhEDensityCluster(0), fhEDensityCell(0), fhEDensityCellvsCluster(0), | |
2db10729 | 78 | fhReMod(0x0), fhReSameSideEMCALMod(0x0), fhReSameSectorEMCALMod(0x0), fhReDiffPHOSMod(0x0), |
0333ede6 | 79 | fhMiMod(0x0), fhMiSameSideEMCALMod(0x0), fhMiSameSectorEMCALMod(0x0), fhMiDiffPHOSMod(0x0), |
80 | fhReConv(0x0), fhMiConv(0x0), fhReConv2(0x0), fhMiConv2(0x0), | |
2db10729 | 81 | fhRe1(0x0), fhMi1(0x0), fhRe2(0x0), fhMi2(0x0), |
82 | fhRe3(0x0), fhMi3(0x0), fhReInvPt1(0x0), fhMiInvPt1(0x0), | |
0333ede6 | 83 | fhReInvPt2(0x0), fhMiInvPt2(0x0), fhReInvPt3(0x0), fhMiInvPt3(0x0), |
2db10729 | 84 | fhRePtNCellAsymCuts(0x0), fhMiPtNCellAsymCuts(0x0), fhRePtNCellAsymCutsSM(), |
85 | fhRePIDBits(0x0), fhRePtMult(0x0), fhReSS(), | |
86 | fhRePtAsym(0x0), fhRePtAsymPi0(0x0), fhRePtAsymEta(0x0), | |
2e876d85 | 87 | fhEventBin(0), fhEventMixBin(0), |
88 | fhCentrality(0x0), fhCentralityNoPair(0x0), | |
89 | fhEventPlaneResolution(0x0), | |
0333ede6 | 90 | fhRealOpeningAngle(0x0), fhRealCosOpeningAngle(0x0), fhMixedOpeningAngle(0x0), fhMixedCosOpeningAngle(0x0), |
91 | // MC histograms | |
6d22cc69 | 92 | fhPrimPi0E(0x0), fhPrimPi0Pt(0x0), |
29250849 | 93 | fhPrimPi0AccE(0x0), fhPrimPi0AccPt(0x0), |
94 | fhPrimPi0Y(0x0), fhPrimPi0AccY(0x0), | |
fba46696 | 95 | fhPrimPi0Yeta(0x0), fhPrimPi0YetaYcut(0x0), fhPrimPi0AccYeta(0x0), |
8159b92d | 96 | fhPrimPi0Phi(0x0), fhPrimPi0AccPhi(0x0), |
3eb6ab95 | 97 | fhPrimPi0OpeningAngle(0x0), fhPrimPi0OpeningAngleAsym(0x0),fhPrimPi0CosOpeningAngle(0x0), |
c8710850 | 98 | fhPrimPi0PtCentrality(0), fhPrimPi0PtEventPlane(0), |
99 | fhPrimPi0AccPtCentrality(0), fhPrimPi0AccPtEventPlane(0), | |
2db10729 | 100 | fhPrimEtaE(0x0), fhPrimEtaPt(0x0), |
29250849 | 101 | fhPrimEtaAccE(0x0), fhPrimEtaAccPt(0x0), |
102 | fhPrimEtaY(0x0), fhPrimEtaAccY(0x0), | |
fba46696 | 103 | fhPrimEtaYeta(0x0), fhPrimEtaYetaYcut(0x0), fhPrimEtaAccYeta(0x0), |
104 | fhPrimEtaPhi(0x0), fhPrimEtaAccPhi(0x0), | |
3eb6ab95 | 105 | fhPrimEtaOpeningAngle(0x0), fhPrimEtaOpeningAngleAsym(0x0),fhPrimEtaCosOpeningAngle(0x0), |
c8710850 | 106 | fhPrimEtaPtCentrality(0), fhPrimEtaPtEventPlane(0), |
107 | fhPrimEtaAccPtCentrality(0), fhPrimEtaAccPtEventPlane(0), | |
108 | fhPrimPi0PtOrigin(0x0), fhPrimEtaPtOrigin(0x0), | |
0333ede6 | 109 | fhMCOrgMass(), fhMCOrgAsym(), fhMCOrgDeltaEta(), fhMCOrgDeltaPhi(), |
2db10729 | 110 | fhMCPi0MassPtRec(), fhMCPi0MassPtTrue(), fhMCPi0PtTruePtRec(), |
0333ede6 | 111 | fhMCEtaMassPtRec(), fhMCEtaMassPtTrue(), fhMCEtaPtTruePtRec(), |
99b8e903 | 112 | fhMCPi0PtOrigin(0x0), fhMCEtaPtOrigin(0x0), |
59b85683 | 113 | fhMCPi0ProdVertex(0), fhMCEtaProdVertex(0), |
00ae36c1 | 114 | fhPrimPi0ProdVertex(0), fhPrimEtaProdVertex(0), |
29555e96 | 115 | fhReMCFromConversion(0), fhReMCFromNotConversion(0), fhReMCFromMixConversion(0), |
5cd6b1a6 | 116 | fhCosThStarPrimPi0(0), fhCosThStarPrimEta(0), |
117 | fhEPairDiffTime(0) | |
1c5acb87 | 118 | { |
be894c1d | 119 | //Default Ctor |
2db10729 | 120 | |
be894c1d | 121 | InitParameters(); |
122 | ||
123 | for(Int_t i = 0; i < 4; i++) | |
124 | { | |
125 | fhArmPrimEta[i] = 0; | |
126 | fhArmPrimPi0[i] = 0; | |
127 | } | |
1c5acb87 | 128 | } |
1c5acb87 | 129 | |
be894c1d | 130 | //_____________________ |
131 | AliAnaPi0::~AliAnaPi0() | |
132 | { | |
477d6cee | 133 | // Remove event containers |
7e7694bb | 134 | |
be894c1d | 135 | if(DoOwnMix() && fEventsList) |
136 | { | |
2e876d85 | 137 | for(Int_t ic=0; ic<GetNCentrBin(); ic++) |
138 | { | |
139 | for(Int_t iz=0; iz<GetNZvertBin(); iz++) | |
140 | { | |
141 | for(Int_t irp=0; irp<GetNRPBin(); irp++) | |
142 | { | |
143 | Int_t bin = GetEventMixBin(ic,iz,irp); | |
144 | fEventsList[bin]->Delete() ; | |
145 | delete fEventsList[bin] ; | |
7e7694bb | 146 | } |
477d6cee | 147 | } |
148 | } | |
2db10729 | 149 | delete[] fEventsList; |
477d6cee | 150 | } |
2db10729 | 151 | |
1c5acb87 | 152 | } |
153 | ||
be894c1d | 154 | //______________________________ |
1c5acb87 | 155 | void AliAnaPi0::InitParameters() |
156 | { | |
0333ede6 | 157 | //Init parameters when first called the analysis |
158 | //Set default parameters | |
a3aebfff | 159 | SetInputAODName("PWG4Particle"); |
160 | ||
161 | AddToHistogramsName("AnaPi0_"); | |
0333ede6 | 162 | |
50f39b97 | 163 | fUseAngleCut = kFALSE; |
6175da48 | 164 | fUseAngleEDepCut = kFALSE; |
2db10729 | 165 | fAngleCut = 0.; |
166 | fAngleMaxCut = TMath::Pi(); | |
0333ede6 | 167 | |
5ae09196 | 168 | fMultiCutAna = kFALSE; |
169 | ||
1f0cae67 | 170 | fNPtCuts = 3; |
af7b3903 | 171 | fPtCuts[0] = 0.; fPtCuts[1] = 0.3; fPtCuts[2] = 0.5; |
172 | for(Int_t i = fNPtCuts; i < 10; i++)fPtCuts[i] = 0.; | |
5ae09196 | 173 | |
20218aea | 174 | fNAsymCuts = 2; |
2db10729 | 175 | fAsymCuts[0] = 1.; fAsymCuts[1] = 0.7; //fAsymCuts[2] = 0.6; // fAsymCuts[3] = 0.1; |
af7b3903 | 176 | for(Int_t i = fNAsymCuts; i < 10; i++)fAsymCuts[i] = 0.; |
0333ede6 | 177 | |
1f0cae67 | 178 | fNCellNCuts = 3; |
2db10729 | 179 | fCellNCuts[0] = 0; fCellNCuts[1] = 1; fCellNCuts[2] = 2; |
021c573a | 180 | for(Int_t i = fNCellNCuts; i < 10; i++)fCellNCuts[i] = 0; |
0333ede6 | 181 | |
1f0cae67 | 182 | fNPIDBits = 2; |
af7b3903 | 183 | fPIDBits[0] = 0; fPIDBits[1] = 2; // fPIDBits[2] = 4; fPIDBits[3] = 6;// check, no cut, dispersion, neutral, dispersion&&neutral |
021c573a | 184 | for(Int_t i = fNPIDBits; i < 10; i++)fPIDBits[i] = 0; |
0333ede6 | 185 | |
1c5acb87 | 186 | } |
1c5acb87 | 187 | |
0c1383b5 | 188 | |
be894c1d | 189 | //_______________________________________ |
0c1383b5 | 190 | TObjString * AliAnaPi0::GetAnalysisCuts() |
2db10729 | 191 | { |
af7b3903 | 192 | //Save parameters used for analysis |
193 | TString parList ; //this will be list of parameters used for this analysis. | |
194 | const Int_t buffersize = 255; | |
195 | char onePar[buffersize] ; | |
2db10729 | 196 | snprintf(onePar,buffersize,"--- AliAnaPi0 ---:") ; |
197 | parList+=onePar ; | |
198 | snprintf(onePar,buffersize,"Number of bins in Centrality: %d;",GetNCentrBin()) ; | |
af7b3903 | 199 | parList+=onePar ; |
2db10729 | 200 | snprintf(onePar,buffersize,"Number of bins in Z vert. pos: %d;",GetNZvertBin()) ; |
af7b3903 | 201 | parList+=onePar ; |
2db10729 | 202 | snprintf(onePar,buffersize,"Number of bins in Reac. Plain: %d;",GetNRPBin()) ; |
af7b3903 | 203 | parList+=onePar ; |
2db10729 | 204 | snprintf(onePar,buffersize,"Depth of event buffer: %d;",GetNMaxEvMix()) ; |
af7b3903 | 205 | parList+=onePar ; |
2db10729 | 206 | snprintf(onePar,buffersize,"Select pairs with their angle: %d, edep %d, min angle %2.3f, max angle %2.3f;",fUseAngleCut, fUseAngleEDepCut,fAngleCut,fAngleMaxCut) ; |
af7b3903 | 207 | parList+=onePar ; |
208 | snprintf(onePar,buffersize," Asymmetry cuts: n = %d, asymmetry < ",fNAsymCuts) ; | |
209 | for(Int_t i = 0; i < fNAsymCuts; i++) snprintf(onePar,buffersize,"%s %2.2f;",onePar,fAsymCuts[i]); | |
210 | parList+=onePar ; | |
2db10729 | 211 | snprintf(onePar,buffersize," PID selection bits: n = %d, PID bit =",fNPIDBits) ; |
af7b3903 | 212 | for(Int_t i = 0; i < fNPIDBits; i++) snprintf(onePar,buffersize,"%s %d;",onePar,fPIDBits[i]); |
213 | parList+=onePar ; | |
2db10729 | 214 | snprintf(onePar,buffersize,"Cuts:") ; |
af7b3903 | 215 | parList+=onePar ; |
2db10729 | 216 | snprintf(onePar,buffersize,"Z vertex position: -%f < z < %f;",GetZvertexCut(),GetZvertexCut()) ; |
af7b3903 | 217 | parList+=onePar ; |
2db10729 | 218 | snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ; |
af7b3903 | 219 | parList+=onePar ; |
2db10729 | 220 | snprintf(onePar,buffersize,"Number of modules: %d:",fNModules) ; |
af7b3903 | 221 | parList+=onePar ; |
2db10729 | 222 | if(fMultiCutAna) |
223 | { | |
db2bf6fd | 224 | snprintf(onePar, buffersize," pT cuts: n = %d, pt > ",fNPtCuts) ; |
225 | for(Int_t i = 0; i < fNPtCuts; i++) snprintf(onePar,buffersize,"%s %2.2f;",onePar,fPtCuts[i]); | |
226 | parList+=onePar ; | |
db2bf6fd | 227 | snprintf(onePar,buffersize, " N cell in cluster cuts: n = %d, nCell > ",fNCellNCuts) ; |
228 | for(Int_t i = 0; i < fNCellNCuts; i++) snprintf(onePar,buffersize,"%s %d;",onePar,fCellNCuts[i]); | |
229 | parList+=onePar ; | |
db2bf6fd | 230 | } |
231 | ||
2db10729 | 232 | return new TObjString(parList) ; |
0c1383b5 | 233 | } |
234 | ||
be894c1d | 235 | //_________________________________________ |
2e557d1c | 236 | TList * AliAnaPi0::GetCreateOutputObjects() |
2db10729 | 237 | { |
238 | // Create histograms to be saved in output file and | |
477d6cee | 239 | // store them in fOutputContainer |
240 | ||
9f48b3f0 | 241 | // Init the number of modules, set in the class AliCalorimeterUtils |
242 | fNModules = GetCaloUtils()->GetNumberOfSuperModulesUsed(); | |
cb67d5f1 | 243 | if(GetCalorimeter()==kPHOS && fNModules > 4) fNModules = 4; |
9f48b3f0 | 244 | |
477d6cee | 245 | //create event containers |
72542aba | 246 | fEventsList = new TList*[GetNCentrBin()*GetNZvertBin()*GetNRPBin()] ; |
2db10729 | 247 | |
2e876d85 | 248 | for(Int_t ic=0; ic<GetNCentrBin(); ic++) |
249 | { | |
250 | for(Int_t iz=0; iz<GetNZvertBin(); iz++) | |
251 | { | |
252 | for(Int_t irp=0; irp<GetNRPBin(); irp++) | |
253 | { | |
254 | Int_t bin = GetEventMixBin(ic,iz,irp); | |
255 | fEventsList[bin] = new TList() ; | |
256 | fEventsList[bin]->SetOwner(kFALSE); | |
477d6cee | 257 | } |
258 | } | |
259 | } | |
7e7694bb | 260 | |
2db10729 | 261 | TList * outputContainer = new TList() ; |
262 | outputContainer->SetName(GetName()); | |
263 | ||
0333ede6 | 264 | fhReMod = new TH2F*[fNModules] ; |
265 | fhMiMod = new TH2F*[fNModules] ; | |
266 | ||
cb67d5f1 | 267 | if(GetCalorimeter() == kPHOS) |
020e681b | 268 | { |
2db10729 | 269 | fhReDiffPHOSMod = new TH2F*[fNModules] ; |
0333ede6 | 270 | fhMiDiffPHOSMod = new TH2F*[fNModules] ; |
8d230fa8 | 271 | } |
020e681b | 272 | else |
273 | { | |
0333ede6 | 274 | fhReSameSectorEMCALMod = new TH2F*[fNModules/2] ; |
2db10729 | 275 | fhReSameSideEMCALMod = new TH2F*[fNModules-2] ; |
0333ede6 | 276 | fhMiSameSectorEMCALMod = new TH2F*[fNModules/2] ; |
277 | fhMiSameSideEMCALMod = new TH2F*[fNModules-2] ; | |
8d230fa8 | 278 | } |
6175da48 | 279 | |
af7b3903 | 280 | |
0333ede6 | 281 | fhRe1 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; |
282 | fhMi1 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; | |
020e681b | 283 | if(fFillBadDistHisto) |
284 | { | |
0333ede6 | 285 | fhRe2 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; |
286 | fhRe3 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; | |
287 | fhMi2 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; | |
288 | fhMi3 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; | |
6175da48 | 289 | } |
020e681b | 290 | if(fMakeInvPtPlots) |
291 | { | |
0333ede6 | 292 | fhReInvPt1 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; |
293 | fhMiInvPt1 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; | |
6175da48 | 294 | if(fFillBadDistHisto){ |
0333ede6 | 295 | fhReInvPt2 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; |
296 | fhReInvPt3 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; | |
297 | fhMiInvPt2 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; | |
298 | fhMiInvPt3 = new TH2F*[GetNCentrBin()*fNPIDBits*fNAsymCuts] ; | |
6175da48 | 299 | } |
2db10729 | 300 | } |
6175da48 | 301 | |
5ae09196 | 302 | const Int_t buffersize = 255; |
303 | char key[buffersize] ; | |
304 | char title[buffersize] ; | |
477d6cee | 305 | |
745913ae | 306 | Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); |
307 | Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); | |
308 | Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); | |
309 | Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); | |
310 | Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); | |
311 | Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); | |
312 | Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); | |
313 | Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); | |
2db10729 | 314 | Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); |
315 | ||
745913ae | 316 | Int_t nmassbins = GetHistogramRanges()->GetHistoMassBins(); |
317 | Int_t nasymbins = GetHistogramRanges()->GetHistoAsymmetryBins(); | |
318 | Float_t massmax = GetHistogramRanges()->GetHistoMassMax(); | |
319 | Float_t asymmax = GetHistogramRanges()->GetHistoAsymmetryMax(); | |
320 | Float_t massmin = GetHistogramRanges()->GetHistoMassMin(); | |
321 | Float_t asymmin = GetHistogramRanges()->GetHistoAsymmetryMin(); | |
322 | Int_t ntrmbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); | |
323 | Int_t ntrmmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); | |
2db10729 | 324 | Int_t ntrmmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); |
5cd6b1a6 | 325 | Int_t tdbins = GetHistogramRanges()->GetHistoDiffTimeBins() ; |
326 | Float_t tdmax = GetHistogramRanges()->GetHistoDiffTimeMax(); | |
327 | Float_t tdmin = GetHistogramRanges()->GetHistoDiffTimeMin(); | |
328 | ||
2e876d85 | 329 | if(fCheckConversion) |
330 | { | |
0333ede6 | 331 | fhReConv = new TH2F("hReConv","Real Pair with one recombined conversion ",nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 332 | fhReConv->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
333 | fhReConv->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 334 | outputContainer->Add(fhReConv) ; |
335 | ||
0333ede6 | 336 | fhReConv2 = new TH2F("hReConv2","Real Pair with 2 recombined conversion ",nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 337 | fhReConv2->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
338 | fhReConv2->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 339 | outputContainer->Add(fhReConv2) ; |
340 | ||
2e876d85 | 341 | if(DoOwnMix()) |
342 | { | |
0333ede6 | 343 | fhMiConv = new TH2F("hMiConv","Mixed Pair with one recombined conversion ",nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 344 | fhMiConv->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
345 | fhMiConv->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 346 | outputContainer->Add(fhMiConv) ; |
347 | ||
0333ede6 | 348 | fhMiConv2 = new TH2F("hMiConv2","Mixed Pair with 2 recombined conversion ",nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 349 | fhMiConv2->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
350 | fhMiConv2->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 351 | outputContainer->Add(fhMiConv2) ; |
352 | } | |
156549ae | 353 | } |
6175da48 | 354 | |
020e681b | 355 | for(Int_t ic=0; ic<GetNCentrBin(); ic++) |
356 | { | |
357 | for(Int_t ipid=0; ipid<fNPIDBits; ipid++) | |
358 | { | |
359 | for(Int_t iasym=0; iasym<fNAsymCuts; iasym++) | |
360 | { | |
0333ede6 | 361 | Int_t index = ((ic*fNPIDBits)+ipid)*fNAsymCuts + iasym; |
362 | //printf("cen %d, pid %d, asy %d, Index %d\n",ic,ipid,iasym,index); | |
363 | //Distance to bad module 1 | |
364 | snprintf(key, buffersize,"hRe_cen%d_pidbit%d_asy%d_dist1",ic,ipid,iasym) ; | |
59b85683 | 365 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 1", |
0333ede6 | 366 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
367 | fhRe1[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; | |
59b85683 | 368 | fhRe1[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
369 | fhRe1[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 370 | //printf("name: %s\n ",fhRe1[index]->GetName()); |
371 | outputContainer->Add(fhRe1[index]) ; | |
372 | ||
020e681b | 373 | if(fFillBadDistHisto) |
374 | { | |
0333ede6 | 375 | //Distance to bad module 2 |
376 | snprintf(key, buffersize,"hRe_cen%d_pidbit%d_asy%d_dist2",ic,ipid,iasym) ; | |
59b85683 | 377 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 2", |
0333ede6 | 378 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
379 | fhRe2[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; | |
59b85683 | 380 | fhRe2[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
381 | fhRe2[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 382 | outputContainer->Add(fhRe2[index]) ; |
383 | ||
384 | //Distance to bad module 3 | |
385 | snprintf(key, buffersize,"hRe_cen%d_pidbit%d_asy%d_dist3",ic,ipid,iasym) ; | |
59b85683 | 386 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 3", |
0333ede6 | 387 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
388 | fhRe3[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; | |
59b85683 | 389 | fhRe3[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
390 | fhRe3[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 391 | outputContainer->Add(fhRe3[index]) ; |
392 | } | |
393 | ||
2db10729 | 394 | //Inverse pT |
020e681b | 395 | if(fMakeInvPtPlots) |
396 | { | |
398c93cc | 397 | //Distance to bad module 1 |
0333ede6 | 398 | snprintf(key, buffersize,"hReInvPt_cen%d_pidbit%d_asy%d_dist1",ic,ipid,iasym) ; |
59b85683 | 399 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 1", |
398c93cc | 400 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
0333ede6 | 401 | fhReInvPt1[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 402 | fhReInvPt1[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
403 | fhReInvPt1[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 404 | outputContainer->Add(fhReInvPt1[index]) ; |
af7b3903 | 405 | |
6175da48 | 406 | if(fFillBadDistHisto){ |
398c93cc | 407 | //Distance to bad module 2 |
0333ede6 | 408 | snprintf(key, buffersize,"hReInvPt_cen%d_pidbit%d_asy%d_dist2",ic,ipid,iasym) ; |
59b85683 | 409 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 2", |
398c93cc | 410 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
0333ede6 | 411 | fhReInvPt2[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 412 | fhReInvPt2[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
413 | fhReInvPt2[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 414 | outputContainer->Add(fhReInvPt2[index]) ; |
398c93cc | 415 | |
416 | //Distance to bad module 3 | |
0333ede6 | 417 | snprintf(key, buffersize,"hReInvPt_cen%d_pidbit%d_asy%d_dist3",ic,ipid,iasym) ; |
59b85683 | 418 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 3", |
398c93cc | 419 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
0333ede6 | 420 | fhReInvPt3[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 421 | fhReInvPt3[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
422 | fhReInvPt3[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 423 | outputContainer->Add(fhReInvPt3[index]) ; |
398c93cc | 424 | } |
0333ede6 | 425 | } |
020e681b | 426 | |
2e876d85 | 427 | if(DoOwnMix()) |
428 | { | |
0333ede6 | 429 | //Distance to bad module 1 |
430 | snprintf(key, buffersize,"hMi_cen%d_pidbit%d_asy%d_dist1",ic,ipid,iasym) ; | |
59b85683 | 431 | snprintf(title, buffersize,"Mixed #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 1", |
0333ede6 | 432 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
433 | fhMi1[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; | |
59b85683 | 434 | fhMi1[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
435 | fhMi1[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 436 | outputContainer->Add(fhMi1[index]) ; |
437 | if(fFillBadDistHisto){ | |
438 | //Distance to bad module 2 | |
439 | snprintf(key, buffersize,"hMi_cen%d_pidbit%d_asy%d_dist2",ic,ipid,iasym) ; | |
59b85683 | 440 | snprintf(title, buffersize,"Mixed #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 2", |
6175da48 | 441 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
0333ede6 | 442 | fhMi2[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 443 | fhMi2[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
444 | fhMi2[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 445 | outputContainer->Add(fhMi2[index]) ; |
6175da48 | 446 | |
0333ede6 | 447 | //Distance to bad module 3 |
448 | snprintf(key, buffersize,"hMi_cen%d_pidbit%d_asy%d_dist3",ic,ipid,iasym) ; | |
59b85683 | 449 | snprintf(title, buffersize,"Mixed #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 3", |
0333ede6 | 450 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
451 | fhMi3[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; | |
59b85683 | 452 | fhMi3[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
453 | fhMi3[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 454 | outputContainer->Add(fhMi3[index]) ; |
6175da48 | 455 | } |
020e681b | 456 | |
0333ede6 | 457 | //Inverse pT |
020e681b | 458 | if(fMakeInvPtPlots) |
459 | { | |
6175da48 | 460 | //Distance to bad module 1 |
0333ede6 | 461 | snprintf(key, buffersize,"hMiInvPt_cen%d_pidbit%d_asy%d_dist1",ic,ipid,iasym) ; |
59b85683 | 462 | snprintf(title, buffersize,"Mixed #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 1", |
6175da48 | 463 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
0333ede6 | 464 | fhMiInvPt1[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 465 | fhMiInvPt1[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
466 | fhMiInvPt1[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 467 | outputContainer->Add(fhMiInvPt1[index]) ; |
6175da48 | 468 | if(fFillBadDistHisto){ |
469 | //Distance to bad module 2 | |
0333ede6 | 470 | snprintf(key, buffersize,"hMiInvPt_cen%d_pidbit%d_asy%d_dist2",ic,ipid,iasym) ; |
59b85683 | 471 | snprintf(title, buffersize,"Mixed #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f, dist bad 2", |
6175da48 | 472 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
0333ede6 | 473 | fhMiInvPt2[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 474 | fhMiInvPt2[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
475 | fhMiInvPt2[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 476 | outputContainer->Add(fhMiInvPt2[index]) ; |
6175da48 | 477 | |
478 | //Distance to bad module 3 | |
0333ede6 | 479 | snprintf(key, buffersize,"hMiInvPt_cen%d_pidbit%d_asy%d_dist3",ic,ipid,iasym) ; |
59b85683 | 480 | snprintf(title, buffersize,"Mixed #it{M}_{#gamma#gamma} distr. for centrality=%d, PID bit=%d and asymmetry %1.2f,dist bad 3", |
6175da48 | 481 | ic,fPIDBits[ipid], fAsymCuts[iasym]) ; |
0333ede6 | 482 | fhMiInvPt3[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 483 | fhMiInvPt3[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
484 | fhMiInvPt3[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 485 | outputContainer->Add(fhMiInvPt3[index]) ; |
6175da48 | 486 | } |
0333ede6 | 487 | } |
2db10729 | 488 | } |
7e7694bb | 489 | } |
1c5acb87 | 490 | } |
0333ede6 | 491 | } |
477d6cee | 492 | |
5cd6b1a6 | 493 | fhEPairDiffTime = new TH2F("hEPairDiffTime","cluster pair time difference vs #it{p}_{T}",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); |
494 | fhEPairDiffTime->SetXTitle("#it{p}_{T,pair} (GeV/#it{c})"); | |
495 | fhEPairDiffTime->SetYTitle("#Delta t (ns)"); | |
496 | outputContainer->Add(fhEPairDiffTime); | |
497 | ||
020e681b | 498 | if(fFillAsymmetryHisto) |
499 | { | |
59b85683 | 500 | fhRePtAsym = new TH2F("hRePtAsym","#it{Asymmetry} vs #it{p}_{T} , for pairs",nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax) ; |
501 | fhRePtAsym->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
502 | fhRePtAsym->SetYTitle("#it{Asymmetry}"); | |
7a972c0c | 503 | outputContainer->Add(fhRePtAsym); |
504 | ||
59b85683 | 505 | fhRePtAsymPi0 = new TH2F("hRePtAsymPi0","#it{Asymmetry} vs #it{p}_{T} , for pairs close to #pi^{0} mass",nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax) ; |
506 | fhRePtAsymPi0->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
7a972c0c | 507 | fhRePtAsymPi0->SetYTitle("Asymmetry"); |
508 | outputContainer->Add(fhRePtAsymPi0); | |
509 | ||
59b85683 | 510 | fhRePtAsymEta = new TH2F("hRePtAsymEta","#it{Asymmetry} vs #it{p}_{T} , for pairs close to #eta mass",nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax) ; |
511 | fhRePtAsymEta->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
512 | fhRePtAsymEta->SetYTitle("#it{Asymmetry}"); | |
7a972c0c | 513 | outputContainer->Add(fhRePtAsymEta); |
514 | } | |
af7b3903 | 515 | |
020e681b | 516 | if(fMultiCutAna) |
517 | { | |
0333ede6 | 518 | fhRePIDBits = new TH2F*[fNPIDBits]; |
5ae09196 | 519 | for(Int_t ipid=0; ipid<fNPIDBits; ipid++){ |
520 | snprintf(key, buffersize,"hRe_pidbit%d",ipid) ; | |
59b85683 | 521 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for PIDBit=%d",fPIDBits[ipid]) ; |
0333ede6 | 522 | fhRePIDBits[ipid] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 523 | fhRePIDBits[ipid]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
524 | fhRePIDBits[ipid]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
5ae09196 | 525 | outputContainer->Add(fhRePIDBits[ipid]) ; |
526 | }// pid bit loop | |
527 | ||
0333ede6 | 528 | fhRePtNCellAsymCuts = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; |
529 | fhMiPtNCellAsymCuts = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; | |
530 | ||
020e681b | 531 | if(fFillSMCombinations) |
0333ede6 | 532 | for(Int_t iSM = 0; iSM < fNModules; iSM++) fhRePtNCellAsymCutsSM[iSM] = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; |
2db10729 | 533 | |
9302260a | 534 | |
020e681b | 535 | for(Int_t ipt=0; ipt<fNPtCuts; ipt++) |
536 | { | |
537 | for(Int_t icell=0; icell<fNCellNCuts; icell++) | |
538 | { | |
539 | for(Int_t iasym=0; iasym<fNAsymCuts; iasym++) | |
540 | { | |
5ae09196 | 541 | snprintf(key, buffersize,"hRe_pt%d_cell%d_asym%d",ipt,icell,iasym) ; |
59b85683 | 542 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for pt >%2.2f, ncell>%d and asym >%1.2f ",fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym]) ; |
5ae09196 | 543 | Int_t index = ((ipt*fNCellNCuts)+icell)*fNAsymCuts + iasym; |
544 | //printf("ipt %d, icell %d, iassym %d, index %d\n",ipt, icell, iasym, index); | |
0333ede6 | 545 | fhRePtNCellAsymCuts[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 546 | fhRePtNCellAsymCuts[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
547 | fhRePtNCellAsymCuts[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
5ae09196 | 548 | outputContainer->Add(fhRePtNCellAsymCuts[index]) ; |
6175da48 | 549 | |
550 | snprintf(key, buffersize,"hMi_pt%d_cell%d_asym%d",ipt,icell,iasym) ; | |
59b85683 | 551 | snprintf(title, buffersize,"Mixed #it{M}_{#gamma#gamma} distr. for pt >%2.2f, ncell>%d and asym >%1.2f",fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym]) ; |
0333ede6 | 552 | fhMiPtNCellAsymCuts[index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 553 | fhMiPtNCellAsymCuts[index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
554 | fhMiPtNCellAsymCuts[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
2db10729 | 555 | outputContainer->Add(fhMiPtNCellAsymCuts[index]) ; |
6175da48 | 556 | |
020e681b | 557 | if(fFillSMCombinations) |
558 | { | |
559 | for(Int_t iSM = 0; iSM < fNModules; iSM++) | |
560 | { | |
0333ede6 | 561 | snprintf(key, buffersize,"hRe_pt%d_cell%d_asym%d_SM%d",ipt,icell,iasym,iSM) ; |
59b85683 | 562 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for pt >%2.2f, ncell>%d and asym >%1.2f, SM %d ", |
0333ede6 | 563 | fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym],iSM) ; |
564 | fhRePtNCellAsymCutsSM[iSM][index] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; | |
59b85683 | 565 | fhRePtNCellAsymCutsSM[iSM][index]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
566 | fhRePtNCellAsymCutsSM[iSM][index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
0333ede6 | 567 | outputContainer->Add(fhRePtNCellAsymCutsSM[iSM][index]) ; |
568 | } | |
9302260a | 569 | |
9302260a | 570 | } |
5ae09196 | 571 | } |
572 | } | |
573 | } | |
821c8090 | 574 | |
020e681b | 575 | if(ntrmbins!=0) |
576 | { | |
0333ede6 | 577 | fhRePtMult = new TH3F*[fNAsymCuts] ; |
020e681b | 578 | for(Int_t iasym = 0; iasym<fNAsymCuts; iasym++) |
579 | { | |
59b85683 | 580 | fhRePtMult[iasym] = new TH3F(Form("hRePtMult_asym%d",iasym),Form("(#it{p}_{T},C,M)_{#gamma#gamma}, A<%1.2f",fAsymCuts[iasym]), |
9302260a | 581 | nptbins,ptmin,ptmax,ntrmbins,ntrmmin,ntrmmax,nmassbins,massmin,massmax); |
59b85683 | 582 | fhRePtMult[iasym]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
9302260a | 583 | fhRePtMult[iasym]->SetYTitle("Track multiplicity"); |
59b85683 | 584 | fhRePtMult[iasym]->SetZTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); |
9302260a | 585 | outputContainer->Add(fhRePtMult[iasym]) ; |
586 | } | |
af7b3903 | 587 | } |
5ae09196 | 588 | }// multi cuts analysis |
589 | ||
7a972c0c | 590 | if(fFillSSCombinations) |
591 | { | |
592 | ||
593 | fhReSS[0] = new TH2F("hRe_SS_Tight"," 0.01 < #lambda_{0}^{2} < 0.4", | |
594 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); | |
59b85683 | 595 | fhReSS[0]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
596 | fhReSS[0]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
7a972c0c | 597 | outputContainer->Add(fhReSS[0]) ; |
598 | ||
599 | ||
600 | fhReSS[1] = new TH2F("hRe_SS_Loose"," #lambda_{0}^{2} > 0.4", | |
601 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); | |
59b85683 | 602 | fhReSS[1]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
603 | fhReSS[1]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
7a972c0c | 604 | outputContainer->Add(fhReSS[1]) ; |
605 | ||
606 | ||
607 | fhReSS[2] = new TH2F("hRe_SS_Both"," cluster_{1} #lambda_{0}^{2} > 0.4; cluster_{2} 0.01 < #lambda_{0}^{2} < 0.4", | |
608 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); | |
59b85683 | 609 | fhReSS[2]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
610 | fhReSS[2]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
7a972c0c | 611 | outputContainer->Add(fhReSS[2]) ; |
612 | } | |
0333ede6 | 613 | |
6fd5e756 | 614 | if(DoOwnMix()) |
615 | { | |
616 | fhEventBin=new TH1I("hEventBin","Number of real pairs per bin(cen,vz,rp)", | |
617 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0, | |
618 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ; | |
619 | fhEventBin->SetXTitle("bin"); | |
620 | outputContainer->Add(fhEventBin) ; | |
621 | ||
622 | ||
623 | fhEventMixBin=new TH1I("hEventMixBin","Number of mixed pairs per bin(cen,vz,rp)", | |
624 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0, | |
625 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ; | |
626 | fhEventMixBin->SetXTitle("bin"); | |
627 | outputContainer->Add(fhEventMixBin) ; | |
2db10729 | 628 | } |
745f04da | 629 | |
2e876d85 | 630 | if(GetNCentrBin()>1) |
631 | { | |
0333ede6 | 632 | fhCentrality=new TH1F("hCentralityBin","Number of events in centrality bin",GetNCentrBin(),0.,1.*GetNCentrBin()) ; |
20218aea | 633 | fhCentrality->SetXTitle("Centrality bin"); |
634 | outputContainer->Add(fhCentrality) ; | |
635 | ||
0333ede6 | 636 | fhCentralityNoPair=new TH1F("hCentralityBinNoPair","Number of events in centrality bin, with no cluster pairs",GetNCentrBin(),0.,1.*GetNCentrBin()) ; |
20218aea | 637 | fhCentralityNoPair->SetXTitle("Centrality bin"); |
638 | outputContainer->Add(fhCentralityNoPair) ; | |
639 | } | |
640 | ||
2e876d85 | 641 | if(GetNRPBin() > 1 && GetNCentrBin()>1 ) |
642 | { | |
643 | fhEventPlaneResolution=new TH2F("hEventPlaneResolution","Event plane resolution",GetNCentrBin(),0,GetNCentrBin(),100,0.,TMath::TwoPi()) ; | |
644 | fhEventPlaneResolution->SetYTitle("Resolution"); | |
645 | fhEventPlaneResolution->SetXTitle("Centrality Bin"); | |
646 | outputContainer->Add(fhEventPlaneResolution) ; | |
72542aba | 647 | } |
648 | ||
2e876d85 | 649 | if(fFillAngleHisto) |
650 | { | |
7a972c0c | 651 | fhRealOpeningAngle = new TH2F |
2db10729 | 652 | ("hRealOpeningAngle","Angle between all #gamma pair vs E_{#pi^{0}}",nptbins,ptmin,ptmax,300,0,TMath::Pi()); |
7a972c0c | 653 | fhRealOpeningAngle->SetYTitle("#theta(rad)"); |
654 | fhRealOpeningAngle->SetXTitle("E_{ #pi^{0}} (GeV)"); | |
655 | outputContainer->Add(fhRealOpeningAngle) ; | |
6175da48 | 656 | |
7a972c0c | 657 | fhRealCosOpeningAngle = new TH2F |
2db10729 | 658 | ("hRealCosOpeningAngle","Cosinus of angle between all #gamma pair vs E_{#pi^{0}}",nptbins,ptmin,ptmax,100,0,1); |
7a972c0c | 659 | fhRealCosOpeningAngle->SetYTitle("cos (#theta) "); |
660 | fhRealCosOpeningAngle->SetXTitle("E_{ #pi^{0}} (GeV)"); | |
661 | outputContainer->Add(fhRealCosOpeningAngle) ; | |
6175da48 | 662 | |
2e876d85 | 663 | if(DoOwnMix()) |
664 | { | |
7a972c0c | 665 | fhMixedOpeningAngle = new TH2F |
2db10729 | 666 | ("hMixedOpeningAngle","Angle between all #gamma pair vs E_{#pi^{0}}, Mixed pairs",nptbins,ptmin,ptmax,300,0,TMath::Pi()); |
7a972c0c | 667 | fhMixedOpeningAngle->SetYTitle("#theta(rad)"); |
668 | fhMixedOpeningAngle->SetXTitle("E_{ #pi^{0}} (GeV)"); | |
669 | outputContainer->Add(fhMixedOpeningAngle) ; | |
670 | ||
671 | fhMixedCosOpeningAngle = new TH2F | |
2db10729 | 672 | ("hMixedCosOpeningAngle","Cosinus of angle between all #gamma pair vs E_{#pi^{0}}, Mixed pairs",nptbins,ptmin,ptmax,100,0,1); |
7a972c0c | 673 | fhMixedCosOpeningAngle->SetYTitle("cos (#theta) "); |
674 | fhMixedCosOpeningAngle->SetXTitle("E_{ #pi^{0}} (GeV)"); | |
675 | outputContainer->Add(fhMixedCosOpeningAngle) ; | |
676 | ||
677 | } | |
2db10729 | 678 | } |
6175da48 | 679 | |
2db10729 | 680 | //Histograms filled only if MC data is requested |
020e681b | 681 | if(IsDataMC()) |
682 | { | |
99b8e903 | 683 | fhReMCFromConversion = new TH2F("hReMCFromConversion","Invariant mass of 2 clusters originated in conversions", |
2db10729 | 684 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); |
59b85683 | 685 | fhReMCFromConversion->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
686 | fhReMCFromConversion->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
99b8e903 | 687 | outputContainer->Add(fhReMCFromConversion) ; |
688 | ||
689 | fhReMCFromNotConversion = new TH2F("hReMCNotFromConversion","Invariant mass of 2 clusters not originated in conversions", | |
2db10729 | 690 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); |
59b85683 | 691 | fhReMCFromNotConversion->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
692 | fhReMCFromNotConversion->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
99b8e903 | 693 | outputContainer->Add(fhReMCFromNotConversion) ; |
694 | ||
695 | fhReMCFromMixConversion = new TH2F("hReMCFromMixConversion","Invariant mass of 2 clusters one from conversion and the other not", | |
2db10729 | 696 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); |
59b85683 | 697 | fhReMCFromMixConversion->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
698 | fhReMCFromMixConversion->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
99b8e903 | 699 | outputContainer->Add(fhReMCFromMixConversion) ; |
700 | ||
6175da48 | 701 | //Pi0 |
2db10729 | 702 | |
cea121d4 | 703 | fhPrimPi0E = new TH1F("hPrimPi0E","Primary #pi^{0} E, |#it{Y}|<1",nptbins,ptmin,ptmax) ; |
704 | fhPrimPi0AccE = new TH1F("hPrimPi0AccE","Primary #pi^{0} #it{E} with both photons in acceptance",nptbins,ptmin,ptmax) ; | |
59b85683 | 705 | fhPrimPi0E ->SetXTitle("#it{E} (GeV)"); |
706 | fhPrimPi0AccE->SetXTitle("#it{E} (GeV)"); | |
29250849 | 707 | outputContainer->Add(fhPrimPi0E) ; |
708 | outputContainer->Add(fhPrimPi0AccE) ; | |
709 | ||
cea121d4 | 710 | fhPrimPi0Pt = new TH1F("hPrimPi0Pt","Primary #pi^{0} #it{p}_{T} , |#it{Y}|<1",nptbins,ptmin,ptmax) ; |
711 | fhPrimPi0AccPt = new TH1F("hPrimPi0AccPt","Primary #pi^{0} #it{p}_{T} with both photons in acceptance",nptbins,ptmin,ptmax) ; | |
59b85683 | 712 | fhPrimPi0Pt ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
713 | fhPrimPi0AccPt->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
6175da48 | 714 | outputContainer->Add(fhPrimPi0Pt) ; |
715 | outputContainer->Add(fhPrimPi0AccPt) ; | |
716 | ||
b529da89 | 717 | Int_t netabinsopen = TMath::Nint(netabins*4/(etamax-etamin)); |
cea121d4 | 718 | fhPrimPi0Y = new TH2F("hPrimPi0Rapidity","Rapidity of primary #pi^{0}",nptbins,ptmin,ptmax,netabinsopen,-2, 2) ; |
59b85683 | 719 | fhPrimPi0Y ->SetYTitle("#it{Rapidity}"); |
720 | fhPrimPi0Y ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
6175da48 | 721 | outputContainer->Add(fhPrimPi0Y) ; |
2db10729 | 722 | |
cea121d4 | 723 | fhPrimPi0Yeta = new TH2F("hPrimPi0PseudoRapidity","PseudoRapidity of primary #pi^{0}",nptbins,ptmin,ptmax,netabinsopen,-2, 2) ; |
fba46696 | 724 | fhPrimPi0Yeta ->SetYTitle("#eta"); |
59b85683 | 725 | fhPrimPi0Yeta ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
fba46696 | 726 | outputContainer->Add(fhPrimPi0Yeta) ; |
2db10729 | 727 | |
cea121d4 | 728 | fhPrimPi0YetaYcut = new TH2F("hPrimPi0PseudoRapidityYcut","PseudoRapidity of primary #pi^{0}, |#it{Y}|<1",nptbins,ptmin,ptmax,netabinsopen,-2, 2) ; |
fba46696 | 729 | fhPrimPi0YetaYcut ->SetYTitle("#eta"); |
59b85683 | 730 | fhPrimPi0YetaYcut ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
fba46696 | 731 | outputContainer->Add(fhPrimPi0YetaYcut) ; |
6175da48 | 732 | |
59b85683 | 733 | fhPrimPi0AccY = new TH2F("hPrimPi0AccRapidity","Rapidity of primary #pi^{0} with accepted daughters",nptbins,ptmin,ptmax,netabins,etamin,etamax) ; |
156549ae | 734 | fhPrimPi0AccY->SetYTitle("Rapidity"); |
59b85683 | 735 | fhPrimPi0AccY->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
6175da48 | 736 | outputContainer->Add(fhPrimPi0AccY) ; |
477d6cee | 737 | |
59b85683 | 738 | fhPrimPi0AccYeta = new TH2F("hPrimPi0AccPseudoRapidity","PseudoRapidity of primary #pi^{0} with accepted daughters",nptbins,ptmin,ptmax,netabins,etamin,etamax) ; |
fba46696 | 739 | fhPrimPi0AccYeta ->SetYTitle("#eta"); |
59b85683 | 740 | fhPrimPi0AccYeta ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
fba46696 | 741 | outputContainer->Add(fhPrimPi0AccYeta) ; |
742 | ||
fb516de2 | 743 | Int_t nphibinsopen = TMath::Nint(nphibins*TMath::TwoPi()/(phimax-phimin)); |
cea121d4 | 744 | fhPrimPi0Phi = new TH2F("hPrimPi0Phi","#phi of primary #pi^{0}, |#it{Y}|<1",nptbins,ptmin,ptmax,nphibinsopen,0,360) ; |
156549ae | 745 | fhPrimPi0Phi->SetYTitle("#phi (deg)"); |
59b85683 | 746 | fhPrimPi0Phi->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
6175da48 | 747 | outputContainer->Add(fhPrimPi0Phi) ; |
477d6cee | 748 | |
cea121d4 | 749 | fhPrimPi0AccPhi = new TH2F("hPrimPi0AccPhi","#phi of primary #pi^{0} with accepted daughters",nptbins,ptmin,ptmax, |
2db10729 | 750 | nphibins,phimin*TMath::RadToDeg(),phimax*TMath::RadToDeg()) ; |
156549ae | 751 | fhPrimPi0AccPhi->SetYTitle("#phi (deg)"); |
59b85683 | 752 | fhPrimPi0AccPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
6175da48 | 753 | outputContainer->Add(fhPrimPi0AccPhi) ; |
477d6cee | 754 | |
cea121d4 | 755 | fhPrimPi0PtCentrality = new TH2F("hPrimPi0PtCentrality","Primary #pi^{0} #it{p}_{T} vs reco centrality, |#it{Y}|<1", |
756 | nptbins,ptmin,ptmax, 100, 0, 100) ; | |
757 | fhPrimPi0AccPtCentrality = new TH2F("hPrimPi0AccPtCentrality","Primary #pi^{0} with both photons in acceptance #it{p}_{T} vs reco centrality", | |
758 | nptbins,ptmin,ptmax, 100, 0, 100) ; | |
59b85683 | 759 | fhPrimPi0PtCentrality ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
760 | fhPrimPi0AccPtCentrality->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
c8710850 | 761 | fhPrimPi0PtCentrality ->SetYTitle("Centrality"); |
762 | fhPrimPi0AccPtCentrality->SetYTitle("Centrality"); | |
763 | outputContainer->Add(fhPrimPi0PtCentrality) ; | |
764 | outputContainer->Add(fhPrimPi0AccPtCentrality) ; | |
765 | ||
cea121d4 | 766 | fhPrimPi0PtEventPlane = new TH2F("hPrimPi0PtEventPlane","Primary #pi^{0} #it{p}_{T} vs reco event plane angle, |#it{Y}|<1", |
767 | nptbins,ptmin,ptmax, 100, 0, TMath::Pi()) ; | |
768 | fhPrimPi0AccPtEventPlane = new TH2F("hPrimPi0AccPtEventPlane","Primary #pi^{0} with both photons in acceptance #it{p}_{T} vs reco event plane angle", | |
769 | nptbins,ptmin,ptmax, 100, 0, TMath::Pi()) ; | |
59b85683 | 770 | fhPrimPi0PtEventPlane ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
771 | fhPrimPi0AccPtEventPlane->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
c8710850 | 772 | fhPrimPi0PtEventPlane ->SetYTitle("Event Plane Angle (rad)"); |
773 | fhPrimPi0AccPtEventPlane->SetYTitle("Event Plane Angle (rad)"); | |
774 | outputContainer->Add(fhPrimPi0PtEventPlane) ; | |
775 | outputContainer->Add(fhPrimPi0AccPtEventPlane) ; | |
776 | ||
6175da48 | 777 | //Eta |
2db10729 | 778 | |
29250849 | 779 | fhPrimEtaE = new TH1F("hPrimEtaE","Primary eta E",nptbins,ptmin,ptmax) ; |
cea121d4 | 780 | fhPrimEtaAccE = new TH1F("hPrimEtaAccE","Primary #eta #it{E} with both photons in acceptance",nptbins,ptmin,ptmax) ; |
59b85683 | 781 | fhPrimEtaE ->SetXTitle("#it{E} (GeV)"); |
782 | fhPrimEtaAccE->SetXTitle("#it{E} (GeV)"); | |
29250849 | 783 | outputContainer->Add(fhPrimEtaE) ; |
784 | outputContainer->Add(fhPrimEtaAccE) ; | |
785 | ||
cea121d4 | 786 | fhPrimEtaPt = new TH1F("hPrimEtaPt","Primary #eta #it{p}_{T}",nptbins,ptmin,ptmax) ; |
59b85683 | 787 | fhPrimEtaAccPt = new TH1F("hPrimEtaAccPt","Primary eta #it{p}_{T} with both photons in acceptance",nptbins,ptmin,ptmax) ; |
788 | fhPrimEtaPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
789 | fhPrimEtaAccPt->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
6175da48 | 790 | outputContainer->Add(fhPrimEtaPt) ; |
791 | outputContainer->Add(fhPrimEtaAccPt) ; | |
477d6cee | 792 | |
59b85683 | 793 | fhPrimEtaY = new TH2F("hPrimEtaRapidity","Rapidity of primary #eta",nptbins,ptmin,ptmax,netabinsopen,-2, 2) ; |
794 | fhPrimEtaY->SetYTitle("#it{Rapidity}"); | |
795 | fhPrimEtaY->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
6175da48 | 796 | outputContainer->Add(fhPrimEtaY) ; |
2db10729 | 797 | |
59b85683 | 798 | fhPrimEtaYeta = new TH2F("hPrimEtaPseudoRapidityEta","PseudoRapidity of primary #eta",nptbins,ptmin,ptmax,netabinsopen,-2, 2) ; |
799 | fhPrimEtaYeta->SetYTitle("#it{Rapidity}"); | |
800 | fhPrimEtaYeta->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
fba46696 | 801 | outputContainer->Add(fhPrimEtaYeta) ; |
2db10729 | 802 | |
cea121d4 | 803 | fhPrimEtaYetaYcut = new TH2F("hPrimEtaPseudoRapidityEtaYcut","PseudoRapidity of primary #eta, |#it{Y}|<1",nptbins,ptmin,ptmax,netabinsopen,-2, 2) ; |
59b85683 | 804 | fhPrimEtaYetaYcut->SetYTitle("#it{Pseudorapidity}"); |
805 | fhPrimEtaYetaYcut->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
fba46696 | 806 | outputContainer->Add(fhPrimEtaYetaYcut) ; |
50f39b97 | 807 | |
59b85683 | 808 | fhPrimEtaAccY = new TH2F("hPrimEtaAccRapidity","Rapidity of primary #eta",nptbins,ptmin,ptmax, netabins,etamin,etamax) ; |
809 | fhPrimEtaAccY->SetYTitle("#it{Rapidity}"); | |
810 | fhPrimEtaAccY->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
6175da48 | 811 | outputContainer->Add(fhPrimEtaAccY) ; |
2db10729 | 812 | |
59b85683 | 813 | fhPrimEtaAccYeta = new TH2F("hPrimEtaAccPseudoRapidity","PseudoRapidity of primary #eta",nptbins,ptmin,ptmax, netabins,etamin,etamax) ; |
814 | fhPrimEtaAccYeta->SetYTitle("#it{Pseudorapidity}"); | |
815 | fhPrimEtaAccYeta->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
fba46696 | 816 | outputContainer->Add(fhPrimEtaAccYeta) ; |
2db10729 | 817 | |
cea121d4 | 818 | fhPrimEtaPhi = new TH2F("hPrimEtaPhi","Azimuthal of primary #eta",nptbins,ptmin,ptmax, nphibins,phimin*TMath::RadToDeg(),phimax*TMath::RadToDeg()) ; |
156549ae | 819 | fhPrimEtaPhi->SetYTitle("#phi (deg)"); |
59b85683 | 820 | fhPrimEtaPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
6175da48 | 821 | outputContainer->Add(fhPrimEtaPhi) ; |
822 | ||
cea121d4 | 823 | fhPrimEtaAccPhi = new TH2F("hPrimEtaAccPhi","Azimuthal of primary #eta with accepted daughters",nptbins,ptmin,ptmax, nphibins,phimin*TMath::RadToDeg(),phimax*TMath::RadToDeg()) ; |
156549ae | 824 | fhPrimEtaAccPhi->SetYTitle("#phi (deg)"); |
59b85683 | 825 | fhPrimEtaAccPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
6175da48 | 826 | outputContainer->Add(fhPrimEtaAccPhi) ; |
0333ede6 | 827 | |
cea121d4 | 828 | fhPrimEtaPtCentrality = new TH2F("hPrimEtaPtCentrality","Primary #eta #it{p}_{T} vs reco centrality, |#it{Y}|<1",nptbins,ptmin,ptmax, 100, 0, 100) ; |
59b85683 | 829 | fhPrimEtaAccPtCentrality = new TH2F("hPrimEtaAccPtCentrality","Primary #eta with both photons in acceptance #it{p}_{T} vs reco centrality",nptbins,ptmin,ptmax, 100, 0, 100) ; |
830 | fhPrimEtaPtCentrality ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
831 | fhPrimEtaAccPtCentrality->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
c8710850 | 832 | fhPrimEtaPtCentrality ->SetYTitle("Centrality"); |
833 | fhPrimEtaAccPtCentrality->SetYTitle("Centrality"); | |
834 | outputContainer->Add(fhPrimEtaPtCentrality) ; | |
835 | outputContainer->Add(fhPrimEtaAccPtCentrality) ; | |
836 | ||
cea121d4 | 837 | fhPrimEtaPtEventPlane = new TH2F("hPrimEtaPtEventPlane","Primary #eta #it{p}_{T} vs reco event plane angle, |#it{Y}|<1",nptbins,ptmin,ptmax, 100, 0, TMath::Pi()) ; |
838 | fhPrimEtaAccPtEventPlane = new TH2F("hPrimEtaAccPtEventPlane","Primary #eta with both #gamma_{decay} in acceptance #it{p}_{T} vs reco event plane angle",nptbins,ptmin,ptmax, 100, 0, TMath::Pi()) ; | |
59b85683 | 839 | fhPrimEtaPtEventPlane ->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
840 | fhPrimEtaAccPtEventPlane->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
c8710850 | 841 | fhPrimEtaPtEventPlane ->SetYTitle("Event Plane Angle (rad)"); |
842 | fhPrimEtaAccPtEventPlane->SetYTitle("Event Plane Angle (rad)"); | |
843 | outputContainer->Add(fhPrimEtaPtEventPlane) ; | |
844 | outputContainer->Add(fhPrimEtaAccPtEventPlane) ; | |
50f39b97 | 845 | |
2db10729 | 846 | if(fFillAngleHisto) |
8159b92d | 847 | { |
7a972c0c | 848 | fhPrimPi0OpeningAngle = new TH2F |
2db10729 | 849 | ("hPrimPi0OpeningAngle","Angle between all primary #gamma pair vs E_{#pi^{0}}",nptbins,ptmin,ptmax,100,0,0.5); |
7a972c0c | 850 | fhPrimPi0OpeningAngle->SetYTitle("#theta(rad)"); |
851 | fhPrimPi0OpeningAngle->SetXTitle("E_{ #pi^{0}} (GeV)"); | |
852 | outputContainer->Add(fhPrimPi0OpeningAngle) ; | |
853 | ||
3eb6ab95 | 854 | fhPrimPi0OpeningAngleAsym = new TH2F |
59b85683 | 855 | ("hPrimPi0OpeningAngleAsym","Angle between all primary #gamma pair vs #it{Asymmetry}, #it{p}_{T}>5 GeV/#it{c}",100,0,1,100,0,0.5); |
3eb6ab95 | 856 | fhPrimPi0OpeningAngleAsym->SetXTitle("|A|=| (E_{1}-E_{2}) / (E_{1}+E_{2}) |"); |
857 | fhPrimPi0OpeningAngleAsym->SetYTitle("#theta(rad)"); | |
858 | outputContainer->Add(fhPrimPi0OpeningAngleAsym) ; | |
859 | ||
7a972c0c | 860 | fhPrimPi0CosOpeningAngle = new TH2F |
2db10729 | 861 | ("hPrimPi0CosOpeningAngle","Cosinus of angle between all primary #gamma pair vs E_{#pi^{0}}",nptbins,ptmin,ptmax,100,-1,1); |
7a972c0c | 862 | fhPrimPi0CosOpeningAngle->SetYTitle("cos (#theta) "); |
863 | fhPrimPi0CosOpeningAngle->SetXTitle("E_{ #pi^{0}} (GeV)"); | |
864 | outputContainer->Add(fhPrimPi0CosOpeningAngle) ; | |
8159b92d | 865 | |
866 | fhPrimEtaOpeningAngle = new TH2F | |
867 | ("hPrimEtaOpeningAngle","Angle between all primary #gamma pair vs E_{#eta}",nptbins,ptmin,ptmax,100,0,0.5); | |
868 | fhPrimEtaOpeningAngle->SetYTitle("#theta(rad)"); | |
869 | fhPrimEtaOpeningAngle->SetXTitle("E_{#eta} (GeV)"); | |
870 | outputContainer->Add(fhPrimEtaOpeningAngle) ; | |
871 | ||
3eb6ab95 | 872 | fhPrimEtaOpeningAngleAsym = new TH2F |
59b85683 | 873 | ("hPrimEtaOpeningAngleAsym","Angle between all primary #gamma pair vs #it{Asymmetry}, #it{p}_{T}>5 GeV/#it{c}",100,0,1,100,0,0.5); |
874 | fhPrimEtaOpeningAngleAsym->SetXTitle("|#it{A}|=| (#it{E}_{1}-#it{E}_{2}) / (#it{E}_{1}+#it{E}_{2}) |"); | |
3eb6ab95 | 875 | fhPrimEtaOpeningAngleAsym->SetYTitle("#theta(rad)"); |
876 | outputContainer->Add(fhPrimEtaOpeningAngleAsym) ; | |
2db10729 | 877 | |
3eb6ab95 | 878 | |
8159b92d | 879 | fhPrimEtaCosOpeningAngle = new TH2F |
880 | ("hPrimEtaCosOpeningAngle","Cosinus of angle between all primary #gamma pair vs E_{#eta}",nptbins,ptmin,ptmax,100,-1,1); | |
881 | fhPrimEtaCosOpeningAngle->SetYTitle("cos (#theta) "); | |
59b85683 | 882 | fhPrimEtaCosOpeningAngle->SetXTitle("#it{E}_{ #eta} (GeV)"); |
8159b92d | 883 | outputContainer->Add(fhPrimEtaCosOpeningAngle) ; |
7a972c0c | 884 | } |
6175da48 | 885 | |
020e681b | 886 | if(fFillOriginHisto) |
887 | { | |
888 | //Prim origin | |
889 | //Pi0 | |
59b85683 | 890 | fhPrimPi0PtOrigin = new TH2F("hPrimPi0PtOrigin","Primary #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ; |
891 | fhPrimPi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
020e681b | 892 | fhPrimPi0PtOrigin->SetYTitle("Origin"); |
893 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21"); | |
894 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark"); | |
895 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances "); | |
896 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances"); | |
897 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho"); | |
898 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega"); | |
899 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K"); | |
900 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other"); | |
901 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta"); | |
902 | fhPrimPi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime"); | |
903 | outputContainer->Add(fhPrimPi0PtOrigin) ; | |
6175da48 | 904 | |
59b85683 | 905 | fhMCPi0PtOrigin = new TH2F("hMCPi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ; |
906 | fhMCPi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
020e681b | 907 | fhMCPi0PtOrigin->SetYTitle("Origin"); |
908 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21"); | |
909 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark"); | |
910 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances"); | |
911 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances"); | |
912 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho"); | |
913 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega"); | |
914 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K"); | |
915 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other"); | |
916 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta"); | |
917 | fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime"); | |
2db10729 | 918 | outputContainer->Add(fhMCPi0PtOrigin) ; |
6175da48 | 919 | |
020e681b | 920 | //Eta |
59b85683 | 921 | fhPrimEtaPtOrigin = new TH2F("hPrimEtaPtOrigin","Primary #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,7,0,7) ; |
922 | fhPrimEtaPtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
020e681b | 923 | fhPrimEtaPtOrigin->SetYTitle("Origin"); |
924 | fhPrimEtaPtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21"); | |
925 | fhPrimEtaPtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark"); | |
926 | fhPrimEtaPtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances"); | |
927 | fhPrimEtaPtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances"); | |
928 | fhPrimEtaPtOrigin->GetYaxis()->SetBinLabel(5 ,"Other"); | |
929 | fhPrimEtaPtOrigin->GetYaxis()->SetBinLabel(6 ,"#eta prime "); | |
6175da48 | 930 | |
020e681b | 931 | outputContainer->Add(fhPrimEtaPtOrigin) ; |
6175da48 | 932 | |
59b85683 | 933 | fhMCEtaPtOrigin = new TH2F("hMCEtaPtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,7,0,7) ; |
934 | fhMCEtaPtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
020e681b | 935 | fhMCEtaPtOrigin->SetYTitle("Origin"); |
936 | fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21"); | |
937 | fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark"); | |
938 | fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances"); | |
939 | fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances"); | |
940 | fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(5 ,"Other"); | |
941 | fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(6 ,"#eta prime"); | |
6175da48 | 942 | |
020e681b | 943 | outputContainer->Add(fhMCEtaPtOrigin) ; |
2db10729 | 944 | |
00ae36c1 | 945 | fhMCPi0ProdVertex = new TH2F("hMCPi0ProdVertex","Selected reco pair from generated #pi^{0} #it{p}_{T} vs production vertex", |
946 | 200,0.,20.,5000,0,500) ; | |
59b85683 | 947 | fhMCPi0ProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
948 | fhMCPi0ProdVertex->SetYTitle("#it{R} (cm)"); | |
949 | outputContainer->Add(fhMCPi0ProdVertex) ; | |
2db10729 | 950 | |
00ae36c1 | 951 | fhMCEtaProdVertex = new TH2F("hMCEtaProdVertex","Selected reco pair from generated #eta #it{p}_{T} vs production vertex", |
952 | 200,0.,20.,5000,0,500) ; | |
59b85683 | 953 | fhMCEtaProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
954 | fhMCEtaProdVertex->SetYTitle("#it{R} (cm)"); | |
955 | outputContainer->Add(fhMCEtaProdVertex) ; | |
2db10729 | 956 | |
00ae36c1 | 957 | fhPrimPi0ProdVertex = new TH2F("hPrimPi0ProdVertex","generated #pi^{0} #it{p}_{T} vs production vertex", |
2db10729 | 958 | 200,0.,20.,5000,0,500) ; |
00ae36c1 | 959 | fhPrimPi0ProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
960 | fhPrimPi0ProdVertex->SetYTitle("#it{R} (cm)"); | |
961 | outputContainer->Add(fhPrimPi0ProdVertex) ; | |
962 | ||
963 | fhPrimEtaProdVertex = new TH2F("hPrimEtaProdVertex","generated #eta #it{p}_{T} vs production vertex", | |
2db10729 | 964 | 200,0.,20.,5000,0,500) ; |
00ae36c1 | 965 | fhPrimEtaProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
966 | fhPrimEtaProdVertex->SetYTitle("#it{R} (cm)"); | |
967 | outputContainer->Add(fhPrimEtaProdVertex) ; | |
6175da48 | 968 | |
020e681b | 969 | for(Int_t i = 0; i<13; i++) |
970 | { | |
59b85683 | 971 | fhMCOrgMass[i] = new TH2F(Form("hMCOrgMass_%d",i),Form("#it{M} vs #it{p}_{T}, origin %d",i),nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
972 | fhMCOrgMass[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
973 | fhMCOrgMass[i]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
020e681b | 974 | outputContainer->Add(fhMCOrgMass[i]) ; |
975 | ||
59b85683 | 976 | fhMCOrgAsym[i]= new TH2F(Form("hMCOrgAsym_%d",i),Form("#it{Asymmetry} vs #it{p}_{T}, origin %d",i),nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax) ; |
977 | fhMCOrgAsym[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
020e681b | 978 | fhMCOrgAsym[i]->SetYTitle("A"); |
979 | outputContainer->Add(fhMCOrgAsym[i]) ; | |
980 | ||
59b85683 | 981 | fhMCOrgDeltaEta[i] = new TH2F(Form("hMCOrgDeltaEta_%d",i),Form("#Delta #eta of pair vs #it{p}_{T}, origin %d",i),nptbins,ptmin,ptmax,netabins,-1.4,1.4) ; |
982 | fhMCOrgDeltaEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
020e681b | 983 | fhMCOrgDeltaEta[i]->SetYTitle("#Delta #eta"); |
984 | outputContainer->Add(fhMCOrgDeltaEta[i]) ; | |
985 | ||
59b85683 | 986 | fhMCOrgDeltaPhi[i]= new TH2F(Form("hMCOrgDeltaPhi_%d",i),Form("#Delta #phi of pair vs #it{p}_{T}, origin %d",i),nptbins,ptmin,ptmax,nphibins,-0.7,0.7) ; |
987 | fhMCOrgDeltaPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
020e681b | 988 | fhMCOrgDeltaPhi[i]->SetYTitle("#Delta #phi (rad)"); |
989 | outputContainer->Add(fhMCOrgDeltaPhi[i]) ; | |
990 | ||
991 | } | |
6175da48 | 992 | |
020e681b | 993 | if(fMultiCutAnaSim) |
994 | { | |
995 | fhMCPi0MassPtTrue = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; | |
996 | fhMCPi0MassPtRec = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; | |
997 | fhMCPi0PtTruePtRec = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; | |
998 | fhMCEtaMassPtRec = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; | |
999 | fhMCEtaMassPtTrue = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; | |
1000 | fhMCEtaPtTruePtRec = new TH2F*[fNPtCuts*fNAsymCuts*fNCellNCuts]; | |
1001 | for(Int_t ipt=0; ipt<fNPtCuts; ipt++){ | |
1002 | for(Int_t icell=0; icell<fNCellNCuts; icell++){ | |
1003 | for(Int_t iasym=0; iasym<fNAsymCuts; iasym++){ | |
1004 | Int_t index = ((ipt*fNCellNCuts)+icell)*fNAsymCuts + iasym; | |
1005 | ||
1006 | fhMCPi0MassPtRec[index] = new TH2F(Form("hMCPi0MassPtRec_pt%d_cell%d_asym%d",ipt,icell,iasym), | |
cea121d4 | 1007 | Form("Reconstructed #it{M} vs reconstructed #it{p}_{T} of true #pi^{0} cluster pairs for #it{p}_{T} >%2.2f, #it{N}^{cluster}_{cell}>%d and |#it{A}|>%1.2f",fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym]), |
020e681b | 1008 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1009 | fhMCPi0MassPtRec[index]->SetXTitle("#it{p}_{T, reconstructed} (GeV/#it{c})"); |
1010 | fhMCPi0MassPtRec[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
2db10729 | 1011 | outputContainer->Add(fhMCPi0MassPtRec[index]) ; |
020e681b | 1012 | |
1013 | fhMCPi0MassPtTrue[index] = new TH2F(Form("hMCPi0MassPtTrue_pt%d_cell%d_asym%d",ipt,icell,iasym), | |
cea121d4 | 1014 | Form("Reconstructed #it{M} vs generated #it{p}_{T} of true #pi^{0} cluster pairs for #it{p}_{T} >%2.2f, #it{N}^{cluster}_{cell}>%d and |#it{A}|>%1.2f",fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym]), |
020e681b | 1015 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1016 | fhMCPi0MassPtTrue[index]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); |
1017 | fhMCPi0MassPtTrue[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
020e681b | 1018 | outputContainer->Add(fhMCPi0MassPtTrue[index]) ; |
1019 | ||
1020 | fhMCPi0PtTruePtRec[index] = new TH2F(Form("hMCPi0PtTruePtRec_pt%d_cell%d_asym%d",ipt,icell,iasym), | |
cea121d4 | 1021 | Form("Generated vs reconstructed #it{p}_{T} of true #pi^{0} cluster pairs, 0.01 < rec. mass < 0.17 MeV/#it{c}^{2} for #it{p}_{T} >%2.2f, #it{N}^{cluster}_{cell}>%d and |#it{A}|>%1.2f",fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym]), |
020e681b | 1022 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax) ; |
59b85683 | 1023 | fhMCPi0PtTruePtRec[index]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); |
1024 | fhMCPi0PtTruePtRec[index]->SetYTitle("#it{p}_{T, reconstructed} (GeV/#it{c})"); | |
020e681b | 1025 | outputContainer->Add(fhMCPi0PtTruePtRec[index]) ; |
1026 | ||
1027 | fhMCEtaMassPtRec[index] = new TH2F(Form("hMCEtaMassPtRec_pt%d_cell%d_asym%d",ipt,icell,iasym), | |
cea121d4 | 1028 | Form("Reconstructed #it{M} vs reconstructed #it{p}_{T} of true #eta cluster pairs for #it{p}_{T} >%2.2f, #it{N}^{cluster}_{cell}>%d and |#it{A}|>%1.2f",fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym]), |
020e681b | 1029 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1030 | fhMCEtaMassPtRec[index]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); |
1031 | fhMCEtaMassPtRec[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
020e681b | 1032 | outputContainer->Add(fhMCEtaMassPtRec[index]) ; |
1033 | ||
1034 | fhMCEtaMassPtTrue[index] = new TH2F(Form("hMCEtaMassPtTrue_pt%d_cell%d_asym%d",ipt,icell,iasym), | |
cea121d4 | 1035 | Form("Reconstructed #it{M} vs generated #it{p}_{T} of true #eta cluster pairs for #it{p}_{T} >%2.2f, #it{N}^{cluster}_{cell}>%d and |#it{A}|>%1.2f",fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym]), |
020e681b | 1036 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1037 | fhMCEtaMassPtTrue[index]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); |
1038 | fhMCEtaMassPtTrue[index]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
020e681b | 1039 | outputContainer->Add(fhMCEtaMassPtTrue[index]) ; |
1040 | ||
1041 | fhMCEtaPtTruePtRec[index] = new TH2F(Form("hMCEtaPtTruePtRec_pt%d_cell%d_asym%d",ipt,icell,iasym), | |
cea121d4 | 1042 | Form("Generated vs reconstructed #it{p}_{T} of true #eta cluster pairs, 0.01 < rec. mass < 0.17 MeV/#it{c}^{2} for #it{p}_{T} >%2.2f, ncell>%d and asym >%1.2f",fPtCuts[ipt],fCellNCuts[icell], fAsymCuts[iasym]), |
020e681b | 1043 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax) ; |
59b85683 | 1044 | fhMCEtaPtTruePtRec[index]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); |
1045 | fhMCEtaPtTruePtRec[index]->SetYTitle("#it{p}_{T, reconstructed} (GeV/#it{c})"); | |
020e681b | 1046 | outputContainer->Add(fhMCEtaPtTruePtRec[index]) ; |
1047 | } | |
1048 | } | |
2db10729 | 1049 | } |
020e681b | 1050 | }//multi cut ana |
1051 | else | |
1052 | { | |
1053 | fhMCPi0MassPtTrue = new TH2F*[1]; | |
1054 | fhMCPi0PtTruePtRec = new TH2F*[1]; | |
1055 | fhMCEtaMassPtTrue = new TH2F*[1]; | |
1056 | fhMCEtaPtTruePtRec = new TH2F*[1]; | |
1057 | ||
1058 | fhMCPi0MassPtTrue[0] = new TH2F("hMCPi0MassPtTrue","Reconstructed Mass vs generated p_T of true #pi^{0} cluster pairs",nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; | |
59b85683 | 1059 | fhMCPi0MassPtTrue[0]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); |
1060 | fhMCPi0MassPtTrue[0]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
020e681b | 1061 | outputContainer->Add(fhMCPi0MassPtTrue[0]) ; |
1062 | ||
59b85683 | 1063 | fhMCPi0PtTruePtRec[0]= new TH2F("hMCPi0PtTruePtRec","Generated vs reconstructed p_T of true #pi^{0} cluster pairs, 0.01 < rec. mass < 0.17 MeV/#it{c}^{2}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax) ; |
1064 | fhMCPi0PtTruePtRec[0]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); | |
1065 | fhMCPi0PtTruePtRec[0]->SetYTitle("#it{p}_{T, reconstructed} (GeV/#it{c})"); | |
020e681b | 1066 | outputContainer->Add(fhMCPi0PtTruePtRec[0]) ; |
1067 | ||
1068 | fhMCEtaMassPtTrue[0] = new TH2F("hMCEtaMassPtTrue","Reconstructed Mass vs generated p_T of true #eta cluster pairs",nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; | |
59b85683 | 1069 | fhMCEtaMassPtTrue[0]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); |
1070 | fhMCEtaMassPtTrue[0]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
020e681b | 1071 | outputContainer->Add(fhMCEtaMassPtTrue[0]) ; |
1072 | ||
59b85683 | 1073 | fhMCEtaPtTruePtRec[0]= new TH2F("hMCEtaPtTruePtRec","Generated vs reconstructed p_T of true #eta cluster pairs, 0.01 < rec. mass < 0.17 MeV/#it{c}^{2}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax) ; |
1074 | fhMCEtaPtTruePtRec[0]->SetXTitle("#it{p}_{T, generated} (GeV/#it{c})"); | |
1075 | fhMCEtaPtTruePtRec[0]->SetYTitle("#it{p}_{T, reconstructed} (GeV/#it{c})"); | |
020e681b | 1076 | outputContainer->Add(fhMCEtaPtTruePtRec[0]) ; |
1077 | } | |
6175da48 | 1078 | } |
477d6cee | 1079 | } |
50f39b97 | 1080 | |
020e681b | 1081 | if(fFillSMCombinations) |
1082 | { | |
20218aea | 1083 | TString pairnamePHOS[] = {"(0-1)","(0-2)","(1-2)","(0-3)","(0-4)","(1-3)","(1-4)","(2-3)","(2-4)","(3-4)"}; |
020e681b | 1084 | for(Int_t imod=0; imod<fNModules; imod++) |
1085 | { | |
20218aea | 1086 | //Module dependent invariant mass |
1087 | snprintf(key, buffersize,"hReMod_%d",imod) ; | |
59b85683 | 1088 | snprintf(title, buffersize,"Real #it{M}_{#gamma#gamma} distr. for Module %d",imod) ; |
0333ede6 | 1089 | fhReMod[imod] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1090 | fhReMod[imod]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
1091 | fhReMod[imod]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 1092 | outputContainer->Add(fhReMod[imod]) ; |
cb67d5f1 | 1093 | if(GetCalorimeter()==kPHOS) |
020e681b | 1094 | { |
20218aea | 1095 | snprintf(key, buffersize,"hReDiffPHOSMod_%d",imod) ; |
1096 | snprintf(title, buffersize,"Real pairs PHOS, clusters in different Modules: %s",(pairnamePHOS[imod]).Data()) ; | |
0333ede6 | 1097 | fhReDiffPHOSMod[imod] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1098 | fhReDiffPHOSMod[imod]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
1099 | fhReDiffPHOSMod[imod]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 1100 | outputContainer->Add(fhReDiffPHOSMod[imod]) ; |
1101 | } | |
2db10729 | 1102 | else |
1103 | {//EMCAL | |
020e681b | 1104 | if(imod<fNModules/2) |
1105 | { | |
20218aea | 1106 | snprintf(key, buffersize,"hReSameSectorEMCAL_%d",imod) ; |
1107 | snprintf(title, buffersize,"Real pairs EMCAL, clusters in same sector, SM(%d,%d)",imod*2,imod*2+1) ; | |
0333ede6 | 1108 | fhReSameSectorEMCALMod[imod] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1109 | fhReSameSectorEMCALMod[imod]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
1110 | fhReSameSectorEMCALMod[imod]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 1111 | outputContainer->Add(fhReSameSectorEMCALMod[imod]) ; |
8d230fa8 | 1112 | } |
020e681b | 1113 | if(imod<fNModules-2) |
1114 | { | |
20218aea | 1115 | snprintf(key, buffersize,"hReSameSideEMCAL_%d",imod) ; |
1116 | snprintf(title, buffersize,"Real pairs EMCAL, clusters in same side SM(%d,%d)",imod, imod+2) ; | |
0333ede6 | 1117 | fhReSameSideEMCALMod[imod] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1118 | fhReSameSideEMCALMod[imod]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
1119 | fhReSameSideEMCALMod[imod]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 1120 | outputContainer->Add(fhReSameSideEMCALMod[imod]) ; |
8d230fa8 | 1121 | } |
20218aea | 1122 | }//EMCAL |
1123 | ||
2e876d85 | 1124 | if(DoOwnMix()) |
2db10729 | 1125 | { |
20218aea | 1126 | snprintf(key, buffersize,"hMiMod_%d",imod) ; |
59b85683 | 1127 | snprintf(title, buffersize,"Mixed #it{M}_{#gamma#gamma} distr. for Module %d",imod) ; |
0333ede6 | 1128 | fhMiMod[imod] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1129 | fhMiMod[imod]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
1130 | fhMiMod[imod]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 1131 | outputContainer->Add(fhMiMod[imod]) ; |
1132 | ||
2db10729 | 1133 | if(GetCalorimeter()==kPHOS) |
1134 | { | |
20218aea | 1135 | snprintf(key, buffersize,"hMiDiffPHOSMod_%d",imod) ; |
1136 | snprintf(title, buffersize,"Mixed pairs PHOS, clusters in different Modules: %s",(pairnamePHOS[imod]).Data()) ; | |
0333ede6 | 1137 | fhMiDiffPHOSMod[imod] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1138 | fhMiDiffPHOSMod[imod]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
1139 | fhMiDiffPHOSMod[imod]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 1140 | outputContainer->Add(fhMiDiffPHOSMod[imod]) ; |
1141 | }//PHOS | |
2db10729 | 1142 | else |
1143 | {//EMCAL | |
020e681b | 1144 | if(imod<fNModules/2) |
1145 | { | |
20218aea | 1146 | snprintf(key, buffersize,"hMiSameSectorEMCALMod_%d",imod) ; |
1147 | snprintf(title, buffersize,"Mixed pairs EMCAL, clusters in same sector, SM(%d,%d)",imod*2,imod*2+1) ; | |
0333ede6 | 1148 | fhMiSameSectorEMCALMod[imod] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1149 | fhMiSameSectorEMCALMod[imod]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
1150 | fhMiSameSectorEMCALMod[imod]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 1151 | outputContainer->Add(fhMiSameSectorEMCALMod[imod]) ; |
1152 | } | |
1153 | if(imod<fNModules-2){ | |
020e681b | 1154 | |
20218aea | 1155 | snprintf(key, buffersize,"hMiSameSideEMCALMod_%d",imod) ; |
1156 | snprintf(title, buffersize,"Mixed pairs EMCAL, clusters in same side SM(%d,%d)",imod, imod+2) ; | |
0333ede6 | 1157 | fhMiSameSideEMCALMod[imod] = new TH2F(key,title,nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; |
59b85683 | 1158 | fhMiSameSideEMCALMod[imod]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); |
1159 | fhMiSameSideEMCALMod[imod]->SetYTitle("#it{M}_{#gamma,#gamma} (GeV/#it{c}^{2})"); | |
20218aea | 1160 | outputContainer->Add(fhMiSameSideEMCALMod[imod]) ; |
1161 | } | |
2db10729 | 1162 | }//EMCAL |
20218aea | 1163 | }// own mix |
1164 | }//loop combinations | |
1165 | } // SM combinations | |
0333ede6 | 1166 | |
29555e96 | 1167 | if(fFillArmenterosThetaStar && IsDataMC()) |
be894c1d | 1168 | { |
1169 | TString ebin[] = {"8 < E < 12 GeV","12 < E < 16 GeV", "16 < E < 20 GeV", "E > 20 GeV" }; | |
1170 | Int_t narmbins = 400; | |
1171 | Float_t armmin = 0; | |
1172 | Float_t armmax = 0.4; | |
1173 | ||
1174 | for(Int_t i = 0; i < 4; i++) | |
1175 | { | |
1176 | fhArmPrimPi0[i] = new TH2F(Form("hArmenterosPrimPi0EBin%d",i), | |
1177 | Form("Armenteros of primary #pi^{0}, %s",ebin[i].Data()), | |
1178 | 200, -1, 1, narmbins,armmin,armmax); | |
59b85683 | 1179 | fhArmPrimPi0[i]->SetYTitle("#it{p}_{T}^{Arm}"); |
be894c1d | 1180 | fhArmPrimPi0[i]->SetXTitle("#alpha^{Arm}"); |
1181 | outputContainer->Add(fhArmPrimPi0[i]) ; | |
2db10729 | 1182 | |
be894c1d | 1183 | fhArmPrimEta[i] = new TH2F(Form("hArmenterosPrimEtaEBin%d",i), |
2db10729 | 1184 | Form("Armenteros of primary #eta, %s",ebin[i].Data()), |
1185 | 200, -1, 1, narmbins,armmin,armmax); | |
59b85683 | 1186 | fhArmPrimEta[i]->SetYTitle("#it{p}_{T}^{Arm}"); |
be894c1d | 1187 | fhArmPrimEta[i]->SetXTitle("#alpha^{Arm}"); |
1188 | outputContainer->Add(fhArmPrimEta[i]) ; | |
29555e96 | 1189 | |
be894c1d | 1190 | } |
29555e96 | 1191 | |
1192 | // Same as asymmetry ... | |
1193 | fhCosThStarPrimPi0 = new TH2F | |
1194 | ("hCosThStarPrimPi0","cos(#theta *) for primary #pi^{0}",nptbins,ptmin,ptmax,200,-1,1); | |
1195 | fhCosThStarPrimPi0->SetYTitle("cos(#theta *)"); | |
1196 | fhCosThStarPrimPi0->SetXTitle("E_{ #pi^{0}} (GeV)"); | |
1197 | outputContainer->Add(fhCosThStarPrimPi0) ; | |
1198 | ||
1199 | fhCosThStarPrimEta = new TH2F | |
1200 | ("hCosThStarPrimEta","cos(#theta *) for primary #eta",nptbins,ptmin,ptmax,200,-1,1); | |
1201 | fhCosThStarPrimEta->SetYTitle("cos(#theta *)"); | |
1202 | fhCosThStarPrimEta->SetXTitle("E_{ #eta} (GeV)"); | |
1203 | outputContainer->Add(fhCosThStarPrimEta) ; | |
1204 | ||
be894c1d | 1205 | } |
1206 | ||
0333ede6 | 1207 | // for(Int_t i = 0; i < outputContainer->GetEntries() ; i++){ |
2db10729 | 1208 | // |
0333ede6 | 1209 | // printf("Histogram %d, name: %s\n ",i, outputContainer->At(i)->GetName()); |
2db10729 | 1210 | // |
0333ede6 | 1211 | // } |
eee5fcf1 | 1212 | |
477d6cee | 1213 | return outputContainer; |
1c5acb87 | 1214 | } |
1215 | ||
c8710850 | 1216 | //___________________________________________________ |
1c5acb87 | 1217 | void AliAnaPi0::Print(const Option_t * /*opt*/) const |
1218 | { | |
477d6cee | 1219 | //Print some relevant parameters set for the analysis |
a3aebfff | 1220 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; |
745913ae | 1221 | AliAnaCaloTrackCorrBaseClass::Print(" "); |
0333ede6 | 1222 | |
72542aba | 1223 | printf("Number of bins in Centrality: %d \n",GetNCentrBin()) ; |
5025c139 | 1224 | printf("Number of bins in Z vert. pos: %d \n",GetNZvertBin()) ; |
1225 | printf("Number of bins in Reac. Plain: %d \n",GetNRPBin()) ; | |
72542aba | 1226 | printf("Depth of event buffer: %d \n",GetNMaxEvMix()) ; |
af7b3903 | 1227 | printf("Pair in same Module: %d \n",fSameSM) ; |
477d6cee | 1228 | printf("Cuts: \n") ; |
0333ede6 | 1229 | // printf("Z vertex position: -%2.3f < z < %2.3f \n",GetZvertexCut(),GetZvertexCut()) ; //It crashes here, why? |
50f39b97 | 1230 | printf("Number of modules: %d \n",fNModules) ; |
6175da48 | 1231 | printf("Select pairs with their angle: %d, edep %d, min angle %2.3f, max angle %2.3f \n",fUseAngleCut, fUseAngleEDepCut, fAngleCut, fAngleMaxCut) ; |
af7b3903 | 1232 | printf("Asymmetry cuts: n = %d, \n",fNAsymCuts) ; |
1233 | printf("\tasymmetry < "); | |
1234 | for(Int_t i = 0; i < fNAsymCuts; i++) printf("%2.2f ",fAsymCuts[i]); | |
1235 | printf("\n"); | |
1236 | ||
1237 | printf("PID selection bits: n = %d, \n",fNPIDBits) ; | |
1238 | printf("\tPID bit = "); | |
1239 | for(Int_t i = 0; i < fNPIDBits; i++) printf("%d ",fPIDBits[i]); | |
1240 | printf("\n"); | |
1241 | ||
2db10729 | 1242 | if(fMultiCutAna) |
1243 | { | |
db2bf6fd | 1244 | printf("pT cuts: n = %d, \n",fNPtCuts) ; |
1245 | printf("\tpT > "); | |
1246 | for(Int_t i = 0; i < fNPtCuts; i++) printf("%2.2f ",fPtCuts[i]); | |
1247 | printf("GeV/c\n"); | |
1248 | ||
1249 | printf("N cell in cluster cuts: n = %d, \n",fNCellNCuts) ; | |
1250 | printf("\tnCell > "); | |
1251 | for(Int_t i = 0; i < fNCellNCuts; i++) printf("%d ",fCellNCuts[i]); | |
1252 | printf("\n"); | |
0333ede6 | 1253 | |
db2bf6fd | 1254 | } |
477d6cee | 1255 | printf("------------------------------------------------------\n") ; |
2db10729 | 1256 | } |
1c5acb87 | 1257 | |
c8710850 | 1258 | //________________________________________ |
1259 | void AliAnaPi0::FillAcceptanceHistograms() | |
1260 | { | |
5ae09196 | 1261 | //Fill acceptance histograms if MC data is available |
6d22cc69 | 1262 | |
1263 | Double_t mesonY = -100 ; | |
1264 | Double_t mesonE = -1 ; | |
1265 | Double_t mesonPt = -1 ; | |
1266 | Double_t mesonPhi = 100 ; | |
1267 | Double_t mesonYeta= -1 ; | |
1268 | ||
1269 | Int_t pdg = 0 ; | |
1270 | Int_t nprim = 0 ; | |
1271 | Int_t nDaught = 0 ; | |
1272 | Int_t iphot1 = 0 ; | |
1273 | Int_t iphot2 = 0 ; | |
1274 | ||
c8710850 | 1275 | Float_t cen = GetEventCentrality(); |
1276 | Float_t ep = GetEventPlaneAngle(); | |
1277 | ||
6d22cc69 | 1278 | TParticle * primStack = 0; |
1279 | AliAODMCParticle * primAOD = 0; | |
6d22cc69 | 1280 | |
1281 | // Get the ESD MC particles container | |
1282 | AliStack * stack = 0; | |
1283 | if( GetReader()->ReadStack() ) | |
1284 | { | |
1285 | stack = GetMCStack(); | |
1286 | if(!stack ) return; | |
1287 | nprim = stack->GetNtrack(); | |
1288 | } | |
1289 | ||
1290 | // Get the AOD MC particles container | |
1291 | TClonesArray * mcparticles = 0; | |
1292 | if( GetReader()->ReadAODMCParticles() ) | |
1293 | { | |
1294 | mcparticles = GetReader()->GetAODMCParticles(); | |
1295 | if( !mcparticles ) return; | |
1296 | nprim = mcparticles->GetEntriesFast(); | |
1297 | } | |
1298 | ||
1299 | for(Int_t i=0 ; i < nprim; i++) | |
c8710850 | 1300 | { |
6d22cc69 | 1301 | if(GetReader()->AcceptOnlyHIJINGLabels() && !GetReader()->IsHIJINGLabel(i)) continue ; |
1302 | ||
1303 | if(GetReader()->ReadStack()) | |
1304 | { | |
1305 | primStack = stack->Particle(i) ; | |
13c4abee | 1306 | if(!primStack) |
1307 | { | |
2db10729 | 1308 | AliWarning("ESD primaries pointer not available!!"); |
13c4abee | 1309 | continue; |
1310 | } | |
6d22cc69 | 1311 | |
1312 | // If too small skip | |
1313 | if( primStack->Energy() < 0.4 ) continue; | |
2db10729 | 1314 | |
6d22cc69 | 1315 | pdg = primStack->GetPdgCode(); |
1316 | nDaught = primStack->GetNDaughters(); | |
1317 | iphot1 = primStack->GetDaughter(0) ; | |
1318 | iphot2 = primStack->GetDaughter(1) ; | |
1319 | if(primStack->Energy() == TMath::Abs(primStack->Pz())) continue ; //Protection against floating point exception | |
1320 | ||
1321 | //printf("i %d, %s %d %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(), | |
1322 | // prim->GetName(), prim->GetPdgCode()); | |
1323 | ||
1324 | //Photon kinematics | |
1a8c88c1 | 1325 | primStack->Momentum(fPi0Mom); |
6d22cc69 | 1326 | |
1f0cae67 | 1327 | mesonY = 0.5*TMath::Log((primStack->Energy()+primStack->Pz())/(primStack->Energy()-primStack->Pz())) ; |
6d22cc69 | 1328 | } |
1329 | else | |
1330 | { | |
1331 | primAOD = (AliAODMCParticle *) mcparticles->At(i); | |
13c4abee | 1332 | if(!primAOD) |
1333 | { | |
2db10729 | 1334 | AliWarning("AOD primaries pointer not available!!"); |
13c4abee | 1335 | continue; |
1336 | } | |
6d22cc69 | 1337 | |
1338 | // If too small skip | |
1339 | if( primAOD->E() < 0.4 ) continue; | |
1340 | ||
1341 | pdg = primAOD->GetPdgCode(); | |
1342 | nDaught = primAOD->GetNDaughters(); | |
1343 | iphot1 = primAOD->GetFirstDaughter() ; | |
1344 | iphot2 = primAOD->GetLastDaughter() ; | |
1345 | ||
1346 | if(primAOD->E() == TMath::Abs(primAOD->Pz())) continue ; //Protection against floating point exception | |
1347 | ||
1348 | //Photon kinematics | |
1a8c88c1 | 1349 | fPi0Mom.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E()); |
6d22cc69 | 1350 | |
1f0cae67 | 1351 | mesonY = 0.5*TMath::Log((primAOD->E()+primAOD->Pz())/(primAOD->E()-primAOD->Pz())) ; |
6d22cc69 | 1352 | } |
1353 | ||
1354 | // Select only pi0 or eta | |
1355 | if( pdg != 111 && pdg != 221) continue ; | |
1356 | ||
1a8c88c1 | 1357 | mesonPt = fPi0Mom.Pt () ; |
1358 | mesonE = fPi0Mom.E () ; | |
1359 | mesonYeta= fPi0Mom.Eta() ; | |
1360 | mesonPhi = fPi0Mom.Phi() ; | |
6d22cc69 | 1361 | if( mesonPhi < 0 ) mesonPhi+=TMath::TwoPi(); |
1362 | mesonPhi *= TMath::RadToDeg(); | |
1363 | ||
1364 | if(pdg == 111) | |
1365 | { | |
1366 | if(TMath::Abs(mesonY) < 1.0) | |
1367 | { | |
1368 | fhPrimPi0E ->Fill(mesonE ) ; | |
1369 | fhPrimPi0Pt ->Fill(mesonPt) ; | |
1370 | fhPrimPi0Phi->Fill(mesonPt, mesonPhi) ; | |
1371 | ||
1372 | fhPrimPi0YetaYcut ->Fill(mesonPt,mesonYeta) ; | |
1373 | fhPrimPi0PtCentrality->Fill(mesonPt,cen) ; | |
1374 | fhPrimPi0PtEventPlane->Fill(mesonPt,ep ) ; | |
1375 | } | |
1376 | ||
1377 | fhPrimPi0Y ->Fill(mesonPt, mesonY) ; | |
1378 | fhPrimPi0Yeta->Fill(mesonPt, mesonYeta) ; | |
1379 | } | |
1380 | else if(pdg == 221) | |
1381 | { | |
1382 | if(TMath::Abs(mesonY) < 1.0) | |
1383 | { | |
1384 | fhPrimEtaE ->Fill(mesonE ) ; | |
1385 | fhPrimEtaPt ->Fill(mesonPt) ; | |
1386 | fhPrimEtaPhi->Fill(mesonPt, mesonPhi) ; | |
1387 | ||
1388 | fhPrimEtaYetaYcut ->Fill(mesonPt,mesonYeta) ; | |
1389 | fhPrimEtaPtCentrality->Fill(mesonPt,cen) ; | |
1390 | fhPrimEtaPtEventPlane->Fill(mesonPt,ep ) ; | |
1391 | } | |
1392 | ||
1393 | fhPrimEtaY ->Fill(mesonPt, mesonY) ; | |
1394 | fhPrimEtaYeta->Fill(mesonPt, mesonYeta) ; | |
1395 | } | |
1396 | ||
1397 | //Origin of meson | |
1398 | if(fFillOriginHisto && TMath::Abs(mesonY) < 0.7) | |
c8710850 | 1399 | { |
6d22cc69 | 1400 | Int_t momindex = -1; |
1401 | Int_t mompdg = -1; | |
1402 | Int_t momstatus = -1; | |
1403 | Float_t momR = 0; | |
1404 | if(GetReader()->ReadStack()) momindex = primStack->GetFirstMother(); | |
1405 | if(GetReader()->ReadAODMCParticles()) momindex = primAOD ->GetMother(); | |
1406 | ||
1407 | if(momindex >= 0 && momindex < nprim) | |
667a3592 | 1408 | { |
6d22cc69 | 1409 | if(GetReader()->ReadStack()) |
1410 | { | |
1411 | TParticle* mother = stack->Particle(momindex); | |
1412 | mompdg = TMath::Abs(mother->GetPdgCode()); | |
1413 | momstatus = mother->GetStatusCode(); | |
1414 | momR = mother->R(); | |
1415 | } | |
667a3592 | 1416 | |
6d22cc69 | 1417 | if(GetReader()->ReadAODMCParticles()) |
1418 | { | |
1419 | AliAODMCParticle* mother = (AliAODMCParticle*) mcparticles->At(momindex); | |
1420 | mompdg = TMath::Abs(mother->GetPdgCode()); | |
1421 | momstatus = mother->GetStatus(); | |
1422 | momR = TMath::Sqrt(mother->Xv()*mother->Xv()+mother->Yv()*mother->Yv()); | |
1423 | } | |
0333ede6 | 1424 | |
6d22cc69 | 1425 | if(pdg == 111) |
be894c1d | 1426 | { |
6d22cc69 | 1427 | if (momstatus == 21)fhPrimPi0PtOrigin->Fill(mesonPt,0.5);//parton |
1428 | else if(mompdg < 22 ) fhPrimPi0PtOrigin->Fill(mesonPt,1.5);//quark | |
1429 | else if(mompdg > 2100 && mompdg < 2210) fhPrimPi0PtOrigin->Fill(mesonPt,2.5);// resonances | |
1430 | else if(mompdg == 221) fhPrimPi0PtOrigin->Fill(mesonPt,8.5);//eta | |
1431 | else if(mompdg == 331) fhPrimPi0PtOrigin->Fill(mesonPt,9.5);//eta prime | |
1432 | else if(mompdg == 213) fhPrimPi0PtOrigin->Fill(mesonPt,4.5);//rho | |
1433 | else if(mompdg == 223) fhPrimPi0PtOrigin->Fill(mesonPt,5.5);//omega | |
1434 | else if(mompdg >= 310 && mompdg <= 323) fhPrimPi0PtOrigin->Fill(mesonPt,6.5);//k0S, k+-,k* | |
1435 | else if(mompdg == 130) fhPrimPi0PtOrigin->Fill(mesonPt,6.5);//k0L | |
1436 | else if(momstatus == 11 || momstatus == 12 ) fhPrimPi0PtOrigin->Fill(mesonPt,3.5);//resonances | |
1437 | else fhPrimPi0PtOrigin->Fill(mesonPt,7.5);//other? | |
fba46696 | 1438 | |
6d22cc69 | 1439 | //printf("Prim Pi0: index %d, pt %2.2f Prod vertex %3.3f, origin pdg %d, origin status %d, origin UI %d\n", |
1440 | // momindex, mesonPt,mother->R(),mompdg,momstatus,mother->GetUniqueID()); | |
fba46696 | 1441 | |
6d22cc69 | 1442 | fhPrimPi0ProdVertex->Fill(mesonPt,momR); |
08a56f5f | 1443 | |
6d22cc69 | 1444 | }//pi0 |
1445 | else | |
1446 | { | |
1447 | if (momstatus == 21 ) fhPrimEtaPtOrigin->Fill(mesonPt,0.5);//parton | |
1448 | else if(mompdg < 22 ) fhPrimEtaPtOrigin->Fill(mesonPt,1.5);//quark | |
1449 | else if(mompdg > 2100 && mompdg < 2210) fhPrimEtaPtOrigin->Fill(mesonPt,2.5);//qq resonances | |
1450 | else if(mompdg == 331) fhPrimEtaPtOrigin->Fill(mesonPt,5.5);//eta prime | |
1451 | else if(momstatus == 11 || momstatus == 12 ) fhPrimEtaPtOrigin->Fill(mesonPt,3.5);//resonances | |
1452 | else fhPrimEtaPtOrigin->Fill(mesonPt,4.5);//stable, conversions? | |
1453 | //printf("Other Meson pdg %d, Mother %s, pdg %d, status %d\n",pdg, TDatabasePDG::Instance()->GetParticle(mompdg)->GetName(),mompdg, momstatus ); | |
667a3592 | 1454 | |
6d22cc69 | 1455 | fhPrimEtaProdVertex->Fill(mesonPt,momR); |
1456 | ||
1457 | } | |
1458 | } // pi0 has mother | |
1459 | } | |
1460 | ||
1461 | //Check if both photons hit Calorimeter | |
1462 | if(nDaught != 2 ) continue; //Only interested in 2 gamma decay | |
1463 | ||
1464 | if(iphot1 < 0 || iphot1 >= nprim || iphot2 < 0 || iphot2 >= nprim) continue ; | |
1465 | ||
6d22cc69 | 1466 | Int_t pdg1 = 0; |
1467 | Int_t pdg2 = 0; | |
1468 | Bool_t inacceptance1 = kTRUE; | |
1469 | Bool_t inacceptance2 = kTRUE; | |
1470 | ||
1471 | if(GetReader()->ReadStack()) | |
1472 | { | |
1473 | TParticle * phot1 = stack->Particle(iphot1) ; | |
1474 | TParticle * phot2 = stack->Particle(iphot2) ; | |
1475 | ||
1476 | if(!phot1 || !phot2) continue ; | |
1477 | ||
1478 | pdg1 = phot1->GetPdgCode(); | |
1479 | pdg2 = phot2->GetPdgCode(); | |
1480 | ||
1a8c88c1 | 1481 | phot1->Momentum(fPhotonMom1); |
1482 | phot2->Momentum(fPhotonMom2); | |
6d22cc69 | 1483 | |
1484 | // Check if photons hit the Calorimeter acceptance | |
1485 | if(IsRealCaloAcceptanceOn()) | |
1486 | { | |
0cea6003 | 1487 | if( !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance( GetCalorimeter(), phot1 )) inacceptance1 = kFALSE ; |
1488 | if( !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance( GetCalorimeter(), phot2 )) inacceptance2 = kFALSE ; | |
6d22cc69 | 1489 | } |
1490 | } | |
1491 | ||
1492 | if(GetReader()->ReadAODMCParticles()) | |
1493 | { | |
1494 | AliAODMCParticle * phot1 = (AliAODMCParticle *) mcparticles->At(iphot1) ; | |
1495 | AliAODMCParticle * phot2 = (AliAODMCParticle *) mcparticles->At(iphot2) ; | |
1496 | ||
1497 | if(!phot1 || !phot2) continue ; | |
1498 | ||
1499 | pdg1 = phot1->GetPdgCode(); | |
1500 | pdg2 = phot2->GetPdgCode(); | |
1501 | ||
1a8c88c1 | 1502 | fPhotonMom1.SetPxPyPzE(phot1->Px(),phot1->Py(),phot1->Pz(),phot1->E()); |
1503 | fPhotonMom2.SetPxPyPzE(phot2->Px(),phot2->Py(),phot2->Pz(),phot2->E()); | |
6d22cc69 | 1504 | |
1505 | // Check if photons hit the Calorimeter acceptance | |
1506 | if(IsRealCaloAcceptanceOn()) | |
1507 | { | |
0cea6003 | 1508 | if( !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance( GetCalorimeter(), phot1 )) inacceptance1 = kFALSE ; |
1509 | if( !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance( GetCalorimeter(), phot2 )) inacceptance2 = kFALSE ; | |
6d22cc69 | 1510 | } |
1511 | } | |
1512 | ||
1513 | if( pdg1 != 22 || pdg2 !=22) continue ; | |
1514 | ||
1515 | // Check if photons hit desired acceptance in the fidutial borders fixed in the analysis | |
1516 | if(IsFiducialCutOn()) | |
1517 | { | |
1a8c88c1 | 1518 | if( inacceptance1 && !GetFiducialCut()->IsInFiducialCut(fPhotonMom1.Eta(), fPhotonMom1.Phi(), GetCalorimeter()) ) inacceptance1 = kFALSE ; |
1519 | if( inacceptance2 && !GetFiducialCut()->IsInFiducialCut(fPhotonMom2.Eta(), fPhotonMom2.Phi(), GetCalorimeter()) ) inacceptance2 = kFALSE ; | |
6d22cc69 | 1520 | } |
1521 | ||
1a8c88c1 | 1522 | if(fFillArmenterosThetaStar) FillArmenterosThetaStar(pdg); |
2db10729 | 1523 | |
cb67d5f1 | 1524 | if(GetCalorimeter()==kEMCAL && inacceptance1 && inacceptance2 && fCheckAccInSector) |
c8710850 | 1525 | { |
6d22cc69 | 1526 | Int_t absID1=0; |
1527 | Int_t absID2=0; | |
1528 | ||
1a8c88c1 | 1529 | Float_t photonPhi1 = fPhotonMom1.Phi(); |
1530 | Float_t photonPhi2 = fPhotonMom2.Phi(); | |
0333ede6 | 1531 | |
6d22cc69 | 1532 | if(photonPhi1 < 0) photonPhi1+=TMath::TwoPi(); |
1533 | if(photonPhi2 < 0) photonPhi2+=TMath::TwoPi(); | |
1534 | ||
1a8c88c1 | 1535 | GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(fPhotonMom1.Eta(),photonPhi1,absID1); |
1536 | GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(fPhotonMom2.Eta(),photonPhi2,absID2); | |
6d22cc69 | 1537 | |
1538 | Int_t sm1 = GetEMCALGeometry()->GetSuperModuleNumber(absID1); | |
1539 | Int_t sm2 = GetEMCALGeometry()->GetSuperModuleNumber(absID2); | |
1540 | ||
1541 | Int_t j=0; | |
1542 | Bool_t sameSector = kFALSE; | |
1543 | for(Int_t isector = 0; isector < fNModules/2; isector++) | |
156549ae | 1544 | { |
6d22cc69 | 1545 | j=2*isector; |
1546 | if((sm1==j && sm2==j+1) || (sm1==j+1 && sm2==j)) sameSector = kTRUE; | |
1547 | } | |
1548 | ||
1549 | if(sm1!=sm2 && !sameSector) | |
1550 | { | |
1551 | inacceptance1 = kFALSE; | |
1552 | inacceptance2 = kFALSE; | |
1553 | } | |
1554 | //if(sm1!=sm2)printf("sm1 %d, sm2 %d, same sector %d, in acceptance %d\n",sm1,sm2,sameSector,inacceptance); | |
1555 | // if(GetEMCALGeometry()->Impact(phot1) && GetEMCALGeometry()->Impact(phot2)) | |
1556 | // inacceptance = kTRUE; | |
1557 | } | |
1558 | ||
2db10729 | 1559 | AliDebug(2,Form("Accepted in %s?: m (%2.2f,%2.2f,%2.2f), p1 (%2.2f,%2.2f,%2.2f), p2 (%2.2f,%2.2f,%2.2f) : in1 %d, in2 %d", |
1560 | GetCalorimeterString().Data(), | |
1561 | mesonPt,mesonYeta,mesonPhi, | |
1562 | fPhotonMom1.Pt(),fPhotonMom1.Eta(),fPhotonMom1.Phi()*TMath::RadToDeg(), | |
1563 | fPhotonMom2.Pt(),fPhotonMom2.Eta(),fPhotonMom2.Phi()*TMath::RadToDeg(), | |
1564 | inacceptance1, inacceptance2)); | |
6d22cc69 | 1565 | |
1566 | if(inacceptance1 && inacceptance2) | |
1567 | { | |
1a8c88c1 | 1568 | Float_t asym = TMath::Abs((fPhotonMom1.E()-fPhotonMom2.E()) / (fPhotonMom1.E()+fPhotonMom2.E())); |
1569 | Double_t angle = fPhotonMom1.Angle(fPhotonMom2.Vect()); | |
6d22cc69 | 1570 | |
2db10729 | 1571 | AliDebug(2,Form("\t ACCEPTED pdg %d: pt %2.2f, phi %2.2f, eta %2.2f",pdg,mesonPt,mesonPhi,mesonYeta)); |
6d22cc69 | 1572 | |
1573 | if(pdg==111) | |
1574 | { | |
1575 | fhPrimPi0AccE ->Fill(mesonE) ; | |
1576 | fhPrimPi0AccPt ->Fill(mesonPt) ; | |
1577 | fhPrimPi0AccPhi ->Fill(mesonPt, mesonPhi) ; | |
1578 | fhPrimPi0AccY ->Fill(mesonPt, mesonY) ; | |
1579 | fhPrimPi0AccYeta->Fill(mesonPt, mesonYeta) ; | |
1580 | fhPrimPi0AccPtCentrality->Fill(mesonPt,cen) ; | |
1581 | fhPrimPi0AccPtEventPlane->Fill(mesonPt,ep ) ; | |
04131edb | 1582 | |
6d22cc69 | 1583 | if(fFillAngleHisto) |
1584 | { | |
1585 | fhPrimPi0OpeningAngle ->Fill(mesonPt,angle); | |
1586 | if(mesonPt > 5)fhPrimPi0OpeningAngleAsym->Fill(asym,angle); | |
1587 | fhPrimPi0CosOpeningAngle ->Fill(mesonPt,TMath::Cos(angle)); | |
1588 | } | |
1589 | } | |
1590 | else if(pdg==221) | |
1591 | { | |
1592 | fhPrimEtaAccE ->Fill(mesonE ) ; | |
1593 | fhPrimEtaAccPt ->Fill(mesonPt) ; | |
1594 | fhPrimEtaAccPhi ->Fill(mesonPt, mesonPhi) ; | |
1595 | fhPrimEtaAccY ->Fill(mesonPt, mesonY) ; | |
1596 | fhPrimEtaAccYeta->Fill(mesonPt, mesonYeta) ; | |
1597 | fhPrimEtaAccPtCentrality->Fill(mesonPt,cen) ; | |
1598 | fhPrimEtaAccPtEventPlane->Fill(mesonPt,ep ) ; | |
0333ede6 | 1599 | |
6d22cc69 | 1600 | if(fFillAngleHisto) |
c8710850 | 1601 | { |
6d22cc69 | 1602 | fhPrimEtaOpeningAngle ->Fill(mesonPt,angle); |
1603 | if(mesonPt > 5)fhPrimEtaOpeningAngleAsym->Fill(asym,angle); | |
1604 | fhPrimEtaCosOpeningAngle ->Fill(mesonPt,TMath::Cos(angle)); | |
1605 | } | |
1606 | } | |
1607 | }//Accepted | |
1608 | ||
1609 | }//loop on primaries | |
1610 | ||
5ae09196 | 1611 | } |
1612 | ||
1a8c88c1 | 1613 | //________________________________________________ |
1614 | void AliAnaPi0::FillArmenterosThetaStar(Int_t pdg) | |
be894c1d | 1615 | { |
1616 | // Fill armenteros plots | |
1617 | ||
1618 | // Get pTArm and AlphaArm | |
1a8c88c1 | 1619 | Float_t momentumSquaredMother = fPi0Mom.P()*fPi0Mom.P(); |
be894c1d | 1620 | Float_t momentumDaughter1AlongMother = 0.; |
1621 | Float_t momentumDaughter2AlongMother = 0.; | |
1622 | ||
1623 | if (momentumSquaredMother > 0.) | |
1624 | { | |
1a8c88c1 | 1625 | momentumDaughter1AlongMother = (fPhotonMom1.Px()*fPi0Mom.Px() + fPhotonMom1.Py()*fPi0Mom.Py()+ fPhotonMom1.Pz()*fPi0Mom.Pz()) / sqrt(momentumSquaredMother); |
1626 | momentumDaughter2AlongMother = (fPhotonMom2.Px()*fPi0Mom.Px() + fPhotonMom2.Py()*fPi0Mom.Py()+ fPhotonMom2.Pz()*fPi0Mom.Pz()) / sqrt(momentumSquaredMother); | |
be894c1d | 1627 | } |
1628 | ||
1a8c88c1 | 1629 | Float_t momentumSquaredDaughter1 = fPhotonMom1.P()*fPhotonMom1.P(); |
be894c1d | 1630 | Float_t ptArmSquared = momentumSquaredDaughter1 - momentumDaughter1AlongMother*momentumDaughter1AlongMother; |
1631 | ||
1632 | Float_t pTArm = 0.; | |
1633 | if (ptArmSquared > 0.) | |
1634 | pTArm = sqrt(ptArmSquared); | |
1635 | ||
1636 | Float_t alphaArm = 0.; | |
1a8c88c1 | 1637 | if(momentumDaughter1AlongMother + momentumDaughter2AlongMother > 0) |
be894c1d | 1638 | alphaArm = (momentumDaughter1AlongMother -momentumDaughter2AlongMother) / (momentumDaughter1AlongMother + momentumDaughter2AlongMother); |
1639 | ||
1a8c88c1 | 1640 | fPhotonMom1Boost = fPhotonMom1; |
1641 | fPhotonMom1Boost.Boost(-fPi0Mom.BoostVector()); | |
1642 | Float_t cosThStar=TMath::Cos(fPhotonMom1Boost.Vect().Angle(fPi0Mom.Vect())); | |
29555e96 | 1643 | |
1a8c88c1 | 1644 | Float_t en = fPi0Mom.Energy(); |
be894c1d | 1645 | Int_t ebin = -1; |
1646 | if(en > 8 && en <= 12) ebin = 0; | |
1647 | if(en > 12 && en <= 16) ebin = 1; | |
1648 | if(en > 16 && en <= 20) ebin = 2; | |
1649 | if(en > 20) ebin = 3; | |
1650 | if(ebin < 0 || ebin > 3) return ; | |
1651 | ||
29555e96 | 1652 | |
1653 | if(pdg==111) | |
1654 | { | |
1655 | fhCosThStarPrimPi0->Fill(en,cosThStar); | |
1656 | fhArmPrimPi0[ebin]->Fill(alphaArm,pTArm); | |
1657 | } | |
1658 | else | |
1659 | { | |
1660 | fhCosThStarPrimEta->Fill(en,cosThStar); | |
1661 | fhArmPrimEta[ebin]->Fill(alphaArm,pTArm); | |
1662 | } | |
be894c1d | 1663 | |
2db10729 | 1664 | // if(GetDebug() > 2 ) |
1665 | // { | |
1666 | // Float_t asym = 0; | |
1667 | // if(fPhotonMom1.E()+fPhotonMom2.E() > 0) asym = TMath::Abs(fPhotonMom1.E()-fPhotonMom2.E())/(fPhotonMom1.E()+fPhotonMom2.E()); | |
1668 | // | |
1669 | // printf("AliAnaPi0::FillArmenterosThetaStar() - E %f, alphaArm %f, pTArm %f, cos(theta*) %f, asymmetry %1.3f\n", | |
1670 | // en,alphaArm,pTArm,cosThStar,asym); | |
1671 | // } | |
ecdde216 | 1672 | } |
29555e96 | 1673 | |
b94e038e | 1674 | //_______________________________________________________________________________________ |
1675 | void AliAnaPi0::FillMCVersusRecDataHistograms(Int_t index1, Int_t index2, | |
1676 | Float_t pt1, Float_t pt2, | |
1677 | Int_t ncell1, Int_t ncell2, | |
1678 | Double_t mass, Double_t pt, Double_t asym, | |
1679 | Double_t deta, Double_t dphi) | |
1680 | { | |
6175da48 | 1681 | //Do some MC checks on the origin of the pair, is there any common ancestor and if there is one, who? |
1682 | //Adjusted for Pythia, need to see what to do for other generators. | |
39edd7c6 | 1683 | //Array of histograms ordered as follows: 0-Photon, 1-electron, 2-pi0, 3-eta, 4-a-proton, 5-a-neutron, 6-stable particles, |
6175da48 | 1684 | // 7-other decays, 8-string, 9-final parton, 10-initial parton, intermediate, 11-colliding proton, 12-unrelated |
1685 | ||
1686 | Int_t ancPDG = 0; | |
1687 | Int_t ancStatus = 0; | |
39edd7c6 | 1688 | Int_t ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(index1, index2, |
1a8c88c1 | 1689 | GetReader(), ancPDG, ancStatus,fPi0Mom, fProdVertex); |
6175da48 | 1690 | |
08a56f5f | 1691 | Int_t momindex = -1; |
1692 | Int_t mompdg = -1; | |
1693 | Int_t momstatus = -1; | |
0333ede6 | 1694 | |
59b85683 | 1695 | Float_t prodR = -1; |
226d5b2b | 1696 | Int_t mcIndex = -1; |
1697 | ||
59b85683 | 1698 | if(ancLabel > -1) |
1699 | { | |
2db10729 | 1700 | AliDebug(1,Form("Common ancestor label %d, pdg %d, name %s, status %d", |
1701 | ancLabel,ancPDG,TDatabasePDG::Instance()->GetParticle(ancPDG)->GetName(),ancStatus)); | |
1702 | ||
226d5b2b | 1703 | if(ancPDG==22) |
1704 | {//gamma | |
1705 | mcIndex = 0; | |
39edd7c6 | 1706 | } |
226d5b2b | 1707 | else if(TMath::Abs(ancPDG)==11) |
1708 | {//e | |
1709 | mcIndex = 1; | |
39edd7c6 | 1710 | } |
226d5b2b | 1711 | else if(ancPDG==111) |
1712 | {//Pi0 | |
1713 | mcIndex = 2; | |
59b85683 | 1714 | if(fMultiCutAnaSim) |
1715 | { | |
39edd7c6 | 1716 | for(Int_t ipt=0; ipt<fNPtCuts; ipt++) |
1717 | { | |
1718 | for(Int_t icell=0; icell<fNCellNCuts; icell++) | |
1719 | { | |
1720 | for(Int_t iasym=0; iasym<fNAsymCuts; iasym++) | |
1721 | { | |
0333ede6 | 1722 | Int_t index = ((ipt*fNCellNCuts)+icell)*fNAsymCuts + iasym; |
39edd7c6 | 1723 | if(pt1 > fPtCuts[ipt] && pt2 > fPtCuts[ipt] && |
1724 | asym < fAsymCuts[iasym] && | |
1725 | ncell1 >= fCellNCuts[icell] && ncell2 >= fCellNCuts[icell]) | |
1726 | { | |
0333ede6 | 1727 | fhMCPi0MassPtRec [index]->Fill(pt,mass); |
1a8c88c1 | 1728 | fhMCPi0MassPtTrue[index]->Fill(fPi0Mom.Pt(),mass); |
1729 | if(mass < 0.17 && mass > 0.1) fhMCPi0PtTruePtRec[index]->Fill(fPi0Mom.Pt(),pt); | |
0333ede6 | 1730 | }//pass the different cuts |
1731 | }// pid bit cut loop | |
1732 | }// icell loop | |
1733 | }// pt cut loop | |
1734 | }//Multi cut ana sim | |
59b85683 | 1735 | else |
1736 | { | |
1a8c88c1 | 1737 | fhMCPi0MassPtTrue[0]->Fill(fPi0Mom.Pt(),mass); |
59b85683 | 1738 | |
1739 | if(mass < 0.17 && mass > 0.1) | |
1740 | { | |
1a8c88c1 | 1741 | fhMCPi0PtTruePtRec[0]->Fill(fPi0Mom.Pt(),pt); |
59b85683 | 1742 | |
39edd7c6 | 1743 | //Int_t uniqueId = -1; |
8bc1dd56 | 1744 | if(GetReader()->ReadStack()) |
1745 | { | |
1746 | TParticle* ancestor = GetMCStack()->Particle(ancLabel); | |
1747 | momindex = ancestor->GetFirstMother(); | |
1748 | if(momindex < 0) return; | |
1749 | TParticle* mother = GetMCStack()->Particle(momindex); | |
1750 | mompdg = TMath::Abs(mother->GetPdgCode()); | |
59b85683 | 1751 | momstatus = mother->GetStatusCode(); |
1752 | prodR = mother->R(); | |
39edd7c6 | 1753 | //uniqueId = mother->GetUniqueID(); |
8bc1dd56 | 1754 | } |
1755 | else | |
1756 | { | |
1757 | TClonesArray * mcparticles = GetReader()->GetAODMCParticles(); | |
1758 | AliAODMCParticle* ancestor = (AliAODMCParticle *) mcparticles->At(ancLabel); | |
1759 | momindex = ancestor->GetMother(); | |
1760 | if(momindex < 0) return; | |
1761 | AliAODMCParticle* mother = (AliAODMCParticle *) mcparticles->At(momindex); | |
1762 | mompdg = TMath::Abs(mother->GetPdgCode()); | |
59b85683 | 1763 | momstatus = mother->GetStatus(); |
1764 | prodR = TMath::Sqrt(mother->Xv()*mother->Xv()+mother->Yv()*mother->Yv()); | |
39edd7c6 | 1765 | //uniqueId = mother->GetUniqueID(); |
59b85683 | 1766 | } |
1767 | ||
39edd7c6 | 1768 | // printf("Reco Pi0: pt %2.2f Prod vertex %3.3f, origin pdg %d, origin status %d, origin UI %d\n", |
1769 | // pt,prodR,mompdg,momstatus,uniqueId); | |
8bc1dd56 | 1770 | |
39edd7c6 | 1771 | fhMCPi0ProdVertex->Fill(pt,prodR); |
1772 | ||
1773 | if (momstatus == 21) fhMCPi0PtOrigin->Fill(pt,0.5);//parton | |
1774 | else if(mompdg < 22 ) fhMCPi0PtOrigin->Fill(pt,1.5);//quark | |
1775 | else if(mompdg > 2100 && mompdg < 2210) fhMCPi0PtOrigin->Fill(pt,2.5);// resonances | |
1776 | else if(mompdg == 221) fhMCPi0PtOrigin->Fill(pt,8.5);//eta | |
1777 | else if(mompdg == 331) fhMCPi0PtOrigin->Fill(pt,9.5);//eta prime | |
1778 | else if(mompdg == 213) fhMCPi0PtOrigin->Fill(pt,4.5);//rho | |
1779 | else if(mompdg == 223) fhMCPi0PtOrigin->Fill(pt,5.5);//omega | |
1780 | else if(mompdg >= 310 && mompdg <= 323) fhMCPi0PtOrigin->Fill(pt,6.5);//k0S, k+-,k* | |
1781 | else if(mompdg == 130) fhMCPi0PtOrigin->Fill(pt,6.5);//k0L | |
1782 | else if(momstatus == 11 || momstatus == 12 ) fhMCPi0PtOrigin->Fill(pt,3.5);//resonances | |
1783 | else fhMCPi0PtOrigin->Fill(pt,7.5);//other? | |
1784 | ||
1785 | ||
1786 | }//pi0 mass region | |
1787 | } | |
1788 | } | |
1789 | else if(ancPDG==221) | |
1790 | {//Eta | |
1791 | mcIndex = 3; | |
1792 | if(fMultiCutAnaSim) | |
1793 | { | |
1794 | for(Int_t ipt=0; ipt<fNPtCuts; ipt++) | |
1795 | { | |
1796 | for(Int_t icell=0; icell<fNCellNCuts; icell++) | |
1797 | { | |
1798 | for(Int_t iasym=0; iasym<fNAsymCuts; iasym++) | |
1799 | { | |
1800 | Int_t index = ((ipt*fNCellNCuts)+icell)*fNAsymCuts + iasym; | |
1801 | if(pt1 > fPtCuts[ipt] && pt2 > fPtCuts[ipt] && | |
1802 | asym < fAsymCuts[iasym] && | |
1803 | ncell1 >= fCellNCuts[icell] && ncell2 >= fCellNCuts[icell]) | |
1804 | { | |
1805 | fhMCEtaMassPtRec [index]->Fill(pt,mass); | |
1a8c88c1 | 1806 | fhMCEtaMassPtTrue[index]->Fill(fPi0Mom.Pt(),mass); |
1807 | if(mass < 0.65 && mass > 0.45) fhMCEtaPtTruePtRec[index]->Fill(fPi0Mom.Pt(),pt); | |
39edd7c6 | 1808 | }//pass the different cuts |
1809 | }// pid bit cut loop | |
1810 | }// icell loop | |
1811 | }// pt cut loop | |
1812 | } //Multi cut ana sim | |
1813 | else | |
1814 | { | |
1a8c88c1 | 1815 | fhMCEtaMassPtTrue[0]->Fill(fPi0Mom.Pt(),mass); |
1816 | if(mass < 0.65 && mass > 0.45) fhMCEtaPtTruePtRec[0]->Fill(fPi0Mom.Pt(),pt); | |
39edd7c6 | 1817 | |
1818 | if(GetReader()->ReadStack()) | |
1819 | { | |
1820 | TParticle* ancestor = GetMCStack()->Particle(ancLabel); | |
1821 | momindex = ancestor->GetFirstMother(); | |
1822 | if(momindex < 0) return; | |
1823 | TParticle* mother = GetMCStack()->Particle(momindex); | |
1824 | mompdg = TMath::Abs(mother->GetPdgCode()); | |
1825 | momstatus = mother->GetStatusCode(); | |
1826 | prodR = mother->R(); | |
0333ede6 | 1827 | } |
39edd7c6 | 1828 | else |
1829 | { | |
1830 | TClonesArray * mcparticles = GetReader()->GetAODMCParticles(); | |
1831 | AliAODMCParticle* ancestor = (AliAODMCParticle *) mcparticles->At(ancLabel); | |
1832 | momindex = ancestor->GetMother(); | |
1833 | if(momindex < 0) return; | |
1834 | AliAODMCParticle* mother = (AliAODMCParticle *) mcparticles->At(momindex); | |
1835 | mompdg = TMath::Abs(mother->GetPdgCode()); | |
1836 | momstatus = mother->GetStatus(); | |
1837 | prodR = TMath::Sqrt(mother->Xv()*mother->Xv()+mother->Yv()*mother->Yv()); | |
1838 | } | |
1839 | ||
1840 | fhMCEtaProdVertex->Fill(pt,prodR); | |
1841 | ||
1842 | if (momstatus == 21 ) fhMCEtaPtOrigin->Fill(pt,0.5);//parton | |
1843 | else if(mompdg < 22 ) fhMCEtaPtOrigin->Fill(pt,1.5);//quark | |
1844 | else if(mompdg > 2100 && mompdg < 2210) fhMCEtaPtOrigin->Fill(pt,2.5);//qq resonances | |
1845 | else if(mompdg == 331) fhMCEtaPtOrigin->Fill(pt,5.5);//eta prime | |
1846 | else if(momstatus == 11 || momstatus == 12 ) fhMCEtaPtOrigin->Fill(pt,3.5);//resonances | |
1847 | else fhMCEtaPtOrigin->Fill(pt,4.5);//stable, conversions? | |
1848 | //printf("Other Meson pdg %d, Mother %s, pdg %d, status %d\n",pdg, TDatabasePDG::Instance()->GetParticle(mompdg)->GetName(),mompdg, momstatus ); | |
1849 | ||
0333ede6 | 1850 | }// eta mass region |
1851 | } | |
1852 | else if(ancPDG==-2212){//AProton | |
226d5b2b | 1853 | mcIndex = 4; |
1854 | } | |
0333ede6 | 1855 | else if(ancPDG==-2112){//ANeutron |
226d5b2b | 1856 | mcIndex = 5; |
39edd7c6 | 1857 | } |
0333ede6 | 1858 | else if(TMath::Abs(ancPDG)==13){//muons |
226d5b2b | 1859 | mcIndex = 6; |
1860 | } | |
1861 | else if (TMath::Abs(ancPDG) > 100 && ancLabel > 7) | |
1862 | { | |
1863 | if(ancStatus==1) | |
1864 | {//Stable particles, converted? not decayed resonances | |
1865 | mcIndex = 6; | |
0333ede6 | 1866 | } |
226d5b2b | 1867 | else |
1868 | {//resonances and other decays, more hadron conversions? | |
1869 | mcIndex = 7; | |
6175da48 | 1870 | } |
6175da48 | 1871 | } |
226d5b2b | 1872 | else |
1873 | {//Partons, colliding protons, strings, intermediate corrections | |
1874 | if(ancStatus==11 || ancStatus==12) | |
1875 | {//String fragmentation | |
1876 | mcIndex = 8; | |
0333ede6 | 1877 | } |
1878 | else if (ancStatus==21){ | |
226d5b2b | 1879 | if(ancLabel < 2) |
1880 | {//Colliding protons | |
1881 | mcIndex = 11; | |
39edd7c6 | 1882 | }//colliding protons |
226d5b2b | 1883 | else if(ancLabel < 6) |
1884 | {//partonic initial states interactions | |
1885 | mcIndex = 9; | |
0333ede6 | 1886 | } |
226d5b2b | 1887 | else if(ancLabel < 8) |
1888 | {//Final state partons radiations? | |
1889 | mcIndex = 10; | |
0333ede6 | 1890 | } |
1891 | // else { | |
1892 | // printf("AliAnaPi0::FillMCVersusRecDataHistograms() - Check ** Common ancestor label %d, pdg %d, name %s, status %d; \n", | |
1893 | // ancLabel,ancPDG,TDatabasePDG::Instance()->GetParticle(ancPDG)->GetName(),ancStatus); | |
1894 | // } | |
1895 | }//status 21 | |
1896 | //else { | |
1897 | // printf("AliAnaPi0::FillMCVersusRecDataHistograms() - Check *** Common ancestor label %d, pdg %d, name %s, status %d; \n", | |
1898 | // ancLabel,ancPDG,TDatabasePDG::Instance()->GetParticle(ancPDG)->GetName(),ancStatus); | |
1899 | // } | |
1900 | }////Partons, colliding protons, strings, intermediate corrections | |
39edd7c6 | 1901 | }//ancLabel > -1 |
2db10729 | 1902 | else |
1903 | { //ancLabel <= -1 | |
0333ede6 | 1904 | //printf("Not related at all label = %d\n",ancLabel); |
2db10729 | 1905 | AliDebug(1,"Common ancestor not found"); |
1906 | ||
226d5b2b | 1907 | mcIndex = 12; |
1908 | } | |
1909 | ||
2db10729 | 1910 | if(mcIndex >= 0 && mcIndex < 13) |
226d5b2b | 1911 | { |
1912 | fhMCOrgMass[mcIndex]->Fill(pt,mass); | |
1913 | fhMCOrgAsym[mcIndex]->Fill(pt,asym); | |
1914 | fhMCOrgDeltaEta[mcIndex]->Fill(pt,deta); | |
1915 | fhMCOrgDeltaPhi[mcIndex]->Fill(pt,dphi); | |
0333ede6 | 1916 | } |
226d5b2b | 1917 | |
1918 | } | |
6175da48 | 1919 | |
be894c1d | 1920 | //__________________________________________ |
39edd7c6 | 1921 | void AliAnaPi0::MakeAnalysisFillHistograms() |
1c5acb87 | 1922 | { |
39edd7c6 | 1923 | //Process one event and extract photons from AOD branch |
477d6cee | 1924 | // filled with AliAnaPhoton and fill histos with invariant mass |
1925 | ||
6175da48 | 1926 | //In case of simulated data, fill acceptance histograms |
1927 | if(IsDataMC())FillAcceptanceHistograms(); | |
08a56f5f | 1928 | |
2db10729 | 1929 | //if (GetReader()->GetEventNumber()%10000 == 0) |
08a56f5f | 1930 | // printf("--- Event %d ---\n",GetReader()->GetEventNumber()); |
1931 | ||
c2091d88 | 1932 | if(!GetInputAODBranch()) |
1933 | { | |
2db10729 | 1934 | AliFatal(Form("No input aod photons in AOD with name branch < %s >, STOP",GetInputAODName().Data())); |
1935 | return; | |
c2091d88 | 1936 | } |
1937 | ||
6175da48 | 1938 | //Init some variables |
6175da48 | 1939 | Int_t nPhot = GetInputAODBranch()->GetEntriesFast() ; |
20218aea | 1940 | |
2db10729 | 1941 | AliDebug(1,Form("Photon entries %d", nPhot)); |
0333ede6 | 1942 | |
156549ae | 1943 | //If less than photon 2 entries in the list, skip this event |
2db10729 | 1944 | if ( nPhot < 2 ) |
6d22cc69 | 1945 | { |
2db10729 | 1946 | AliDebug(1,Form("nPhotons %d, cent bin %d continue to next event",nPhot, GetEventCentrality())); |
20218aea | 1947 | |
72542aba | 1948 | if(GetNCentrBin() > 1) fhCentralityNoPair->Fill(GetEventCentrality() * GetNCentrBin() / GetReader()->GetCentralityOpt()); |
20218aea | 1949 | |
1950 | return ; | |
6175da48 | 1951 | } |
6175da48 | 1952 | |
020e681b | 1953 | Int_t ncentr = GetNCentrBin(); |
1954 | if(GetNCentrBin()==0) ncentr = 1; | |
1955 | ||
6175da48 | 1956 | //Init variables |
1957 | Int_t module1 = -1; | |
1958 | Int_t module2 = -1; | |
2db10729 | 1959 | Double_t vert[] = {0.0, 0.0, 0.0} ; //vertex |
1960 | Int_t evtIndex1 = 0 ; | |
1961 | Int_t currentEvtIndex = -1; | |
2e876d85 | 1962 | Int_t curCentrBin = GetEventCentralityBin(); |
1963 | //Int_t curVzBin = GetEventVzBin(); | |
1964 | //Int_t curRPBin = GetEventRPBin(); | |
1965 | Int_t eventbin = GetEventMixBin(); | |
96ab36eb | 1966 | |
1967 | if(eventbin > GetNCentrBin()*GetNZvertBin()*GetNRPBin()) | |
1968 | { | |
2db10729 | 1969 | AliWarning(Form("Mix Bin not expected: cen bin %d, z bin %d, rp bin %d, total bin %d, Event Centrality %d, z vertex %2.3f, Reaction Plane %2.3f", |
1970 | GetEventCentralityBin(),GetEventVzBin(), GetEventRPBin(),eventbin,GetEventCentrality(),vert[2],GetEventPlaneAngle())); | |
96ab36eb | 1971 | return; |
1972 | } | |
2db10729 | 1973 | |
c4a7d28a | 1974 | //Get shower shape information of clusters |
5cd6b1a6 | 1975 | // TObjArray *clusters = 0; |
1976 | // if (GetCalorimeter()==kEMCAL) clusters = GetEMCALClusters(); | |
1977 | // else if(GetCalorimeter()==kPHOS ) clusters = GetPHOSClusters() ; | |
c4a7d28a | 1978 | |
6175da48 | 1979 | //--------------------------------- |
1980 | //First loop on photons/clusters | |
1981 | //--------------------------------- | |
2e876d85 | 1982 | for(Int_t i1=0; i1<nPhot-1; i1++) |
1983 | { | |
477d6cee | 1984 | AliAODPWG4Particle * p1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(i1)) ; |
4285cb63 | 1985 | //printf("AliAnaPi0::MakeAnalysisFillHistograms() : cluster1 id %d/%d\n",i1,nPhot-1); |
0333ede6 | 1986 | |
2db10729 | 1987 | // get the event index in the mixed buffer where the photon comes from |
7e7694bb | 1988 | // in case of mixing with analysis frame, not own mixing |
4285cb63 | 1989 | evtIndex1 = GetEventIndex(p1, vert) ; |
c8fe2783 | 1990 | if ( evtIndex1 == -1 ) |
2db10729 | 1991 | return ; |
c8fe2783 | 1992 | if ( evtIndex1 == -2 ) |
2db10729 | 1993 | continue ; |
1994 | ||
4285cb63 | 1995 | // Only effective in case of mixed event frame |
2244659d | 1996 | if(TMath::Abs(vert[2]) > GetZvertexCut()) continue ; //vertex cut |
0333ede6 | 1997 | |
2db10729 | 1998 | if (evtIndex1 != currentEvtIndex) |
2e876d85 | 1999 | { |
6175da48 | 2000 | //Fill event bin info |
6fd5e756 | 2001 | if(DoOwnMix()) fhEventBin->Fill(eventbin) ; |
2db10729 | 2002 | if(GetNCentrBin() > 1) |
2e876d85 | 2003 | { |
72542aba | 2004 | fhCentrality->Fill(curCentrBin); |
606cbcb1 | 2005 | if(GetNRPBin() > 1 && GetEventPlane()) fhEventPlaneResolution->Fill(curCentrBin,TMath::Cos(2.*GetEventPlane()->GetQsubRes())); |
72542aba | 2006 | } |
2db10729 | 2007 | currentEvtIndex = evtIndex1 ; |
c8fe2783 | 2008 | } |
7e7694bb | 2009 | |
f8006433 | 2010 | //printf("AliAnaPi0::MakeAnalysisFillHistograms(): Photon 1 Evt %d Vertex : %f,%f,%f\n",evtIndex1, GetVertex(evtIndex1)[0] ,GetVertex(evtIndex1)[1],GetVertex(evtIndex1)[2]); |
af7b3903 | 2011 | |
6175da48 | 2012 | //Get the momentum of this cluster |
1a8c88c1 | 2013 | fPhotonMom1.SetPxPyPzE(p1->Px(),p1->Py(),p1->Pz(),p1->E()); |
6175da48 | 2014 | |
2015 | //Get (Super)Module number of this cluster | |
5cd6b1a6 | 2016 | module1 = p1->GetSModNumber();// GetModuleNumber(p1); |
6175da48 | 2017 | |
0333ede6 | 2018 | //------------------------------------------ |
0932fa00 | 2019 | // Recover original cluster |
5cd6b1a6 | 2020 | // Int_t iclus1 = -1 ; |
2021 | // AliVCluster * cluster1 = FindCluster(clusters,p1->GetCaloLabel(0),iclus1); | |
2022 | // if(!cluster1) AliWarning("Cluster1 not found!"); | |
2db10729 | 2023 | |
6175da48 | 2024 | //--------------------------------- |
2025 | //Second loop on photons/clusters | |
2026 | //--------------------------------- | |
2e876d85 | 2027 | for(Int_t i2=i1+1; i2<nPhot; i2++) |
2028 | { | |
477d6cee | 2029 | AliAODPWG4Particle * p2 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(i2)) ; |
4285cb63 | 2030 | //printf("AliAnaPi0::MakeAnalysisFillHistograms() : cluster2 i %d/%d\n",i2,nPhot); |
2db10729 | 2031 | |
6175da48 | 2032 | //In case of mixing frame, check we are not in the same event as the first cluster |
2db10729 | 2033 | Int_t evtIndex2 = GetEventIndex(p2, vert) ; |
c8fe2783 | 2034 | if ( evtIndex2 == -1 ) |
2db10729 | 2035 | return ; |
c8fe2783 | 2036 | if ( evtIndex2 == -2 ) |
2db10729 | 2037 | continue ; |
c8fe2783 | 2038 | if (GetMixedEvent() && (evtIndex1 == evtIndex2)) |
7e7694bb | 2039 | continue ; |
0333ede6 | 2040 | |
5cd6b1a6 | 2041 | // //------------------------------------------ |
2042 | // // Recover original cluster | |
2043 | // Int_t iclus2 = -1; | |
2044 | // AliVCluster * cluster2 = FindCluster(clusters,p2->GetCaloLabel(0),iclus2,iclus1+1); | |
2045 | // // start new loop from iclus1+1 to gain some time | |
2046 | // if(!cluster2) AliWarning("Cluster2 not found!"); | |
2047 | // | |
2048 | // // Get the TOF,l0 and ncells from the clusters | |
2049 | // Float_t tof1 = -1; | |
2050 | // Float_t l01 = -1; | |
2051 | // Int_t ncell1 = 0; | |
2052 | // if(cluster1) | |
2053 | // { | |
2054 | // tof1 = cluster1->GetTOF()*1e9; | |
2055 | // l01 = cluster1->GetM02(); | |
2056 | // ncell1 = cluster1->GetNCells(); | |
2057 | // //printf("cluster1: E %2.2f (%2.2f), l0 %2.2f, tof %2.2f\n",cluster1->E(),p1->E(),l01,tof1); | |
2058 | // } | |
2059 | // //else printf("cluster1 not available: calo label %d / %d, cluster ID %d\n", | |
2060 | // // p1->GetCaloLabel(0),(GetReader()->GetInputEvent())->GetNumberOfCaloClusters()-1,cluster1->GetID()); | |
2061 | // | |
2062 | // Float_t tof2 = -1; | |
2063 | // Float_t l02 = -1; | |
2064 | // Int_t ncell2 = 0; | |
2065 | // if(cluster2) | |
2066 | // { | |
2067 | // tof2 = cluster2->GetTOF()*1e9; | |
2068 | // l02 = cluster2->GetM02(); | |
2069 | // ncell2 = cluster2->GetNCells(); | |
2070 | // //printf("cluster2: E %2.2f (%2.2f), l0 %2.2f, tof %2.2f\n",cluster2->E(),p2->E(),l02,tof2); | |
2071 | // } | |
2072 | // //else printf("cluster2 not available: calo label %d / %d, cluster ID %d\n", | |
2073 | // // p2->GetCaloLabel(0),(GetReader()->GetInputEvent())->GetNumberOfCaloClusters()-1,cluster2->GetID()); | |
2074 | // | |
2075 | // if(cluster1 && cluster2) | |
2076 | // { | |
2077 | // Double_t t12diff = tof1-tof2; | |
2078 | // if(TMath::Abs(t12diff) > GetPairTimeCut()) continue; | |
2079 | // } | |
2080 | ||
2081 | Float_t tof1 = p1->GetTime(); | |
2082 | Float_t l01 = p1->GetM02(); | |
2083 | Int_t ncell1 = p1->GetNCells(); | |
2084 | //printf("cluster1: E %2.2f, l0 %2.2f, tof %2.2f\n",p1->E(),l01,tof1); | |
2085 | ||
2086 | Float_t tof2 = p2->GetTime(); | |
2087 | Float_t l02 = p2->GetM02(); | |
2088 | Int_t ncell2 = p2->GetNCells(); | |
2089 | //printf("cluster2: E %2.2f, l0 %2.2f, tof %2.2f\n",p2->E(),l02,tof2); | |
2090 | ||
2091 | Double_t t12diff = tof1-tof2; | |
2092 | fhEPairDiffTime->Fill((fPhotonMom1 + fPhotonMom2).Pt(),t12diff); | |
2093 | if(TMath::Abs(t12diff) > GetPairTimeCut()) continue; | |
2094 | ||
9ab9e937 | 2095 | //------------------------------------------ |
0333ede6 | 2096 | |
f8006433 | 2097 | //printf("AliAnaPi0::MakeAnalysisFillHistograms(): Photon 2 Evt %d Vertex : %f,%f,%f\n",evtIndex2, GetVertex(evtIndex2)[0] ,GetVertex(evtIndex2)[1],GetVertex(evtIndex2)[2]); |
0333ede6 | 2098 | |
6175da48 | 2099 | //Get the momentum of this cluster |
1a8c88c1 | 2100 | fPhotonMom2.SetPxPyPzE(p2->Px(),p2->Py(),p2->Pz(),p2->E()); |
2101 | ||
59b6bd99 | 2102 | //Get module number |
5cd6b1a6 | 2103 | module2 = p2->GetSModNumber(); //GetModuleNumber(p2); |
6175da48 | 2104 | |
2105 | //--------------------------------- | |
2106 | // Get pair kinematics | |
2107 | //--------------------------------- | |
1a8c88c1 | 2108 | Double_t m = (fPhotonMom1 + fPhotonMom2).M() ; |
2109 | Double_t pt = (fPhotonMom1 + fPhotonMom2).Pt(); | |
2110 | Double_t deta = fPhotonMom1.Eta() - fPhotonMom2.Eta(); | |
2111 | Double_t dphi = fPhotonMom1.Phi() - fPhotonMom2.Phi(); | |
6175da48 | 2112 | Double_t a = TMath::Abs(p1->E()-p2->E())/(p1->E()+p2->E()) ; |
2113 | ||
2db10729 | 2114 | AliDebug(2,Form("E: fPhotonMom1 %f, fPhotonMom2 %f; Pair: pT %f, mass %f, a %f", p1->E(), p2->E(), (fPhotonMom1 + fPhotonMom2).E(),m,a)); |
6175da48 | 2115 | |
2116 | //-------------------------------- | |
2117 | // Opening angle selection | |
2118 | //-------------------------------- | |
2db10729 | 2119 | //Check if opening angle is too large or too small compared to what is expected |
1a8c88c1 | 2120 | Double_t angle = fPhotonMom1.Angle(fPhotonMom2.Vect()); |
2121 | if(fUseAngleEDepCut && !GetNeutralMesonSelection()->IsAngleInWindow((fPhotonMom1+fPhotonMom2).E(),angle+0.05)) | |
0932fa00 | 2122 | { |
2db10729 | 2123 | AliDebug(2,Form("Real pair angle %f not in E %f window",angle, (fPhotonMom1+fPhotonMom2).E())); |
c8fe2783 | 2124 | continue; |
6175da48 | 2125 | } |
0333ede6 | 2126 | |
0932fa00 | 2127 | if(fUseAngleCut && (angle < fAngleCut || angle > fAngleMaxCut)) |
2128 | { | |
2db10729 | 2129 | AliDebug(2,Form("Real pair cut %f < angle %f < cut %f",fAngleCut, angle, fAngleMaxCut)); |
6175da48 | 2130 | continue; |
2131 | } | |
0333ede6 | 2132 | |
6175da48 | 2133 | //------------------------------------------------------------------------------------------------- |
af7b3903 | 2134 | //Fill module dependent histograms, put a cut on assymmetry on the first available cut in the array |
6175da48 | 2135 | //------------------------------------------------------------------------------------------------- |
2e876d85 | 2136 | if(a < fAsymCuts[0] && fFillSMCombinations) |
2137 | { | |
af7b3903 | 2138 | if(module1==module2 && module1 >=0 && module1<fNModules) |
91e1ea12 | 2139 | fhReMod[module1]->Fill(pt,m) ; |
0333ede6 | 2140 | |
cb67d5f1 | 2141 | if(GetCalorimeter()==kEMCAL) |
2e876d85 | 2142 | { |
8d230fa8 | 2143 | // Same sector |
2144 | Int_t j=0; | |
2e876d85 | 2145 | for(Int_t i = 0; i < fNModules/2; i++) |
2146 | { | |
8d230fa8 | 2147 | j=2*i; |
91e1ea12 | 2148 | if((module1==j && module2==j+1) || (module1==j+1 && module2==j)) fhReSameSectorEMCALMod[i]->Fill(pt,m) ; |
8d230fa8 | 2149 | } |
2150 | ||
2151 | // Same side | |
2152 | for(Int_t i = 0; i < fNModules-2; i++){ | |
2db10729 | 2153 | if((module1==i && module2==i+2) || (module1==i+2 && module2==i)) fhReSameSideEMCALMod[i]->Fill(pt,m); |
8d230fa8 | 2154 | } |
2155 | }//EMCAL | |
2156 | else {//PHOS | |
2db10729 | 2157 | if((module1==0 && module2==1) || (module1==1 && module2==0)) fhReDiffPHOSMod[0]->Fill(pt,m) ; |
2158 | if((module1==0 && module2==2) || (module1==2 && module2==0)) fhReDiffPHOSMod[1]->Fill(pt,m) ; | |
91e1ea12 | 2159 | if((module1==1 && module2==2) || (module1==2 && module2==1)) fhReDiffPHOSMod[2]->Fill(pt,m) ; |
8d230fa8 | 2160 | }//PHOS |
821c8090 | 2161 | } |
7e7694bb | 2162 | |
af7b3903 | 2163 | //In case we want only pairs in same (super) module, check their origin. |
2164 | Bool_t ok = kTRUE; | |
2165 | if(fSameSM && module1!=module2) ok=kFALSE; | |
2e876d85 | 2166 | if(ok) |
2167 | { | |
2db10729 | 2168 | //Check if one of the clusters comes from a conversion |
2e876d85 | 2169 | if(fCheckConversion) |
2170 | { | |
d39cba7e | 2171 | if (p1->IsTagged() && p2->IsTagged()) fhReConv2->Fill(pt,m); |
2172 | else if(p1->IsTagged() || p2->IsTagged()) fhReConv ->Fill(pt,m); | |
2173 | } | |
6175da48 | 2174 | |
0333ede6 | 2175 | // Fill shower shape cut histograms |
7a972c0c | 2176 | if(fFillSSCombinations) |
2177 | { | |
2db10729 | 2178 | if ( l01 > 0.01 && l01 < 0.4 && |
5cd6b1a6 | 2179 | l02 > 0.01 && l02 < 0.4 ) fhReSS[0]->Fill(pt,m); // Tight |
7a972c0c | 2180 | else if( l01 > 0.4 && l02 > 0.4 ) fhReSS[1]->Fill(pt,m); // Loose |
2181 | else if( l01 > 0.01 && l01 < 0.4 && l02 > 0.4 ) fhReSS[2]->Fill(pt,m); // Both | |
2182 | else if( l02 > 0.01 && l02 < 0.4 && l01 > 0.4 ) fhReSS[2]->Fill(pt,m); // Both | |
2183 | } | |
2184 | ||
af7b3903 | 2185 | //Fill histograms for different bad channel distance, centrality, assymmetry cut and pid bit |
0932fa00 | 2186 | for(Int_t ipid=0; ipid<fNPIDBits; ipid++) |
2187 | { | |
2188 | if((p1->IsPIDOK(fPIDBits[ipid],AliCaloPID::kPhoton)) && (p2->IsPIDOK(fPIDBits[ipid],AliCaloPID::kPhoton))) | |
2189 | { | |
2190 | for(Int_t iasym=0; iasym < fNAsymCuts; iasym++) | |
2191 | { | |
3eb6ab95 | 2192 | if(a < fAsymCuts[iasym]) |
2193 | { | |
af7b3903 | 2194 | Int_t index = ((curCentrBin*fNPIDBits)+ipid)*fNAsymCuts + iasym; |
3eb6ab95 | 2195 | //printf("index %d :(cen %d * nPID %d + ipid %d)*nasym %d + iasym %d - max index %d\n",index,curCentrBin,fNPIDBits,ipid,fNAsymCuts,iasym, curCentrBin*fNPIDBits*fNAsymCuts); |
2db10729 | 2196 | |
020e681b | 2197 | if(index < 0 || index >= ncentr*fNPIDBits*fNAsymCuts) continue ; |
3eb6ab95 | 2198 | |
91e1ea12 | 2199 | fhRe1 [index]->Fill(pt,m); |
2200 | if(fMakeInvPtPlots)fhReInvPt1[index]->Fill(pt,m,1./pt) ; | |
0932fa00 | 2201 | if(fFillBadDistHisto) |
2202 | { | |
2203 | if(p1->DistToBad()>0 && p2->DistToBad()>0) | |
2204 | { | |
91e1ea12 | 2205 | fhRe2 [index]->Fill(pt,m) ; |
2206 | if(fMakeInvPtPlots)fhReInvPt2[index]->Fill(pt,m,1./pt) ; | |
0932fa00 | 2207 | if(p1->DistToBad()>1 && p2->DistToBad()>1) |
2208 | { | |
91e1ea12 | 2209 | fhRe3 [index]->Fill(pt,m) ; |
2210 | if(fMakeInvPtPlots)fhReInvPt3[index]->Fill(pt,m,1./pt) ; | |
6175da48 | 2211 | }// bad 3 |
2212 | }// bad2 | |
2213 | }// Fill bad dist histos | |
2214 | }//assymetry cut | |
2215 | }// asymmetry cut loop | |
af7b3903 | 2216 | }// bad 1 |
2217 | }// pid bit loop | |
5ae09196 | 2218 | |
af7b3903 | 2219 | //Fill histograms with opening angle |
2e876d85 | 2220 | if(fFillAngleHisto) |
2221 | { | |
7a972c0c | 2222 | fhRealOpeningAngle ->Fill(pt,angle); |
2223 | fhRealCosOpeningAngle->Fill(pt,TMath::Cos(angle)); | |
2224 | } | |
af7b3903 | 2225 | |
2226 | //Fill histograms with pair assymmetry | |
2e876d85 | 2227 | if(fFillAsymmetryHisto) |
2228 | { | |
7a972c0c | 2229 | fhRePtAsym->Fill(pt,a); |
2230 | if(m > 0.10 && m < 0.17) fhRePtAsymPi0->Fill(pt,a); | |
2231 | if(m > 0.45 && m < 0.65) fhRePtAsymEta->Fill(pt,a); | |
2232 | } | |
af7b3903 | 2233 | |
6175da48 | 2234 | //--------- |
2235 | // MC data | |
2236 | //--------- | |
2237 | //Do some MC checks on the origin of the pair, is there any common ancestor and if there is one, who? | |
59b85683 | 2238 | if(IsDataMC()) |
2239 | { | |
2db10729 | 2240 | if(GetMCAnalysisUtils()->CheckTagBit(p1->GetTag(),AliMCAnalysisUtils::kMCConversion) && |
99b8e903 | 2241 | GetMCAnalysisUtils()->CheckTagBit(p2->GetTag(),AliMCAnalysisUtils::kMCConversion)) |
2242 | { | |
2243 | fhReMCFromConversion->Fill(pt,m); | |
2244 | } | |
2db10729 | 2245 | else if(!GetMCAnalysisUtils()->CheckTagBit(p1->GetTag(),AliMCAnalysisUtils::kMCConversion) && |
99b8e903 | 2246 | !GetMCAnalysisUtils()->CheckTagBit(p2->GetTag(),AliMCAnalysisUtils::kMCConversion)) |
2247 | { | |
2248 | fhReMCFromNotConversion->Fill(pt,m); | |
2249 | } | |
2250 | else | |
2251 | { | |
2252 | fhReMCFromMixConversion->Fill(pt,m); | |
2253 | } | |
4285cb63 | 2254 | |
39edd7c6 | 2255 | if(fFillOriginHisto) |
2256 | FillMCVersusRecDataHistograms(p1->GetLabel(), p2->GetLabel(),p1->Pt(), p2->Pt(),ncell1, ncell2, m, pt, a,deta, dphi); | |
99b8e903 | 2257 | } |
6175da48 | 2258 | |
2259 | //----------------------- | |
3eb6ab95 | 2260 | //Multi cuts analysis |
6175da48 | 2261 | //----------------------- |
3eb6ab95 | 2262 | if(fMultiCutAna) |
2263 | { | |
6175da48 | 2264 | //Histograms for different PID bits selection |
35fe3d27 | 2265 | for(Int_t ipid=0; ipid<fNPIDBits; ipid++) |
2266 | { | |
2db10729 | 2267 | if(p1->IsPIDOK(fPIDBits[ipid],AliCaloPID::kPhoton) && |
91e1ea12 | 2268 | p2->IsPIDOK(fPIDBits[ipid],AliCaloPID::kPhoton)) fhRePIDBits[ipid]->Fill(pt,m) ; |
6175da48 | 2269 | |
2270 | //printf("ipt %d, ipid%d, name %s\n",ipt, ipid, fhRePtPIDCuts[ipt*fNPIDBitsBits+ipid]->GetName()); | |
2271 | } // pid bit cut loop | |
2272 | ||
2273 | //Several pt,ncell and asymmetry cuts | |
35fe3d27 | 2274 | for(Int_t ipt=0; ipt<fNPtCuts; ipt++) |
2275 | { | |
2276 | for(Int_t icell=0; icell<fNCellNCuts; icell++) | |
2277 | { | |
2278 | for(Int_t iasym=0; iasym<fNAsymCuts; iasym++) | |
2279 | { | |
af7b3903 | 2280 | Int_t index = ((ipt*fNCellNCuts)+icell)*fNAsymCuts + iasym; |
2db10729 | 2281 | if(p1->E() > fPtCuts[ipt] && p2->E() > fPtCuts[ipt] && |
35fe3d27 | 2282 | a < fAsymCuts[iasym] && |
2283 | ncell1 >= fCellNCuts[icell] && ncell2 >= fCellNCuts[icell]) | |
2284 | { | |
0333ede6 | 2285 | fhRePtNCellAsymCuts[index]->Fill(pt,m) ; |
6175da48 | 2286 | //printf("ipt %d, icell%d, iasym %d, name %s\n",ipt, icell, iasym, fhRePtNCellAsymCuts[((ipt*fNCellNCuts)+icell)*fNAsymCuts + iasym]->GetName()); |
35fe3d27 | 2287 | if(fFillSMCombinations && module1==module2) |
2288 | { | |
0333ede6 | 2289 | fhRePtNCellAsymCutsSM[module1][index]->Fill(pt,m) ; |
6175da48 | 2290 | } |
2291 | } | |
af7b3903 | 2292 | }// pid bit cut loop |
2293 | }// icell loop | |
2294 | }// pt cut loop | |
35fe3d27 | 2295 | |
2296 | if(GetHistogramRanges()->GetHistoTrackMultiplicityBins()) | |
2297 | { | |
2298 | for(Int_t iasym = 0; iasym < fNAsymCuts; iasym++) | |
2299 | { | |
2300 | if(a < fAsymCuts[iasym]) fhRePtMult[iasym]->Fill(pt,GetTrackMultiplicity(),m) ; | |
91e1ea12 | 2301 | } |
2302 | } | |
af7b3903 | 2303 | }// multiple cuts analysis |
4285cb63 | 2304 | |
af7b3903 | 2305 | }// ok if same sm |
4285cb63 | 2306 | |
7e7694bb | 2307 | }// second same event particle |
2308 | }// first cluster | |
0333ede6 | 2309 | |
6175da48 | 2310 | //------------------------------------------------------------- |
2311 | // Mixing | |
2312 | //------------------------------------------------------------- | |
2e876d85 | 2313 | if(DoOwnMix()) |
2314 | { | |
6175da48 | 2315 | //Recover events in with same characteristics as the current event |
2e876d85 | 2316 | |
2317 | //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing | |
2318 | if(eventbin < 0) return ; | |
2319 | ||
2320 | TList * evMixList=fEventsList[eventbin] ; | |
f28f02be | 2321 | |
2322 | if(!evMixList) | |
2323 | { | |
2db10729 | 2324 | AliWarning(Form("Mix event list not available, bin %d",eventbin)); |
f28f02be | 2325 | return; |
2326 | } | |
2327 | ||
7e7694bb | 2328 | Int_t nMixed = evMixList->GetSize() ; |
2e876d85 | 2329 | for(Int_t ii=0; ii<nMixed; ii++) |
2db10729 | 2330 | { |
7e7694bb | 2331 | TClonesArray* ev2= (TClonesArray*) (evMixList->At(ii)); |
2332 | Int_t nPhot2=ev2->GetEntriesFast() ; | |
2333 | Double_t m = -999; | |
2db10729 | 2334 | AliDebug(1,Form("Mixed event %d photon entries %d, centrality bin %d",ii, nPhot2, GetEventCentralityBin())); |
2335 | ||
2e876d85 | 2336 | fhEventMixBin->Fill(eventbin) ; |
2db10729 | 2337 | |
6175da48 | 2338 | //--------------------------------- |
2339 | //First loop on photons/clusters | |
2db10729 | 2340 | //--------------------------------- |
35fe3d27 | 2341 | for(Int_t i1=0; i1<nPhot; i1++) |
2342 | { | |
7e7694bb | 2343 | AliAODPWG4Particle * p1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(i1)) ; |
35fe3d27 | 2344 | |
6175da48 | 2345 | if(fSameSM && GetModuleNumber(p1)!=module1) continue; |
2346 | ||
2347 | //Get kinematics of cluster and (super) module of this cluster | |
1a8c88c1 | 2348 | fPhotonMom1.SetPxPyPzE(p1->Px(),p1->Py(),p1->Pz(),p1->E()); |
af7b3903 | 2349 | module1 = GetModuleNumber(p1); |
91e1ea12 | 2350 | |
6175da48 | 2351 | //--------------------------------- |
2352 | //First loop on photons/clusters | |
2db10729 | 2353 | //--------------------------------- |
35fe3d27 | 2354 | for(Int_t i2=0; i2<nPhot2; i2++) |
2355 | { | |
7e7694bb | 2356 | AliAODPWG4Particle * p2 = (AliAODPWG4Particle*) (ev2->At(i2)) ; |
91e1ea12 | 2357 | |
6175da48 | 2358 | //Get kinematics of second cluster and calculate those of the pair |
1a8c88c1 | 2359 | fPhotonMom2.SetPxPyPzE(p2->Px(),p2->Py(),p2->Pz(),p2->E()); |
2db10729 | 2360 | m = (fPhotonMom1+fPhotonMom2).M() ; |
1a8c88c1 | 2361 | Double_t pt = (fPhotonMom1 + fPhotonMom2).Pt(); |
7e7694bb | 2362 | Double_t a = TMath::Abs(p1->E()-p2->E())/(p1->E()+p2->E()) ; |
2363 | ||
2364 | //Check if opening angle is too large or too small compared to what is expected | |
1a8c88c1 | 2365 | Double_t angle = fPhotonMom1.Angle(fPhotonMom2.Vect()); |
2366 | if(fUseAngleEDepCut && !GetNeutralMesonSelection()->IsAngleInWindow((fPhotonMom1+fPhotonMom2).E(),angle+0.05)) | |
35fe3d27 | 2367 | { |
2db10729 | 2368 | AliDebug(2,Form("Mix pair angle %f not in E %f window",angle, (fPhotonMom1+fPhotonMom2).E())); |
6175da48 | 2369 | continue; |
2370 | } | |
4285cb63 | 2371 | |
2372 | if(fUseAngleCut && (angle < fAngleCut || angle > fAngleMaxCut)) | |
2373 | { | |
2db10729 | 2374 | AliDebug(2,Form("Mix pair angle %f < cut %f",angle,fAngleCut)); |
4285cb63 | 2375 | continue; |
2db10729 | 2376 | } |
7e7694bb | 2377 | |
2db10729 | 2378 | AliDebug(2,Form("Mixed Event: pT: fPhotonMom1 %2.2f, fPhotonMom2 %2.2f; Pair: pT %2.2f, mass %2.3f, a %2.3f",p1->Pt(), p2->Pt(), pt,m,a)); |
6175da48 | 2379 | |
af7b3903 | 2380 | //In case we want only pairs in same (super) module, check their origin. |
2381 | module2 = GetModuleNumber(p2); | |
6175da48 | 2382 | |
2383 | //------------------------------------------------------------------------------------------------- | |
2384 | //Fill module dependent histograms, put a cut on assymmetry on the first available cut in the array | |
2db10729 | 2385 | //------------------------------------------------------------------------------------------------- |
20218aea | 2386 | if(a < fAsymCuts[0] && fFillSMCombinations){ |
6175da48 | 2387 | if(module1==module2 && module1 >=0 && module1<fNModules) |
91e1ea12 | 2388 | fhMiMod[module1]->Fill(pt,m) ; |
0333ede6 | 2389 | |
cb67d5f1 | 2390 | if(GetCalorimeter()==kEMCAL) |
35fe3d27 | 2391 | { |
8d230fa8 | 2392 | // Same sector |
2393 | Int_t j=0; | |
35fe3d27 | 2394 | for(Int_t i = 0; i < fNModules/2; i++) |
2395 | { | |
8d230fa8 | 2396 | j=2*i; |
91e1ea12 | 2397 | if((module1==j && module2==j+1) || (module1==j+1 && module2==j)) fhMiSameSectorEMCALMod[i]->Fill(pt,m) ; |
8d230fa8 | 2398 | } |
2399 | ||
2400 | // Same side | |
35fe3d27 | 2401 | for(Int_t i = 0; i < fNModules-2; i++) |
2402 | { | |
2db10729 | 2403 | if((module1==i && module2==i+2) || (module1==i+2 && module2==i)) fhMiSameSideEMCALMod[i]->Fill(pt,m); |
8d230fa8 | 2404 | } |
2405 | }//EMCAL | |
35fe3d27 | 2406 | else |
2407 | {//PHOS | |
2db10729 | 2408 | if((module1==0 && module2==1) || (module1==1 && module2==0)) fhMiDiffPHOSMod[0]->Fill(pt,m) ; |
2409 | if((module1==0 && module2==2) || (module1==2 && module2==0)) fhMiDiffPHOSMod[1]->Fill(pt,m) ; | |
91e1ea12 | 2410 | if((module1==1 && module2==2) || (module1==2 && module2==1)) fhMiDiffPHOSMod[2]->Fill(pt,m) ; |
8d230fa8 | 2411 | }//PHOS |
2412 | ||
2413 | ||
6175da48 | 2414 | } |
2415 | ||
af7b3903 | 2416 | Bool_t ok = kTRUE; |
2417 | if(fSameSM && module1!=module2) ok=kFALSE; | |
2418 | if(ok){ | |
6175da48 | 2419 | |
2db10729 | 2420 | //Check if one of the clusters comes from a conversion |
35fe3d27 | 2421 | if(fCheckConversion) |
2422 | { | |
d39cba7e | 2423 | if (p1->IsTagged() && p2->IsTagged()) fhMiConv2->Fill(pt,m); |
2424 | else if(p1->IsTagged() || p2->IsTagged()) fhMiConv ->Fill(pt,m); | |
2425 | } | |
6175da48 | 2426 | //Fill histograms for different bad channel distance, centrality, assymmetry cut and pid bit |
35fe3d27 | 2427 | for(Int_t ipid=0; ipid<fNPIDBits; ipid++) |
2428 | { | |
3eb6ab95 | 2429 | if((p1->IsPIDOK(ipid,AliCaloPID::kPhoton)) && (p2->IsPIDOK(ipid,AliCaloPID::kPhoton))) |
2430 | { | |
2431 | for(Int_t iasym=0; iasym < fNAsymCuts; iasym++) | |
2432 | { | |
2433 | if(a < fAsymCuts[iasym]) | |
2434 | { | |
97c16b56 | 2435 | Int_t index = ((curCentrBin*fNPIDBits)+ipid)*fNAsymCuts + iasym; |
3eb6ab95 | 2436 | |
97c16b56 | 2437 | if(index < 0 || index >= ncentr*fNPIDBits*fNAsymCuts) continue ; |
2db10729 | 2438 | |
91e1ea12 | 2439 | fhMi1 [index]->Fill(pt,m) ; |
35fe3d27 | 2440 | |
91e1ea12 | 2441 | if(fMakeInvPtPlots)fhMiInvPt1[index]->Fill(pt,m,1./pt) ; |
35fe3d27 | 2442 | |
3eb6ab95 | 2443 | if(fFillBadDistHisto) |
2444 | { | |
2445 | if(p1->DistToBad()>0 && p2->DistToBad()>0) | |
2446 | { | |
6175da48 | 2447 | fhMi2 [index]->Fill(pt,m) ; |
91e1ea12 | 2448 | if(fMakeInvPtPlots)fhMiInvPt2[index]->Fill(pt,m,1./pt) ; |
3eb6ab95 | 2449 | if(p1->DistToBad()>1 && p2->DistToBad()>1) |
2450 | { | |
6175da48 | 2451 | fhMi3 [index]->Fill(pt,m) ; |
91e1ea12 | 2452 | if(fMakeInvPtPlots)fhMiInvPt3[index]->Fill(pt,m,1./pt) ; |
6175da48 | 2453 | } |
af7b3903 | 2454 | } |
6175da48 | 2455 | }// Fill bad dist histo |
af7b3903 | 2456 | }//Asymmetry cut |
2457 | }// Asymmetry loop | |
2458 | }//PID cut | |
2459 | }//loop for histograms | |
6175da48 | 2460 | |
2461 | //----------------------- | |
2db10729 | 2462 | //Multi cuts analysis |
2463 | //----------------------- | |
6175da48 | 2464 | if(fMultiCutAna){ |
2465 | //Several pt,ncell and asymmetry cuts | |
0a14e9ae | 2466 | |
35fe3d27 | 2467 | for(Int_t ipt=0; ipt<fNPtCuts; ipt++) |
2468 | { | |
2469 | for(Int_t icell=0; icell<fNCellNCuts; icell++) | |
2470 | { | |
2471 | for(Int_t iasym=0; iasym<fNAsymCuts; iasym++) | |
2472 | { | |
6175da48 | 2473 | Int_t index = ((ipt*fNCellNCuts)+icell)*fNAsymCuts + iasym; |
2db10729 | 2474 | if(p1->Pt() > fPtCuts[ipt] && p2->Pt() > fPtCuts[ipt] && |
2475 | a < fAsymCuts[iasym] //&& | |
0a14e9ae | 2476 | //p1->GetBtag() >= fCellNCuts[icell] && p2->GetBtag() >= fCellNCuts[icell] // trick, correct it. |
35fe3d27 | 2477 | ) |
2478 | { | |
91e1ea12 | 2479 | fhMiPtNCellAsymCuts[index]->Fill(pt,m) ; |
6175da48 | 2480 | //printf("ipt %d, icell%d, iasym %d, name %s\n",ipt, icell, iasym, fhRePtNCellAsymCuts[((ipt*fNCellNCuts)+icell)*fNAsymCuts + iasym]->GetName()); |
2481 | } | |
2482 | }// pid bit cut loop | |
2483 | }// icell loop | |
2484 | }// pt cut loop | |
2485 | } // Multi cut ana | |
2486 | ||
2487 | //Fill histograms with opening angle | |
0932fa00 | 2488 | if(fFillAngleHisto) |
2489 | { | |
7a972c0c | 2490 | fhMixedOpeningAngle ->Fill(pt,angle); |
2491 | fhMixedCosOpeningAngle->Fill(pt,TMath::Cos(angle)); | |
2492 | } | |
2493 | ||
af7b3903 | 2494 | }//ok |
7e7694bb | 2495 | }// second cluster loop |
2496 | }//first cluster loop | |
2497 | }//loop on mixed events | |
2498 | ||
6175da48 | 2499 | //-------------------------------------------------------- |
35fe3d27 | 2500 | // Add the current event to the list of events for mixing |
6175da48 | 2501 | //-------------------------------------------------------- |
35fe3d27 | 2502 | |
7e7694bb | 2503 | TClonesArray *currentEvent = new TClonesArray(*GetInputAODBranch()); |
2db10729 | 2504 | //Add current event to buffer and Remove redundant events |
35fe3d27 | 2505 | if( currentEvent->GetEntriesFast() > 0 ) |
2506 | { | |
7e7694bb | 2507 | evMixList->AddFirst(currentEvent) ; |
2508 | currentEvent=0 ; //Now list of particles belongs to buffer and it will be deleted with buffer | |
35fe3d27 | 2509 | if( evMixList->GetSize() >= GetNMaxEvMix() ) |
7e7694bb | 2510 | { |
2511 | TClonesArray * tmp = (TClonesArray*) (evMixList->Last()) ; | |
2512 | evMixList->RemoveLast() ; | |
2513 | delete tmp ; | |
2514 | } | |
2db10729 | 2515 | } |
35fe3d27 | 2516 | else |
2517 | { //empty event | |
7e7694bb | 2518 | delete currentEvent ; |
2db10729 | 2519 | currentEvent=0 ; |
477d6cee | 2520 | } |
7e7694bb | 2521 | }// DoOwnMix |
2db10729 | 2522 | |
2523 | AliDebug(1,"End fill histograms"); | |
4285cb63 | 2524 | } |
1c5acb87 | 2525 | |
be894c1d | 2526 | //________________________________________________________________________ |
2db10729 | 2527 | Int_t AliAnaPi0::GetEventIndex(AliAODPWG4Particle * part, Double_t * vert) |
c8fe2783 | 2528 | { |
f8006433 | 2529 | // retieves the event index and checks the vertex |
2530 | // in the mixed buffer returns -2 if vertex NOK | |
2531 | // for normal events returns 0 if vertex OK and -1 if vertex NOK | |
2532 | ||
2db10729 | 2533 | Int_t evtIndex = -1 ; |
4285cb63 | 2534 | if(GetReader()->GetDataType()!=AliCaloTrackReader::kMC) |
2535 | { | |
2536 | if (GetMixedEvent()) | |
2537 | { | |
f8006433 | 2538 | evtIndex = GetMixedEvent()->EventIndexForCaloCluster(part->GetCaloLabel(0)) ; |
2db10729 | 2539 | GetVertex(vert,evtIndex); |
f8006433 | 2540 | |
5025c139 | 2541 | if(TMath::Abs(vert[2])> GetZvertexCut()) |
f8006433 | 2542 | evtIndex = -2 ; //Event can not be used (vertex, centrality,... cuts not fulfilled) |
4285cb63 | 2543 | } |
2544 | else | |
2545 | { | |
2546 | // Single event | |
f8006433 | 2547 | GetVertex(vert); |
2548 | ||
5025c139 | 2549 | if(TMath::Abs(vert[2])> GetZvertexCut()) |
f8006433 | 2550 | evtIndex = -1 ; //Event can not be used (vertex, centrality,... cuts not fulfilled) |
2db10729 | 2551 | else |
f8006433 | 2552 | evtIndex = 0 ; |
c8fe2783 | 2553 | } |
0ae57829 | 2554 | }//No MC reader |
4285cb63 | 2555 | else |
2556 | { | |
f8006433 | 2557 | evtIndex = 0; |
2558 | vert[0] = 0. ; | |
2559 | vert[1] = 0. ; | |
2560 | vert[2] = 0. ; | |
2561 | } | |
0ae57829 | 2562 | |
f8006433 | 2563 | return evtIndex ; |
c8fe2783 | 2564 | } |
f8006433 | 2565 |