]>
Commit | Line | Data |
---|---|---|
e09cf5ef | 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 * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
e09cf5ef | 15 | |
16 | //_________________________________________________________________________ | |
17 | // Class for the analysis of particle - hadron correlations | |
55c20a99 | 18 | // Particle (for example direct gamma) must be found |
19 | // in a previous analysis | |
20 | // | |
21 | //-- Author: Gustavo Conesa (LNF-INFN) (LPSC-IN2P3-CNRS) | |
b6afb6b1 | 22 | // Yaxian Mao (LPSC-IN2P3-CNRS) and (CNWU) first usable implementation. |
23 | // Xiangrong Zhu (CNWU), implementtion of own mixing. | |
e09cf5ef | 24 | ////////////////////////////////////////////////////////////////////////////// |
25 | ||
26 | ||
27 | // --- ROOT system --- | |
28 | //#include "TClonesArray.h" | |
907b38cd | 29 | #include <TClass.h> |
30 | #include <TMath.h> | |
31 | #include <TH2F.h> | |
32 | #include <TDatabasePDG.h> | |
e09cf5ef | 33 | |
34 | //---- ANALYSIS system ---- | |
35 | #include "AliNeutralMesonSelection.h" | |
36 | #include "AliAnaParticleHadronCorrelation.h" | |
37 | #include "AliCaloTrackReader.h" | |
e09cf5ef | 38 | #include "AliAODPWG4ParticleCorrelation.h" |
39 | #include "AliFiducialCut.h" | |
40 | #include "AliVTrack.h" | |
41 | #include "AliVCluster.h" | |
42 | #include "AliMCAnalysisUtils.h" | |
43 | #include "TParticle.h" | |
44 | #include "AliStack.h" | |
45 | #include "AliAODMCParticle.h" | |
46 | #include "AliMixedEvent.h" | |
029dea5a | 47 | #include "AliAnalysisManager.h" |
48 | #include "AliInputEventHandler.h" | |
2e876d85 | 49 | #include "AliEventplane.h" |
e09cf5ef | 50 | |
51 | ClassImp(AliAnaParticleHadronCorrelation) | |
52 | ||
53 | ||
05d0d05d | 54 | //___________________________________________________________________ |
e09cf5ef | 55 | AliAnaParticleHadronCorrelation::AliAnaParticleHadronCorrelation(): |
745913ae | 56 | AliAnaCaloTrackCorrBaseClass(), |
f3c47a7f | 57 | fFillAODWithReferences(0), fCheckLeadingWithNeutralClusters(0), |
1f8591af | 58 | fMaxAssocPt(1000.), fMinAssocPt(0.), |
05d0d05d | 59 | fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), |
60 | fSelectIsolated(0), fMakeSeveralUE(0), | |
61 | fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.), | |
62 | fPi0AODBranchName(""), fNeutralCorr(0), | |
907b38cd | 63 | fPi0Trigger(0), fDecayTrigger(0), |
e7d2373d | 64 | fNDecayBits(0), fDecayBits(), |
3f150b4b | 65 | fMakeAbsoluteLeading(0), fMakeNearSideLeading(0), |
907b38cd | 66 | fLeadingTriggerIndex(-1), fHMPIDCorrelation(0), fFillBradHisto(0), |
05d0d05d | 67 | fNAssocPtBins(0), fAssocPtBinLimit(), |
7d306daf | 68 | fCorrelVzBin(0), |
2bb7ac98 | 69 | fListMixTrackEvents(), fListMixCaloEvents(), |
70 | fUseMixStoredInReader(0), fFillNeutralEventMixPool(0), | |
b1f720a7 | 71 | fM02MaxCut(0), fM02MinCut(0), |
f92798e9 | 72 | fFillPileUpHistograms(0), fFillHighMultHistograms(0), |
98604e3a | 73 | fSelectLeadingHadronAngle(0), fFillLeadHadOppositeHisto(0), |
f7408d50 | 74 | fMinLeadHadPhi(0), fMaxLeadHadPhi(0), |
75 | fMinLeadHadPt(0), fMaxLeadHadPt(0), | |
a22f3f34 | 76 | fFillEtaGapsHisto(1), fFillMomImbalancePtAssocBinsHisto(0), |
be2df971 | 77 | fMCGenTypeMin(0), fMCGenTypeMax(0), |
05d0d05d | 78 | //Histograms |
bef61a43 | 79 | fhPtTriggerInput(0), fhPtTriggerSSCut(0), |
80 | fhPtTriggerIsoCut(0), fhPtTriggerFidCut(0), | |
55c20a99 | 81 | fhPtTrigger(0), fhPtTriggerVtxBC0(0), |
82 | fhPtTriggerVzBin(0), fhPtTriggerBin(0), | |
83 | fhPhiTrigger(0), fhEtaTrigger(0), | |
84 | fhPtTriggerMC(), | |
48c5da66 | 85 | fhPtDecayTrigger(), fhPtDecayTriggerMC(), |
55c20a99 | 86 | fhPtTriggerCentrality(0), fhPtTriggerEventPlane(0), |
87 | fhTriggerEventPlaneCentrality(0), | |
88 | fhPtTriggerMixed(0), fhPtTriggerMixedVzBin(0), fhPtTriggerMixedBin(0), | |
89 | fhPhiTriggerMixed(0), fhEtaTriggerMixed(0), | |
90 | fhPtLeadingOppositeHadron(0), fhPtDiffPhiLeadingOppositeHadron(0), fhPtDiffEtaLeadingOppositeHadron(0), | |
98604e3a | 91 | fhPtNoLeadingOppositeHadron(0), fhEtaPhiNoLeadingOppositeHadron(0), |
d0b625bc | 92 | fhDeltaPhiDeltaEtaCharged(0), |
05d0d05d | 93 | fhPhiCharged(0), fhEtaCharged(0), |
94 | fhDeltaPhiCharged(0), fhDeltaEtaCharged(0), | |
95 | fhDeltaPhiChargedPt(0), fhDeltaPhiUeChargedPt(0), | |
9623bf34 | 96 | fhUePart(0), |
f7408d50 | 97 | fhXECharged(0), fhXECharged_Cone2(0), fhXEUeCharged(0), |
3f150b4b | 98 | fhXEPosCharged(0), fhXENegCharged(0), |
f7408d50 | 99 | fhPtHbpXECharged(0), fhPtHbpXECharged_Cone2(0), fhPtHbpXEUeCharged(0), |
3f150b4b | 100 | fhZTCharged(0), fhZTUeCharged(0), |
101 | fhZTPosCharged(0), fhZTNegCharged(0), | |
102 | fhPtHbpZTCharged(0), fhPtHbpZTUeCharged(0), | |
b1f720a7 | 103 | fhXEChargedMC(), fhDeltaPhiChargedMC(), |
104 | fhDeltaPhiDeltaEtaChargedPtA3GeV(0), | |
105 | fhDeltaPhiChargedPtA3GeV(0), fhDeltaEtaChargedPtA3GeV(0), | |
106 | //Pile-Up | |
17af6e24 | 107 | fhDeltaPhiChargedPileUp(), fhDeltaEtaChargedPileUp(), |
fedea415 | 108 | fhDeltaPhiChargedPtA3GeVPileUp(), fhDeltaEtaChargedPtA3GeVPileUp(), |
109 | fhXEChargedPileUp(), fhXEUeChargedPileUp(), | |
17af6e24 | 110 | fhZTChargedPileUp(), fhZTUeChargedPileUp(), |
111 | fhPtTrigChargedPileUp(), | |
fedea415 | 112 | fhDeltaPhiChargedOtherBC(), fhDeltaPhiChargedPtA3GeVOtherBC(), |
113 | fhXEChargedOtherBC(), fhXEUeChargedOtherBC(), | |
114 | fhZTChargedOtherBC(), fhZTUeChargedOtherBC(), | |
115 | fhPtTrigChargedOtherBC(), | |
2a9171b5 | 116 | fhDeltaPhiChargedBC0(), fhDeltaPhiChargedPtA3GeVBC0(), |
117 | fhXEChargedBC0(), fhXEUeChargedBC0(), | |
118 | fhZTChargedBC0(), fhZTUeChargedBC0(), | |
119 | fhPtTrigChargedBC0(), | |
cc944149 | 120 | fhDeltaPhiChargedVtxBC0(), fhDeltaPhiChargedPtA3GeVVtxBC0(), |
121 | fhXEChargedVtxBC0(), fhXEUeChargedVtxBC0(), | |
122 | fhZTChargedVtxBC0(), fhZTUeChargedVtxBC0(), | |
123 | fhPtTrigChargedVtxBC0(), | |
6ed1ad3e | 124 | fhDeltaPhiUeLeftCharged(0), |
8cc41381 | 125 | fhDeltaPhiUeLeftUpCharged(0), fhDeltaPhiUeRightUpCharged(0), |
126 | fhDeltaPhiUeLeftDownCharged(0), fhDeltaPhiUeRightDownCharged(0), | |
6ed1ad3e | 127 | fhXEUeLeftCharged(0), |
8cc41381 | 128 | fhXEUeLeftUpCharged(0), fhXEUeRightUpCharged(0), |
129 | fhXEUeLeftDownCharged(0), fhXEUeRightDownCharged(0), | |
6ed1ad3e | 130 | fhPtHbpXEUeLeftCharged(0), fhZTUeLeftCharged(0), |
131 | fhPtHbpZTUeLeftCharged(0), | |
05d0d05d | 132 | fhPtTrigPout(0), fhPtTrigCharged(0), |
d4a8ff9a | 133 | fhDeltaPhiChargedMult(0x0), fhDeltaEtaChargedMult(0x0), |
134 | fhXEMult(0x0), fhXEUeMult(0x0), | |
135 | fhZTMult(0x0), fhZTUeMult(0x0), | |
8cc41381 | 136 | fhAssocPtBkg(0), fhDeltaPhiDeltaEtaAssocPtBin(0), |
137 | fhDeltaPhiAssocPtBin(0), | |
138 | fhDeltaPhiAssocPtBinDEta08(0), fhDeltaPhiAssocPtBinDEta0(0), | |
2013f378 | 139 | fhDeltaPhiAssocPtBinHMPID(0), fhDeltaPhiAssocPtBinHMPIDAcc(0), |
66e64043 | 140 | fhDeltaPhiBradAssocPtBin(0), fhDeltaPhiBrad(0), |
a22f3f34 | 141 | fhXEAssocPtBin(0), fhZTAssocPtBin(0), |
142 | fhXEVZ(0), fhZTVZ(0), | |
143 | fhDeltaPhiDeltaEtaNeutral(0), | |
05d0d05d | 144 | fhPhiNeutral(0), fhEtaNeutral(0), |
145 | fhDeltaPhiNeutral(0), fhDeltaEtaNeutral(0), | |
146 | fhDeltaPhiNeutralPt(0), fhDeltaPhiUeNeutralPt(0), | |
3f150b4b | 147 | fhXENeutral(0), fhXEUeNeutral(0), |
148 | fhPtHbpXENeutral(0), fhPtHbpXEUeNeutral(0), | |
149 | fhZTNeutral(0), fhZTUeNeutral(0), | |
150 | fhPtHbpZTNeutral(0), fhPtHbpZTUeNeutral(0), | |
6ed1ad3e | 151 | fhDeltaPhiUeLeftNeutral(0), fhXEUeLeftNeutral(0), |
152 | fhPtHbpXEUeLeftNeutral(0), fhZTUeLeftNeutral(0), | |
153 | fhPtHbpZTUeLeftNeutral(0), fhPtPi0DecayRatio(0), | |
e7d2373d | 154 | fhDeltaPhiPi0DecayCharged(0), fhXEPi0DecayCharged(0), fhZTPi0DecayCharged(0), |
155 | fhDeltaPhiPi0DecayNeutral(0), fhXEPi0DecayNeutral(0), fhZTPi0DecayNeutral(0), | |
156 | fhDeltaPhiDecayCharged(), fhXEDecayCharged(), fhZTDecayCharged(), | |
157 | fhDeltaPhiDecayChargedAssocPtBin(), | |
be2df971 | 158 | fhMCPtTrigger(), fhMCPhiTrigger(), fhMCEtaTrigger(), |
159 | fhMCPtTriggerNotLeading(), fhMCPhiTriggerNotLeading(), fhMCEtaTriggerNotLeading(), | |
160 | fhMCEtaCharged(), fhMCPhiCharged(), | |
161 | fhMCDeltaEtaCharged(), fhMCDeltaPhiCharged(), | |
162 | fhMCDeltaPhiDeltaEtaCharged(), fhMCDeltaPhiChargedPt(), | |
163 | fhMCPtXECharged(), fhMCPtXEUeCharged(), | |
164 | fhMCPtXEUeLeftCharged(), | |
165 | fhMCPtHbpXECharged(), fhMCPtHbpXEUeCharged(), | |
166 | fhMCPtHbpXEUeLeftCharged(), | |
167 | fhMCUePart(), | |
168 | fhMCPtZTCharged(), fhMCPtZTUeCharged(), | |
169 | fhMCPtZTUeLeftCharged(), | |
170 | fhMCPtHbpZTCharged(), fhMCPtHbpZTUeCharged(), | |
171 | fhMCPtHbpZTUeLeftCharged(), | |
172 | fhMCPtTrigPout(), fhMCPtAssocDeltaPhi(), | |
029dea5a | 173 | //Mixing |
31864468 | 174 | fhNEventsTrigger(0), fhNtracksMB(0), fhNclustersMB(0), |
029dea5a | 175 | fhMixDeltaPhiCharged(0), fhMixDeltaPhiDeltaEtaCharged(0), |
18838011 | 176 | fhMixXECharged(0), fhMixXEUeCharged(0), fhMixHbpXECharged(0), |
2013f378 | 177 | fhMixDeltaPhiChargedAssocPtBin(), |
178 | fhMixDeltaPhiChargedAssocPtBinDEta08(), | |
8cc41381 | 179 | fhMixDeltaPhiChargedAssocPtBinDEta0(), |
2013f378 | 180 | fhMixDeltaPhiDeltaEtaChargedAssocPtBin(), |
efb540af | 181 | fhEventBin(0), fhEventMixBin(0), fhEventMBBin(0) |
029dea5a | 182 | { |
8cc41381 | 183 | //Default Ctor |
029dea5a | 184 | |
e09cf5ef | 185 | //Initialize parameters |
186 | InitParameters(); | |
764ab1f4 | 187 | |
b1f720a7 | 188 | for(Int_t i = 0; i < 7; i++) |
764ab1f4 | 189 | { |
55c20a99 | 190 | fhPtTriggerMC[i] = 0; |
764ab1f4 | 191 | fhXEChargedMC[i] = 0; |
b1f720a7 | 192 | fhDeltaPhiChargedMC[i] = 0; |
48c5da66 | 193 | for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTriggerMC[ib][i] = 0; |
764ab1f4 | 194 | } |
48c5da66 | 195 | |
196 | for(Int_t ib = 0; ib < 4; ib++) fhPtDecayTrigger[ib] = 0; | |
197 | ||
17af6e24 | 198 | for(Int_t i = 0; i < 7; i++) |
199 | { | |
55c20a99 | 200 | fhPtTriggerPileUp [i] = 0 ; |
17af6e24 | 201 | fhDeltaPhiChargedPileUp [i] = 0 ; fhDeltaEtaChargedPileUp [i] = 0 ; |
202 | fhXEChargedPileUp [i] = 0 ; fhXEUeChargedPileUp [i] = 0 ; | |
203 | fhZTChargedPileUp [i] = 0 ; fhZTUeChargedPileUp [i] = 0 ; | |
204 | fhPtTrigChargedPileUp [i] = 0 ; | |
205 | fhDeltaPhiChargedPtA3GeVPileUp[i] = 0 ; fhDeltaEtaChargedPtA3GeVPileUp[i] = 0 ; | |
17af6e24 | 206 | } |
207 | ||
e09cf5ef | 208 | } |
209 | ||
029dea5a | 210 | //_________________________________________________________________ |
2bb7ac98 | 211 | AliAnaParticleHadronCorrelation::~AliAnaParticleHadronCorrelation() |
029dea5a | 212 | { |
213 | // Remove event containers | |
214 | ||
d07ffd54 | 215 | if(DoOwnMix()) |
216 | { | |
217 | if(fListMixTrackEvents) | |
218 | { | |
219 | for(Int_t iz=0; iz < GetNZvertBin(); iz++) | |
029dea5a | 220 | { |
d07ffd54 | 221 | for(Int_t ic=0; ic < GetNCentrBin(); ic++) |
222 | { | |
223 | for(Int_t irp=0; irp<GetNRPBin(); irp++) | |
224 | { | |
225 | Int_t bin = GetEventMixBin(ic, iz, irp); | |
226 | fListMixTrackEvents[bin]->Delete() ; | |
227 | delete fListMixTrackEvents[bin] ; | |
228 | } | |
229 | } | |
029dea5a | 230 | } |
231 | } | |
d07ffd54 | 232 | |
233 | delete[] fListMixTrackEvents; | |
234 | ||
235 | if(fListMixCaloEvents) | |
236 | { | |
237 | for(Int_t iz=0; iz < GetNZvertBin(); iz++) | |
238 | { | |
239 | for(Int_t ic=0; ic < GetNCentrBin(); ic++) | |
240 | { | |
241 | for(Int_t irp=0; irp<GetNRPBin(); irp++) | |
242 | { | |
243 | Int_t bin = GetEventMixBin(ic, iz, irp); | |
244 | fListMixCaloEvents[bin]->Delete() ; | |
245 | delete fListMixCaloEvents[bin] ; | |
246 | } | |
247 | } | |
248 | } | |
249 | } | |
250 | ||
251 | delete[] fListMixCaloEvents; | |
029dea5a | 252 | |
253 | } | |
254 | } | |
255 | ||
b6afb6b1 | 256 | //__________________________________________________________________________________________________________________________________________ |
22ad7981 | 257 | void AliAnaParticleHadronCorrelation::FillChargedAngularCorrelationHistograms(Float_t ptAssoc, Float_t ptTrig, Int_t bin, |
6ed1ad3e | 258 | Float_t phiAssoc, Float_t phiTrig, Float_t deltaPhi, |
22ad7981 | 259 | Float_t etaAssoc, Float_t etaTrig, |
e7d2373d | 260 | Int_t decayTag, Float_t hmpidSignal, Int_t outTOF, |
d4a8ff9a | 261 | Int_t cen, Int_t mcTag) |
907b38cd | 262 | { |
263 | // Fill angular correlation related histograms | |
264 | ||
265 | Float_t deltaEta = etaTrig-etaAssoc; | |
6ed1ad3e | 266 | Float_t deltaPhiOrg = phiTrig-phiAssoc; |
907b38cd | 267 | |
b1f720a7 | 268 | fhEtaCharged ->Fill(ptAssoc,etaAssoc); |
269 | fhPhiCharged ->Fill(ptAssoc,phiAssoc); | |
270 | fhDeltaEtaCharged ->Fill(ptTrig ,deltaEta); | |
271 | fhDeltaPhiCharged ->Fill(ptTrig ,deltaPhi); | |
272 | fhDeltaPhiChargedPt->Fill(ptAssoc, deltaPhi); | |
273 | fhDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta); | |
274 | ||
275 | if(ptAssoc > 3 ) | |
276 | { | |
277 | fhDeltaEtaChargedPtA3GeV ->Fill(ptTrig ,deltaEta); | |
278 | fhDeltaPhiChargedPtA3GeV ->Fill(ptTrig ,deltaPhi); | |
279 | fhDeltaPhiDeltaEtaChargedPtA3GeV->Fill(deltaPhi, deltaEta); | |
280 | } | |
907b38cd | 281 | |
b1f720a7 | 282 | // Pile up studies |
17af6e24 | 283 | |
284 | if(fFillPileUpHistograms) | |
b1f720a7 | 285 | { |
2a9171b5 | 286 | if (outTOF==1) |
fedea415 | 287 | { |
560498d1 | 288 | fhDeltaPhiChargedOtherBC->Fill(ptTrig ,deltaPhi) ; |
fedea415 | 289 | if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVOtherBC->Fill(ptTrig ,deltaPhi) ; |
290 | } | |
2a9171b5 | 291 | else if(outTOF==0) |
292 | { | |
293 | fhDeltaPhiChargedBC0->Fill(ptTrig ,deltaPhi) ; | |
294 | if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVBC0->Fill(ptTrig ,deltaPhi) ; | |
295 | } | |
fedea415 | 296 | |
cc944149 | 297 | Int_t vtxBC = GetReader()->GetVertexBC(); |
298 | if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) | |
299 | { | |
300 | fhDeltaPhiChargedVtxBC0->Fill(ptTrig ,deltaPhi) ; | |
301 | if(ptAssoc > 3 ) fhDeltaPhiChargedPtA3GeVVtxBC0->Fill(ptTrig ,deltaPhi) ; | |
302 | } | |
303 | ||
17af6e24 | 304 | if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[0]->Fill(ptTrig ,deltaPhi) ; } |
305 | if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[1]->Fill(ptTrig ,deltaPhi) ; } | |
306 | if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[2]->Fill(ptTrig ,deltaPhi) ; } | |
307 | if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[3]->Fill(ptTrig ,deltaPhi) ; } | |
308 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[4]->Fill(ptTrig ,deltaPhi) ; } | |
309 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[5]->Fill(ptTrig ,deltaPhi) ; } | |
310 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPileUp[6]->Fill(ptTrig ,deltaPhi) ; } | |
311 | ||
b1f720a7 | 312 | if(ptAssoc > 3 ) |
313 | { | |
17af6e24 | 314 | if(GetReader()->IsPileUpFromSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[0]->Fill(ptTrig ,deltaPhi) ; } |
315 | if(GetReader()->IsPileUpFromEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[1]->Fill(ptTrig ,deltaPhi) ; } | |
316 | if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[2]->Fill(ptTrig ,deltaPhi) ; } | |
317 | if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[3]->Fill(ptTrig ,deltaPhi) ; } | |
318 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[4]->Fill(ptTrig ,deltaPhi) ; } | |
319 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhDeltaEtaChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[5]->Fill(ptTrig ,deltaPhi) ; } | |
320 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhDeltaEtaChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaEta) ; fhDeltaPhiChargedPtA3GeVPileUp[6]->Fill(ptTrig ,deltaPhi) ; } | |
b1f720a7 | 321 | } |
322 | } | |
323 | ||
324 | if(IsDataMC()) | |
325 | { | |
326 | Int_t mcIndex = GetMCTagHistogramIndex(mcTag); | |
327 | fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi); | |
328 | } | |
907b38cd | 329 | |
e7d2373d | 330 | if(fDecayTrigger && decayTag > 0) |
331 | { | |
332 | for(Int_t ibit = 0; ibit<fNDecayBits; ibit++) | |
333 | { | |
334 | if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) fhDeltaPhiDecayCharged[ibit]->Fill(ptTrig,deltaPhi); | |
335 | } | |
336 | } | |
907b38cd | 337 | |
338 | Double_t dphiBrad = -100; | |
339 | if(fFillBradHisto) | |
340 | { | |
341 | dphiBrad = atan2(sin(deltaPhiOrg), cos(deltaPhiOrg))/TMath::Pi();//-1 to 1 | |
2af40966 | 342 | if( TMath::Abs(dphiBrad) > 0.325 && TMath::Abs(dphiBrad) < 0.475 ) //Hardcoded values, BAD, FIXME |
907b38cd | 343 | { |
344 | fhAssocPtBkg->Fill(ptTrig, ptAssoc); | |
345 | } | |
346 | ||
2af40966 | 347 | if( dphiBrad < -1./3 ) dphiBrad += 2; |
907b38cd | 348 | fhDeltaPhiBrad->Fill(ptTrig, dphiBrad); |
349 | } | |
350 | ||
351 | // Fill histograms in bins of associated particle pT | |
8cc41381 | 352 | if(bin>=0) |
907b38cd | 353 | { |
8cc41381 | 354 | fhDeltaPhiDeltaEtaAssocPtBin [bin]->Fill(deltaPhi,deltaEta); |
355 | ||
356 | fhDeltaPhiAssocPtBin [bin]->Fill(ptTrig, deltaPhi); | |
2013f378 | 357 | |
a22f3f34 | 358 | if(fFillEtaGapsHisto) |
359 | { | |
360 | if(TMath::Abs(deltaEta)> 0.8) | |
361 | fhDeltaPhiAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi); | |
362 | ||
363 | if(TMath::Abs(deltaEta)< 0.01) | |
364 | fhDeltaPhiAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi); | |
365 | } | |
2013f378 | 366 | |
367 | if (fFillBradHisto) | |
8cc41381 | 368 | fhDeltaPhiBradAssocPtBin [bin]->Fill(ptTrig, dphiBrad); |
2013f378 | 369 | |
e7d2373d | 370 | if(fDecayTrigger && decayTag > 0 && fNDecayBits > 0 && |
371 | GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[0])) | |
8cc41381 | 372 | fhDeltaPhiDecayChargedAssocPtBin[bin]->Fill(ptTrig, deltaPhi); |
907b38cd | 373 | |
374 | if(fHMPIDCorrelation) | |
375 | { | |
376 | if( hmpidSignal > 0 ) | |
377 | { | |
378 | //printf("Track pt %f with HMPID signal %f \n",pt,hmpidSignal); | |
8cc41381 | 379 | fhDeltaPhiAssocPtBinHMPID[bin]->Fill(ptTrig, deltaPhi); |
907b38cd | 380 | } |
381 | ||
382 | if(phiAssoc > 5*TMath::DegToRad() && phiAssoc < 20*TMath::DegToRad()) | |
383 | { | |
384 | //printf("Track pt %f in HMPID acceptance phi %f \n ",pt,phi*TMath::RadToDeg() ); | |
8cc41381 | 385 | fhDeltaPhiAssocPtBinHMPIDAcc[bin]->Fill(ptTrig, deltaPhi); |
907b38cd | 386 | } |
387 | } | |
388 | } | |
389 | ||
d4a8ff9a | 390 | //fill different multiplicity/centrality histogram |
f3c4fca3 | 391 | if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin()) |
907b38cd | 392 | { |
d4a8ff9a | 393 | fhDeltaPhiChargedMult[cen]->Fill(ptTrig,deltaPhi); |
394 | fhDeltaEtaChargedMult[cen]->Fill(ptTrig,deltaEta); | |
907b38cd | 395 | } |
396 | } | |
397 | ||
55c20a99 | 398 | //___________________________________________________________________________________________________________________________________ |
399 | Bool_t AliAnaParticleHadronCorrelation::FillChargedMCCorrelationHistograms(Float_t mcAssocPt, Float_t mcAssocPhi, Float_t mcAssocEta, | |
be2df971 | 400 | Float_t mcTrigPt, Float_t mcTrigPhi, Float_t mcTrigEta, |
401 | Int_t histoIndex) | |
907b38cd | 402 | { |
403 | // Fill MC histograms independently of AOD or ESD | |
404 | ||
63ac03db | 405 | Bool_t lead = kTRUE; |
907b38cd | 406 | |
63ac03db | 407 | // In case we requested the trigger to be a leading particle, |
408 | // check if this is true at the MC level. | |
409 | // Not sure if it is correct to skip or not skip this. | |
410 | // Absolute leading? | |
411 | if( fMakeAbsoluteLeading && mcAssocPt > mcTrigPt ) lead = kFALSE; // skip event | |
412 | ||
413 | // Skip this event if near side associated particle pt larger than trigger | |
98604e3a | 414 | if( mcAssocPhi < 0 ) mcAssocPhi+=TMath::TwoPi(); |
415 | ||
416 | Float_t mcdeltaPhi= mcTrigPhi-mcAssocPhi; | |
417 | if(mcdeltaPhi <= -TMath::PiOver2()) mcdeltaPhi+=TMath::TwoPi(); | |
418 | if(mcdeltaPhi > 3*TMath::PiOver2()) mcdeltaPhi-=TMath::TwoPi(); | |
419 | ||
420 | if( fMakeNearSideLeading) | |
421 | { | |
422 | if( mcAssocPt > mcTrigPt && mcdeltaPhi < TMath::PiOver2() ) lead = kFALSE; // skip event | |
423 | } | |
be2df971 | 424 | |
63ac03db | 425 | // |
426 | // Select only hadrons in pt range | |
427 | if ( mcAssocPt < fMinAssocPt || mcAssocPt > fMaxAssocPt ) return lead ; // exclude but continue | |
428 | if ( mcAssocPt < GetReader()->GetCTSPtMin()) return lead ; | |
429 | ||
907b38cd | 430 | |
63ac03db | 431 | // |
432 | // Remove trigger itself for correlation when use charged triggers | |
907b38cd | 433 | if(TMath::Abs(mcAssocPt -mcTrigPt ) < 1e-6 && |
98604e3a | 434 | mcdeltaPhi < 1e-6 && |
63ac03db | 435 | TMath::Abs(mcAssocEta-mcTrigEta) < 1e-6) return lead ; // exclude but continue |
907b38cd | 436 | |
907b38cd | 437 | Float_t mcxE =-mcAssocPt/mcTrigPt*TMath::Cos(mcdeltaPhi);// -(mcAssocPx*pxprim+mcAssocPy*pyprim)/(mcTrigPt*mcTrigPt); |
438 | Float_t mchbpXE =-100 ; | |
f16872ec | 439 | if(mcxE > 0 ) mchbpXE = TMath::Log(1./mcxE); |
907b38cd | 440 | |
441 | Float_t mczT = mcAssocPt/mcTrigPt ; | |
442 | Float_t mchbpZT =-100 ; | |
f16872ec | 443 | if(mczT > 0 ) mchbpZT = TMath::Log(1./mczT); |
907b38cd | 444 | |
907b38cd | 445 | Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ; |
446 | ||
d07cdf32 | 447 | if(GetDebug() > 0 ) |
448 | { | |
1f8591af | 449 | AliInfo(Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f \n", |
450 | mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut)); | |
d07cdf32 | 451 | } |
907b38cd | 452 | |
453 | // Fill Histograms | |
be2df971 | 454 | fhMCEtaCharged [histoIndex]->Fill(mcAssocPt, mcAssocEta); |
455 | fhMCPhiCharged [histoIndex]->Fill(mcAssocPt, mcAssocPhi); | |
456 | fhMCDeltaEtaCharged[histoIndex]->Fill(mcTrigPt , mcTrigEta-mcAssocEta); | |
457 | fhMCDeltaPhiCharged[histoIndex]->Fill(mcTrigPt , mcdeltaPhi); | |
458 | fhMCPtAssocDeltaPhi[histoIndex]->Fill(mcAssocPt, mcdeltaPhi); | |
907b38cd | 459 | |
be2df971 | 460 | fhMCDeltaPhiDeltaEtaCharged[histoIndex]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta); |
907b38cd | 461 | |
462 | //delta phi cut for correlation | |
463 | if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) ) | |
464 | { | |
be2df971 | 465 | fhMCDeltaPhiChargedPt[histoIndex]->Fill(mcAssocPt,mcdeltaPhi); |
466 | fhMCPtXECharged [histoIndex]->Fill(mcTrigPt, mcxE); | |
467 | fhMCPtHbpXECharged [histoIndex]->Fill(mcTrigPt, mchbpXE); | |
468 | fhMCPtZTCharged [histoIndex]->Fill(mcTrigPt, mczT); | |
469 | fhMCPtHbpZTCharged [histoIndex]->Fill(mcTrigPt, mchbpZT); | |
470 | fhMCPtTrigPout [histoIndex]->Fill(mcTrigPt, mcpout) ; | |
907b38cd | 471 | } |
9623bf34 | 472 | |
6ed1ad3e | 473 | // Underlying event |
9623bf34 | 474 | |
6ed1ad3e | 475 | // Right |
c78eef61 | 476 | if ( (mcdeltaPhi > fUeDeltaPhiMinCut) && (mcdeltaPhi < fUeDeltaPhiMaxCut) ) |
477 | { | |
478 | //Double_t randomphi = gRandom->Uniform(TMath::Pi()/2,3*TMath::Pi()/2); | |
479 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); | |
480 | Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi); | |
481 | Double_t mcUezT = mcAssocPt/mcTrigPt; | |
6ed1ad3e | 482 | |
2af40966 | 483 | if(mcUexE < 0.) |
484 | printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
485 | mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
486 | ||
be2df971 | 487 | fhMCPtXEUeCharged[histoIndex]->Fill(mcTrigPt,mcUexE); |
488 | if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE)); | |
6ed1ad3e | 489 | |
be2df971 | 490 | fhMCPtZTUeCharged[histoIndex]->Fill(mcTrigPt,mcUezT); |
491 | if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT)); | |
c78eef61 | 492 | |
be2df971 | 493 | fhMCUePart[histoIndex]->Fill(mcTrigPt); |
c78eef61 | 494 | } |
6ed1ad3e | 495 | |
496 | if(fMakeSeveralUE) | |
c78eef61 | 497 | { |
6ed1ad3e | 498 | // Left |
499 | if((mcdeltaPhi<-fUeDeltaPhiMinCut) || (mcdeltaPhi >2*fUeDeltaPhiMaxCut)) | |
500 | { | |
501 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); | |
502 | Double_t mcUexE = -(mcAssocPt/mcTrigPt)*TMath::Cos(randomphi); | |
503 | Double_t mcUezT = mcAssocPt/mcTrigPt; | |
504 | ||
2af40966 | 505 | if(mcUexE < 0.) |
506 | printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
507 | mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
6ed1ad3e | 508 | |
be2df971 | 509 | fhMCPtXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUexE); |
510 | if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE)); | |
6ed1ad3e | 511 | |
be2df971 | 512 | fhMCPtZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUezT); |
f3c4fca3 | 513 | if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT)); |
6ed1ad3e | 514 | } |
c78eef61 | 515 | } |
907b38cd | 516 | |
63ac03db | 517 | return lead; |
6ed1ad3e | 518 | } |
907b38cd | 519 | |
520 | //___________________________________________________________________________________________________________________ | |
22ad7981 | 521 | void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Float_t ptTrig, Float_t ptAssoc, |
b6afb6b1 | 522 | Float_t deltaPhi, |
d4a8ff9a | 523 | Int_t cen, Int_t charge, |
e7d2373d | 524 | Int_t bin, Int_t decayTag, |
22ad7981 | 525 | Int_t outTOF, Int_t mcTag) |
907b38cd | 526 | |
527 | { | |
528 | // Fill mostly momentum imbalance related histograms | |
529 | ||
f3c4fca3 | 530 | Float_t zT = ptAssoc/ptTrig ; |
531 | Float_t xE =-ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig); | |
532 | Float_t pout = ptAssoc*TMath::Sin(deltaPhi) ; | |
2af40966 | 533 | |
534 | if(xE < 0.) | |
535 | printf("FillChargedMomentumImbalanceHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
536 | xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
537 | ||
f3c4fca3 | 538 | Float_t hbpXE = -100; |
539 | Float_t hbpZT = -100; | |
540 | ||
b6afb6b1 | 541 | if(xE > 0 ) hbpXE = TMath::Log(1./xE); |
f3c4fca3 | 542 | if(zT > 0 ) hbpZT = TMath::Log(1./zT); |
b6afb6b1 | 543 | |
727a309a | 544 | fhXECharged ->Fill(ptTrig , xE); |
907b38cd | 545 | fhPtHbpXECharged ->Fill(ptTrig , hbpXE); |
546 | fhZTCharged ->Fill(ptTrig , zT); | |
547 | fhPtHbpZTCharged ->Fill(ptTrig , hbpZT); | |
548 | fhPtTrigPout ->Fill(ptTrig , pout) ; | |
549 | fhPtTrigCharged ->Fill(ptTrig , ptAssoc) ; | |
b6afb6b1 | 550 | if((deltaPhi > 5*TMath::Pi()/6.) && (deltaPhi < 7*TMath::Pi()/6.)) |
551 | { | |
727a309a | 552 | fhXECharged_Cone2 ->Fill(ptTrig , xE); |
553 | fhPtHbpXECharged_Cone2 ->Fill(ptTrig , hbpXE); | |
554 | } | |
907b38cd | 555 | |
f3c4fca3 | 556 | // MC |
557 | if(IsDataMC()) | |
558 | { | |
559 | Int_t mcIndex = GetMCTagHistogramIndex(mcTag); | |
560 | fhXEChargedMC[mcIndex]->Fill(ptTrig , xE); | |
561 | } | |
562 | ||
b1f720a7 | 563 | // Pile up studies |
17af6e24 | 564 | if(fFillPileUpHistograms) |
b1f720a7 | 565 | { |
2a9171b5 | 566 | if (outTOF==1) |
fedea415 | 567 | { |
568 | fhXEChargedOtherBC ->Fill(ptTrig,xE); | |
569 | fhZTChargedOtherBC ->Fill(ptTrig,zT); | |
570 | fhPtTrigChargedOtherBC->Fill(ptTrig,ptAssoc); | |
571 | } | |
2a9171b5 | 572 | else if(outTOF==0) |
573 | { | |
574 | fhXEChargedBC0 ->Fill(ptTrig,xE); | |
575 | fhZTChargedBC0 ->Fill(ptTrig,zT); | |
576 | fhPtTrigChargedBC0->Fill(ptTrig,ptAssoc); | |
577 | } | |
578 | ||
cc944149 | 579 | Int_t vtxBC = GetReader()->GetVertexBC(); |
580 | if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) | |
581 | { | |
582 | fhXEChargedVtxBC0 ->Fill(ptTrig,xE); | |
583 | fhZTChargedVtxBC0 ->Fill(ptTrig,zT); | |
584 | fhPtTrigChargedVtxBC0->Fill(ptTrig,ptAssoc); | |
585 | } | |
586 | ||
fedea415 | 587 | if(GetReader()->IsPileUpFromSPD()) { fhXEChargedPileUp[0]->Fill(ptTrig,xE); fhZTChargedPileUp[0]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[0]->Fill(ptTrig,ptAssoc); } |
588 | if(GetReader()->IsPileUpFromEMCal()) { fhXEChargedPileUp[1]->Fill(ptTrig,xE); fhZTChargedPileUp[1]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[1]->Fill(ptTrig,ptAssoc); } | |
589 | if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEChargedPileUp[2]->Fill(ptTrig,xE); fhZTChargedPileUp[2]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[2]->Fill(ptTrig,ptAssoc); } | |
590 | if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEChargedPileUp[3]->Fill(ptTrig,xE); fhZTChargedPileUp[3]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[3]->Fill(ptTrig,ptAssoc); } | |
591 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEChargedPileUp[4]->Fill(ptTrig,xE); fhZTChargedPileUp[4]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[4]->Fill(ptTrig,ptAssoc); } | |
592 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEChargedPileUp[5]->Fill(ptTrig,xE); fhZTChargedPileUp[5]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[5]->Fill(ptTrig,ptAssoc); } | |
593 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEChargedPileUp[6]->Fill(ptTrig,xE); fhZTChargedPileUp[6]->Fill(ptTrig,zT); fhPtTrigChargedPileUp[6]->Fill(ptTrig,ptAssoc); } | |
b1f720a7 | 594 | } |
595 | ||
e7d2373d | 596 | if(fDecayTrigger && decayTag > 0) |
597 | { | |
598 | for(Int_t ibit = 0; ibit<fNDecayBits; ibit++) | |
599 | { | |
600 | if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) | |
601 | { | |
602 | fhXEDecayCharged[ibit]->Fill(ptTrig,xE); | |
603 | fhZTDecayCharged[ibit]->Fill(ptTrig,zT); | |
604 | } | |
605 | } | |
606 | } // photon decay pi0/eta trigger | |
907b38cd | 607 | |
a22f3f34 | 608 | if(bin >= 0 && fFillMomImbalancePtAssocBinsHisto)//away side |
907b38cd | 609 | { |
8cc41381 | 610 | fhXEAssocPtBin[bin]->Fill(ptTrig, xE) ; |
611 | fhZTAssocPtBin[bin]->Fill(ptTrig, zT) ; | |
907b38cd | 612 | } |
613 | ||
a22f3f34 | 614 | if(fCorrelVzBin) |
615 | { | |
616 | Int_t vz = GetEventVzBin(); | |
617 | fhXEVZ[vz]->Fill(ptTrig, xE) ; | |
618 | fhZTVZ[vz]->Fill(ptTrig, zT) ; | |
619 | } | |
620 | ||
907b38cd | 621 | if(charge > 0) |
622 | { | |
623 | fhXEPosCharged->Fill(ptTrig,xE) ; | |
624 | fhZTPosCharged->Fill(ptTrig,zT) ; | |
625 | } | |
626 | else | |
627 | { | |
628 | fhXENegCharged->Fill(ptTrig,xE) ; | |
629 | fhZTNegCharged->Fill(ptTrig,zT) ; | |
630 | } | |
631 | ||
d4a8ff9a | 632 | //fill different multiplicity/centrality histogram |
66f0196c | 633 | if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin()) |
907b38cd | 634 | { |
d4a8ff9a | 635 | fhXEMult[cen]->Fill(ptTrig,xE); |
636 | fhZTMult[cen]->Fill(ptTrig,zT); | |
637 | } //multiplicity/centrality events selection | |
907b38cd | 638 | } |
639 | ||
640 | //_______________________________________________________________________________________________________________________ | |
22ad7981 | 641 | void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float_t ptTrig, Float_t ptAssoc, |
d4a8ff9a | 642 | Float_t deltaPhi, Int_t cen, Int_t outTOF) |
907b38cd | 643 | { |
644 | // Fill underlying event histograms | |
645 | ||
6ed1ad3e | 646 | fhUePart->Fill(ptTrig); |
647 | ||
907b38cd | 648 | fhDeltaPhiUeChargedPt->Fill(ptAssoc,deltaPhi); |
649 | ||
08f220c8 | 650 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); |
907b38cd | 651 | Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi); |
652 | Double_t uezT = ptAssoc/ptTrig; | |
653 | ||
2af40966 | 654 | if(uexE < 0.) |
655 | printf("FillChargedUnderlyingEventHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
656 | uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
6ed1ad3e | 657 | |
907b38cd | 658 | fhXEUeCharged->Fill(ptTrig,uexE); |
f16872ec | 659 | if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE)); |
907b38cd | 660 | |
661 | fhZTUeCharged->Fill(ptTrig,uezT); | |
76fc98bb | 662 | if(uezT > 0) fhPtHbpZTUeCharged->Fill(ptTrig,TMath::Log(1/uezT)); |
907b38cd | 663 | |
b1f720a7 | 664 | // Pile up studies |
17af6e24 | 665 | |
666 | if(fFillPileUpHistograms) | |
b1f720a7 | 667 | { |
2a9171b5 | 668 | if (outTOF==1) |
fedea415 | 669 | { |
670 | fhXEUeChargedOtherBC->Fill(ptTrig,uexE); | |
671 | fhZTUeChargedOtherBC->Fill(ptTrig,uezT); | |
672 | } | |
2a9171b5 | 673 | else if(outTOF==0) |
674 | { | |
675 | fhXEUeChargedBC0->Fill(ptTrig,uexE); | |
676 | fhZTUeChargedBC0->Fill(ptTrig,uezT); | |
677 | } | |
fedea415 | 678 | |
cc944149 | 679 | Int_t vtxBC = GetReader()->GetVertexBC(); |
680 | if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) | |
681 | { | |
682 | fhXEUeChargedVtxBC0->Fill(ptTrig,uexE); | |
683 | fhZTUeChargedVtxBC0->Fill(ptTrig,uezT); | |
684 | } | |
685 | ||
17af6e24 | 686 | if(GetReader()->IsPileUpFromSPD()) { fhXEUeChargedPileUp[0]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[0]->Fill(ptTrig,uezT);} |
687 | if(GetReader()->IsPileUpFromEMCal()) { fhXEUeChargedPileUp[1]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[1]->Fill(ptTrig,uezT);} | |
688 | if(GetReader()->IsPileUpFromSPDOrEMCal()) { fhXEUeChargedPileUp[2]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[2]->Fill(ptTrig,uezT);} | |
689 | if(GetReader()->IsPileUpFromSPDAndEMCal()) { fhXEUeChargedPileUp[3]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[3]->Fill(ptTrig,uezT);} | |
690 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) { fhXEUeChargedPileUp[4]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[4]->Fill(ptTrig,uezT);} | |
691 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) { fhXEUeChargedPileUp[5]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[5]->Fill(ptTrig,uezT);} | |
692 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) { fhXEUeChargedPileUp[6]->Fill(ptTrig,uexE); fhZTUeChargedPileUp[6]->Fill(ptTrig,uezT);} | |
693 | } | |
b1f720a7 | 694 | |
d4a8ff9a | 695 | //fill different multiplicity/centrality histogram |
f92798e9 | 696 | if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin()) |
907b38cd | 697 | { |
d4a8ff9a | 698 | fhXEUeMult[cen]->Fill(ptTrig,uexE); |
699 | fhZTUeMult[cen]->Fill(ptTrig,uezT); | |
700 | } | |
907b38cd | 701 | } |
702 | ||
8cc41381 | 703 | //_____________________________________________________________________________________________________ |
22ad7981 | 704 | void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventSidesHistograms(Float_t ptTrig, |
705 | Float_t ptAssoc, | |
706 | Float_t deltaPhi) | |
907b38cd | 707 | { |
6ed1ad3e | 708 | // Fill underlying event histograms to the left and right of trigger |
709 | // Right cone is the default UE. | |
710 | ||
08f220c8 | 711 | if((deltaPhi<-fUeDeltaPhiMinCut) || (deltaPhi >2*fUeDeltaPhiMaxCut)) |
6ed1ad3e | 712 | { |
713 | fhDeltaPhiUeLeftCharged->Fill(ptAssoc,deltaPhi); | |
08f220c8 | 714 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); |
715 | Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi); | |
716 | Double_t uezT = ptAssoc/ptTrig; | |
6ed1ad3e | 717 | |
2af40966 | 718 | if(uexE < 0.) |
719 | printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
720 | uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
08f220c8 | 721 | |
722 | fhXEUeLeftCharged->Fill(ptTrig,uexE); | |
723 | if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE)); | |
6ed1ad3e | 724 | |
08f220c8 | 725 | fhZTUeLeftCharged->Fill(ptTrig,uezT); |
f3c4fca3 | 726 | if(uezT > 0) fhPtHbpZTUeLeftCharged->Fill(ptTrig,TMath::Log(1/uezT)); |
727 | ||
907b38cd | 728 | fhDeltaPhiUeLeftCharged->Fill(ptAssoc, deltaPhi); |
907b38cd | 729 | } |
730 | ||
8cc41381 | 731 | if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-TMath::Pi()/2)) |
6ed1ad3e | 732 | { |
733 | fhDeltaPhiUeLeftDownCharged->Fill(ptAssoc,deltaPhi); | |
8cc41381 | 734 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); |
735 | Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi); | |
736 | ||
2af40966 | 737 | if(uexE < 0.) |
738 | printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
739 | uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
8cc41381 | 740 | |
741 | fhXEUeLeftDownCharged->Fill(ptTrig,uexE); | |
742 | } | |
743 | ||
744 | if((deltaPhi>2*fUeDeltaPhiMaxCut) && (deltaPhi <3*TMath::Pi()/2)) | |
6ed1ad3e | 745 | { |
746 | fhDeltaPhiUeLeftUpCharged->Fill(ptAssoc,deltaPhi); | |
8cc41381 | 747 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); |
748 | Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi); | |
749 | ||
2af40966 | 750 | if(uexE < 0.) |
751 | printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
752 | uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
8cc41381 | 753 | |
754 | fhXEUeLeftUpCharged->Fill(ptTrig,uexE); | |
755 | } | |
756 | ||
757 | if((deltaPhi > TMath::Pi()/2) && (deltaPhi < fUeDeltaPhiMaxCut)) | |
6ed1ad3e | 758 | { |
759 | fhDeltaPhiUeRightUpCharged->Fill(ptAssoc,deltaPhi); | |
8cc41381 | 760 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); |
761 | Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi); | |
762 | ||
2af40966 | 763 | if(uexE < 0.) |
764 | printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for right-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
765 | uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
8cc41381 | 766 | |
767 | fhXEUeRightUpCharged->Fill(ptTrig,uexE); | |
768 | } | |
769 | ||
770 | if((deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < TMath::Pi()/2)) | |
6ed1ad3e | 771 | { |
772 | fhDeltaPhiUeRightDownCharged->Fill(ptAssoc,deltaPhi); | |
8cc41381 | 773 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); |
774 | Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi); | |
775 | ||
2af40966 | 776 | if(uexE < 0.) |
777 | printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for right-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
778 | uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
8cc41381 | 779 | |
780 | fhXEUeRightDownCharged->Fill(ptTrig,uexE); | |
6ed1ad3e | 781 | } |
907b38cd | 782 | } |
783 | ||
784 | //______________________________________________________________________________________________________________________________ | |
22ad7981 | 785 | void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc, |
786 | TLorentzVector mom1, TLorentzVector mom2, | |
787 | Bool_t bChargedOrNeutral) | |
907b38cd | 788 | { |
789 | // Do correlation with decay photons of triggered pi0 or eta | |
790 | ||
791 | // Calculate the correlation parameters | |
792 | Float_t ptDecay1 = mom1.Pt(); | |
793 | Float_t ptDecay2 = mom2.Pt(); | |
794 | ||
795 | Float_t zTDecay1 = -100, zTDecay2 = -100; | |
5a04739d | 796 | if(ptDecay1 > 0) zTDecay1 = ptAssoc/ptDecay1 ; |
797 | if(ptDecay2 > 0) zTDecay2 = ptAssoc/ptDecay2 ; | |
907b38cd | 798 | |
799 | Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc; | |
800 | if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi(); | |
801 | if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi(); | |
802 | ||
803 | Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc; | |
804 | if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi(); | |
805 | if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi(); | |
806 | ||
807 | Float_t xEDecay1 =-zTDecay1*TMath::Cos(deltaPhiDecay1); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig); | |
808 | Float_t xEDecay2 =-zTDecay2*TMath::Cos(deltaPhiDecay2); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig); | |
809 | ||
810 | if(bChargedOrNeutral) // correlate with charges | |
811 | { | |
e7d2373d | 812 | fhDeltaPhiPi0DecayCharged->Fill(ptDecay1, deltaPhiDecay1); |
813 | fhDeltaPhiPi0DecayCharged->Fill(ptDecay2, deltaPhiDecay2); | |
907b38cd | 814 | |
2e876d85 | 815 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2); |
907b38cd | 816 | |
817 | if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) ) | |
818 | { | |
e7d2373d | 819 | fhZTPi0DecayCharged->Fill(ptDecay1,zTDecay1); |
820 | fhXEPi0DecayCharged->Fill(ptDecay1,xEDecay1); | |
907b38cd | 821 | } |
822 | if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) ) | |
823 | { | |
e7d2373d | 824 | fhZTPi0DecayCharged->Fill(ptDecay2,zTDecay2); |
825 | fhXEPi0DecayCharged->Fill(ptDecay2,xEDecay2); | |
907b38cd | 826 | } |
827 | } | |
828 | else // correlate with neutrals | |
829 | { | |
e7d2373d | 830 | fhDeltaPhiPi0DecayNeutral->Fill(ptDecay1, deltaPhiDecay1); |
831 | fhDeltaPhiPi0DecayNeutral->Fill(ptDecay2, deltaPhiDecay2); | |
907b38cd | 832 | |
2e876d85 | 833 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2); |
907b38cd | 834 | |
835 | if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) ) | |
836 | { | |
e7d2373d | 837 | fhZTPi0DecayNeutral->Fill(ptDecay1,zTDecay1); |
838 | fhXEPi0DecayNeutral->Fill(ptDecay1,xEDecay1); | |
907b38cd | 839 | } |
840 | if( (deltaPhiDecay2 > fDeltaPhiMinCut) && ( deltaPhiDecay2 < fDeltaPhiMaxCut) ) | |
841 | { | |
e7d2373d | 842 | fhZTPi0DecayNeutral->Fill(ptDecay2,zTDecay2); |
843 | fhXEPi0DecayNeutral->Fill(ptDecay2,xEDecay2); | |
907b38cd | 844 | } |
845 | } | |
846 | } | |
847 | ||
907b38cd | 848 | //_____________________________________________________________________________________________________________________________ |
22ad7981 | 849 | void AliAnaParticleHadronCorrelation::FillNeutralUnderlyingEventSidesHistograms(Float_t ptTrig, Float_t ptAssoc, |
fe69395f | 850 | Float_t zT, Float_t hbpZT, |
22ad7981 | 851 | Float_t deltaPhi) |
907b38cd | 852 | { |
6ed1ad3e | 853 | // Fill underlying event histograms to the left of trigger |
854 | // Right is the default case | |
907b38cd | 855 | |
fe69395f | 856 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); |
857 | ||
858 | Float_t xE =-ptAssoc/ptTrig*TMath::Cos(randomphi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig); | |
859 | Float_t hbpXE = -100; | |
860 | if(xE > 0 ) hbpXE = TMath::Log(1./xE); | |
861 | ||
907b38cd | 862 | if((deltaPhi<-fUeDeltaPhiMinCut) && (deltaPhi >-fUeDeltaPhiMaxCut)) |
fe69395f | 863 | { |
907b38cd | 864 | fhDeltaPhiUeLeftNeutral->Fill(ptAssoc, deltaPhi); |
865 | fhXEUeLeftNeutral ->Fill(ptTrig , xE); | |
866 | fhPtHbpXEUeLeftNeutral ->Fill(ptTrig , hbpXE); | |
867 | fhZTUeLeftNeutral ->Fill(ptTrig , zT); | |
868 | fhPtHbpZTUeLeftNeutral ->Fill(ptTrig , hbpZT); | |
869 | } | |
907b38cd | 870 | } |
871 | ||
31864468 | 872 | //______________________________________________________ |
873 | void AliAnaParticleHadronCorrelation::FillEventMixPool() | |
874 | { | |
225ad4bd | 875 | // Fill the pool with tracks or clusters if requested |
31864468 | 876 | |
225ad4bd | 877 | if ( !DoOwnMix() ) return; |
878 | ||
879 | FillChargedEventMixPool(); | |
880 | ||
881 | // Do the cluster pool filling only if requested | |
882 | // or in case of isolation cut using clusters in the cone. | |
883 | Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged); | |
884 | ||
885 | if( !fFillNeutralEventMixPool && !isoCase) return; | |
31864468 | 886 | |
225ad4bd | 887 | FillNeutralEventMixPool(); |
31864468 | 888 | } |
889 | ||
029dea5a | 890 | //_____________________________________________________________ |
891 | void AliAnaParticleHadronCorrelation::FillChargedEventMixPool() | |
892 | { | |
d07ffd54 | 893 | // Mixed event pool filling for tracks |
31864468 | 894 | |
7ed3a248 | 895 | if(fUseMixStoredInReader && GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) |
896 | { | |
897 | //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data()); | |
898 | return ; // pool filled previously for another trigger | |
899 | } | |
900 | ||
029dea5a | 901 | AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager(); |
902 | AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler()); | |
903 | ||
c6b4facc | 904 | if(!inputHandler) return ; |
31864468 | 905 | |
d07ffd54 | 906 | // Do mixing only with MB event (or the chosen mask), if not skip |
907 | if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ; | |
908 | ||
d07ffd54 | 909 | Int_t eventBin = GetEventMixBin(); |
910 | ||
911 | //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing | |
912 | if(eventBin < 0) return; | |
913 | ||
efb540af | 914 | fhEventMBBin->Fill(eventBin); |
915 | ||
d07ffd54 | 916 | TObjArray * mixEventTracks = new TObjArray; |
917 | ||
918 | if(fUseMixStoredInReader) | |
029dea5a | 919 | { |
d07ffd54 | 920 | fListMixTrackEvents[eventBin] = GetReader()->GetListWithMixedEventsForTracks(eventBin); |
921 | } | |
922 | ||
923 | if(!fListMixTrackEvents[eventBin]) fListMixTrackEvents[eventBin] = new TList(); | |
924 | ||
925 | //printf("%s ***** Pool Event bin : %d - nTracks %d\n",GetInputAODName().Data(),eventBin, GetCTSTracks()->GetEntriesFast()); | |
926 | ||
927 | TList * pool = fListMixTrackEvents[eventBin]; | |
928 | ||
929 | TVector3 p3; | |
930 | for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ ) | |
931 | { | |
932 | AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ; | |
029dea5a | 933 | |
d07ffd54 | 934 | Double_t mom[3] = {track->Px(),track->Py(),track->Pz()}; |
935 | p3.SetXYZ(mom[0],mom[1],mom[2]); | |
936 | Float_t pt = p3.Pt(); | |
2e876d85 | 937 | |
d07ffd54 | 938 | //Select only hadrons in pt range |
939 | if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ; | |
029dea5a | 940 | |
d07ffd54 | 941 | AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0); |
942 | mixedTrack->SetDetector("CTS"); | |
943 | mixedTrack->SetChargedBit(track->Charge()>0); | |
944 | mixEventTracks->Add(mixedTrack); | |
945 | } | |
946 | ||
7aaa6c97 | 947 | fhNtracksMB->Fill(mixEventTracks->GetEntriesFast(),eventBin); |
948 | ||
d07ffd54 | 949 | //Set the event number where the last event was added, to avoid double pool filling |
950 | GetReader()->SetLastTracksMixedEvent(GetEventNumber()); | |
951 | ||
952 | //printf("Add event to pool with %d tracks \n ",mixEventTracks->GetEntries()); | |
953 | pool->AddFirst(mixEventTracks); | |
954 | mixEventTracks = 0; | |
955 | ||
956 | //printf("Pool size %d, max %d\n",pool->GetSize(), GetNMaxEvMix()); | |
957 | ||
958 | if(pool->GetSize() > GetNMaxEvMix()) | |
959 | {//Remove last event | |
960 | TClonesArray * tmp = static_cast<TClonesArray*>(pool->Last()) ; | |
961 | pool->RemoveLast() ; | |
962 | delete tmp ; | |
963 | } | |
964 | } | |
965 | ||
966 | //_____________________________________________________________ | |
967 | void AliAnaParticleHadronCorrelation::FillNeutralEventMixPool() | |
968 | { | |
969 | // Mixed event pool filling for neutral clusters | |
970 | // Right now only for EMCAL and in isolation case | |
971 | ||
972 | //printf("FillNeutralEventMixPool for %s\n",GetInputAODName().Data()); | |
973 | ||
974 | if(fUseMixStoredInReader && GetReader()->GetLastCaloMixedEvent() == GetEventNumber()) | |
975 | { | |
976 | //printf("%s : Pool already filled for this event !!!\n",GetInputAODName().Data()); | |
977 | return ; // pool filled previously for another trigger | |
978 | } | |
979 | ||
6bae06a4 | 980 | TObjArray * pl = GetEMCALClusters(); |
981 | //if (GetAODObjArrayName.Contains("PHOS") )pl = GetPHOSClusters(); | |
982 | //else pl = GetEMCALClusters(); | |
983 | ||
d07ffd54 | 984 | AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager(); |
985 | AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler()); | |
986 | ||
987 | if(!inputHandler) return ; | |
31864468 | 988 | |
d07ffd54 | 989 | // Do mixing only with MB event (or the chosen mask), if not skip |
990 | if( !(inputHandler->IsEventSelected( ) & GetReader()->GetMixEventTriggerMask()) ) return ; | |
991 | ||
d07ffd54 | 992 | Int_t eventBin = GetEventMixBin(); |
993 | ||
994 | //Check that the bin exists, if not (bad determination of RP, centrality or vz bin) do nothing | |
995 | if(eventBin < 0) return; | |
996 | ||
997 | TObjArray * mixEventCalo = new TObjArray; | |
998 | ||
999 | if(fUseMixStoredInReader) | |
1000 | { | |
1001 | fListMixCaloEvents[eventBin] = GetReader()->GetListWithMixedEventsForCalo(eventBin); | |
1002 | } | |
1003 | ||
1004 | if(!fListMixCaloEvents[eventBin]) fListMixCaloEvents[eventBin] = new TList(); | |
1005 | ||
1006 | TList * poolCalo = fListMixCaloEvents[eventBin]; | |
1007 | ||
d07ffd54 | 1008 | TLorentzVector mom; |
2bb7ac98 | 1009 | |
7aaa6c97 | 1010 | for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ ) |
d07ffd54 | 1011 | { |
1012 | AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ; | |
1013 | ||
1014 | // remove matched clusters | |
1015 | if( IsTrackMatched( calo, GetReader()->GetInputEvent() ) ) continue ; | |
283f989c | 1016 | |
2bb7ac98 | 1017 | //Cluster momentum calculation |
d07ffd54 | 1018 | if(GetReader()->GetDataType() != AliCaloTrackReader::kMC) |
283f989c | 1019 | { |
d07ffd54 | 1020 | calo->GetMomentum(mom,GetVertex(0)) ; |
1021 | }//Assume that come from vertex in straight line | |
1022 | else | |
029dea5a | 1023 | { |
d07ffd54 | 1024 | Double_t vertex[]={0,0,0}; |
1025 | calo->GetMomentum(mom,vertex) ; | |
029dea5a | 1026 | } |
1027 | ||
d07ffd54 | 1028 | Float_t pt = mom.Pt(); |
1029 | //Select only clusters in pt range | |
1030 | if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ; | |
2e876d85 | 1031 | |
d07ffd54 | 1032 | AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom); |
1033 | mixedCalo->SetDetector("EMCAL"); | |
1034 | mixEventCalo->Add(mixedCalo); | |
1035 | } | |
1036 | ||
7aaa6c97 | 1037 | fhNclustersMB->Fill(mixEventCalo->GetEntriesFast(),eventBin); |
1038 | ||
d07ffd54 | 1039 | //Set the event number where the last event was added, to avoid double pool filling |
1040 | GetReader()->SetLastCaloMixedEvent(GetEventNumber()); | |
1041 | ||
1042 | //printf("Add event to pool with %d clusters \n ",mixEventCalo->GetEntries()); | |
1043 | poolCalo->AddFirst(mixEventCalo); | |
1044 | mixEventCalo = 0; | |
1045 | ||
1046 | //printf("Pool size %d, max %d\n",poolCalo->GetSize(), GetNMaxEvMix()); | |
029dea5a | 1047 | |
d07ffd54 | 1048 | if(poolCalo->GetSize() > GetNMaxEvMix()) |
1049 | {//Remove last event | |
1050 | TClonesArray * tmp = static_cast<TClonesArray*>(poolCalo->Last()) ; | |
1051 | poolCalo->RemoveLast() ; | |
1052 | delete tmp ; | |
1053 | } | |
029dea5a | 1054 | } |
1055 | ||
6b013448 | 1056 | //_________________________________________________________________________________________________________________ |
1057 | Bool_t AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow(AliAODPWG4ParticleCorrelation * particle) | |
1058 | { | |
1059 | // Select events where the leading charged particle in the opposite hemisphere | |
1060 | // to the trigger particle is in a window centered at 180 from the trigger | |
1061 | ||
6b013448 | 1062 | Float_t etaTrig = particle->Eta(); |
1063 | Float_t ptTrig = particle->Pt(); | |
98604e3a | 1064 | Float_t phiTrig = particle->Phi(); |
1065 | if(phiTrig < 0 ) phiTrig+= TMath::TwoPi(); | |
1066 | ||
1067 | Float_t ptLeadHad = 0 ; | |
1068 | Float_t dphiLeadHad= -100 ; | |
6b013448 | 1069 | Float_t phiLeadHad = -100 ; |
1070 | Float_t etaLeadHad = -100 ; | |
98604e3a | 1071 | Int_t nTrack = 0; |
6b013448 | 1072 | TVector3 p3; |
98604e3a | 1073 | |
6b013448 | 1074 | for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ ) |
1075 | { | |
1076 | AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ; | |
1077 | ||
1078 | Double_t mom[3] = {track->Px(),track->Py(),track->Pz()}; | |
1079 | p3.SetXYZ(mom[0],mom[1],mom[2]); | |
1080 | ||
1081 | Float_t pt = p3.Pt(); | |
1082 | Float_t phi = p3.Phi() ; | |
1083 | if(phi < 0 ) phi+= TMath::TwoPi(); | |
1084 | ||
98604e3a | 1085 | Float_t deltaPhi = phiTrig-phi; |
1086 | // | |
1087 | // Calculate deltaPhi shift so that for the particles on the opposite side | |
1088 | // it is defined between 90 and 270 degrees | |
1089 | // Shift [-360,-90] to [0, 270] | |
1090 | // and [270,360] to [-90,0] | |
1091 | if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi(); | |
1092 | if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi(); | |
1093 | ||
1094 | if(pt > ptLeadHad && deltaPhi > TMath::PiOver2()) // in opposite hemisphere | |
6b013448 | 1095 | { |
1096 | ptLeadHad = pt ; | |
1097 | phiLeadHad = phi; | |
98604e3a | 1098 | dphiLeadHad= deltaPhi; |
6b013448 | 1099 | etaLeadHad = p3.Eta(); |
98604e3a | 1100 | nTrack++; |
6b013448 | 1101 | } |
1102 | }// track loop | |
1103 | ||
98604e3a | 1104 | if(fFillLeadHadOppositeHisto) |
1105 | { | |
1106 | if(nTrack == 0) | |
1107 | { | |
1108 | fhPtNoLeadingOppositeHadron ->Fill(ptTrig); | |
1109 | fhEtaPhiNoLeadingOppositeHadron->Fill(etaTrig,phiTrig); | |
1110 | } | |
1111 | else | |
1112 | { | |
1113 | fhPtLeadingOppositeHadron ->Fill(ptTrig, ptLeadHad); | |
1114 | fhPtDiffPhiLeadingOppositeHadron->Fill(ptTrig,dphiLeadHad); | |
1115 | fhPtDiffEtaLeadingOppositeHadron->Fill(ptTrig, etaLeadHad-etaTrig); | |
1116 | } | |
1117 | } | |
6b013448 | 1118 | |
1119 | if(GetDebug() > 1 ) | |
1120 | { | |
98604e3a | 1121 | printf("AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow() pT %2.2f, phi %2.2f, eta %2.2f, nTracks away %d, total tracks %d\n", |
1122 | ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad,nTrack, GetTrackMultiplicity()); | |
6b013448 | 1123 | |
1124 | printf("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f\n", | |
98604e3a | 1125 | ptTrig, dphiLeadHad*TMath::RadToDeg(), etaLeadHad-etaTrig); |
6b013448 | 1126 | printf("\t cuts pT: min %2.2f, max %2.2f; DPhi: min %2.2f, max %2.2f\n",fMinLeadHadPt,fMaxLeadHadPt,fMinLeadHadPhi*TMath::RadToDeg(),fMaxLeadHadPhi*TMath::RadToDeg()); |
1127 | } | |
1128 | ||
98604e3a | 1129 | // reject the trigger if the leading hadron is not in the requested pt or phi window and |
1130 | ||
1131 | if( nTrack == 0 ) return kFALSE; // No track found in opposite hemisphere | |
1132 | ||
1133 | if( ptLeadHad < fMinLeadHadPt || ptLeadHad > fMaxLeadHadPt ) return kFALSE; | |
6b013448 | 1134 | |
1135 | //printf("Accept leading hadron pT \n"); | |
1136 | ||
98604e3a | 1137 | if( dphiLeadHad < fMinLeadHadPhi || dphiLeadHad > fMaxLeadHadPhi ) return kFALSE; |
6b013448 | 1138 | |
1139 | //printf("Accept leading hadron phi \n"); | |
1140 | ||
98604e3a | 1141 | |
6b013448 | 1142 | return kTRUE ; |
1143 | } | |
1144 | ||
05d0d05d | 1145 | //____________________________________________________________ |
1146 | TObjString* AliAnaParticleHadronCorrelation::GetAnalysisCuts() | |
1147 | { | |
1148 | //Save parameters used for analysis | |
1149 | TString parList ; //this will be list of parameters used for this analysis. | |
1150 | const Int_t buffersize = 560; | |
1151 | char onePar[buffersize] ; | |
1152 | ||
81796cfc | 1153 | snprintf(onePar,buffersize,"--- AliAnaPaticleHadronCorrelation ---:") ; |
05d0d05d | 1154 | parList+=onePar ; |
81796cfc | 1155 | snprintf(onePar,buffersize," %3.2f < Pt associated < %3.2f; ", fMinAssocPt, fMaxAssocPt) ; |
05d0d05d | 1156 | parList+=onePar ; |
81796cfc | 1157 | snprintf(onePar,buffersize," %3.2f < Phi trigger particle-Hadron < %3.2f; ", fDeltaPhiMinCut, fDeltaPhiMaxCut) ; |
05d0d05d | 1158 | parList+=onePar ; |
81796cfc | 1159 | snprintf(onePar,buffersize," %3.2f < Phi trigger particle-UeHadron < %3.2f; ", fUeDeltaPhiMinCut, fUeDeltaPhiMaxCut) ; |
05d0d05d | 1160 | parList+=onePar ; |
81796cfc | 1161 | snprintf(onePar,buffersize,"Isolated Trigger? %d;", fSelectIsolated) ; |
05d0d05d | 1162 | parList+=onePar ; |
81796cfc | 1163 | snprintf(onePar,buffersize,"Several UE? %d;", fMakeSeveralUE) ; |
05d0d05d | 1164 | parList+=onePar ; |
81796cfc | 1165 | snprintf(onePar,buffersize,"Name of AOD Pi0 Branch %s;", fPi0AODBranchName.Data()); |
05d0d05d | 1166 | parList+=onePar ; |
81796cfc | 1167 | snprintf(onePar,buffersize,"Do Decay-hadron correlation ? pi0 %d, decay %d;", fPi0Trigger, fDecayTrigger) ; |
05d0d05d | 1168 | parList+=onePar ; |
81796cfc | 1169 | snprintf(onePar,buffersize,"Select absolute leading for cluster triggers ? %d or Near Side Leading %d;", |
3f150b4b | 1170 | fMakeAbsoluteLeading, fMakeNearSideLeading) ; |
05d0d05d | 1171 | parList+=onePar ; |
1172 | snprintf(onePar,buffersize,"Associated particle pt bins %d: ", fNAssocPtBins) ; | |
1173 | parList+=onePar ; | |
1174 | for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) { | |
1175 | snprintf(onePar,buffersize,"bin %d = [%2.1f,%2.1f];", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ; | |
1176 | } | |
1177 | parList+=onePar ; | |
1178 | ||
1179 | //Get parameters set in base class. | |
1180 | parList += GetBaseParametersList() ; | |
1181 | ||
05d0d05d | 1182 | //Get parameters set in FiducialCut class (not available yet) |
1183 | //parlist += GetFidCut()->GetFidCutParametersList() | |
1184 | ||
1185 | return new TObjString(parList) ; | |
1186 | ||
1187 | } | |
1188 | ||
1189 | //________________________________________________________________ | |
e09cf5ef | 1190 | TList * AliAnaParticleHadronCorrelation::GetCreateOutputObjects() |
c8ad7ead | 1191 | { |
c8ad7ead | 1192 | // Create histograms to be saved in output file and |
e09cf5ef | 1193 | // store them in fOutputContainer |
029dea5a | 1194 | |
c8ad7ead | 1195 | TList * outputContainer = new TList() ; |
1196 | outputContainer->SetName("CorrelationHistos") ; | |
e09cf5ef | 1197 | |
7aaa6c97 | 1198 | Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); |
1199 | Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); | |
1200 | Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); | |
1201 | ||
1202 | Int_t ndeltaphibins = GetHistogramRanges()->GetHistoDeltaPhiBins(); Int_t ndeltaetabins = GetHistogramRanges()->GetHistoDeltaEtaBins(); | |
1203 | Float_t deltaphimax = GetHistogramRanges()->GetHistoDeltaPhiMax(); Float_t deltaetamax = GetHistogramRanges()->GetHistoDeltaEtaMax(); | |
1204 | Float_t deltaphimin = GetHistogramRanges()->GetHistoDeltaPhiMin(); Float_t deltaetamin = GetHistogramRanges()->GetHistoDeltaEtaMin(); | |
1205 | ||
1206 | Int_t ntrbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t nclbins = GetHistogramRanges()->GetHistoNClustersBins(); | |
1207 | Int_t trmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t clmax = GetHistogramRanges()->GetHistoNClustersMax(); | |
1208 | Int_t trmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); Int_t clmin = GetHistogramRanges()->GetHistoNClustersMin(); | |
1209 | ||
1210 | Int_t nxeztbins = GetHistogramRanges()->GetHistoRatioBins(); Int_t nhbpbins = GetHistogramRanges()->GetHistoHBPBins(); | |
1211 | Float_t xeztmax = GetHistogramRanges()->GetHistoRatioMax(); Float_t hbpmax = GetHistogramRanges()->GetHistoHBPMax(); | |
1212 | Float_t xeztmin = GetHistogramRanges()->GetHistoRatioMin(); Float_t hbpmin = GetHistogramRanges()->GetHistoHBPMin(); | |
e09cf5ef | 1213 | |
d0b625bc | 1214 | Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin(); |
1215 | ||
17af6e24 | 1216 | TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"}; |
1217 | TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ; | |
c8ad7ead | 1218 | |
7d306daf | 1219 | // For vz dependent histograms, if option ON |
1220 | Int_t nz = 1 ; | |
1221 | if(fCorrelVzBin) nz = GetNZvertBin(); | |
1222 | TString sz = "" ; | |
1223 | TString tz = "" ; | |
1224 | ||
de9949a4 | 1225 | // Fill histograms for neutral clusters in mixing? |
1226 | Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged); | |
1227 | Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ; | |
1228 | ||
55c20a99 | 1229 | fhPtTriggerInput = new TH1F("hPtTriggerInput","Input trigger #it{p}_{T}", nptbins,ptmin,ptmax); |
bef61a43 | 1230 | fhPtTriggerInput->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); |
1231 | outputContainer->Add(fhPtTriggerInput); | |
c8ad7ead | 1232 | |
bef61a43 | 1233 | if( fM02MaxCut > 0 && fM02MinCut > 0 ) |
1234 | { | |
1235 | fhPtTriggerSSCut = new TH1F("hPtTriggerSSCut","Trigger #it{p}_{T} after #lambda^{2}_{0} cut", nptbins,ptmin,ptmax); | |
1236 | fhPtTriggerSSCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1237 | outputContainer->Add(fhPtTriggerSSCut); | |
1238 | } | |
1239 | ||
1240 | if( OnlyIsolated() ) | |
1241 | { | |
6c9e3fb5 | 1242 | fhPtTriggerIsoCut = new TH1F("hPtTriggerIsoCut","Trigger #it{p}_{T} after isolation (and #lambda^{2}_{0} cut)", nptbins,ptmin,ptmax); |
bef61a43 | 1243 | fhPtTriggerIsoCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); |
1244 | outputContainer->Add(fhPtTriggerIsoCut); | |
1245 | } | |
1246 | ||
1247 | fhPtTriggerFidCut = new TH1F("hPtTriggerFidCut","Trigger #it{p}_{T} after fiducial (isolation and #lambda^{2}_{0}) cut", nptbins,ptmin,ptmax); | |
1248 | fhPtTriggerFidCut->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1249 | outputContainer->Add(fhPtTriggerFidCut); | |
c8ad7ead | 1250 | |
6c9e3fb5 | 1251 | fhPtTrigger = new TH1F("hPtTrigger","#it{p}_{T} distribution of trigger particles (after opposite hadron leading cut and rest)", nptbins,ptmin,ptmax); |
55c20a99 | 1252 | fhPtTrigger->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); |
1253 | outputContainer->Add(fhPtTrigger); | |
c8ad7ead | 1254 | |
764ab1f4 | 1255 | if(IsDataMC()) |
1256 | { | |
b1f720a7 | 1257 | for(Int_t i=0; i < 7; i++) |
764ab1f4 | 1258 | { |
55c20a99 | 1259 | fhPtTriggerMC[i] = new TH1F(Form("hPtTrigger_MC%s",nameMC[i].Data()), |
1260 | Form("#it{p}_{T} distribution of trigger particles, trigger origin is %s",nameMC[i].Data()), | |
c8ad7ead | 1261 | nptbins,ptmin,ptmax); |
55c20a99 | 1262 | fhPtTriggerMC[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); |
1263 | outputContainer->Add(fhPtTriggerMC[i]); | |
764ab1f4 | 1264 | } |
1265 | } | |
1266 | ||
48c5da66 | 1267 | if(fDecayTrigger) |
1268 | { | |
1269 | for(Int_t ibit = 0; ibit < fNDecayBits; ibit++) | |
1270 | { | |
1271 | fhPtDecayTrigger[ibit] = new TH1F(Form("hPtDecayTrigger_bit%d",fDecayBits[ibit]), | |
1272 | Form("#it{p}_{T} distribution of trigger particles, decay Bit %d",fDecayBits[ibit]), | |
1273 | nptbins,ptmin,ptmax); | |
1274 | fhPtDecayTrigger[ibit]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1275 | outputContainer->Add(fhPtDecayTrigger[ibit]); | |
1276 | ||
1277 | if(IsDataMC()) | |
1278 | { | |
1279 | for(Int_t i=0; i < 7; i++) | |
1280 | { | |
1281 | fhPtDecayTriggerMC[ibit][i] = new TH1F(Form("hPtDecayTrigger_bit%d_MC%s",fDecayBits[ibit], nameMC[i].Data()), | |
1282 | Form("#it{p}_{T} distribution of trigger particles, decay Bit %d, trigger origin is %s",fDecayBits[ibit], nameMC[i].Data()), | |
1283 | nptbins,ptmin,ptmax); | |
1284 | fhPtDecayTriggerMC[ibit][i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1285 | outputContainer->Add(fhPtDecayTriggerMC[ibit][i]); | |
1286 | } | |
1287 | } | |
1288 | } | |
1289 | } | |
1290 | ||
7d306daf | 1291 | if(fCorrelVzBin) |
1292 | { | |
55c20a99 | 1293 | fhPtTriggerVzBin = new TH2F("hPtTriggerVzBin","#it{p}_{T} distribution of trigger particles vs vz bin", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin()); |
1294 | fhPtTriggerVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1295 | fhPtTriggerVzBin->SetYTitle("#it{v}_{#it{z}} bin"); | |
1296 | outputContainer->Add(fhPtTriggerVzBin); | |
7d306daf | 1297 | } |
1298 | ||
55c20a99 | 1299 | fhPtTriggerBin = new TH2F ("hPtTriggerBin","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax,nMixBins,0,nMixBins); |
1300 | fhPtTriggerBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1301 | fhPtTriggerBin->SetYTitle("Bin"); | |
1302 | outputContainer->Add(fhPtTriggerBin); | |
c8ad7ead | 1303 | |
55c20a99 | 1304 | fhPhiTrigger = new TH2F ("hPhiTrigger","#phi distribution of trigger Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax); |
1305 | fhPhiTrigger->SetYTitle("#phi (rad)"); | |
1306 | outputContainer->Add(fhPhiTrigger); | |
c8ad7ead | 1307 | |
55c20a99 | 1308 | fhEtaTrigger = new TH2F ("hEtaTrigger","#eta distribution of trigger",nptbins,ptmin,ptmax, netabins,etamin,etamax); |
1309 | fhEtaTrigger->SetYTitle("#eta "); | |
1310 | outputContainer->Add(fhEtaTrigger); | |
e09cf5ef | 1311 | |
b6afb6b1 | 1312 | if(fFillHighMultHistograms) |
1313 | { | |
1314 | fhPtTriggerCentrality = new TH2F("hPtTriggerCentrality","Trigger particle #it{p}_{T} vs centrality",nptbins,ptmin,ptmax,100,0.,100) ; | |
1315 | fhPtTriggerCentrality->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1316 | fhPtTriggerCentrality->SetYTitle("Centrality (%)"); | |
1317 | outputContainer->Add(fhPtTriggerCentrality) ; | |
1318 | ||
1319 | fhPtTriggerEventPlane = new TH2F("hPtTriggerEventPlane","Trigger particle #it{p}_{T} vs event plane angle",nptbins,ptmin,ptmax, 100,0.,TMath::Pi()) ; | |
1320 | fhPtTriggerEventPlane->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1321 | fhPtTriggerEventPlane->SetXTitle("EP angle (rad)"); | |
1322 | outputContainer->Add(fhPtTriggerEventPlane) ; | |
1323 | ||
1324 | fhTriggerEventPlaneCentrality = new TH2F("hTriggerEventPlaneCentrality","Trigger particle centrality vs event plane angle",100,0.,100,100,0.,TMath::Pi()) ; | |
1325 | fhTriggerEventPlaneCentrality->SetXTitle("Centrality (%)"); | |
1326 | fhTriggerEventPlaneCentrality->SetYTitle("EP angle (rad)"); | |
1327 | outputContainer->Add(fhTriggerEventPlaneCentrality) ; | |
1328 | } | |
a22f3f34 | 1329 | |
55c20a99 | 1330 | // Leading hadron in oposite side |
98604e3a | 1331 | if(fFillLeadHadOppositeHisto) |
55c20a99 | 1332 | { |
1333 | fhPtLeadingOppositeHadron = new TH2F("hPtTriggerPtLeadingOppositeHadron","Leading hadron opposite to trigger vs trigger #it{p}_{T}", | |
1334 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
1335 | fhPtLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1336 | fhPtLeadingOppositeHadron->SetYTitle("#it{p}_{T}^{lead hadron} (GeV/#it{c})"); | |
1337 | outputContainer->Add(fhPtLeadingOppositeHadron); | |
98604e3a | 1338 | |
1339 | fhPtNoLeadingOppositeHadron = new TH1F("hPtTriggerNoLeadingOppositeHadron","No Leading hadron opposite to trigger #it{p}_{T}", | |
1340 | nptbins,ptmin,ptmax); | |
1341 | fhPtNoLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1342 | outputContainer->Add(fhPtNoLeadingOppositeHadron); | |
1343 | ||
1344 | fhEtaPhiNoLeadingOppositeHadron = new TH2F("hEtaPhiTriggerNoLeadingOppositeHadron","No Leading hadron opposite to trigger #eta:#phi", | |
1345 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
1346 | fhEtaPhiNoLeadingOppositeHadron->SetXTitle("#eta"); | |
1347 | fhEtaPhiNoLeadingOppositeHadron->SetYTitle("#phi"); | |
1348 | outputContainer->Add(fhEtaPhiNoLeadingOppositeHadron); | |
1349 | ||
55c20a99 | 1350 | |
1351 | fhPtDiffPhiLeadingOppositeHadron = new TH2F("hPtTriggerDiffPhiTriggerLeadingOppositeHadron","#phi_{trigger}-#phi_{leading opposite hadron} vs #it{p}_{T}^{trig}", | |
98604e3a | 1352 | nptbins,ptmin,ptmax,ndeltaphibins,deltaphimin,deltaphimax); |
55c20a99 | 1353 | fhPtDiffPhiLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); |
1354 | fhPtDiffPhiLeadingOppositeHadron->SetYTitle("#phi_{trigger}-#phi_{leading opposite hadron} (rad)"); | |
1355 | outputContainer->Add(fhPtDiffPhiLeadingOppositeHadron); | |
1356 | ||
1357 | fhPtDiffEtaLeadingOppositeHadron = new TH2F("hPtTriggerDiffEtaTriggerPhiLeadingOppositeHadron","#eta_{trigger}-#eta_{leading opposite hadron} vs #it{p}_{T}^{trig}", | |
1358 | nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax); | |
1359 | fhPtDiffEtaLeadingOppositeHadron->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1360 | fhPtDiffEtaLeadingOppositeHadron->SetYTitle("#eta_{trigger}-#eta_{leading opposite hadron}"); | |
1361 | outputContainer->Add(fhPtDiffEtaLeadingOppositeHadron); | |
1362 | } | |
68cd2624 | 1363 | |
e09cf5ef | 1364 | //Correlation with charged hadrons |
c8ad7ead | 1365 | |
1366 | fhDeltaPhiDeltaEtaCharged = new TH2F | |
1367 | ("hDeltaPhiDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}}", | |
1368 | ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax); | |
1369 | fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)"); | |
1370 | fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta"); | |
1371 | ||
1372 | fhDeltaPhiDeltaEtaChargedPtA3GeV = new TH2F | |
1373 | ("hDeltaPhiDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #phi_{trigger} - #phi_{h^{#pm}, #it{p}_{TA}>3 GeV/#it{c}}", | |
1374 | ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax); | |
1375 | fhDeltaPhiDeltaEtaChargedPtA3GeV->SetXTitle("#Delta #phi (rad)"); | |
1376 | fhDeltaPhiDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta"); | |
1377 | ||
1378 | fhPhiCharged = new TH2F | |
1379 | ("hPhiCharged","#phi_{h^{#pm}} vs #it{p}_{T #pm}", | |
2af40966 | 1380 | nptbins,ptmin,ptmax,180,0,TMath::TwoPi()); |
c8ad7ead | 1381 | fhPhiCharged->SetYTitle("#phi_{h^{#pm}} (rad)"); |
1382 | fhPhiCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})"); | |
1383 | ||
1384 | fhEtaCharged = new TH2F | |
1385 | ("hEtaCharged","#eta_{h^{#pm}} vs #it{p}_{T #pm}", | |
2af40966 | 1386 | nptbins,ptmin,ptmax,100,-1.,1.); |
c8ad7ead | 1387 | fhEtaCharged->SetYTitle("#eta_{h^{#pm}} (rad)"); |
1388 | fhEtaCharged->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})"); | |
1389 | ||
1390 | fhDeltaPhiCharged = new TH2F | |
1391 | ("hDeltaPhiCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}", | |
1392 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1393 | fhDeltaPhiCharged->SetYTitle("#Delta #phi (rad)"); | |
1394 | fhDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1395 | ||
1396 | fhDeltaPhiChargedPtA3GeV = new TH2F | |
1397 | ("hDeltaPhiChargedPtA3GeV","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}", | |
1398 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1399 | fhDeltaPhiChargedPtA3GeV->SetYTitle("#Delta #phi (rad)"); | |
1400 | fhDeltaPhiChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1401 | ||
1402 | ||
1403 | fhDeltaPhiChargedPt = new TH2F | |
1404 | ("hDeltaPhiChargedPt","#phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}", | |
1405 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1406 | fhDeltaPhiChargedPt->SetYTitle("#Delta #phi (rad)"); | |
1407 | fhDeltaPhiChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1408 | ||
c8ad7ead | 1409 | fhDeltaEtaCharged = new TH2F |
1410 | ("hDeltaEtaCharged","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}", | |
1411 | nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax); | |
1412 | fhDeltaEtaCharged->SetYTitle("#Delta #eta"); | |
1413 | fhDeltaEtaCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1414 | ||
1415 | fhDeltaEtaChargedPtA3GeV = new TH2F | |
1416 | ("hDeltaEtaChargedPtA3GeV","#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}", | |
1417 | nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax); | |
1418 | fhDeltaEtaChargedPtA3GeV->SetYTitle("#Delta #eta"); | |
1419 | fhDeltaEtaChargedPtA3GeV->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1420 | ||
1421 | fhXECharged = | |
1422 | new TH2F("hXECharged","#it{x}_{#it{E}} for charged tracks", | |
7aaa6c97 | 1423 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1424 | fhXECharged->SetYTitle("#it{x}_{#it{E}}"); |
1425 | fhXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1426 | ||
1427 | fhXECharged_Cone2 = | |
1428 | new TH2F("hXECharged_Cone2","#it{x}_{#it{E}} for charged tracks in cone 2 (5#pi/6-7#pi/6)", | |
7aaa6c97 | 1429 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1430 | fhXECharged_Cone2->SetYTitle("#it{x}_{#it{E}}"); |
1431 | fhXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1432 | ||
c8ad7ead | 1433 | fhXEPosCharged = |
1434 | new TH2F("hXEPositiveCharged","#it{x}_{#it{E}} for positive charged tracks", | |
7aaa6c97 | 1435 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1436 | fhXEPosCharged->SetYTitle("#it{x}_{#it{E}}"); |
1437 | fhXEPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1438 | ||
1439 | fhXENegCharged = | |
1440 | new TH2F("hXENegativeCharged","#it{x}_{#it{E}} for negative charged tracks", | |
7aaa6c97 | 1441 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1442 | fhXENegCharged->SetYTitle("#it{x}_{#it{E}}"); |
1443 | fhXENegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1444 | ||
1445 | fhPtHbpXECharged = | |
1446 | new TH2F("hHbpXECharged","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons", | |
7aaa6c97 | 1447 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
c8ad7ead | 1448 | fhPtHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
1449 | fhPtHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1450 | ||
1451 | fhPtHbpXECharged_Cone2 = | |
1452 | new TH2F("hHbpXECharged_Cone2","#xi = ln(1/#it{x}_{#it{E}}) with charged hadrons in cone 2 (5#pi/6-7#pi/6)", | |
7aaa6c97 | 1453 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
c8ad7ead | 1454 | fhPtHbpXECharged_Cone2->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
1455 | fhPtHbpXECharged_Cone2->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1456 | ||
c8ad7ead | 1457 | fhZTCharged = |
1458 | new TH2F("hZTCharged","#it{z}_{T} for charged tracks", | |
7aaa6c97 | 1459 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1460 | fhZTCharged->SetYTitle("#it{z}_{T}"); |
1461 | fhZTCharged->SetXTitle("#it{p}_{T trigger}"); | |
1462 | ||
c8ad7ead | 1463 | fhZTPosCharged = |
1464 | new TH2F("hZTPositiveCharged","#it{z}_{T} for positive charged tracks", | |
7aaa6c97 | 1465 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1466 | fhZTPosCharged->SetYTitle("#it{z}_{T}"); |
1467 | fhZTPosCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1468 | ||
1469 | fhZTNegCharged = | |
1470 | new TH2F("hZTNegativeCharged","#it{z}_{T} for negative charged tracks", | |
7aaa6c97 | 1471 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1472 | fhZTNegCharged->SetYTitle("#it{z}_{T}"); |
1473 | fhZTNegCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1474 | ||
1475 | fhPtHbpZTCharged = | |
1476 | new TH2F("hHbpZTCharged","#xi = ln(1/#it{z}_{T}) with charged hadrons", | |
7aaa6c97 | 1477 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
c8ad7ead | 1478 | fhPtHbpZTCharged->SetYTitle("ln(1/#it{z}_{T})"); |
1479 | fhPtHbpZTCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1480 | ||
c8ad7ead | 1481 | fhPtTrigPout = |
1482 | new TH2F("hPtTrigPout","Pout with triggers", | |
441f378e | 1483 | nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.); |
c8ad7ead | 1484 | fhPtTrigPout->SetYTitle("#it{p}_{out} (GeV/#it{c})"); |
1485 | fhPtTrigPout->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1486 | ||
1487 | fhPtTrigCharged = | |
1488 | new TH2F("hPtTrigCharged","trigger and charged tracks pt distribution", | |
1489 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
1490 | fhPtTrigCharged->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1491 | fhPtTrigCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1492 | ||
1493 | outputContainer->Add(fhDeltaPhiDeltaEtaCharged); | |
1494 | outputContainer->Add(fhDeltaPhiDeltaEtaChargedPtA3GeV); | |
1495 | outputContainer->Add(fhPhiCharged) ; | |
1496 | outputContainer->Add(fhEtaCharged) ; | |
1497 | outputContainer->Add(fhDeltaPhiCharged) ; | |
1498 | outputContainer->Add(fhDeltaPhiChargedPtA3GeV) ; | |
1499 | outputContainer->Add(fhDeltaEtaCharged) ; | |
1500 | outputContainer->Add(fhDeltaEtaChargedPtA3GeV) ; | |
1501 | outputContainer->Add(fhDeltaPhiChargedPt) ; | |
c8ad7ead | 1502 | |
1503 | outputContainer->Add(fhXECharged) ; | |
1504 | outputContainer->Add(fhXECharged_Cone2) ; | |
6ed1ad3e | 1505 | |
c8ad7ead | 1506 | if(IsDataMC()) |
547c2f01 | 1507 | { |
c8ad7ead | 1508 | for(Int_t i=0; i < 7; i++) |
1509 | { | |
1510 | ||
1511 | fhDeltaPhiChargedMC[i] = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()), | |
1512 | Form("#Delta #phi for charged tracks, trigger origin is %s",nameMC[i].Data()), | |
1513 | nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax); | |
1514 | fhDeltaPhiChargedMC[i]->SetYTitle("#it{x}_{#it{E}}"); | |
1515 | fhDeltaPhiChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1516 | outputContainer->Add(fhDeltaPhiChargedMC[i]) ; | |
1517 | ||
1518 | fhXEChargedMC[i] = new TH2F(Form("hXECharged_MC%s",nameMC[i].Data()), | |
1519 | Form("#it{x}_{#it{E}} for charged tracks, trigger origin is %s",nameMC[i].Data()), | |
7aaa6c97 | 1520 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1521 | fhXEChargedMC[i]->SetYTitle("#it{x}_{#it{E}}"); |
1522 | fhXEChargedMC[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1523 | outputContainer->Add(fhXEChargedMC[i]) ; | |
1524 | } | |
1525 | } | |
1526 | ||
1527 | outputContainer->Add(fhXEPosCharged) ; | |
1528 | outputContainer->Add(fhXENegCharged) ; | |
c8ad7ead | 1529 | outputContainer->Add(fhPtHbpXECharged) ; |
1530 | outputContainer->Add(fhPtHbpXECharged_Cone2) ; | |
c8ad7ead | 1531 | |
1532 | outputContainer->Add(fhZTCharged) ; | |
1533 | outputContainer->Add(fhZTPosCharged) ; | |
1534 | outputContainer->Add(fhZTNegCharged) ; | |
c8ad7ead | 1535 | outputContainer->Add(fhPtHbpZTCharged) ; |
c8ad7ead | 1536 | |
1537 | outputContainer->Add(fhPtTrigPout) ; | |
1538 | outputContainer->Add(fhPtTrigCharged) ; | |
1539 | ||
6ed1ad3e | 1540 | TString right = ""; |
1541 | if(fMakeSeveralUE) right = "Right"; | |
1542 | ||
1543 | fhUePart = new TH1F("hUePart","UE particles distribution vs pt trig", | |
1544 | nptbins,ptmin,ptmax); | |
1545 | fhUePart->SetYTitle("dNch"); | |
1546 | fhUePart->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1547 | ||
1548 | fhDeltaPhiUeChargedPt = new TH2F | |
1549 | (Form("hDeltaPhiUe%sChargedPt",right.Data()),"#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}}", | |
1550 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1551 | fhDeltaPhiUeChargedPt->SetYTitle("#Delta #phi (rad)"); | |
1552 | fhDeltaPhiUeChargedPt->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1553 | ||
1554 | fhXEUeCharged = | |
1555 | new TH2F(Form("hXEUeCharged%s",right.Data()),"#it{x}_{#it{E}} for Underlying Event", | |
7aaa6c97 | 1556 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 1557 | fhXEUeCharged->SetYTitle("#it{x}_{#it{E}}"); |
1558 | fhXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1559 | ||
1560 | fhPtHbpXEUeCharged = | |
1561 | new TH2F(Form("hHbpXEUeCharged%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for Underlying Event", | |
7aaa6c97 | 1562 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
6ed1ad3e | 1563 | fhPtHbpXEUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
1564 | fhPtHbpXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1565 | ||
1566 | fhZTUeCharged = | |
1567 | new TH2F(Form("hZTUeCharged%s",right.Data()),"#it{z}_{T} for Underlying Event", | |
7aaa6c97 | 1568 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 1569 | fhZTUeCharged->SetYTitle("#it{z}_{T}"); |
1570 | fhZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1571 | ||
1572 | fhPtHbpZTUeCharged = | |
1573 | new TH2F(Form("hHbpZTUeCharged%s",right.Data()),"#xi = ln(1/#it{z}_{T}) for Underlying Event", | |
7aaa6c97 | 1574 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
6ed1ad3e | 1575 | fhPtHbpZTUeCharged->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
1576 | fhPtHbpZTUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1577 | ||
1578 | outputContainer->Add(fhUePart); | |
1579 | outputContainer->Add(fhDeltaPhiUeChargedPt) ; | |
1580 | outputContainer->Add(fhXEUeCharged) ; | |
1581 | outputContainer->Add(fhPtHbpXEUeCharged) ; | |
1582 | outputContainer->Add(fhZTUeCharged) ; | |
1583 | outputContainer->Add(fhPtHbpZTUeCharged) ; | |
1584 | ||
1585 | if(fMakeSeveralUE) | |
1586 | { | |
1587 | fhDeltaPhiUeLeftCharged = new TH2F | |
1588 | ("hDeltaPhiUeLeftChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left side range of trigger particles", | |
1589 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1590 | fhDeltaPhiUeLeftCharged->SetYTitle("#Delta #phi (rad)"); | |
1591 | fhDeltaPhiUeLeftCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1592 | outputContainer->Add(fhDeltaPhiUeLeftCharged) ; | |
1593 | ||
1594 | fhDeltaPhiUeLeftUpCharged = new TH2F | |
1595 | ("hDeltaPhiUeLeftUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Up side range of trigger particles", | |
1596 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1597 | fhDeltaPhiUeLeftUpCharged->SetYTitle("#Delta #phi (rad)"); | |
1598 | fhDeltaPhiUeLeftUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1599 | outputContainer->Add(fhDeltaPhiUeLeftUpCharged) ; | |
1600 | ||
1601 | fhDeltaPhiUeRightUpCharged = new TH2F | |
1602 | ("hDeltaPhiUeRightUpChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Up side range of trigger particles", | |
1603 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1604 | fhDeltaPhiUeRightUpCharged->SetYTitle("#Delta #phi (rad)"); | |
1605 | fhDeltaPhiUeRightUpCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1606 | outputContainer->Add(fhDeltaPhiUeRightUpCharged) ; | |
1607 | ||
1608 | fhDeltaPhiUeLeftDownCharged = new TH2F | |
1609 | ("hDeltaPhiUeLeftDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE left Down side range of trigger particles", | |
1610 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1611 | fhDeltaPhiUeLeftDownCharged->SetYTitle("#Delta #phi (rad)"); | |
1612 | fhDeltaPhiUeLeftDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1613 | outputContainer->Add(fhDeltaPhiUeLeftDownCharged) ; | |
1614 | ||
1615 | fhDeltaPhiUeRightDownCharged = new TH2F | |
1616 | ("hDeltaPhiUeRightDownChargedPt","#phi_{trigger} - #phi_{#Ueh^{#pm}} vs #it{p}_{T Ueh^{#pm}} with UE right Down side range of trigger particles", | |
1617 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1618 | fhDeltaPhiUeRightDownCharged->SetYTitle("#Delta #phi (rad)"); | |
1619 | fhDeltaPhiUeRightDownCharged->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1620 | outputContainer->Add(fhDeltaPhiUeRightDownCharged) ; | |
1621 | ||
1622 | fhXEUeLeftCharged = | |
1623 | new TH2F("hXEUeChargedLeft","#it{x}_{#it{E}} with UE left side of trigger", | |
7aaa6c97 | 1624 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 1625 | fhXEUeLeftCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}"); |
1626 | fhXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1627 | outputContainer->Add(fhXEUeLeftCharged) ; | |
1628 | ||
1629 | fhXEUeLeftUpCharged = | |
1630 | new TH2F("hXEUeChargedLeftUp","#it{x}_{#it{E}} with UE left Up side of trigger", | |
7aaa6c97 | 1631 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 1632 | fhXEUeLeftUpCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}"); |
1633 | fhXEUeLeftUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1634 | outputContainer->Add(fhXEUeLeftUpCharged) ; | |
1635 | ||
1636 | fhXEUeRightUpCharged = | |
1637 | new TH2F("hXEUeChargedRightUp","#it{x}_{#it{E} h^{#pm}} with UE right Up side of trigger", | |
7aaa6c97 | 1638 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 1639 | fhXEUeRightUpCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}"); |
1640 | fhXEUeRightUpCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1641 | outputContainer->Add(fhXEUeRightUpCharged) ; | |
1642 | ||
1643 | fhXEUeLeftDownCharged = | |
1644 | new TH2F("hXEUeChargedLeftDown","#it{x}_{#it{E}} with UE left Down side of trigger", | |
7aaa6c97 | 1645 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 1646 | fhXEUeLeftDownCharged->SetYTitle("#it{x}_{#it{E} Ueh^{#pm}}"); |
1647 | fhXEUeLeftDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1648 | outputContainer->Add(fhXEUeLeftDownCharged) ; | |
1649 | ||
1650 | fhXEUeRightDownCharged = | |
1651 | new TH2F("hXEUeChargedRightDown","#it{x}_{#it{E} h^{#pm}} with UE right Down side of trigger", | |
7aaa6c97 | 1652 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 1653 | fhXEUeRightDownCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}"); |
1654 | fhXEUeRightDownCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1655 | outputContainer->Add(fhXEUeRightDownCharged) ; | |
1656 | ||
1657 | fhPtHbpXEUeLeftCharged = | |
1658 | new TH2F("hHbpXEUeChargedLeft","#xi = ln(1/#it{x}_{#it{E}}) with charged UE left side of trigger", | |
7aaa6c97 | 1659 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
6ed1ad3e | 1660 | fhPtHbpXEUeLeftCharged->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
1661 | fhPtHbpXEUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1662 | outputContainer->Add(fhPtHbpXEUeLeftCharged) ; | |
1663 | ||
1664 | fhZTUeLeftCharged = | |
1665 | new TH2F("hZTUeChargedLeft","#it{z}_{trigger h^{#pm}} = #it{p}_{T Ueh^{#pm}} / #it{p}_{T trigger} with UE left side of trigger", | |
7aaa6c97 | 1666 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 1667 | fhZTUeLeftCharged->SetYTitle("#it{z}_{trigger Ueh^{#pm}}"); |
1668 | fhZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1669 | outputContainer->Add(fhZTUeLeftCharged) ; | |
1670 | ||
1671 | fhPtHbpZTUeLeftCharged = | |
1672 | new TH2F("hHbpZTUeChargedLeft","#xi = ln(1/#it{z}_{T}) with charged UE left side of trigger", | |
7aaa6c97 | 1673 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
6ed1ad3e | 1674 | fhPtHbpZTUeLeftCharged->SetYTitle("ln(1/#it{z}_{T})"); |
1675 | fhPtHbpZTUeLeftCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1676 | outputContainer->Add(fhPtHbpZTUeLeftCharged) ; | |
1677 | } | |
1678 | ||
c8ad7ead | 1679 | if(fFillPileUpHistograms) |
1680 | { | |
1681 | fhDeltaPhiChargedOtherBC = new TH2F | |
1682 | ("hDeltaPhiChargedOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC!=0", | |
62f2fe4d | 1683 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
c8ad7ead | 1684 | fhDeltaPhiChargedOtherBC->SetYTitle("#Delta #phi (rad)"); |
1685 | fhDeltaPhiChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
e09cf5ef | 1686 | |
c8ad7ead | 1687 | fhDeltaPhiChargedPtA3GeVOtherBC = new TH2F |
1688 | ("hDeltaPhiChargedPtA3GeVOtherBC","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC!=0", | |
b1f720a7 | 1689 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
c8ad7ead | 1690 | fhDeltaPhiChargedPtA3GeVOtherBC->SetYTitle("#Delta #phi (rad)"); |
1691 | fhDeltaPhiChargedPtA3GeVOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
b1f720a7 | 1692 | |
c8ad7ead | 1693 | fhPtTrigChargedOtherBC = |
1694 | new TH2F("hPtTrigChargedOtherBC","trigger and charged tracks pt distribution, track BC!=0", | |
1695 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
1696 | fhPtTrigChargedOtherBC->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1697 | fhPtTrigChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1698 | ||
1699 | fhXEChargedOtherBC = | |
1700 | new TH2F("hXEChargedOtherBC","#it{x}_{#it{E}} for charged tracks, track BC!=0", | |
7aaa6c97 | 1701 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1702 | fhXEChargedOtherBC->SetYTitle("#it{x}_{#it{E}}"); |
1703 | fhXEChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1704 | ||
1705 | fhXEUeChargedOtherBC = | |
1706 | new TH2F("hXEUeChargedOtherBC","#it{x}_{#it{E}} for Underlying Event, track BC!=0", | |
7aaa6c97 | 1707 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1708 | fhXEUeChargedOtherBC->SetYTitle("#it{x}_{#it{E}}"); |
1709 | fhXEUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1710 | ||
1711 | fhZTChargedOtherBC = | |
1712 | new TH2F("hZTChargedOtherBC","#it{z}_{T} for charged tracks, track BC!=0", | |
7aaa6c97 | 1713 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1714 | fhZTChargedOtherBC->SetYTitle("#it{z}_{T}"); |
1715 | fhZTChargedOtherBC->SetXTitle("#it{p}_{T trigger}"); | |
1716 | ||
1717 | fhZTUeChargedOtherBC = | |
1718 | new TH2F("hZTUeChargedOtherBC","#it{z}_{T} for Underlying Event, track BC!=0", | |
7aaa6c97 | 1719 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1720 | fhZTUeChargedOtherBC->SetYTitle("#it{z}_{T}"); |
1721 | fhZTUeChargedOtherBC->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1722 | ||
1723 | outputContainer->Add(fhDeltaPhiChargedOtherBC) ; | |
1724 | outputContainer->Add(fhDeltaPhiChargedPtA3GeVOtherBC) ; | |
1725 | outputContainer->Add(fhXEChargedOtherBC) ; | |
1726 | outputContainer->Add(fhXEUeChargedOtherBC) ; | |
1727 | outputContainer->Add(fhZTChargedOtherBC) ; | |
1728 | outputContainer->Add(fhZTUeChargedOtherBC) ; | |
1729 | outputContainer->Add(fhPtTrigChargedOtherBC) ; | |
1730 | ||
1731 | fhDeltaPhiChargedBC0 = new TH2F | |
1732 | ("hDeltaPhiChargedBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0", | |
62f2fe4d | 1733 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
c8ad7ead | 1734 | fhDeltaPhiChargedBC0->SetYTitle("#Delta #phi (rad)"); |
1735 | fhDeltaPhiChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
e09cf5ef | 1736 | |
c8ad7ead | 1737 | fhDeltaPhiChargedPtA3GeVBC0 = new TH2F |
1738 | ("hDeltaPhiChargedPtA3GeVBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0", | |
62f2fe4d | 1739 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
c8ad7ead | 1740 | fhDeltaPhiChargedPtA3GeVBC0->SetYTitle("#Delta #phi (rad)"); |
1741 | fhDeltaPhiChargedPtA3GeVBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1742 | ||
1743 | fhPtTrigChargedBC0 = | |
1744 | new TH2F("hPtTrigChargedBC0","trigger and charged tracks pt distribution, track BC==0", | |
1745 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
1746 | fhPtTrigChargedBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1747 | fhPtTrigChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1748 | ||
1749 | fhXEChargedBC0 = | |
1750 | new TH2F("hXEChargedBC0","#it{x}_{#it{E}} for charged tracks, track BC==0", | |
7aaa6c97 | 1751 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1752 | fhXEChargedBC0->SetYTitle("#it{x}_{#it{E}}"); |
1753 | fhXEChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1754 | ||
1755 | fhXEUeChargedBC0 = | |
1756 | new TH2F("hXEUeChargedBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0", | |
7aaa6c97 | 1757 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1758 | fhXEUeChargedBC0->SetYTitle("#it{x}_{#it{E}}"); |
1759 | fhXEUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1760 | ||
1761 | fhZTChargedBC0 = | |
1762 | new TH2F("hZTChargedBC0","#it{z}_{T} for charged tracks, track BC==0", | |
7aaa6c97 | 1763 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1764 | fhZTChargedBC0->SetYTitle("#it{z}_{T}"); |
1765 | fhZTChargedBC0->SetXTitle("#it{p}_{T trigger}"); | |
1766 | ||
1767 | fhZTUeChargedBC0 = | |
1768 | new TH2F("hZTUeChargedBC0","#it{z}_{T} for Underlying Event, track BC==0", | |
7aaa6c97 | 1769 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1770 | fhZTUeChargedBC0->SetYTitle("#it{z}_{T}"); |
1771 | fhZTUeChargedBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1772 | ||
1773 | outputContainer->Add(fhDeltaPhiChargedBC0) ; | |
1774 | outputContainer->Add(fhDeltaPhiChargedPtA3GeVBC0) ; | |
1775 | outputContainer->Add(fhXEChargedBC0) ; | |
1776 | outputContainer->Add(fhXEUeChargedBC0) ; | |
1777 | outputContainer->Add(fhZTChargedBC0) ; | |
1778 | outputContainer->Add(fhZTUeChargedBC0) ; | |
1779 | outputContainer->Add(fhPtTrigChargedBC0) ; | |
1780 | ||
55c20a99 | 1781 | fhPtTriggerVtxBC0 = new TH1F("hPtTriggerVtxBC0","#it{p}_{T} distribution of trigger particles", nptbins,ptmin,ptmax); |
1782 | fhPtTriggerVtxBC0->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
c8ad7ead | 1783 | |
1784 | fhDeltaPhiChargedVtxBC0 = new TH2F | |
1785 | ("hDeltaPhiChargedVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, track BC==0", | |
1786 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1787 | fhDeltaPhiChargedVtxBC0->SetYTitle("#Delta #phi (rad)"); | |
1788 | fhDeltaPhiChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1789 | ||
1790 | fhDeltaPhiChargedPtA3GeVVtxBC0 = new TH2F | |
1791 | ("hDeltaPhiChargedPtA3GeVVtxBC0","#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, track BC==0", | |
1792 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1793 | fhDeltaPhiChargedPtA3GeVVtxBC0->SetYTitle("#Delta #phi (rad)"); | |
1794 | fhDeltaPhiChargedPtA3GeVVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
3f150b4b | 1795 | |
c8ad7ead | 1796 | fhPtTrigChargedVtxBC0 = |
1797 | new TH2F("hPtTrigChargedVtxBC0","trigger and charged tracks pt distribution, track BC==0", | |
1798 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
1799 | fhPtTrigChargedVtxBC0->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1800 | fhPtTrigChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1801 | ||
1802 | fhXEChargedVtxBC0 = | |
1803 | new TH2F("hXEChargedVtxBC0","#it{x}_{#it{E}} for charged tracks, track BC==0", | |
7aaa6c97 | 1804 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1805 | fhXEChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}"); |
1806 | fhXEChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1807 | ||
1808 | fhXEUeChargedVtxBC0 = | |
1809 | new TH2F("hXEUeChargedVtxBC0","#it{x}_{#it{E}} for Underlying Event, track BC==0", | |
7aaa6c97 | 1810 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1811 | fhXEUeChargedVtxBC0->SetYTitle("#it{x}_{#it{E}}"); |
1812 | fhXEUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
e09cf5ef | 1813 | |
c8ad7ead | 1814 | fhZTChargedVtxBC0 = |
1815 | new TH2F("hZTChargedVtxBC0","#it{z}_{T} for charged tracks, track BC==0", | |
7aaa6c97 | 1816 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1817 | fhZTChargedVtxBC0->SetYTitle("#it{z}_{T}"); |
1818 | fhZTChargedVtxBC0->SetXTitle("#it{p}_{T trigger}"); | |
1819 | ||
1820 | fhZTUeChargedVtxBC0 = | |
1821 | new TH2F("hZTUeChargedVtxBC0","#it{z}_{T} for Underlying Event, track BC==0", | |
7aaa6c97 | 1822 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1823 | fhZTUeChargedVtxBC0->SetYTitle("#it{z}_{T}"); |
1824 | fhZTUeChargedVtxBC0->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1825 | ||
55c20a99 | 1826 | outputContainer->Add(fhPtTriggerVtxBC0); |
c8ad7ead | 1827 | outputContainer->Add(fhDeltaPhiChargedVtxBC0) ; |
1828 | outputContainer->Add(fhDeltaPhiChargedPtA3GeVVtxBC0) ; | |
1829 | outputContainer->Add(fhXEChargedVtxBC0) ; | |
1830 | outputContainer->Add(fhXEUeChargedVtxBC0) ; | |
1831 | outputContainer->Add(fhZTChargedVtxBC0) ; | |
1832 | outputContainer->Add(fhZTUeChargedVtxBC0) ; | |
1833 | outputContainer->Add(fhPtTrigChargedVtxBC0) ; | |
1834 | ||
1835 | for(Int_t i = 0 ; i < 7 ; i++) | |
b1f720a7 | 1836 | { |
55c20a99 | 1837 | fhPtTriggerPileUp[i] = new TH1F(Form("hPtTriggerPileUp%s",pileUpName[i].Data()), |
1838 | Form("#it{p}_{T} distribution of trigger particles, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax); | |
1839 | fhPtTriggerPileUp[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
1840 | outputContainer->Add(fhPtTriggerPileUp[i]); | |
c8ad7ead | 1841 | |
1842 | fhDeltaPhiChargedPileUp[i] = new TH2F(Form("hDeltaPhiChargedPileUp%s",pileUpName[i].Data()), | |
1843 | Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()), | |
1844 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1845 | fhDeltaPhiChargedPileUp[i]->SetYTitle("#Delta #phi (rad)"); | |
1846 | fhDeltaPhiChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1847 | outputContainer->Add(fhDeltaPhiChargedPileUp[i]) ; | |
1848 | ||
1849 | fhDeltaPhiChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaPhiChargedPtA3GeVPileUp%s",pileUpName[i].Data()), | |
1850 | Form("#phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, %s Pile-Up event",pileUpName[i].Data()), | |
1851 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1852 | fhDeltaPhiChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #phi (rad)"); | |
1853 | fhDeltaPhiChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1854 | outputContainer->Add(fhDeltaPhiChargedPtA3GeVPileUp[i]) ; | |
1855 | ||
1856 | fhDeltaEtaChargedPileUp[i] = new TH2F(Form("hDeltaEtaChargedPileUp%s",pileUpName[i].Data()), | |
1857 | Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, %s Pile-Up event",pileUpName[i].Data()), | |
1858 | nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax); | |
1859 | fhDeltaEtaChargedPileUp[i]->SetYTitle("#Delta #eta"); | |
1860 | fhDeltaEtaChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1861 | outputContainer->Add(fhDeltaEtaChargedPileUp[i]) ; | |
1862 | ||
1863 | fhDeltaEtaChargedPtA3GeVPileUp[i] = new TH2F(Form("hDeltaEtaChargedPtA3GeVPileUp%s",pileUpName[i].Data()), | |
1864 | Form("#eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger}, #it{p}_{TA}>3 GeV/#it{c}, %s Pile-Up event",pileUpName[i].Data()), | |
1865 | nptbins,ptmin,ptmax,ndeltaetabins,deltaetamin,deltaetamax); | |
1866 | fhDeltaEtaChargedPtA3GeVPileUp[i]->SetYTitle("#Delta #eta"); | |
1867 | fhDeltaEtaChargedPtA3GeVPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1868 | outputContainer->Add(fhDeltaEtaChargedPtA3GeVPileUp[i]) ; | |
1869 | ||
1870 | fhXEChargedPileUp[i] = new TH2F(Form("hXEChargedPileUp%s",pileUpName[i].Data()), | |
1871 | Form("#it{x}_{#it{E}} for charged tracks, %s Pile-Up event",pileUpName[i].Data()), | |
7aaa6c97 | 1872 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1873 | fhXEChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}"); |
1874 | fhXEChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1875 | outputContainer->Add(fhXEChargedPileUp[i]) ; | |
1876 | ||
1877 | fhXEUeChargedPileUp[i] = new TH2F(Form("hXEUeChargedPileUp%s",pileUpName[i].Data()), | |
1878 | Form("#it{x}_{#it{E}} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()), | |
7aaa6c97 | 1879 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1880 | fhXEUeChargedPileUp[i]->SetYTitle("#it{x}_{#it{E}}"); |
1881 | fhXEUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1882 | outputContainer->Add(fhXEUeChargedPileUp[i]) ; | |
1883 | ||
1884 | fhZTChargedPileUp[i] = new TH2F(Form("hZTChargedPileUp%s",pileUpName[i].Data()), | |
1885 | Form("#it{z}_{T} for charged tracks, %s Pile-Up event",pileUpName[i].Data()), | |
7aaa6c97 | 1886 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1887 | fhZTChargedPileUp[i]->SetYTitle("#it{z}_{T}"); |
1888 | fhZTChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1889 | outputContainer->Add(fhZTChargedPileUp[i]) ; | |
1890 | ||
1891 | fhZTUeChargedPileUp[i] = new TH2F(Form("hZTUeChargedPileUp%s",pileUpName[i].Data()), | |
1892 | Form("#it{z}_{T} for Underlying Event, %s Pile-Up event",pileUpName[i].Data()), | |
7aaa6c97 | 1893 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
c8ad7ead | 1894 | fhZTUeChargedPileUp[i]->SetYTitle("#it{z}_{T}"); |
1895 | fhZTUeChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1896 | outputContainer->Add(fhZTUeChargedPileUp[i]) ; | |
1897 | ||
1898 | fhPtTrigChargedPileUp[i] = new TH2F(Form("hPtTrigChargedPileUp%s",pileUpName[i].Data()), | |
1899 | Form("trigger and charged tracks pt distribution, %s Pile-Up event",pileUpName[i].Data()), | |
1900 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
1901 | fhPtTrigChargedPileUp[i]->SetYTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
1902 | fhPtTrigChargedPileUp[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1903 | outputContainer->Add(fhPtTrigChargedPileUp[i]) ; | |
2a9171b5 | 1904 | |
c8ad7ead | 1905 | } |
1906 | } | |
a22f3f34 | 1907 | |
d4a8ff9a | 1908 | if(fFillHighMultHistograms) |
c8ad7ead | 1909 | { |
d4a8ff9a | 1910 | Int_t nMultiBins = GetNCentrBin(); |
1911 | fhDeltaPhiChargedMult = new TH2F*[nMultiBins] ; | |
1912 | fhDeltaEtaChargedMult = new TH2F*[nMultiBins] ; | |
1913 | fhXEMult = new TH2F*[nMultiBins] ; | |
1914 | fhXEUeMult = new TH2F*[nMultiBins] ; | |
1915 | fhZTMult = new TH2F*[nMultiBins] ; | |
1916 | fhZTUeMult = new TH2F*[nMultiBins] ; | |
c8ad7ead | 1917 | |
1918 | for(Int_t im=0; im<nMultiBins; im++) | |
1919 | { | |
d4a8ff9a | 1920 | fhDeltaPhiChargedMult[im] = new TH2F |
1921 | (Form("hDeltaPhiCharged_Mult%d",im),Form("#Delta #phi charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
1922 | fhDeltaPhiChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1923 | fhDeltaPhiChargedMult[im]->SetYTitle("#Delta #phi (rad)"); | |
c8ad7ead | 1924 | |
d4a8ff9a | 1925 | fhDeltaEtaChargedMult[im] = new TH2F |
1926 | (Form("hDeltaEtaCharged_Mult%d",im),Form("#Delta #eta charged Mult bin %d",im), nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax); | |
1927 | fhDeltaEtaChargedMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1928 | fhDeltaEtaChargedMult[im]->SetYTitle("#Delta #eta"); | |
c8ad7ead | 1929 | |
d4a8ff9a | 1930 | fhXEMult[im] = new TH2F |
7aaa6c97 | 1931 | (Form("hXECharged_Mult%d",im),Form("#it{x}_{E} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
d4a8ff9a | 1932 | fhXEMult[im]->SetYTitle("#it{x}_{E}"); |
1933 | fhXEMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
c8ad7ead | 1934 | |
d4a8ff9a | 1935 | fhXEUeMult[im] = new TH2F |
7aaa6c97 | 1936 | (Form("hXEUeCharged_Mult%d",im),Form("#it{x}_{E} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
d4a8ff9a | 1937 | fhXEUeMult[im]->SetYTitle("#it{x}_{E}"); |
1938 | fhXEUeMult[im]->SetXTitle("#it{p}_{T trigger}(GeV/#it{c})"); | |
c8ad7ead | 1939 | |
d4a8ff9a | 1940 | fhZTMult[im] = new TH2F |
7aaa6c97 | 1941 | (Form("hZTCharged_Mult%d",im),Form("#it{z}_{T} charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
d4a8ff9a | 1942 | fhZTMult[im]->SetYTitle("#it{z}_{T}"); |
1943 | fhZTMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
c8ad7ead | 1944 | |
d4a8ff9a | 1945 | fhZTUeMult[im] = new TH2F |
7aaa6c97 | 1946 | (Form("hZTUeCharged_Mult%d",im),Form("#it{z}_{T} UE charged Mult bin %d",im), nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
d4a8ff9a | 1947 | fhZTUeMult[im]->SetYTitle("#it{z}_{T}"); |
1948 | fhZTUeMult[im]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
c8ad7ead | 1949 | |
d4a8ff9a | 1950 | outputContainer->Add(fhDeltaPhiChargedMult[im]) ; |
1951 | outputContainer->Add(fhDeltaEtaChargedMult[im]) ; | |
1952 | outputContainer->Add(fhXEMult [im]); | |
1953 | outputContainer->Add(fhXEUeMult[im]); | |
1954 | outputContainer->Add(fhZTMult [im]); | |
1955 | outputContainer->Add(fhZTUeMult[im]); | |
c8ad7ead | 1956 | } |
1957 | } | |
1958 | ||
1959 | if(fFillBradHisto) | |
1960 | { | |
1961 | fhAssocPtBkg = new TH2F("hAssocPtBkg", " Trigger #it{p}_{T} vs associated hadron #it{p}_{T} from background", | |
1962 | nptbins, ptmin, ptmax,nptbins,ptmin,ptmax); | |
1963 | fhAssocPtBkg->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1964 | fhAssocPtBkg->SetYTitle("#it{p}_{T associated} (GeV/#it{c})"); | |
1965 | outputContainer->Add(fhAssocPtBkg) ; | |
1966 | ||
1967 | fhDeltaPhiBrad = new TH2F("hDeltaPhiBrad","atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} ", | |
1968 | nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0); | |
1969 | fhDeltaPhiBrad->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
1970 | fhDeltaPhiBrad->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi"); | |
1971 | outputContainer->Add(fhDeltaPhiBrad) ; | |
1972 | } | |
1973 | ||
1974 | fhDeltaPhiDeltaEtaAssocPtBin = new TH2F*[fNAssocPtBins*nz]; | |
1975 | fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz]; | |
1976 | fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz]; | |
1977 | fhDeltaPhiAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz]; | |
a22f3f34 | 1978 | if(fFillMomImbalancePtAssocBinsHisto) |
1979 | { | |
1980 | fhXEAssocPtBin = new TH2F*[fNAssocPtBins*nz]; | |
1981 | fhZTAssocPtBin = new TH2F*[fNAssocPtBins*nz]; | |
1982 | } | |
1983 | ||
1984 | if(fCorrelVzBin) | |
1985 | { | |
1986 | fhXEVZ = new TH2F*[nz]; | |
1987 | fhZTVZ = new TH2F*[nz]; | |
1988 | } | |
c8ad7ead | 1989 | |
1990 | if(fFillBradHisto) | |
1991 | fhDeltaPhiBradAssocPtBin = new TH2F*[fNAssocPtBins*nz]; | |
1992 | ||
e7d2373d | 1993 | |
1994 | fhDeltaPhiAssocPtBin = new TH2F*[fNAssocPtBins*nz]; | |
1995 | if(fFillEtaGapsHisto)fhDeltaPhiAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz]; | |
1996 | if(fDecayTrigger) fhDeltaPhiDecayChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz]; | |
1997 | ||
c8ad7ead | 1998 | |
1999 | if(fHMPIDCorrelation) | |
2000 | { | |
2001 | fhDeltaPhiAssocPtBinHMPID = new TH2F*[fNAssocPtBins*nz]; | |
2002 | fhDeltaPhiAssocPtBinHMPIDAcc= new TH2F*[fNAssocPtBins*nz]; | |
2003 | } | |
a22f3f34 | 2004 | |
c8ad7ead | 2005 | for(Int_t i = 0 ; i < fNAssocPtBins ; i++) |
2006 | { | |
2007 | for(Int_t z = 0 ; z < nz ; z++) | |
2008 | { | |
2009 | Int_t bin = i*nz+z; | |
2a9171b5 | 2010 | |
c8ad7ead | 2011 | if(fCorrelVzBin) |
2012 | { | |
2013 | sz = Form("_vz%d",z); | |
2014 | tz = Form(", #it{v}_{#it{z}} bin %d",z); | |
2015 | } | |
cc944149 | 2016 | |
c8ad7ead | 2017 | //printf("iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data()); |
cc944149 | 2018 | |
c8ad7ead | 2019 | fhDeltaPhiDeltaEtaAssocPtBin[bin] = new TH2F(Form("hDeltaPhiDeltaEtaPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), |
2020 | Form("#Delta #phi vs #Delta #eta for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2021 | ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins,deltaetamin,deltaetamax); | |
2022 | fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)"); | |
2023 | fhDeltaPhiDeltaEtaAssocPtBin[bin]->SetYTitle("#Delta #eta"); | |
cc944149 | 2024 | |
c8ad7ead | 2025 | fhDeltaPhiAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), |
2026 | Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2027 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2028 | fhDeltaPhiAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2029 | fhDeltaPhiAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)"); | |
cc944149 | 2030 | |
c8ad7ead | 2031 | outputContainer->Add(fhDeltaPhiDeltaEtaAssocPtBin[bin]) ; |
2032 | outputContainer->Add(fhDeltaPhiAssocPtBin[bin]) ; | |
a22f3f34 | 2033 | |
2034 | if(fFillEtaGapsHisto) | |
2035 | { | |
2036 | fhDeltaPhiAssocPtBinDEta08[bin] = new TH2F(Form("hDeltaPhiDeltaEta0.8PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), | |
2037 | Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta > 0.8", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2038 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2039 | fhDeltaPhiAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2040 | fhDeltaPhiAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)"); | |
2041 | ||
2042 | fhDeltaPhiAssocPtBinDEta0[bin] = new TH2F(Form("hDeltaPhiDeltaEta0PtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2043 | Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta = 0.", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2044 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2045 | fhDeltaPhiAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2046 | fhDeltaPhiAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)"); | |
2047 | ||
2048 | outputContainer->Add(fhDeltaPhiAssocPtBinDEta08[bin]) ; | |
2049 | outputContainer->Add(fhDeltaPhiAssocPtBinDEta0[bin]) ; | |
2050 | } | |
2a9171b5 | 2051 | |
e7d2373d | 2052 | if(fDecayTrigger) |
17af6e24 | 2053 | { |
e7d2373d | 2054 | fhDeltaPhiDecayChargedAssocPtBin[bin] = new TH2F(Form("hDeltaPhiPtDecayChargedAssocPt%2.1f_%2.1f%s_bit%d", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data(),fDecayBits[0]), |
2055 | Form("#Delta #phi vs #it{p}_{T trigger} tagged as decay for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, Bit %d", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data(),fDecayBits[0]), | |
c8ad7ead | 2056 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
2057 | fhDeltaPhiDecayChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2058 | fhDeltaPhiDecayChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)"); | |
17af6e24 | 2059 | |
c8ad7ead | 2060 | outputContainer->Add(fhDeltaPhiDecayChargedAssocPtBin[bin]) ; |
17af6e24 | 2061 | } |
3f150b4b | 2062 | |
c8ad7ead | 2063 | if(fFillBradHisto) |
3f150b4b | 2064 | { |
c8ad7ead | 2065 | fhDeltaPhiBradAssocPtBin[bin] = new TH2F(Form("hDeltaPhiBradPtAssocPt%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), |
2066 | Form("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2067 | nptbins, ptmin, ptmax,288, -1.0/3.0, 5.0/3.0); | |
2068 | fhDeltaPhiBradAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2069 | fhDeltaPhiBradAssocPtBin[bin]->SetYTitle("atan2(sin(#Delta #phi), cos(#Delta #phi))/#pi"); | |
2070 | outputContainer->Add(fhDeltaPhiBradAssocPtBin[bin]) ; | |
2071 | } | |
2072 | ||
2073 | if(fHMPIDCorrelation) | |
2074 | { | |
2075 | fhDeltaPhiAssocPtBinHMPID[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPID", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), | |
2076 | Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, with track having HMPID signal", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2077 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2078 | fhDeltaPhiAssocPtBinHMPID[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})" ); | |
2079 | fhDeltaPhiAssocPtBinHMPID[bin]->SetYTitle("#Delta #phi (rad)"); | |
3f150b4b | 2080 | |
c8ad7ead | 2081 | fhDeltaPhiAssocPtBinHMPIDAcc[bin] = new TH2F(Form("hDeltaPhiPtAssocPt%2.1f_%2.1f%sHMPIDAcc", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), |
2082 | Form("#Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, with track within 5<phi<20 deg", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2083 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2084 | fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2085 | fhDeltaPhiAssocPtBinHMPIDAcc[bin]->SetYTitle("#Delta #phi (rad)"); | |
3f150b4b | 2086 | |
6d9932e2 | 2087 | outputContainer->Add(fhDeltaPhiAssocPtBinHMPID [bin]) ; |
c8ad7ead | 2088 | outputContainer->Add(fhDeltaPhiAssocPtBinHMPIDAcc[bin]) ; |
045396c8 | 2089 | } |
2090 | } | |
c8ad7ead | 2091 | } |
2092 | ||
a22f3f34 | 2093 | if(fFillMomImbalancePtAssocBinsHisto) |
2094 | { | |
2095 | for(Int_t i = 0 ; i < fNAssocPtBins ; i++) | |
2096 | { | |
2097 | fhXEAssocPtBin[i] = new TH2F(Form("hXEAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]), | |
2098 | Form("#it{x}_{#it{E}} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]), | |
2099 | nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax); | |
2100 | fhXEAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2101 | fhXEAssocPtBin[i]->SetYTitle("#it{x}_{#it{E}}"); | |
2102 | ||
2103 | fhZTAssocPtBin[i] = new TH2F(Form("hZTAssocPtBin%1.f_%1.f", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]), | |
2104 | Form("#it{z}_{T} vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1]), | |
2105 | nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax); | |
2106 | fhZTAssocPtBin[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2107 | fhZTAssocPtBin[i]->SetYTitle("#it{z}_{T}"); | |
2108 | ||
2109 | ||
2110 | outputContainer->Add(fhXEAssocPtBin[i]); | |
2111 | outputContainer->Add(fhZTAssocPtBin[i]); | |
2112 | } | |
2113 | } | |
2114 | ||
2115 | if(fCorrelVzBin) | |
2116 | { | |
2117 | for(Int_t z = 0 ; z < nz ; z++) | |
2118 | { | |
2119 | sz = Form("_vz%d",z); | |
2120 | tz = Form(", #it{v}_{#it{z}} bin %d",z); | |
2121 | ||
2122 | fhXEVZ[z] = new TH2F(Form("hXE%s", sz.Data()), | |
2123 | Form("#it{x}_{#it{E}} vs #it{p}_{T trigger}%s", tz.Data()), | |
2124 | nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax); | |
2125 | fhXEVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2126 | fhXEVZ[z]->SetYTitle("#it{x}_{#it{E}}"); | |
2127 | ||
2128 | fhZTVZ[z] = new TH2F(Form("hZT%s",sz.Data()), | |
2129 | Form("#it{z}_{T} vs #it{p}_{T trigger}%s", tz.Data()), | |
2130 | nptbins, ptmin, ptmax,nxeztbins,xeztmin,xeztmax); | |
2131 | fhZTVZ[z]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2132 | fhZTVZ[z]->SetYTitle("#it{z}_{T}"); | |
2133 | ||
2134 | outputContainer->Add(fhXEVZ[z]); | |
2135 | outputContainer->Add(fhZTVZ[z]); | |
2136 | } | |
2137 | } | |
2138 | ||
e7d2373d | 2139 | |
2140 | if(fPi0Trigger) | |
c8ad7ead | 2141 | { |
e7d2373d | 2142 | fhPtPi0DecayRatio = new TH2F |
2143 | ("hPtPi0DecayRatio","#it{p}_{T} of #pi^{0} and the ratio of pt for two decay", | |
2144 | nptbins,ptmin,ptmax, 100,0.,2.); | |
2145 | fhPtPi0DecayRatio->SetXTitle("#it{p}_{T}^{#pi^{0}} (GeV/#it{c})"); | |
2146 | fhPtPi0DecayRatio->SetYTitle("#it{p}_{T}^{Decay}/#it{p}_{T}^{#pi^{0}}"); | |
2147 | outputContainer->Add(fhPtPi0DecayRatio) ; | |
3f150b4b | 2148 | |
e7d2373d | 2149 | fhDeltaPhiPi0DecayCharged = new TH2F |
2150 | ("hDeltaPhiPi0DecayCharged","#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}", | |
c8ad7ead | 2151 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
e7d2373d | 2152 | fhDeltaPhiPi0DecayCharged->SetYTitle("#Delta #phi (rad)"); |
2153 | fhDeltaPhiPi0DecayCharged->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})"); | |
907b38cd | 2154 | |
e7d2373d | 2155 | fhXEPi0DecayCharged = |
2156 | new TH2F("hXEPi0DecayCharged","#it{x}_{#it{E}} Decay", | |
7aaa6c97 | 2157 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
e7d2373d | 2158 | fhXEPi0DecayCharged->SetYTitle("#it{x}_{#it{E}}"); |
2159 | fhXEPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})"); | |
907b38cd | 2160 | |
e7d2373d | 2161 | fhZTPi0DecayCharged = |
2162 | new TH2F("hZTPi0DecayCharged","#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}", | |
7aaa6c97 | 2163 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
e7d2373d | 2164 | fhZTPi0DecayCharged->SetYTitle("#it{z}_{decay h^{#pm}}"); |
2165 | fhZTPi0DecayCharged->SetXTitle("#it{p}_{T decay} (GeV/#it{c})"); | |
045396c8 | 2166 | |
e7d2373d | 2167 | outputContainer->Add(fhDeltaPhiPi0DecayCharged) ; |
2168 | outputContainer->Add(fhXEPi0DecayCharged) ; | |
2169 | outputContainer->Add(fhZTPi0DecayCharged) ; | |
2170 | } | |
2171 | ||
2172 | if(fDecayTrigger) | |
2173 | { | |
2174 | for(Int_t ibit = 0; ibit< fNDecayBits; ibit++) | |
2175 | { | |
2176 | fhDeltaPhiDecayCharged[ibit] = new TH2F | |
2177 | (Form("hDeltaPhiDecayCharged_bit%d",fDecayBits[ibit]), | |
2178 | Form("#phi_{Decay} - #phi_{h^{#pm}} vs #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]), | |
2179 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2180 | fhDeltaPhiDecayCharged[ibit]->SetYTitle("#Delta #phi (rad)"); | |
2181 | fhDeltaPhiDecayCharged[ibit]->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})"); | |
2182 | ||
2183 | fhXEDecayCharged[ibit] = | |
2184 | new TH2F(Form("hXEDecayCharged_bit%d",fDecayBits[ibit]), | |
2185 | Form("#it{x}_{#it{E}} Decay, Bit %d",fDecayBits[ibit]), | |
2186 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); | |
2187 | fhXEDecayCharged[ibit]->SetYTitle("#it{x}_{#it{E}}"); | |
2188 | fhXEDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})"); | |
2189 | ||
2190 | fhZTDecayCharged[ibit] = | |
2191 | new TH2F(Form("hZTDecayCharged_bit%d",fDecayBits[ibit]), | |
2192 | Form("#it{z}_{trigger h^{#pm}} = #it{p}_{T h^{#pm}} / #it{p}_{T Decay}, Bit %d",fDecayBits[ibit]), | |
2193 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); | |
2194 | fhZTDecayCharged[ibit]->SetYTitle("#it{z}_{decay h^{#pm}}"); | |
2195 | fhZTDecayCharged[ibit]->SetXTitle("#it{p}_{T decay} (GeV/#it{c})"); | |
2196 | ||
2197 | outputContainer->Add(fhDeltaPhiDecayCharged[ibit]) ; | |
2198 | outputContainer->Add(fhXEDecayCharged[ibit]) ; | |
2199 | outputContainer->Add(fhZTDecayCharged[ibit]) ; | |
2200 | } | |
c8ad7ead | 2201 | } |
2202 | ||
6ed1ad3e | 2203 | //Correlation with neutral hadrons |
2204 | if(fNeutralCorr) | |
547c2f01 | 2205 | { |
e09cf5ef | 2206 | fhDeltaPhiDeltaEtaNeutral = new TH2F |
babcbc9d | 2207 | ("hDeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}", |
c8ad7ead | 2208 | ndeltaphibins ,deltaphimin,deltaphimax, ndeltaetabins ,deltaetamin,deltaetamax); |
2bb7ac98 | 2209 | fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi (rad)"); |
c8ad7ead | 2210 | fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta"); |
e09cf5ef | 2211 | |
2212 | fhPhiNeutral = new TH2F | |
858212dd | 2213 | ("hPhiNeutral","#phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}", |
2af40966 | 2214 | nptbins,ptmin,ptmax,180,0,TMath::TwoPi()); |
e09cf5ef | 2215 | fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)"); |
858212dd | 2216 | fhPhiNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})"); |
e09cf5ef | 2217 | |
2218 | fhEtaNeutral = new TH2F | |
858212dd | 2219 | ("hEtaNeutral","#eta_{#pi^{0}} vs #it{p}_{T #pi^{0}}", |
2af40966 | 2220 | nptbins,ptmin,ptmax,200,-1.,1.); |
e09cf5ef | 2221 | fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)"); |
858212dd | 2222 | fhEtaNeutral->SetXTitle("#it{p}_{T #pi^{0}} (GeV/#it{c})"); |
e09cf5ef | 2223 | |
2224 | fhDeltaPhiNeutral = new TH2F | |
858212dd | 2225 | ("hDeltaPhiNeutral","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T trigger}", |
2af40966 | 2226 | nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax); |
2bb7ac98 | 2227 | fhDeltaPhiNeutral->SetYTitle("#Delta #phi (rad)"); |
858212dd | 2228 | fhDeltaPhiNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); |
e09cf5ef | 2229 | |
2230 | fhDeltaPhiNeutralPt = new TH2F | |
858212dd | 2231 | ("hDeltaPhiNeutralPt","#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}", |
c8ad7ead | 2232 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
2bb7ac98 | 2233 | fhDeltaPhiNeutralPt->SetYTitle("#Delta #phi (rad)"); |
858212dd | 2234 | fhDeltaPhiNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})"); |
e09cf5ef | 2235 | |
e09cf5ef | 2236 | fhDeltaEtaNeutral = new TH2F |
858212dd | 2237 | ("hDeltaEtaNeutral","#eta_{trigger} - #eta_{#pi^{0}} vs #it{p}_{T trigger}", |
c8ad7ead | 2238 | nptbins,ptmin,ptmax, ndeltaetabins ,deltaetamin,deltaetamax); |
e09cf5ef | 2239 | fhDeltaEtaNeutral->SetYTitle("#Delta #eta"); |
858212dd | 2240 | fhDeltaEtaNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); |
e09cf5ef | 2241 | |
c8ad7ead | 2242 | fhXENeutral = |
858212dd | 2243 | new TH2F("hXENeutral","#it{x}_{#it{E}} for #pi^{0} associated", |
7aaa6c97 | 2244 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
858212dd | 2245 | fhXENeutral->SetYTitle("#it{x}_{#it{E}}"); |
2246 | fhXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
e09cf5ef | 2247 | |
c8ad7ead | 2248 | fhPtHbpXENeutral = |
858212dd | 2249 | new TH2F("hHbpXENeutral","#xi = ln(1/#it{x}_{#it{E}})for #pi^{0} associated", |
7aaa6c97 | 2250 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
858212dd | 2251 | fhPtHbpXENeutral->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
2252 | fhPtHbpXENeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
e09cf5ef | 2253 | |
c8ad7ead | 2254 | fhZTNeutral = |
858212dd | 2255 | new TH2F("hZTNeutral","#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated", |
7aaa6c97 | 2256 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
858212dd | 2257 | fhZTNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}"); |
2258 | fhZTNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
e09cf5ef | 2259 | |
c8ad7ead | 2260 | fhPtHbpZTNeutral = |
858212dd | 2261 | new TH2F("hHbpZTNeutral","#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated", |
7aaa6c97 | 2262 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
858212dd | 2263 | fhPtHbpZTNeutral->SetYTitle("ln(1/#it{z}_{T})"); |
2264 | fhPtHbpZTNeutral->SetXTitle("#it{p}_{T trigger}"); | |
3f150b4b | 2265 | |
c8ad7ead | 2266 | outputContainer->Add(fhDeltaPhiDeltaEtaNeutral); |
2267 | outputContainer->Add(fhPhiNeutral) ; | |
2268 | outputContainer->Add(fhEtaNeutral) ; | |
2269 | outputContainer->Add(fhDeltaPhiNeutral) ; | |
2270 | outputContainer->Add(fhDeltaPhiNeutralPt) ; | |
c8ad7ead | 2271 | outputContainer->Add(fhDeltaEtaNeutral) ; |
3f150b4b | 2272 | outputContainer->Add(fhXENeutral) ; |
3f150b4b | 2273 | outputContainer->Add(fhPtHbpXENeutral) ; |
3f150b4b | 2274 | outputContainer->Add(fhZTNeutral) ; |
3f150b4b | 2275 | outputContainer->Add(fhPtHbpZTNeutral) ; |
e09cf5ef | 2276 | |
6ed1ad3e | 2277 | fhDeltaPhiUeNeutralPt = new TH2F |
2278 | (Form("hDeltaPhiUe%sNeutralPt",right.Data()),"#phi_{trigger} - #phi_{#pi^{0}} vs #it{p}_{T #pi^{0}}}", | |
2279 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2280 | fhDeltaPhiUeNeutralPt->SetYTitle("#Delta #phi (rad)"); | |
2281 | fhDeltaPhiUeNeutralPt->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})"); | |
2282 | ||
2283 | fhXEUeNeutral = | |
2284 | new TH2F(Form("hXEUeNeutral%s",right.Data()),"#it{x}_{#it{E}} for #pi^{0} associated", | |
7aaa6c97 | 2285 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 2286 | fhXEUeNeutral->SetYTitle("#it{x}_{#it{E}}"); |
2287 | fhXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2288 | ||
2289 | fhPtHbpXEUeNeutral = | |
2290 | new TH2F(Form("hHbpXEUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated", | |
7aaa6c97 | 2291 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
6ed1ad3e | 2292 | fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
2293 | fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2294 | ||
2295 | fhZTUeNeutral = | |
2296 | new TH2F(Form("hZTUeNeutral%s",right.Data()),"#it{z}_{trigger #pi} = #it{p}_{T #pi^{0}} / #it{p}_{T trigger} for #pi^{0} associated", | |
7aaa6c97 | 2297 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
6ed1ad3e | 2298 | fhZTUeNeutral->SetYTitle("#it{z}_{trigger #pi^{0}}"); |
2299 | fhZTUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
e09cf5ef | 2300 | |
6ed1ad3e | 2301 | fhPtHbpZTUeNeutral = |
2302 | new TH2F(Form("hHbpZTUeNeutral%s",right.Data()),"#xi = ln(1/#it{x}_{#it{E}}) for #pi^{0} associated", | |
7aaa6c97 | 2303 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
6ed1ad3e | 2304 | fhPtHbpXEUeNeutral->SetYTitle("ln(1/#it{z}_{T})"); |
2305 | fhPtHbpXEUeNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2306 | ||
2307 | outputContainer->Add(fhDeltaPhiUeNeutralPt) ; | |
2308 | outputContainer->Add(fhXEUeNeutral) ; | |
2309 | outputContainer->Add(fhPtHbpXEUeNeutral) ; | |
2310 | outputContainer->Add(fhZTUeNeutral) ; | |
2311 | outputContainer->Add(fhPtHbpZTUeNeutral) ; | |
2312 | ||
547c2f01 | 2313 | if(fMakeSeveralUE) |
c8ad7ead | 2314 | { |
e09cf5ef | 2315 | fhDeltaPhiUeLeftNeutral = new TH2F |
858212dd | 2316 | ("hDeltaPhiUeLeftNeutralPt","#phi_{trigger} - #phi_{#Ueh^{0}} vs #it{p}_{T h^{0}} with neutral UE left side range of trigger particles", |
c8ad7ead | 2317 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
2bb7ac98 | 2318 | fhDeltaPhiUeLeftNeutral->SetYTitle("#Delta #phi (rad)"); |
858212dd | 2319 | fhDeltaPhiUeLeftNeutral->SetXTitle("#it{p}_{T h^{0}} (GeV/#it{c})"); |
e09cf5ef | 2320 | outputContainer->Add(fhDeltaPhiUeLeftNeutral) ; |
2321 | ||
c8ad7ead | 2322 | fhXEUeLeftNeutral = |
858212dd | 2323 | new TH2F("hXEUeNeutralLeft","#it{x}_{#it{E}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger", |
7aaa6c97 | 2324 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
858212dd | 2325 | fhXEUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}"); |
2326 | fhXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
3f150b4b | 2327 | outputContainer->Add(fhXEUeLeftNeutral) ; |
2328 | ||
c8ad7ead | 2329 | fhPtHbpXEUeLeftNeutral = |
858212dd | 2330 | new TH2F("hHbpXEUeNeutralLeft","#xi = ln(1/#it{x}_{#it{E}}) with neutral UE left side of trigger", |
7aaa6c97 | 2331 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
858212dd | 2332 | fhPtHbpXEUeLeftNeutral->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
2333 | fhPtHbpXEUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
3f150b4b | 2334 | outputContainer->Add(fhPtHbpXEUeLeftNeutral) ; |
2335 | ||
c8ad7ead | 2336 | fhZTUeLeftNeutral = |
858212dd | 2337 | new TH2F("hZTUeNeutralLeft","#it{z}_{trigger h^{0}} = #it{p}_{T Ueh^{0}} / #it{p}_{T trigger} with neutral UE left side of trigger", |
7aaa6c97 | 2338 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
858212dd | 2339 | fhZTUeLeftNeutral->SetYTitle("#it{z}_{trigger Ueh^{0}}"); |
2340 | fhZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
3f150b4b | 2341 | outputContainer->Add(fhZTUeLeftNeutral) ; |
e09cf5ef | 2342 | |
c8ad7ead | 2343 | fhPtHbpZTUeLeftNeutral = |
858212dd | 2344 | new TH2F("hHbpZTUeNeutralLeft","#xi = ln(1/#it{z}_{T}) with neutral UE left side of trigger", |
7aaa6c97 | 2345 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
858212dd | 2346 | fhPtHbpZTUeLeftNeutral->SetYTitle("ln(1/#it{z}_{T})"); |
2347 | fhPtHbpZTUeLeftNeutral->SetXTitle("#it{p}_{T trigger}"); | |
3f150b4b | 2348 | outputContainer->Add(fhPtHbpZTUeLeftNeutral) ; |
6ed1ad3e | 2349 | } |
2350 | ||
e7d2373d | 2351 | if(fPi0Trigger) |
6ed1ad3e | 2352 | { |
e7d2373d | 2353 | fhDeltaPhiPi0DecayNeutral = new TH2F |
2354 | ("hDeltaPhiPi0DecayNeutral","#phi_{Decay} - #phi_{h^{0}} vs #it{p}_{T Decay}", | |
6ed1ad3e | 2355 | nptbins,ptmin,ptmax, ndeltaphibins ,deltaphimin,deltaphimax); |
e7d2373d | 2356 | fhDeltaPhiPi0DecayNeutral->SetYTitle("#Delta #phi (rad)"); |
2357 | fhDeltaPhiPi0DecayNeutral->SetXTitle("#it{p}_{T Decay} (GeV/#it{c})"); | |
e09cf5ef | 2358 | |
e7d2373d | 2359 | fhXEPi0DecayNeutral = |
2360 | new TH2F("hXEPi0DecayNeutral","#it{x}_{#it{E}} for decay trigger", | |
7aaa6c97 | 2361 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
e7d2373d | 2362 | fhXEPi0DecayNeutral->SetYTitle("#it{x}_{#it{E}}"); |
2363 | fhXEPi0DecayNeutral->SetXTitle("#it{p}_{T decay}"); | |
6ed1ad3e | 2364 | |
e7d2373d | 2365 | fhZTPi0DecayNeutral = |
2366 | new TH2F("hZTPi0DecayNeutral","#it{z}_{trigger h^{0}} = #it{p}_{T h^{0}} / #it{p}_{T Decay}", | |
7aaa6c97 | 2367 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
e7d2373d | 2368 | fhZTPi0DecayNeutral->SetYTitle("#it{z}_{h^{0}}"); |
2369 | fhZTPi0DecayNeutral->SetXTitle("#it{p}_{T decay}"); | |
e09cf5ef | 2370 | |
e7d2373d | 2371 | outputContainer->Add(fhDeltaPhiPi0DecayNeutral) ; |
2372 | outputContainer->Add(fhXEPi0DecayNeutral) ; | |
2373 | outputContainer->Add(fhZTPi0DecayNeutral) ; | |
c8ad7ead | 2374 | } |
fe871b21 | 2375 | }//Correlation with neutral hadrons |
2376 | ||
be2df971 | 2377 | // If data is MC, fill more histograms, depending on origin |
babcbc9d | 2378 | if(IsDataMC()) |
2379 | { | |
be2df971 | 2380 | for(Int_t i= fMCGenTypeMin; i <= fMCGenTypeMax; i++) |
6ed1ad3e | 2381 | { |
be2df971 | 2382 | fhMCPtTrigger[i] = new TH1F (Form("hMCPtTrigger_%s",nameMC[i].Data()), |
2383 | Form("MC %s: generated trigger #it{p}_{T}",nameMC[i].Data()), | |
2384 | nptbins,ptmin,ptmax); | |
2385 | fhMCPtTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
6ed1ad3e | 2386 | |
be2df971 | 2387 | fhMCPhiTrigger[i] = new TH2F (Form("hMCPhiTrigger_%s",nameMC[i].Data()), |
2388 | Form("MC %s: generated trigger #phi",nameMC[i].Data()), | |
2389 | nptbins,ptmin,ptmax, nphibins,phimin,phimax); | |
2390 | fhMCPhiTrigger[i]->SetYTitle("#phi (rad)"); | |
2391 | fhMCPhiTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
6ed1ad3e | 2392 | |
be2df971 | 2393 | fhMCEtaTrigger[i] = new TH2F (Form("hMCEtaTrigger_%s",nameMC[i].Data()), |
2394 | Form("MC %s: generated trigger #eta",nameMC[i].Data()), | |
2395 | nptbins,ptmin,ptmax, netabins,etamin,etamax); | |
2396 | fhMCEtaTrigger[i]->SetYTitle("#eta"); | |
2397 | fhMCEtaTrigger[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
6ed1ad3e | 2398 | |
be2df971 | 2399 | if(fMakeAbsoluteLeading || fMakeNearSideLeading) |
2400 | { | |
2401 | fhMCPtTriggerNotLeading[i] = new TH1F (Form("hMCPtTriggerNotLeading_%s",nameMC[i].Data()), | |
2402 | Form("MC %s: generated trigger #it{p}_{T}, when not leading of primaries",nameMC[i].Data()), | |
2403 | nptbins,ptmin,ptmax); | |
2404 | fhMCPtTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
2405 | ||
2406 | fhMCPhiTriggerNotLeading[i] = new TH2F (Form("hMCPhiTriggerNotLeading_%s",nameMC[i].Data()), | |
2407 | Form("MC %s: generated trigger #phi, when not leading of primaries",nameMC[i].Data()), | |
2408 | nptbins,ptmin,ptmax, nphibins,phimin,phimax); | |
2409 | fhMCPhiTriggerNotLeading[i]->SetYTitle("#phi (rad)"); | |
2410 | fhMCPhiTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
2411 | ||
2412 | ||
2413 | fhMCEtaTriggerNotLeading[i] = new TH2F (Form("hMCEtaTriggerNotLeading_%s",nameMC[i].Data()), | |
2414 | Form("MC %s: generated triogger #eta, when not leading of primaries",nameMC[i].Data()), | |
2415 | nptbins,ptmin,ptmax, netabins,etamin,etamax); | |
2416 | fhMCEtaTriggerNotLeading[i]->SetYTitle("#eta "); | |
2417 | fhMCEtaTriggerNotLeading[i]->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
2418 | } | |
2419 | ||
2420 | fhMCEtaCharged[i] = new TH2F (Form("hMCEtaCharged_%s",nameMC[i].Data()), | |
2421 | Form("MC %s: #eta_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()), | |
2422 | nptbins,ptmin,ptmax,100,-1.,1.); | |
2423 | fhMCEtaCharged[i]->SetYTitle("#eta_{h^{#pm}} (rad)"); | |
2424 | fhMCEtaCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})"); | |
2425 | ||
2426 | fhMCPhiCharged[i] = new TH2F(Form("hMCPhiCharged_%s",nameMC[i].Data()), | |
2427 | Form("MC %s: phi_{h^{#pm}} vs #it{p}_{T #pm}",nameMC[i].Data()), | |
2428 | nptbins,ptmin,ptmax,180,0,TMath::TwoPi()); | |
2429 | fhMCPhiCharged[i]->SetYTitle("MC #phi_{h^{#pm}} (rad)"); | |
2430 | fhMCPhiCharged[i]->SetXTitle("#it{p}_{T #pm} (GeV/#it{c})"); | |
2431 | ||
2432 | fhMCDeltaPhiDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaPhiDeltaEtaCharged_%s",nameMC[i].Data()), | |
2433 | Form("MC %s: phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",nameMC[i].Data()), | |
2434 | ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax); | |
2435 | fhMCDeltaPhiDeltaEtaCharged[i]->SetXTitle("#Delta #phi (rad)"); | |
2436 | fhMCDeltaPhiDeltaEtaCharged[i]->SetYTitle("#Delta #eta"); | |
2437 | ||
2438 | fhMCDeltaEtaCharged[i] = new TH2F (Form("hMCDeltaEtaCharged_%s",nameMC[i].Data()), | |
2439 | Form("MC %s: #eta_{trigger} - #eta_{h^{#pm}} vs #it{p}_{T trigger} and #it{p}_{T assoc}",nameMC[i].Data()), | |
2440 | nptbins,ptmin,ptmax,ndeltaetabins ,deltaetamin,deltaetamax); | |
2441 | fhMCDeltaEtaCharged[i]->SetYTitle("#Delta #eta"); | |
2442 | fhMCDeltaEtaCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2443 | ||
2444 | fhMCDeltaPhiCharged[i] = new TH2F (Form("hMCDeltaPhiCharged_%s",nameMC[i].Data()), | |
2445 | Form("MC %s: #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}",nameMC[i].Data()), | |
2446 | nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax); | |
2447 | fhMCDeltaPhiCharged[i]->SetYTitle("#Delta #phi (rad)"); | |
2448 | fhMCDeltaPhiCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2449 | ||
2450 | fhMCDeltaPhiChargedPt[i] = new TH2F (Form("hMCDeltaPhiChargedPt_%s",nameMC[i].Data()), | |
2451 | Form("MC %s: #phi_{trigger} - #phi_{#h^{#pm}} vs #it{p}_{T h^{#pm}}",nameMC[i].Data()), | |
2452 | nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax); | |
2453 | fhMCDeltaPhiChargedPt[i]->SetYTitle("#Delta #phi (rad)"); | |
2454 | fhMCDeltaPhiChargedPt[i]->SetXTitle("#it{p}_{T h^{#pm}} (GeV/#it{c})"); | |
2455 | ||
2456 | fhMCPtXECharged[i] = new TH2F (Form("hMCPtXECharged_%s",nameMC[i].Data()), | |
2457 | Form("MC %s: #it{x}_{#it{E}} with charged hadrons",nameMC[i].Data()), | |
2458 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); | |
2459 | fhMCPtXECharged[i]->SetYTitle("#it{x}_{#it{E}}"); | |
2460 | fhMCPtXECharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2461 | ||
2462 | fhMCPtHbpXECharged[i] = new TH2F(Form("hMCHbpXECharged_%s",nameMC[i].Data()), | |
2463 | Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons",nameMC[i].Data()), | |
2464 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); | |
2465 | fhMCPtHbpXECharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})"); | |
2466 | fhMCPtHbpXECharged[i]->SetXTitle("#it{p}_{T trigger}"); | |
2467 | ||
2468 | fhMCPtZTCharged[i] = new TH2F(Form("hMCPtZTCharged_%s",nameMC[i].Data()), | |
2469 | Form("MC %s: #it{z}_{T} with charged hadrons",nameMC[i].Data()), | |
2470 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); | |
2471 | fhMCPtZTCharged[i]->SetYTitle("#it{z}_{T}"); | |
2472 | fhMCPtZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2473 | ||
2474 | fhMCPtHbpZTCharged[i] = new TH2F(Form("hMCHbpZTCharged_%s",nameMC[i].Data()), | |
2475 | Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons",nameMC[i].Data()), | |
2476 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); | |
2477 | fhMCPtHbpZTCharged[i]->SetYTitle("ln(1/#it{z}_{T})"); | |
2478 | fhMCPtHbpZTCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2479 | ||
2480 | fhMCPtTrigPout[i] = new TH2F(Form("hMCPtTrigPout_%s",nameMC[i].Data()), | |
2481 | Form("MC %s: #it{p}_{out} with triggers",nameMC[i].Data()), | |
2482 | nptbins,ptmin,ptmax,nptbins,-1.*ptmax/2.,ptmax/2.); | |
2483 | fhMCPtTrigPout[i]->SetYTitle("#it{p}_{out} (GeV/#it{c})"); | |
2484 | fhMCPtTrigPout[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2485 | ||
2486 | fhMCPtAssocDeltaPhi[i] = new TH2F(Form("hMCPtAssocDeltaPhi_%s",nameMC[i].Data()), | |
2487 | Form("MC %s: #Delta #phi with associated charged hadrons",nameMC[i].Data()), | |
2488 | nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax); | |
2489 | fhMCPtAssocDeltaPhi[i]->SetYTitle("#Delta #phi (rad)"); | |
2490 | fhMCPtAssocDeltaPhi[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
f2d29137 | 2491 | |
be2df971 | 2492 | outputContainer->Add(fhMCPtTrigger[i]); |
2493 | outputContainer->Add(fhMCPhiTrigger[i]); | |
2494 | outputContainer->Add(fhMCEtaTrigger[i]); | |
f2d29137 | 2495 | |
be2df971 | 2496 | if(fMakeAbsoluteLeading || fMakeNearSideLeading) |
2497 | { | |
2498 | outputContainer->Add(fhMCPtTriggerNotLeading[i]); | |
2499 | outputContainer->Add(fhMCPhiTriggerNotLeading[i]); | |
2500 | outputContainer->Add(fhMCEtaTriggerNotLeading[i]); | |
2501 | } | |
6ed1ad3e | 2502 | |
be2df971 | 2503 | outputContainer->Add(fhMCDeltaPhiDeltaEtaCharged[i]); |
2504 | outputContainer->Add(fhMCPhiCharged[i]) ; | |
2505 | outputContainer->Add(fhMCEtaCharged[i]) ; | |
2506 | outputContainer->Add(fhMCDeltaEtaCharged[i]) ; | |
2507 | outputContainer->Add(fhMCDeltaPhiCharged[i]) ; | |
2508 | ||
2509 | outputContainer->Add(fhMCDeltaPhiChargedPt[i]) ; | |
2510 | outputContainer->Add(fhMCPtXECharged[i]) ; | |
2511 | outputContainer->Add(fhMCPtZTCharged[i]) ; | |
2512 | outputContainer->Add(fhMCPtHbpXECharged[i]) ; | |
2513 | outputContainer->Add(fhMCPtHbpZTCharged[i]) ; | |
2514 | outputContainer->Add(fhMCPtTrigPout[i]) ; | |
2515 | outputContainer->Add(fhMCPtAssocDeltaPhi[i]) ; | |
2516 | ||
2517 | // Underlying event | |
2518 | ||
2519 | fhMCUePart[i] = | |
2520 | new TH1F(Form("hMCUePart_%s",nameMC[i].Data()), | |
2521 | Form("MC %s: UE particles distribution vs #it{p}_{T trigger}",nameMC[i].Data()), | |
2522 | nptbins,ptmin,ptmax); | |
2523 | fhMCUePart[i]->SetYTitle("#it{dN}^{ch}"); | |
2524 | fhMCUePart[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2525 | ||
2526 | fhMCPtXEUeCharged[i] = | |
2527 | new TH2F(Form("hMCPtXEUeCharged%s",right.Data()), | |
2528 | Form("MC %s: #it{x}_{#it{E}} with charged hadrons, Underlying Event",nameMC[i].Data()), | |
7aaa6c97 | 2529 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
be2df971 | 2530 | fhMCPtXEUeCharged[i]->SetYTitle("#it{x}_{#it{E}}"); |
2531 | fhMCPtXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
6ed1ad3e | 2532 | |
be2df971 | 2533 | fhMCPtHbpXEUeCharged[i] = |
2534 | new TH2F(Form("hMCPtHbpXEUeCharged%s",right.Data()), | |
2535 | Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event",nameMC[i].Data()), | |
7aaa6c97 | 2536 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
be2df971 | 2537 | fhMCPtHbpXEUeCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
2538 | fhMCPtHbpXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
6ed1ad3e | 2539 | |
be2df971 | 2540 | fhMCPtZTUeCharged[i] = |
2541 | new TH2F(Form("hMCPtZTUeCharged%s",right.Data()), | |
2542 | Form("MC %s: #it{z}_{T} with charged hadrons, Underlying Event",nameMC[i].Data()), | |
2543 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); | |
2544 | fhMCPtZTUeCharged[i]->SetYTitle("#it{z}_{T}"); | |
2545 | fhMCPtZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
6ed1ad3e | 2546 | |
be2df971 | 2547 | fhMCPtHbpZTUeCharged[i] = |
2548 | new TH2F(Form("hMCPtHbpZTUeCharged%s",right.Data()), | |
2549 | Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event",nameMC[i].Data()), | |
2550 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); | |
2551 | fhMCPtHbpZTUeCharged[i]->SetYTitle("ln(1/#it{z}_{T})"); | |
2552 | fhMCPtHbpZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2553 | ||
2554 | outputContainer->Add(fhMCUePart[i]); | |
2555 | outputContainer->Add(fhMCPtXEUeCharged[i]) ; | |
2556 | outputContainer->Add(fhMCPtZTUeCharged[i]) ; | |
2557 | outputContainer->Add(fhMCPtHbpZTUeCharged[i]); | |
2558 | outputContainer->Add(fhMCPtHbpXEUeCharged[i]); | |
2559 | ||
2560 | if(fMakeSeveralUE) | |
2561 | { | |
2562 | fhMCPtXEUeLeftCharged[i] = new TH2F(Form("hMCPtXEUeChargedLeft_%s",nameMC[i].Data()), | |
2563 | Form("MC %s: #it{x}_{#it{E}} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()), | |
2564 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); | |
2565 | fhMCPtXEUeLeftCharged[i]->SetYTitle("#it{x}_{#it{E}}"); | |
2566 | fhMCPtXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2567 | ||
2568 | fhMCPtHbpXEUeLeftCharged[i] = new TH2F(Form("hMCPtHbpXEUeChargedLeft_%s",nameMC[i].Data()), | |
2569 | Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()), | |
2570 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); | |
2571 | fhMCPtHbpXEUeLeftCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})"); | |
2572 | fhMCPtHbpXEUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2573 | ||
2574 | fhMCPtZTUeLeftCharged[i] = new TH2F(Form("hMCPtZTUeChargedLeft_%s",nameMC[i].Data()), | |
2575 | Form("MC %s: #it{z}_{T} with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()), | |
2576 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); | |
2577 | fhMCPtZTUeLeftCharged[i]->SetYTitle("#it{z}_{T}"); | |
2578 | fhMCPtZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2579 | ||
2580 | fhMCPtHbpZTUeLeftCharged[i] = new TH2F(Form("hMCPtHbpZTUeChargedLeft_%s",nameMC[i].Data()), | |
2581 | Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, with UE left side range of trigger particles",nameMC[i].Data()), | |
2582 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); | |
2583 | fhMCPtHbpZTUeLeftCharged[i]->SetYTitle("ln(1/#it{z}_{T})"); | |
2584 | fhMCPtHbpZTUeLeftCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2585 | ||
2586 | outputContainer->Add(fhMCPtXEUeLeftCharged[i]) ; | |
2587 | outputContainer->Add(fhMCPtZTUeLeftCharged[i]) ; | |
2588 | outputContainer->Add(fhMCPtHbpXEUeLeftCharged[i]); | |
2589 | outputContainer->Add(fhMCPtHbpZTUeLeftCharged[i]) ; | |
2590 | ||
2591 | } | |
f2d29137 | 2592 | } |
fe871b21 | 2593 | } //for MC histogram |
2594 | ||
2e876d85 | 2595 | if(DoOwnMix()) |
029dea5a | 2596 | { |
2597 | //create event containers | |
029dea5a | 2598 | |
c8ad7ead | 2599 | if(!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForTracksExists())) |
2e876d85 | 2600 | { |
d07ffd54 | 2601 | Int_t nvz = GetNZvertBin(); |
2602 | Int_t nrp = GetNRPBin(); | |
2603 | Int_t nce = GetNCentrBin(); | |
283f989c | 2604 | |
d07ffd54 | 2605 | fListMixTrackEvents= new TList*[nvz*nrp*nce] ; |
2606 | ||
2607 | for( Int_t ice = 0 ; ice < nce ; ice++ ) | |
2608 | { | |
2609 | for( Int_t ivz = 0 ; ivz < nvz ; ivz++ ) | |
2610 | { | |
2611 | for( Int_t irp = 0 ; irp < nrp ; irp++ ) | |
2612 | { | |
2613 | Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp; | |
2614 | ||
2615 | //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n", | |
2616 | // ic,iz, irp, bin); | |
2617 | ||
2618 | fListMixTrackEvents[bin] = new TList() ; | |
2619 | fListMixTrackEvents[bin]->SetOwner(kFALSE); | |
2620 | } | |
2621 | } | |
c8ad7ead | 2622 | } |
d07ffd54 | 2623 | } |
d0b625bc | 2624 | |
55c20a99 | 2625 | fhPtTriggerMixed = new TH1F ("hPtTriggerMixed","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax); |
2626 | fhPtTriggerMixed->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
c8ad7ead | 2627 | |
7d306daf | 2628 | if(fCorrelVzBin) |
2629 | { | |
55c20a99 | 2630 | fhPtTriggerMixedVzBin = new TH2F ("hPtTriggerMixedVzBin","#it{p}_{T} distribution of trigger particles, used for mixing", nptbins,ptmin,ptmax,GetNZvertBin(),0,GetNZvertBin()); |
2631 | fhPtTriggerMixedVzBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
2632 | fhPtTriggerMixedVzBin->SetYTitle("#it{v}_{#it{z}} bin"); | |
2633 | outputContainer->Add(fhPtTriggerMixedVzBin); | |
7d306daf | 2634 | } |
2635 | ||
55c20a99 | 2636 | fhPtTriggerMixedBin = new TH2F ("hPtTriggerMixedBin","#it{p}_{T} distribution of trigger particles vs mixing bin", nptbins,ptmin,ptmax,nMixBins,0,nMixBins); |
2637 | fhPtTriggerMixedBin->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})"); | |
2638 | fhPtTriggerMixedBin->SetYTitle("Bin"); | |
c8ad7ead | 2639 | |
55c20a99 | 2640 | fhPhiTriggerMixed = new TH2F ("hPhiTriggerMixed","#phi distribution of trigger Particles, used for mixing",nptbins,ptmin,ptmax, nphibins,phimin,phimax); |
2641 | fhPhiTriggerMixed->SetYTitle("#phi (rad)"); | |
d0b625bc | 2642 | |
55c20a99 | 2643 | fhEtaTriggerMixed = new TH2F ("hEtaTriggerMixed","#eta distribution of trigger, used for mixing",nptbins,ptmin,ptmax, netabins,etamin,etamax); |
2644 | fhEtaTriggerMixed->SetYTitle("#eta "); | |
d0b625bc | 2645 | |
55c20a99 | 2646 | outputContainer->Add(fhPtTriggerMixed); |
2647 | outputContainer->Add(fhPtTriggerMixedBin); | |
2648 | outputContainer->Add(fhPhiTriggerMixed); | |
2649 | outputContainer->Add(fhEtaTriggerMixed); | |
d0b625bc | 2650 | |
2bb7ac98 | 2651 | // Fill the cluster pool only in isolation analysis or if requested |
de9949a4 | 2652 | if( neutralMix && (!fUseMixStoredInReader || (fUseMixStoredInReader && !GetReader()->ListWithMixedEventsForCaloExists()))) |
d07ffd54 | 2653 | { |
7ed3a248 | 2654 | Int_t nvz = GetNZvertBin(); |
2655 | Int_t nrp = GetNRPBin(); | |
2656 | Int_t nce = GetNCentrBin(); | |
2657 | ||
d07ffd54 | 2658 | fListMixCaloEvents= new TList*[nvz*nrp*nce] ; |
7ed3a248 | 2659 | |
2660 | for( Int_t ice = 0 ; ice < nce ; ice++ ) | |
2e876d85 | 2661 | { |
7ed3a248 | 2662 | for( Int_t ivz = 0 ; ivz < nvz ; ivz++ ) |
2e876d85 | 2663 | { |
7ed3a248 | 2664 | for( Int_t irp = 0 ; irp < nrp ; irp++ ) |
283f989c | 2665 | { |
7ed3a248 | 2666 | Int_t bin = GetEventMixBin(ice,ivz,irp); //ic*nvz*nrp+iz*nrp+irp; |
2667 | ||
da3c40f7 | 2668 | //printf("GetCreateOutputObjects - Bins : cent %d, vz %d, RP %d, event %d/%d\n", |
7ed3a248 | 2669 | // ic,iz, irp, bin); |
2670 | ||
d07ffd54 | 2671 | fListMixCaloEvents[bin] = new TList() ; |
2672 | fListMixCaloEvents[bin]->SetOwner(kFALSE); | |
283f989c | 2673 | } |
2e876d85 | 2674 | } |
c8ad7ead | 2675 | } |
283f989c | 2676 | } |
2677 | ||
2678 | //Init the list in the reader if not done previously | |
d07ffd54 | 2679 | if(fUseMixStoredInReader) |
283f989c | 2680 | { |
c8ad7ead | 2681 | if( !GetReader()->ListWithMixedEventsForTracksExists() ) |
d07ffd54 | 2682 | GetReader()->SetListWithMixedEventsForTracks(fListMixTrackEvents); |
2683 | ||
c8ad7ead | 2684 | if( !GetReader()->ListWithMixedEventsForCaloExists() ) |
d07ffd54 | 2685 | GetReader()->SetListWithMixedEventsForCalo (fListMixCaloEvents ); |
283f989c | 2686 | } |
029dea5a | 2687 | |
efb540af | 2688 | fhEventBin=new TH1I("hEventBin","Number of triggers per bin(cen,vz,rp)", |
c8ad7ead | 2689 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0, |
2e876d85 | 2690 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ; |
7aaa6c97 | 2691 | fhEventBin->SetXTitle("event bin"); |
2e876d85 | 2692 | outputContainer->Add(fhEventBin) ; |
283f989c | 2693 | |
efb540af | 2694 | fhEventMixBin=new TH1I("hEventMixBin","Number of triggers mixed per event bin(cen,vz,rp)", |
2e876d85 | 2695 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0, |
2696 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ; | |
7aaa6c97 | 2697 | fhEventMixBin->SetXTitle("event bin"); |
2e876d85 | 2698 | outputContainer->Add(fhEventMixBin) ; |
efb540af | 2699 | |
2700 | fhEventMBBin=new TH1I("hEventMBBin","Number of min bias events per bin(cen,vz,rp)", | |
2701 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0, | |
2702 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ; | |
2703 | fhEventMBBin->SetXTitle("event bin"); | |
2704 | outputContainer->Add(fhEventMBBin) ; | |
2705 | ||
7aaa6c97 | 2706 | fhNtracksMB=new TH2F("hNtracksMBEvent","Number of filtered tracks in MB event per event bin",ntrbins,trmin,trmax, |
2707 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0, | |
2708 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ; | |
2709 | fhNtracksMB->SetYTitle("event bin"); | |
2710 | fhNtracksMB->SetXTitle("#it{N}_{track}"); | |
2e876d85 | 2711 | outputContainer->Add(fhNtracksMB); |
7aaa6c97 | 2712 | |
de9949a4 | 2713 | if( neutralMix ) |
2bb7ac98 | 2714 | { |
7aaa6c97 | 2715 | fhNclustersMB=new TH2F("hNclustersMBEvent","Number of filtered clusters in MB events per event bin",nclbins,clmin,clmax, |
2716 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1,0, | |
2717 | GetNCentrBin()*GetNZvertBin()*GetNRPBin()+1) ; | |
2718 | fhNclustersMB->SetYTitle("event bin"); | |
2719 | fhNclustersMB->SetXTitle("#it{N}_{cluster}"); | |
2bb7ac98 | 2720 | outputContainer->Add(fhNclustersMB); |
2721 | } | |
2722 | ||
029dea5a | 2723 | fhMixDeltaPhiCharged = new TH2F |
858212dd | 2724 | ("hMixDeltaPhiCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #it{p}_{T trigger}", |
c8ad7ead | 2725 | nptbins,ptmin,ptmax,ndeltaphibins ,deltaphimin,deltaphimax); |
2bb7ac98 | 2726 | fhMixDeltaPhiCharged->SetYTitle("#Delta #phi (rad)"); |
858212dd | 2727 | fhMixDeltaPhiCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); |
029dea5a | 2728 | outputContainer->Add(fhMixDeltaPhiCharged); |
283f989c | 2729 | |
029dea5a | 2730 | fhMixDeltaPhiDeltaEtaCharged = new TH2F |
2731 | ("hMixDeltaPhiDeltaEtaCharged","Mixed event : #phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}", | |
c8ad7ead | 2732 | ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax); |
2bb7ac98 | 2733 | fhMixDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi (rad)"); |
029dea5a | 2734 | fhMixDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta"); |
2735 | outputContainer->Add(fhMixDeltaPhiDeltaEtaCharged); | |
283f989c | 2736 | |
c8ad7ead | 2737 | fhMixXECharged = |
858212dd | 2738 | new TH2F("hMixXECharged","Mixed event : #it{x}_{#it{E}} for charged tracks", |
7aaa6c97 | 2739 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
858212dd | 2740 | fhMixXECharged->SetYTitle("#it{x}_{#it{E}}"); |
2741 | fhMixXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
08f220c8 | 2742 | outputContainer->Add(fhMixXECharged); |
18838011 | 2743 | |
2744 | fhMixXEUeCharged = | |
858212dd | 2745 | new TH2F("hMixXEUeCharged","Mixed event : #it{x}_{#it{E}} for charged tracks in Ue region", |
7aaa6c97 | 2746 | nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax); |
858212dd | 2747 | fhMixXEUeCharged->SetYTitle("#it{x}_{#it{E}}"); |
2748 | fhMixXEUeCharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
18838011 | 2749 | outputContainer->Add(fhMixXEUeCharged); |
c8ad7ead | 2750 | |
18838011 | 2751 | fhMixHbpXECharged = |
858212dd | 2752 | new TH2F("hMixHbpXECharged","mixed event : #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons", |
7aaa6c97 | 2753 | nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax); |
858212dd | 2754 | fhMixHbpXECharged->SetYTitle("ln(1/#it{x}_{#it{E}})"); |
2755 | fhMixHbpXECharged->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
08f220c8 | 2756 | outputContainer->Add(fhMixHbpXECharged); |
c8ad7ead | 2757 | |
7d306daf | 2758 | fhMixDeltaPhiChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz]; |
2759 | fhMixDeltaPhiChargedAssocPtBinDEta08 = new TH2F*[fNAssocPtBins*nz]; | |
2760 | fhMixDeltaPhiChargedAssocPtBinDEta0 = new TH2F*[fNAssocPtBins*nz]; | |
2761 | fhMixDeltaPhiDeltaEtaChargedAssocPtBin = new TH2F*[fNAssocPtBins*nz]; | |
283f989c | 2762 | |
029dea5a | 2763 | for(Int_t i = 0 ; i < fNAssocPtBins ; i++) |
c8ad7ead | 2764 | { |
7d306daf | 2765 | for(Int_t z = 0 ; z < nz ; z++) |
8cc41381 | 2766 | { |
7d306daf | 2767 | Int_t bin = i*nz+z; |
8cc41381 | 2768 | |
7d306daf | 2769 | if(fCorrelVzBin) |
2770 | { | |
d71a7d1f | 2771 | sz = Form("_vz%d",z); |
858212dd | 2772 | tz = Form(", #it{v}_{#it{z}} bin %d",z); |
7d306daf | 2773 | } |
2774 | ||
2775 | //printf("MIX : iAssoc %d, Vz %d, bin %d - sz %s, tz %s \n",i,z,bin,sz.Data(),tz.Data()); | |
2776 | ||
c8ad7ead | 2777 | fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiDeltaEtaChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), |
2778 | Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2779 | ndeltaphibins ,deltaphimin,deltaphimax,ndeltaetabins ,deltaetamin,deltaetamax); | |
2bb7ac98 | 2780 | fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetXTitle("#Delta #phi (rad)"); |
8cc41381 | 2781 | fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->SetYTitle("#Delta #eta"); |
2782 | ||
8cc41381 | 2783 | outputContainer->Add(fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]); |
a22f3f34 | 2784 | |
2785 | fhMixDeltaPhiChargedAssocPtBin[bin] = new TH2F(Form("hMixDeltaPhiChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), | |
2786 | Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2787 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2788 | fhMixDeltaPhiChargedAssocPtBin[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2789 | fhMixDeltaPhiChargedAssocPtBin[bin]->SetYTitle("#Delta #phi (rad)"); | |
2790 | ||
2791 | outputContainer->Add(fhMixDeltaPhiChargedAssocPtBin[bin]); | |
2792 | ||
2793 | if(fFillEtaGapsHisto) | |
2794 | { | |
2795 | fhMixDeltaPhiChargedAssocPtBinDEta08[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0.8ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), | |
2796 | Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta > 0.8", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2797 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2798 | fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2799 | fhMixDeltaPhiChargedAssocPtBinDEta08[bin]->SetYTitle("#Delta #phi (rad)"); | |
2800 | ||
2801 | fhMixDeltaPhiChargedAssocPtBinDEta0[bin] = new TH2F(Form("hMixDeltaPhiDeltaEta0ChargedAssocPtBin%2.1f_%2.1f%s", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],sz.Data()), | |
2802 | Form("Mixed event #Delta #phi vs #it{p}_{T trigger} for associated #it{p}_{T} bin [%2.1f,%2.1f]%s, for #Delta #eta = 0", fAssocPtBinLimit[i], fAssocPtBinLimit[i+1],tz.Data()), | |
2803 | nptbins, ptmin, ptmax, ndeltaphibins ,deltaphimin,deltaphimax); | |
2804 | fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})"); | |
2805 | fhMixDeltaPhiChargedAssocPtBinDEta0[bin]->SetYTitle("#Delta #phi (rad)"); | |
2806 | ||
2807 | outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta08[bin]); | |
2808 | outputContainer->Add(fhMixDeltaPhiChargedAssocPtBinDEta0[bin]); | |
2809 | } | |
8cc41381 | 2810 | } |
c8ad7ead | 2811 | } |
029dea5a | 2812 | } |
7d306daf | 2813 | |
e09cf5ef | 2814 | return outputContainer; |
2815 | ||
2816 | } | |
2817 | ||
907b38cd | 2818 | //_________________________________________________________________________________________________ |
6b013448 | 2819 | Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(AliAODPWG4Particle* trigger, |
2820 | TLorentzVector & mom1, | |
2821 | TLorentzVector & mom2) | |
907b38cd | 2822 | { |
2823 | // Get the momentum of the pi0/eta assigned decay photons | |
c8ad7ead | 2824 | // In case of pi0/eta trigger, we may want to check their decay correlation, |
907b38cd | 2825 | // get their decay children |
2826 | ||
2827 | Int_t indexPhoton1 = trigger->GetCaloLabel(0); | |
2828 | Int_t indexPhoton2 = trigger->GetCaloLabel(1); | |
907b38cd | 2829 | |
2830 | if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE; | |
2831 | ||
c8ad7ead | 2832 | if(GetDebug() > 1) |
907b38cd | 2833 | printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2); |
2834 | ||
c8ad7ead | 2835 | TObjArray * clusters = 0x0 ; |
907b38cd | 2836 | if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ; |
2837 | else clusters = GetPHOSClusters() ; | |
2838 | ||
2839 | for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++) | |
2840 | { | |
6d9932e2 | 2841 | AliVCluster * photon = (AliVCluster*) (clusters->At(iclus)); |
2842 | ||
2843 | if(photon->GetID()==indexPhoton1) photon->GetMomentum(mom1,GetVertex(0)) ; | |
2844 | if(photon->GetID()==indexPhoton2) photon->GetMomentum(mom1,GetVertex(0)) ; | |
907b38cd | 2845 | |
2846 | if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt()); | |
2847 | ||
2848 | } //cluster loop | |
2849 | ||
2850 | return kTRUE; | |
2851 | ||
2852 | } | |
2853 | ||
b1f720a7 | 2854 | //_____________________________________________________________ |
22ad7981 | 2855 | Int_t AliAnaParticleHadronCorrelation::GetMCTagHistogramIndex(Int_t mcTag) |
b1f720a7 | 2856 | { |
2857 | // Index of MC histograms depending on MC origin | |
2858 | ||
2859 | if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) || | |
2860 | GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0; | |
2861 | else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1; | |
2862 | else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2; | |
be2df971 | 2863 | else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) || |
2864 | GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3; | |
b1f720a7 | 2865 | else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4; |
2866 | else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5; | |
2867 | else return 6; | |
2868 | ||
2869 | } | |
2870 | ||
c8ad7ead | 2871 | //_________________________________________ |
2872 | void AliAnaParticleHadronCorrelation::Init() | |
2873 | { | |
2874 | //Init | |
2875 | //Do some checks | |
2876 | ||
2877 | if(!GetReader()->IsCTSSwitchedOn()) | |
2878 | AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!\n"); | |
c8ad7ead | 2879 | } |
2880 | ||
05d0d05d | 2881 | //____________________________________________________ |
e09cf5ef | 2882 | void AliAnaParticleHadronCorrelation::InitParameters() |
2883 | { | |
2884 | ||
2885 | //Initialize the parameters of the analysis. | |
e4c0a0eb | 2886 | SetInputAODName("Particle"); |
e09cf5ef | 2887 | SetAODObjArrayName("Hadrons"); |
2888 | AddToHistogramsName("AnaHadronCorr_"); | |
045396c8 | 2889 | |
e09cf5ef | 2890 | SetPtCutRange(0.,300); |
b6afb6b1 | 2891 | fDeltaPhiMinCut = TMath::DegToRad()*120.; |
2892 | fDeltaPhiMaxCut = TMath::DegToRad()*240. ; | |
045396c8 | 2893 | fSelectIsolated = kFALSE; |
2894 | fMakeSeveralUE = kFALSE; | |
b6afb6b1 | 2895 | fUeDeltaPhiMinCut = TMath::DegToRad()*60.; |
2896 | fUeDeltaPhiMaxCut = TMath::DegToRad()*120 ; | |
907b38cd | 2897 | |
045396c8 | 2898 | fNeutralCorr = kFALSE ; |
2899 | fPi0Trigger = kFALSE ; | |
907b38cd | 2900 | fDecayTrigger = kFALSE ; |
2901 | fHMPIDCorrelation = kFALSE ; | |
045396c8 | 2902 | |
3f150b4b | 2903 | fMakeAbsoluteLeading = kTRUE; |
2904 | fMakeNearSideLeading = kFALSE; | |
2905 | ||
050ad675 | 2906 | fNAssocPtBins = 9 ; |
2907 | fAssocPtBinLimit[0] = 0.2 ; | |
f85f4afb | 2908 | fAssocPtBinLimit[1] = 0.5 ; |
2909 | fAssocPtBinLimit[2] = 1.0 ; | |
2910 | fAssocPtBinLimit[3] = 2.0 ; | |
2911 | fAssocPtBinLimit[4] = 3.0 ; | |
2912 | fAssocPtBinLimit[5] = 4.0 ; | |
2913 | fAssocPtBinLimit[6] = 5.0 ; | |
2914 | fAssocPtBinLimit[7] = 6.0 ; | |
2915 | fAssocPtBinLimit[8] = 7.0 ; | |
2916 | fAssocPtBinLimit[9] = 8.0 ; | |
2917 | fAssocPtBinLimit[10] = 9.0 ; | |
2918 | fAssocPtBinLimit[11] = 10.0 ; | |
2919 | fAssocPtBinLimit[12] = 12.0 ; | |
2920 | fAssocPtBinLimit[13] = 14.0 ; | |
2921 | fAssocPtBinLimit[14] = 16.0 ; | |
2922 | fAssocPtBinLimit[15] = 20.0 ; | |
2923 | fAssocPtBinLimit[16] = 30.0 ; | |
2924 | fAssocPtBinLimit[17] = 40.0 ; | |
2925 | fAssocPtBinLimit[18] = 50.0 ; | |
2926 | fAssocPtBinLimit[19] = 200.0 ; | |
2927 | ||
283f989c | 2928 | fUseMixStoredInReader = kTRUE; |
2929 | ||
e4c0a0eb | 2930 | fM02MinCut = -1 ; |
2931 | fM02MaxCut = -1 ; | |
2932 | ||
f7408d50 | 2933 | fSelectLeadingHadronAngle = kFALSE; |
98604e3a | 2934 | fFillLeadHadOppositeHisto = kFALSE; |
f7408d50 | 2935 | fMinLeadHadPhi = 150*TMath::DegToRad(); |
2936 | fMaxLeadHadPhi = 210*TMath::DegToRad(); | |
2937 | ||
2938 | fMinLeadHadPt = 1; | |
2939 | fMaxLeadHadPt = 100; | |
2940 | ||
be2df971 | 2941 | fMCGenTypeMin = 0; |
2942 | fMCGenTypeMax = 6; | |
2943 | ||
e7d2373d | 2944 | fNDecayBits = 1; |
2945 | fDecayBits[0] = AliNeutralMesonSelection::kPi0; | |
2946 | fDecayBits[1] = AliNeutralMesonSelection::kEta; | |
2947 | fDecayBits[2] = AliNeutralMesonSelection::kPi0Side; | |
2948 | fDecayBits[3] = AliNeutralMesonSelection::kEtaSide; | |
e09cf5ef | 2949 | } |
2950 | ||
f3c47a7f | 2951 | //_________________________________________________________________________ |
2952 | Bool_t AliAnaParticleHadronCorrelation::IsTriggerTheEventLeadingParticle() | |
c8ad7ead | 2953 | { |
f3c47a7f | 2954 | // Check if the what of the selected triggers is leading particle comparing |
2955 | // with all the triggers, all the tracks or all the clusters (if requested for the clusters). | |
e09cf5ef | 2956 | |
1f8591af | 2957 | Double_t ptTrig = GetMinPt(); |
c8ad7ead | 2958 | Double_t phiTrig = 0 ; |
f3c47a7f | 2959 | fLeadingTriggerIndex =-1 ; |
2960 | Int_t index =-1 ; | |
2961 | AliAODPWG4ParticleCorrelation* pLeading = 0; | |
2962 | ||
2b65bd0e | 2963 | // Loop on stored AOD particles, find leading trigger on the selected list, with at least min pT. |
f3c47a7f | 2964 | |
c8ad7ead | 2965 | for(Int_t iaod = 0; iaod < GetInputAODBranch()->GetEntriesFast() ; iaod++) |
04f7a616 | 2966 | { |
e09cf5ef | 2967 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); |
1f8591af | 2968 | particle->SetLeadingParticle(kFALSE); // set it later |
2969 | ||
04f7a616 | 2970 | // Vertex cut in case of mixing |
2971 | Int_t check = CheckMixedEventVertex(particle->GetCaloLabel(0), particle->GetTrackLabel(0)); | |
2972 | if(check == 0) continue; | |
c8ad7ead | 2973 | if(check == -1) return kFALSE; // not sure if it is correct. |
2974 | ||
045396c8 | 2975 | // find the leading particles with highest momentum |
c8ad7ead | 2976 | if (particle->Pt() > ptTrig) |
547c2f01 | 2977 | { |
f3c47a7f | 2978 | ptTrig = particle->Pt() ; |
2979 | phiTrig = particle->Phi(); | |
2980 | index = iaod ; | |
2981 | pLeading = particle ; | |
045396c8 | 2982 | } |
c8ad7ead | 2983 | }// finish search of leading trigger particle on the AOD branch. |
66e64043 | 2984 | |
f3c47a7f | 2985 | if(index < 0) return kFALSE; |
2986 | ||
2987 | //printf("AOD leading pT %2.2f, ID %d\n", pLeading->Pt(),pLeading->GetCaloLabel(0)); | |
7a12c958 | 2988 | |
c8ad7ead | 2989 | if(phiTrig < 0 ) phiTrig += TMath::TwoPi(); |
7a12c958 | 2990 | |
c8ad7ead | 2991 | // Compare if it is the leading of all tracks |
e09cf5ef | 2992 | |
c8ad7ead | 2993 | TVector3 p3; |
f3c47a7f | 2994 | for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ ) |
c8ad7ead | 2995 | { |
f3c47a7f | 2996 | AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ; |
2997 | ||
2998 | if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) || | |
2999 | track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ; | |
c8ad7ead | 3000 | |
3001 | Double_t mom[3] = {track->Px(),track->Py(),track->Pz()}; | |
3002 | p3.SetXYZ(mom[0],mom[1],mom[2]); | |
3003 | Float_t pt = p3.Pt(); | |
3004 | Float_t phi = p3.Phi() ; | |
3005 | if(phi < 0) phi+=TMath::TwoPi(); | |
3006 | ||
3007 | //jump out this event if near side associated particle pt larger than trigger | |
3008 | if (fMakeNearSideLeading) | |
3009 | { | |
98604e3a | 3010 | Float_t deltaPhi = phiTrig-phi; |
3011 | if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi(); | |
3012 | if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi(); | |
3013 | ||
3014 | if(pt > ptTrig && deltaPhi < TMath::PiOver2()) return kFALSE; | |
c8ad7ead | 3015 | } |
3016 | //jump out this event if there is any other particle with pt larger than trigger | |
2b65bd0e | 3017 | else |
c8ad7ead | 3018 | { |
f3c47a7f | 3019 | if(pt > ptTrig) return kFALSE ; |
c8ad7ead | 3020 | } |
3021 | }// track loop | |
3022 | ||
2b65bd0e | 3023 | // Compare if it is leading of all calorimeter clusters |
3024 | ||
f3c47a7f | 3025 | if(fCheckLeadingWithNeutralClusters) |
2b65bd0e | 3026 | { |
f3c47a7f | 3027 | // Select the calorimeter cluster list |
3028 | TObjArray * nePl = 0x0; | |
3029 | if (pLeading->GetDetector() == "PHOS" ) | |
3030 | nePl = GetPHOSClusters(); | |
3031 | else | |
3032 | nePl = GetEMCALClusters(); | |
2b65bd0e | 3033 | |
f3c47a7f | 3034 | if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available. |
2b65bd0e | 3035 | |
f3c47a7f | 3036 | TLorentzVector lv; |
3037 | for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ ) | |
2b65bd0e | 3038 | { |
f3c47a7f | 3039 | AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ; |
3040 | ||
3041 | if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ; | |
3042 | ||
3043 | cluster->GetMomentum(lv,GetVertex(0)); | |
3044 | ||
3045 | Float_t pt = lv.Pt(); | |
3046 | Float_t phi = lv.Phi() ; | |
3047 | if(phi < 0) phi+=TMath::TwoPi(); | |
3048 | ||
3049 | if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track. | |
3050 | ||
3051 | //jump out this event if near side associated particle pt larger than trigger | |
3052 | // not really needed for calorimeter, unless DCal is included | |
3053 | if (fMakeNearSideLeading) | |
3054 | { | |
98604e3a | 3055 | Float_t deltaPhi = phiTrig-phi; |
3056 | if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi(); | |
3057 | if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi(); | |
3058 | ||
3059 | if(pt > ptTrig && deltaPhi < TMath::PiOver2()) return kFALSE ; | |
f3c47a7f | 3060 | } |
3061 | //jump out this event if there is any other particle with pt larger than trigger | |
3062 | else | |
3063 | { | |
3064 | if(pt > ptTrig) return kFALSE ; | |
3065 | } | |
3066 | }// cluster loop | |
3067 | } // check neutral clusters | |
3068 | ||
3069 | fLeadingTriggerIndex = index ; | |
1f8591af | 3070 | pLeading->SetLeadingParticle(kTRUE); |
3071 | ||
f3c47a7f | 3072 | if( GetDebug() > 1 ) printf("\t particle AOD with index %d is leading with pT %2.2f\n", fLeadingTriggerIndex, pLeading->Pt()); |
2b65bd0e | 3073 | |
c8ad7ead | 3074 | return kTRUE; |
e09cf5ef | 3075 | |
3076 | } | |
3077 | ||
05d0d05d | 3078 | //_________________________________________________________________ |
8e8bfd92 | 3079 | void AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() |
e09cf5ef | 3080 | { |
3081 | //Particle-Hadron Correlation Analysis, fill histograms | |
3082 | ||
3f150b4b | 3083 | if(!GetInputAODBranch()) |
3084 | { | |
7a12c958 | 3085 | AliFatal(Form("No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data())); |
3086 | return ; // coverity | |
e09cf5ef | 3087 | } |
3088 | ||
c8ad7ead | 3089 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); |
3090 | if( naod == 0 ) | |
3091 | { | |
3092 | if(GetDebug() > 1) | |
3093 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No particle AOD found! \n"); | |
3094 | ||
3095 | return ; // no trigger particles found. | |
3096 | } | |
3097 | ||
55c20a99 | 3098 | if(GetDebug() > 1) |
3f150b4b | 3099 | { |
55c20a99 | 3100 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n"); |
c8ad7ead | 3101 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", naod); |
55c20a99 | 3102 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In CTS aod entries %d\n", GetCTSTracks()->GetEntriesFast()); |
f3c47a7f | 3103 | } |
7a12c958 | 3104 | |
1f8591af | 3105 | //------------------------------------------------------ |
55c20a99 | 3106 | // Find leading trigger if analysis request only leading, |
3107 | // if there is no leading trigger, then skip the event | |
8e8bfd92 | 3108 | |
1f8591af | 3109 | Int_t iaod = 0 ; |
3110 | if( fMakeAbsoluteLeading || fMakeNearSideLeading ) | |
7a12c958 | 3111 | { |
1f8591af | 3112 | Bool_t leading = IsTriggerTheEventLeadingParticle(); |
7d306daf | 3113 | |
1f8591af | 3114 | if(GetDebug() > 1) |
3115 | printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - AOD Leading trigger? %d, with index %d\n",leading,fLeadingTriggerIndex); | |
3116 | ||
3117 | if(!leading) | |
547c2f01 | 3118 | { |
1f8591af | 3119 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading was requested and not found\n"); |
3120 | return ; | |
3121 | } | |
3122 | else | |
3123 | { | |
3124 | // Select only the leading in the trigger AOD loop | |
8d7fba83 | 3125 | naod = fLeadingTriggerIndex+1 ; |
3126 | iaod = fLeadingTriggerIndex ; | |
9623bf34 | 3127 | } |
7a12c958 | 3128 | } |
7a12c958 | 3129 | |
8e8bfd92 | 3130 | //------------------------------------------------------ |
3131 | // Get event multiplicity and bins | |
3132 | ||
1f8591af | 3133 | Float_t cen = GetEventCentrality(); |
3134 | Float_t ep = GetEventPlaneAngle(); | |
b6afb6b1 | 3135 | if(fFillHighMultHistograms) fhTriggerEventPlaneCentrality->Fill(cen,ep); |
1f8591af | 3136 | |
3137 | Int_t mixEventBin = GetEventMixBin(); | |
3138 | Int_t vzbin = GetEventVzBin(); | |
55c20a99 | 3139 | |
8e8bfd92 | 3140 | //------------------------------------------------------ |
3141 | // Loop on trigger AOD | |
3142 | ||
1f8591af | 3143 | for( iaod = 0; iaod < naod; iaod++ ) |
7a12c958 | 3144 | { |
1f8591af | 3145 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); |
3146 | ||
8e8bfd92 | 3147 | // |
3148 | // Trigger particle selection criteria: | |
3149 | // | |
1f8591af | 3150 | Float_t pt = particle->Pt(); |
8e8bfd92 | 3151 | |
1f8591af | 3152 | if(pt < GetMinPt() || pt > GetMaxPt() ) continue ; |
3153 | ||
3154 | fhPtTriggerInput->Fill(pt); | |
3155 | ||
8e8bfd92 | 3156 | // |
3157 | // check if it was a calorimeter cluster | |
3158 | // and if the shower shape cut was requested apply it. | |
3159 | // Not needed if already done at the particle identification level, | |
3160 | // but for isolation studies, it is preferred not to remove so we do it here | |
3161 | // | |
1f8591af | 3162 | Int_t clID1 = particle->GetCaloLabel(0) ; |
3163 | Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set. | |
8e8bfd92 | 3164 | if( GetDebug() > 1 ) printf("%s Trigger : id1 %d, id2 %d, min %f, max %f, det %s\n", |
3165 | GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data()); | |
1f8591af | 3166 | |
1f8591af | 3167 | if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0) |
3168 | { | |
3169 | Int_t iclus = -1; | |
3170 | TObjArray* clusters = 0x0; | |
3171 | if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters(); | |
3172 | else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters(); | |
3173 | ||
3174 | if(clusters) | |
3175 | { | |
3176 | AliVCluster *cluster = FindCluster(clusters,clID1,iclus); | |
3177 | Float_t m02 = cluster->GetM02(); | |
3178 | if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ; | |
3179 | } | |
3180 | ||
3181 | fhPtTriggerSSCut->Fill(pt); | |
3182 | } | |
3183 | ||
8e8bfd92 | 3184 | // |
1f8591af | 3185 | // Check if the particle is isolated or if we want to take the isolation into account |
8e8bfd92 | 3186 | // This bool is set in AliAnaParticleIsolation |
3187 | // | |
1f8591af | 3188 | if(OnlyIsolated()) |
3189 | { | |
3190 | if( !particle->IsIsolated() ) continue; | |
3191 | fhPtTriggerIsoCut->Fill(pt); | |
3192 | } | |
3193 | ||
8e8bfd92 | 3194 | // |
1f8591af | 3195 | // Check if trigger is in fiducial region |
8e8bfd92 | 3196 | // |
1f8591af | 3197 | if(IsFiducialCutOn()) |
3198 | { | |
3199 | Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ; | |
3200 | if(! in ) continue ; | |
3201 | } | |
3202 | ||
3203 | fhPtTriggerFidCut->Fill(pt); | |
3204 | ||
8e8bfd92 | 3205 | //--------------------------------------- |
3206 | // Make correlation | |
1f8591af | 3207 | |
6b013448 | 3208 | // Find the leading hadron in the opposite hemisphere to the triggeer |
3209 | // and accept the trigger if leading is in defined window. | |
3210 | Bool_t okLeadHad = kTRUE; | |
98604e3a | 3211 | if(fSelectLeadingHadronAngle || fFillLeadHadOppositeHisto) |
3212 | { | |
6b013448 | 3213 | okLeadHad = FindLeadingOppositeHadronInWindow(particle); |
98604e3a | 3214 | if(!okLeadHad && fSelectLeadingHadronAngle) continue; |
3215 | } | |
6b013448 | 3216 | |
5267de40 | 3217 | // |
6b013448 | 3218 | // Charged particles correlation |
5267de40 | 3219 | // |
3220 | MakeChargedCorrelation(particle); | |
3221 | ||
3222 | // MC | |
be2df971 | 3223 | Int_t mcIndex = -1; |
1f8591af | 3224 | if(IsDataMC()) |
be2df971 | 3225 | { |
3226 | mcIndex = GetMCTagHistogramIndex(particle->GetTag()); | |
3227 | MakeMCChargedCorrelation(particle->GetLabel(), mcIndex); | |
3228 | } | |
1f8591af | 3229 | |
5267de40 | 3230 | // Do own mixed event with charged, |
3231 | // add event and remove previous or fill the mixed histograms | |
3232 | if(DoOwnMix()) | |
3233 | MakeChargedMixCorrelation(particle); | |
3234 | ||
3235 | // | |
6b013448 | 3236 | // Neutral particles correlation |
5267de40 | 3237 | // |
8e8bfd92 | 3238 | if(fNeutralCorr) |
bf01409a | 3239 | MakeNeutralCorrelation(particle); |
1f8591af | 3240 | |
b6afb6b1 | 3241 | //---------------------------------------------------------------- |
bf01409a | 3242 | // Fill trigger pT related histograms if not absolute leading |
df77176b | 3243 | |
8e8bfd92 | 3244 | // |
55c20a99 | 3245 | // pT of the trigger, vs trigger origin if MC |
8e8bfd92 | 3246 | // |
55c20a99 | 3247 | fhPtTrigger->Fill(pt); |
be2df971 | 3248 | if(IsDataMC() && mcIndex >=0 && mcIndex < 7) |
55c20a99 | 3249 | fhPtTriggerMC[mcIndex]->Fill(pt); |
1f8591af | 3250 | |
48c5da66 | 3251 | if(fDecayTrigger) |
3252 | { | |
3253 | Int_t decayTag = particle->GetBtag(); // temporary | |
3254 | if(decayTag > 0) | |
3255 | { | |
3256 | for(Int_t ibit = 0; ibit<fNDecayBits; ibit++) | |
3257 | { | |
3258 | if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) | |
3259 | { | |
3260 | fhPtDecayTrigger[ibit]->Fill(pt); | |
3261 | ||
3262 | if(IsDataMC() && mcIndex >=0 && mcIndex < 7) | |
3263 | fhPtDecayTriggerMC[ibit][mcIndex]->Fill(pt); | |
3264 | } | |
3265 | } | |
3266 | } | |
3267 | } | |
3268 | ||
8e8bfd92 | 3269 | // |
55c20a99 | 3270 | // Acceptance of the trigger |
8e8bfd92 | 3271 | // |
1f8591af | 3272 | Float_t phi = particle->Phi(); |
2af40966 | 3273 | if( phi < 0 ) phi+=TMath::TwoPi(); |
55c20a99 | 3274 | fhPhiTrigger->Fill(pt, phi); |
1f8591af | 3275 | |
55c20a99 | 3276 | fhEtaTrigger->Fill(pt, particle->Eta()); |
3277 | //printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Trigger particle : pt %f, eta %f, phi %f\n",particle->Pt(),particle->Eta(),phi); | |
1f8591af | 3278 | |
3279 | //---------------------------------- | |
3280 | // Trigger particle pT vs event bins | |
3281 | ||
55c20a99 | 3282 | fhPtTriggerBin->Fill(pt,mixEventBin); |
1f8591af | 3283 | if(fCorrelVzBin) |
55c20a99 | 3284 | fhPtTriggerVzBin->Fill(pt,vzbin); |
1f8591af | 3285 | |
b6afb6b1 | 3286 | if(fFillHighMultHistograms) |
3287 | { | |
3288 | fhPtTriggerCentrality->Fill(pt,cen); | |
3289 | fhPtTriggerEventPlane->Fill(pt,ep); | |
3290 | } | |
1f8591af | 3291 | |
3292 | //---------------------------------- | |
3293 | // Trigger particle pT vs pile-up | |
3294 | ||
3295 | if(fFillPileUpHistograms) | |
3296 | { | |
3297 | Int_t vtxBC = GetReader()->GetVertexBC(); | |
55c20a99 | 3298 | if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTriggerVtxBC0->Fill(pt); |
3299 | ||
3300 | if(GetReader()->IsPileUpFromSPD()) fhPtTriggerPileUp[0]->Fill(pt); | |
3301 | if(GetReader()->IsPileUpFromEMCal()) fhPtTriggerPileUp[1]->Fill(pt); | |
3302 | if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTriggerPileUp[2]->Fill(pt); | |
3303 | if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTriggerPileUp[3]->Fill(pt); | |
3304 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTriggerPileUp[4]->Fill(pt); | |
3305 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTriggerPileUp[5]->Fill(pt); | |
3306 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTriggerPileUp[6]->Fill(pt); | |
1f8591af | 3307 | } |
df77176b | 3308 | } // AOD trigger loop |
e09cf5ef | 3309 | |
045396c8 | 3310 | //Reinit for next event |
3311 | fLeadingTriggerIndex = -1; | |
e09cf5ef | 3312 | |
045396c8 | 3313 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n"); |
e09cf5ef | 3314 | } |
3315 | ||
5267de40 | 3316 | //_______________________________________________________________________________________________________ |
3317 | void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle) | |
e09cf5ef | 3318 | { |
3319 | // Charged Hadron Correlation Analysis | |
283f989c | 3320 | if(GetDebug() > 1) |
3321 | printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n"); | |
907b38cd | 3322 | |
3323 | Float_t phiTrig = aodParticle->Phi(); | |
3324 | Float_t etaTrig = aodParticle->Eta(); | |
3325 | Float_t ptTrig = aodParticle->Pt(); | |
b1f720a7 | 3326 | Int_t mcTag = aodParticle->GetTag(); |
fedea415 | 3327 | Double_t bz = GetReader()->GetInputEvent()->GetMagneticField(); |
3328 | ||
e7d2373d | 3329 | |
3330 | Int_t decayTag = 0; | |
3331 | if(fDecayTrigger) | |
3332 | { | |
3333 | //decay = aodParticle->IsTagged(); | |
3334 | decayTag = aodParticle->GetBtag(); // temporary | |
3335 | if(decayTag < 0) decayTag = 0; // temporary | |
3336 | // printf("Correlation: pT %2.2f, BTag %d, Tagged %d\n",ptTrig, decayTag, aodParticle->IsTagged()); | |
3337 | // printf("\t check bit Pi0 %d, Eta %d, Pi0Side %d, EtaSide %d\n", | |
3338 | // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0), | |
3339 | // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEta), | |
3340 | // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kPi0Side), | |
3341 | // GetNeutralMesonSelection()->CheckDecayBit(decayTag,AliNeutralMesonSelection::kEtaSide)); | |
3342 | } | |
3343 | ||
907b38cd | 3344 | Float_t pt = -100. ; |
907b38cd | 3345 | Float_t phi = -100. ; |
3346 | Float_t eta = -100. ; | |
907b38cd | 3347 | Float_t deltaPhi = -100. ; |
e09cf5ef | 3348 | |
907b38cd | 3349 | TVector3 p3; |
3350 | TLorentzVector photonMom ; | |
3351 | TObjArray * reftracks = 0x0; | |
3352 | Int_t nrefs = 0; | |
907b38cd | 3353 | |
3354 | // Mixed event settings | |
3355 | Int_t evtIndex11 = -1 ; // cluster trigger or pi0 trigger | |
045396c8 | 3356 | Int_t evtIndex12 = -1 ; // pi0 trigger |
3357 | Int_t evtIndex13 = -1 ; // charged trigger | |
045396c8 | 3358 | |
04f7a616 | 3359 | if (GetMixedEvent()) |
3360 | { | |
e09cf5ef | 3361 | evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ; |
3362 | evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ; | |
3363 | evtIndex13 = GetMixedEvent()->EventIndex(aodParticle->GetTrackLabel(0)) ; | |
3364 | } | |
3365 | ||
98604e3a | 3366 | // Track multiplicity or cent bin |
3367 | Int_t cenbin = 0; | |
3368 | if(fFillHighMultHistograms) cenbin = GetEventCentralityBin(); | |
3369 | ||
6d9932e2 | 3370 | // |
98604e3a | 3371 | // In case of pi0/eta trigger, we may want to check their decay correlation, |
907b38cd | 3372 | // get their decay children |
6d9932e2 | 3373 | // |
907b38cd | 3374 | TLorentzVector decayMom1; |
3375 | TLorentzVector decayMom2; | |
3376 | Bool_t decayFound = kFALSE; | |
6d9932e2 | 3377 | if( fPi0Trigger ) |
3378 | { | |
3379 | decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2); | |
3380 | if(decayFound) | |
3381 | { | |
3382 | fhPtPi0DecayRatio->Fill(ptTrig, decayMom1.Pt()/ptTrig); | |
3383 | fhPtPi0DecayRatio->Fill(ptTrig, decayMom2.Pt()/ptTrig); | |
3384 | } | |
3385 | } | |
3386 | ||
907b38cd | 3387 | //----------------------------------------------------------------------- |
f7408d50 | 3388 | // Track loop, select tracks with good pt, phi and fill AODs or histograms |
907b38cd | 3389 | //----------------------------------------------------------------------- |
f7408d50 | 3390 | |
8e8bfd92 | 3391 | for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ ) |
547c2f01 | 3392 | { |
8e8bfd92 | 3393 | AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ; |
045396c8 | 3394 | |
e09cf5ef | 3395 | Double_t mom[3] = {track->Px(),track->Py(),track->Pz()}; |
3396 | p3.SetXYZ(mom[0],mom[1],mom[2]); | |
3397 | pt = p3.Pt(); | |
e09cf5ef | 3398 | eta = p3.Eta(); |
3399 | phi = p3.Phi() ; | |
3400 | if(phi < 0) phi+=TMath::TwoPi(); | |
045396c8 | 3401 | |
e09cf5ef | 3402 | //Select only hadrons in pt range |
66e64043 | 3403 | if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ; |
3404 | ||
e09cf5ef | 3405 | //remove trigger itself for correlation when use charged triggers |
3406 | if( track->GetID() == aodParticle->GetTrackLabel(0) || track->GetID() == aodParticle->GetTrackLabel(1) || | |
66e64043 | 3407 | track->GetID() == aodParticle->GetTrackLabel(2) || track->GetID() == aodParticle->GetTrackLabel(3) ) |
045396c8 | 3408 | continue ; |
3409 | ||
b6afb6b1 | 3410 | //Only for mixed event frame |
045396c8 | 3411 | Int_t evtIndex2 = 0 ; |
04f7a616 | 3412 | if (GetMixedEvent()) |
3413 | { | |
045396c8 | 3414 | evtIndex2 = GetMixedEvent()->EventIndex(track->GetID()) ; |
3415 | if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || evtIndex13 == evtIndex2 ) // photon and track from different events | |
3416 | continue ; | |
3417 | //vertex cut | |
3418 | if (TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut()) | |
5267de40 | 3419 | continue; |
045396c8 | 3420 | } |
3421 | ||
b6afb6b1 | 3422 | if(GetDebug() > 2 ) |
2b65bd0e | 3423 | printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta); |
3424 | ||
b6afb6b1 | 3425 | // ------------------------------ |
3426 | // Track type bin or bits setting | |
3427 | // | |
3428 | ||
3429 | // | |
3430 | // * Set the pt associated bin for the defined bins * | |
3431 | // | |
2b65bd0e | 3432 | Int_t assocBin = -1; |
3433 | for(Int_t i = 0 ; i < fNAssocPtBins ; i++) | |
3434 | { | |
3435 | if(pt > fAssocPtBinLimit[i] && pt < fAssocPtBinLimit[i+1]) assocBin= i; | |
3436 | } | |
3437 | ||
b6afb6b1 | 3438 | // |
3439 | // * Assign to the histogram array a bin corresponding | |
3440 | // to a combination of pTa and vz bins * | |
3441 | // | |
2b65bd0e | 3442 | Int_t nz = 1; |
3443 | Int_t vz = 0; | |
3444 | ||
3445 | if(fCorrelVzBin) | |
3446 | { | |
3447 | nz = GetNZvertBin(); | |
3448 | vz = GetEventVzBin(); | |
3449 | } | |
3450 | ||
3451 | Int_t bin = assocBin*nz+vz; | |
3452 | ||
3453 | //printf("assoc Bin = %d, vZ bin = %d, bin = %d \n", assocBin,GetEventVzBin(),bin); | |
3454 | ||
b6afb6b1 | 3455 | // |
3456 | // * Get the status of the TOF bit * | |
3457 | // | |
2b65bd0e | 3458 | ULong_t status = track->GetStatus(); |
3459 | Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ; | |
3460 | //Double32_t tof = track->GetTOFsignal()*1e-3; | |
3461 | Int_t trackBC = track->GetTOFBunchCrossing(bz); | |
3462 | ||
3463 | Int_t outTOF = -1; | |
3464 | if (okTOF && trackBC!=0) outTOF = 1; | |
3465 | else if(okTOF && trackBC==0) outTOF = 0; | |
3466 | ||
b6afb6b1 | 3467 | //---------------- |
3468 | // Fill Histograms | |
d4a8ff9a | 3469 | |
b6afb6b1 | 3470 | // |
3471 | // Azimuthal Angle histograms | |
3472 | // | |
2af40966 | 3473 | |
6ed1ad3e | 3474 | deltaPhi = phiTrig-phi; |
2af40966 | 3475 | |
3476 | // | |
3477 | // Calculate deltaPhi shift so that for the particles on the opposite side | |
3478 | // it is defined between 90 and 270 degrees | |
3479 | // Shift [-360,-90] to [0, 270] | |
3480 | // and [270,360] to [-90,0] | |
6ed1ad3e | 3481 | if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi(); |
3482 | if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi(); | |
3483 | ||
2b65bd0e | 3484 | FillChargedAngularCorrelationHistograms(pt, ptTrig, bin, phi, phiTrig, deltaPhi, |
e7d2373d | 3485 | eta, etaTrig, decayTag, track->GetHMPIDsignal(), |
d4a8ff9a | 3486 | outTOF, cenbin, mcTag); |
2af40966 | 3487 | |
b6afb6b1 | 3488 | // |
3489 | // Imbalance zT/xE/pOut histograms | |
3490 | // | |
2b65bd0e | 3491 | |
b6afb6b1 | 3492 | // |
3493 | // Delta phi cut for momentum imbalance correlation | |
3494 | // | |
2b65bd0e | 3495 | if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) ) |
d4a8ff9a | 3496 | FillChargedMomentumImbalanceHistograms(ptTrig, pt, deltaPhi, cenbin, track->Charge(), |
e7d2373d | 3497 | assocBin, decayTag, outTOF, mcTag); |
b6afb6b1 | 3498 | |
6ed1ad3e | 3499 | // |
3500 | // Underlying event, right side, default case | |
3501 | // | |
2b65bd0e | 3502 | if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) ) |
d4a8ff9a | 3503 | FillChargedUnderlyingEventHistograms(ptTrig, pt, deltaPhi, cenbin, outTOF); |
2b65bd0e | 3504 | |
b6afb6b1 | 3505 | // |
3506 | // Several UE calculation, in different perpendicular regions, up to 6: | |
3507 | // left, right, upper-left, lower left, upper-right, lower-right | |
3508 | // | |
3509 | if(fMakeSeveralUE) | |
3510 | FillChargedUnderlyingEventSidesHistograms(ptTrig,pt,deltaPhi); | |
3511 | ||
3512 | // | |
2b65bd0e | 3513 | if(fPi0Trigger && decayFound) |
3514 | FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ; | |
3515 | ||
b6afb6b1 | 3516 | // |
3517 | // Add track reference to array | |
3518 | // | |
2b65bd0e | 3519 | if(fFillAODWithReferences) |
547c2f01 | 3520 | { |
e09cf5ef | 3521 | nrefs++; |
547c2f01 | 3522 | if(nrefs==1) |
3523 | { | |
e09cf5ef | 3524 | reftracks = new TObjArray(0); |
2b65bd0e | 3525 | TString trackname = Form("%sTracks", GetAODObjArrayName().Data()); |
045396c8 | 3526 | reftracks->SetName(trackname.Data()); |
2b65bd0e | 3527 | reftracks->SetOwner(kFALSE); |
e09cf5ef | 3528 | } |
029dea5a | 3529 | |
e09cf5ef | 3530 | reftracks->Add(track); |
2b65bd0e | 3531 | }// reference track to AOD |
e09cf5ef | 3532 | }// track loop |
3533 | ||
3534 | //Fill AOD with reference tracks, if not filling histograms | |
2b65bd0e | 3535 | if(fFillAODWithReferences && reftracks) |
547c2f01 | 3536 | { |
e09cf5ef | 3537 | aodParticle->AddObjArray(reftracks); |
3538 | } | |
e09cf5ef | 3539 | |
3540 | } | |
3541 | ||
7ed3a248 | 3542 | //_________________________________________________________________________________________________________ |
3543 | void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4ParticleCorrelation *aodParticle) | |
029dea5a | 3544 | { |
2e876d85 | 3545 | // Mix current trigger with tracks in another MB event |
029dea5a | 3546 | |
2e876d85 | 3547 | if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n"); |
029dea5a | 3548 | |
3549 | if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame | |
3550 | ||
029dea5a | 3551 | // Get the event with similar caracteristics |
2e876d85 | 3552 | //printf("MakeChargedMixCorrelation for %s\n",GetInputAODName().Data()); |
3553 | ||
3554 | AliAnalysisManager * manager = AliAnalysisManager::GetAnalysisManager(); | |
c52aeef5 | 3555 | |
2e876d85 | 3556 | AliInputEventHandler * inputHandler = dynamic_cast<AliInputEventHandler*>(manager->GetInputEventHandler()); |
c52aeef5 | 3557 | |
3558 | if(!inputHandler) return; | |
3559 | ||
2e876d85 | 3560 | if(!(inputHandler->IsEventSelected( ) & GetReader()->GetEventTriggerMask())) return; |
efb540af | 3561 | |
029dea5a | 3562 | // Get the pool, check if it exits |
2e876d85 | 3563 | Int_t eventBin = GetEventMixBin(); |
029dea5a | 3564 | |
d4a8ff9a | 3565 | //Check that the bin exists, if not (bad determination of RP, ntrality or vz bin) do nothing |
2e876d85 | 3566 | if(eventBin < 0) return; |
de9949a4 | 3567 | |
3568 | fhEventBin->Fill(eventBin); | |
029dea5a | 3569 | |
de9949a4 | 3570 | // get neutral clusters pool? |
3571 | Bool_t isoCase = OnlyIsolated() && (GetIsolationCut()->GetParticleTypeInCone() != AliIsolationCut::kOnlyCharged); | |
3572 | Bool_t neutralMix = fFillNeutralEventMixPool || isoCase ; | |
3573 | ||
d07ffd54 | 3574 | TList * pool = 0; |
3575 | TList * poolCalo = 0; | |
3576 | if(fUseMixStoredInReader) | |
3577 | { | |
3578 | pool = GetReader()->GetListWithMixedEventsForTracks(eventBin); | |
de9949a4 | 3579 | if(neutralMix) poolCalo = GetReader()->GetListWithMixedEventsForCalo (eventBin); |
d07ffd54 | 3580 | } |
3581 | else | |
3582 | { | |
3583 | pool = fListMixTrackEvents[eventBin]; | |
de9949a4 | 3584 | if(neutralMix) poolCalo = fListMixCaloEvents [eventBin]; |
d07ffd54 | 3585 | } |
3586 | ||
2e876d85 | 3587 | if(!pool) return ; |
029dea5a | 3588 | |
de9949a4 | 3589 | if( neutralMix && !poolCalo ) |
d07ffd54 | 3590 | printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n"); |
3591 | ||
029dea5a | 3592 | Double_t ptTrig = aodParticle->Pt(); |
3593 | Double_t etaTrig = aodParticle->Eta(); | |
3594 | Double_t phiTrig = aodParticle->Phi(); | |
3595 | if(phiTrig < 0.) phiTrig+=TMath::TwoPi(); | |
3596 | ||
2e876d85 | 3597 | if(GetDebug() > 1) |
55c20a99 | 3598 | printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f\n", |
283f989c | 3599 | eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig); |
029dea5a | 3600 | |
3601 | Double_t ptAssoc = -999.; | |
2e876d85 | 3602 | Double_t phiAssoc = -999.; |
029dea5a | 3603 | Double_t etaAssoc = -999.; |
3604 | Double_t deltaPhi = -999.; | |
3605 | Double_t deltaEta = -999.; | |
2af40966 | 3606 | Double_t xE = -999.; |
3607 | ||
efb540af | 3608 | // Start from first event in pool except if in this same event the pool was filled |
283f989c | 3609 | Int_t ev0 = 0; |
3610 | if(GetReader()->GetLastTracksMixedEvent() == GetEventNumber()) ev0 = 1; | |
7ed3a248 | 3611 | |
283f989c | 3612 | for(Int_t ev=ev0; ev < pool->GetSize(); ev++) |
029dea5a | 3613 | { |
efb540af | 3614 | // |
3615 | // Recover the lists of tracks or clusters | |
3616 | // | |
029dea5a | 3617 | TObjArray* bgTracks = static_cast<TObjArray*>(pool->At(ev)); |
2bb7ac98 | 3618 | TObjArray* bgCalo = 0; |
3619 | ||
efb540af | 3620 | // Recover the clusters list if requested |
de9949a4 | 3621 | if( neutralMix && poolCalo ) |
7ed3a248 | 3622 | { |
d07ffd54 | 3623 | if(pool->GetSize()!=poolCalo->GetSize()) |
3624 | printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n"); | |
3625 | ||
2bb7ac98 | 3626 | bgCalo = static_cast<TObjArray*>(poolCalo->At(ev)); |
d07ffd54 | 3627 | |
3628 | if(!bgCalo) | |
3629 | printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev); | |
7ed3a248 | 3630 | } |
3631 | ||
efb540af | 3632 | // |
3633 | // Isolate the trigger in the mixed event with mixed tracks and clusters | |
3634 | // | |
3635 | if( OnlyIsolated() ) | |
3636 | { | |
3c12e375 | 3637 | Int_t n=0, nfrac = 0; |
3638 | Bool_t isolated = kFALSE; | |
3639 | Float_t coneptsum = 0, coneptlead = 0; | |
efb540af | 3640 | GetIsolationCut()->MakeIsolationCut(bgTracks,bgCalo, |
3641 | GetReader(), GetCaloPID(), | |
3642 | kFALSE, aodParticle, "", | |
3c12e375 | 3643 | n,nfrac,coneptsum,coneptlead,isolated); |
efb540af | 3644 | |
3645 | //printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Isolated? %d - cone %f, ptthres %f", | |
3646 | // isolated,GetIsolationCut()->GetConeSize(),GetIsolationCut()->GetPtThreshold()); | |
3647 | //if(bgTracks)printf(" - n track %d", bgTracks->GetEntriesFast()); | |
3648 | //printf("\n"); | |
3649 | ||
3650 | if(!isolated) continue ; | |
3651 | } | |
029dea5a | 3652 | |
efb540af | 3653 | // |
3654 | // Check if the trigger is leading of mixed event | |
3655 | // | |
2e876d85 | 3656 | Int_t nTracks=bgTracks->GetEntriesFast(); |
2e876d85 | 3657 | |
d0b625bc | 3658 | if(fMakeNearSideLeading || fMakeAbsoluteLeading) |
3659 | { | |
3660 | Bool_t leading = kTRUE; | |
efb540af | 3661 | for(Int_t jlead = 0;jlead < nTracks; jlead++ ) |
d0b625bc | 3662 | { |
3663 | AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(jlead) ; | |
3664 | ||
3665 | ptAssoc = track->Pt(); | |
3666 | phiAssoc = track->Phi() ; | |
d0b625bc | 3667 | if(phiAssoc < 0) phiAssoc+=TMath::TwoPi(); |
32e92d8b | 3668 | |
d0b625bc | 3669 | if (fMakeNearSideLeading) |
3670 | { | |
98604e3a | 3671 | deltaPhi = phiTrig-phiAssoc; |
3672 | if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi(); | |
3673 | if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi(); | |
3674 | ||
3675 | if(ptAssoc > ptTrig && deltaPhi < TMath::PiOver2()) | |
d0b625bc | 3676 | { |
3677 | leading = kFALSE; | |
3678 | break; | |
3679 | } | |
3680 | } | |
3681 | //jump out this event if there is any other particle with pt larger than trigger | |
3682 | else if(fMakeAbsoluteLeading) | |
3683 | { | |
3684 | if(ptAssoc > ptTrig) | |
3685 | { | |
3686 | leading = kFALSE; | |
d0b625bc | 3687 | break; |
3688 | } | |
3689 | } | |
3690 | } | |
2bb7ac98 | 3691 | |
efb540af | 3692 | if( !neutralMix && fCheckLeadingWithNeutralClusters ) |
3693 | printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Leading of clusters requested but no clusters in mixed event\n"); | |
3694 | ||
3695 | if(neutralMix && fCheckLeadingWithNeutralClusters && bgCalo) | |
2bb7ac98 | 3696 | { |
3697 | Int_t nClusters=bgCalo->GetEntriesFast(); | |
3698 | TLorentzVector mom ; | |
3699 | for(Int_t jlead = 0;jlead <nClusters; jlead++ ) | |
3700 | { | |
152c5ca9 | 3701 | AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ; |
2bb7ac98 | 3702 | |
152c5ca9 | 3703 | ptAssoc = cluster->Pt(); |
3704 | phiAssoc = cluster->Phi() ; | |
2bb7ac98 | 3705 | if(phiAssoc < 0) phiAssoc+=TMath::TwoPi(); |
32e92d8b | 3706 | |
2bb7ac98 | 3707 | if (fMakeNearSideLeading) |
3708 | { | |
98604e3a | 3709 | deltaPhi = phiTrig-phiAssoc; |
3710 | if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi(); | |
3711 | if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi(); | |
3712 | ||
3713 | if(ptAssoc > ptTrig && deltaPhi < TMath::PiOver2()) | |
2bb7ac98 | 3714 | { |
3715 | leading = kFALSE; | |
3716 | break; | |
3717 | } | |
3718 | } | |
3719 | //jump out this event if there is any other particle with pt larger than trigger | |
3720 | else if(fMakeAbsoluteLeading) | |
3721 | { | |
3722 | if(ptAssoc > ptTrig) | |
3723 | { | |
3724 | leading = kFALSE; | |
3725 | break; | |
3726 | } | |
3727 | } | |
3728 | } | |
3729 | } | |
3730 | ||
d0b625bc | 3731 | if(!leading) continue; // not leading, check the next event in pool |
3732 | } | |
3733 | ||
32e92d8b | 3734 | // |
3735 | // Fill histograms for selected triggers | |
3736 | // | |
3737 | ||
efb540af | 3738 | fhEventMixBin->Fill(eventBin); |
3739 | ||
3740 | //printf("\t Read Pool event %d, nTracks %d\n",ev,nTracks); | |
3741 | ||
55c20a99 | 3742 | fhPtTriggerMixed ->Fill(ptTrig); |
3743 | fhPhiTriggerMixed ->Fill(ptTrig, phiTrig); | |
3744 | fhEtaTriggerMixed ->Fill(ptTrig, etaTrig); | |
3745 | fhPtTriggerMixedBin->Fill(ptTrig,eventBin); | |
3746 | if(fCorrelVzBin)fhPtTriggerMixedVzBin->Fill(ptTrig, GetEventVzBin()); | |
d0b625bc | 3747 | |
32e92d8b | 3748 | // |
3749 | // Correlation histograms | |
3750 | // | |
029dea5a | 3751 | for(Int_t j1 = 0;j1 <nTracks; j1++ ) |
3752 | { | |
3753 | AliAODPWG4Particle *track = (AliAODPWG4Particle*) bgTracks->At(j1) ; | |
3754 | ||
3755 | if(!track) continue; | |
3756 | ||
3757 | ptAssoc = track->Pt(); | |
3758 | etaAssoc = track->Eta(); | |
3759 | phiAssoc = track->Phi() ; | |
3760 | if(phiAssoc < 0) phiAssoc+=TMath::TwoPi(); | |
029dea5a | 3761 | |
3762 | deltaPhi = phiTrig-phiAssoc; | |
3763 | if(deltaPhi < -TMath::PiOver2()) deltaPhi+=TMath::TwoPi(); | |
3764 | if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi(); | |
3765 | deltaEta = etaTrig-etaAssoc; | |
3766 | ||
3767 | if(GetDebug()>0) | |
3768 | printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta); | |
3769 | ||
32e92d8b | 3770 | // Angular correlation |
2af40966 | 3771 | fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi); |
08f220c8 | 3772 | fhMixDeltaPhiDeltaEtaCharged->Fill(deltaPhi, deltaEta); |
3773 | ||
2af40966 | 3774 | // |
32e92d8b | 3775 | // Momentum imbalance |
2af40966 | 3776 | // |
18838011 | 3777 | if ( (deltaPhi > fDeltaPhiMinCut) && (deltaPhi < fDeltaPhiMaxCut) ) |
08f220c8 | 3778 | { |
2af40966 | 3779 | xE = -ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig); |
3780 | ||
3781 | if(xE < 0.) | |
3782 | printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
3783 | xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
3784 | ||
7d306daf | 3785 | fhMixXECharged->Fill(ptTrig,xE); |
2af40966 | 3786 | if(xE > 0 ) fhMixHbpXECharged->Fill(ptTrig, TMath::Log(1./xE)); |
08f220c8 | 3787 | } |
18838011 | 3788 | |
2af40966 | 3789 | // |
3790 | // Underlying event momentum imbalance | |
3791 | // | |
18838011 | 3792 | if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) ) |
3793 | { | |
3794 | //Underlying event region | |
3795 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); | |
3796 | Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi); | |
3797 | ||
2af40966 | 3798 | if(uexE < 0.) |
3799 | printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
3800 | uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
18838011 | 3801 | |
3802 | fhMixXEUeCharged->Fill(ptTrig,uexE); | |
3803 | } | |
3804 | ||
32e92d8b | 3805 | // Set the pt associated bin for the defined bins |
3806 | Int_t assocBin = -1; | |
3807 | for(Int_t i = 0 ; i < fNAssocPtBins ; i++) | |
3808 | { | |
3809 | if(ptAssoc > fAssocPtBinLimit[i] && ptAssoc < fAssocPtBinLimit[i+1]) assocBin= i; | |
3810 | } | |
3811 | ||
3812 | // | |
3813 | // Assign to the histogram array a bin corresponding to a combination of pTa and vz bins | |
3814 | // | |
3815 | Int_t nz = 1; | |
3816 | Int_t vz = 0; | |
3817 | ||
3818 | if(fCorrelVzBin) | |
3819 | { | |
3820 | nz = GetNZvertBin(); | |
3821 | vz = GetEventVzBin(); | |
3822 | } | |
3823 | ||
3824 | Int_t bin = assocBin*nz+vz; | |
3825 | ||
8cc41381 | 3826 | if(bin < 0) continue ; // this pt bin was not considered |
029dea5a | 3827 | |
a22f3f34 | 3828 | fhMixDeltaPhiChargedAssocPtBin [bin]->Fill(ptTrig, deltaPhi); |
3829 | fhMixDeltaPhiDeltaEtaChargedAssocPtBin[bin]->Fill(deltaPhi, deltaEta); | |
029dea5a | 3830 | |
a22f3f34 | 3831 | if(fFillEtaGapsHisto) |
3832 | { | |
3833 | if(TMath::Abs(deltaEta) > 0.8) | |
2af40966 | 3834 | fhMixDeltaPhiChargedAssocPtBinDEta08 [bin]->Fill(ptTrig, deltaPhi); |
a22f3f34 | 3835 | if(TMath::Abs(deltaEta) < 0.01) |
2af40966 | 3836 | fhMixDeltaPhiChargedAssocPtBinDEta0 [bin]->Fill(ptTrig, deltaPhi); |
a22f3f34 | 3837 | } |
3838 | ||
029dea5a | 3839 | } // track loop |
3840 | } // mixed event loop | |
3841 | } | |
3842 | ||
3843 | ||
bf01409a | 3844 | //_______________________________________________________________________________________________________ |
3845 | void AliAnaParticleHadronCorrelation::MakeNeutralCorrelation(AliAODPWG4ParticleCorrelation * aodParticle) | |
e09cf5ef | 3846 | { |
3847 | // Neutral Pion Correlation Analysis | |
8e8bfd92 | 3848 | |
3849 | TObjArray * pi0list = (TObjArray*) GetAODBranch(fPi0AODBranchName); // For the future, foresee more possible pi0 lists | |
bf01409a | 3850 | if(!pi0list) return ; |
8e8bfd92 | 3851 | |
3852 | Int_t npi0 = pi0list->GetEntriesFast(); | |
bf01409a | 3853 | if(npi0 == 0) return ; |
8e8bfd92 | 3854 | |
3855 | if(GetDebug() > 1) | |
3856 | printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Particle - pi0 correlation, %d pi0's\n",npi0); | |
e09cf5ef | 3857 | |
3858 | Int_t evtIndex11 = 0 ; | |
3859 | Int_t evtIndex12 = 0 ; | |
04f7a616 | 3860 | if (GetMixedEvent()) |
3861 | { | |
e09cf5ef | 3862 | evtIndex11 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(0)) ; |
3863 | evtIndex12 = GetMixedEvent()->EventIndexForCaloCluster(aodParticle->GetCaloLabel(1)) ; | |
3864 | } | |
3865 | ||
907b38cd | 3866 | Float_t pt = -100. ; |
24f5f633 | 3867 | Float_t zT = -100. ; |
907b38cd | 3868 | Float_t phi = -100. ; |
3869 | Float_t eta = -100. ; | |
3870 | Float_t xE = -100. ; | |
3871 | Float_t hbpXE= -100. ; | |
24f5f633 | 3872 | Float_t hbpZT= -100. ; |
907b38cd | 3873 | |
3874 | Float_t ptTrig = aodParticle->Pt(); | |
3875 | Float_t phiTrig = aodParticle->Phi(); | |
3876 | Float_t etaTrig = aodParticle->Eta(); | |
3877 | Float_t deltaPhi= -100. ; | |
6ed1ad3e | 3878 | Float_t deltaEta= -100. ; |
3f150b4b | 3879 | |
045396c8 | 3880 | TLorentzVector photonMom ; |
3881 | ||
907b38cd | 3882 | // In case of pi0/eta trigger, we may want to check their decay correlation, |
3883 | // get their decay children | |
3884 | TLorentzVector decayMom1; | |
3885 | TLorentzVector decayMom2; | |
3886 | Bool_t decayFound = kFALSE; | |
2b65bd0e | 3887 | if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2); |
e09cf5ef | 3888 | |
907b38cd | 3889 | TObjArray * refpi0 = 0x0; |
3890 | Int_t nrefs = 0; | |
e09cf5ef | 3891 | |
3892 | //Loop on stored AOD pi0 | |
547c2f01 | 3893 | |
8e8bfd92 | 3894 | for(Int_t iaod = 0; iaod < npi0 ; iaod++) |
547c2f01 | 3895 | { |
e09cf5ef | 3896 | AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (pi0list->At(iaod)); |
3897 | ||
3898 | Int_t evtIndex2 = 0 ; | |
3899 | Int_t evtIndex3 = 0 ; | |
04f7a616 | 3900 | if (GetMixedEvent()) |
3901 | { | |
e09cf5ef | 3902 | evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(0)) ; |
3903 | evtIndex3 = GetMixedEvent()->EventIndexForCaloCluster(pi0->GetCaloLabel(1)) ; | |
3904 | ||
045396c8 | 3905 | if (evtIndex11 == evtIndex2 || evtIndex12 == evtIndex2 || |
3906 | evtIndex11 == evtIndex3 || evtIndex12 == evtIndex3) // trigger and pi0 are not from different events | |
e09cf5ef | 3907 | continue ; |
3908 | } | |
907b38cd | 3909 | |
e09cf5ef | 3910 | pt = pi0->Pt(); |
6ed1ad3e | 3911 | |
66e64043 | 3912 | if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ; |
3913 | ||
521ef81f | 3914 | //remove trigger itself for correlation when use charged triggers |
3915 | if(aodParticle->GetCaloLabel(0) >= 0 && | |
3916 | (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(0) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(0))) continue ; | |
3917 | ||
3918 | if( aodParticle->GetCaloLabel(1) >= 0 && | |
3919 | (pi0->GetCaloLabel(0) == aodParticle->GetCaloLabel(1) || pi0->GetCaloLabel(1) == aodParticle->GetCaloLabel(1))) continue ; | |
3920 | ||
df77176b | 3921 | // |
3922 | // Angular correlations | |
3923 | // | |
6ed1ad3e | 3924 | phi = pi0->Phi() ; |
3925 | eta = pi0->Eta() ; | |
3926 | deltaEta = etaTrig-eta; | |
3927 | deltaPhi = phiTrig-phi; | |
3928 | if(deltaPhi <= -TMath::PiOver2()) deltaPhi+=TMath::TwoPi(); | |
3929 | if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi(); | |
2b65bd0e | 3930 | |
6ed1ad3e | 3931 | fhEtaNeutral ->Fill(pt , eta ); |
3932 | fhPhiNeutral ->Fill(pt , phi ); | |
3933 | fhDeltaEtaNeutral->Fill(ptTrig, deltaEta); | |
3934 | fhDeltaPhiNeutral->Fill(ptTrig, deltaPhi); | |
3935 | ||
3936 | if(pt > 2 ) fhDeltaPhiDeltaEtaNeutral->Fill(deltaPhi, deltaEta); | |
3937 | ||
df77176b | 3938 | // |
3939 | // Momentum imbalance | |
3940 | // | |
24f5f633 | 3941 | zT = pt/ptTrig ; |
2b65bd0e | 3942 | |
24f5f633 | 3943 | hbpZT = -100; |
df77176b | 3944 | hbpXE = -100; |
3945 | ||
24f5f633 | 3946 | if(zT > 0 ) hbpZT = TMath::Log(1./zT); |
2b65bd0e | 3947 | |
2b65bd0e | 3948 | //delta phi cut for correlation |
3949 | if( (deltaPhi > fDeltaPhiMinCut) && ( deltaPhi < fDeltaPhiMaxCut) ) | |
907b38cd | 3950 | { |
df77176b | 3951 | xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig); |
2af40966 | 3952 | |
3953 | if(xE < 0.) | |
3954 | printf("MakeNeutralCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n", | |
3955 | xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()); | |
3956 | ||
df77176b | 3957 | if(xE > 0 ) hbpXE = TMath::Log(1./xE); |
3958 | ||
2b65bd0e | 3959 | fhDeltaPhiNeutralPt->Fill(pt,deltaPhi); |
3960 | fhXENeutral ->Fill(ptTrig,xE); | |
3961 | fhPtHbpXENeutral ->Fill(ptTrig,hbpXE); | |
df77176b | 3962 | fhZTNeutral ->Fill(ptTrig,zT); |
3963 | fhPtHbpZTNeutral ->Fill(ptTrig,hbpZT); | |
907b38cd | 3964 | } |
2b65bd0e | 3965 | else if ( (deltaPhi > fUeDeltaPhiMinCut) && (deltaPhi < fUeDeltaPhiMaxCut) ) |
907b38cd | 3966 | { |
df77176b | 3967 | // Randomize angle for xE calculation |
3968 | Double_t randomphi = gRandom->Uniform(fDeltaPhiMinCut,fDeltaPhiMaxCut); | |
3969 | ||
3970 | xE = -(pt/ptTrig)*TMath::Cos(randomphi); | |
3971 | if(xE > 0 ) hbpXE = TMath::Log(1./xE); | |
3972 | ||
2b65bd0e | 3973 | fhDeltaPhiUeNeutralPt->Fill(pt,deltaPhi); |
df77176b | 3974 | fhZTUeNeutral ->Fill(ptTrig,zT); |
3975 | fhPtHbpZTUeNeutral ->Fill(ptTrig,hbpZT); | |
2b65bd0e | 3976 | fhXEUeNeutral ->Fill(ptTrig,xE); |
3977 | fhPtHbpXEUeNeutral ->Fill(ptTrig,hbpXE); | |
907b38cd | 3978 | } |
24f5f633 | 3979 | |
df77176b | 3980 | // Several UE calculation, not sure it is useful |
3981 | // with partical calorimter acceptance | |
fe69395f | 3982 | if(fMakeSeveralUE) FillNeutralUnderlyingEventSidesHistograms(ptTrig,pt,zT,hbpZT,deltaPhi); |
2b65bd0e | 3983 | |
df77176b | 3984 | // |
3985 | // Decay photon correlations | |
3986 | // | |
3987 | if(fPi0Trigger && decayFound) | |
3988 | FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ; | |
3989 | ||
2b65bd0e | 3990 | if(fFillAODWithReferences) |
547c2f01 | 3991 | { |
e09cf5ef | 3992 | nrefs++; |
547c2f01 | 3993 | if(nrefs==1) |
3994 | { | |
e09cf5ef | 3995 | refpi0 = new TObjArray(0); |
3996 | refpi0->SetName(GetAODObjArrayName()+"Pi0s"); | |
3997 | refpi0->SetOwner(kFALSE); | |
3998 | } | |
3999 | refpi0->Add(pi0); | |
4000 | }//put references in trigger AOD | |
045396c8 | 4001 | |
4002 | if(GetDebug() > 2 ) | |
8e8bfd92 | 4003 | printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta); |
045396c8 | 4004 | |
4005 | }//loop | |
4006 | ||
2b65bd0e | 4007 | //Fill AOD with reference tracks, if not filling histograms |
4008 | if(fFillAODWithReferences && refpi0) | |
4009 | { | |
4010 | aodParticle->AddObjArray(refpi0); | |
4011 | } | |
045396c8 | 4012 | } |
4013 | ||
be2df971 | 4014 | //____________________________________________________________________________________________ |
4015 | void AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(Int_t label, Int_t histoIndex) | |
d07cdf32 | 4016 | { |
045396c8 | 4017 | // Charged Hadron Correlation Analysis with MC information |
a426f453 | 4018 | |
d07cdf32 | 4019 | if ( GetDebug() > 1 ) |
4020 | AliInfo("Make trigger particle - charged hadron correlation in AOD MC level"); | |
045396c8 | 4021 | |
f2d29137 | 4022 | if( label < 0 ) |
4023 | { | |
4024 | if( GetDebug() > 0 ) AliInfo(Form(" *** bad label ***: label %d", label)); | |
4025 | return; | |
4026 | } | |
4027 | ||
be2df971 | 4028 | // Do MC correlation for a given particle type range. |
4029 | // Types defined in GetMCTagHistogramIndex: | |
4030 | // 0 direct gamma; 1 pi0; 2 pi0 decay; 3 eta decay; 4 other decay; 5 electron; 6 other (hadron) | |
4031 | if(histoIndex < fMCGenTypeMin || histoIndex > fMCGenTypeMax) return ; | |
4032 | ||
045396c8 | 4033 | AliStack * stack = 0x0 ; |
d07cdf32 | 4034 | TParticle * primary = 0x0 ; |
045396c8 | 4035 | TClonesArray * mcparticles = 0x0 ; |
d07cdf32 | 4036 | AliAODMCParticle * aodprimary = 0x0 ; |
045396c8 | 4037 | |
4038 | Double_t eprim = 0 ; | |
4039 | Double_t ptprim = 0 ; | |
4040 | Double_t phiprim = 0 ; | |
4041 | Double_t etaprim = 0 ; | |
d07cdf32 | 4042 | Int_t nTracks = 0 ; |
045396c8 | 4043 | Int_t iParticle = 0 ; |
a9023d3b | 4044 | |
f2d29137 | 4045 | Bool_t leadTrig = kTRUE; |
045396c8 | 4046 | |
d07cdf32 | 4047 | if( GetReader()->ReadStack() ) |
547c2f01 | 4048 | { |
045396c8 | 4049 | stack = GetMCStack() ; |
d07cdf32 | 4050 | if(!stack) |
2e876d85 | 4051 | { |
d07cdf32 | 4052 | AliFatal("Stack not available, is the MC handler called? STOP"); |
4053 | return; | |
045396c8 | 4054 | } |
4055 | ||
d07cdf32 | 4056 | //nTracks = stack->GetNtrack() ; |
4057 | nTracks = stack->GetNprimary(); | |
4058 | if( label >= stack->GetNtrack() ) | |
547c2f01 | 4059 | { |
d07cdf32 | 4060 | if(GetDebug() > 2) |
4061 | AliInfo(Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack())); | |
045396c8 | 4062 | return ; |
4063 | } | |
547c2f01 | 4064 | |
045396c8 | 4065 | primary = stack->Particle(label); |
d07cdf32 | 4066 | if ( !primary ) |
547c2f01 | 4067 | { |
d07cdf32 | 4068 | AliInfo(Form(" *** no primary ***: label %d", label)); |
045396c8 | 4069 | return; |
4070 | } | |
4071 | ||
d07cdf32 | 4072 | eprim = primary->Energy(); |
4073 | ptprim = primary->Pt(); | |
d07cdf32 | 4074 | etaprim = primary->Eta(); |
63ac03db | 4075 | phiprim = primary->Phi(); |
4076 | if(phiprim < 0) phiprim+=TMath::TwoPi(); | |
4077 | ||
d07cdf32 | 4078 | if(ptprim < 0.01 || eprim < 0.01) return ; |
4079 | ||
4080 | for (iParticle = 0 ; iParticle < nTracks ; iParticle++) | |
547c2f01 | 4081 | { |
d07cdf32 | 4082 | TParticle * particle = stack->Particle(iParticle); |
4083 | TLorentzVector momentum; | |
2747966a | 4084 | |
d07cdf32 | 4085 | //keep only final state particles |
4086 | if( particle->GetStatusCode() != 1 ) continue ; | |
f2d29137 | 4087 | |
d07cdf32 | 4088 | //---------- Charged particles ---------------------- |
4089 | Int_t pdg = particle->GetPdgCode(); | |
4090 | Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge(); | |
4091 | if(charge == 0) continue; | |
4092 | ||
4093 | particle->Momentum(momentum); | |
4094 | ||
4095 | //Particles in CTS acceptance, make sure to use the same selection as in the reader | |
4096 | Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS"); | |
4097 | //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg()); | |
4098 | if( !inCTS ) continue; | |
4099 | ||
4100 | // Remove conversions | |
4101 | if ( TMath::Abs(pdg) == 11 && stack->Particle(particle->GetFirstMother())->GetPdgCode() == 22 ) continue ; | |
4102 | ||
4103 | if ( label == iParticle ) continue; // avoid trigger particle | |
4104 | ||
63ac03db | 4105 | Float_t phi = particle->Phi(); |
4106 | if(phi < 0) phi+=TMath::TwoPi(); | |
4107 | ||
be2df971 | 4108 | Bool_t lead = FillChargedMCCorrelationHistograms(particle->Pt(),phi,particle->Eta(),ptprim,phiprim,etaprim,histoIndex); |
f2d29137 | 4109 | if(!lead) leadTrig = kFALSE; |
4110 | //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading) ) return; | |
d07cdf32 | 4111 | |
4112 | } //track loop | |
4113 | ||
045396c8 | 4114 | } //ESD MC |
a9023d3b | 4115 | |
d07cdf32 | 4116 | else if( GetReader()->ReadAODMCParticles() ) |
547c2f01 | 4117 | { |
045396c8 | 4118 | //Get the list of MC particles |
d07cdf32 | 4119 | mcparticles = GetReader()->GetAODMCParticles(); |
4120 | if( !mcparticles ) return; | |
a9023d3b | 4121 | |
d07cdf32 | 4122 | nTracks = mcparticles->GetEntriesFast() ; |
4123 | ||
4124 | if( label >= nTracks ) | |
547c2f01 | 4125 | { |
d07cdf32 | 4126 | if(GetDebug() > 2) |
4127 | AliInfo(Form(" *** large label ***: label %d, n tracks %d", label,nTracks)); | |
045396c8 | 4128 | return; |
4129 | } | |
a9023d3b | 4130 | |
045396c8 | 4131 | //Get the particle |
d07cdf32 | 4132 | aodprimary = (AliAODMCParticle*) mcparticles->At(label); |
4133 | if( !aodprimary ) | |
547c2f01 | 4134 | { |
d07cdf32 | 4135 | AliInfo(Form(" *** no AOD primary ***: label %d", label)); |
045396c8 | 4136 | return; |
4137 | } | |
a9023d3b | 4138 | |
63ac03db | 4139 | eprim = aodprimary->E(); |
d07cdf32 | 4140 | ptprim = aodprimary->Pt(); |
d07cdf32 | 4141 | etaprim = aodprimary->Eta(); |
63ac03db | 4142 | phiprim = aodprimary->Phi(); |
4143 | if(phiprim < 0) phiprim+=TMath::TwoPi(); | |
4144 | ||
d07cdf32 | 4145 | if(ptprim < 0.01 || eprim < 0.01) return ; |
4146 | ||
4147 | for (iParticle = 0; iParticle < nTracks; iParticle++) | |
547c2f01 | 4148 | { |
d07cdf32 | 4149 | AliAODMCParticle *part = (AliAODMCParticle*) mcparticles->At(iParticle); |
a9023d3b | 4150 | |
d07cdf32 | 4151 | if (!part->IsPhysicalPrimary() ) continue; // same as part->GetStatus() !=1 |
2747966a | 4152 | |
d07cdf32 | 4153 | if ( part->Charge() == 0 ) continue; |
a9023d3b | 4154 | |
d07cdf32 | 4155 | TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E()); |
4156 | ||
4157 | //Particles in CTS acceptance, make sure to use the same selection as in the reader | |
4158 | Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS"); | |
4159 | //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg()); | |
4160 | if( !inCTS ) continue; | |
4161 | ||
4162 | // Remove conversions | |
4163 | Int_t indexmother = part->GetMother(); | |
4164 | if ( indexmother > -1 ) | |
a9023d3b | 4165 | { |
d07cdf32 | 4166 | Int_t pdg = part->GetPdgCode(); |
4167 | Int_t mPdg = ((AliAODMCParticle*) mcparticles->At(indexmother)) ->GetPdgCode(); | |
4168 | if (TMath::Abs(pdg) == 11 && mPdg == 22) continue; | |
a9023d3b | 4169 | } |
d07cdf32 | 4170 | |
4171 | if ( label == iParticle ) continue; // avoid trigger particle | |
4172 | ||
63ac03db | 4173 | Float_t phi = part->Phi(); |
4174 | if(phi < 0) phi+=TMath::TwoPi(); | |
4175 | ||
be2df971 | 4176 | Bool_t lead = FillChargedMCCorrelationHistograms(part->Pt(),phi,part->Eta(),ptprim,phiprim,etaprim, histoIndex); |
f2d29137 | 4177 | if(!lead) leadTrig = kFALSE; |
4178 | //if ( !lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return; | |
d07cdf32 | 4179 | |
4180 | } //MC particle loop | |
045396c8 | 4181 | }// AOD MC |
d07cdf32 | 4182 | |
55c20a99 | 4183 | // Trigger MC particle histograms |
f2d29137 | 4184 | //if (!lead && (fMakeAbsoluteLeading || fMakeNearSideLeading)) return; |
55c20a99 | 4185 | |
be2df971 | 4186 | fhMCPtTrigger [histoIndex]->Fill(ptprim); |
4187 | fhMCPhiTrigger[histoIndex]->Fill(ptprim,phiprim); | |
4188 | fhMCEtaTrigger[histoIndex]->Fill(ptprim,etaprim); | |
55c20a99 | 4189 | |
f2d29137 | 4190 | if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) ) |
4191 | { | |
4192 | if(GetDebug() > 1) | |
81796cfc | 4193 | printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(): Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f\n", |
f2d29137 | 4194 | ptprim,phiprim*TMath::RadToDeg(),etaprim); |
4195 | ||
be2df971 | 4196 | fhMCPtTriggerNotLeading [histoIndex]->Fill(ptprim); |
4197 | fhMCPhiTriggerNotLeading[histoIndex]->Fill(ptprim,phiprim); | |
4198 | fhMCEtaTriggerNotLeading[histoIndex]->Fill(ptprim,etaprim); | |
f2d29137 | 4199 | } |
e09cf5ef | 4200 | } |
045396c8 | 4201 | |
05d0d05d | 4202 | //_____________________________________________________________________ |
4203 | void AliAnaParticleHadronCorrelation::Print(const Option_t * opt) const | |
4204 | { | |
4205 | ||
4206 | //Print some relevant parameters set for the analysis | |
4207 | if(! opt) | |
4208 | return; | |
4209 | ||
4210 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; | |
745913ae | 4211 | AliAnaCaloTrackCorrBaseClass::Print(" "); |
1f8591af | 4212 | printf("Pt trigger > %2.2f; < %2.2f\n", GetMinPt() , GetMaxPt()) ; |
4213 | printf("Pt associa > %2.2f; < %2.2f\n", fMinAssocPt, fMaxAssocPt) ; | |
4214 | printf("Phi trigger particle-Hadron < %3.2f\n", fDeltaPhiMaxCut) ; | |
66e64043 | 4215 | printf("Phi trigger particle-Hadron > %3.2f\n", fDeltaPhiMinCut) ; |
4216 | printf("Phi trigger particle-UeHadron < %3.2f\n", fUeDeltaPhiMaxCut) ; | |
4217 | printf("Phi trigger particle-UeHadron > %3.2f\n", fUeDeltaPhiMinCut) ; | |
4218 | printf("Isolated Trigger? %d\n" , fSelectIsolated) ; | |
4219 | printf("Several UE? %d\n" , fMakeSeveralUE) ; | |
4220 | printf("Name of AOD Pi0 Branch %s \n", fPi0AODBranchName.Data()); | |
05d0d05d | 4221 | printf("Do Decay-hadron correlation ? %d\n", fPi0Trigger) ; |
3f150b4b | 4222 | printf("Select absolute leading for cluster triggers ? %d or Near Side %d\n", |
4223 | fMakeAbsoluteLeading, fMakeNearSideLeading) ; | |
05d0d05d | 4224 | printf("Trigger pt bins %d\n", fNAssocPtBins) ; |
4225 | for (Int_t ibin = 0; ibin<fNAssocPtBins; ibin++) { | |
4226 | printf("\t bin %d = [%2.1f,%2.1f]\n", ibin, fAssocPtBinLimit[ibin], fAssocPtBinLimit[ibin+1]) ; | |
4227 | } | |
4228 | ||
4229 | } | |
4230 | ||
4231 | //____________________________________________________________ | |
4232 | void AliAnaParticleHadronCorrelation::SetNAssocPtBins(Int_t n) | |
045396c8 | 4233 | { |
4234 | // Set number of bins | |
e09cf5ef | 4235 | |
b6afb6b1 | 4236 | fNAssocPtBins = n ; |
05d0d05d | 4237 | |
f85f4afb | 4238 | if(n < 20 && n > 0) |
045396c8 | 4239 | { |
05d0d05d | 4240 | fNAssocPtBins = n ; |
045396c8 | 4241 | } |
4242 | else | |
4243 | { | |
f85f4afb | 4244 | printf("n = larger than 19 or too small, set to 19 \n"); |
4245 | fNAssocPtBins = 19; | |
045396c8 | 4246 | } |
4247 | } | |
e09cf5ef | 4248 | |
05d0d05d | 4249 | //______________________________________________________________________________ |
4250 | void AliAnaParticleHadronCorrelation::SetAssocPtBinLimit(Int_t ibin, Float_t pt) | |
045396c8 | 4251 | { |
4252 | // Set the list of limits for the trigger pt bins | |
4253 | ||
05d0d05d | 4254 | if(ibin <= fNAssocPtBins || ibin >= 0) |
045396c8 | 4255 | { |
05d0d05d | 4256 | fAssocPtBinLimit[ibin] = pt ; |
045396c8 | 4257 | } |
2e876d85 | 4258 | else |
4259 | { | |
05d0d05d | 4260 | printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ; |
045396c8 | 4261 | } |
4262 | } | |
4263 |