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