]>
Commit | Line | Data |
---|---|---|
85c4406e | 1 | /************************************************************************** |
1c5acb87 | 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 hereby granted * | |
cadbb0f3 | 9 | * without fee, provided that the above copyright notice appears in all * |
1c5acb87 | 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 | **************************************************************************/ | |
1c5acb87 | 15 | |
16 | //_________________________________________________________________________ | |
17 | // | |
18 | // Class for the photon identification. | |
19 | // Clusters from calorimeters are identified as photons | |
20 | // and kept in the AOD. Few histograms produced. | |
85c4406e | 21 | // Produces input for other analysis classes like AliAnaPi0, |
22 | // AliAnaParticleHadronCorrelation ... | |
1c5acb87 | 23 | // |
85c4406e | 24 | // -- Author: Gustavo Conesa (LNF-INFN) |
1c5acb87 | 25 | ////////////////////////////////////////////////////////////////////////////// |
85c4406e | 26 | |
27 | ||
28 | // --- ROOT system --- | |
1c5acb87 | 29 | #include <TH2F.h> |
2244659d | 30 | #include <TH3D.h> |
477d6cee | 31 | #include <TClonesArray.h> |
0c1383b5 | 32 | #include <TObjString.h> |
123fc3bd | 33 | #include "TParticle.h" |
6175da48 | 34 | #include "TDatabasePDG.h" |
1c5acb87 | 35 | |
85c4406e | 36 | // --- Analysis system --- |
37 | #include "AliAnaPhoton.h" | |
1c5acb87 | 38 | #include "AliCaloTrackReader.h" |
123fc3bd | 39 | #include "AliStack.h" |
1c5acb87 | 40 | #include "AliCaloPID.h" |
6639984f | 41 | #include "AliMCAnalysisUtils.h" |
ff45398a | 42 | #include "AliFiducialCut.h" |
0ae57829 | 43 | #include "AliVCluster.h" |
591cc579 | 44 | #include "AliAODMCParticle.h" |
c8fe2783 | 45 | #include "AliMixedEvent.h" |
fc195fd0 | 46 | #include "AliAODEvent.h" |
2ad19c3d | 47 | #include "AliESDEvent.h" |
c8fe2783 | 48 | |
85c4406e | 49 | // --- Detectors --- |
c5693f62 | 50 | #include "AliPHOSGeoUtils.h" |
51 | #include "AliEMCALGeometry.h" | |
1c5acb87 | 52 | |
53 | ClassImp(AliAnaPhoton) | |
521636d2 | 54 | |
85c4406e | 55 | //____________________________ |
56 | AliAnaPhoton::AliAnaPhoton() : | |
57 | AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""), | |
58 | fMinDist(0.), fMinDist2(0.), fMinDist3(0.), | |
59 | fRejectTrackMatch(0), fFillTMHisto(kFALSE), | |
60 | fTimeCutMin(-10000), fTimeCutMax(10000), | |
61 | fNCellsCut(0), | |
62 | fNLMCutMin(-1), fNLMCutMax(10), | |
63 | fFillSSHistograms(kFALSE), fFillOnlySimpleSSHisto(1), | |
64 | fNOriginHistograms(8), fNPrimaryHistograms(4), | |
65 | fFillPileUpHistograms(0), fFillEMCALBCHistograms(0), | |
66 | // Histograms | |
67 | fhNCellsE(0), fhCellsE(0), // Control histograms | |
b2e375c7 | 68 | fhMaxCellDiffClusterE(0), fhTimePt(0), // Control histograms |
85c4406e | 69 | fhEtaPhi(0), fhEtaPhiEMCALBC0(0), |
70 | fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0), | |
126b8c62 | 71 | fhTimeTriggerEMCALBCCluster(0), |
72 | fhTimeTriggerEMCALBCUMCluster(0), | |
85c4406e | 73 | fhEtaPhiTriggerEMCALBCClusterOverTh(0), |
74 | fhEtaPhiTriggerEMCALBCUMClusterOverTh(0), | |
75 | fhEtaPhiTriggerEMCALBCClusterBelowTh1(0), | |
76 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1(0), | |
77 | fhEtaPhiTriggerEMCALBCClusterBelowTh2(0), | |
78 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2(0), | |
79 | fhEtaPhiTriggerEMCALBCExotic(0), fhTimeTriggerEMCALBCExotic(0), | |
80 | fhEtaPhiTriggerEMCALBCUMExotic(0), fhTimeTriggerEMCALBCUMExotic(0), | |
81 | fhEtaPhiTriggerEMCALBCBad(0), fhTimeTriggerEMCALBCBad(0), | |
82 | fhEtaPhiTriggerEMCALBCUMBad(0), fhTimeTriggerEMCALBCUMBad(0), | |
83 | fhEtaPhiTriggerEMCALBCBadExotic(0), fhTimeTriggerEMCALBCBadExotic(0), | |
84 | fhEtaPhiTriggerEMCALBCUMBadExotic(0), fhTimeTriggerEMCALBCUMBadExotic(0), | |
85 | fhEtaPhiTriggerEMCALBCExoticCluster(0), fhTimeTriggerEMCALBCExoticCluster(0), | |
86 | fhEtaPhiTriggerEMCALBCUMExoticCluster(0), fhTimeTriggerEMCALBCUMExoticCluster(0), | |
87 | fhEtaPhiTriggerEMCALBCBadCluster(0), fhTimeTriggerEMCALBCBadCluster(0), | |
88 | fhEtaPhiTriggerEMCALBCUMBadCluster(0), fhTimeTriggerEMCALBCUMBadCluster(0), | |
89 | fhEtaPhiTriggerEMCALBCBadExoticCluster(0), fhTimeTriggerEMCALBCBadExoticCluster(0), | |
90 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster(0), fhTimeTriggerEMCALBCUMBadExoticCluster(0), | |
91 | fhTimeTriggerEMCALBCBadMaxCell(0), fhTimeTriggerEMCALBCUMBadMaxCell(0), | |
92 | fhTimeTriggerEMCALBCBadMaxCellExotic(0), fhTimeTriggerEMCALBCUMBadMaxCellExotic(0), | |
126b8c62 | 93 | fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster (0), fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster(0), |
94 | fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster(0),fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster(0), | |
95 | fhEtaPhiTriggerEMCALBCUMReMatchBothCluster(0), fhTimeTriggerEMCALBCUMReMatchBothCluster(0), | |
96 | fhTimeTriggerEMCALBC0UMReMatchOpenTime(0), | |
97 | fhTimeTriggerEMCALBC0UMReMatchCheckNeigh(0), | |
98 | fhTimeTriggerEMCALBC0UMReMatchBoth(0), | |
99 | ||
85c4406e | 100 | fhEtaPhiNoTrigger(0), fhTimeNoTrigger(0), |
101 | ||
102 | fhEPhoton(0), fhPtPhoton(0), | |
103 | fhPhiPhoton(0), fhEtaPhoton(0), | |
104 | fhEtaPhiPhoton(0), fhEtaPhi05Photon(0), | |
105 | fhEtaPhiPhotonEMCALBC0(0), fhEtaPhiPhotonEMCALBC1(0), fhEtaPhiPhotonEMCALBCN(0), | |
126b8c62 | 106 | fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime(0), |
107 | fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh(0), | |
108 | fhTimePhotonTriggerEMCALBC0UMReMatchBoth(0), | |
109 | ||
85c4406e | 110 | fhPtCentralityPhoton(0), fhPtEventPlanePhoton(0), |
111 | ||
112 | // Shower shape histograms | |
113 | fhNLocMax(0), | |
114 | fhDispE(0), fhLam0E(0), fhLam1E(0), | |
115 | fhDispETRD(0), fhLam0ETRD(0), fhLam1ETRD(0), | |
116 | fhDispETM(0), fhLam0ETM(0), fhLam1ETM(0), | |
117 | fhDispETMTRD(0), fhLam0ETMTRD(0), fhLam1ETMTRD(0), | |
118 | ||
119 | fhNCellsLam0LowE(0), fhNCellsLam1LowE(0), fhNCellsDispLowE(0), | |
120 | fhNCellsLam0HighE(0), fhNCellsLam1HighE(0), fhNCellsDispHighE(0), | |
121 | ||
122 | fhEtaLam0LowE(0), fhPhiLam0LowE(0), | |
123 | fhEtaLam0HighE(0), fhPhiLam0HighE(0), | |
124 | fhLam0DispLowE(0), fhLam0DispHighE(0), | |
125 | fhLam1Lam0LowE(0), fhLam1Lam0HighE(0), | |
126 | fhDispLam1LowE(0), fhDispLam1HighE(0), | |
127 | fhDispEtaE(0), fhDispPhiE(0), | |
128 | fhSumEtaE(0), fhSumPhiE(0), fhSumEtaPhiE(0), | |
129 | fhDispEtaPhiDiffE(0), fhSphericityE(0), | |
130 | fhDispSumEtaDiffE(0), fhDispSumPhiDiffE(0), | |
131 | ||
132 | // MC histograms | |
133 | fhMCPhotonELambda0NoOverlap(0), fhMCPhotonELambda0TwoOverlap(0), fhMCPhotonELambda0NOverlap(0), | |
134 | // Embedding | |
135 | fhEmbeddedSignalFractionEnergy(0), | |
136 | fhEmbedPhotonELambda0FullSignal(0), fhEmbedPhotonELambda0MostlySignal(0), | |
137 | fhEmbedPhotonELambda0MostlyBkg(0), fhEmbedPhotonELambda0FullBkg(0), | |
138 | fhEmbedPi0ELambda0FullSignal(0), fhEmbedPi0ELambda0MostlySignal(0), | |
139 | fhEmbedPi0ELambda0MostlyBkg(0), fhEmbedPi0ELambda0FullBkg(0), | |
140 | // PileUp | |
b2e375c7 | 141 | fhTimePtNoCut(0), fhTimePtSPD(0), |
142 | fhTimePtPhotonNoCut(0), fhTimePtPhotonSPD(0), | |
85c4406e | 143 | fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0), |
144 | fhTimeNPileUpVertContributors(0), | |
145 | fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0), | |
146 | fhClusterMultSPDPileUp(), fhClusterMultNoPileUp(), | |
147 | fhEtaPhiBC0(0), fhEtaPhiBCPlus(0), fhEtaPhiBCMinus(0), | |
148 | fhEtaPhiBC0PileUpSPD(0), | |
149 | fhEtaPhiBCPlusPileUpSPD(0), fhEtaPhiBCMinusPileUpSPD(0), | |
150 | fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0), | |
151 | fhPtNPileUpSPDVtxTimeCut(0), fhPtNPileUpTrkVtxTimeCut(0), | |
152 | fhPtNPileUpSPDVtxTimeCut2(0), fhPtNPileUpTrkVtxTimeCut2(0), | |
153 | fhPtPhotonNPileUpSPDVtx(0), fhPtPhotonNPileUpTrkVtx(0), | |
154 | fhPtPhotonNPileUpSPDVtxTimeCut(0), fhPtPhotonNPileUpTrkVtxTimeCut(0), | |
6df33fcb | 155 | fhPtPhotonNPileUpSPDVtxTimeCut2(0), fhPtPhotonNPileUpTrkVtxTimeCut2(0), |
156 | fhEClusterSM(0), fhEPhotonSM(0), | |
157 | fhPtClusterSM(0), fhPtPhotonSM(0) | |
85c4406e | 158 | { |
1c5acb87 | 159 | //default ctor |
160 | ||
4bfeae64 | 161 | for(Int_t i = 0; i < 14; i++) |
162 | { | |
4c8f7c2e | 163 | fhMCPt [i] = 0; |
164 | fhMCE [i] = 0; | |
165 | fhMCPhi [i] = 0; | |
166 | fhMCEta [i] = 0; | |
85c4406e | 167 | fhMCDeltaE [i] = 0; |
4c8f7c2e | 168 | fhMCDeltaPt[i] = 0; |
85c4406e | 169 | fhMC2E [i] = 0; |
4c8f7c2e | 170 | fhMC2Pt [i] = 0; |
521636d2 | 171 | } |
172 | ||
4bfeae64 | 173 | for(Int_t i = 0; i < 7; i++) |
174 | { | |
3d5d5078 | 175 | fhPtPrimMC [i] = 0; |
176 | fhEPrimMC [i] = 0; | |
177 | fhPhiPrimMC[i] = 0; | |
4cf13296 | 178 | fhEtaPrimMC[i] = 0; |
3d5d5078 | 179 | fhYPrimMC [i] = 0; |
180 | ||
181 | fhPtPrimMCAcc [i] = 0; | |
182 | fhEPrimMCAcc [i] = 0; | |
183 | fhPhiPrimMCAcc[i] = 0; | |
4cf13296 | 184 | fhEtaPrimMCAcc[i] = 0; |
3d5d5078 | 185 | fhYPrimMCAcc [i] = 0; |
d2655d46 | 186 | |
187 | fhDispEtaDispPhi[i] = 0; | |
188 | fhLambda0DispPhi[i] = 0; | |
189 | fhLambda0DispEta[i] = 0; | |
5e5e056f | 190 | |
fad96885 | 191 | fhPtPileUp [i] = 0; |
192 | fhPtChargedPileUp[i] = 0; | |
193 | fhPtPhotonPileUp [i] = 0; | |
85c4406e | 194 | |
fad96885 | 195 | fhLambda0PileUp [i] = 0; |
196 | fhLambda0ChargedPileUp[i] = 0; | |
5e5e056f | 197 | |
650d1938 | 198 | fhClusterEFracLongTimePileUp [i] = 0; |
199 | ||
126b8c62 | 200 | fhClusterCellTimePileUp [i] = 0; |
fad96885 | 201 | fhClusterTimeDiffPileUp [i] = 0; |
202 | fhClusterTimeDiffChargedPileUp[i] = 0; | |
203 | fhClusterTimeDiffPhotonPileUp [i] = 0; | |
85c4406e | 204 | |
d2655d46 | 205 | for(Int_t j = 0; j < 6; j++) |
206 | { | |
207 | fhMCDispEtaDispPhi[i][j] = 0; | |
208 | fhMCLambda0DispEta[i][j] = 0; | |
209 | fhMCLambda0DispPhi[i][j] = 0; | |
210 | } | |
85c4406e | 211 | } |
3d5d5078 | 212 | |
4bfeae64 | 213 | for(Int_t i = 0; i < 6; i++) |
214 | { | |
f66d95af | 215 | fhMCELambda0 [i] = 0; |
216 | fhMCELambda1 [i] = 0; | |
217 | fhMCEDispersion [i] = 0; | |
85c4406e | 218 | fhMCNCellsE [i] = 0; |
219 | fhMCMaxCellDiffClusterE[i] = 0; | |
bfdcf7fb | 220 | fhLambda0DispEta[i] = 0; |
221 | fhLambda0DispPhi[i] = 0; | |
85c4406e | 222 | |
f66d95af | 223 | fhMCLambda0vsClusterMaxCellDiffE0[i] = 0; |
224 | fhMCLambda0vsClusterMaxCellDiffE2[i] = 0; | |
225 | fhMCLambda0vsClusterMaxCellDiffE6[i] = 0; | |
226 | fhMCNCellsvsClusterMaxCellDiffE0 [i] = 0; | |
227 | fhMCNCellsvsClusterMaxCellDiffE2 [i] = 0; | |
228 | fhMCNCellsvsClusterMaxCellDiffE6 [i] = 0; | |
34c16486 | 229 | |
230 | fhMCEDispEta [i] = 0; | |
231 | fhMCEDispPhi [i] = 0; | |
232 | fhMCESumEtaPhi [i] = 0; | |
233 | fhMCEDispEtaPhiDiff[i] = 0; | |
234 | fhMCESphericity [i] = 0; | |
521636d2 | 235 | } |
236 | ||
85c4406e | 237 | for(Int_t i = 0; i < 5; i++) |
238 | { | |
58ea8ce5 | 239 | fhClusterCutsE [i] = 0; |
240 | fhClusterCutsPt[i] = 0; | |
85c4406e | 241 | } |
242 | ||
243 | // Track matching residuals | |
244 | for(Int_t i = 0; i < 2; i++) | |
245 | { | |
126b8c62 | 246 | fhTrackMatchedDEta [i] = 0; fhTrackMatchedDPhi [i] = 0; fhTrackMatchedDEtaDPhi [i] = 0; |
247 | fhTrackMatchedDEtaNeg[i] = 0; fhTrackMatchedDPhiNeg[i] = 0; fhTrackMatchedDEtaDPhiNeg[i] = 0; | |
248 | fhTrackMatchedDEtaPos[i] = 0; fhTrackMatchedDPhiPos[i] = 0; fhTrackMatchedDEtaDPhiPos[i] = 0; | |
85c4406e | 249 | fhTrackMatchedDEtaTRD[i] = 0; fhTrackMatchedDPhiTRD[i] = 0; |
250 | fhTrackMatchedDEtaMCOverlap[i] = 0; fhTrackMatchedDPhiMCOverlap[i] = 0; | |
251 | fhTrackMatchedDEtaMCNoOverlap[i] = 0; fhTrackMatchedDPhiMCNoOverlap[i] = 0; | |
252 | fhTrackMatchedDEtaMCConversion[i] = 0; fhTrackMatchedDPhiMCConversion[i] = 0; | |
253 | fhTrackMatchedMCParticle[i] = 0; fhTrackMatchedMCParticle[i] = 0; | |
254 | fhdEdx[i] = 0; fhEOverP[i] = 0; | |
255 | fhEOverPTRD[i] = 0; | |
256 | } | |
257 | ||
258 | for(Int_t i = 0; i < 4; i++) | |
259 | { | |
260 | fhClusterMultSPDPileUp[i] = 0; | |
261 | fhClusterMultNoPileUp [i] = 0; | |
262 | } | |
263 | ||
264 | for(Int_t i = 0; i < 11; i++) | |
265 | { | |
266 | fhEtaPhiTriggerEMCALBC [i] = 0 ; | |
267 | fhTimeTriggerEMCALBC [i] = 0 ; | |
268 | fhEtaPhiTriggerEMCALBCUM [i] = 0 ; | |
269 | fhTimeTriggerEMCALBCUM [i] = 0 ; | |
270 | ||
271 | fhEtaPhiPhotonTriggerEMCALBC [i] = 0 ; | |
272 | fhTimePhotonTriggerEMCALBC [i] = 0 ; | |
273 | fhEtaPhiPhotonTriggerEMCALBCUM [i] = 0 ; | |
274 | fhTimePhotonTriggerEMCALBCUM [i] = 0 ; | |
275 | ||
276 | fhTimePhotonTriggerEMCALBCPileUpSPD[i] = 0 ; | |
277 | fhTimeTriggerEMCALBCPileUpSPD [i] = 0 ; | |
278 | ||
279 | fhEtaPhiTriggerEMCALBCCluster [i] = 0 ; | |
126b8c62 | 280 | fhEtaPhiTriggerEMCALBCUMCluster [i] = 0 ; |
85c4406e | 281 | } |
282 | ||
1c5acb87 | 283 | //Initialize parameters |
284 | InitParameters(); | |
85c4406e | 285 | |
1c5acb87 | 286 | } |
287 | ||
b2e375c7 | 288 | //_________________________________________________________________________________________ |
85c4406e | 289 | Bool_t AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int_t nMaxima) |
c4a7d28a | 290 | { |
291 | //Select clusters if they pass different cuts | |
fad96885 | 292 | |
c2a62a94 | 293 | Float_t ptcluster = mom.Pt(); |
294 | Float_t ecluster = mom.E(); | |
295 | Float_t l0cluster = calo->GetM02(); | |
296 | Float_t etacluster = mom.Eta(); | |
297 | Float_t phicluster = mom.Phi(); | |
58ea8ce5 | 298 | |
6df33fcb | 299 | if(phicluster < 0) phicluster+=TMath::TwoPi(); |
c2a62a94 | 300 | Float_t tofcluster = calo->GetTOF()*1.e9; |
c2a62a94 | 301 | |
b2e375c7 | 302 | Bool_t matched = IsTrackMatched(calo,GetReader()->GetInputEvent()); |
fad96885 | 303 | |
304 | if(GetDebug() > 2) | |
afb3af8a | 305 | printf("AliAnaPhoton::ClusterSelected() - Current Event %d; Before selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n", |
c4a7d28a | 306 | GetReader()->GetEventNumber(), |
c2a62a94 | 307 | ecluster,ptcluster, phicluster*TMath::RadToDeg(),etacluster); |
fad96885 | 308 | |
58ea8ce5 | 309 | fhClusterCutsE [1]->Fill( ecluster); |
310 | fhClusterCutsPt[1]->Fill(ptcluster); | |
c4a7d28a | 311 | |
c2a62a94 | 312 | if(ecluster > 0.5) fhEtaPhi->Fill(etacluster, phicluster); |
313 | ||
6df33fcb | 314 | Int_t nSM = GetModuleNumber(calo); |
315 | if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0) | |
316 | { | |
317 | fhEClusterSM ->Fill(ecluster ,nSM); | |
318 | fhPtClusterSM->Fill(ptcluster,nSM); | |
319 | } | |
320 | ||
b2e375c7 | 321 | FillEMCALTriggerClusterBCHistograms(calo->GetID(),ecluster,tofcluster,etacluster,phicluster); |
c2a62a94 | 322 | |
c4a7d28a | 323 | //....................................... |
324 | //If too small or big energy, skip it | |
afb3af8a | 325 | if(ecluster < GetMinEnergy() || ecluster > GetMaxEnergy() ) return kFALSE ; |
09273901 | 326 | |
c4a7d28a | 327 | if(GetDebug() > 2) printf("\t Cluster %d Pass E Cut \n",calo->GetID()); |
09273901 | 328 | |
58ea8ce5 | 329 | fhClusterCutsE [2]->Fill( ecluster); |
330 | fhClusterCutsPt[2]->Fill(ptcluster); | |
85c4406e | 331 | |
126b8c62 | 332 | FillClusterPileUpHistograms(calo,matched,ptcluster,etacluster,phicluster,l0cluster); |
fad96885 | 333 | |
c4a7d28a | 334 | //....................................... |
335 | // TOF cut, BE CAREFUL WITH THIS CUT | |
336 | Double_t tof = calo->GetTOF()*1e9; | |
337 | if(tof < fTimeCutMin || tof > fTimeCutMax) return kFALSE; | |
09273901 | 338 | |
c4a7d28a | 339 | if(GetDebug() > 2) printf("\t Cluster %d Pass Time Cut \n",calo->GetID()); |
09273901 | 340 | |
58ea8ce5 | 341 | fhClusterCutsE [3]->Fill( ecluster); |
342 | fhClusterCutsPt[3]->Fill(ptcluster); | |
85c4406e | 343 | |
c4a7d28a | 344 | //....................................... |
345 | if(calo->GetNCells() <= fNCellsCut && GetReader()->GetDataType() != AliCaloTrackReader::kMC) return kFALSE; | |
09273901 | 346 | |
c4a7d28a | 347 | if(GetDebug() > 2) printf("\t Cluster %d Pass NCell Cut \n",calo->GetID()); |
09273901 | 348 | |
58ea8ce5 | 349 | fhClusterCutsE [4]->Fill( ecluster); |
350 | fhClusterCutsPt[4]->Fill(ptcluster); | |
85c4406e | 351 | |
9e51e29a | 352 | if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax) return kFALSE ; |
353 | if(GetDebug() > 2) printf(" \t Cluster %d pass NLM %d of out of range \n",calo->GetID(), nMaxima); | |
85c4406e | 354 | |
58ea8ce5 | 355 | fhClusterCutsE [5]->Fill( ecluster); |
356 | fhClusterCutsPt[5]->Fill(ptcluster); | |
85c4406e | 357 | |
c4a7d28a | 358 | //....................................... |
359 | //Check acceptance selection | |
34c16486 | 360 | if(IsFiducialCutOn()) |
361 | { | |
c4a7d28a | 362 | Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ; |
363 | if(! in ) return kFALSE ; | |
364 | } | |
09273901 | 365 | |
6df33fcb | 366 | if(GetDebug() > 2) printf("\t Fiducial cut passed \n"); |
09273901 | 367 | |
58ea8ce5 | 368 | fhClusterCutsE [6]->Fill( ecluster); |
369 | fhClusterCutsPt[6]->Fill(ptcluster); | |
85c4406e | 370 | |
c4a7d28a | 371 | //....................................... |
372 | //Skip matched clusters with tracks | |
09273901 | 373 | |
4bfeae64 | 374 | // Fill matching residual histograms before PID cuts |
375 | if(fFillTMHisto) FillTrackMatchingResidualHistograms(calo,0); | |
09273901 | 376 | |
34c16486 | 377 | if(fRejectTrackMatch) |
378 | { | |
b2e375c7 | 379 | if(matched) |
34c16486 | 380 | { |
c4a7d28a | 381 | if(GetDebug() > 2) printf("\t Reject track-matched clusters\n"); |
382 | return kFALSE ; | |
383 | } | |
85c4406e | 384 | else |
c4a7d28a | 385 | if(GetDebug() > 2) printf(" Track-matching cut passed \n"); |
386 | }// reject matched clusters | |
09273901 | 387 | |
58ea8ce5 | 388 | fhClusterCutsE [7]->Fill( ecluster); |
389 | fhClusterCutsPt[7]->Fill(ptcluster); | |
85c4406e | 390 | |
fad96885 | 391 | if(fFillPileUpHistograms) |
392 | { | |
393 | if(GetReader()->IsPileUpFromSPD()) {fhPtChargedPileUp[0]->Fill(ptcluster); fhLambda0ChargedPileUp[0]->Fill(ecluster,l0cluster); } | |
394 | if(GetReader()->IsPileUpFromEMCal()) {fhPtChargedPileUp[1]->Fill(ptcluster); fhLambda0ChargedPileUp[1]->Fill(ecluster,l0cluster); } | |
395 | if(GetReader()->IsPileUpFromSPDOrEMCal()) {fhPtChargedPileUp[2]->Fill(ptcluster); fhLambda0ChargedPileUp[2]->Fill(ecluster,l0cluster); } | |
396 | if(GetReader()->IsPileUpFromSPDAndEMCal()) {fhPtChargedPileUp[3]->Fill(ptcluster); fhLambda0ChargedPileUp[3]->Fill(ecluster,l0cluster); } | |
397 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) {fhPtChargedPileUp[4]->Fill(ptcluster); fhLambda0ChargedPileUp[4]->Fill(ecluster,l0cluster); } | |
398 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) {fhPtChargedPileUp[5]->Fill(ptcluster); fhLambda0ChargedPileUp[5]->Fill(ecluster,l0cluster); } | |
399 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) {fhPtChargedPileUp[6]->Fill(ptcluster); fhLambda0ChargedPileUp[6]->Fill(ecluster,l0cluster); } | |
400 | } | |
401 | ||
c4a7d28a | 402 | //....................................... |
403 | //Check Distance to Bad channel, set bit. | |
404 | Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel | |
405 | if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ; | |
85c4406e | 406 | if(distBad < fMinDist) |
34c16486 | 407 | {//In bad channel (PHOS cristal size 2.2x2.2 cm), EMCAL ( cell units ) |
c4a7d28a | 408 | return kFALSE ; |
409 | } | |
410 | else if(GetDebug() > 2) printf("\t Bad channel cut passed %4.2f > %2.2f \n",distBad, fMinDist); | |
fc195fd0 | 411 | |
58ea8ce5 | 412 | fhClusterCutsE [8]->Fill( ecluster); |
413 | fhClusterCutsPt[8]->Fill(ptcluster); | |
09273901 | 414 | |
85c4406e | 415 | if(GetDebug() > 0) |
fad96885 | 416 | printf("AliAnaPhoton::ClusterSelected() Current Event %d; After selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n", |
85c4406e | 417 | GetReader()->GetEventNumber(), |
fad96885 | 418 | ecluster, ptcluster,mom.Phi()*TMath::RadToDeg(),mom.Eta()); |
c4a7d28a | 419 | |
420 | //All checks passed, cluster selected | |
421 | return kTRUE; | |
85c4406e | 422 | |
c4a7d28a | 423 | } |
424 | ||
34c16486 | 425 | //___________________________________________ |
426 | void AliAnaPhoton::FillAcceptanceHistograms() | |
427 | { | |
3d5d5078 | 428 | //Fill acceptance histograms if MC data is available |
429 | ||
34c16486 | 430 | Double_t photonY = -100 ; |
431 | Double_t photonE = -1 ; | |
432 | Double_t photonPt = -1 ; | |
433 | Double_t photonPhi = 100 ; | |
434 | Double_t photonEta = -1 ; | |
85c4406e | 435 | |
34c16486 | 436 | Int_t pdg = 0 ; |
437 | Int_t tag = 0 ; | |
438 | Int_t mcIndex = 0 ; | |
439 | Bool_t inacceptance = kFALSE; | |
85c4406e | 440 | |
34c16486 | 441 | if(GetReader()->ReadStack()) |
85c4406e | 442 | { |
3d5d5078 | 443 | AliStack * stack = GetMCStack(); |
34c16486 | 444 | if(stack) |
445 | { | |
446 | for(Int_t i=0 ; i<stack->GetNtrack(); i++) | |
447 | { | |
667a3592 | 448 | if(GetReader()->AcceptOnlyHIJINGLabels() && !GetReader()->IsHIJINGLabel(i)) continue ; |
449 | ||
3d5d5078 | 450 | TParticle * prim = stack->Particle(i) ; |
34c16486 | 451 | pdg = prim->GetPdgCode(); |
3d5d5078 | 452 | //printf("i %d, %s %d %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(), |
453 | // prim->GetName(), prim->GetPdgCode()); | |
454 | ||
34c16486 | 455 | if(pdg == 22) |
456 | { | |
3d5d5078 | 457 | // Get tag of this particle photon from fragmentation, decay, prompt ... |
2644ead9 | 458 | tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader()); |
34c16486 | 459 | if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton)) |
460 | { | |
3d5d5078 | 461 | //A conversion photon from a hadron, skip this kind of photon |
34c16486 | 462 | // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n "); |
463 | // GetMCAnalysisUtils()->PrintMCTag(tag); | |
3d5d5078 | 464 | |
465 | return; | |
466 | } | |
467 | ||
468 | //Get photon kinematics | |
85c4406e | 469 | if(prim->Energy() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception |
3d5d5078 | 470 | |
34c16486 | 471 | photonY = 0.5*TMath::Log((prim->Energy()-prim->Pz())/(prim->Energy()+prim->Pz())) ; |
472 | photonE = prim->Energy() ; | |
473 | photonPt = prim->Pt() ; | |
3ef55999 | 474 | photonPhi = prim->Phi() ; |
3d5d5078 | 475 | if(photonPhi < 0) photonPhi+=TMath::TwoPi(); |
34c16486 | 476 | photonEta = prim->Eta() ; |
3d5d5078 | 477 | |
478 | //Check if photons hit the Calorimeter | |
479 | TLorentzVector lv; | |
480 | prim->Momentum(lv); | |
34c16486 | 481 | inacceptance = kFALSE; |
482 | if (fCalorimeter == "PHOS") | |
483 | { | |
484 | if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet()) | |
485 | { | |
3d5d5078 | 486 | Int_t mod ; |
487 | Double_t x,z ; | |
85c4406e | 488 | if(GetPHOSGeometry()->ImpactOnEmc(prim,mod,z,x)) |
3d5d5078 | 489 | inacceptance = kTRUE; |
490 | if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
491 | } | |
34c16486 | 492 | else |
493 | { | |
85c4406e | 494 | if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter)) |
3d5d5078 | 495 | inacceptance = kTRUE ; |
496 | if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
497 | } | |
85c4406e | 498 | } |
34c16486 | 499 | else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()) |
500 | { | |
501 | if(GetEMCALGeometry()) | |
502 | { | |
3d5d5078 | 503 | Int_t absID=0; |
504 | ||
505 | GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID); | |
506 | ||
85c4406e | 507 | if( absID >= 0) |
3d5d5078 | 508 | inacceptance = kTRUE; |
509 | ||
85c4406e | 510 | // if(GetEMCALGeometry()->Impact(phot1) && GetEMCALGeometry()->Impact(phot2)) |
3d5d5078 | 511 | // inacceptance = kTRUE; |
512 | if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
513 | } | |
34c16486 | 514 | else |
515 | { | |
85c4406e | 516 | if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter)) |
3d5d5078 | 517 | inacceptance = kTRUE ; |
518 | if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
519 | } | |
520 | } //In EMCAL | |
521 | ||
522 | //Fill histograms | |
c5693f62 | 523 | fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ; |
3d5d5078 | 524 | if(TMath::Abs(photonY) < 1.0) |
525 | { | |
c5693f62 | 526 | fhEPrimMC [kmcPPhoton]->Fill(photonE ) ; |
527 | fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ; | |
528 | fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ; | |
4cf13296 | 529 | fhEtaPrimMC[kmcPPhoton]->Fill(photonE , photonEta) ; |
3d5d5078 | 530 | } |
34c16486 | 531 | if(inacceptance) |
532 | { | |
533 | fhEPrimMCAcc [kmcPPhoton]->Fill(photonE ) ; | |
534 | fhPtPrimMCAcc [kmcPPhoton]->Fill(photonPt) ; | |
c5693f62 | 535 | fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ; |
4cf13296 | 536 | fhEtaPrimMCAcc[kmcPPhoton]->Fill(photonE , photonEta) ; |
34c16486 | 537 | fhYPrimMCAcc [kmcPPhoton]->Fill(photonE , photonY) ; |
3d5d5078 | 538 | }//Accepted |
539 | ||
540 | //Origin of photon | |
c5693f62 | 541 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[kmcPPrompt]) |
3d5d5078 | 542 | { |
34c16486 | 543 | mcIndex = kmcPPrompt; |
3d5d5078 | 544 | } |
c5693f62 | 545 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[kmcPFragmentation]) |
3d5d5078 | 546 | { |
34c16486 | 547 | mcIndex = kmcPFragmentation ; |
3d5d5078 | 548 | } |
c5693f62 | 549 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[kmcPISR]) |
3d5d5078 | 550 | { |
34c16486 | 551 | mcIndex = kmcPISR; |
3d5d5078 | 552 | } |
c5693f62 | 553 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[kmcPPi0Decay]) |
3d5d5078 | 554 | { |
34c16486 | 555 | mcIndex = kmcPPi0Decay; |
3d5d5078 | 556 | } |
85c4406e | 557 | else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) || |
c5693f62 | 558 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[kmcPOtherDecay]) |
3d5d5078 | 559 | { |
34c16486 | 560 | mcIndex = kmcPOtherDecay; |
3d5d5078 | 561 | } |
c5693f62 | 562 | else if(fhEPrimMC[kmcPOther]) |
3d5d5078 | 563 | { |
34c16486 | 564 | mcIndex = kmcPOther; |
3d5d5078 | 565 | }//Other origin |
34c16486 | 566 | |
567 | fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ; | |
568 | if(TMath::Abs(photonY) < 1.0) | |
569 | { | |
570 | fhEPrimMC [mcIndex]->Fill(photonE ) ; | |
571 | fhPtPrimMC [mcIndex]->Fill(photonPt) ; | |
572 | fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ; | |
4cf13296 | 573 | fhEtaPrimMC[mcIndex]->Fill(photonE , photonEta) ; |
34c16486 | 574 | } |
4cf13296 | 575 | |
34c16486 | 576 | if(inacceptance) |
577 | { | |
578 | fhEPrimMCAcc [mcIndex]->Fill(photonE ) ; | |
579 | fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ; | |
580 | fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ; | |
4cf13296 | 581 | fhEtaPrimMCAcc[mcIndex]->Fill(photonE , photonEta) ; |
34c16486 | 582 | fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ; |
583 | }//Accepted | |
584 | ||
85c4406e | 585 | }// Primary photon |
586 | }//loop on primaries | |
3d5d5078 | 587 | }//stack exists and data is MC |
588 | }//read stack | |
34c16486 | 589 | else if(GetReader()->ReadAODMCParticles()) |
590 | { | |
2644ead9 | 591 | TClonesArray * mcparticles = GetReader()->GetAODMCParticles(); |
34c16486 | 592 | if(mcparticles) |
593 | { | |
3d5d5078 | 594 | Int_t nprim = mcparticles->GetEntriesFast(); |
595 | ||
596 | for(Int_t i=0; i < nprim; i++) | |
597 | { | |
667a3592 | 598 | if(GetReader()->AcceptOnlyHIJINGLabels() && !GetReader()->IsHIJINGLabel(i)) continue ; |
599 | ||
85c4406e | 600 | AliAODMCParticle * prim = (AliAODMCParticle *) mcparticles->At(i); |
3d5d5078 | 601 | |
34c16486 | 602 | pdg = prim->GetPdgCode(); |
3d5d5078 | 603 | |
34c16486 | 604 | if(pdg == 22) |
605 | { | |
3d5d5078 | 606 | // Get tag of this particle photon from fragmentation, decay, prompt ... |
2644ead9 | 607 | tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader()); |
34c16486 | 608 | if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton)) |
609 | { | |
3d5d5078 | 610 | //A conversion photon from a hadron, skip this kind of photon |
34c16486 | 611 | // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n "); |
612 | // GetMCAnalysisUtils()->PrintMCTag(tag); | |
3d5d5078 | 613 | |
614 | return; | |
615 | } | |
616 | ||
617 | //Get photon kinematics | |
85c4406e | 618 | if(prim->E() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception |
3d5d5078 | 619 | |
34c16486 | 620 | photonY = 0.5*TMath::Log((prim->E()-prim->Pz())/(prim->E()+prim->Pz())) ; |
621 | photonE = prim->E() ; | |
622 | photonPt = prim->Pt() ; | |
03734799 | 623 | photonPhi = prim->Phi() ; |
3d5d5078 | 624 | if(photonPhi < 0) photonPhi+=TMath::TwoPi(); |
34c16486 | 625 | photonEta = prim->Eta() ; |
3d5d5078 | 626 | |
627 | //Check if photons hit the Calorimeter | |
628 | TLorentzVector lv; | |
629 | lv.SetPxPyPzE(prim->Px(),prim->Py(),prim->Pz(),prim->E()); | |
34c16486 | 630 | inacceptance = kFALSE; |
631 | if (fCalorimeter == "PHOS") | |
632 | { | |
633 | if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet()) | |
634 | { | |
3d5d5078 | 635 | Int_t mod ; |
636 | Double_t x,z ; | |
637 | Double_t vtx[]={prim->Xv(),prim->Yv(),prim->Zv()}; | |
638 | if(GetPHOSGeometry()->ImpactOnEmc(vtx, prim->Theta(),prim->Phi(),mod,z,x)) | |
639 | inacceptance = kTRUE; | |
640 | if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
641 | } | |
34c16486 | 642 | else |
643 | { | |
85c4406e | 644 | if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter)) |
3d5d5078 | 645 | inacceptance = kTRUE ; |
646 | if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
647 | } | |
85c4406e | 648 | } |
34c16486 | 649 | else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()) |
650 | { | |
651 | if(GetEMCALGeometry()) | |
652 | { | |
3d5d5078 | 653 | Int_t absID=0; |
654 | ||
655 | GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID); | |
656 | ||
85c4406e | 657 | if( absID >= 0) |
3d5d5078 | 658 | inacceptance = kTRUE; |
659 | ||
660 | if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
661 | } | |
34c16486 | 662 | else |
663 | { | |
85c4406e | 664 | if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter)) |
3d5d5078 | 665 | inacceptance = kTRUE ; |
666 | if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance); | |
667 | } | |
668 | } //In EMCAL | |
669 | ||
670 | //Fill histograms | |
671 | ||
c5693f62 | 672 | fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ; |
3d5d5078 | 673 | if(TMath::Abs(photonY) < 1.0) |
674 | { | |
c5693f62 | 675 | fhEPrimMC [kmcPPhoton]->Fill(photonE ) ; |
676 | fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ; | |
677 | fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ; | |
4cf13296 | 678 | fhEtaPrimMC[kmcPPhoton]->Fill(photonE , photonEta) ; |
3d5d5078 | 679 | } |
34c16486 | 680 | |
681 | if(inacceptance) | |
682 | { | |
c5693f62 | 683 | fhEPrimMCAcc[kmcPPhoton] ->Fill(photonE ) ; |
684 | fhPtPrimMCAcc[kmcPPhoton] ->Fill(photonPt) ; | |
685 | fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ; | |
4cf13296 | 686 | fhEtaPrimMCAcc[kmcPPhoton]->Fill(photonE , photonEta) ; |
c5693f62 | 687 | fhYPrimMCAcc[kmcPPhoton] ->Fill(photonE , photonY) ; |
3d5d5078 | 688 | }//Accepted |
689 | ||
3d5d5078 | 690 | //Origin of photon |
c5693f62 | 691 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[kmcPPrompt]) |
3d5d5078 | 692 | { |
34c16486 | 693 | mcIndex = kmcPPrompt; |
3d5d5078 | 694 | } |
34c16486 | 695 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[kmcPFragmentation]) |
3d5d5078 | 696 | { |
34c16486 | 697 | mcIndex = kmcPFragmentation ; |
3d5d5078 | 698 | } |
c5693f62 | 699 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[kmcPISR]) |
3d5d5078 | 700 | { |
34c16486 | 701 | mcIndex = kmcPISR; |
3d5d5078 | 702 | } |
c5693f62 | 703 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[kmcPPi0Decay]) |
3d5d5078 | 704 | { |
34c16486 | 705 | mcIndex = kmcPPi0Decay; |
3d5d5078 | 706 | } |
85c4406e | 707 | else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) || |
34c16486 | 708 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[kmcPOtherDecay]) |
3d5d5078 | 709 | { |
34c16486 | 710 | mcIndex = kmcPOtherDecay; |
3d5d5078 | 711 | } |
c5693f62 | 712 | else if(fhEPrimMC[kmcPOther]) |
3d5d5078 | 713 | { |
34c16486 | 714 | mcIndex = kmcPOther; |
3d5d5078 | 715 | }//Other origin |
34c16486 | 716 | |
717 | fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ; | |
718 | if(TMath::Abs(photonY) < 1.0) | |
719 | { | |
720 | fhEPrimMC [mcIndex]->Fill(photonE ) ; | |
721 | fhPtPrimMC [mcIndex]->Fill(photonPt) ; | |
722 | fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ; | |
4cf13296 | 723 | fhEtaPrimMC[mcIndex]->Fill(photonE , photonEta) ; |
34c16486 | 724 | } |
725 | if(inacceptance) | |
726 | { | |
727 | fhEPrimMCAcc [mcIndex]->Fill(photonE ) ; | |
728 | fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ; | |
729 | fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ; | |
4cf13296 | 730 | fhEtaPrimMCAcc[mcIndex]->Fill(photonE , photonEta) ; |
34c16486 | 731 | fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ; |
732 | }//Accepted | |
85c4406e | 733 | |
734 | }// Primary photon | |
735 | }//loop on primaries | |
3d5d5078 | 736 | |
c5693f62 | 737 | }//kmc array exists and data is MC |
3d5d5078 | 738 | } // read AOD MC |
739 | } | |
521636d2 | 740 | |
b94e038e | 741 | //________________________________________________________________________________________________________________ |
742 | void AliAnaPhoton::FillEMCALTriggerClusterBCHistograms(Int_t idcalo, Float_t ecluster, Float_t tofcluster, | |
743 | Float_t etacluster, Float_t phicluster) | |
b2e375c7 | 744 | |
745 | { | |
746 | // Fill trigger related histograms | |
747 | ||
748 | if(!fFillEMCALBCHistograms || fCalorimeter!="EMCAL") return ; | |
749 | ||
750 | Float_t tofclusterUS = TMath::Abs(tofcluster); | |
751 | ||
752 | if(ecluster > 2) | |
753 | { | |
754 | if (tofclusterUS < 25) fhEtaPhiEMCALBC0->Fill(etacluster, phicluster); | |
755 | else if (tofclusterUS < 75) fhEtaPhiEMCALBC1->Fill(etacluster, phicluster); | |
756 | else fhEtaPhiEMCALBCN->Fill(etacluster, phicluster); | |
757 | } | |
758 | ||
759 | Int_t bc = GetReader()->GetTriggerClusterBC(); | |
760 | Int_t id = GetReader()->GetTriggerClusterId(); | |
761 | Bool_t badMax = GetReader()->IsBadMaxCellTriggerEvent(); | |
762 | ||
eb86112d | 763 | Int_t histoBC = bc+5; |
764 | if(GetReader()->AreBadTriggerEventsRemoved()) histoBC=0; // histograms created only for one BC since the others where rejected | |
765 | ||
b2e375c7 | 766 | if(id==-2) |
767 | { | |
768 | //printf("AliAnaPhoton::ClusterSelected() - No trigger found bc=%d\n",bc); | |
769 | fhEtaPhiNoTrigger->Fill(etacluster, phicluster); | |
770 | fhTimeNoTrigger ->Fill(ecluster, tofcluster); | |
771 | } | |
772 | else if(TMath::Abs(bc) < 6) | |
773 | { | |
774 | if(!GetReader()->IsBadCellTriggerEvent() && !GetReader()->IsExoticEvent() ) | |
775 | { | |
776 | if(GetReader()->IsTriggerMatched()) | |
777 | { | |
eb86112d | 778 | if(ecluster > 2) fhEtaPhiTriggerEMCALBC[histoBC]->Fill(etacluster, phicluster); |
779 | fhTimeTriggerEMCALBC[histoBC]->Fill(ecluster, tofcluster); | |
780 | if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[histoBC]->Fill(ecluster, tofcluster); | |
b2e375c7 | 781 | |
782 | if(idcalo == GetReader()->GetTriggerClusterId()) | |
783 | { | |
eb86112d | 784 | fhEtaPhiTriggerEMCALBCCluster[histoBC]->Fill(etacluster, phicluster); |
126b8c62 | 785 | fhTimeTriggerEMCALBCCluster ->Fill(ecluster, tofcluster); |
b2e375c7 | 786 | |
787 | if(bc==0) | |
788 | { | |
93c2e459 | 789 | Float_t threshold = GetReader()->GetEventTriggerL1Threshold() ; |
790 | if(GetReader()->IsEventEMCALL0()) threshold = GetReader()->GetEventTriggerL0Threshold() ; | |
791 | ||
b2e375c7 | 792 | if(ecluster > threshold) |
793 | fhEtaPhiTriggerEMCALBCClusterOverTh->Fill(etacluster, phicluster); | |
794 | else if(ecluster > threshold-1) | |
795 | fhEtaPhiTriggerEMCALBCClusterBelowTh1->Fill(etacluster, phicluster); | |
796 | else | |
797 | fhEtaPhiTriggerEMCALBCClusterBelowTh2->Fill(etacluster, phicluster); | |
798 | } | |
799 | } | |
800 | } | |
801 | else | |
802 | { | |
eb86112d | 803 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCUM[histoBC]->Fill(etacluster, phicluster); |
804 | fhTimeTriggerEMCALBCUM[histoBC]->Fill(ecluster, tofcluster); | |
b2e375c7 | 805 | |
126b8c62 | 806 | if(bc==0) |
807 | { | |
808 | if(GetReader()->IsTriggerMatchedOpenCuts(0)) fhTimeTriggerEMCALBC0UMReMatchOpenTime ->Fill(ecluster, tofcluster); | |
809 | if(GetReader()->IsTriggerMatchedOpenCuts(1)) fhTimeTriggerEMCALBC0UMReMatchCheckNeigh ->Fill(ecluster, tofcluster); | |
810 | if(GetReader()->IsTriggerMatchedOpenCuts(2)) fhTimeTriggerEMCALBC0UMReMatchBoth ->Fill(ecluster, tofcluster); | |
811 | } | |
812 | ||
b2e375c7 | 813 | if(idcalo == GetReader()->GetTriggerClusterId()) |
814 | { | |
eb86112d | 815 | fhEtaPhiTriggerEMCALBCUMCluster[histoBC]->Fill(etacluster, phicluster); |
126b8c62 | 816 | fhTimeTriggerEMCALBCUMCluster->Fill(ecluster, tofcluster); |
b2e375c7 | 817 | if(bc==0) |
818 | { | |
93c2e459 | 819 | Float_t threshold = GetReader()->GetEventTriggerL1Threshold() ; |
820 | if(GetReader()->IsEventEMCALL0()) threshold = GetReader()->GetEventTriggerL0Threshold() ; | |
821 | ||
b2e375c7 | 822 | if(ecluster > threshold) |
823 | fhEtaPhiTriggerEMCALBCUMClusterOverTh->Fill(etacluster, phicluster); | |
824 | else if(ecluster > threshold-1) | |
825 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->Fill(etacluster, phicluster); | |
826 | else | |
827 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->Fill(etacluster, phicluster); | |
828 | ||
829 | if(GetReader()->IsTriggerMatchedOpenCuts(0)) | |
830 | { | |
126b8c62 | 831 | fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster->Fill(etacluster, phicluster); |
832 | fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster ->Fill(ecluster, tofcluster); | |
b2e375c7 | 833 | } |
834 | if(GetReader()->IsTriggerMatchedOpenCuts(1)) | |
835 | { | |
126b8c62 | 836 | fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster->Fill(etacluster, phicluster); |
837 | fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster ->Fill(ecluster, tofcluster); | |
b2e375c7 | 838 | } |
839 | if(GetReader()->IsTriggerMatchedOpenCuts(2)) | |
840 | { | |
126b8c62 | 841 | fhEtaPhiTriggerEMCALBCUMReMatchBothCluster->Fill(etacluster, phicluster); |
842 | fhTimeTriggerEMCALBCUMReMatchBothCluster ->Fill(ecluster, tofcluster); | |
b2e375c7 | 843 | } |
844 | ||
845 | } | |
846 | } | |
847 | } | |
848 | }// neither bad nor exotic | |
849 | else if(GetReader()->IsBadCellTriggerEvent() && GetReader()->IsExoticEvent()) | |
850 | { | |
851 | if(GetReader()->IsTriggerMatched()) | |
852 | { | |
853 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCBadExotic->Fill(etacluster, phicluster); | |
854 | fhTimeTriggerEMCALBCBadExotic->Fill(ecluster, tofcluster); | |
855 | if(badMax) fhTimeTriggerEMCALBCBadMaxCellExotic->Fill(ecluster, tofcluster); | |
856 | } | |
857 | else | |
858 | { | |
859 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMBadExotic->Fill(etacluster, phicluster); | |
860 | fhTimeTriggerEMCALBCUMBadExotic->Fill(ecluster, tofcluster); | |
861 | if(badMax) fhTimeTriggerEMCALBCUMBadMaxCellExotic->Fill(ecluster, tofcluster); | |
862 | ||
863 | } | |
864 | }// Bad and exotic cluster trigger | |
865 | else if(GetReader()->IsBadCellTriggerEvent() ) | |
866 | { | |
867 | if(GetReader()->IsTriggerMatched()) | |
868 | { | |
869 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCBad->Fill(etacluster, phicluster); | |
870 | fhTimeTriggerEMCALBCBad->Fill(ecluster, tofcluster); | |
871 | if(badMax) fhTimeTriggerEMCALBCBadMaxCell->Fill(ecluster, tofcluster); | |
872 | } | |
873 | else | |
874 | { | |
875 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMBad->Fill(etacluster, phicluster); | |
876 | fhTimeTriggerEMCALBCUMBad->Fill(ecluster, tofcluster); | |
877 | if(badMax) fhTimeTriggerEMCALBCUMBadMaxCell->Fill(ecluster, tofcluster); | |
878 | } | |
879 | }// Bad cluster trigger | |
880 | else if(GetReader()->IsExoticEvent() ) | |
881 | { | |
882 | if(GetReader()->IsTriggerMatched()) | |
883 | { | |
884 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCExotic->Fill(etacluster, phicluster); | |
885 | fhTimeTriggerEMCALBCExotic->Fill(ecluster, tofcluster); | |
886 | } | |
887 | else | |
888 | { | |
889 | if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMExotic->Fill(etacluster, phicluster); | |
890 | fhTimeTriggerEMCALBCUMExotic->Fill(ecluster, tofcluster); | |
891 | } | |
892 | } | |
893 | } | |
894 | else if(TMath::Abs(bc) >= 6) | |
895 | printf("AliAnaPhoton::ClusterSelected() - Trigger BC not expected = %d\n",bc); | |
896 | ||
897 | } | |
898 | ||
b94e038e | 899 | //_________________________________________________________________________________________________________ |
900 | void AliAnaPhoton::FillClusterPileUpHistograms(AliVCluster * calo, Bool_t matched, Float_t ptcluster, | |
901 | Float_t etacluster, Float_t phicluster, Float_t l0cluster) | |
b2e375c7 | 902 | { |
903 | // Fill some histograms related to pile up before any cluster cut is applied | |
904 | ||
905 | if(!fFillPileUpHistograms) return ; | |
906 | ||
907 | // Get the fraction of the cluster energy that carries the cell with highest energy and its absId | |
908 | AliVCaloCells* cells = 0; | |
909 | if(fCalorimeter == "EMCAL") cells = GetEMCALCells(); | |
910 | else cells = GetPHOSCells(); | |
911 | ||
912 | Float_t maxCellFraction = 0.; | |
913 | Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, calo,maxCellFraction); | |
914 | ||
915 | Double_t tmax = cells->GetCellTime(absIdMax); | |
916 | GetCaloUtils()->RecalibrateCellTime(tmax, fCalorimeter, absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber()); | |
917 | tmax*=1.e9; | |
918 | ||
919 | Bool_t okPhoton = kFALSE; | |
920 | if( GetCaloPID()->GetIdentifiedParticleType(calo)== AliCaloPID::kPhoton) okPhoton = kTRUE; | |
921 | ||
922 | Float_t clusterLongTimePt = 0; | |
923 | Float_t clusterOKTimePt = 0; | |
126b8c62 | 924 | |
925 | //Loop on cells inside cluster, max cell must be over 100 MeV and time in BC=0 | |
926 | if(cells->GetCellAmplitude(absIdMax) > 0.1 && TMath::Abs(tmax) < 30) | |
b2e375c7 | 927 | { |
126b8c62 | 928 | for (Int_t ipos = 0; ipos < calo->GetNCells(); ipos++) |
b2e375c7 | 929 | { |
126b8c62 | 930 | Int_t absId = calo->GetCellsAbsId()[ipos]; |
931 | ||
932 | if( absId == absIdMax ) continue ; | |
933 | ||
b2e375c7 | 934 | Double_t time = cells->GetCellTime(absId); |
935 | Float_t amp = cells->GetCellAmplitude(absId); | |
936 | Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber(); | |
937 | GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,time,cells); | |
938 | time*=1e9; | |
939 | ||
940 | Float_t diff = (tmax-time); | |
941 | ||
942 | if(GetReader()->IsInTimeWindow(time,amp)) clusterOKTimePt += amp; | |
943 | else clusterLongTimePt += amp; | |
944 | ||
36769d30 | 945 | if( cells->GetCellAmplitude(absIdMax) < 0.1 ) continue ; |
126b8c62 | 946 | |
b2e375c7 | 947 | if(GetReader()->IsPileUpFromSPD()) |
948 | { | |
126b8c62 | 949 | fhClusterCellTimePileUp[0]->Fill(ptcluster, time); |
950 | fhClusterTimeDiffPileUp[0]->Fill(ptcluster, diff); | |
b2e375c7 | 951 | if(!matched) |
952 | { | |
126b8c62 | 953 | fhClusterTimeDiffChargedPileUp[0]->Fill(ptcluster, diff); |
954 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[0]->Fill(ptcluster, diff); | |
b2e375c7 | 955 | } |
956 | } | |
957 | ||
958 | if(GetReader()->IsPileUpFromEMCal()) | |
959 | { | |
126b8c62 | 960 | fhClusterCellTimePileUp[1]->Fill(ptcluster, time); |
961 | fhClusterTimeDiffPileUp[1]->Fill(ptcluster, diff); | |
b2e375c7 | 962 | if(!matched) |
963 | { | |
126b8c62 | 964 | fhClusterTimeDiffChargedPileUp[1]->Fill(ptcluster, diff); |
965 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[1]->Fill(ptcluster, diff); | |
b2e375c7 | 966 | } |
967 | } | |
968 | ||
969 | if(GetReader()->IsPileUpFromSPDOrEMCal()) | |
970 | { | |
126b8c62 | 971 | fhClusterCellTimePileUp[2]->Fill(ptcluster, time); |
972 | fhClusterTimeDiffPileUp[2]->Fill(ptcluster, diff); | |
b2e375c7 | 973 | if(!matched) |
974 | { | |
126b8c62 | 975 | fhClusterTimeDiffChargedPileUp[2]->Fill(ptcluster, diff); |
976 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[2]->Fill(ptcluster, diff); | |
b2e375c7 | 977 | } |
978 | } | |
979 | ||
980 | if(GetReader()->IsPileUpFromSPDAndEMCal()) | |
981 | { | |
126b8c62 | 982 | fhClusterCellTimePileUp[3]->Fill(ptcluster, time); |
983 | fhClusterTimeDiffPileUp[3]->Fill(ptcluster, diff); | |
b2e375c7 | 984 | if(!matched) |
985 | { | |
126b8c62 | 986 | fhClusterTimeDiffChargedPileUp[3]->Fill(ptcluster, diff); |
987 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[3]->Fill(ptcluster, diff); | |
b2e375c7 | 988 | } |
989 | } | |
990 | ||
991 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) | |
992 | { | |
126b8c62 | 993 | fhClusterCellTimePileUp[4]->Fill(ptcluster, time); |
994 | fhClusterTimeDiffPileUp[4]->Fill(ptcluster, diff); | |
b2e375c7 | 995 | if(!matched) |
996 | { | |
126b8c62 | 997 | fhClusterTimeDiffChargedPileUp[4]->Fill(ptcluster, diff); |
998 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[4]->Fill(ptcluster, diff); | |
b2e375c7 | 999 | } |
1000 | } | |
1001 | ||
1002 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) | |
1003 | { | |
126b8c62 | 1004 | fhClusterCellTimePileUp[5]->Fill(ptcluster, time); |
1005 | fhClusterTimeDiffPileUp[5]->Fill(ptcluster, diff); | |
b2e375c7 | 1006 | if(!matched) |
1007 | { | |
126b8c62 | 1008 | fhClusterTimeDiffChargedPileUp[5]->Fill(ptcluster, diff); |
1009 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[5]->Fill(ptcluster, diff); | |
b2e375c7 | 1010 | } |
1011 | } | |
1012 | ||
1013 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) | |
1014 | { | |
126b8c62 | 1015 | fhClusterCellTimePileUp[6]->Fill(ptcluster, time); |
1016 | fhClusterTimeDiffPileUp[6]->Fill(ptcluster, diff); | |
b2e375c7 | 1017 | if(!matched) |
1018 | { | |
126b8c62 | 1019 | fhClusterTimeDiffChargedPileUp[6]->Fill(ptcluster, diff); |
1020 | if(okPhoton) fhClusterTimeDiffPhotonPileUp[6]->Fill(ptcluster, diff); | |
b2e375c7 | 1021 | } |
1022 | } | |
126b8c62 | 1023 | }//loop |
1024 | ||
1025 | ||
1026 | Float_t frac = 0; | |
1027 | if(clusterLongTimePt+clusterOKTimePt > 0.001) | |
1028 | frac = clusterLongTimePt/(clusterLongTimePt+clusterOKTimePt); | |
1029 | //printf("E long %f, E OK %f, Fraction large time %f, E %f\n",clusterLongTimePt,clusterOKTimePt,frac,ptcluster); | |
1030 | ||
1031 | if(GetReader()->IsPileUpFromSPD()) {fhPtPileUp[0]->Fill(ptcluster); fhLambda0PileUp[0]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[0]->Fill(ptcluster,frac);} | |
1032 | if(GetReader()->IsPileUpFromEMCal()) {fhPtPileUp[1]->Fill(ptcluster); fhLambda0PileUp[1]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[1]->Fill(ptcluster,frac);} | |
1033 | if(GetReader()->IsPileUpFromSPDOrEMCal()) {fhPtPileUp[2]->Fill(ptcluster); fhLambda0PileUp[2]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[2]->Fill(ptcluster,frac);} | |
1034 | if(GetReader()->IsPileUpFromSPDAndEMCal()) {fhPtPileUp[3]->Fill(ptcluster); fhLambda0PileUp[3]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[3]->Fill(ptcluster,frac);} | |
1035 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) {fhPtPileUp[4]->Fill(ptcluster); fhLambda0PileUp[4]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[4]->Fill(ptcluster,frac);} | |
1036 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) {fhPtPileUp[5]->Fill(ptcluster); fhLambda0PileUp[5]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[5]->Fill(ptcluster,frac);} | |
1037 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) {fhPtPileUp[6]->Fill(ptcluster); fhLambda0PileUp[6]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[6]->Fill(ptcluster,frac);} | |
1038 | ||
1039 | fhEtaPhiBC0->Fill(etacluster,phicluster); | |
1040 | if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBC0PileUpSPD ->Fill(etacluster,phicluster); | |
1041 | } | |
b2e375c7 | 1042 | |
b2e375c7 | 1043 | else if (tmax > 25) {fhEtaPhiBCPlus ->Fill(etacluster,phicluster); if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBCPlusPileUpSPD ->Fill(etacluster,phicluster); } |
1044 | else if (tmax <-25) {fhEtaPhiBCMinus->Fill(etacluster,phicluster); if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBCMinusPileUpSPD->Fill(etacluster,phicluster); } | |
1045 | } | |
1046 | ||
1047 | //_______________________________________________ | |
85c4406e | 1048 | void AliAnaPhoton::FillPileUpHistogramsPerEvent() |
acd56ca4 | 1049 | { |
1050 | // Fill some histograms per event to understand pile-up | |
6227a9fd | 1051 | // Open the time cut in the reader to be more meaningful |
1052 | ||
acd56ca4 | 1053 | if(!fFillPileUpHistograms) return; |
85c4406e | 1054 | |
0f7e7205 | 1055 | AliVEvent * event = GetReader()->GetInputEvent(); |
1056 | ||
1057 | AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event); | |
1058 | AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event); | |
1059 | ||
1060 | // N pile up vertices | |
1061 | Int_t nVtxSPD = -1; | |
1062 | Int_t nVtxTrk = -1; | |
1063 | TLorentzVector mom; | |
1064 | ||
1065 | if (esdEv) | |
1066 | { | |
1067 | nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD(); | |
1068 | nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks(); | |
1069 | }//ESD | |
1070 | else if (aodEv) | |
1071 | { | |
1072 | nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD(); | |
1073 | nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks(); | |
85c4406e | 1074 | }//AOD |
0f7e7205 | 1075 | |
1076 | ||
85c4406e | 1077 | // Get the appropriate list of clusters |
0f7e7205 | 1078 | TClonesArray * clusterList = 0; |
1079 | TString clusterListName = GetReader()->GetEMCALClusterListName(); | |
1080 | if (event->FindListObject(clusterListName)) | |
1081 | clusterList = dynamic_cast<TClonesArray*> (event->FindListObject(clusterListName)); | |
1082 | else if(GetReader()->GetOutputEvent()) | |
1083 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(clusterListName)); | |
1084 | ||
1085 | // Loop on clusters, get the maximum energy cluster as reference | |
85c4406e | 1086 | Int_t nclusters = 0; |
0f7e7205 | 1087 | if(clusterList) nclusters = clusterList->GetEntriesFast(); |
1088 | else nclusters = event->GetNumberOfCaloClusters(); | |
1089 | ||
85c4406e | 1090 | Int_t idMax = 0; |
acd56ca4 | 1091 | Float_t eMax = 0; |
85c4406e | 1092 | Float_t tMax = 0; |
acd56ca4 | 1093 | for(Int_t iclus = 0; iclus < nclusters ; iclus++) |
1094 | { | |
0f7e7205 | 1095 | AliVCluster * clus = 0; |
85c4406e | 1096 | if(clusterList) clus = (AliVCluster*) (clusterList->At(iclus)); |
0f7e7205 | 1097 | else clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus); |
1098 | ||
1099 | if(!clus) continue; | |
1100 | ||
1101 | if(!clus->IsEMCAL()) continue; | |
1102 | ||
1103 | Float_t tof = clus->GetTOF()*1e9; | |
b2e375c7 | 1104 | if(clus->E() > eMax && TMath::Abs(tof) < 30) |
acd56ca4 | 1105 | { |
1106 | eMax = clus->E(); | |
0f7e7205 | 1107 | tMax = tof; |
acd56ca4 | 1108 | idMax = iclus; |
1109 | } | |
0f7e7205 | 1110 | |
1111 | clus->GetMomentum(mom,GetVertex(0)); | |
1112 | Float_t pt = mom.Pt(); | |
1113 | ||
85c4406e | 1114 | fhPtNPileUpSPDVtx->Fill(pt,nVtxSPD); |
0f7e7205 | 1115 | fhPtNPileUpTrkVtx->Fill(pt,nVtxTrk); |
85c4406e | 1116 | |
b2e375c7 | 1117 | if(TMath::Abs(tof) < 30) |
85c4406e | 1118 | { |
1119 | fhPtNPileUpSPDVtxTimeCut->Fill(pt,nVtxSPD); | |
1120 | fhPtNPileUpTrkVtxTimeCut->Fill(pt,nVtxTrk); | |
0f7e7205 | 1121 | } |
85c4406e | 1122 | |
b2e375c7 | 1123 | if(tof < 75 && tof > -30) |
85c4406e | 1124 | { |
1125 | fhPtNPileUpSPDVtxTimeCut2->Fill(pt,nVtxSPD); | |
1126 | fhPtNPileUpTrkVtxTimeCut2->Fill(pt,nVtxTrk); | |
1127 | } | |
1128 | ||
b2e375c7 | 1129 | fhTimePtNoCut->Fill(pt,tof); |
1130 | if(GetReader()->IsPileUpFromSPD()) fhTimePtSPD->Fill(pt,tof); | |
1131 | ||
acd56ca4 | 1132 | } |
0f7e7205 | 1133 | |
6227a9fd | 1134 | if(eMax < 5) return; |
acd56ca4 | 1135 | |
1136 | // Loop again on clusters to compare this max cluster t and the rest of the clusters, if E > 0.3 | |
1137 | Int_t n20 = 0; | |
1138 | Int_t n40 = 0; | |
1139 | Int_t n = 0; | |
1140 | Int_t nOK = 0; | |
85c4406e | 1141 | |
acd56ca4 | 1142 | for(Int_t iclus = 0; iclus < nclusters ; iclus++) |
1143 | { | |
0f7e7205 | 1144 | AliVCluster * clus = 0; |
85c4406e | 1145 | if(clusterList) clus = (AliVCluster*) (clusterList->At(iclus)); |
0f7e7205 | 1146 | else clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus); |
1147 | ||
1148 | if(!clus) continue; | |
1149 | ||
1150 | if(!clus->IsEMCAL()) continue; | |
acd56ca4 | 1151 | |
1152 | if(clus->E() < 0.3 || iclus==idMax) continue; | |
1153 | ||
1154 | Float_t tdiff = TMath::Abs(tMax-clus->GetTOF()*1e9); | |
1155 | n++; | |
0f7e7205 | 1156 | if(tdiff < 25) nOK++; |
acd56ca4 | 1157 | else |
1158 | { | |
1159 | n20++; | |
1160 | if(tdiff > 40 ) n40++; | |
1161 | } | |
1162 | } | |
1163 | ||
1164 | // Check pile-up and fill histograms depending on the different cluster multiplicities | |
1165 | if(GetReader()->IsPileUpFromSPD()) | |
85c4406e | 1166 | { |
acd56ca4 | 1167 | fhClusterMultSPDPileUp[0]->Fill(eMax,n ); |
1168 | fhClusterMultSPDPileUp[1]->Fill(eMax,nOK); | |
1169 | fhClusterMultSPDPileUp[2]->Fill(eMax,n20); | |
1170 | fhClusterMultSPDPileUp[3]->Fill(eMax,n40); | |
1171 | } | |
85c4406e | 1172 | else |
acd56ca4 | 1173 | { |
1174 | fhClusterMultNoPileUp[0]->Fill(eMax,n ); | |
1175 | fhClusterMultNoPileUp[1]->Fill(eMax,nOK); | |
1176 | fhClusterMultNoPileUp[2]->Fill(eMax,n20); | |
85c4406e | 1177 | fhClusterMultNoPileUp[3]->Fill(eMax,n40); |
1178 | } | |
acd56ca4 | 1179 | |
1180 | } | |
1181 | ||
1182 | ||
fad96885 | 1183 | //_________________________________________________________________________________________________ |
22ad7981 | 1184 | void AliAnaPhoton::FillPileUpHistograms(Float_t energy, Float_t pt, Float_t time) |
2ad19c3d | 1185 | { |
1186 | // Fill some histograms to understand pile-up | |
1187 | if(!fFillPileUpHistograms) return; | |
1188 | ||
1189 | //printf("E %f, time %f\n",energy,time); | |
1190 | AliVEvent * event = GetReader()->GetInputEvent(); | |
1191 | ||
fad96885 | 1192 | if(GetReader()->IsPileUpFromSPD()) fhPtPhotonPileUp[0]->Fill(pt); |
1193 | if(GetReader()->IsPileUpFromEMCal()) fhPtPhotonPileUp[1]->Fill(pt); | |
1194 | if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPhotonPileUp[2]->Fill(pt); | |
1195 | if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPhotonPileUp[3]->Fill(pt); | |
1196 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPhotonPileUp[4]->Fill(pt); | |
1197 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPhotonPileUp[5]->Fill(pt); | |
1198 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPhotonPileUp[6]->Fill(pt); | |
1199 | ||
b2e375c7 | 1200 | fhTimePtPhotonNoCut->Fill(pt,time); |
1201 | if(GetReader()->IsPileUpFromSPD()) fhTimePtPhotonSPD->Fill(pt,time); | |
2ad19c3d | 1202 | |
de101942 | 1203 | if(energy < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold |
2ad19c3d | 1204 | |
1205 | AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event); | |
1206 | AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event); | |
1207 | ||
1208 | // N pile up vertices | |
0f7e7205 | 1209 | Int_t nVtxSPD = -1; |
1210 | Int_t nVtxTrk = -1; | |
2ad19c3d | 1211 | |
1212 | if (esdEv) | |
1213 | { | |
0f7e7205 | 1214 | nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD(); |
1215 | nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks(); | |
85c4406e | 1216 | |
2ad19c3d | 1217 | }//ESD |
1218 | else if (aodEv) | |
1219 | { | |
0f7e7205 | 1220 | nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD(); |
1221 | nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks(); | |
2ad19c3d | 1222 | }//AOD |
1223 | ||
0f7e7205 | 1224 | fhTimeNPileUpVertSPD ->Fill(time,nVtxSPD); |
1225 | fhTimeNPileUpVertTrack->Fill(time,nVtxTrk); | |
2ad19c3d | 1226 | |
85c4406e | 1227 | fhPtPhotonNPileUpSPDVtx->Fill(pt,nVtxSPD); |
0f7e7205 | 1228 | fhPtPhotonNPileUpTrkVtx->Fill(pt,nVtxTrk); |
1229 | ||
1230 | if(TMath::Abs(time) < 25) | |
85c4406e | 1231 | { |
1232 | fhPtPhotonNPileUpSPDVtxTimeCut->Fill(pt,nVtxSPD); | |
1233 | fhPtPhotonNPileUpTrkVtxTimeCut->Fill(pt,nVtxTrk); | |
0f7e7205 | 1234 | } |
1235 | ||
85c4406e | 1236 | if(time < 75 && time > -25) |
1237 | { | |
1238 | fhPtPhotonNPileUpSPDVtxTimeCut2->Fill(pt,nVtxSPD); | |
1239 | fhPtPhotonNPileUpTrkVtxTimeCut2->Fill(pt,nVtxTrk); | |
1240 | } | |
1241 | ||
1242 | //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n", | |
0f7e7205 | 1243 | // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVtxSPD,nVtxTrk); |
2ad19c3d | 1244 | |
1245 | Int_t ncont = -1; | |
5559f30a | 1246 | Float_t z1 = -1, z2 = -1; |
2ad19c3d | 1247 | Float_t diamZ = -1; |
0f7e7205 | 1248 | for(Int_t iVert=0; iVert<nVtxSPD;iVert++) |
2ad19c3d | 1249 | { |
1250 | if (esdEv) | |
1251 | { | |
1252 | const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert); | |
1253 | ncont=pv->GetNContributors(); | |
1254 | z1 = esdEv->GetPrimaryVertexSPD()->GetZ(); | |
1255 | z2 = pv->GetZ(); | |
1256 | diamZ = esdEv->GetDiamondZ(); | |
1257 | }//ESD | |
1258 | else if (aodEv) | |
1259 | { | |
1260 | AliAODVertex *pv=aodEv->GetVertex(iVert); | |
1261 | if(pv->GetType()!=AliAODVertex::kPileupSPD) continue; | |
1262 | ncont=pv->GetNContributors(); | |
1263 | z1=aodEv->GetPrimaryVertexSPD()->GetZ(); | |
1264 | z2=pv->GetZ(); | |
1265 | diamZ = aodEv->GetDiamondZ(); | |
1266 | }// AOD | |
1267 | ||
1268 | Double_t distZ = TMath::Abs(z2-z1); | |
1269 | diamZ = TMath::Abs(z2-diamZ); | |
85c4406e | 1270 | |
2ad19c3d | 1271 | fhTimeNPileUpVertContributors ->Fill(time,ncont); |
1272 | fhTimePileUpMainVertexZDistance->Fill(time,distZ); | |
1273 | fhTimePileUpMainVertexZDiamond ->Fill(time,diamZ); | |
85c4406e | 1274 | |
2ad19c3d | 1275 | }// loop |
1276 | } | |
1277 | ||
34c16486 | 1278 | //____________________________________________________________________________________ |
22ad7981 | 1279 | void AliAnaPhoton::FillShowerShapeHistograms(AliVCluster* cluster, Int_t mcTag) |
34c16486 | 1280 | { |
85c4406e | 1281 | //Fill cluster Shower Shape histograms |
521636d2 | 1282 | |
1283 | if(!fFillSSHistograms || GetMixedEvent()) return; | |
85c4406e | 1284 | |
521636d2 | 1285 | Float_t energy = cluster->E(); |
1286 | Int_t ncells = cluster->GetNCells(); | |
521636d2 | 1287 | Float_t lambda0 = cluster->GetM02(); |
1288 | Float_t lambda1 = cluster->GetM20(); | |
1289 | Float_t disp = cluster->GetDispersion()*cluster->GetDispersion(); | |
1290 | ||
1291 | TLorentzVector mom; | |
34c16486 | 1292 | if(GetReader()->GetDataType() != AliCaloTrackReader::kMC) |
1293 | { | |
1294 | cluster->GetMomentum(mom,GetVertex(0)) ; | |
1295 | }//Assume that come from vertex in straight line | |
1296 | else | |
1297 | { | |
521636d2 | 1298 | Double_t vertex[]={0,0,0}; |
1299 | cluster->GetMomentum(mom,vertex) ; | |
1300 | } | |
1301 | ||
1302 | Float_t eta = mom.Eta(); | |
1303 | Float_t phi = mom.Phi(); | |
1304 | if(phi < 0) phi+=TMath::TwoPi(); | |
1305 | ||
1306 | fhLam0E ->Fill(energy,lambda0); | |
1307 | fhLam1E ->Fill(energy,lambda1); | |
1308 | fhDispE ->Fill(energy,disp); | |
85c4406e | 1309 | |
34c16486 | 1310 | if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5) |
1311 | { | |
521636d2 | 1312 | fhLam0ETRD->Fill(energy,lambda0); |
1313 | fhLam1ETRD->Fill(energy,lambda1); | |
1314 | fhDispETRD->Fill(energy,disp); | |
521636d2 | 1315 | } |
1316 | ||
34c16486 | 1317 | Float_t l0 = 0., l1 = 0.; |
85c4406e | 1318 | Float_t dispp= 0., dEta = 0., dPhi = 0.; |
1319 | Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.; | |
764ab1f4 | 1320 | if(fCalorimeter == "EMCAL" && !fFillOnlySimpleSSHisto) |
34c16486 | 1321 | { |
1322 | GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), GetReader()->GetInputEvent()->GetEMCALCells(), cluster, | |
1323 | l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi); | |
1324 | //printf("AliAnaPhoton::FillShowerShapeHistogram - l0 %2.6f, l1 %2.6f, disp %2.6f, dEta %2.6f, dPhi %2.6f, sEta %2.6f, sPhi %2.6f, sEtaPhi %2.6f \n", | |
1325 | // l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi ); | |
1326 | //printf("AliAnaPhoton::FillShowerShapeHistogram - dispersion %f, dispersion eta+phi %f \n", | |
1327 | // disp, dPhi+dEta ); | |
1328 | fhDispEtaE -> Fill(energy,dEta); | |
1329 | fhDispPhiE -> Fill(energy,dPhi); | |
1330 | fhSumEtaE -> Fill(energy,sEta); | |
1331 | fhSumPhiE -> Fill(energy,sPhi); | |
1332 | fhSumEtaPhiE -> Fill(energy,sEtaPhi); | |
1333 | fhDispEtaPhiDiffE -> Fill(energy,dPhi-dEta); | |
1334 | if(dEta+dPhi>0)fhSphericityE -> Fill(energy,(dPhi-dEta)/(dEta+dPhi)); | |
1335 | if(dEta+sEta>0)fhDispSumEtaDiffE -> Fill(energy,(dEta-sEta)/((dEta+sEta)/2.)); | |
85c4406e | 1336 | if(dPhi+sPhi>0)fhDispSumPhiDiffE -> Fill(energy,(dPhi-sPhi)/((dPhi+sPhi)/2.)); |
34c16486 | 1337 | |
bfdcf7fb | 1338 | Int_t ebin = -1; |
1339 | if (energy < 2 ) ebin = 0; | |
1340 | else if (energy < 4 ) ebin = 1; | |
1341 | else if (energy < 6 ) ebin = 2; | |
1342 | else if (energy < 10) ebin = 3; | |
85c4406e | 1343 | else if (energy < 15) ebin = 4; |
1344 | else if (energy < 20) ebin = 5; | |
1345 | else ebin = 6; | |
bfdcf7fb | 1346 | |
1347 | fhDispEtaDispPhi[ebin]->Fill(dEta ,dPhi); | |
1348 | fhLambda0DispEta[ebin]->Fill(lambda0,dEta); | |
1349 | fhLambda0DispPhi[ebin]->Fill(lambda0,dPhi); | |
1350 | ||
34c16486 | 1351 | } |
1352 | ||
85c4406e | 1353 | // if track-matching was of, check effect of track-matching residual cut |
b5dbb99b | 1354 | |
1355 | if(!fRejectTrackMatch) | |
1356 | { | |
1357 | Float_t dZ = cluster->GetTrackDz(); | |
1358 | Float_t dR = cluster->GetTrackDx(); | |
34c16486 | 1359 | if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn()) |
1360 | { | |
b5dbb99b | 1361 | dR = 2000., dZ = 2000.; |
1362 | GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR); | |
85c4406e | 1363 | } |
b5dbb99b | 1364 | |
1365 | if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05) | |
1366 | { | |
1367 | fhLam0ETM ->Fill(energy,lambda0); | |
1368 | fhLam1ETM ->Fill(energy,lambda1); | |
1369 | fhDispETM ->Fill(energy,disp); | |
1370 | ||
34c16486 | 1371 | if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5) |
1372 | { | |
b5dbb99b | 1373 | fhLam0ETMTRD->Fill(energy,lambda0); |
1374 | fhLam1ETMTRD->Fill(energy,lambda1); | |
1375 | fhDispETMTRD->Fill(energy,disp); | |
1376 | } | |
1377 | } | |
85c4406e | 1378 | }// if track-matching was of, check effect of matching residual cut |
b5dbb99b | 1379 | |
764ab1f4 | 1380 | |
4301207e | 1381 | if(!fFillOnlySimpleSSHisto) |
1382 | { | |
764ab1f4 | 1383 | if(energy < 2) |
1384 | { | |
1385 | fhNCellsLam0LowE ->Fill(ncells,lambda0); | |
1386 | fhNCellsLam1LowE ->Fill(ncells,lambda1); | |
1387 | fhNCellsDispLowE ->Fill(ncells,disp); | |
1388 | ||
1389 | fhLam1Lam0LowE ->Fill(lambda1,lambda0); | |
1390 | fhLam0DispLowE ->Fill(lambda0,disp); | |
1391 | fhDispLam1LowE ->Fill(disp,lambda1); | |
1392 | fhEtaLam0LowE ->Fill(eta,lambda0); | |
85c4406e | 1393 | fhPhiLam0LowE ->Fill(phi,lambda0); |
764ab1f4 | 1394 | } |
85c4406e | 1395 | else |
764ab1f4 | 1396 | { |
1397 | fhNCellsLam0HighE ->Fill(ncells,lambda0); | |
1398 | fhNCellsLam1HighE ->Fill(ncells,lambda1); | |
1399 | fhNCellsDispHighE ->Fill(ncells,disp); | |
1400 | ||
1401 | fhLam1Lam0HighE ->Fill(lambda1,lambda0); | |
1402 | fhLam0DispHighE ->Fill(lambda0,disp); | |
1403 | fhDispLam1HighE ->Fill(disp,lambda1); | |
1404 | fhEtaLam0HighE ->Fill(eta, lambda0); | |
1405 | fhPhiLam0HighE ->Fill(phi, lambda0); | |
1406 | } | |
521636d2 | 1407 | } |
4301207e | 1408 | |
34c16486 | 1409 | if(IsDataMC()) |
1410 | { | |
f66d95af | 1411 | AliVCaloCells* cells = 0; |
1412 | if(fCalorimeter == "EMCAL") cells = GetEMCALCells(); | |
1413 | else cells = GetPHOSCells(); | |
3d5d5078 | 1414 | |
1415 | //Fill histograms to check shape of embedded clusters | |
1416 | Float_t fraction = 0; | |
85c4406e | 1417 | // printf("check embedding %i\n",GetReader()->IsEmbeddedClusterSelectionOn()); |
1418 | ||
34c16486 | 1419 | if(GetReader()->IsEmbeddedClusterSelectionOn()) |
1420 | {//Only working for EMCAL | |
85c4406e | 1421 | // printf("embedded\n"); |
3d5d5078 | 1422 | Float_t clusterE = 0; // recalculate in case corrections applied. |
1423 | Float_t cellE = 0; | |
34c16486 | 1424 | for(Int_t icell = 0; icell < cluster->GetNCells(); icell++) |
1425 | { | |
3d5d5078 | 1426 | cellE = cells->GetCellAmplitude(cluster->GetCellAbsId(icell)); |
85c4406e | 1427 | clusterE+=cellE; |
3d5d5078 | 1428 | fraction+=cellE*cluster->GetCellAmplitudeFraction(icell); |
1429 | } | |
1430 | ||
1431 | //Fraction of total energy due to the embedded signal | |
1432 | fraction/=clusterE; | |
1433 | ||
85c4406e | 1434 | if(GetDebug() > 1 ) |
8d6b7f60 | 1435 | printf("AliAnaPhoton::FillShowerShapeHistogram() - Energy fraction of embedded signal %2.3f, Energy %2.3f\n",fraction, clusterE); |
3d5d5078 | 1436 | |
1437 | fhEmbeddedSignalFractionEnergy->Fill(clusterE,fraction); | |
1438 | ||
85c4406e | 1439 | } // embedded fraction |
3d5d5078 | 1440 | |
f66d95af | 1441 | // Get the fraction of the cluster energy that carries the cell with highest energy |
f66d95af | 1442 | Float_t maxCellFraction = 0.; |
4301207e | 1443 | Int_t absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster,maxCellFraction); |
f66d95af | 1444 | |
4301207e | 1445 | if( absID < 0 ) AliFatal("Wrong absID"); |
1446 | ||
f66d95af | 1447 | // Check the origin and fill histograms |
34c16486 | 1448 | |
1449 | Int_t mcIndex = -1; | |
1450 | ||
85c4406e | 1451 | if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) && |
3d5d5078 | 1452 | !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) && |
34c16486 | 1453 | !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) && |
1454 | !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta)) | |
1455 | { | |
1456 | mcIndex = kmcssPhoton ; | |
85c4406e | 1457 | |
34c16486 | 1458 | if(!GetReader()->IsEmbeddedClusterSelectionOn()) |
1459 | { | |
3d5d5078 | 1460 | //Check particle overlaps in cluster |
1461 | ||
85c4406e | 1462 | // Compare the primary depositing more energy with the rest, |
8d6b7f60 | 1463 | // if no photon/electron as comon ancestor (conversions), count as other particle |
4914e781 | 1464 | const UInt_t nlabels = cluster->GetNLabels(); |
1465 | Int_t overpdg[nlabels]; | |
1466 | Int_t noverlaps = GetMCAnalysisUtils()->GetNOverlaps(cluster->GetLabels(), nlabels,mcTag,-1,GetReader(),overpdg); | |
1467 | ||
8d6b7f60 | 1468 | //printf("N overlaps %d \n",noverlaps); |
3d5d5078 | 1469 | |
f27fe026 | 1470 | if(noverlaps == 0) |
34c16486 | 1471 | { |
3d5d5078 | 1472 | fhMCPhotonELambda0NoOverlap ->Fill(energy, lambda0); |
3d5d5078 | 1473 | } |
f27fe026 | 1474 | else if(noverlaps == 1) |
85c4406e | 1475 | { |
3d5d5078 | 1476 | fhMCPhotonELambda0TwoOverlap ->Fill(energy, lambda0); |
3d5d5078 | 1477 | } |
f27fe026 | 1478 | else if(noverlaps > 1) |
85c4406e | 1479 | { |
3d5d5078 | 1480 | fhMCPhotonELambda0NOverlap ->Fill(energy, lambda0); |
3d5d5078 | 1481 | } |
85c4406e | 1482 | else |
34c16486 | 1483 | { |
f27fe026 | 1484 | printf("AliAnaPhoton::FillShowerShapeHistogram() - n overlaps = %d!!\n", noverlaps); |
3d5d5078 | 1485 | } |
1486 | }//No embedding | |
1487 | ||
1488 | //Fill histograms to check shape of embedded clusters | |
34c16486 | 1489 | if(GetReader()->IsEmbeddedClusterSelectionOn()) |
1490 | { | |
85c4406e | 1491 | if (fraction > 0.9) |
3d5d5078 | 1492 | { |
1493 | fhEmbedPhotonELambda0FullSignal ->Fill(energy, lambda0); | |
3d5d5078 | 1494 | } |
1495 | else if(fraction > 0.5) | |
1496 | { | |
1497 | fhEmbedPhotonELambda0MostlySignal ->Fill(energy, lambda0); | |
3d5d5078 | 1498 | } |
1499 | else if(fraction > 0.1) | |
85c4406e | 1500 | { |
3d5d5078 | 1501 | fhEmbedPhotonELambda0MostlyBkg ->Fill(energy, lambda0); |
3d5d5078 | 1502 | } |
1503 | else | |
1504 | { | |
1505 | fhEmbedPhotonELambda0FullBkg ->Fill(energy, lambda0); | |
3d5d5078 | 1506 | } |
1507 | } // embedded | |
1508 | ||
521636d2 | 1509 | }//photon no conversion |
4431f13a | 1510 | else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) && |
1511 | GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) && | |
1512 | !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) && | |
1513 | !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta)) | |
1514 | { | |
1515 | mcIndex = kmcssConversion ; | |
1516 | }//conversion photon | |
1517 | ||
34c16486 | 1518 | else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) |
1519 | { | |
1520 | mcIndex = kmcssElectron ; | |
521636d2 | 1521 | }//electron |
34c16486 | 1522 | else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) ) |
1523 | { | |
1524 | mcIndex = kmcssPi0 ; | |
3d5d5078 | 1525 | |
1526 | //Fill histograms to check shape of embedded clusters | |
34c16486 | 1527 | if(GetReader()->IsEmbeddedClusterSelectionOn()) |
1528 | { | |
85c4406e | 1529 | if (fraction > 0.9) |
3d5d5078 | 1530 | { |
1531 | fhEmbedPi0ELambda0FullSignal ->Fill(energy, lambda0); | |
3d5d5078 | 1532 | } |
1533 | else if(fraction > 0.5) | |
1534 | { | |
1535 | fhEmbedPi0ELambda0MostlySignal ->Fill(energy, lambda0); | |
3d5d5078 | 1536 | } |
1537 | else if(fraction > 0.1) | |
85c4406e | 1538 | { |
3d5d5078 | 1539 | fhEmbedPi0ELambda0MostlyBkg ->Fill(energy, lambda0); |
3d5d5078 | 1540 | } |
1541 | else | |
1542 | { | |
1543 | fhEmbedPi0ELambda0FullBkg ->Fill(energy, lambda0); | |
3d5d5078 | 1544 | } |
85c4406e | 1545 | } // embedded |
3d5d5078 | 1546 | |
521636d2 | 1547 | }//pi0 |
34c16486 | 1548 | else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ) |
1549 | { | |
1550 | mcIndex = kmcssEta ; | |
85c4406e | 1551 | }//eta |
1552 | else | |
34c16486 | 1553 | { |
85c4406e | 1554 | mcIndex = kmcssOther ; |
1555 | }//other particles | |
521636d2 | 1556 | |
34c16486 | 1557 | fhMCELambda0 [mcIndex]->Fill(energy, lambda0); |
1558 | fhMCELambda1 [mcIndex]->Fill(energy, lambda1); | |
1559 | fhMCEDispersion [mcIndex]->Fill(energy, disp); | |
1560 | fhMCNCellsE [mcIndex]->Fill(energy, ncells); | |
1561 | fhMCMaxCellDiffClusterE[mcIndex]->Fill(energy, maxCellFraction); | |
1562 | ||
764ab1f4 | 1563 | if(!fFillOnlySimpleSSHisto) |
34c16486 | 1564 | { |
764ab1f4 | 1565 | if (energy < 2.) |
1566 | { | |
1567 | fhMCLambda0vsClusterMaxCellDiffE0[mcIndex]->Fill(lambda0, maxCellFraction); | |
1568 | fhMCNCellsvsClusterMaxCellDiffE0 [mcIndex]->Fill(ncells, maxCellFraction); | |
1569 | } | |
1570 | else if(energy < 6.) | |
1571 | { | |
1572 | fhMCLambda0vsClusterMaxCellDiffE2[mcIndex]->Fill(lambda0, maxCellFraction); | |
1573 | fhMCNCellsvsClusterMaxCellDiffE2 [mcIndex]->Fill(ncells, maxCellFraction); | |
1574 | } | |
1575 | else | |
1576 | { | |
1577 | fhMCLambda0vsClusterMaxCellDiffE6[mcIndex]->Fill(lambda0, maxCellFraction); | |
1578 | fhMCNCellsvsClusterMaxCellDiffE6 [mcIndex]->Fill(ncells, maxCellFraction); | |
1579 | } | |
1580 | ||
1581 | if(fCalorimeter == "EMCAL") | |
1582 | { | |
1583 | fhMCEDispEta [mcIndex]-> Fill(energy,dEta); | |
1584 | fhMCEDispPhi [mcIndex]-> Fill(energy,dPhi); | |
1585 | fhMCESumEtaPhi [mcIndex]-> Fill(energy,sEtaPhi); | |
1586 | fhMCEDispEtaPhiDiff [mcIndex]-> Fill(energy,dPhi-dEta); | |
85c4406e | 1587 | if(dEta+dPhi>0)fhMCESphericity[mcIndex]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi)); |
764ab1f4 | 1588 | |
1589 | Int_t ebin = -1; | |
1590 | if (energy < 2 ) ebin = 0; | |
1591 | else if (energy < 4 ) ebin = 1; | |
1592 | else if (energy < 6 ) ebin = 2; | |
1593 | else if (energy < 10) ebin = 3; | |
85c4406e | 1594 | else if (energy < 15) ebin = 4; |
1595 | else if (energy < 20) ebin = 5; | |
1596 | else ebin = 6; | |
764ab1f4 | 1597 | |
1598 | fhMCDispEtaDispPhi[ebin][mcIndex]->Fill(dEta ,dPhi); | |
1599 | fhMCLambda0DispEta[ebin][mcIndex]->Fill(lambda0,dEta); | |
85c4406e | 1600 | fhMCLambda0DispPhi[ebin][mcIndex]->Fill(lambda0,dPhi); |
764ab1f4 | 1601 | } |
34c16486 | 1602 | } |
521636d2 | 1603 | }//MC data |
1604 | ||
1605 | } | |
1606 | ||
4bfeae64 | 1607 | //__________________________________________________________________________ |
85c4406e | 1608 | void AliAnaPhoton::FillTrackMatchingResidualHistograms(AliVCluster* cluster, |
22ad7981 | 1609 | Int_t cut) |
4bfeae64 | 1610 | { |
1611 | // If selected, fill histograms with residuals of matched clusters, help to define track matching cut | |
1612 | // Residual filled for different cuts 0 (No cut), after 1 PID cut | |
85c4406e | 1613 | |
4bfeae64 | 1614 | Float_t dZ = cluster->GetTrackDz(); |
1615 | Float_t dR = cluster->GetTrackDx(); | |
1616 | ||
1617 | if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn()) | |
1618 | { | |
1619 | dR = 2000., dZ = 2000.; | |
1620 | GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR); | |
85c4406e | 1621 | } |
1622 | ||
b2e375c7 | 1623 | AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent()); |
1624 | ||
1625 | Bool_t positive = kFALSE; | |
1626 | if(track) positive = (track->Charge()>0); | |
1627 | ||
4bfeae64 | 1628 | if(fhTrackMatchedDEta[cut] && TMath::Abs(dR) < 999) |
1629 | { | |
1630 | fhTrackMatchedDEta[cut]->Fill(cluster->E(),dZ); | |
1631 | fhTrackMatchedDPhi[cut]->Fill(cluster->E(),dR); | |
4bfeae64 | 1632 | if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhi[cut]->Fill(dZ,dR); |
b2e375c7 | 1633 | |
1634 | if(track) | |
1635 | { | |
1636 | if(positive) | |
1637 | { | |
1638 | fhTrackMatchedDEtaPos[cut]->Fill(cluster->E(),dZ); | |
1639 | fhTrackMatchedDPhiPos[cut]->Fill(cluster->E(),dR); | |
1640 | if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhiPos[cut]->Fill(dZ,dR); | |
1641 | } | |
1642 | else | |
1643 | { | |
1644 | fhTrackMatchedDEtaNeg[cut]->Fill(cluster->E(),dZ); | |
1645 | fhTrackMatchedDPhiNeg[cut]->Fill(cluster->E(),dR); | |
1646 | if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhiNeg[cut]->Fill(dZ,dR); | |
1647 | } | |
1648 | } | |
4bfeae64 | 1649 | |
1650 | Int_t nSMod = GetModuleNumber(cluster); | |
1651 | ||
1652 | if(fCalorimeter=="EMCAL" && nSMod > 5) | |
1653 | { | |
1654 | fhTrackMatchedDEtaTRD[cut]->Fill(cluster->E(),dZ); | |
1655 | fhTrackMatchedDPhiTRD[cut]->Fill(cluster->E(),dR); | |
1656 | } | |
1657 | ||
1658 | // Check dEdx and E/p of matched clusters | |
b2e375c7 | 1659 | |
4bfeae64 | 1660 | if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05) |
85c4406e | 1661 | { |
85c4406e | 1662 | if(track) |
4bfeae64 | 1663 | { |
4bfeae64 | 1664 | Float_t dEdx = track->GetTPCsignal(); |
1665 | Float_t eOverp = cluster->E()/track->P(); | |
1666 | ||
1667 | fhdEdx[cut] ->Fill(cluster->E(), dEdx); | |
1668 | fhEOverP[cut]->Fill(cluster->E(), eOverp); | |
1669 | ||
1670 | if(fCalorimeter=="EMCAL" && nSMod > 5) | |
1671 | fhEOverPTRD[cut]->Fill(cluster->E(), eOverp); | |
1672 | ||
1673 | ||
1674 | } | |
1675 | else | |
85c4406e | 1676 | printf("AliAnaPhoton::FillTrackMatchingResidualHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ); |
4bfeae64 | 1677 | |
1678 | ||
1679 | ||
1680 | if(IsDataMC()) | |
1681 | { | |
1682 | ||
2644ead9 | 1683 | Int_t tag = GetMCAnalysisUtils()->CheckOrigin(cluster->GetLabels(),cluster->GetNLabels(),GetReader()); |
4bfeae64 | 1684 | |
1685 | if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) ) | |
1686 | { | |
1687 | if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) || | |
85c4406e | 1688 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 2.5 ); |
4bfeae64 | 1689 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 0.5 ); |
1690 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 1.5 ); | |
1691 | else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 3.5 ); | |
1692 | ||
1693 | // Check if several particles contributed to cluster and discard overlapped mesons | |
85c4406e | 1694 | if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) || |
34c16486 | 1695 | !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta)) |
1696 | { | |
4bfeae64 | 1697 | if(cluster->GetNLabels()==1) |
1698 | { | |
1699 | fhTrackMatchedDEtaMCNoOverlap[cut]->Fill(cluster->E(),dZ); | |
1700 | fhTrackMatchedDPhiMCNoOverlap[cut]->Fill(cluster->E(),dR); | |
1701 | } | |
85c4406e | 1702 | else |
4bfeae64 | 1703 | { |
1704 | fhTrackMatchedDEtaMCOverlap[cut]->Fill(cluster->E(),dZ); | |
1705 | fhTrackMatchedDPhiMCOverlap[cut]->Fill(cluster->E(),dR); | |
1706 | } | |
1707 | ||
1708 | }// Check overlaps | |
1709 | ||
1710 | } | |
1711 | else | |
1712 | { | |
1713 | if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) || | |
85c4406e | 1714 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 6.5 ); |
4bfeae64 | 1715 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 4.5 ); |
1716 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 5.5 ); | |
1717 | else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 7.5 ); | |
1718 | ||
1719 | // Check if several particles contributed to cluster | |
85c4406e | 1720 | if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) || |
34c16486 | 1721 | !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta)) |
1722 | { | |
4bfeae64 | 1723 | fhTrackMatchedDEtaMCConversion[cut]->Fill(cluster->E(),dZ); |
1724 | fhTrackMatchedDPhiMCConversion[cut]->Fill(cluster->E(),dR); | |
1725 | ||
85c4406e | 1726 | }// Check overlaps |
4bfeae64 | 1727 | |
1728 | } | |
1729 | ||
85c4406e | 1730 | } // MC |
4bfeae64 | 1731 | |
1732 | } // residuals window | |
1733 | ||
1734 | } // Small residual | |
1735 | ||
1736 | } | |
1737 | ||
1738 | //___________________________________________ | |
0c1383b5 | 1739 | TObjString * AliAnaPhoton::GetAnalysisCuts() |
85c4406e | 1740 | { |
0c1383b5 | 1741 | //Save parameters used for analysis |
1742 | TString parList ; //this will be list of parameters used for this analysis. | |
5ae09196 | 1743 | const Int_t buffersize = 255; |
1744 | char onePar[buffersize] ; | |
0c1383b5 | 1745 | |
5ae09196 | 1746 | snprintf(onePar,buffersize,"--- AliAnaPhoton ---\n") ; |
85c4406e | 1747 | parList+=onePar ; |
5ae09196 | 1748 | snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ; |
0c1383b5 | 1749 | parList+=onePar ; |
5ae09196 | 1750 | snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster) \n",fMinDist) ; |
0c1383b5 | 1751 | parList+=onePar ; |
5ae09196 | 1752 | snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation) \n",fMinDist2) ; |
0c1383b5 | 1753 | parList+=onePar ; |
5ae09196 | 1754 | snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study) \n",fMinDist3) ; |
0c1383b5 | 1755 | parList+=onePar ; |
5ae09196 | 1756 | snprintf(onePar,buffersize,"fRejectTrackMatch: %d\n",fRejectTrackMatch) ; |
85c4406e | 1757 | parList+=onePar ; |
0c1383b5 | 1758 | |
1759 | //Get parameters set in base class. | |
1760 | parList += GetBaseParametersList() ; | |
1761 | ||
1762 | //Get parameters set in PID class. | |
1763 | parList += GetCaloPID()->GetPIDParametersList() ; | |
1764 | ||
1765 | //Get parameters set in FiducialCut class (not available yet) | |
85c4406e | 1766 | //parlist += GetFidCut()->GetFidCutParametersList() |
0c1383b5 | 1767 | |
1768 | return new TObjString(parList) ; | |
1769 | } | |
1770 | ||
1c5acb87 | 1771 | //________________________________________________________________________ |
1772 | TList * AliAnaPhoton::GetCreateOutputObjects() | |
c2a62a94 | 1773 | { |
85c4406e | 1774 | // Create histograms to be saved in output file and |
477d6cee | 1775 | // store them in outputContainer |
85c4406e | 1776 | TList * outputContainer = new TList() ; |
1777 | outputContainer->SetName("PhotonHistos") ; | |
4a745797 | 1778 | |
85c4406e | 1779 | Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); |
1780 | Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); | |
1781 | Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); | |
745913ae | 1782 | Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin(); |
85c4406e | 1783 | Int_t nbins = GetHistogramRanges()->GetHistoNClusterCellBins(); Int_t nmax = GetHistogramRanges()->GetHistoNClusterCellMax(); Int_t nmin = GetHistogramRanges()->GetHistoNClusterCellMin(); |
1784 | Int_t ntimebins= GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin(); | |
1785 | ||
1786 | Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins(); | |
1787 | Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax(); | |
09273901 | 1788 | Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin(); |
85c4406e | 1789 | Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins(); |
1790 | Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax(); | |
09273901 | 1791 | Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin(); |
1792 | ||
85c4406e | 1793 | Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins(); |
1794 | Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax(); | |
31ae6d59 | 1795 | Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin(); |
85c4406e | 1796 | Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins(); |
1797 | Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax(); | |
31ae6d59 | 1798 | Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin(); |
09273901 | 1799 | |
d2655d46 | 1800 | Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins for SS studies |
1801 | ||
eb86112d | 1802 | Int_t nTrigBC = 1; |
1803 | Int_t iBCShift = 0; | |
1804 | if(!GetReader()->AreBadTriggerEventsRemoved()) | |
1805 | { | |
1806 | nTrigBC = 11; | |
1807 | iBCShift = 5; | |
1808 | } | |
1809 | ||
9e51e29a | 1810 | TString cut[] = {"Open","Reader","E","Time","NCells","NLM","Fidutial","Matching","Bad","PID"}; |
85c4406e | 1811 | for (Int_t i = 0; i < 10 ; i++) |
fc195fd0 | 1812 | { |
58ea8ce5 | 1813 | fhClusterCutsE[i] = new TH1F(Form("hE_Cut_%d_%s", i, cut[i].Data()), |
fc195fd0 | 1814 | Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()), |
85c4406e | 1815 | nptbins,ptmin,ptmax); |
58ea8ce5 | 1816 | fhClusterCutsE[i]->SetYTitle("d#it{N}/d#it{E} "); |
1817 | fhClusterCutsE[i]->SetXTitle("#it{E} (GeV)"); | |
1818 | outputContainer->Add(fhClusterCutsE[i]) ; | |
1819 | ||
1820 | fhClusterCutsPt[i] = new TH1F(Form("hPt_Cut_%d_%s", i, cut[i].Data()), | |
1821 | Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()), | |
1822 | nptbins,ptmin,ptmax); | |
1823 | fhClusterCutsPt[i]->SetYTitle("d#it{N}/d#it{E} "); | |
1824 | fhClusterCutsPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})"); | |
1825 | outputContainer->Add(fhClusterCutsPt[i]) ; | |
fc195fd0 | 1826 | } |
1827 | ||
6df33fcb | 1828 | fhEClusterSM = new TH2F("hEClusterSM","Raw clusters E and super-module number", |
1829 | nptbins,ptmin,ptmax, | |
1830 | GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed()); | |
1831 | fhEClusterSM->SetYTitle("SuperModule "); | |
184ca640 | 1832 | fhEClusterSM->SetXTitle("#it{E} (GeV)"); |
6df33fcb | 1833 | outputContainer->Add(fhEClusterSM) ; |
1834 | ||
184ca640 | 1835 | fhPtClusterSM = new TH2F("hPtClusterSM","Raw clusters #it{p}_[T] and super-module number", |
6df33fcb | 1836 | nptbins,ptmin,ptmax, |
1837 | GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed()); | |
1838 | fhPtClusterSM->SetYTitle("SuperModule "); | |
184ca640 | 1839 | fhPtClusterSM->SetXTitle("#it{E} (GeV)"); |
6df33fcb | 1840 | outputContainer->Add(fhPtClusterSM) ; |
1841 | ||
1842 | fhEPhotonSM = new TH2F("hEPhotonSM","Selected clusters E and super-module number", | |
1843 | nptbins,ptmin,ptmax, | |
1844 | GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed()); | |
1845 | fhEPhotonSM->SetYTitle("SuperModule "); | |
184ca640 | 1846 | fhEPhotonSM->SetXTitle("#it{E} (GeV)"); |
6df33fcb | 1847 | outputContainer->Add(fhEPhotonSM) ; |
1848 | ||
184ca640 | 1849 | fhPtPhotonSM = new TH2F("hPtPhotonSM","Selected clusters #it{p}_[T] and super-module number", |
6df33fcb | 1850 | nptbins,ptmin,ptmax, |
1851 | GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed()); | |
1852 | fhPtPhotonSM->SetYTitle("SuperModule "); | |
184ca640 | 1853 | fhPtPhotonSM->SetXTitle("#it{E} (GeV)"); |
6df33fcb | 1854 | outputContainer->Add(fhPtPhotonSM) ; |
1855 | ||
85c4406e | 1856 | fhNCellsE = new TH2F ("hNCellsE","# of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nbins,nmin,nmax); |
184ca640 | 1857 | fhNCellsE->SetXTitle("#it{E} (GeV)"); |
c4a7d28a | 1858 | fhNCellsE->SetYTitle("# of cells in cluster"); |
85c4406e | 1859 | outputContainer->Add(fhNCellsE); |
f15c25da | 1860 | |
85c4406e | 1861 | fhCellsE = new TH2F ("hCellsE","energy of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nptbins*2,ptmin,ptmax); |
184ca640 | 1862 | fhCellsE->SetXTitle("#it{E}_{cluster} (GeV)"); |
1863 | fhCellsE->SetYTitle("#it{E}_{cell} (GeV)"); | |
85c4406e | 1864 | outputContainer->Add(fhCellsE); |
5c46c992 | 1865 | |
b2e375c7 | 1866 | fhTimePt = new TH2F ("hTimePt","time of cluster vs pT of clusters", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 1867 | fhTimePt->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
1868 | fhTimePt->SetYTitle("#it{time} (ns)"); | |
b2e375c7 | 1869 | outputContainer->Add(fhTimePt); |
6175da48 | 1870 | |
f66d95af | 1871 | fhMaxCellDiffClusterE = new TH2F ("hMaxCellDiffClusterE","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters", |
85c4406e | 1872 | nptbins,ptmin,ptmax, 500,0,1.); |
184ca640 | 1873 | fhMaxCellDiffClusterE->SetXTitle("#it{E}_{cluster} (GeV) "); |
1874 | fhMaxCellDiffClusterE->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}"); | |
85c4406e | 1875 | outputContainer->Add(fhMaxCellDiffClusterE); |
f66d95af | 1876 | |
85c4406e | 1877 | fhEPhoton = new TH1F("hEPhoton","Number of #gamma over calorimeter vs energy",nptbins,ptmin,ptmax); |
184ca640 | 1878 | fhEPhoton->SetYTitle("#it{counts}"); |
1879 | fhEPhoton->SetXTitle("#it{E}_{#gamma}(GeV)"); | |
85c4406e | 1880 | outputContainer->Add(fhEPhoton) ; |
20218aea | 1881 | |
184ca640 | 1882 | fhPtPhoton = new TH1F("hPtPhoton","Number of #gamma over calorimeter vs #it{p}_[T]",nptbins,ptmin,ptmax); |
1883 | fhPtPhoton->SetYTitle("#it{counts}"); | |
1884 | fhPtPhoton->SetXTitle("p_{T #gamma}(GeV/#it{c})"); | |
85c4406e | 1885 | outputContainer->Add(fhPtPhoton) ; |
1886 | ||
184ca640 | 1887 | fhPtCentralityPhoton = new TH2F("hPtCentralityPhoton","centrality vs #it{p}_[T]",nptbins,ptmin,ptmax, 100,0,100); |
c8710850 | 1888 | fhPtCentralityPhoton->SetYTitle("Centrality"); |
184ca640 | 1889 | fhPtCentralityPhoton->SetXTitle("#it{p}_[T](GeV/#it{c})"); |
c8710850 | 1890 | outputContainer->Add(fhPtCentralityPhoton) ; |
1891 | ||
184ca640 | 1892 | fhPtEventPlanePhoton = new TH2F("hPtEventPlanePhoton","centrality vs #it{p}_[T]",nptbins,ptmin,ptmax, 100,0,TMath::Pi()); |
c8710850 | 1893 | fhPtEventPlanePhoton->SetYTitle("Event plane angle (rad)"); |
184ca640 | 1894 | fhPtEventPlanePhoton->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
c8710850 | 1895 | outputContainer->Add(fhPtEventPlanePhoton) ; |
85c4406e | 1896 | |
c2a62a94 | 1897 | fhEtaPhi = new TH2F |
184ca640 | 1898 | ("hEtaPhi","cluster,#it{E} > 0.5 GeV, #eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 1899 | fhEtaPhi->SetYTitle("#phi (rad)"); |
1900 | fhEtaPhi->SetXTitle("#eta"); | |
1901 | outputContainer->Add(fhEtaPhi) ; | |
85c4406e | 1902 | |
c2a62a94 | 1903 | if(fCalorimeter=="EMCAL" && fFillEMCALBCHistograms) |
1904 | { | |
1905 | fhEtaPhiEMCALBC0 = new TH2F | |
184ca640 | 1906 | ("hEtaPhiEMCALBC0","cluster,#it{E} > 2 GeV, #eta vs #phi, for clusters with |time| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 1907 | fhEtaPhiEMCALBC0->SetYTitle("#phi (rad)"); |
1908 | fhEtaPhiEMCALBC0->SetXTitle("#eta"); | |
1909 | outputContainer->Add(fhEtaPhiEMCALBC0) ; | |
1910 | ||
1911 | fhEtaPhiEMCALBC1 = new TH2F | |
184ca640 | 1912 | ("hEtaPhiEMCALBC1","cluster,#it{E} > 2 GeV, #eta vs #phi, for clusters with 25 < |time| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 1913 | fhEtaPhiEMCALBC1->SetYTitle("#phi (rad)"); |
1914 | fhEtaPhiEMCALBC1->SetXTitle("#eta"); | |
1915 | outputContainer->Add(fhEtaPhiEMCALBC1) ; | |
1916 | ||
1917 | fhEtaPhiEMCALBCN = new TH2F | |
184ca640 | 1918 | ("hEtaPhiEMCALBCN","cluster,#it{E} > 2 GeV, #eta vs #phi, for clusters with |time| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 1919 | fhEtaPhiEMCALBCN->SetYTitle("#phi (rad)"); |
1920 | fhEtaPhiEMCALBCN->SetXTitle("#eta"); | |
1921 | outputContainer->Add(fhEtaPhiEMCALBCN) ; | |
1922 | ||
eb86112d | 1923 | for(Int_t i = 0; i < nTrigBC; i++) |
c2a62a94 | 1924 | { |
1925 | fhEtaPhiTriggerEMCALBC[i] = new TH2F | |
eb86112d | 1926 | (Form("hEtaPhiTriggerEMCALBC%d",i-iBCShift), |
184ca640 | 1927 | Form("cluster #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-iBCShift), |
c2a62a94 | 1928 | netabins,etamin,etamax,nphibins,phimin,phimax); |
1929 | fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)"); | |
1930 | fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta"); | |
1931 | outputContainer->Add(fhEtaPhiTriggerEMCALBC[i]) ; | |
1932 | ||
1933 | fhTimeTriggerEMCALBC[i] = new TH2F | |
eb86112d | 1934 | (Form("hTimeTriggerEMCALBC%d",i-iBCShift), |
184ca640 | 1935 | Form("cluster #it{time} vs #it{E} of clusters, Trigger EMCAL-BC=%d",i-iBCShift), |
c2a62a94 | 1936 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 1937 | fhTimeTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)"); |
1938 | fhTimeTriggerEMCALBC[i]->SetYTitle("#it{time} (ns)"); | |
c2a62a94 | 1939 | outputContainer->Add(fhTimeTriggerEMCALBC[i]); |
1940 | ||
1941 | fhTimeTriggerEMCALBCPileUpSPD[i] = new TH2F | |
eb86112d | 1942 | (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-iBCShift), |
184ca640 | 1943 | Form("cluster #it{time} vs #it{E} of clusters, Trigger EMCAL-BC=%d",i-iBCShift), |
c2a62a94 | 1944 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 1945 | fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)"); |
1946 | fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{time} (ns)"); | |
c2a62a94 | 1947 | outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]); |
afb3af8a | 1948 | |
1949 | fhEtaPhiTriggerEMCALBCUM[i] = new TH2F | |
eb86112d | 1950 | (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-iBCShift), |
184ca640 | 1951 | Form("cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-iBCShift), |
afb3af8a | 1952 | netabins,etamin,etamax,nphibins,phimin,phimax); |
1953 | fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)"); | |
1954 | fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta"); | |
1955 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ; | |
1956 | ||
1957 | fhTimeTriggerEMCALBCUM[i] = new TH2F | |
eb86112d | 1958 | (Form("hTimeTriggerEMCALBC%d_UnMatch",i-iBCShift), |
184ca640 | 1959 | Form("cluster #it{time} vs #it{E} of clusters, unmatched trigger EMCAL-BC=%d",i-iBCShift), |
afb3af8a | 1960 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 1961 | fhTimeTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)"); |
1962 | fhTimeTriggerEMCALBCUM[i]->SetYTitle("#it{time} (ns)"); | |
afb3af8a | 1963 | outputContainer->Add(fhTimeTriggerEMCALBCUM[i]); |
1964 | ||
1965 | fhEtaPhiTriggerEMCALBCCluster[i] = new TH2F | |
eb86112d | 1966 | (Form("hEtaPhiTriggerEMCALBC%d_OnlyTrigger",i-iBCShift), |
1967 | Form("trigger cluster, #eta vs #phi, Trigger EMCAL-BC=%d",i-iBCShift), | |
afb3af8a | 1968 | netabins,etamin,etamax,nphibins,phimin,phimax); |
1969 | fhEtaPhiTriggerEMCALBCCluster[i]->SetYTitle("#phi (rad)"); | |
1970 | fhEtaPhiTriggerEMCALBCCluster[i]->SetXTitle("#eta"); | |
1971 | outputContainer->Add(fhEtaPhiTriggerEMCALBCCluster[i]) ; | |
126b8c62 | 1972 | |
afb3af8a | 1973 | fhEtaPhiTriggerEMCALBCUMCluster[i] = new TH2F |
eb86112d | 1974 | (Form("hEtaPhiTriggerEMCALBC%d_OnlyTrigger_UnMatch",i-iBCShift), |
1975 | Form("trigger cluster, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-iBCShift), | |
afb3af8a | 1976 | netabins,etamin,etamax,nphibins,phimin,phimax); |
1977 | fhEtaPhiTriggerEMCALBCUMCluster[i]->SetYTitle("#phi (rad)"); | |
1978 | fhEtaPhiTriggerEMCALBCUMCluster[i]->SetXTitle("#eta"); | |
1979 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMCluster[i]) ; | |
c2a62a94 | 1980 | } |
afb3af8a | 1981 | |
126b8c62 | 1982 | fhTimeTriggerEMCALBCCluster = new TH2F("hTimeTriggerEMCALBC_OnlyTrigger", |
184ca640 | 1983 | "trigger cluster #it{time} vs #it{E} of clusters", |
126b8c62 | 1984 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 1985 | fhTimeTriggerEMCALBCCluster->SetXTitle("#it{E} (GeV)"); |
1986 | fhTimeTriggerEMCALBCCluster->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 1987 | outputContainer->Add(fhTimeTriggerEMCALBCCluster); |
1988 | ||
1989 | fhTimeTriggerEMCALBCUMCluster = new TH2F("hTimeTriggerEMCALBC_OnlyTrigger_UnMatch", | |
184ca640 | 1990 | "trigger cluster #it{time} vs #it{E} of clusters, unmatched trigger", |
126b8c62 | 1991 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 1992 | fhTimeTriggerEMCALBCUMCluster->SetXTitle("#it{E} (GeV)"); |
1993 | fhTimeTriggerEMCALBCUMCluster->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 1994 | outputContainer->Add(fhTimeTriggerEMCALBCUMCluster); |
1995 | ||
afb3af8a | 1996 | fhEtaPhiTriggerEMCALBCClusterOverTh = new TH2F |
1997 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_OverThreshold", | |
184ca640 | 1998 | "trigger cluster #it{E} > trigger threshold, #eta vs #phi, Trigger EMCAL-BC=0", |
afb3af8a | 1999 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2000 | fhEtaPhiTriggerEMCALBCClusterOverTh->SetYTitle("#phi (rad)"); | |
2001 | fhEtaPhiTriggerEMCALBCClusterOverTh->SetXTitle("#eta"); | |
2002 | outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterOverTh) ; | |
85c4406e | 2003 | |
afb3af8a | 2004 | fhEtaPhiTriggerEMCALBCUMClusterOverTh = new TH2F |
2005 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_OverThreshold_UnMatch", | |
184ca640 | 2006 | "trigger cluster #it{E} > trigger threshold, #eta vs #phi, unmatched trigger EMCAL-BC=0", |
afb3af8a | 2007 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2008 | fhEtaPhiTriggerEMCALBCUMClusterOverTh->SetYTitle("#phi (rad)"); | |
2009 | fhEtaPhiTriggerEMCALBCUMClusterOverTh->SetXTitle("#eta"); | |
2010 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterOverTh) ; | |
85c4406e | 2011 | |
afb3af8a | 2012 | fhEtaPhiTriggerEMCALBCClusterBelowTh1 = new TH2F |
2013 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold1", | |
184ca640 | 2014 | "trigger cluster thresh-1 < #it{E} < thres, #eta vs #phi, Trigger EMCAL-BC=0", |
afb3af8a | 2015 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2016 | fhEtaPhiTriggerEMCALBCClusterBelowTh1->SetYTitle("#phi (rad)"); | |
2017 | fhEtaPhiTriggerEMCALBCClusterBelowTh1->SetXTitle("#eta"); | |
2018 | outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterBelowTh1) ; | |
2019 | ||
2020 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1 = new TH2F | |
2021 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold1_UnMatch", | |
184ca640 | 2022 | "trigger cluster thresh-1 < #it{E} < thres, #eta vs #phi, unmatched trigger EMCAL-BC=0", |
afb3af8a | 2023 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2024 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->SetYTitle("#phi (rad)"); | |
2025 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->SetXTitle("#eta"); | |
2026 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterBelowTh1) ; | |
85c4406e | 2027 | |
afb3af8a | 2028 | fhEtaPhiTriggerEMCALBCClusterBelowTh2 = new TH2F |
2029 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold2", | |
184ca640 | 2030 | "trigger cluster thresh-2 < #it{E} < thres, #eta vs #phi, Trigger EMCAL-BC=0", |
afb3af8a | 2031 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2032 | fhEtaPhiTriggerEMCALBCClusterBelowTh2->SetYTitle("#phi (rad)"); | |
2033 | fhEtaPhiTriggerEMCALBCClusterBelowTh2->SetXTitle("#eta"); | |
2034 | outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterBelowTh2) ; | |
2035 | ||
2036 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2 = new TH2F | |
2037 | ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold2_UnMatch", | |
184ca640 | 2038 | "trigger cluster thresh-2 < #it{E} < thres, #eta vs #phi, unmatched trigger EMCAL-BC=0", |
afb3af8a | 2039 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2040 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->SetYTitle("#phi (rad)"); | |
2041 | fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->SetXTitle("#eta"); | |
2042 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterBelowTh2) ; | |
85c4406e | 2043 | |
eb86112d | 2044 | if(!GetReader()->AreBadTriggerEventsRemoved()) |
2045 | { | |
2046 | fhEtaPhiTriggerEMCALBCExotic = new TH2F | |
2047 | ("hEtaPhiTriggerExotic", | |
184ca640 | 2048 | "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Exotic", |
eb86112d | 2049 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2050 | fhEtaPhiTriggerEMCALBCExotic->SetYTitle("#phi (rad)"); | |
2051 | fhEtaPhiTriggerEMCALBCExotic->SetXTitle("#eta"); | |
2052 | outputContainer->Add(fhEtaPhiTriggerEMCALBCExotic) ; | |
2053 | ||
2054 | fhTimeTriggerEMCALBCExotic = new TH2F | |
2055 | ("hTimeTriggerExotic", | |
184ca640 | 2056 | "cluster #it{time} vs #it{E} of clusters, Trigger Exotic ", |
eb86112d | 2057 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2058 | fhTimeTriggerEMCALBCExotic->SetXTitle("#it{E} (GeV)"); |
2059 | fhTimeTriggerEMCALBCExotic->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2060 | outputContainer->Add(fhTimeTriggerEMCALBCExotic); |
2061 | ||
2062 | fhEtaPhiTriggerEMCALBCUMExotic = new TH2F | |
2063 | ("hEtaPhiTriggerExotic_UnMatch", | |
184ca640 | 2064 | "cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Exotic", |
eb86112d | 2065 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2066 | fhEtaPhiTriggerEMCALBCUMExotic->SetYTitle("#phi (rad)"); | |
2067 | fhEtaPhiTriggerEMCALBCUMExotic->SetXTitle("#eta"); | |
2068 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMExotic) ; | |
2069 | ||
2070 | fhTimeTriggerEMCALBCUMExotic = new TH2F | |
2071 | ("hTimeTriggerExotic_UnMatch", | |
184ca640 | 2072 | "cluster #it{time} vs #it{E} of clusters, unmatched trigger Exotic", |
eb86112d | 2073 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2074 | fhTimeTriggerEMCALBCUMExotic->SetXTitle("#it{E} (GeV)"); |
2075 | fhTimeTriggerEMCALBCUMExotic->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2076 | outputContainer->Add(fhTimeTriggerEMCALBCUMExotic); |
2077 | ||
2078 | fhEtaPhiTriggerEMCALBCExoticCluster = new TH2F | |
2079 | ("hEtaPhiTriggerExotic_OnlyTrigger", | |
184ca640 | 2080 | "trigger cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Exotic", |
eb86112d | 2081 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2082 | fhEtaPhiTriggerEMCALBCExoticCluster->SetYTitle("#phi (rad)"); | |
2083 | fhEtaPhiTriggerEMCALBCExoticCluster->SetXTitle("#eta"); | |
2084 | outputContainer->Add(fhEtaPhiTriggerEMCALBCExoticCluster) ; | |
2085 | ||
2086 | fhTimeTriggerEMCALBCExoticCluster = new TH2F | |
2087 | ("hTimeTriggerExotic_OnlyTrigger", | |
184ca640 | 2088 | "trigger cluster #it{time} vs #it{E} of clusters, Trigger Exotic", |
eb86112d | 2089 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2090 | fhTimeTriggerEMCALBCExoticCluster->SetXTitle("#it{E} (GeV)"); |
2091 | fhTimeTriggerEMCALBCExoticCluster->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2092 | outputContainer->Add(fhTimeTriggerEMCALBCExoticCluster); |
2093 | ||
2094 | fhEtaPhiTriggerEMCALBCUMExoticCluster = new TH2F | |
2095 | ("hEtaPhiTriggerExotic_OnlyTrigger_UnMatch", | |
184ca640 | 2096 | "trigger cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Exotic", |
eb86112d | 2097 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2098 | fhEtaPhiTriggerEMCALBCUMExoticCluster->SetYTitle("#phi (rad)"); | |
2099 | fhEtaPhiTriggerEMCALBCUMExoticCluster->SetXTitle("#eta"); | |
2100 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMExoticCluster) ; | |
2101 | ||
2102 | fhTimeTriggerEMCALBCUMExoticCluster = new TH2F | |
2103 | ("hTimeTriggerExotic_OnlyTrigger_UnMatch", | |
184ca640 | 2104 | "trigger cluster #it{time} vs #it{E} of clusters, unmatched trigger Exotic", |
eb86112d | 2105 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2106 | fhTimeTriggerEMCALBCUMExoticCluster->SetXTitle("#it{E} (GeV)"); |
2107 | fhTimeTriggerEMCALBCUMExoticCluster->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2108 | outputContainer->Add(fhTimeTriggerEMCALBCUMExoticCluster); |
2109 | ||
2110 | fhEtaPhiTriggerEMCALBCBad = new TH2F | |
2111 | ("hEtaPhiTriggerBad", | |
184ca640 | 2112 | "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Bad", |
eb86112d | 2113 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2114 | fhEtaPhiTriggerEMCALBCBad->SetYTitle("#phi (rad)"); | |
2115 | fhEtaPhiTriggerEMCALBCBad->SetXTitle("#eta"); | |
2116 | outputContainer->Add(fhEtaPhiTriggerEMCALBCBad) ; | |
2117 | ||
2118 | fhTimeTriggerEMCALBCBad = new TH2F | |
2119 | ("hTimeTriggerBad", | |
184ca640 | 2120 | "cluster #it{time} vs #it{E} of clusters, Trigger Bad ", |
eb86112d | 2121 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2122 | fhTimeTriggerEMCALBCBad->SetXTitle("#it{E} (GeV)"); |
2123 | fhTimeTriggerEMCALBCBad->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2124 | outputContainer->Add(fhTimeTriggerEMCALBCBad); |
2125 | ||
2126 | fhEtaPhiTriggerEMCALBCUMBad = new TH2F | |
2127 | ("hEtaPhiTriggerBad_UnMatch", | |
184ca640 | 2128 | "cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Bad", |
eb86112d | 2129 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2130 | fhEtaPhiTriggerEMCALBCUMBad->SetYTitle("#phi (rad)"); | |
2131 | fhEtaPhiTriggerEMCALBCUMBad->SetXTitle("#eta"); | |
2132 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBad) ; | |
2133 | ||
2134 | fhTimeTriggerEMCALBCUMBad = new TH2F | |
2135 | ("hTimeTriggerBad_UnMatch", | |
184ca640 | 2136 | "cluster #it{time} vs #it{E} of clusters, unmatched trigger Bad", |
eb86112d | 2137 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2138 | fhTimeTriggerEMCALBCUMBad->SetXTitle("#it{E} (GeV)"); |
2139 | fhTimeTriggerEMCALBCUMBad->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2140 | outputContainer->Add(fhTimeTriggerEMCALBCUMBad); |
2141 | ||
2142 | fhEtaPhiTriggerEMCALBCBadCluster = new TH2F | |
2143 | ("hEtaPhiTriggerBad_OnlyTrigger", | |
184ca640 | 2144 | "trigger cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Bad", |
eb86112d | 2145 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2146 | fhEtaPhiTriggerEMCALBCBadCluster->SetYTitle("#phi (rad)"); | |
2147 | fhEtaPhiTriggerEMCALBCBadCluster->SetXTitle("#eta"); | |
2148 | outputContainer->Add(fhEtaPhiTriggerEMCALBCBadCluster) ; | |
2149 | ||
2150 | fhTimeTriggerEMCALBCBadCluster = new TH2F | |
2151 | ("hTimeTriggerBad_OnlyTrigger", | |
184ca640 | 2152 | "trigger cluster #it{time} vs #it{E} of clusters, Trigger Bad", |
eb86112d | 2153 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2154 | fhTimeTriggerEMCALBCBadCluster->SetXTitle("#it{E} (GeV)"); |
2155 | fhTimeTriggerEMCALBCBadCluster->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2156 | outputContainer->Add(fhTimeTriggerEMCALBCBadCluster); |
2157 | ||
2158 | fhEtaPhiTriggerEMCALBCUMBadCluster = new TH2F | |
2159 | ("hEtaPhiTriggerBad_OnlyTrigger_UnMatch", | |
184ca640 | 2160 | "trigger cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Bad", |
eb86112d | 2161 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2162 | fhEtaPhiTriggerEMCALBCUMBadCluster->SetYTitle("#phi (rad)"); | |
2163 | fhEtaPhiTriggerEMCALBCUMBadCluster->SetXTitle("#eta"); | |
2164 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadCluster) ; | |
2165 | ||
2166 | fhTimeTriggerEMCALBCUMBadCluster = new TH2F | |
2167 | ("hTimeTriggerBad_OnlyTrigger_UnMatch", | |
184ca640 | 2168 | "trigger cluster time vs #it{E} of clusters, unmatched trigger Bad", |
eb86112d | 2169 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2170 | fhTimeTriggerEMCALBCUMBadCluster->SetXTitle("#it{E} (GeV)"); |
2171 | fhTimeTriggerEMCALBCUMBadCluster->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2172 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadCluster); |
2173 | ||
2174 | fhEtaPhiTriggerEMCALBCBadExotic = new TH2F | |
2175 | ("hEtaPhiTriggerBadExotic", | |
184ca640 | 2176 | "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Bad&Exotic", |
eb86112d | 2177 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2178 | fhEtaPhiTriggerEMCALBCBadExotic->SetYTitle("#phi (rad)"); | |
2179 | fhEtaPhiTriggerEMCALBCBadExotic->SetXTitle("#eta"); | |
2180 | outputContainer->Add(fhEtaPhiTriggerEMCALBCBadExotic) ; | |
2181 | ||
2182 | fhTimeTriggerEMCALBCBadExotic = new TH2F | |
2183 | ("hTimeTriggerBadExotic", | |
184ca640 | 2184 | "cluster #it{time} vs #it{E} of clusters, Trigger Bad&Exotic ", |
eb86112d | 2185 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2186 | fhTimeTriggerEMCALBCBadExotic->SetXTitle("#it{E} (GeV)"); |
2187 | fhTimeTriggerEMCALBCBadExotic->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2188 | outputContainer->Add(fhTimeTriggerEMCALBCBadExotic); |
2189 | ||
2190 | fhEtaPhiTriggerEMCALBCUMBadExotic = new TH2F | |
2191 | ("hEtaPhiTriggerBadExotic_UnMatch", | |
184ca640 | 2192 | "cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Bad&Exotic", |
eb86112d | 2193 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2194 | fhEtaPhiTriggerEMCALBCUMBadExotic->SetYTitle("#phi (rad)"); | |
2195 | fhEtaPhiTriggerEMCALBCUMBadExotic->SetXTitle("#eta"); | |
2196 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadExotic) ; | |
2197 | ||
2198 | fhTimeTriggerEMCALBCUMBadExotic = new TH2F | |
2199 | ("hTimeTriggerBadExotic_UnMatch", | |
184ca640 | 2200 | "cluster #it{time} vs #it{E} of clusters, unmatched trigger Bad&Exotic", |
eb86112d | 2201 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2202 | fhTimeTriggerEMCALBCUMBadExotic->SetXTitle("#it{E} (GeV)"); |
2203 | fhTimeTriggerEMCALBCUMBadExotic->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2204 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadExotic); |
2205 | ||
2206 | fhEtaPhiTriggerEMCALBCBadExoticCluster = new TH2F | |
2207 | ("hEtaPhiTriggerBadExotic_OnlyTrigger", | |
184ca640 | 2208 | "trigger cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Bad&Exotic", |
eb86112d | 2209 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2210 | fhEtaPhiTriggerEMCALBCBadExoticCluster->SetYTitle("#phi (rad)"); | |
2211 | fhEtaPhiTriggerEMCALBCBadExoticCluster->SetXTitle("#eta"); | |
2212 | outputContainer->Add(fhEtaPhiTriggerEMCALBCBadExoticCluster) ; | |
2213 | ||
2214 | fhTimeTriggerEMCALBCBadExoticCluster = new TH2F | |
2215 | ("hTimeTriggerBadExotic_OnlyTrigger", | |
184ca640 | 2216 | "trigger cluster #it{time} vs #it{E} of clusters, Trigger Bad&Exotic", |
eb86112d | 2217 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2218 | fhTimeTriggerEMCALBCBadExoticCluster->SetXTitle("#it{E} (GeV)"); |
2219 | fhTimeTriggerEMCALBCBadExoticCluster->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2220 | outputContainer->Add(fhTimeTriggerEMCALBCBadExoticCluster); |
2221 | ||
2222 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster = new TH2F | |
2223 | ("hEtaPhiTriggerBadExotic_OnlyTrigger_UnMatch", | |
184ca640 | 2224 | "trigger cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Bad&Exotic", |
eb86112d | 2225 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2226 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster->SetYTitle("#phi (rad)"); | |
2227 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster->SetXTitle("#eta"); | |
2228 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadExoticCluster) ; | |
2229 | ||
2230 | fhTimeTriggerEMCALBCUMBadExoticCluster = new TH2F | |
2231 | ("hTimeTriggerBadExotic_OnlyTrigger_UnMatch", | |
184ca640 | 2232 | "trigger cluster #it{time} vs #it{E} of clusters, unmatched trigger Bad&Exotic", |
eb86112d | 2233 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2234 | fhTimeTriggerEMCALBCUMBadExoticCluster->SetXTitle("#it{E} (GeV)"); |
2235 | fhTimeTriggerEMCALBCUMBadExoticCluster->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2236 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadExoticCluster); |
2237 | ||
2238 | fhTimeTriggerEMCALBCBadMaxCell = new TH2F | |
2239 | ("hTimeTriggerBadMaxCell", | |
184ca640 | 2240 | "cluster #it{time} vs #it{E} of clusters, Trigger BadMaxCell", |
eb86112d | 2241 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2242 | fhTimeTriggerEMCALBCBadMaxCell->SetXTitle("#it{E} (GeV)"); |
2243 | fhTimeTriggerEMCALBCBadMaxCell->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2244 | outputContainer->Add(fhTimeTriggerEMCALBCBadMaxCell); |
2245 | ||
2246 | fhTimeTriggerEMCALBCUMBadMaxCell = new TH2F | |
2247 | ("hTimeTriggerBadMaxCell_UnMatch", | |
184ca640 | 2248 | "cluster #it{time} vs #it{E} of clusters, unmatched trigger BadMaxCell", |
eb86112d | 2249 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2250 | fhTimeTriggerEMCALBCUMBadMaxCell->SetXTitle("#it{E} (GeV)"); |
2251 | fhTimeTriggerEMCALBCUMBadMaxCell->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2252 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadMaxCell); |
2253 | ||
2254 | ||
2255 | fhTimeTriggerEMCALBCBadMaxCellExotic = new TH2F | |
2256 | ("hTimeTriggerBadMaxCellExotic", | |
184ca640 | 2257 | "cluster #it{time} vs #it{E} of clusters, Trigger BadMaxCell&Exotic", |
eb86112d | 2258 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2259 | fhTimeTriggerEMCALBCBadMaxCellExotic->SetXTitle("#it{E} (GeV)"); |
2260 | fhTimeTriggerEMCALBCBadMaxCellExotic->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2261 | outputContainer->Add(fhTimeTriggerEMCALBCBadMaxCellExotic); |
2262 | ||
2263 | fhTimeTriggerEMCALBCUMBadMaxCellExotic = new TH2F | |
2264 | ("hTimeTriggerBadMaxCellExotic_UnMatch", | |
184ca640 | 2265 | "cluster #it{time} vs #it{E} of clusters, unmatched trigger BadMaxCell&Exotic", |
eb86112d | 2266 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2267 | fhTimeTriggerEMCALBCUMBadMaxCellExotic->SetXTitle("#it{E} (GeV)"); |
2268 | fhTimeTriggerEMCALBCUMBadMaxCellExotic->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2269 | outputContainer->Add(fhTimeTriggerEMCALBCUMBadMaxCellExotic); |
2270 | ||
2271 | fhTimeNoTrigger = new TH2F | |
2272 | ("hTimeNoTrigger", | |
2273 | "events with no foundable trigger, time vs e of clusters", | |
2274 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
184ca640 | 2275 | fhTimeNoTrigger->SetXTitle("#it{E} (GeV)"); |
2276 | fhTimeNoTrigger->SetYTitle("#it{time} (ns)"); | |
eb86112d | 2277 | outputContainer->Add(fhTimeNoTrigger); |
2278 | ||
2279 | fhEtaPhiNoTrigger = new TH2F | |
2280 | ("hEtaPhiNoTrigger", | |
2281 | "events with no foundable trigger, eta vs phi of clusters", | |
2282 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
2283 | fhEtaPhiNoTrigger->SetYTitle("#phi (rad)"); | |
2284 | fhEtaPhiNoTrigger->SetXTitle("#eta"); | |
2285 | outputContainer->Add(fhEtaPhiNoTrigger) ; | |
2286 | } | |
85c4406e | 2287 | |
126b8c62 | 2288 | fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster = new TH2F("hEtaPhiTriggerEMCALBC0_OnlyTrigger_UnMatch_ReMatch_OpenTime", |
184ca640 | 2289 | "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=0, un match, rematch open time", |
85c4406e | 2290 | netabins,etamin,etamax,nphibins,phimin,phimax); |
126b8c62 | 2291 | fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster->SetYTitle("#phi (rad)"); |
2292 | fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster->SetXTitle("#eta"); | |
2293 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster) ; | |
85c4406e | 2294 | |
126b8c62 | 2295 | fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster = new TH2F("hTimeTrigger_OnlyTrigger_UnMatch_ReMatch_OpenTime", |
184ca640 | 2296 | "cluster #it{time} vs #it{E} of clusters, no match, rematch open time", |
85c4406e | 2297 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2298 | fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster->SetXTitle("#it{E} (GeV)"); |
2299 | fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2300 | outputContainer->Add(fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster); |
85c4406e | 2301 | |
2302 | ||
126b8c62 | 2303 | fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster = new TH2F("hEtaPhiTriggerEMCALBC0_OnlyTrigger_UnMatch_ReMatch_CheckNeighbours", |
184ca640 | 2304 | "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=0, un match, rematch with neighbour patches", |
85c4406e | 2305 | netabins,etamin,etamax,nphibins,phimin,phimax); |
126b8c62 | 2306 | fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster->SetYTitle("#phi (rad)"); |
2307 | fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster->SetXTitle("#eta"); | |
2308 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster) ; | |
85c4406e | 2309 | |
126b8c62 | 2310 | fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster = new TH2F("hTimeTrigger_OnlyTrigger_UnMatch_ReMatch_CheckNeighbours", |
184ca640 | 2311 | "cluster #it{time} vs #it{E} of clusters, no match, rematch with neigbour parches", |
85c4406e | 2312 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2313 | fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster->SetXTitle("#it{E} (GeV)"); |
2314 | fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2315 | outputContainer->Add(fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster); |
85c4406e | 2316 | |
126b8c62 | 2317 | fhEtaPhiTriggerEMCALBCUMReMatchBothCluster = new TH2F("hEtaPhiTriggerEMCALBC0_OnlyTrigger_UnMatch_ReMatch_Both", |
184ca640 | 2318 | "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=0, un match, rematch open time and neighbour", |
85c4406e | 2319 | netabins,etamin,etamax,nphibins,phimin,phimax); |
126b8c62 | 2320 | fhEtaPhiTriggerEMCALBCUMReMatchBothCluster->SetYTitle("#phi (rad)"); |
2321 | fhEtaPhiTriggerEMCALBCUMReMatchBothCluster->SetXTitle("#eta"); | |
2322 | outputContainer->Add(fhEtaPhiTriggerEMCALBCUMReMatchBothCluster) ; | |
85c4406e | 2323 | |
126b8c62 | 2324 | fhTimeTriggerEMCALBCUMReMatchBothCluster = new TH2F("hTimeTrigger_OnlyTrigger_UnMatch_ReMatch_Both", |
184ca640 | 2325 | "cluster #it{time} vs #it{E} of clusters, no match, rematch open time and neigbour", |
85c4406e | 2326 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2327 | fhTimeTriggerEMCALBCUMReMatchBothCluster->SetXTitle("#it{E} (GeV)"); |
2328 | fhTimeTriggerEMCALBCUMReMatchBothCluster->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2329 | outputContainer->Add(fhTimeTriggerEMCALBCUMReMatchBothCluster); |
2330 | ||
2331 | fhTimeTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_OpenTime", | |
184ca640 | 2332 | "cluster #it{time} vs #it{E} of clusters, no match, rematch open time", |
126b8c62 | 2333 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2334 | fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)"); |
2335 | fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2336 | outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchOpenTime); |
2337 | ||
2338 | ||
2339 | fhTimeTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_CheckNeighbours", | |
184ca640 | 2340 | "cluster #it{time} vs #it{E} of clusters, no match, rematch with neigbour parches", |
126b8c62 | 2341 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2342 | fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)"); |
2343 | fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2344 | outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchCheckNeigh); |
2345 | ||
2346 | fhTimeTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_Both", | |
184ca640 | 2347 | "cluster #it{time} vs #it{E} of clusters, no match, rematch open time and neigbour", |
126b8c62 | 2348 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2349 | fhTimeTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)"); |
2350 | fhTimeTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2351 | outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchBoth); |
85c4406e | 2352 | |
c2a62a94 | 2353 | } |
2354 | ||
477d6cee | 2355 | fhPhiPhoton = new TH2F |
184ca640 | 2356 | ("hPhiPhoton","#phi_{#gamma} vs #it{p}_[T]",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
6175da48 | 2357 | fhPhiPhoton->SetYTitle("#phi (rad)"); |
184ca640 | 2358 | fhPhiPhoton->SetXTitle("p_{T #gamma} (GeV/#it{c})"); |
85c4406e | 2359 | outputContainer->Add(fhPhiPhoton) ; |
477d6cee | 2360 | |
2361 | fhEtaPhoton = new TH2F | |
184ca640 | 2362 | ("hEtaPhoton","#eta_{#gamma} vs #it{p}_[T]",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
477d6cee | 2363 | fhEtaPhoton->SetYTitle("#eta"); |
184ca640 | 2364 | fhEtaPhoton->SetXTitle("p_{T #gamma} (GeV/#it{c})"); |
477d6cee | 2365 | outputContainer->Add(fhEtaPhoton) ; |
2366 | ||
6175da48 | 2367 | fhEtaPhiPhoton = new TH2F |
85c4406e | 2368 | ("hEtaPhiPhoton","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax); |
6175da48 | 2369 | fhEtaPhiPhoton->SetYTitle("#phi (rad)"); |
2370 | fhEtaPhiPhoton->SetXTitle("#eta"); | |
2371 | outputContainer->Add(fhEtaPhiPhoton) ; | |
34c16486 | 2372 | if(GetMinPt() < 0.5) |
2373 | { | |
20218aea | 2374 | fhEtaPhi05Photon = new TH2F |
74e3eb22 | 2375 | ("hEtaPhi05Photon","#eta vs #phi, E < 0.5",netabins,etamin,etamax,nphibins,phimin,phimax); |
20218aea | 2376 | fhEtaPhi05Photon->SetYTitle("#phi (rad)"); |
2377 | fhEtaPhi05Photon->SetXTitle("#eta"); | |
2378 | outputContainer->Add(fhEtaPhi05Photon) ; | |
2379 | } | |
85c4406e | 2380 | |
c2a62a94 | 2381 | if(fCalorimeter=="EMCAL" && fFillEMCALBCHistograms) |
2382 | { | |
2383 | fhEtaPhiPhotonEMCALBC0 = new TH2F | |
184ca640 | 2384 | ("hEtaPhiPhotonEMCALBC0","identified photon, #it{E} > 2 GeV, #eta vs #phi, for clusters with |time| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 2385 | fhEtaPhiPhotonEMCALBC0->SetYTitle("#phi (rad)"); |
2386 | fhEtaPhiPhotonEMCALBC0->SetXTitle("#eta"); | |
2387 | outputContainer->Add(fhEtaPhiPhotonEMCALBC0) ; | |
2388 | ||
2389 | fhEtaPhiPhotonEMCALBC1 = new TH2F | |
184ca640 | 2390 | ("hEtaPhiPhotonEMCALBC1","identified photon, #it{E} > 2 GeV, #eta vs #phi, for clusters with 25 < |time| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 2391 | fhEtaPhiPhotonEMCALBC1->SetYTitle("#phi (rad)"); |
2392 | fhEtaPhiPhotonEMCALBC1->SetXTitle("#eta"); | |
2393 | outputContainer->Add(fhEtaPhiPhotonEMCALBC1) ; | |
2394 | ||
2395 | fhEtaPhiPhotonEMCALBCN = new TH2F | |
184ca640 | 2396 | ("hEtaPhiPhotonEMCALBCN","identified photon, #it{E} > 2 GeV, #eta vs #phi, for clusters with |time| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax); |
c2a62a94 | 2397 | fhEtaPhiPhotonEMCALBCN->SetYTitle("#phi (rad)"); |
2398 | fhEtaPhiPhotonEMCALBCN->SetXTitle("#eta"); | |
2399 | outputContainer->Add(fhEtaPhiPhotonEMCALBCN) ; | |
2400 | ||
eb86112d | 2401 | for(Int_t i = 0; i < nTrigBC; i++) |
c2a62a94 | 2402 | { |
2403 | fhEtaPhiPhotonTriggerEMCALBC[i] = new TH2F | |
eb86112d | 2404 | (Form("hEtaPhiPhotonTriggerEMCALBC%d",i-iBCShift), |
184ca640 | 2405 | Form("photon #it{E} > 2 GeV, #eta vs #phi, PhotonTrigger EMCAL-BC=%d",i-iBCShift), |
c2a62a94 | 2406 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2407 | fhEtaPhiPhotonTriggerEMCALBC[i]->SetYTitle("#phi (rad)"); | |
2408 | fhEtaPhiPhotonTriggerEMCALBC[i]->SetXTitle("#eta"); | |
2409 | outputContainer->Add(fhEtaPhiPhotonTriggerEMCALBC[i]) ; | |
2410 | ||
2411 | fhTimePhotonTriggerEMCALBC[i] = new TH2F | |
eb86112d | 2412 | (Form("hTimePhotonTriggerEMCALBC%d",i-iBCShift), |
184ca640 | 2413 | Form("photon #it{time} vs #it{E} of clusters, PhotonTrigger EMCAL-BC=%d",i-iBCShift), |
c2a62a94 | 2414 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2415 | fhTimePhotonTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)"); |
2416 | fhTimePhotonTriggerEMCALBC[i]->SetYTitle("#it{time} (ns)"); | |
c2a62a94 | 2417 | outputContainer->Add(fhTimePhotonTriggerEMCALBC[i]); |
2418 | ||
2419 | fhTimePhotonTriggerEMCALBCPileUpSPD[i] = new TH2F | |
eb86112d | 2420 | (Form("hTimePhotonTriggerEMCALBC%dPileUpSPD",i-iBCShift), |
184ca640 | 2421 | Form("photon #it{time} vs #it{E}, PhotonTrigger EMCAL-BC=%d",i-iBCShift), |
c2a62a94 | 2422 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2423 | fhTimePhotonTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)"); |
2424 | fhTimePhotonTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{time} (ns)"); | |
c2a62a94 | 2425 | outputContainer->Add(fhTimePhotonTriggerEMCALBCPileUpSPD[i]); |
2426 | ||
afb3af8a | 2427 | fhEtaPhiPhotonTriggerEMCALBCUM[i] = new TH2F |
eb86112d | 2428 | (Form("hEtaPhiPhotonTriggerEMCALBC%d_UnMatch",i-iBCShift), |
184ca640 | 2429 | Form("photon #it{E} > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-iBCShift), |
afb3af8a | 2430 | netabins,etamin,etamax,nphibins,phimin,phimax); |
2431 | fhEtaPhiPhotonTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)"); | |
2432 | fhEtaPhiPhotonTriggerEMCALBCUM[i]->SetXTitle("#eta"); | |
2433 | outputContainer->Add(fhEtaPhiPhotonTriggerEMCALBCUM[i]) ; | |
2434 | ||
2435 | fhTimePhotonTriggerEMCALBCUM[i] = new TH2F | |
eb86112d | 2436 | (Form("hTimePhotonTriggerEMCALBC%d_UnMatch",i-iBCShift), |
184ca640 | 2437 | Form("photon #it{time} vs #it{E}, unmatched trigger EMCAL-BC=%d",i-iBCShift), |
afb3af8a | 2438 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2439 | fhTimePhotonTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)"); |
2440 | fhTimePhotonTriggerEMCALBCUM[i]->SetYTitle("#it{time} (ns)"); | |
afb3af8a | 2441 | outputContainer->Add(fhTimePhotonTriggerEMCALBCUM[i]); |
2442 | ||
c2a62a94 | 2443 | } |
126b8c62 | 2444 | |
2445 | fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimePhotonTriggerBC0_UnMatch_ReMatch_OpenTime", | |
184ca640 | 2446 | "cluster #it{time} vs #it{E} of photons, no match, rematch open time", |
126b8c62 | 2447 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2448 | fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)"); |
2449 | fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2450 | outputContainer->Add(fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime); |
2451 | ||
2452 | ||
2453 | fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimePhotonTriggerBC0_UnMatch_ReMatch_CheckNeighbours", | |
184ca640 | 2454 | "cluster #it{time} vs #it{E} of photons, no match, rematch with neigbour parches", |
126b8c62 | 2455 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2456 | fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)"); |
2457 | fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2458 | outputContainer->Add(fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh); |
2459 | ||
2460 | fhTimePhotonTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimePhotonTriggerBC0_UnMatch_ReMatch_Both", | |
184ca640 | 2461 | "cluster #it{time} vs #it{E} of photons, no match, rematch open time and neigbour", |
126b8c62 | 2462 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 2463 | fhTimePhotonTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)"); |
2464 | fhTimePhotonTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{time} (ns)"); | |
126b8c62 | 2465 | outputContainer->Add(fhTimePhotonTriggerEMCALBC0UMReMatchBoth); |
2466 | ||
c2a62a94 | 2467 | } |
6175da48 | 2468 | |
9e51e29a | 2469 | fhNLocMax = new TH2F("hNLocMax","Number of local maxima in cluster", |
85c4406e | 2470 | nptbins,ptmin,ptmax,10,0,10); |
9e51e29a | 2471 | fhNLocMax ->SetYTitle("N maxima"); |
184ca640 | 2472 | fhNLocMax ->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2473 | outputContainer->Add(fhNLocMax) ; |
9e51e29a | 2474 | |
521636d2 | 2475 | //Shower shape |
34c16486 | 2476 | if(fFillSSHistograms) |
2477 | { | |
85c4406e | 2478 | fhLam0E = new TH2F ("hLam0E","#lambda_{0}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
521636d2 | 2479 | fhLam0E->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 2480 | fhLam0E->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2481 | outputContainer->Add(fhLam0E); |
521636d2 | 2482 | |
85c4406e | 2483 | fhLam1E = new TH2F ("hLam1E","#lambda_{1}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
521636d2 | 2484 | fhLam1E->SetYTitle("#lambda_{1}^{2}"); |
184ca640 | 2485 | fhLam1E->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2486 | outputContainer->Add(fhLam1E); |
521636d2 | 2487 | |
85c4406e | 2488 | fhDispE = new TH2F ("hDispE"," dispersion^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
521636d2 | 2489 | fhDispE->SetYTitle("D^{2}"); |
184ca640 | 2490 | fhDispE->SetXTitle("#it{E} (GeV) "); |
521636d2 | 2491 | outputContainer->Add(fhDispE); |
85c4406e | 2492 | |
b5dbb99b | 2493 | if(!fRejectTrackMatch) |
2494 | { | |
85c4406e | 2495 | fhLam0ETM = new TH2F ("hLam0ETM","#lambda_{0}^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
b5dbb99b | 2496 | fhLam0ETM->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 2497 | fhLam0ETM->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2498 | outputContainer->Add(fhLam0ETM); |
b5dbb99b | 2499 | |
85c4406e | 2500 | fhLam1ETM = new TH2F ("hLam1ETM","#lambda_{1}^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
b5dbb99b | 2501 | fhLam1ETM->SetYTitle("#lambda_{1}^{2}"); |
184ca640 | 2502 | fhLam1ETM->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2503 | outputContainer->Add(fhLam1ETM); |
b5dbb99b | 2504 | |
85c4406e | 2505 | fhDispETM = new TH2F ("hDispETM"," dispersion^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
b5dbb99b | 2506 | fhDispETM->SetYTitle("D^{2}"); |
184ca640 | 2507 | fhDispETM->SetXTitle("#it{E} (GeV) "); |
b5dbb99b | 2508 | outputContainer->Add(fhDispETM); |
2509 | } | |
521636d2 | 2510 | |
b5dbb99b | 2511 | if(fCalorimeter == "EMCAL") |
2512 | { | |
85c4406e | 2513 | fhLam0ETRD = new TH2F ("hLam0ETRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
521636d2 | 2514 | fhLam0ETRD->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 2515 | fhLam0ETRD->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2516 | outputContainer->Add(fhLam0ETRD); |
521636d2 | 2517 | |
85c4406e | 2518 | fhLam1ETRD = new TH2F ("hLam1ETRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
521636d2 | 2519 | fhLam1ETRD->SetYTitle("#lambda_{1}^{2}"); |
184ca640 | 2520 | fhLam1ETRD->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2521 | outputContainer->Add(fhLam1ETRD); |
521636d2 | 2522 | |
85c4406e | 2523 | fhDispETRD = new TH2F ("hDispETRD"," dispersion^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
521636d2 | 2524 | fhDispETRD->SetYTitle("Dispersion^{2}"); |
184ca640 | 2525 | fhDispETRD->SetXTitle("#it{E} (GeV) "); |
b5dbb99b | 2526 | outputContainer->Add(fhDispETRD); |
2527 | ||
2528 | if(!fRejectTrackMatch) | |
2529 | { | |
85c4406e | 2530 | fhLam0ETMTRD = new TH2F ("hLam0ETMTRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
b5dbb99b | 2531 | fhLam0ETMTRD->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 2532 | fhLam0ETMTRD->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2533 | outputContainer->Add(fhLam0ETMTRD); |
b5dbb99b | 2534 | |
85c4406e | 2535 | fhLam1ETMTRD = new TH2F ("hLam1ETMTRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
b5dbb99b | 2536 | fhLam1ETMTRD->SetYTitle("#lambda_{1}^{2}"); |
184ca640 | 2537 | fhLam1ETMTRD->SetXTitle("#it{E} (GeV)"); |
85c4406e | 2538 | outputContainer->Add(fhLam1ETMTRD); |
b5dbb99b | 2539 | |
85c4406e | 2540 | fhDispETMTRD = new TH2F ("hDispETMTRD"," dispersion^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
b5dbb99b | 2541 | fhDispETMTRD->SetYTitle("Dispersion^{2}"); |
184ca640 | 2542 | fhDispETMTRD->SetXTitle("#it{E} (GeV) "); |
85c4406e | 2543 | outputContainer->Add(fhDispETMTRD); |
2544 | } | |
2545 | } | |
521636d2 | 2546 | |
764ab1f4 | 2547 | if(!fFillOnlySimpleSSHisto) |
34c16486 | 2548 | { |
85c4406e | 2549 | fhNCellsLam0LowE = new TH2F ("hNCellsLam0LowE","N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2550 | fhNCellsLam0LowE->SetXTitle("N_{cells}"); |
2551 | fhNCellsLam0LowE->SetYTitle("#lambda_{0}^{2}"); | |
85c4406e | 2552 | outputContainer->Add(fhNCellsLam0LowE); |
764ab1f4 | 2553 | |
184ca640 | 2554 | fhNCellsLam0HighE = new TH2F ("hNCellsLam0HighE","N_{cells} in cluster vs #lambda_{0}^{2}, #it{E} > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2555 | fhNCellsLam0HighE->SetXTitle("N_{cells}"); |
2556 | fhNCellsLam0HighE->SetYTitle("#lambda_{0}^{2}"); | |
85c4406e | 2557 | outputContainer->Add(fhNCellsLam0HighE); |
764ab1f4 | 2558 | |
85c4406e | 2559 | fhNCellsLam1LowE = new TH2F ("hNCellsLam1LowE","N_{cells} in cluster vs #lambda_{1}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2560 | fhNCellsLam1LowE->SetXTitle("N_{cells}"); |
2561 | fhNCellsLam1LowE->SetYTitle("#lambda_{0}^{2}"); | |
85c4406e | 2562 | outputContainer->Add(fhNCellsLam1LowE); |
764ab1f4 | 2563 | |
184ca640 | 2564 | fhNCellsLam1HighE = new TH2F ("hNCellsLam1HighE","N_{cells} in cluster vs #lambda_{1}^{2}, #it{E} > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2565 | fhNCellsLam1HighE->SetXTitle("N_{cells}"); |
2566 | fhNCellsLam1HighE->SetYTitle("#lambda_{0}^{2}"); | |
85c4406e | 2567 | outputContainer->Add(fhNCellsLam1HighE); |
764ab1f4 | 2568 | |
85c4406e | 2569 | fhNCellsDispLowE = new TH2F ("hNCellsDispLowE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2570 | fhNCellsDispLowE->SetXTitle("N_{cells}"); |
2571 | fhNCellsDispLowE->SetYTitle("D^{2}"); | |
85c4406e | 2572 | outputContainer->Add(fhNCellsDispLowE); |
764ab1f4 | 2573 | |
85c4406e | 2574 | fhNCellsDispHighE = new TH2F ("hNCellsDispHighE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2575 | fhNCellsDispHighE->SetXTitle("N_{cells}"); |
2576 | fhNCellsDispHighE->SetYTitle("D^{2}"); | |
85c4406e | 2577 | outputContainer->Add(fhNCellsDispHighE); |
764ab1f4 | 2578 | |
85c4406e | 2579 | fhEtaLam0LowE = new TH2F ("hEtaLam0LowE","#eta vs #lambda_{0}^{2}, E < 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax); |
764ab1f4 | 2580 | fhEtaLam0LowE->SetYTitle("#lambda_{0}^{2}"); |
2581 | fhEtaLam0LowE->SetXTitle("#eta"); | |
85c4406e | 2582 | outputContainer->Add(fhEtaLam0LowE); |
764ab1f4 | 2583 | |
85c4406e | 2584 | fhPhiLam0LowE = new TH2F ("hPhiLam0LowE","#phi vs #lambda_{0}^{2}, E < 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax); |
764ab1f4 | 2585 | fhPhiLam0LowE->SetYTitle("#lambda_{0}^{2}"); |
2586 | fhPhiLam0LowE->SetXTitle("#phi"); | |
85c4406e | 2587 | outputContainer->Add(fhPhiLam0LowE); |
764ab1f4 | 2588 | |
184ca640 | 2589 | fhEtaLam0HighE = new TH2F ("hEtaLam0HighE","#eta vs #lambda_{0}^{2}, #it{E} > 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax); |
764ab1f4 | 2590 | fhEtaLam0HighE->SetYTitle("#lambda_{0}^{2}"); |
2591 | fhEtaLam0HighE->SetXTitle("#eta"); | |
85c4406e | 2592 | outputContainer->Add(fhEtaLam0HighE); |
764ab1f4 | 2593 | |
184ca640 | 2594 | fhPhiLam0HighE = new TH2F ("hPhiLam0HighE","#phi vs #lambda_{0}^{2}, #it{E} > 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax); |
764ab1f4 | 2595 | fhPhiLam0HighE->SetYTitle("#lambda_{0}^{2}"); |
2596 | fhPhiLam0HighE->SetXTitle("#phi"); | |
85c4406e | 2597 | outputContainer->Add(fhPhiLam0HighE); |
764ab1f4 | 2598 | |
85c4406e | 2599 | fhLam1Lam0LowE = new TH2F ("hLam1Lam0LowE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2600 | fhLam1Lam0LowE->SetYTitle("#lambda_{0}^{2}"); |
2601 | fhLam1Lam0LowE->SetXTitle("#lambda_{1}^{2}"); | |
85c4406e | 2602 | outputContainer->Add(fhLam1Lam0LowE); |
764ab1f4 | 2603 | |
184ca640 | 2604 | fhLam1Lam0HighE = new TH2F ("hLam1Lam0HighE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2605 | fhLam1Lam0HighE->SetYTitle("#lambda_{0}^{2}"); |
2606 | fhLam1Lam0HighE->SetXTitle("#lambda_{1}^{2}"); | |
85c4406e | 2607 | outputContainer->Add(fhLam1Lam0HighE); |
764ab1f4 | 2608 | |
85c4406e | 2609 | fhLam0DispLowE = new TH2F ("hLam0DispLowE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2610 | fhLam0DispLowE->SetXTitle("#lambda_{0}^{2}"); |
2611 | fhLam0DispLowE->SetYTitle("D^{2}"); | |
85c4406e | 2612 | outputContainer->Add(fhLam0DispLowE); |
764ab1f4 | 2613 | |
184ca640 | 2614 | fhLam0DispHighE = new TH2F ("hLam0DispHighE","#lambda_{0}^{2} vs dispersion^{2} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2615 | fhLam0DispHighE->SetXTitle("#lambda_{0}^{2}"); |
2616 | fhLam0DispHighE->SetYTitle("D^{2}"); | |
85c4406e | 2617 | outputContainer->Add(fhLam0DispHighE); |
764ab1f4 | 2618 | |
85c4406e | 2619 | fhDispLam1LowE = new TH2F ("hDispLam1LowE","Dispersion^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2620 | fhDispLam1LowE->SetXTitle("D^{2}"); |
2621 | fhDispLam1LowE->SetYTitle("#lambda_{1}^{2}"); | |
85c4406e | 2622 | outputContainer->Add(fhDispLam1LowE); |
764ab1f4 | 2623 | |
184ca640 | 2624 | fhDispLam1HighE = new TH2F ("hDispLam1HighE","Dispersion^{2} vs #lambda_{1^{2}} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax); |
764ab1f4 | 2625 | fhDispLam1HighE->SetXTitle("D^{2}"); |
2626 | fhDispLam1HighE->SetYTitle("#lambda_{1}^{2}"); | |
85c4406e | 2627 | outputContainer->Add(fhDispLam1HighE); |
764ab1f4 | 2628 | |
2629 | if(fCalorimeter == "EMCAL") | |
34c16486 | 2630 | { |
85c4406e | 2631 | fhDispEtaE = new TH2F ("hDispEtaE","#sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); |
184ca640 | 2632 | fhDispEtaE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2633 | fhDispEtaE->SetYTitle("#sigma^{2}_{#eta #eta}"); |
85c4406e | 2634 | outputContainer->Add(fhDispEtaE); |
764ab1f4 | 2635 | |
85c4406e | 2636 | fhDispPhiE = new TH2F ("hDispPhiE","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); |
184ca640 | 2637 | fhDispPhiE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2638 | fhDispPhiE->SetYTitle("#sigma^{2}_{#phi #phi}"); |
85c4406e | 2639 | outputContainer->Add(fhDispPhiE); |
764ab1f4 | 2640 | |
85c4406e | 2641 | fhSumEtaE = new TH2F ("hSumEtaE","#delta^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i})^{2} / #Sigma w_{i} - <#eta>^{2} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); |
184ca640 | 2642 | fhSumEtaE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2643 | fhSumEtaE->SetYTitle("#delta^{2}_{#eta #eta}"); |
85c4406e | 2644 | outputContainer->Add(fhSumEtaE); |
764ab1f4 | 2645 | |
85c4406e | 2646 | fhSumPhiE = new TH2F ("hSumPhiE","#delta^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs E", |
2647 | nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); | |
184ca640 | 2648 | fhSumPhiE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2649 | fhSumPhiE->SetYTitle("#delta^{2}_{#phi #phi}"); |
85c4406e | 2650 | outputContainer->Add(fhSumPhiE); |
764ab1f4 | 2651 | |
85c4406e | 2652 | fhSumEtaPhiE = new TH2F ("hSumEtaPhiE","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E", |
2653 | nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax); | |
184ca640 | 2654 | fhSumEtaPhiE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2655 | fhSumEtaPhiE->SetYTitle("#delta^{2}_{#eta #phi}"); |
2656 | outputContainer->Add(fhSumEtaPhiE); | |
2657 | ||
85c4406e | 2658 | fhDispEtaPhiDiffE = new TH2F ("hDispEtaPhiDiffE","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E", |
2659 | nptbins,ptmin,ptmax,200, -10,10); | |
184ca640 | 2660 | fhDispEtaPhiDiffE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2661 | fhDispEtaPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}"); |
85c4406e | 2662 | outputContainer->Add(fhDispEtaPhiDiffE); |
bfdcf7fb | 2663 | |
85c4406e | 2664 | fhSphericityE = new TH2F ("hSphericityE","(#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E", |
2665 | nptbins,ptmin,ptmax, 200, -1,1); | |
184ca640 | 2666 | fhSphericityE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2667 | fhSphericityE->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})"); |
2668 | outputContainer->Add(fhSphericityE); | |
bfdcf7fb | 2669 | |
85c4406e | 2670 | fhDispSumEtaDiffE = new TH2F ("hDispSumEtaDiffE","#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01); |
184ca640 | 2671 | fhDispSumEtaDiffE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2672 | fhDispSumEtaDiffE->SetYTitle("#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average"); |
85c4406e | 2673 | outputContainer->Add(fhDispSumEtaDiffE); |
764ab1f4 | 2674 | |
85c4406e | 2675 | fhDispSumPhiDiffE = new TH2F ("hDispSumPhiDiffE","#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01); |
184ca640 | 2676 | fhDispSumPhiDiffE->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 2677 | fhDispSumPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average"); |
85c4406e | 2678 | outputContainer->Add(fhDispSumPhiDiffE); |
764ab1f4 | 2679 | |
2680 | for(Int_t i = 0; i < 7; i++) | |
2681 | { | |
85c4406e | 2682 | fhDispEtaDispPhi[i] = new TH2F (Form("hDispEtaDispPhi_EBin%d",i),Form("#sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",bin[i],bin[i+1]), |
2683 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
764ab1f4 | 2684 | fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}"); |
2685 | fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
85c4406e | 2686 | outputContainer->Add(fhDispEtaDispPhi[i]); |
764ab1f4 | 2687 | |
85c4406e | 2688 | fhLambda0DispEta[i] = new TH2F (Form("hLambda0DispEta_EBin%d",i),Form("#lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",bin[i],bin[i+1]), |
2689 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
764ab1f4 | 2690 | fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}"); |
2691 | fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}"); | |
85c4406e | 2692 | outputContainer->Add(fhLambda0DispEta[i]); |
764ab1f4 | 2693 | |
85c4406e | 2694 | fhLambda0DispPhi[i] = new TH2F (Form("hLambda0DispPhi_EBin%d",i),Form("#lambda^{2}_{0}} vs #sigma^{2}_{#phi #phi} for %d < E < %d GeV",bin[i],bin[i+1]), |
2695 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
764ab1f4 | 2696 | fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}"); |
2697 | fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
85c4406e | 2698 | outputContainer->Add(fhLambda0DispPhi[i]); |
764ab1f4 | 2699 | } |
34c16486 | 2700 | } |
2701 | } | |
521636d2 | 2702 | } // Shower shape |
2703 | ||
09273901 | 2704 | // Track Matching |
2705 | ||
b5dbb99b | 2706 | if(fFillTMHisto) |
2707 | { | |
b2e375c7 | 2708 | TString cutTM [] = {"NoCut",""}; |
b5dbb99b | 2709 | |
b2e375c7 | 2710 | for(Int_t i = 0; i < 2; i++) |
31ae6d59 | 2711 | { |
b2e375c7 | 2712 | fhTrackMatchedDEta[i] = new TH2F |
2713 | (Form("hTrackMatchedDEta%s",cutTM[i].Data()), | |
2714 | Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
85c4406e | 2715 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); |
b2e375c7 | 2716 | fhTrackMatchedDEta[i]->SetYTitle("d#eta"); |
184ca640 | 2717 | fhTrackMatchedDEta[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
4bfeae64 | 2718 | |
b2e375c7 | 2719 | fhTrackMatchedDPhi[i] = new TH2F |
2720 | (Form("hTrackMatchedDPhi%s",cutTM[i].Data()), | |
2721 | Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
85c4406e | 2722 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); |
b2e375c7 | 2723 | fhTrackMatchedDPhi[i]->SetYTitle("d#phi (rad)"); |
184ca640 | 2724 | fhTrackMatchedDPhi[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2725 | |
2726 | fhTrackMatchedDEtaDPhi[i] = new TH2F | |
2727 | (Form("hTrackMatchedDEtaDPhi%s",cutTM[i].Data()), | |
2728 | Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
2729 | nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); | |
2730 | fhTrackMatchedDEtaDPhi[i]->SetYTitle("d#phi (rad)"); | |
2731 | fhTrackMatchedDEtaDPhi[i]->SetXTitle("d#eta"); | |
2732 | ||
2733 | fhTrackMatchedDEtaPos[i] = new TH2F | |
2734 | (Form("hTrackMatchedDEtaPos%s",cutTM[i].Data()), | |
2735 | Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
85c4406e | 2736 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); |
b2e375c7 | 2737 | fhTrackMatchedDEtaPos[i]->SetYTitle("d#eta"); |
184ca640 | 2738 | fhTrackMatchedDEtaPos[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
8d6b7f60 | 2739 | |
b2e375c7 | 2740 | fhTrackMatchedDPhiPos[i] = new TH2F |
2741 | (Form("hTrackMatchedDPhiPos%s",cutTM[i].Data()), | |
2742 | Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
85c4406e | 2743 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); |
b2e375c7 | 2744 | fhTrackMatchedDPhiPos[i]->SetYTitle("d#phi (rad)"); |
184ca640 | 2745 | fhTrackMatchedDPhiPos[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2746 | |
2747 | fhTrackMatchedDEtaDPhiPos[i] = new TH2F | |
2748 | (Form("hTrackMatchedDEtaDPhiPos%s",cutTM[i].Data()), | |
2749 | Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
2750 | nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); | |
2751 | fhTrackMatchedDEtaDPhiPos[i]->SetYTitle("d#phi (rad)"); | |
2752 | fhTrackMatchedDEtaDPhiPos[i]->SetXTitle("d#eta"); | |
2753 | ||
2754 | fhTrackMatchedDEtaNeg[i] = new TH2F | |
2755 | (Form("hTrackMatchedDEtaNeg%s",cutTM[i].Data()), | |
2756 | Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
85c4406e | 2757 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); |
b2e375c7 | 2758 | fhTrackMatchedDEtaNeg[i]->SetYTitle("d#eta"); |
184ca640 | 2759 | fhTrackMatchedDEtaNeg[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
4bfeae64 | 2760 | |
b2e375c7 | 2761 | fhTrackMatchedDPhiNeg[i] = new TH2F |
2762 | (Form("hTrackMatchedDPhiNeg%s",cutTM[i].Data()), | |
2763 | Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
85c4406e | 2764 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); |
b2e375c7 | 2765 | fhTrackMatchedDPhiNeg[i]->SetYTitle("d#phi (rad)"); |
184ca640 | 2766 | fhTrackMatchedDPhiNeg[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2767 | |
2768 | fhTrackMatchedDEtaDPhiNeg[i] = new TH2F | |
2769 | (Form("hTrackMatchedDEtaDPhiNeg%s",cutTM[i].Data()), | |
2770 | Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()), | |
2771 | nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); | |
2772 | fhTrackMatchedDEtaDPhiNeg[i]->SetYTitle("d#phi (rad)"); | |
2773 | fhTrackMatchedDEtaDPhiNeg[i]->SetXTitle("d#eta"); | |
2774 | ||
2775 | fhdEdx[i] = new TH2F (Form("hdEdx%s",cutTM[i].Data()),Form("matched track <dE/dx> vs cluster E, %s",cutTM[i].Data()), | |
2776 | nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax); | |
184ca640 | 2777 | fhdEdx[i]->SetXTitle("#it{E} (GeV)"); |
b2e375c7 | 2778 | fhdEdx[i]->SetYTitle("<dE/dx>"); |
2779 | ||
2780 | fhEOverP[i] = new TH2F (Form("hEOverP%s",cutTM[i].Data()),Form("matched track E/p vs cluster E, %s",cutTM[i].Data()), | |
2781 | nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax); | |
184ca640 | 2782 | fhEOverP[i]->SetXTitle("#it{E} (GeV)"); |
b2e375c7 | 2783 | fhEOverP[i]->SetYTitle("E/p"); |
2784 | ||
2785 | outputContainer->Add(fhTrackMatchedDEta[i]) ; | |
2786 | outputContainer->Add(fhTrackMatchedDPhi[i]) ; | |
2787 | outputContainer->Add(fhTrackMatchedDEtaDPhi[i]) ; | |
2788 | outputContainer->Add(fhTrackMatchedDEtaPos[i]) ; | |
2789 | outputContainer->Add(fhTrackMatchedDPhiPos[i]) ; | |
2790 | outputContainer->Add(fhTrackMatchedDEtaDPhiPos[i]) ; | |
2791 | outputContainer->Add(fhTrackMatchedDEtaNeg[i]) ; | |
2792 | outputContainer->Add(fhTrackMatchedDPhiNeg[i]) ; | |
2793 | outputContainer->Add(fhTrackMatchedDEtaDPhiNeg[i]) ; | |
2794 | outputContainer->Add(fhdEdx[i]); | |
2795 | outputContainer->Add(fhEOverP[i]); | |
2796 | ||
2797 | if(fCalorimeter=="EMCAL") | |
2798 | { | |
2799 | fhTrackMatchedDEtaTRD[i] = new TH2F | |
2800 | (Form("hTrackMatchedDEtaTRD%s",cutTM[i].Data()), | |
2801 | Form("d#eta of cluster-track vs cluster energy, SM behind TRD, %s",cutTM[i].Data()), | |
2802 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2803 | fhTrackMatchedDEtaTRD[i]->SetYTitle("d#eta"); | |
184ca640 | 2804 | fhTrackMatchedDEtaTRD[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2805 | |
2806 | fhTrackMatchedDPhiTRD[i] = new TH2F | |
2807 | (Form("hTrackMatchedDPhiTRD%s",cutTM[i].Data()), | |
2808 | Form("d#phi of cluster-track vs cluster energy, SM behing TRD, %s",cutTM[i].Data()), | |
2809 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2810 | fhTrackMatchedDPhiTRD[i]->SetYTitle("d#phi (rad)"); | |
184ca640 | 2811 | fhTrackMatchedDPhiTRD[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2812 | |
2813 | fhEOverPTRD[i] = new TH2F | |
2814 | (Form("hEOverPTRD%s",cutTM[i].Data()), | |
2815 | Form("matched track E/p vs cluster E, behind TRD, %s",cutTM[i].Data()), | |
2816 | nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax); | |
184ca640 | 2817 | fhEOverPTRD[i]->SetXTitle("#it{E} (GeV)"); |
b2e375c7 | 2818 | fhEOverPTRD[i]->SetYTitle("E/p"); |
2819 | ||
2820 | outputContainer->Add(fhTrackMatchedDEtaTRD[i]) ; | |
2821 | outputContainer->Add(fhTrackMatchedDPhiTRD[i]) ; | |
2822 | outputContainer->Add(fhEOverPTRD[i]); | |
2823 | } | |
8d6b7f60 | 2824 | |
b2e375c7 | 2825 | if(IsDataMC()) |
2826 | { | |
2827 | fhTrackMatchedDEtaMCNoOverlap[i] = new TH2F | |
2828 | (Form("hTrackMatchedDEtaMCNoOverlap%s",cutTM[i].Data()), | |
2829 | Form("d#eta of cluster-track vs cluster energy, no other MC particles overlap %s",cutTM[i].Data()), | |
2830 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2831 | fhTrackMatchedDEtaMCNoOverlap[i]->SetYTitle("d#eta"); | |
184ca640 | 2832 | fhTrackMatchedDEtaMCNoOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2833 | |
2834 | fhTrackMatchedDPhiMCNoOverlap[i] = new TH2F | |
2835 | (Form("hTrackMatchedDPhiMCNoOverlap%s",cutTM[i].Data()), | |
2836 | Form("d#phi of cluster-track vs cluster energy, no other MC particles overlap %s",cutTM[i].Data()), | |
2837 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2838 | fhTrackMatchedDPhiMCNoOverlap[i]->SetYTitle("d#phi (rad)"); | |
184ca640 | 2839 | fhTrackMatchedDPhiMCNoOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2840 | |
2841 | outputContainer->Add(fhTrackMatchedDEtaMCNoOverlap[i]) ; | |
2842 | outputContainer->Add(fhTrackMatchedDPhiMCNoOverlap[i]) ; | |
2843 | fhTrackMatchedDEtaMCOverlap[i] = new TH2F | |
2844 | (Form("hTrackMatchedDEtaMCOverlap%s",cutTM[i].Data()), | |
2845 | Form("d#eta of cluster-track vs cluster energy, several MC particles overlap %s",cutTM[i].Data()), | |
2846 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2847 | fhTrackMatchedDEtaMCOverlap[i]->SetYTitle("d#eta"); | |
184ca640 | 2848 | fhTrackMatchedDEtaMCOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2849 | |
2850 | fhTrackMatchedDPhiMCOverlap[i] = new TH2F | |
2851 | (Form("hTrackMatchedDPhiMCOverlap%s",cutTM[i].Data()), | |
2852 | Form("d#phi of cluster-track vs cluster energy, several MC particles overlap %s",cutTM[i].Data()), | |
2853 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2854 | fhTrackMatchedDPhiMCOverlap[i]->SetYTitle("d#phi (rad)"); | |
184ca640 | 2855 | fhTrackMatchedDPhiMCOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2856 | |
2857 | outputContainer->Add(fhTrackMatchedDEtaMCOverlap[i]) ; | |
2858 | outputContainer->Add(fhTrackMatchedDPhiMCOverlap[i]) ; | |
2859 | ||
2860 | fhTrackMatchedDEtaMCConversion[i] = new TH2F | |
2861 | (Form("hTrackMatchedDEtaMCConversion%s",cutTM[i].Data()), | |
2862 | Form("d#eta of cluster-track vs cluster energy, no other MC particles overlap appart from conversions %s",cutTM[i].Data()), | |
2863 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2864 | fhTrackMatchedDEtaMCConversion[i]->SetYTitle("d#eta"); | |
184ca640 | 2865 | fhTrackMatchedDEtaMCConversion[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2866 | |
2867 | fhTrackMatchedDPhiMCConversion[i] = new TH2F | |
2868 | (Form("hTrackMatchedDPhiMCConversion%s",cutTM[i].Data()), | |
2869 | Form("d#phi of cluster-track vs cluster energy, no other MC particles overlap appart from conversions %s",cutTM[i].Data()), | |
2870 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2871 | fhTrackMatchedDPhiMCConversion[i]->SetYTitle("d#phi (rad)"); | |
184ca640 | 2872 | fhTrackMatchedDPhiMCConversion[i]->SetXTitle("#it{E}_{cluster} (GeV)"); |
b2e375c7 | 2873 | |
2874 | outputContainer->Add(fhTrackMatchedDEtaMCConversion[i]) ; | |
2875 | outputContainer->Add(fhTrackMatchedDPhiMCConversion[i]) ; | |
2876 | ||
2877 | fhTrackMatchedMCParticle[i] = new TH2F | |
2878 | (Form("hTrackMatchedMCParticle%s",cutTM[i].Data()), | |
2879 | Form("Origin of particle vs energy %s",cutTM[i].Data()), | |
2880 | nptbins,ptmin,ptmax,8,0,8); | |
184ca640 | 2881 | fhTrackMatchedMCParticle[i]->SetXTitle("#it{E} (GeV)"); |
b2e375c7 | 2882 | //fhTrackMatchedMCParticle[i]->SetYTitle("Particle type"); |
2883 | ||
2884 | fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(1 ,"Photon"); | |
2885 | fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(2 ,"Electron"); | |
2886 | fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(3 ,"Meson Merged"); | |
2887 | fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(4 ,"Rest"); | |
2888 | fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(5 ,"Conv. Photon"); | |
2889 | fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(6 ,"Conv. Electron"); | |
2890 | fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(7 ,"Conv. Merged"); | |
2891 | fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(8 ,"Conv. Rest"); | |
2892 | ||
2893 | outputContainer->Add(fhTrackMatchedMCParticle[i]); | |
2894 | } | |
31ae6d59 | 2895 | } |
85c4406e | 2896 | } |
09273901 | 2897 | |
2ad19c3d | 2898 | if(fFillPileUpHistograms) |
2899 | { | |
5e5e056f | 2900 | |
2901 | TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ; | |
2902 | ||
2903 | for(Int_t i = 0 ; i < 7 ; i++) | |
2904 | { | |
fad96885 | 2905 | fhPtPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()), |
184ca640 | 2906 | Form("Cluster #it{p}_[T] distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax); |
2907 | fhPtPileUp[i]->SetXTitle("#it{p}_[T] (GeV/#it{c})"); | |
fad96885 | 2908 | outputContainer->Add(fhPtPileUp[i]); |
2909 | ||
2910 | fhPtChargedPileUp[i] = new TH1F(Form("hPtChargedPileUp%s",pileUpName[i].Data()), | |
184ca640 | 2911 | Form("Charged clusters #it{p}_[T] distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax); |
2912 | fhPtChargedPileUp[i]->SetXTitle("#it{p}_[T] (GeV/#it{c})"); | |
fad96885 | 2913 | outputContainer->Add(fhPtChargedPileUp[i]); |
85c4406e | 2914 | |
5e5e056f | 2915 | fhPtPhotonPileUp[i] = new TH1F(Form("hPtPhotonPileUp%s",pileUpName[i].Data()), |
184ca640 | 2916 | Form("Selected photon #it{p}_[T] distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax); |
2917 | fhPtPhotonPileUp[i]->SetXTitle("#it{p}_[T] (GeV/#it{c})"); | |
5e5e056f | 2918 | outputContainer->Add(fhPtPhotonPileUp[i]); |
fad96885 | 2919 | |
650d1938 | 2920 | |
2921 | fhClusterEFracLongTimePileUp[i] = new TH2F(Form("hClusterEFracLongTimePileUp%s",pileUpName[i].Data()), | |
85c4406e | 2922 | Form("Cluster E vs fraction of cluster energy from large T cells, %s Pile-Up event",pileUpName[i].Data()), |
2923 | nptbins,ptmin,ptmax,200,0,1); | |
184ca640 | 2924 | fhClusterEFracLongTimePileUp[i]->SetXTitle("#it{E} (GeV)"); |
650d1938 | 2925 | fhClusterEFracLongTimePileUp[i]->SetYTitle("E(large time) / E"); |
2926 | outputContainer->Add(fhClusterEFracLongTimePileUp[i]); | |
2927 | ||
126b8c62 | 2928 | fhClusterCellTimePileUp[i] = new TH2F(Form("hClusterCellTimePileUp%s",pileUpName[i].Data()), |
2929 | Form("Cluster E vs cell time in cluster, %s Pile-Up event",pileUpName[i].Data()), | |
2930 | nptbins,ptmin,ptmax,ntimebins,timemin,timemax); | |
184ca640 | 2931 | fhClusterCellTimePileUp[i]->SetXTitle("#it{E} (GeV)"); |
126b8c62 | 2932 | fhClusterCellTimePileUp[i]->SetYTitle("t_{cell} (ns)"); |
2933 | outputContainer->Add(fhClusterCellTimePileUp[i]); | |
2934 | ||
fad96885 | 2935 | fhClusterTimeDiffPileUp[i] = new TH2F(Form("hClusterTimeDiffPileUp%s",pileUpName[i].Data()), |
85c4406e | 2936 | Form("Cluster E vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()), |
e31d67f1 | 2937 | nptbins,ptmin,ptmax,400,-200,200); |
184ca640 | 2938 | fhClusterTimeDiffPileUp[i]->SetXTitle("#it{E} (GeV)"); |
fad96885 | 2939 | fhClusterTimeDiffPileUp[i]->SetYTitle("t_{max}-t_{cell} (ns)"); |
2940 | outputContainer->Add(fhClusterTimeDiffPileUp[i]); | |
2941 | ||
2942 | fhClusterTimeDiffChargedPileUp[i] = new TH2F(Form("hClusterTimeDiffChargedPileUp%s",pileUpName[i].Data()), | |
85c4406e | 2943 | Form("Charged clusters E vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()), |
e31d67f1 | 2944 | nptbins,ptmin,ptmax,400,-200,200); |
184ca640 | 2945 | fhClusterTimeDiffChargedPileUp[i]->SetXTitle("#it{E} (GeV)"); |
fad96885 | 2946 | fhClusterTimeDiffChargedPileUp[i]->SetYTitle("t_{max}-t_{cell} (ns)"); |
2947 | outputContainer->Add(fhClusterTimeDiffChargedPileUp[i]); | |
2948 | ||
2949 | fhClusterTimeDiffPhotonPileUp[i] = new TH2F(Form("hClusterTimeDiffPhotonPileUp%s",pileUpName[i].Data()), | |
85c4406e | 2950 | Form("Selected photon E vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()), |
e31d67f1 | 2951 | nptbins,ptmin,ptmax,400,-200,200); |
184ca640 | 2952 | fhClusterTimeDiffPhotonPileUp[i]->SetXTitle("#it{E} (GeV)"); |
fad96885 | 2953 | fhClusterTimeDiffPhotonPileUp[i]->SetYTitle("t_{max}-t_{cell} (ns)"); |
2954 | outputContainer->Add(fhClusterTimeDiffPhotonPileUp[i]); | |
85c4406e | 2955 | |
fad96885 | 2956 | fhLambda0PileUp[i] = new TH2F(Form("hLambda0PileUp%s",pileUpName[i].Data()), |
2957 | Form("Cluster E vs #lambda^{2}_{0} in cluster, %s Pile-Up event",pileUpName[i].Data()), | |
2958 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
184ca640 | 2959 | fhLambda0PileUp[i]->SetXTitle("#it{E} (GeV)"); |
fad96885 | 2960 | fhLambda0PileUp[i]->SetYTitle("#lambda^{2}_{0}"); |
2961 | outputContainer->Add(fhLambda0PileUp[i]); | |
2962 | ||
2963 | fhLambda0ChargedPileUp[i] = new TH2F(Form("hLambda0ChargedPileUp%s",pileUpName[i].Data()), | |
85c4406e | 2964 | Form("Charged clusters E vs #lambda^{2}_{0}in cluster, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
184ca640 | 2965 | fhLambda0ChargedPileUp[i]->SetXTitle("#it{E} (GeV)"); |
fad96885 | 2966 | fhLambda0ChargedPileUp[i]->SetYTitle("#lambda^{2}_{0}"); |
2967 | outputContainer->Add(fhLambda0ChargedPileUp[i]); | |
85c4406e | 2968 | |
5e5e056f | 2969 | } |
2970 | ||
fedea415 | 2971 | fhEtaPhiBC0 = new TH2F ("hEtaPhiBC0","eta-phi for clusters tof corresponding to BC=0",netabins,etamin,etamax, nphibins,phimin,phimax); |
2972 | fhEtaPhiBC0->SetXTitle("#eta "); | |
2973 | fhEtaPhiBC0->SetYTitle("#phi (rad)"); | |
2974 | outputContainer->Add(fhEtaPhiBC0); | |
2975 | ||
2976 | fhEtaPhiBCPlus = new TH2F ("hEtaPhiBCPlus","eta-phi for clusters tof corresponding to BC>0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2977 | fhEtaPhiBCPlus->SetXTitle("#eta "); | |
2978 | fhEtaPhiBCPlus->SetYTitle("#phi (rad)"); | |
2979 | outputContainer->Add(fhEtaPhiBCPlus); | |
2980 | ||
2981 | fhEtaPhiBCMinus = new TH2F ("hEtaPhiBCMinus","eta-phi for clusters tof corresponding to BC<0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2982 | fhEtaPhiBCMinus->SetXTitle("#eta "); | |
2983 | fhEtaPhiBCMinus->SetYTitle("#phi (rad)"); | |
2984 | outputContainer->Add(fhEtaPhiBCMinus); | |
2985 | ||
2986 | fhEtaPhiBC0PileUpSPD = new TH2F ("hEtaPhiBC0PileUpSPD","eta-phi for clusters tof corresponding to BC=0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2987 | fhEtaPhiBC0PileUpSPD->SetXTitle("#eta "); | |
2988 | fhEtaPhiBC0PileUpSPD->SetYTitle("#phi (rad)"); | |
2989 | outputContainer->Add(fhEtaPhiBC0PileUpSPD); | |
2990 | ||
2991 | fhEtaPhiBCPlusPileUpSPD = new TH2F ("hEtaPhiBCPlusPileUpSPD","eta-phi for clusters tof corresponding to BC>0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2992 | fhEtaPhiBCPlusPileUpSPD->SetXTitle("#eta "); | |
2993 | fhEtaPhiBCPlusPileUpSPD->SetYTitle("#phi (rad)"); | |
2994 | outputContainer->Add(fhEtaPhiBCPlusPileUpSPD); | |
2995 | ||
2996 | fhEtaPhiBCMinusPileUpSPD = new TH2F ("hEtaPhiBCMinusPileUpSPD","eta-phi for clusters tof corresponding to BC<0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
2997 | fhEtaPhiBCMinusPileUpSPD->SetXTitle("#eta "); | |
2998 | fhEtaPhiBCMinusPileUpSPD->SetYTitle("#phi (rad)"); | |
2999 | outputContainer->Add(fhEtaPhiBCMinusPileUpSPD); | |
85c4406e | 3000 | |
b2e375c7 | 3001 | fhTimePtNoCut = new TH2F ("hTimePt_NoCut","time of cluster vs pT of clusters, no cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); |
184ca640 | 3002 | fhTimePtNoCut->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
3003 | fhTimePtNoCut->SetYTitle("#it{time} (ns)"); | |
b2e375c7 | 3004 | outputContainer->Add(fhTimePtNoCut); |
3005 | ||
3006 | fhTimePtSPD = new TH2F ("hTimePt_SPD","time of cluster vs pT of clusters, SPD cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
184ca640 | 3007 | fhTimePtSPD->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
3008 | fhTimePtSPD->SetYTitle("#it{time} (ns)"); | |
b2e375c7 | 3009 | outputContainer->Add(fhTimePtSPD); |
3010 | ||
3011 | fhTimePtPhotonNoCut = new TH2F ("hTimePtPhoton_NoCut","time of photon cluster vs pT of clusters, no cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
184ca640 | 3012 | fhTimePtPhotonNoCut->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
3013 | fhTimePtPhotonNoCut->SetYTitle("#it{time} (ns)"); | |
b2e375c7 | 3014 | outputContainer->Add(fhTimePtPhotonNoCut); |
3015 | ||
3016 | fhTimePtPhotonSPD = new TH2F ("hTimePtPhoton_SPD","time of photon cluster vs pT of clusters, SPD cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
184ca640 | 3017 | fhTimePtPhotonSPD->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
3018 | fhTimePtPhotonSPD->SetYTitle("#it{time} (ns)"); | |
b2e375c7 | 3019 | outputContainer->Add(fhTimePtPhotonSPD); |
3020 | ||
85c4406e | 3021 | fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","time of cluster vs N pile-up SPD vertex", ntimebins,timemin,timemax,20,0,20); |
2ad19c3d | 3022 | fhTimeNPileUpVertSPD->SetYTitle("# vertex "); |
184ca640 | 3023 | fhTimeNPileUpVertSPD->SetXTitle("#it{time} (ns)"); |
fad96885 | 3024 | outputContainer->Add(fhTimeNPileUpVertSPD); |
2ad19c3d | 3025 | |
85c4406e | 3026 | fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","time of cluster vs N pile-up Tracks vertex", ntimebins,timemin,timemax, 20,0,20 ); |
2ad19c3d | 3027 | fhTimeNPileUpVertTrack->SetYTitle("# vertex "); |
184ca640 | 3028 | fhTimeNPileUpVertTrack->SetXTitle("#it{time} (ns)"); |
85c4406e | 3029 | outputContainer->Add(fhTimeNPileUpVertTrack); |
2ad19c3d | 3030 | |
85c4406e | 3031 | fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","time of cluster vs N constributors to pile-up SPD vertex", ntimebins,timemin,timemax,50,0,50); |
2ad19c3d | 3032 | fhTimeNPileUpVertContributors->SetYTitle("# vertex "); |
184ca640 | 3033 | fhTimeNPileUpVertContributors->SetXTitle("#it{time} (ns)"); |
85c4406e | 3034 | outputContainer->Add(fhTimeNPileUpVertContributors); |
2ad19c3d | 3035 | |
85c4406e | 3036 | fhTimePileUpMainVertexZDistance = new TH2F ("hTime_PileUpMainVertexZDistance","time of cluster vs distance in Z pile-up SPD vertex - main SPD vertex",ntimebins,timemin,timemax,100,0,50); |
2ad19c3d | 3037 | fhTimePileUpMainVertexZDistance->SetYTitle("distance Z (cm) "); |
184ca640 | 3038 | fhTimePileUpMainVertexZDistance->SetXTitle("#it{time} (ns)"); |
85c4406e | 3039 | outputContainer->Add(fhTimePileUpMainVertexZDistance); |
2ad19c3d | 3040 | |
85c4406e | 3041 | fhTimePileUpMainVertexZDiamond = new TH2F ("hTime_PileUpMainVertexZDiamond","time of cluster vs distance in Z pile-up SPD vertex - z diamond",ntimebins,timemin,timemax,100,0,50); |
2ad19c3d | 3042 | fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance Z (cm) "); |
184ca640 | 3043 | fhTimePileUpMainVertexZDiamond->SetXTitle("#it{time} (ns)"); |
85c4406e | 3044 | outputContainer->Add(fhTimePileUpMainVertexZDiamond); |
acd56ca4 | 3045 | |
3046 | TString title[] = {"no |t diff| cut","|t diff|<20 ns","|t diff|>20 ns","|t diff|>40 ns"}; | |
3047 | TString name [] = {"TDiffNoCut","TDiffSmaller20ns","TDiffLarger20ns","TDiffLarger40ns"}; | |
85c4406e | 3048 | for(Int_t i = 0; i < 4; i++) |
3049 | { | |
acd56ca4 | 3050 | fhClusterMultSPDPileUp[i] = new TH2F(Form("fhClusterMultSPDPileUp_%s", name[i].Data()), |
184ca640 | 3051 | Form("Number of clusters per pile up event with #it{E} > 0.5 and %s respect cluster max vs cluster max E ",title[i].Data()), |
85c4406e | 3052 | nptbins,ptmin,ptmax,100,0,100); |
acd56ca4 | 3053 | fhClusterMultSPDPileUp[i]->SetYTitle("n clusters "); |
184ca640 | 3054 | fhClusterMultSPDPileUp[i]->SetXTitle("#it{E}_{cluster max} (GeV)"); |
85c4406e | 3055 | outputContainer->Add(fhClusterMultSPDPileUp[i]) ; |
acd56ca4 | 3056 | |
3057 | fhClusterMultNoPileUp[i] = new TH2F(Form("fhClusterMultNoPileUp_%s", name[i].Data()), | |
184ca640 | 3058 | Form("Number of clusters per non pile up event with #it{E} > 0.5 and %s respect cluster max vs cluster max E ",title[i].Data()), |
85c4406e | 3059 | nptbins,ptmin,ptmax,100,0,100); |
acd56ca4 | 3060 | fhClusterMultNoPileUp[i]->SetYTitle("n clusters "); |
184ca640 | 3061 | fhClusterMultNoPileUp[i]->SetXTitle("#it{E}_{cluster max} (GeV)"); |
85c4406e | 3062 | outputContainer->Add(fhClusterMultNoPileUp[i]) ; |
acd56ca4 | 3063 | } |
2ad19c3d | 3064 | |
85c4406e | 3065 | fhPtNPileUpSPDVtx = new TH2F ("hPt_NPileUpVertSPD","pT of cluster vs N pile-up SPD vertex", |
3066 | nptbins,ptmin,ptmax,20,0,20); | |
3067 | fhPtNPileUpSPDVtx->SetYTitle("# vertex "); | |
184ca640 | 3068 | fhPtNPileUpSPDVtx->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3069 | outputContainer->Add(fhPtNPileUpSPDVtx); |
0f7e7205 | 3070 | |
85c4406e | 3071 | fhPtNPileUpTrkVtx = new TH2F ("hPt_NPileUpVertTracks","pT of cluster vs N pile-up Tracks vertex", |
3072 | nptbins,ptmin,ptmax, 20,0,20 ); | |
3073 | fhPtNPileUpTrkVtx->SetYTitle("# vertex "); | |
184ca640 | 3074 | fhPtNPileUpTrkVtx->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3075 | outputContainer->Add(fhPtNPileUpTrkVtx); |
3076 | ||
3077 | fhPtNPileUpSPDVtxTimeCut = new TH2F ("hPt_NPileUpVertSPD_TimeCut","pT of cluster vs N pile-up SPD vertex, |tof| < 25 ns", | |
3078 | nptbins,ptmin,ptmax,20,0,20); | |
3079 | fhPtNPileUpSPDVtxTimeCut->SetYTitle("# vertex "); | |
184ca640 | 3080 | fhPtNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3081 | outputContainer->Add(fhPtNPileUpSPDVtxTimeCut); |
3082 | ||
3083 | fhPtNPileUpTrkVtxTimeCut = new TH2F ("hPt_NPileUpVertTracks_TimeCut","pT of cluster vs N pile-up Tracks vertex, |tof| < 25 ns", | |
3084 | nptbins,ptmin,ptmax, 20,0,20 ); | |
3085 | fhPtNPileUpTrkVtxTimeCut->SetYTitle("# vertex "); | |
184ca640 | 3086 | fhPtNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3087 | outputContainer->Add(fhPtNPileUpTrkVtxTimeCut); |
3088 | ||
3089 | fhPtNPileUpSPDVtxTimeCut2 = new TH2F ("hPt_NPileUpVertSPD_TimeCut2","pT of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns", | |
3090 | nptbins,ptmin,ptmax,20,0,20); | |
3091 | fhPtNPileUpSPDVtxTimeCut2->SetYTitle("# vertex "); | |
184ca640 | 3092 | fhPtNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3093 | outputContainer->Add(fhPtNPileUpSPDVtxTimeCut2); |
0f7e7205 | 3094 | |
85c4406e | 3095 | fhPtNPileUpTrkVtxTimeCut2 = new TH2F ("hPt_NPileUpVertTracks_TimeCut2","pT of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns", |
3096 | nptbins,ptmin,ptmax, 20,0,20 ); | |
3097 | fhPtNPileUpTrkVtxTimeCut2->SetYTitle("# vertex "); | |
184ca640 | 3098 | fhPtNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3099 | outputContainer->Add(fhPtNPileUpTrkVtxTimeCut2); |
3100 | ||
3101 | fhPtPhotonNPileUpSPDVtx = new TH2F ("hPtPhoton_NPileUpVertSPD","pT of cluster vs N pile-up SPD vertex", | |
3102 | nptbins,ptmin,ptmax,20,0,20); | |
3103 | fhPtPhotonNPileUpSPDVtx->SetYTitle("# vertex "); | |
184ca640 | 3104 | fhPtPhotonNPileUpSPDVtx->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3105 | outputContainer->Add(fhPtPhotonNPileUpSPDVtx); |
0f7e7205 | 3106 | |
85c4406e | 3107 | fhPtPhotonNPileUpTrkVtx = new TH2F ("hPtPhoton_NPileUpVertTracks","pT of cluster vs N pile-up Tracks vertex", |
3108 | nptbins,ptmin,ptmax, 20,0,20 ); | |
3109 | fhPtPhotonNPileUpTrkVtx->SetYTitle("# vertex "); | |
184ca640 | 3110 | fhPtPhotonNPileUpTrkVtx->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3111 | outputContainer->Add(fhPtPhotonNPileUpTrkVtx); |
0f7e7205 | 3112 | |
85c4406e | 3113 | fhPtPhotonNPileUpSPDVtxTimeCut = new TH2F ("hPtPhoton_NPileUpVertSPD_TimeCut","pT of cluster vs N pile-up SPD vertex, |tof| < 25 ns", |
3114 | nptbins,ptmin,ptmax,20,0,20); | |
3115 | fhPtPhotonNPileUpSPDVtxTimeCut->SetYTitle("# vertex "); | |
184ca640 | 3116 | fhPtPhotonNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3117 | outputContainer->Add(fhPtPhotonNPileUpSPDVtxTimeCut); |
0f7e7205 | 3118 | |
85c4406e | 3119 | fhPtPhotonNPileUpTrkVtxTimeCut = new TH2F ("hPtPhoton_NPileUpVertTracks_TimeCut","pT of cluster vs N pile-up Tracks vertex, |tof| < 25 ns", |
3120 | nptbins,ptmin,ptmax, 20,0,20 ); | |
3121 | fhPtPhotonNPileUpTrkVtxTimeCut->SetYTitle("# vertex "); | |
184ca640 | 3122 | fhPtPhotonNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3123 | outputContainer->Add(fhPtPhotonNPileUpTrkVtxTimeCut); |
0f7e7205 | 3124 | |
85c4406e | 3125 | fhPtPhotonNPileUpSPDVtxTimeCut2 = new TH2F ("hPtPhoton_NPileUpVertSPD_TimeCut2","pT of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns", |
3126 | nptbins,ptmin,ptmax,20,0,20); | |
3127 | fhPtPhotonNPileUpSPDVtxTimeCut2->SetYTitle("# vertex "); | |
184ca640 | 3128 | fhPtPhotonNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3129 | outputContainer->Add(fhPtPhotonNPileUpSPDVtxTimeCut2); |
0f7e7205 | 3130 | |
85c4406e | 3131 | fhPtPhotonNPileUpTrkVtxTimeCut2 = new TH2F ("hPtPhoton_NPileUpVertTracks_TimeCut2","pT of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns", |
3132 | nptbins,ptmin,ptmax, 20,0,20 ); | |
3133 | fhPtPhotonNPileUpTrkVtxTimeCut2->SetYTitle("# vertex "); | |
184ca640 | 3134 | fhPtPhotonNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
85c4406e | 3135 | outputContainer->Add(fhPtPhotonNPileUpTrkVtxTimeCut2); |
3136 | ||
2ad19c3d | 3137 | } |
3138 | ||
34c16486 | 3139 | if(IsDataMC()) |
3140 | { | |
f66d95af | 3141 | TString ptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}", "#pi^{0}","#eta", |
85c4406e | 3142 | "e^{#pm}","#gamma->e^{#pm}","hadron?","Anti-N","Anti-P", |
3143 | "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}","String" } ; | |
3d5d5078 | 3144 | |
f66d95af | 3145 | TString pname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Pi0","Eta","Electron", |
85c4406e | 3146 | "Conversion", "Hadron", "AntiNeutron","AntiProton", |
3147 | "PhotonPrompt","PhotonFragmentation","PhotonISR","String" } ; | |
521636d2 | 3148 | |
34c16486 | 3149 | for(Int_t i = 0; i < fNOriginHistograms; i++) |
85c4406e | 3150 | { |
3d5d5078 | 3151 | fhMCE[i] = new TH1F(Form("hE_MC%s",pname[i].Data()), |
85c4406e | 3152 | Form("cluster from %s : E ",ptype[i].Data()), |
3153 | nptbins,ptmin,ptmax); | |
184ca640 | 3154 | fhMCE[i]->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3155 | outputContainer->Add(fhMCE[i]) ; |
521636d2 | 3156 | |
4c8f7c2e | 3157 | fhMCPt[i] = new TH1F(Form("hPt_MC%s",pname[i].Data()), |
184ca640 | 3158 | Form("cluster from %s : #it{p}_[T] ",ptype[i].Data()), |
85c4406e | 3159 | nptbins,ptmin,ptmax); |
184ca640 | 3160 | fhMCPt[i]->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
4c8f7c2e | 3161 | outputContainer->Add(fhMCPt[i]) ; |
521636d2 | 3162 | |
4c8f7c2e | 3163 | fhMCEta[i] = new TH2F(Form("hEta_MC%s",pname[i].Data()), |
85c4406e | 3164 | Form("cluster from %s : #eta ",ptype[i].Data()), |
3165 | nptbins,ptmin,ptmax,netabins,etamin,etamax); | |
4c8f7c2e | 3166 | fhMCEta[i]->SetYTitle("#eta"); |
184ca640 | 3167 | fhMCEta[i]->SetXTitle("#it{E} (GeV)"); |
4c8f7c2e | 3168 | outputContainer->Add(fhMCEta[i]) ; |
521636d2 | 3169 | |
4c8f7c2e | 3170 | fhMCPhi[i] = new TH2F(Form("hPhi_MC%s",pname[i].Data()), |
85c4406e | 3171 | Form("cluster from %s : #phi ",ptype[i].Data()), |
3172 | nptbins,ptmin,ptmax,nphibins,phimin,phimax); | |
4c8f7c2e | 3173 | fhMCPhi[i]->SetYTitle("#phi (rad)"); |
184ca640 | 3174 | fhMCPhi[i]->SetXTitle("#it{E} (GeV)"); |
4c8f7c2e | 3175 | outputContainer->Add(fhMCPhi[i]) ; |
3176 | ||
3177 | ||
d9105d92 | 3178 | fhMCDeltaE[i] = new TH2F (Form("hDeltaE_MC%s",pname[i].Data()), |
85c4406e | 3179 | Form("MC - Reco E from %s",pname[i].Data()), |
3180 | nptbins,ptmin,ptmax, 200,-50,50); | |
184ca640 | 3181 | fhMCDeltaE[i]->SetYTitle("#Delta #it{E} (GeV)"); |
3182 | fhMCDeltaE[i]->SetXTitle("#it{E} (GeV)"); | |
4c8f7c2e | 3183 | outputContainer->Add(fhMCDeltaE[i]); |
3184 | ||
d9105d92 | 3185 | fhMCDeltaPt[i] = new TH2F (Form("hDeltaPt_MC%s",pname[i].Data()), |
184ca640 | 3186 | Form("MC - Reco #it{p}_[T] from %s",pname[i].Data()), |
85c4406e | 3187 | nptbins,ptmin,ptmax, 200,-50,50); |
184ca640 | 3188 | fhMCDeltaPt[i]->SetXTitle("p_{T,rec} (GeV/#it{c})"); |
3189 | fhMCDeltaPt[i]->SetYTitle("#Delta #it{p}_[T] (GeV/#it{c})"); | |
4c8f7c2e | 3190 | outputContainer->Add(fhMCDeltaPt[i]); |
85c4406e | 3191 | |
4c8f7c2e | 3192 | fhMC2E[i] = new TH2F (Form("h2E_MC%s",pname[i].Data()), |
85c4406e | 3193 | Form("E distribution, reconstructed vs generated from %s",pname[i].Data()), |
3194 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
184ca640 | 3195 | fhMC2E[i]->SetXTitle("#it{E}_{rec} (GeV)"); |
3196 | fhMC2E[i]->SetYTitle("#it{E}_{gen} (GeV)"); | |
85c4406e | 3197 | outputContainer->Add(fhMC2E[i]); |
4c8f7c2e | 3198 | |
3199 | fhMC2Pt[i] = new TH2F (Form("h2Pt_MC%s",pname[i].Data()), | |
85c4406e | 3200 | Form("p_T distribution, reconstructed vs generated from %s",pname[i].Data()), |
3201 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
184ca640 | 3202 | fhMC2Pt[i]->SetXTitle("p_{T,rec} (GeV/#it{c})"); |
3203 | fhMC2Pt[i]->SetYTitle("p_{T,gen} (GeV/#it{c})"); | |
4c8f7c2e | 3204 | outputContainer->Add(fhMC2Pt[i]); |
3205 | ||
521636d2 | 3206 | |
3207 | } | |
3d5d5078 | 3208 | |
f66d95af | 3209 | TString pptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}","hadron?", |
85c4406e | 3210 | "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}"} ; |
f66d95af | 3211 | |
3212 | TString ppname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Hadron", | |
85c4406e | 3213 | "PhotonPrompt","PhotonFragmentation","PhotonISR"} ; |
f66d95af | 3214 | |
34c16486 | 3215 | for(Int_t i = 0; i < fNPrimaryHistograms; i++) |
85c4406e | 3216 | { |
f66d95af | 3217 | fhEPrimMC[i] = new TH1F(Form("hEPrim_MC%s",ppname[i].Data()), |
85c4406e | 3218 | Form("primary photon %s : E ",pptype[i].Data()), |
3219 | nptbins,ptmin,ptmax); | |
184ca640 | 3220 | fhEPrimMC[i]->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3221 | outputContainer->Add(fhEPrimMC[i]) ; |
3d5d5078 | 3222 | |
f66d95af | 3223 | fhPtPrimMC[i] = new TH1F(Form("hPtPrim_MC%s",ppname[i].Data()), |
184ca640 | 3224 | Form("primary photon %s : #it{p}_[T] ",pptype[i].Data()), |
85c4406e | 3225 | nptbins,ptmin,ptmax); |
184ca640 | 3226 | fhPtPrimMC[i]->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
3d5d5078 | 3227 | outputContainer->Add(fhPtPrimMC[i]) ; |
3228 | ||
f66d95af | 3229 | fhYPrimMC[i] = new TH2F(Form("hYPrim_MC%s",ppname[i].Data()), |
85c4406e | 3230 | Form("primary photon %s : Rapidity ",pptype[i].Data()), |
a421d7a3 | 3231 | nptbins,ptmin,ptmax,200,-2,2); |
3d5d5078 | 3232 | fhYPrimMC[i]->SetYTitle("Rapidity"); |
184ca640 | 3233 | fhYPrimMC[i]->SetXTitle("#it{E} (GeV)"); |
3d5d5078 | 3234 | outputContainer->Add(fhYPrimMC[i]) ; |
3235 | ||
4cf13296 | 3236 | fhEtaPrimMC[i] = new TH2F(Form("hEtaPrim_MC%s",ppname[i].Data()), |
3237 | Form("primary photon %s : #eta",pptype[i].Data()), | |
a421d7a3 | 3238 | nptbins,ptmin,ptmax,200,-2,2); |
4cf13296 | 3239 | fhEtaPrimMC[i]->SetYTitle("#eta"); |
184ca640 | 3240 | fhEtaPrimMC[i]->SetXTitle("#it{E} (GeV)"); |
4cf13296 | 3241 | outputContainer->Add(fhEtaPrimMC[i]) ; |
3242 | ||
f66d95af | 3243 | fhPhiPrimMC[i] = new TH2F(Form("hPhiPrim_MC%s",ppname[i].Data()), |
85c4406e | 3244 | Form("primary photon %s : #phi ",pptype[i].Data()), |
a421d7a3 | 3245 | nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi()); |
3d5d5078 | 3246 | fhPhiPrimMC[i]->SetYTitle("#phi (rad)"); |
184ca640 | 3247 | fhPhiPrimMC[i]->SetXTitle("#it{E} (GeV)"); |
3d5d5078 | 3248 | outputContainer->Add(fhPhiPrimMC[i]) ; |
85c4406e | 3249 | |
3d5d5078 | 3250 | |
f66d95af | 3251 | fhEPrimMCAcc[i] = new TH1F(Form("hEPrimAcc_MC%s",ppname[i].Data()), |
85c4406e | 3252 | Form("primary photon %s in acceptance: E ",pptype[i].Data()), |
3253 | nptbins,ptmin,ptmax); | |
184ca640 | 3254 | fhEPrimMCAcc[i]->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3255 | outputContainer->Add(fhEPrimMCAcc[i]) ; |
3d5d5078 | 3256 | |
f66d95af | 3257 | fhPtPrimMCAcc[i] = new TH1F(Form("hPtPrimAcc_MC%s",ppname[i].Data()), |
184ca640 | 3258 | Form("primary photon %s in acceptance: #it{p}_[T] ",pptype[i].Data()), |
85c4406e | 3259 | nptbins,ptmin,ptmax); |
184ca640 | 3260 | fhPtPrimMCAcc[i]->SetXTitle("#it{p}_[T] (GeV/#it{c})"); |
3d5d5078 | 3261 | outputContainer->Add(fhPtPrimMCAcc[i]) ; |
3262 | ||
f66d95af | 3263 | fhYPrimMCAcc[i] = new TH2F(Form("hYPrimAcc_MC%s",ppname[i].Data()), |
85c4406e | 3264 | Form("primary photon %s in acceptance: Rapidity ",pptype[i].Data()), |
3265 | nptbins,ptmin,ptmax,100,-1,1); | |
3d5d5078 | 3266 | fhYPrimMCAcc[i]->SetYTitle("Rapidity"); |
184ca640 | 3267 | fhYPrimMCAcc[i]->SetXTitle("#it{E} (GeV)"); |
3d5d5078 | 3268 | outputContainer->Add(fhYPrimMCAcc[i]) ; |
4cf13296 | 3269 | |
3270 | fhEtaPrimMCAcc[i] = new TH2F(Form("hEtaPrimAcc_MC%s",ppname[i].Data()), | |
3271 | Form("primary photon %s in acceptance: #eta ",pptype[i].Data()), | |
3272 | nptbins,ptmin,ptmax,netabins,etamin,etamax); | |
3273 | fhEtaPrimMCAcc[i]->SetYTitle("#eta"); | |
184ca640 | 3274 | fhEtaPrimMCAcc[i]->SetXTitle("#it{E} (GeV)"); |
667a3592 | 3275 | outputContainer->Add(fhEtaPrimMCAcc[i]) ; |
3d5d5078 | 3276 | |
f66d95af | 3277 | fhPhiPrimMCAcc[i] = new TH2F(Form("hPhiPrimAcc_MC%s",ppname[i].Data()), |
85c4406e | 3278 | Form("primary photon %s in acceptance: #phi ",pptype[i].Data()), |
3279 | nptbins,ptmin,ptmax,nphibins,phimin,phimax); | |
3d5d5078 | 3280 | fhPhiPrimMCAcc[i]->SetYTitle("#phi (rad)"); |
184ca640 | 3281 | fhPhiPrimMCAcc[i]->SetXTitle("#it{E} (GeV)"); |
3d5d5078 | 3282 | outputContainer->Add(fhPhiPrimMCAcc[i]) ; |
3283 | ||
3284 | } | |
85c4406e | 3285 | |
34c16486 | 3286 | if(fFillSSHistograms) |
3287 | { | |
85c4406e | 3288 | TString ptypess[] = { "#gamma","hadron?","#pi^{0}","#eta","#gamma->e^{#pm}","e^{#pm}"} ; |
3d5d5078 | 3289 | |
3290 | TString pnamess[] = { "Photon","Hadron","Pi0","Eta","Conversion","Electron"} ; | |
3291 | ||
34c16486 | 3292 | for(Int_t i = 0; i < 6; i++) |
85c4406e | 3293 | { |
3d5d5078 | 3294 | fhMCELambda0[i] = new TH2F(Form("hELambda0_MC%s",pnamess[i].Data()), |
3295 | Form("cluster from %s : E vs #lambda_{0}^{2}",ptypess[i].Data()), | |
85c4406e | 3296 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3297 | fhMCELambda0[i]->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3298 | fhMCELambda0[i]->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3299 | outputContainer->Add(fhMCELambda0[i]) ; |
521636d2 | 3300 | |
3d5d5078 | 3301 | fhMCELambda1[i] = new TH2F(Form("hELambda1_MC%s",pnamess[i].Data()), |
3302 | Form("cluster from %s : E vs #lambda_{1}^{2}",ptypess[i].Data()), | |
85c4406e | 3303 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3304 | fhMCELambda1[i]->SetYTitle("#lambda_{1}^{2}"); |
184ca640 | 3305 | fhMCELambda1[i]->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3306 | outputContainer->Add(fhMCELambda1[i]) ; |
34c16486 | 3307 | |
3d5d5078 | 3308 | fhMCEDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pnamess[i].Data()), |
3309 | Form("cluster from %s : E vs dispersion^{2}",ptypess[i].Data()), | |
85c4406e | 3310 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3311 | fhMCEDispersion[i]->SetYTitle("D^{2}"); |
184ca640 | 3312 | fhMCEDispersion[i]->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3313 | outputContainer->Add(fhMCEDispersion[i]) ; |
34c16486 | 3314 | |
f66d95af | 3315 | fhMCNCellsE[i] = new TH2F (Form("hNCellsE_MC%s",pnamess[i].Data()), |
85c4406e | 3316 | Form("# of cells in cluster from %s vs E of clusters",ptypess[i].Data()), |
3317 | nptbins,ptmin,ptmax, nbins,nmin,nmax); | |
184ca640 | 3318 | fhMCNCellsE[i]->SetXTitle("#it{E} (GeV)"); |
f66d95af | 3319 | fhMCNCellsE[i]->SetYTitle("# of cells in cluster"); |
85c4406e | 3320 | outputContainer->Add(fhMCNCellsE[i]); |
f66d95af | 3321 | |
3322 | fhMCMaxCellDiffClusterE[i] = new TH2F (Form("hMaxCellDiffClusterE_MC%s",pnamess[i].Data()), | |
34c16486 | 3323 | Form("energy vs difference of cluster energy from %s - max cell energy / cluster energy, good clusters",ptypess[i].Data()), |
85c4406e | 3324 | nptbins,ptmin,ptmax, 500,0,1.); |
184ca640 | 3325 | fhMCMaxCellDiffClusterE[i]->SetXTitle("#it{E}_{cluster} (GeV) "); |
3326 | fhMCMaxCellDiffClusterE[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}"); | |
85c4406e | 3327 | outputContainer->Add(fhMCMaxCellDiffClusterE[i]); |
f66d95af | 3328 | |
764ab1f4 | 3329 | if(!fFillOnlySimpleSSHisto) |
34c16486 | 3330 | { |
764ab1f4 | 3331 | fhMCLambda0vsClusterMaxCellDiffE0[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()), |
3332 | Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()), | |
85c4406e | 3333 | ssbins,ssmin,ssmax,500,0,1.); |
764ab1f4 | 3334 | fhMCLambda0vsClusterMaxCellDiffE0[i]->SetXTitle("#lambda_{0}^{2}"); |
184ca640 | 3335 | fhMCLambda0vsClusterMaxCellDiffE0[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}"); |
85c4406e | 3336 | outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE0[i]) ; |
764ab1f4 | 3337 | |
3338 | fhMCLambda0vsClusterMaxCellDiffE2[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()), | |
3339 | Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()), | |
85c4406e | 3340 | ssbins,ssmin,ssmax,500,0,1.); |
764ab1f4 | 3341 | fhMCLambda0vsClusterMaxCellDiffE2[i]->SetXTitle("#lambda_{0}^{2}"); |
184ca640 | 3342 | fhMCLambda0vsClusterMaxCellDiffE2[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}"); |
85c4406e | 3343 | outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE2[i]) ; |
34c16486 | 3344 | |
764ab1f4 | 3345 | fhMCLambda0vsClusterMaxCellDiffE6[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()), |
184ca640 | 3346 | Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, #it{E} > 6 GeV",ptypess[i].Data()), |
85c4406e | 3347 | ssbins,ssmin,ssmax,500,0,1.); |
764ab1f4 | 3348 | fhMCLambda0vsClusterMaxCellDiffE6[i]->SetXTitle("#lambda_{0}^{2}"); |
184ca640 | 3349 | fhMCLambda0vsClusterMaxCellDiffE6[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}"); |
85c4406e | 3350 | outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE6[i]) ; |
34c16486 | 3351 | |
764ab1f4 | 3352 | fhMCNCellsvsClusterMaxCellDiffE0[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()), |
3353 | Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()), | |
85c4406e | 3354 | nbins/5,nmin,nmax/5,500,0,1.); |
764ab1f4 | 3355 | fhMCNCellsvsClusterMaxCellDiffE0[i]->SetXTitle("N cells in cluster"); |
184ca640 | 3356 | fhMCNCellsvsClusterMaxCellDiffE0[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}"); |
85c4406e | 3357 | outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE0[i]) ; |
34c16486 | 3358 | |
764ab1f4 | 3359 | fhMCNCellsvsClusterMaxCellDiffE2[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()), |
3360 | Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()), | |
85c4406e | 3361 | nbins/5,nmin,nmax/5,500,0,1.); |
764ab1f4 | 3362 | fhMCNCellsvsClusterMaxCellDiffE2[i]->SetXTitle("N cells in cluster"); |
184ca640 | 3363 | fhMCNCellsvsClusterMaxCellDiffE2[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}"); |
85c4406e | 3364 | outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE2[i]) ; |
34c16486 | 3365 | |
764ab1f4 | 3366 | fhMCNCellsvsClusterMaxCellDiffE6[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()), |
184ca640 | 3367 | Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, #it{E} > 6 GeV",ptypess[i].Data()), |
85c4406e | 3368 | nbins/5,nmin,nmax/5,500,0,1.); |
764ab1f4 | 3369 | fhMCNCellsvsClusterMaxCellDiffE6[i]->SetXTitle("N cells in cluster"); |
184ca640 | 3370 | fhMCNCellsvsClusterMaxCellDiffE6[i]->SetYTitle("#it{E} (GeV)"); |
85c4406e | 3371 | outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE6[i]) ; |
34c16486 | 3372 | |
764ab1f4 | 3373 | if(fCalorimeter=="EMCAL") |
34c16486 | 3374 | { |
764ab1f4 | 3375 | fhMCEDispEta[i] = new TH2F (Form("hEDispEtaE_MC%s",pnamess[i].Data()), |
3376 | Form("cluster from %s : #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E",ptypess[i].Data()), | |
85c4406e | 3377 | nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); |
184ca640 | 3378 | fhMCEDispEta[i]->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 3379 | fhMCEDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}"); |
85c4406e | 3380 | outputContainer->Add(fhMCEDispEta[i]); |
764ab1f4 | 3381 | |
3382 | fhMCEDispPhi[i] = new TH2F (Form("hEDispPhiE_MC%s",pnamess[i].Data()), | |
3383 | Form("cluster from %s : #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E",ptypess[i].Data()), | |
85c4406e | 3384 | nptbins,ptmin,ptmax, ssbins,ssmin,ssmax); |
184ca640 | 3385 | fhMCEDispPhi[i]->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 3386 | fhMCEDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}"); |
85c4406e | 3387 | outputContainer->Add(fhMCEDispPhi[i]); |
764ab1f4 | 3388 | |
3389 | fhMCESumEtaPhi[i] = new TH2F (Form("hESumEtaPhiE_MC%s",pnamess[i].Data()), | |
85c4406e | 3390 | Form("cluster from %s : #delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",ptypess[i].Data()), |
3391 | nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax); | |
184ca640 | 3392 | fhMCESumEtaPhi[i]->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 3393 | fhMCESumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}"); |
3394 | outputContainer->Add(fhMCESumEtaPhi[i]); | |
3395 | ||
3396 | fhMCEDispEtaPhiDiff[i] = new TH2F (Form("hEDispEtaPhiDiffE_MC%s",pnamess[i].Data()), | |
85c4406e | 3397 | Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",ptypess[i].Data()), |
3398 | nptbins,ptmin,ptmax,200,-10,10); | |
184ca640 | 3399 | fhMCEDispEtaPhiDiff[i]->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 3400 | fhMCEDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}"); |
85c4406e | 3401 | outputContainer->Add(fhMCEDispEtaPhiDiff[i]); |
764ab1f4 | 3402 | |
3403 | fhMCESphericity[i] = new TH2F (Form("hESphericity_MC%s",pnamess[i].Data()), | |
85c4406e | 3404 | Form("cluster from %s : (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",ptypess[i].Data()), |
3405 | nptbins,ptmin,ptmax, 200,-1,1); | |
184ca640 | 3406 | fhMCESphericity[i]->SetXTitle("#it{E} (GeV)"); |
764ab1f4 | 3407 | fhMCESphericity[i]->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})"); |
3408 | outputContainer->Add(fhMCESphericity[i]); | |
3409 | ||
3410 | for(Int_t ie = 0; ie < 7; ie++) | |
3411 | { | |
3412 | fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pnamess[i].Data()), | |
85c4406e | 3413 | Form("cluster from %s : #sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]), |
3414 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
764ab1f4 | 3415 | fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}"); |
3416 | fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
85c4406e | 3417 | outputContainer->Add(fhMCDispEtaDispPhi[ie][i]); |
764ab1f4 | 3418 | |
3419 | fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pnamess[i].Data()), | |
85c4406e | 3420 | Form("cluster from %s : #lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]), |
3421 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
764ab1f4 | 3422 | fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}"); |
3423 | fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
85c4406e | 3424 | outputContainer->Add(fhMCLambda0DispEta[ie][i]); |
764ab1f4 | 3425 | |
3426 | fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pnamess[i].Data()), | |
85c4406e | 3427 | Form("cluster from %s :#lambda^{2}_{0} vs #sigma^{2}_{#phi #phi} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]), |
3428 | ssbins,ssmin,ssmax , ssbins,ssmin,ssmax); | |
764ab1f4 | 3429 | fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}"); |
3430 | fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}"); | |
85c4406e | 3431 | outputContainer->Add(fhMCLambda0DispPhi[ie][i]); |
764ab1f4 | 3432 | } |
34c16486 | 3433 | } |
34c16486 | 3434 | } |
85c4406e | 3435 | }// loop |
3d5d5078 | 3436 | |
3437 | if(!GetReader()->IsEmbeddedClusterSelectionOn()) | |
3438 | { | |
3439 | fhMCPhotonELambda0NoOverlap = new TH2F("hELambda0_MCPhoton_NoOverlap", | |
3440 | "cluster from Photon : E vs #lambda_{0}^{2}", | |
85c4406e | 3441 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3442 | fhMCPhotonELambda0NoOverlap->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3443 | fhMCPhotonELambda0NoOverlap->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3444 | outputContainer->Add(fhMCPhotonELambda0NoOverlap) ; |
3d5d5078 | 3445 | |
3d5d5078 | 3446 | fhMCPhotonELambda0TwoOverlap = new TH2F("hELambda0_MCPhoton_TwoOverlap", |
3447 | "cluster from Photon : E vs #lambda_{0}^{2}", | |
85c4406e | 3448 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3449 | fhMCPhotonELambda0TwoOverlap->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3450 | fhMCPhotonELambda0TwoOverlap->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3451 | outputContainer->Add(fhMCPhotonELambda0TwoOverlap) ; |
3d5d5078 | 3452 | |
3d5d5078 | 3453 | fhMCPhotonELambda0NOverlap = new TH2F("hELambda0_MCPhoton_NOverlap", |
3454 | "cluster from Photon : E vs #lambda_{0}^{2}", | |
85c4406e | 3455 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3456 | fhMCPhotonELambda0NOverlap->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3457 | fhMCPhotonELambda0NOverlap->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3458 | outputContainer->Add(fhMCPhotonELambda0NOverlap) ; |
521636d2 | 3459 | |
85c4406e | 3460 | } //No embedding |
3d5d5078 | 3461 | |
3d5d5078 | 3462 | if(GetReader()->IsEmbeddedClusterSelectionOn()) |
3463 | { | |
3464 | ||
3465 | fhEmbeddedSignalFractionEnergy = new TH2F("hEmbeddedSignal_FractionEnergy", | |
34c16486 | 3466 | "Energy Fraction of embedded signal versus cluster energy", |
85c4406e | 3467 | nptbins,ptmin,ptmax,100,0.,1.); |
3d5d5078 | 3468 | fhEmbeddedSignalFractionEnergy->SetYTitle("Fraction"); |
184ca640 | 3469 | fhEmbeddedSignalFractionEnergy->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3470 | outputContainer->Add(fhEmbeddedSignalFractionEnergy) ; |
3d5d5078 | 3471 | |
3472 | fhEmbedPhotonELambda0FullSignal = new TH2F("hELambda0_EmbedPhoton_FullSignal", | |
34c16486 | 3473 | "cluster from Photon embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}", |
85c4406e | 3474 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3475 | fhEmbedPhotonELambda0FullSignal->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3476 | fhEmbedPhotonELambda0FullSignal->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3477 | outputContainer->Add(fhEmbedPhotonELambda0FullSignal) ; |
34c16486 | 3478 | |
3d5d5078 | 3479 | fhEmbedPhotonELambda0MostlySignal = new TH2F("hELambda0_EmbedPhoton_MostlySignal", |
34c16486 | 3480 | "cluster from Photon embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}", |
85c4406e | 3481 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3482 | fhEmbedPhotonELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3483 | fhEmbedPhotonELambda0MostlySignal->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3484 | outputContainer->Add(fhEmbedPhotonELambda0MostlySignal) ; |
3d5d5078 | 3485 | |
3d5d5078 | 3486 | fhEmbedPhotonELambda0MostlyBkg = new TH2F("hELambda0_EmbedPhoton_MostlyBkg", |
34c16486 | 3487 | "cluster from Photon embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}", |
85c4406e | 3488 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3489 | fhEmbedPhotonELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3490 | fhEmbedPhotonELambda0MostlyBkg->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3491 | outputContainer->Add(fhEmbedPhotonELambda0MostlyBkg) ; |
34c16486 | 3492 | |
3d5d5078 | 3493 | fhEmbedPhotonELambda0FullBkg = new TH2F("hELambda0_EmbedPhoton_FullBkg", |
34c16486 | 3494 | "cluster from Photonm embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}", |
85c4406e | 3495 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3496 | fhEmbedPhotonELambda0FullBkg->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3497 | fhEmbedPhotonELambda0FullBkg->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3498 | outputContainer->Add(fhEmbedPhotonELambda0FullBkg) ; |
3d5d5078 | 3499 | |
3d5d5078 | 3500 | fhEmbedPi0ELambda0FullSignal = new TH2F("hELambda0_EmbedPi0_FullSignal", |
34c16486 | 3501 | "cluster from Pi0 embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}", |
85c4406e | 3502 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3503 | fhEmbedPi0ELambda0FullSignal->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3504 | fhEmbedPi0ELambda0FullSignal->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3505 | outputContainer->Add(fhEmbedPi0ELambda0FullSignal) ; |
34c16486 | 3506 | |
3d5d5078 | 3507 | fhEmbedPi0ELambda0MostlySignal = new TH2F("hELambda0_EmbedPi0_MostlySignal", |
34c16486 | 3508 | "cluster from Pi0 embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}", |
85c4406e | 3509 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3510 | fhEmbedPi0ELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3511 | fhEmbedPi0ELambda0MostlySignal->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3512 | outputContainer->Add(fhEmbedPi0ELambda0MostlySignal) ; |
3d5d5078 | 3513 | |
3d5d5078 | 3514 | fhEmbedPi0ELambda0MostlyBkg = new TH2F("hELambda0_EmbedPi0_MostlyBkg", |
34c16486 | 3515 | "cluster from Pi0 embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}", |
85c4406e | 3516 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3517 | fhEmbedPi0ELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3518 | fhEmbedPi0ELambda0MostlyBkg->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3519 | outputContainer->Add(fhEmbedPi0ELambda0MostlyBkg) ; |
3d5d5078 | 3520 | |
3d5d5078 | 3521 | fhEmbedPi0ELambda0FullBkg = new TH2F("hELambda0_EmbedPi0_FullBkg", |
34c16486 | 3522 | "cluster from Pi0 embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}", |
85c4406e | 3523 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
3d5d5078 | 3524 | fhEmbedPi0ELambda0FullBkg->SetYTitle("#lambda_{0}^{2}"); |
184ca640 | 3525 | fhEmbedPi0ELambda0FullBkg->SetXTitle("#it{E} (GeV)"); |
85c4406e | 3526 | outputContainer->Add(fhEmbedPi0ELambda0FullBkg) ; |
34c16486 | 3527 | |
3d5d5078 | 3528 | }// embedded histograms |
3529 | ||
521636d2 | 3530 | |
3531 | }// Fill SS MC histograms | |
3532 | ||
477d6cee | 3533 | }//Histos with MC |
1035a8d9 | 3534 | |
477d6cee | 3535 | return outputContainer ; |
3536 | ||
1c5acb87 | 3537 | } |
3538 | ||
34c16486 | 3539 | //_______________________ |
6639984f | 3540 | void AliAnaPhoton::Init() |
3541 | { | |
3542 | ||
3543 | //Init | |
3544 | //Do some checks | |
34c16486 | 3545 | if(fCalorimeter == "PHOS" && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD()) |
3546 | { | |
591cc579 | 3547 | printf("AliAnaPhoton::Init() - !!STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!\n"); |
6639984f | 3548 | abort(); |
3549 | } | |
34c16486 | 3550 | else if(fCalorimeter == "EMCAL" && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD()) |
3551 | { | |
591cc579 | 3552 | printf("AliAnaPhoton::Init() - !!STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!\n"); |
6639984f | 3553 | abort(); |
3554 | } | |
3555 | ||
49b5c49b | 3556 | if(GetReader()->GetDataType() == AliCaloTrackReader::kMC) GetCaloPID()->SwitchOnBayesian(); |
3557 | ||
6639984f | 3558 | } |
3559 | ||
1c5acb87 | 3560 | //____________________________________________________________________________ |
3561 | void AliAnaPhoton::InitParameters() | |
3562 | { | |
3563 | ||
3564 | //Initialize the parameters of the analysis. | |
a3aebfff | 3565 | AddToHistogramsName("AnaPhoton_"); |
521636d2 | 3566 | |
6175da48 | 3567 | fCalorimeter = "EMCAL" ; |
3568 | fMinDist = 2.; | |
3569 | fMinDist2 = 4.; | |
3570 | fMinDist3 = 5.; | |
1e86c71e | 3571 | |
caa8a222 | 3572 | fTimeCutMin =-1000000; |
3573 | fTimeCutMax = 1000000; | |
6175da48 | 3574 | fNCellsCut = 0; |
2ac125bf | 3575 | |
1e86c71e | 3576 | fRejectTrackMatch = kTRUE ; |
1e86c71e | 3577 | |
1c5acb87 | 3578 | } |
3579 | ||
3580 | //__________________________________________________________________ | |
85c4406e | 3581 | void AliAnaPhoton::MakeAnalysisFillAOD() |
1c5acb87 | 3582 | { |
f8006433 | 3583 | //Do photon analysis and fill aods |
f37fa8d2 | 3584 | |
85c4406e | 3585 | //Get the vertex |
5025c139 | 3586 | Double_t v[3] = {0,0,0}; //vertex ; |
3587 | GetReader()->GetVertex(v); | |
f8006433 | 3588 | |
f37fa8d2 | 3589 | //Select the Calorimeter of the photon |
85c4406e | 3590 | TObjArray * pl = 0x0; |
3591 | AliVCaloCells* cells = 0; | |
71e3889f | 3592 | if (fCalorimeter == "PHOS" ) |
3593 | { | |
3594 | pl = GetPHOSClusters(); | |
3595 | cells = GetPHOSCells(); | |
3596 | } | |
477d6cee | 3597 | else if (fCalorimeter == "EMCAL") |
71e3889f | 3598 | { |
3599 | pl = GetEMCALClusters(); | |
3600 | cells = GetEMCALCells(); | |
3601 | } | |
5ae09196 | 3602 | |
85c4406e | 3603 | if(!pl) |
34c16486 | 3604 | { |
5ae09196 | 3605 | Info("MakeAnalysisFillAOD","TObjArray with %s clusters is NULL!\n",fCalorimeter.Data()); |
3606 | return; | |
3607 | } | |
521636d2 | 3608 | |
85c4406e | 3609 | FillPileUpHistogramsPerEvent(); |
58ea8ce5 | 3610 | |
3611 | TLorentzVector mom; | |
3612 | ||
fc195fd0 | 3613 | // Loop on raw clusters before filtering in the reader and fill control histogram |
34c16486 | 3614 | if((GetReader()->GetEMCALClusterListName()=="" && fCalorimeter=="EMCAL") || fCalorimeter=="PHOS") |
3615 | { | |
3616 | for(Int_t iclus = 0; iclus < GetReader()->GetInputEvent()->GetNumberOfCaloClusters(); iclus++ ) | |
3617 | { | |
fc195fd0 | 3618 | AliVCluster * clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus); |
58ea8ce5 | 3619 | if (fCalorimeter == "PHOS" && clus->IsPHOS() && clus->E() > GetReader()->GetPHOSPtMin() ) |
3620 | { | |
3621 | fhClusterCutsE [0]->Fill(clus->E()); | |
3622 | ||
3623 | clus->GetMomentum(mom,GetVertex(0)) ; | |
3624 | fhClusterCutsPt[0]->Fill(mom.Pt()); | |
3625 | } | |
3626 | else if(fCalorimeter == "EMCAL" && clus->IsEMCAL() && clus->E() > GetReader()->GetEMCALPtMin()) | |
3627 | { | |
3628 | fhClusterCutsE [0]->Fill(clus->E()); | |
3629 | ||
3630 | clus->GetMomentum(mom,GetVertex(0)) ; | |
3631 | fhClusterCutsPt[0]->Fill(mom.Pt()); | |
3632 | } | |
fc195fd0 | 3633 | } |
3634 | } | |
85c4406e | 3635 | else |
34c16486 | 3636 | { // reclusterized |
fc195fd0 | 3637 | TClonesArray * clusterList = 0; |
85c4406e | 3638 | |
7d650cb7 | 3639 | if(GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName())) |
3640 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName())); | |
3641 | else if(GetReader()->GetOutputEvent()) | |
4a9e1073 | 3642 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(GetReader()->GetEMCALClusterListName())); |
7d650cb7 | 3643 | |
34c16486 | 3644 | if(clusterList) |
3645 | { | |
fc195fd0 | 3646 | Int_t nclusters = clusterList->GetEntriesFast(); |
85c4406e | 3647 | for (Int_t iclus = 0; iclus < nclusters; iclus++) |
34c16486 | 3648 | { |
85c4406e | 3649 | AliVCluster * clus = dynamic_cast<AliVCluster*> (clusterList->At(iclus)); |
58ea8ce5 | 3650 | if(clus) |
3651 | { | |
3652 | fhClusterCutsE [0]->Fill(clus->E()); | |
3653 | ||
3654 | clus->GetMomentum(mom,GetVertex(0)) ; | |
3655 | fhClusterCutsPt[0]->Fill(mom.Pt()); | |
3656 | } | |
6265ad55 | 3657 | } |
fc195fd0 | 3658 | } |
3659 | } | |
fc195fd0 | 3660 | |
afb3af8a | 3661 | // Fill some trigger related histograms |
1035a8d9 | 3662 | Int_t idTrig = GetReader()->GetTriggerClusterIndex(); |
3663 | Bool_t exotic = GetReader()->IsExoticEvent(); | |
3664 | Bool_t bad = GetReader()->IsBadCellTriggerEvent(); | |
85c4406e | 3665 | |
afb3af8a | 3666 | if( fFillEMCALBCHistograms && fCalorimeter=="EMCAL" && |
eb86112d | 3667 | ( bad || exotic ) && idTrig >= 0 && !GetReader()->AreBadTriggerEventsRemoved()) |
afb3af8a | 3668 | { |
0f8098cc | 3669 | // printf("Index %d, Id %d, bad %d, exo %d\n", |
3670 | // GetReader()->GetTriggerClusterIndex(), | |
3671 | // GetReader()->GetTriggerClusterId(), | |
3672 | // GetReader()->IsBadCellTriggerEvent(), | |
3673 | // GetReader()->IsExoticEvent() ); | |
6265ad55 | 3674 | |
3675 | TClonesArray * clusterList = 0; | |
3676 | TString clusterListName = GetReader()->GetEMCALClusterListName(); | |
3677 | if (GetReader()->GetInputEvent()->FindListObject(clusterListName)) | |
3678 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetInputEvent() ->FindListObject(clusterListName)); | |
3679 | else if(GetReader()->GetOutputEvent()) | |
3680 | clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(clusterListName)); | |
3681 | ||
3682 | AliVCluster * badClusTrig = 0; | |
3683 | if(clusterList) badClusTrig = (AliVCluster*) clusterList->At(idTrig); | |
3684 | else badClusTrig = GetReader()->GetInputEvent()->GetCaloCluster(idTrig); | |
6265ad55 | 3685 | |
0f8098cc | 3686 | if(!badClusTrig) |
3687 | printf("AliAnaPhoton::MakeAnalysisFillAOD() - No cluster (bad-exotic trigger) found with requested index %d \n",idTrig); | |
3688 | else | |
afb3af8a | 3689 | { |
0f8098cc | 3690 | TLorentzVector momBadClus; |
3691 | ||
3692 | badClusTrig->GetMomentum(momBadClus,GetVertex(0)); | |
3693 | ||
3694 | Float_t etaclusterBad = momBadClus.Eta(); | |
3695 | Float_t phiclusterBad = momBadClus.Phi(); | |
3696 | if( phiclusterBad < 0 ) phiclusterBad+=TMath::TwoPi(); | |
3697 | Float_t tofclusterBad = badClusTrig->GetTOF()*1.e9; | |
3698 | Float_t eclusterBad = badClusTrig->E(); | |
3699 | ||
3700 | if( bad && exotic ) | |
afb3af8a | 3701 | { |
0f8098cc | 3702 | if(GetReader()->IsTriggerMatched()) |
3703 | { | |
3704 | fhEtaPhiTriggerEMCALBCBadExoticCluster->Fill(etaclusterBad, phiclusterBad); | |
3705 | fhTimeTriggerEMCALBCBadExoticCluster ->Fill(eclusterBad, tofclusterBad); | |
3706 | } | |
3707 | else | |
3708 | { | |
3709 | fhEtaPhiTriggerEMCALBCUMBadExoticCluster->Fill(etaclusterBad, phiclusterBad); | |
3710 | fhTimeTriggerEMCALBCUMBadExoticCluster ->Fill(eclusterBad, tofclusterBad); | |
3711 | } | |
afb3af8a | 3712 | } |
0f8098cc | 3713 | else if( bad && !exotic ) |
afb3af8a | 3714 | { |
0f8098cc | 3715 | if(GetReader()->IsTriggerMatched()) |
3716 | { | |
3717 | fhEtaPhiTriggerEMCALBCBadCluster->Fill(etaclusterBad, phiclusterBad); | |
3718 | fhTimeTriggerEMCALBCBadCluster ->Fill(eclusterBad, tofclusterBad); | |
3719 | } | |
3720 | else | |
3721 | { | |
3722 | fhEtaPhiTriggerEMCALBCUMBadCluster->Fill(etaclusterBad, phiclusterBad); | |
3723 | fhTimeTriggerEMCALBCUMBadCluster ->Fill(eclusterBad, tofclusterBad); | |
3724 | } | |
3725 | }// Bad cluster trigger | |
3726 | else if( !bad && exotic ) | |
afb3af8a | 3727 | { |
0f8098cc | 3728 | if(GetReader()->IsTriggerMatched()) |
3729 | { | |
3730 | fhEtaPhiTriggerEMCALBCExoticCluster->Fill(etaclusterBad, phiclusterBad); | |
3731 | fhTimeTriggerEMCALBCExoticCluster ->Fill(eclusterBad, tofclusterBad); | |
3732 | } | |
3733 | else | |
3734 | { | |
3735 | fhEtaPhiTriggerEMCALBCUMExoticCluster->Fill(etaclusterBad, phiclusterBad); | |
3736 | fhTimeTriggerEMCALBCUMExoticCluster ->Fill(eclusterBad, tofclusterBad); | |
3737 | } | |
afb3af8a | 3738 | } |
0f8098cc | 3739 | }// cluster exists |
3740 | } // study bad/exotic trigger BC | |
afb3af8a | 3741 | |
6175da48 | 3742 | //Init arrays, variables, get number of clusters |
58ea8ce5 | 3743 | TLorentzVector mom2 ; |
1e86c71e | 3744 | Int_t nCaloClusters = pl->GetEntriesFast(); |
20218aea | 3745 | |
6175da48 | 3746 | if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillAOD() - input %s cluster entries %d\n", fCalorimeter.Data(), nCaloClusters); |
521636d2 | 3747 | |
6175da48 | 3748 | //---------------------------------------------------- |
3749 | // Fill AOD with PHOS/EMCAL AliAODPWG4Particle objects | |
3750 | //---------------------------------------------------- | |
3751 | // Loop on clusters | |
34c16486 | 3752 | for(Int_t icalo = 0; icalo < nCaloClusters; icalo++) |
85c4406e | 3753 | { |
3754 | AliVCluster * calo = (AliVCluster*) (pl->At(icalo)); | |
0ae57829 | 3755 | //printf("calo %d, %f\n",icalo,calo->E()); |
521636d2 | 3756 | |
f8006433 | 3757 | //Get the index where the cluster comes, to retrieve the corresponding vertex |
85c4406e | 3758 | Int_t evtIndex = 0 ; |
3759 | if (GetMixedEvent()) | |
34c16486 | 3760 | { |
85c4406e | 3761 | evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ; |
5025c139 | 3762 | //Get the vertex and check it is not too large in z |
96539743 | 3763 | if(TMath::Abs(GetVertex(evtIndex)[2])> GetZvertexCut()) continue; |
c8fe2783 | 3764 | } |
521636d2 | 3765 | |
85c4406e | 3766 | //Cluster selection, not charged, with photon id and in fiducial cut |
34c16486 | 3767 | if(GetReader()->GetDataType() != AliCaloTrackReader::kMC) |
3768 | { | |
afb3af8a | 3769 | calo->GetMomentum(mom,GetVertex(evtIndex)) ; |
3770 | }//Assume that come from vertex in straight line | |
34c16486 | 3771 | else |
3772 | { | |
f8006433 | 3773 | Double_t vertex[]={0,0,0}; |
3774 | calo->GetMomentum(mom,vertex) ; | |
3775 | } | |
c2a62a94 | 3776 | |
6175da48 | 3777 | //-------------------------------------- |
3778 | // Cluster selection | |
3779 | //-------------------------------------- | |
9e51e29a | 3780 | Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM |
3781 | if(!ClusterSelected(calo,mom,nMaxima)) continue; | |
85c4406e | 3782 | |
6175da48 | 3783 | //---------------------------- |
3784 | //Create AOD for analysis | |
3785 | //---------------------------- | |
3786 | AliAODPWG4Particle aodph = AliAODPWG4Particle(mom); | |
3787 | ||
3788 | //............................................... | |
85c4406e | 3789 | //Set the indeces of the original caloclusters (MC, ID), and calorimeter |
6175da48 | 3790 | Int_t label = calo->GetLabel(); |
3791 | aodph.SetLabel(label); | |
6175da48 | 3792 | aodph.SetCaloLabel(calo->GetID(),-1); |
3793 | aodph.SetDetector(fCalorimeter); | |
c4a7d28a | 3794 | //printf("Index %d, Id %d, iaod %d\n",icalo, calo->GetID(),GetOutputAODBranch()->GetEntriesFast()); |
521636d2 | 3795 | |
6175da48 | 3796 | //............................................... |
3797 | //Set bad channel distance bit | |
c4a7d28a | 3798 | Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel |
f37fa8d2 | 3799 | if (distBad > fMinDist3) aodph.SetDistToBad(2) ; |
85c4406e | 3800 | else if(distBad > fMinDist2) aodph.SetDistToBad(1) ; |
f37fa8d2 | 3801 | else aodph.SetDistToBad(0) ; |
af7b3903 | 3802 | //printf("DistBad %f Bit %d\n",distBad, aodph.DistToBad()); |
c8fe2783 | 3803 | |
8d6b7f60 | 3804 | //-------------------------------------------------------------------------------------- |
3805 | // Play with the MC stack if available | |
3806 | //-------------------------------------------------------------------------------------- | |
3807 | ||
3808 | //Check origin of the candidates | |
3809 | Int_t tag = -1; | |
3810 | ||
34c16486 | 3811 | if(IsDataMC()) |
3812 | { | |
2644ead9 | 3813 | tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader()); |
8d6b7f60 | 3814 | aodph.SetTag(tag); |
3815 | ||
3816 | if(GetDebug() > 0) | |
3817 | printf("AliAnaPhoton::MakeAnalysisFillAOD() - Origin of candidate, bit map %d\n",aodph.GetTag()); | |
85c4406e | 3818 | }//Work with stack also |
3819 | ||
8d6b7f60 | 3820 | |
521636d2 | 3821 | //-------------------------------------------------------------------------------------- |
3822 | //Fill some shower shape histograms before PID is applied | |
3823 | //-------------------------------------------------------------------------------------- | |
3824 | ||
8d6b7f60 | 3825 | FillShowerShapeHistograms(calo,tag); |
6175da48 | 3826 | |
3827 | //------------------------------------- | |
f37fa8d2 | 3828 | //PID selection or bit setting |
6175da48 | 3829 | //------------------------------------- |
49b5c49b | 3830 | |
6175da48 | 3831 | //............................................... |
3832 | // Data, PID check on | |
3c1d9afb | 3833 | if(IsCaloPIDOn()) |
3834 | { | |
49b5c49b | 3835 | // Get most probable PID, 2 options check bayesian PID weights or redo PID |
3836 | // By default, redo PID | |
09273901 | 3837 | |
3c1d9afb | 3838 | aodph.SetIdentifiedParticleType(GetCaloPID()->GetIdentifiedParticleType(calo)); |
477d6cee | 3839 | |
21a4b1c0 | 3840 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PDG of identified particle %d\n",aodph.GetIdentifiedParticleType()); |
477d6cee | 3841 | |
f37fa8d2 | 3842 | //If cluster does not pass pid, not photon, skip it. |
85c4406e | 3843 | if(aodph.GetIdentifiedParticleType() != AliCaloPID::kPhoton) continue ; |
477d6cee | 3844 | |
3845 | } | |
85c4406e | 3846 | |
6175da48 | 3847 | //............................................... |
3848 | // Data, PID check off | |
3c1d9afb | 3849 | else |
3850 | { | |
f37fa8d2 | 3851 | //Set PID bits for later selection (AliAnaPi0 for example) |
49b5c49b | 3852 | //GetIdentifiedParticleType already called in SetPIDBits. |
3853 | ||
3c1d9afb | 3854 | GetCaloPID()->SetPIDBits(calo,&aodph, GetCaloUtils(),GetReader()->GetInputEvent()); |
49b5c49b | 3855 | |
85c4406e | 3856 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PID Bits set \n"); |
477d6cee | 3857 | } |
3858 | ||
3c1d9afb | 3859 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - Photon selection cuts passed: pT %3.2f, pdg %d\n", |
3860 | aodph.Pt(), aodph.GetIdentifiedParticleType()); | |
09273901 | 3861 | |
58ea8ce5 | 3862 | fhClusterCutsE [9]->Fill(calo->E()); |
3863 | fhClusterCutsPt[9]->Fill(mom.Pt()); | |
85c4406e | 3864 | |
6df33fcb | 3865 | Int_t nSM = GetModuleNumber(calo); |
3866 | if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0) | |
3867 | { | |
3868 | fhEPhotonSM ->Fill(mom.E (),nSM); | |
3869 | fhPtPhotonSM->Fill(mom.Pt(),nSM); | |
3870 | } | |
3871 | ||
9e51e29a | 3872 | fhNLocMax->Fill(calo->E(),nMaxima); |
85c4406e | 3873 | |
09273901 | 3874 | // Matching after cuts |
4bfeae64 | 3875 | if(fFillTMHisto) FillTrackMatchingResidualHistograms(calo,1); |
09273901 | 3876 | |
2ad19c3d | 3877 | // Fill histograms to undertand pile-up before other cuts applied |
3878 | // Remember to relax time cuts in the reader | |
fad96885 | 3879 | FillPileUpHistograms(calo->E(),mom.Pt(),calo->GetTOF()*1e9); |
2ad19c3d | 3880 | |
5c46c992 | 3881 | // Add number of local maxima to AOD, method name in AOD to be FIXED |
9e51e29a | 3882 | aodph.SetFiducialArea(nMaxima); |
5c46c992 | 3883 | |
afb3af8a | 3884 | if(fFillEMCALBCHistograms && fCalorimeter=="EMCAL" && idTrig >= 0) |
c2a62a94 | 3885 | { |
3886 | Double_t calotof = calo->GetTOF()*1e9; | |
3887 | Float_t calotofUS = TMath::Abs(calotof); | |
3888 | Float_t phicluster = aodph.Phi(); | |
3889 | if(phicluster < 0) phicluster+=TMath::TwoPi(); | |
3890 | ||
3891 | if(calo->E() > 2) | |
3892 | { | |
3893 | if (calotofUS < 25) fhEtaPhiPhotonEMCALBC0->Fill(aodph.Eta(), phicluster); | |
3894 | else if (calotofUS < 75) fhEtaPhiPhotonEMCALBC1->Fill(aodph.Eta(), phicluster); | |
3895 | else fhEtaPhiPhotonEMCALBCN->Fill(aodph.Eta(), phicluster); | |
3896 | } | |
3897 | ||
afb3af8a | 3898 | Int_t bc = GetReader()->GetTriggerClusterBC(); |
eb86112d | 3899 | Int_t histoBC = bc-5; |
3900 | if(GetReader()->AreBadTriggerEventsRemoved()) histoBC=0; // histograms created only for one BC since the others where rejected | |
afb3af8a | 3901 | if(TMath::Abs(bc) < 6 && !GetReader()->IsBadCellTriggerEvent() && !GetReader()->IsExoticEvent()) |
c2a62a94 | 3902 | { |
afb3af8a | 3903 | if(GetReader()->IsTriggerMatched()) |
3904 | { | |
eb86112d | 3905 | if(calo->E() > 2) fhEtaPhiPhotonTriggerEMCALBC[histoBC]->Fill(aodph.Eta(), phicluster); |
3906 | fhTimePhotonTriggerEMCALBC[histoBC]->Fill(calo->E(), calotof); | |
3907 | if(GetReader()->IsPileUpFromSPD()) fhTimePhotonTriggerEMCALBCPileUpSPD[histoBC]->Fill(calo->E(), calotof); | |
afb3af8a | 3908 | } |
3909 | else | |
3910 | { | |
eb86112d | 3911 | if(calo->E() > 2) fhEtaPhiPhotonTriggerEMCALBCUM[histoBC]->Fill(aodph.Eta(), phicluster); |
3912 | fhTimePhotonTriggerEMCALBCUM[histoBC]->Fill(calo->E(), calotof); | |
126b8c62 | 3913 | |
3914 | if(bc==0) | |
3915 | { | |
3916 | if(GetReader()->IsTriggerMatchedOpenCuts(0)) fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime ->Fill(calo->E(), calotof); | |
3917 | if(GetReader()->IsTriggerMatchedOpenCuts(1)) fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh ->Fill(calo->E(), calotof); | |
3918 | if(GetReader()->IsTriggerMatchedOpenCuts(2)) fhTimePhotonTriggerEMCALBC0UMReMatchBoth ->Fill(calo->E(), calotof); | |
3919 | } | |
afb3af8a | 3920 | } |
c2a62a94 | 3921 | } |
afb3af8a | 3922 | else if(TMath::Abs(bc) >= 6) |
3923 | printf("AliAnaPhoton::MakeAnalysisFillAOD() - Trigger BC not expected = %d\n",bc); | |
c2a62a94 | 3924 | } |
3925 | ||
f37fa8d2 | 3926 | //Add AOD with photon object to aod branch |
477d6cee | 3927 | AddAODParticle(aodph); |
3928 | ||
3929 | }//loop | |
85c4406e | 3930 | |
3931 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() End fill AODs, with %d entries \n",GetOutputAODBranch()->GetEntriesFast()); | |
477d6cee | 3932 | |
1c5acb87 | 3933 | } |
3934 | ||
3935 | //__________________________________________________________________ | |
85c4406e | 3936 | void AliAnaPhoton::MakeAnalysisFillHistograms() |
1c5acb87 | 3937 | { |
6175da48 | 3938 | //Fill histograms |
85c4406e | 3939 | |
f27fe026 | 3940 | //In case of simulated data, fill acceptance histograms |
3941 | if(IsDataMC()) FillAcceptanceHistograms(); | |
3942 | ||
6175da48 | 3943 | // Get vertex |
2244659d | 3944 | Double_t v[3] = {0,0,0}; //vertex ; |
3945 | GetReader()->GetVertex(v); | |
85c4406e | 3946 | //fhVertex->Fill(v[0],v[1],v[2]); |
6175da48 | 3947 | if(TMath::Abs(v[2]) > GetZvertexCut()) return ; // done elsewhere for Single Event analysis, but there for mixed event |
3948 | ||
3949 | //---------------------------------- | |
577d9801 | 3950 | //Loop on stored AOD photons |
3951 | Int_t naod = GetOutputAODBranch()->GetEntriesFast(); | |
577d9801 | 3952 | if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillHistograms() - aod branch entries %d\n", naod); |
521636d2 | 3953 | |
c8710850 | 3954 | Float_t cen = GetEventCentrality(); |
85c4406e | 3955 | // printf("++++++++++ GetEventCentrality() %f\n",cen); |
3956 | ||
c8710850 | 3957 | Float_t ep = GetEventPlaneAngle(); |
3958 | ||
3c1d9afb | 3959 | for(Int_t iaod = 0; iaod < naod ; iaod++) |
3960 | { | |
577d9801 | 3961 | AliAODPWG4Particle* ph = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod)); |
3962 | Int_t pdg = ph->GetIdentifiedParticleType(); | |
521636d2 | 3963 | |
85c4406e | 3964 | if(GetDebug() > 3) |
3965 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - PDG %d, MC TAG %d, Calorimeter %s\n", | |
3c1d9afb | 3966 | ph->GetIdentifiedParticleType(),ph->GetTag(), (ph->GetDetector()).Data()) ; |
521636d2 | 3967 | |
577d9801 | 3968 | //If PID used, fill histos with photons in Calorimeter fCalorimeter |
85c4406e | 3969 | if(IsCaloPIDOn() && pdg != AliCaloPID::kPhoton) continue; |
577d9801 | 3970 | if(ph->GetDetector() != fCalorimeter) continue; |
521636d2 | 3971 | |
85c4406e | 3972 | if(GetDebug() > 2) |
577d9801 | 3973 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - ID Photon: pt %f, phi %f, eta %f\n", ph->Pt(),ph->Phi(),ph->Eta()) ; |
521636d2 | 3974 | |
6175da48 | 3975 | //................................ |
85c4406e | 3976 | //Fill photon histograms |
577d9801 | 3977 | Float_t ptcluster = ph->Pt(); |
3978 | Float_t phicluster = ph->Phi(); | |
3979 | Float_t etacluster = ph->Eta(); | |
3980 | Float_t ecluster = ph->E(); | |
521636d2 | 3981 | |
20218aea | 3982 | fhEPhoton ->Fill(ecluster); |
577d9801 | 3983 | fhPtPhoton ->Fill(ptcluster); |
3984 | fhPhiPhoton ->Fill(ptcluster,phicluster); | |
85c4406e | 3985 | fhEtaPhoton ->Fill(ptcluster,etacluster); |
fad96885 | 3986 | if (ecluster > 0.5) fhEtaPhiPhoton ->Fill(etacluster, phicluster); |
20218aea | 3987 | else if(GetMinPt() < 0.5) fhEtaPhi05Photon->Fill(etacluster, phicluster); |
85c4406e | 3988 | |
c8710850 | 3989 | fhPtCentralityPhoton ->Fill(ptcluster,cen) ; |
3990 | fhPtEventPlanePhoton ->Fill(ptcluster,ep ) ; | |
3991 | ||
5812a064 | 3992 | //Get original cluster, to recover some information |
5812a064 | 3993 | AliVCaloCells* cells = 0; |
85c4406e | 3994 | TObjArray * clusters = 0; |
34c16486 | 3995 | if(fCalorimeter == "EMCAL") |
3996 | { | |
5812a064 | 3997 | cells = GetEMCALCells(); |
3998 | clusters = GetEMCALClusters(); | |
3999 | } | |
34c16486 | 4000 | else |
4001 | { | |
5812a064 | 4002 | cells = GetPHOSCells(); |
4003 | clusters = GetPHOSClusters(); | |
6175da48 | 4004 | } |
20218aea | 4005 | |
5812a064 | 4006 | Int_t iclus = -1; |
85c4406e | 4007 | AliVCluster *cluster = FindCluster(clusters,ph->GetCaloLabel(0),iclus); |
5c46c992 | 4008 | if(cluster) |
4009 | { | |
4301207e | 4010 | Float_t maxCellFraction = 0; |
4011 | Int_t absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster, maxCellFraction); | |
4012 | if( absID < 0 ) AliFatal("Wrong absID"); | |
4013 | ||
06f1b12a | 4014 | // Control histograms |
b2e375c7 | 4015 | fhMaxCellDiffClusterE->Fill(ph->E() ,maxCellFraction); |
4016 | fhNCellsE ->Fill(ph->E() ,cluster->GetNCells()); | |
4017 | fhTimePt ->Fill(ph->Pt(),cluster->GetTOF()*1.e9); | |
4301207e | 4018 | |
5c46c992 | 4019 | if(cells) |
4020 | { | |
85c4406e | 4021 | for(Int_t icell = 0; icell < cluster->GetNCells(); icell++) |
4022 | fhCellsE->Fill(ph->E(),cells->GetCellAmplitude(cluster->GetCellsAbsId()[icell])); | |
5c46c992 | 4023 | } |
06f1b12a | 4024 | } |
5812a064 | 4025 | |
6175da48 | 4026 | //....................................... |
577d9801 | 4027 | //Play with the MC data if available |
34c16486 | 4028 | if(IsDataMC()) |
4029 | { | |
51a0ace5 | 4030 | if(GetDebug()>0) |
4031 | { | |
4032 | if(GetReader()->ReadStack() && !GetMCStack()) | |
4033 | { | |
4034 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Stack not available, is the MC handler called?\n"); | |
4035 | } | |
2644ead9 | 4036 | else if(GetReader()->ReadAODMCParticles() && !GetReader()->GetAODMCParticles()) |
51a0ace5 | 4037 | { |
4038 | printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Standard MCParticles not available!\n"); | |
85c4406e | 4039 | } |
4040 | } | |
f27fe026 | 4041 | |
4c8f7c2e | 4042 | //.................................................................... |
4043 | // Access MC information in stack if requested, check that it exists. | |
4044 | Int_t label =ph->GetLabel(); | |
51a0ace5 | 4045 | |
85c4406e | 4046 | if(label < 0) |
34c16486 | 4047 | { |
4c8f7c2e | 4048 | if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** bad label ***: label %d \n", label); |
4049 | continue; | |
4050 | } | |
4051 | ||
4052 | Float_t eprim = 0; | |
4053 | Float_t ptprim = 0; | |
51a0ace5 | 4054 | Bool_t ok = kFALSE; |
4055 | TLorentzVector primary = GetMCAnalysisUtils()->GetMother(label,GetReader(),ok); | |
4056 | if(ok) | |
34c16486 | 4057 | { |
51a0ace5 | 4058 | eprim = primary.Energy(); |
85c4406e | 4059 | ptprim = primary.Pt(); |
4c8f7c2e | 4060 | } |
4061 | ||
577d9801 | 4062 | Int_t tag =ph->GetTag(); |
51a0ace5 | 4063 | Int_t mcParticleTag = -1; |
c5693f62 | 4064 | if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) && fhMCE[kmcPhoton]) |
3d5d5078 | 4065 | { |
8e81c2cf | 4066 | fhMCE [kmcPhoton] ->Fill(ecluster); |
4067 | fhMCPt [kmcPhoton] ->Fill(ptcluster); | |
4068 | fhMCPhi[kmcPhoton] ->Fill(ecluster,phicluster); | |
4069 | fhMCEta[kmcPhoton] ->Fill(ecluster,etacluster); | |
4070 | ||
4071 | fhMC2E [kmcPhoton] ->Fill(ecluster, eprim); | |
85c4406e | 4072 | fhMC2Pt [kmcPhoton] ->Fill(ptcluster, ptprim); |
8e81c2cf | 4073 | fhMCDeltaE [kmcPhoton] ->Fill(ecluster,eprim-ecluster); |
85c4406e | 4074 | fhMCDeltaPt[kmcPhoton] ->Fill(ptcluster,ptprim-ptcluster); |
8e81c2cf | 4075 | |
85c4406e | 4076 | if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) && |
764ab1f4 | 4077 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) && |
4078 | fhMCE[kmcConversion]) | |
3d5d5078 | 4079 | { |
8e81c2cf | 4080 | fhMCE [kmcConversion] ->Fill(ecluster); |
4081 | fhMCPt [kmcConversion] ->Fill(ptcluster); | |
4082 | fhMCPhi[kmcConversion] ->Fill(ecluster,phicluster); | |
4083 | fhMCEta[kmcConversion] ->Fill(ecluster,etacluster); | |
4084 | ||
4085 | fhMC2E [kmcConversion] ->Fill(ecluster, eprim); | |
85c4406e | 4086 | fhMC2Pt [kmcConversion] ->Fill(ptcluster, ptprim); |
8e81c2cf | 4087 | fhMCDeltaE [kmcConversion] ->Fill(ecluster,eprim-ecluster); |
85c4406e | 4088 | fhMCDeltaPt[kmcConversion] ->Fill(ptcluster,ptprim-ptcluster); |
4089 | } | |
3d5d5078 | 4090 | |
fde324ab | 4091 | if (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt)) |
34c16486 | 4092 | { |
51a0ace5 | 4093 | mcParticleTag = kmcPrompt; |
3d5d5078 | 4094 | } |
fde324ab | 4095 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)) |
3d5d5078 | 4096 | { |
51a0ace5 | 4097 | mcParticleTag = kmcFragmentation; |
3d5d5078 | 4098 | } |
c5693f62 | 4099 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR)&& fhMCE[kmcISR]) |
3d5d5078 | 4100 | { |
85c4406e | 4101 | mcParticleTag = kmcISR; |
3d5d5078 | 4102 | } |
85c4406e | 4103 | else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) && |
fde324ab | 4104 | !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0)) |
3d5d5078 | 4105 | { |
51a0ace5 | 4106 | mcParticleTag = kmcPi0Decay; |
3d5d5078 | 4107 | } |
85c4406e | 4108 | else if((( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) && |
4109 | !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) || | |
fde324ab | 4110 | GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay) )) |
3d5d5078 | 4111 | { |
51a0ace5 | 4112 | mcParticleTag = kmcOtherDecay; |
3d5d5078 | 4113 | } |
fde324ab | 4114 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0)) |
3d5d5078 | 4115 | { |
85c4406e | 4116 | mcParticleTag = kmcPi0; |
4117 | } | |
fde324ab | 4118 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta)) |
f66d95af | 4119 | { |
51a0ace5 | 4120 | mcParticleTag = kmcEta; |
85c4406e | 4121 | } |
3d5d5078 | 4122 | } |
fde324ab | 4123 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron)) |
3d5d5078 | 4124 | { |
51a0ace5 | 4125 | mcParticleTag = kmcAntiNeutron; |
3d5d5078 | 4126 | } |
fde324ab | 4127 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton)) |
3d5d5078 | 4128 | { |
85c4406e | 4129 | mcParticleTag = kmcAntiProton; |
4130 | } | |
fde324ab | 4131 | else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron)) |
3d5d5078 | 4132 | { |
85c4406e | 4133 | mcParticleTag = kmcElectron; |
4134 | } | |
34c16486 | 4135 | else if( fhMCE[kmcOther]) |
4136 | { | |
51a0ace5 | 4137 | mcParticleTag = kmcOther; |
4c8f7c2e | 4138 | |
f8006433 | 4139 | // printf(" AliAnaPhoton::MakeAnalysisFillHistograms() - Label %d, pT %2.3f Unknown, bits set: ", |
4140 | // ph->GetLabel(),ph->Pt()); | |
4141 | // for(Int_t i = 0; i < 20; i++) { | |
4142 | // if(GetMCAnalysisUtils()->CheckTagBit(tag,i)) printf(" %d, ",i); | |
4143 | // } | |
4144 | // printf("\n"); | |
4145 | ||
577d9801 | 4146 | } |
521636d2 | 4147 | |
fde324ab | 4148 | if(mcParticleTag >= 0 && fhMCE [mcParticleTag]) |
4149 | { | |
4150 | fhMCE [mcParticleTag]->Fill(ecluster); | |
4151 | fhMCPt [mcParticleTag]->Fill(ptcluster); | |
4152 | fhMCPhi[mcParticleTag]->Fill(ecluster,phicluster); | |
4153 | fhMCEta[mcParticleTag]->Fill(ecluster,etacluster); | |
4154 | ||
4155 | fhMC2E [mcParticleTag]->Fill(ecluster, eprim); | |
4156 | fhMC2Pt [mcParticleTag]->Fill(ptcluster, ptprim); | |
4157 | fhMCDeltaE [mcParticleTag]->Fill(ecluster,eprim-ecluster); | |
4158 | fhMCDeltaPt[mcParticleTag]->Fill(ptcluster,ptprim-ptcluster); | |
4159 | } | |
577d9801 | 4160 | }//Histograms with MC |
521636d2 | 4161 | |
577d9801 | 4162 | }// aod loop |
521636d2 | 4163 | |
1c5acb87 | 4164 | } |
4165 | ||
4166 | ||
4167 | //__________________________________________________________________ | |
4168 | void AliAnaPhoton::Print(const Option_t * opt) const | |
4169 | { | |
477d6cee | 4170 | //Print some relevant parameters set for the analysis |
4171 | ||
4172 | if(! opt) | |
4173 | return; | |
4174 | ||
4175 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; | |
745913ae | 4176 | AliAnaCaloTrackCorrBaseClass::Print(" "); |
85c4406e | 4177 | |
477d6cee | 4178 | printf("Calorimeter = %s\n", fCalorimeter.Data()) ; |
4179 | printf("Min Distance to Bad Channel = %2.1f\n",fMinDist); | |
4180 | printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2); | |
4181 | printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3); | |
a3aebfff | 4182 | printf("Reject clusters with a track matched = %d\n",fRejectTrackMatch); |
4cf55759 | 4183 | printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax); |
2ac125bf | 4184 | printf("Number of cells in cluster is > %d \n", fNCellsCut); |
477d6cee | 4185 | printf(" \n") ; |
1c5acb87 | 4186 | |
85c4406e | 4187 | } |