change axis title style to italics
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / AliAnaPhoton.cxx
CommitLineData
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
53ClassImp(AliAnaPhoton)
521636d2 54
85c4406e 55//____________________________
56AliAnaPhoton::AliAnaPhoton() :
57AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""),
58fMinDist(0.), fMinDist2(0.), fMinDist3(0.),
59fRejectTrackMatch(0), fFillTMHisto(kFALSE),
60fTimeCutMin(-10000), fTimeCutMax(10000),
61fNCellsCut(0),
62fNLMCutMin(-1), fNLMCutMax(10),
63fFillSSHistograms(kFALSE), fFillOnlySimpleSSHisto(1),
64fNOriginHistograms(8), fNPrimaryHistograms(4),
65fFillPileUpHistograms(0), fFillEMCALBCHistograms(0),
66// Histograms
67fhNCellsE(0), fhCellsE(0), // Control histograms
b2e375c7 68fhMaxCellDiffClusterE(0), fhTimePt(0), // Control histograms
85c4406e 69fhEtaPhi(0), fhEtaPhiEMCALBC0(0),
70fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0),
126b8c62 71fhTimeTriggerEMCALBCCluster(0),
72fhTimeTriggerEMCALBCUMCluster(0),
85c4406e 73fhEtaPhiTriggerEMCALBCClusterOverTh(0),
74fhEtaPhiTriggerEMCALBCUMClusterOverTh(0),
75fhEtaPhiTriggerEMCALBCClusterBelowTh1(0),
76fhEtaPhiTriggerEMCALBCUMClusterBelowTh1(0),
77fhEtaPhiTriggerEMCALBCClusterBelowTh2(0),
78fhEtaPhiTriggerEMCALBCUMClusterBelowTh2(0),
79fhEtaPhiTriggerEMCALBCExotic(0), fhTimeTriggerEMCALBCExotic(0),
80fhEtaPhiTriggerEMCALBCUMExotic(0), fhTimeTriggerEMCALBCUMExotic(0),
81fhEtaPhiTriggerEMCALBCBad(0), fhTimeTriggerEMCALBCBad(0),
82fhEtaPhiTriggerEMCALBCUMBad(0), fhTimeTriggerEMCALBCUMBad(0),
83fhEtaPhiTriggerEMCALBCBadExotic(0), fhTimeTriggerEMCALBCBadExotic(0),
84fhEtaPhiTriggerEMCALBCUMBadExotic(0), fhTimeTriggerEMCALBCUMBadExotic(0),
85fhEtaPhiTriggerEMCALBCExoticCluster(0), fhTimeTriggerEMCALBCExoticCluster(0),
86fhEtaPhiTriggerEMCALBCUMExoticCluster(0), fhTimeTriggerEMCALBCUMExoticCluster(0),
87fhEtaPhiTriggerEMCALBCBadCluster(0), fhTimeTriggerEMCALBCBadCluster(0),
88fhEtaPhiTriggerEMCALBCUMBadCluster(0), fhTimeTriggerEMCALBCUMBadCluster(0),
89fhEtaPhiTriggerEMCALBCBadExoticCluster(0), fhTimeTriggerEMCALBCBadExoticCluster(0),
90fhEtaPhiTriggerEMCALBCUMBadExoticCluster(0), fhTimeTriggerEMCALBCUMBadExoticCluster(0),
91fhTimeTriggerEMCALBCBadMaxCell(0), fhTimeTriggerEMCALBCUMBadMaxCell(0),
92fhTimeTriggerEMCALBCBadMaxCellExotic(0), fhTimeTriggerEMCALBCUMBadMaxCellExotic(0),
126b8c62 93fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster (0), fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster(0),
94fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster(0),fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster(0),
95fhEtaPhiTriggerEMCALBCUMReMatchBothCluster(0), fhTimeTriggerEMCALBCUMReMatchBothCluster(0),
96fhTimeTriggerEMCALBC0UMReMatchOpenTime(0),
97fhTimeTriggerEMCALBC0UMReMatchCheckNeigh(0),
98fhTimeTriggerEMCALBC0UMReMatchBoth(0),
99
85c4406e 100fhEtaPhiNoTrigger(0), fhTimeNoTrigger(0),
101
102fhEPhoton(0), fhPtPhoton(0),
103fhPhiPhoton(0), fhEtaPhoton(0),
104fhEtaPhiPhoton(0), fhEtaPhi05Photon(0),
105fhEtaPhiPhotonEMCALBC0(0), fhEtaPhiPhotonEMCALBC1(0), fhEtaPhiPhotonEMCALBCN(0),
126b8c62 106fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime(0),
107fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh(0),
108fhTimePhotonTriggerEMCALBC0UMReMatchBoth(0),
109
85c4406e 110fhPtCentralityPhoton(0), fhPtEventPlanePhoton(0),
111
112// Shower shape histograms
113fhNLocMax(0),
114fhDispE(0), fhLam0E(0), fhLam1E(0),
115fhDispETRD(0), fhLam0ETRD(0), fhLam1ETRD(0),
116fhDispETM(0), fhLam0ETM(0), fhLam1ETM(0),
117fhDispETMTRD(0), fhLam0ETMTRD(0), fhLam1ETMTRD(0),
118
119fhNCellsLam0LowE(0), fhNCellsLam1LowE(0), fhNCellsDispLowE(0),
120fhNCellsLam0HighE(0), fhNCellsLam1HighE(0), fhNCellsDispHighE(0),
121
122fhEtaLam0LowE(0), fhPhiLam0LowE(0),
123fhEtaLam0HighE(0), fhPhiLam0HighE(0),
124fhLam0DispLowE(0), fhLam0DispHighE(0),
125fhLam1Lam0LowE(0), fhLam1Lam0HighE(0),
126fhDispLam1LowE(0), fhDispLam1HighE(0),
127fhDispEtaE(0), fhDispPhiE(0),
128fhSumEtaE(0), fhSumPhiE(0), fhSumEtaPhiE(0),
129fhDispEtaPhiDiffE(0), fhSphericityE(0),
130fhDispSumEtaDiffE(0), fhDispSumPhiDiffE(0),
131
132// MC histograms
133fhMCPhotonELambda0NoOverlap(0), fhMCPhotonELambda0TwoOverlap(0), fhMCPhotonELambda0NOverlap(0),
134// Embedding
135fhEmbeddedSignalFractionEnergy(0),
136fhEmbedPhotonELambda0FullSignal(0), fhEmbedPhotonELambda0MostlySignal(0),
137fhEmbedPhotonELambda0MostlyBkg(0), fhEmbedPhotonELambda0FullBkg(0),
138fhEmbedPi0ELambda0FullSignal(0), fhEmbedPi0ELambda0MostlySignal(0),
139fhEmbedPi0ELambda0MostlyBkg(0), fhEmbedPi0ELambda0FullBkg(0),
140// PileUp
b2e375c7 141fhTimePtNoCut(0), fhTimePtSPD(0),
142fhTimePtPhotonNoCut(0), fhTimePtPhotonSPD(0),
85c4406e 143fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
144fhTimeNPileUpVertContributors(0),
145fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0),
146fhClusterMultSPDPileUp(), fhClusterMultNoPileUp(),
147fhEtaPhiBC0(0), fhEtaPhiBCPlus(0), fhEtaPhiBCMinus(0),
148fhEtaPhiBC0PileUpSPD(0),
149fhEtaPhiBCPlusPileUpSPD(0), fhEtaPhiBCMinusPileUpSPD(0),
150fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0),
151fhPtNPileUpSPDVtxTimeCut(0), fhPtNPileUpTrkVtxTimeCut(0),
152fhPtNPileUpSPDVtxTimeCut2(0), fhPtNPileUpTrkVtxTimeCut2(0),
153fhPtPhotonNPileUpSPDVtx(0), fhPtPhotonNPileUpTrkVtx(0),
154fhPtPhotonNPileUpSPDVtxTimeCut(0), fhPtPhotonNPileUpTrkVtxTimeCut(0),
6df33fcb 155fhPtPhotonNPileUpSPDVtxTimeCut2(0), fhPtPhotonNPileUpTrkVtxTimeCut2(0),
156fhEClusterSM(0), fhEPhotonSM(0),
157fhPtClusterSM(0), fhPtPhotonSM(0)
85c4406e 158{
1c5acb87 159 //default ctor
160
4bfeae64 161 for(Int_t i = 0; i < 14; i++)
162 {
4c8f7c2e 163 fhMCPt [i] = 0;
164 fhMCE [i] = 0;
165 fhMCPhi [i] = 0;
166 fhMCEta [i] = 0;
85c4406e 167 fhMCDeltaE [i] = 0;
4c8f7c2e 168 fhMCDeltaPt[i] = 0;
85c4406e 169 fhMC2E [i] = 0;
4c8f7c2e 170 fhMC2Pt [i] = 0;
521636d2 171 }
172
4bfeae64 173 for(Int_t i = 0; i < 7; i++)
174 {
3d5d5078 175 fhPtPrimMC [i] = 0;
176 fhEPrimMC [i] = 0;
177 fhPhiPrimMC[i] = 0;
4cf13296 178 fhEtaPrimMC[i] = 0;
3d5d5078 179 fhYPrimMC [i] = 0;
180
181 fhPtPrimMCAcc [i] = 0;
182 fhEPrimMCAcc [i] = 0;
183 fhPhiPrimMCAcc[i] = 0;
4cf13296 184 fhEtaPrimMCAcc[i] = 0;
3d5d5078 185 fhYPrimMCAcc [i] = 0;
d2655d46 186
187 fhDispEtaDispPhi[i] = 0;
188 fhLambda0DispPhi[i] = 0;
189 fhLambda0DispEta[i] = 0;
5e5e056f 190
fad96885 191 fhPtPileUp [i] = 0;
192 fhPtChargedPileUp[i] = 0;
193 fhPtPhotonPileUp [i] = 0;
85c4406e 194
fad96885 195 fhLambda0PileUp [i] = 0;
196 fhLambda0ChargedPileUp[i] = 0;
5e5e056f 197
650d1938 198 fhClusterEFracLongTimePileUp [i] = 0;
199
126b8c62 200 fhClusterCellTimePileUp [i] = 0;
fad96885 201 fhClusterTimeDiffPileUp [i] = 0;
202 fhClusterTimeDiffChargedPileUp[i] = 0;
203 fhClusterTimeDiffPhotonPileUp [i] = 0;
85c4406e 204
d2655d46 205 for(Int_t j = 0; j < 6; j++)
206 {
207 fhMCDispEtaDispPhi[i][j] = 0;
208 fhMCLambda0DispEta[i][j] = 0;
209 fhMCLambda0DispPhi[i][j] = 0;
210 }
85c4406e 211 }
3d5d5078 212
4bfeae64 213 for(Int_t i = 0; i < 6; i++)
214 {
f66d95af 215 fhMCELambda0 [i] = 0;
216 fhMCELambda1 [i] = 0;
217 fhMCEDispersion [i] = 0;
85c4406e 218 fhMCNCellsE [i] = 0;
219 fhMCMaxCellDiffClusterE[i] = 0;
bfdcf7fb 220 fhLambda0DispEta[i] = 0;
221 fhLambda0DispPhi[i] = 0;
85c4406e 222
f66d95af 223 fhMCLambda0vsClusterMaxCellDiffE0[i] = 0;
224 fhMCLambda0vsClusterMaxCellDiffE2[i] = 0;
225 fhMCLambda0vsClusterMaxCellDiffE6[i] = 0;
226 fhMCNCellsvsClusterMaxCellDiffE0 [i] = 0;
227 fhMCNCellsvsClusterMaxCellDiffE2 [i] = 0;
228 fhMCNCellsvsClusterMaxCellDiffE6 [i] = 0;
34c16486 229
230 fhMCEDispEta [i] = 0;
231 fhMCEDispPhi [i] = 0;
232 fhMCESumEtaPhi [i] = 0;
233 fhMCEDispEtaPhiDiff[i] = 0;
234 fhMCESphericity [i] = 0;
521636d2 235 }
236
85c4406e 237 for(Int_t i = 0; i < 5; i++)
238 {
239 fhClusterCuts[i] = 0;
240 }
241
242 // Track matching residuals
243 for(Int_t i = 0; i < 2; i++)
244 {
126b8c62 245 fhTrackMatchedDEta [i] = 0; fhTrackMatchedDPhi [i] = 0; fhTrackMatchedDEtaDPhi [i] = 0;
246 fhTrackMatchedDEtaNeg[i] = 0; fhTrackMatchedDPhiNeg[i] = 0; fhTrackMatchedDEtaDPhiNeg[i] = 0;
247 fhTrackMatchedDEtaPos[i] = 0; fhTrackMatchedDPhiPos[i] = 0; fhTrackMatchedDEtaDPhiPos[i] = 0;
85c4406e 248 fhTrackMatchedDEtaTRD[i] = 0; fhTrackMatchedDPhiTRD[i] = 0;
249 fhTrackMatchedDEtaMCOverlap[i] = 0; fhTrackMatchedDPhiMCOverlap[i] = 0;
250 fhTrackMatchedDEtaMCNoOverlap[i] = 0; fhTrackMatchedDPhiMCNoOverlap[i] = 0;
251 fhTrackMatchedDEtaMCConversion[i] = 0; fhTrackMatchedDPhiMCConversion[i] = 0;
252 fhTrackMatchedMCParticle[i] = 0; fhTrackMatchedMCParticle[i] = 0;
253 fhdEdx[i] = 0; fhEOverP[i] = 0;
254 fhEOverPTRD[i] = 0;
255 }
256
257 for(Int_t i = 0; i < 4; i++)
258 {
259 fhClusterMultSPDPileUp[i] = 0;
260 fhClusterMultNoPileUp [i] = 0;
261 }
262
263 for(Int_t i = 0; i < 11; i++)
264 {
265 fhEtaPhiTriggerEMCALBC [i] = 0 ;
266 fhTimeTriggerEMCALBC [i] = 0 ;
267 fhEtaPhiTriggerEMCALBCUM [i] = 0 ;
268 fhTimeTriggerEMCALBCUM [i] = 0 ;
269
270 fhEtaPhiPhotonTriggerEMCALBC [i] = 0 ;
271 fhTimePhotonTriggerEMCALBC [i] = 0 ;
272 fhEtaPhiPhotonTriggerEMCALBCUM [i] = 0 ;
273 fhTimePhotonTriggerEMCALBCUM [i] = 0 ;
274
275 fhTimePhotonTriggerEMCALBCPileUpSPD[i] = 0 ;
276 fhTimeTriggerEMCALBCPileUpSPD [i] = 0 ;
277
278 fhEtaPhiTriggerEMCALBCCluster [i] = 0 ;
126b8c62 279 fhEtaPhiTriggerEMCALBCUMCluster [i] = 0 ;
85c4406e 280 }
281
1c5acb87 282 //Initialize parameters
283 InitParameters();
85c4406e 284
1c5acb87 285}
286
b2e375c7 287//_________________________________________________________________________________________
85c4406e 288Bool_t AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int_t nMaxima)
c4a7d28a 289{
290 //Select clusters if they pass different cuts
fad96885 291
c2a62a94 292 Float_t ptcluster = mom.Pt();
293 Float_t ecluster = mom.E();
294 Float_t l0cluster = calo->GetM02();
295 Float_t etacluster = mom.Eta();
296 Float_t phicluster = mom.Phi();
6df33fcb 297 if(phicluster < 0) phicluster+=TMath::TwoPi();
c2a62a94 298 Float_t tofcluster = calo->GetTOF()*1.e9;
c2a62a94 299
b2e375c7 300 Bool_t matched = IsTrackMatched(calo,GetReader()->GetInputEvent());
fad96885 301
302 if(GetDebug() > 2)
afb3af8a 303 printf("AliAnaPhoton::ClusterSelected() - Current Event %d; Before selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n",
c4a7d28a 304 GetReader()->GetEventNumber(),
c2a62a94 305 ecluster,ptcluster, phicluster*TMath::RadToDeg(),etacluster);
fad96885 306
307 fhClusterCuts[1]->Fill(ecluster);
c4a7d28a 308
c2a62a94 309 if(ecluster > 0.5) fhEtaPhi->Fill(etacluster, phicluster);
310
6df33fcb 311 Int_t nSM = GetModuleNumber(calo);
312 if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0)
313 {
314 fhEClusterSM ->Fill(ecluster ,nSM);
315 fhPtClusterSM->Fill(ptcluster,nSM);
316 }
317
b2e375c7 318 FillEMCALTriggerClusterBCHistograms(calo->GetID(),ecluster,tofcluster,etacluster,phicluster);
c2a62a94 319
c4a7d28a 320 //.......................................
321 //If too small or big energy, skip it
afb3af8a 322 if(ecluster < GetMinEnergy() || ecluster > GetMaxEnergy() ) return kFALSE ;
09273901 323
c4a7d28a 324 if(GetDebug() > 2) printf("\t Cluster %d Pass E Cut \n",calo->GetID());
09273901 325
fad96885 326 fhClusterCuts[2]->Fill(ecluster);
85c4406e 327
126b8c62 328 FillClusterPileUpHistograms(calo,matched,ptcluster,etacluster,phicluster,l0cluster);
fad96885 329
c4a7d28a 330 //.......................................
331 // TOF cut, BE CAREFUL WITH THIS CUT
332 Double_t tof = calo->GetTOF()*1e9;
333 if(tof < fTimeCutMin || tof > fTimeCutMax) return kFALSE;
09273901 334
c4a7d28a 335 if(GetDebug() > 2) printf("\t Cluster %d Pass Time Cut \n",calo->GetID());
09273901 336
fad96885 337 fhClusterCuts[3]->Fill(ecluster);
85c4406e 338
c4a7d28a 339 //.......................................
340 if(calo->GetNCells() <= fNCellsCut && GetReader()->GetDataType() != AliCaloTrackReader::kMC) return kFALSE;
09273901 341
c4a7d28a 342 if(GetDebug() > 2) printf("\t Cluster %d Pass NCell Cut \n",calo->GetID());
09273901 343
fad96885 344 fhClusterCuts[4]->Fill(ecluster);
85c4406e 345
9e51e29a 346 if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax) return kFALSE ;
347 if(GetDebug() > 2) printf(" \t Cluster %d pass NLM %d of out of range \n",calo->GetID(), nMaxima);
85c4406e 348
fad96885 349 fhClusterCuts[5]->Fill(ecluster);
85c4406e 350
c4a7d28a 351 //.......................................
352 //Check acceptance selection
34c16486 353 if(IsFiducialCutOn())
354 {
c4a7d28a 355 Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ;
356 if(! in ) return kFALSE ;
357 }
09273901 358
6df33fcb 359 if(GetDebug() > 2) printf("\t Fiducial cut passed \n");
09273901 360
fad96885 361 fhClusterCuts[6]->Fill(ecluster);
85c4406e 362
c4a7d28a 363 //.......................................
364 //Skip matched clusters with tracks
09273901 365
4bfeae64 366 // Fill matching residual histograms before PID cuts
367 if(fFillTMHisto) FillTrackMatchingResidualHistograms(calo,0);
09273901 368
34c16486 369 if(fRejectTrackMatch)
370 {
b2e375c7 371 if(matched)
34c16486 372 {
c4a7d28a 373 if(GetDebug() > 2) printf("\t Reject track-matched clusters\n");
374 return kFALSE ;
375 }
85c4406e 376 else
c4a7d28a 377 if(GetDebug() > 2) printf(" Track-matching cut passed \n");
378 }// reject matched clusters
09273901 379
fad96885 380 fhClusterCuts[7]->Fill(ecluster);
85c4406e 381
fad96885 382 if(fFillPileUpHistograms)
383 {
384 if(GetReader()->IsPileUpFromSPD()) {fhPtChargedPileUp[0]->Fill(ptcluster); fhLambda0ChargedPileUp[0]->Fill(ecluster,l0cluster); }
385 if(GetReader()->IsPileUpFromEMCal()) {fhPtChargedPileUp[1]->Fill(ptcluster); fhLambda0ChargedPileUp[1]->Fill(ecluster,l0cluster); }
386 if(GetReader()->IsPileUpFromSPDOrEMCal()) {fhPtChargedPileUp[2]->Fill(ptcluster); fhLambda0ChargedPileUp[2]->Fill(ecluster,l0cluster); }
387 if(GetReader()->IsPileUpFromSPDAndEMCal()) {fhPtChargedPileUp[3]->Fill(ptcluster); fhLambda0ChargedPileUp[3]->Fill(ecluster,l0cluster); }
388 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) {fhPtChargedPileUp[4]->Fill(ptcluster); fhLambda0ChargedPileUp[4]->Fill(ecluster,l0cluster); }
389 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) {fhPtChargedPileUp[5]->Fill(ptcluster); fhLambda0ChargedPileUp[5]->Fill(ecluster,l0cluster); }
390 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) {fhPtChargedPileUp[6]->Fill(ptcluster); fhLambda0ChargedPileUp[6]->Fill(ecluster,l0cluster); }
391 }
392
c4a7d28a 393 //.......................................
394 //Check Distance to Bad channel, set bit.
395 Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
396 if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
85c4406e 397 if(distBad < fMinDist)
34c16486 398 {//In bad channel (PHOS cristal size 2.2x2.2 cm), EMCAL ( cell units )
c4a7d28a 399 return kFALSE ;
400 }
401 else if(GetDebug() > 2) printf("\t Bad channel cut passed %4.2f > %2.2f \n",distBad, fMinDist);
fc195fd0 402
fad96885 403 fhClusterCuts[8]->Fill(ecluster);
09273901 404
85c4406e 405 if(GetDebug() > 0)
fad96885 406 printf("AliAnaPhoton::ClusterSelected() Current Event %d; After selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n",
85c4406e 407 GetReader()->GetEventNumber(),
fad96885 408 ecluster, ptcluster,mom.Phi()*TMath::RadToDeg(),mom.Eta());
c4a7d28a 409
410 //All checks passed, cluster selected
411 return kTRUE;
85c4406e 412
c4a7d28a 413}
414
34c16486 415//___________________________________________
416void AliAnaPhoton::FillAcceptanceHistograms()
417{
3d5d5078 418 //Fill acceptance histograms if MC data is available
419
34c16486 420 Double_t photonY = -100 ;
421 Double_t photonE = -1 ;
422 Double_t photonPt = -1 ;
423 Double_t photonPhi = 100 ;
424 Double_t photonEta = -1 ;
85c4406e 425
34c16486 426 Int_t pdg = 0 ;
427 Int_t tag = 0 ;
428 Int_t mcIndex = 0 ;
429 Bool_t inacceptance = kFALSE;
85c4406e 430
34c16486 431 if(GetReader()->ReadStack())
85c4406e 432 {
3d5d5078 433 AliStack * stack = GetMCStack();
34c16486 434 if(stack)
435 {
436 for(Int_t i=0 ; i<stack->GetNtrack(); i++)
437 {
667a3592 438 if(GetReader()->AcceptOnlyHIJINGLabels() && !GetReader()->IsHIJINGLabel(i)) continue ;
439
3d5d5078 440 TParticle * prim = stack->Particle(i) ;
34c16486 441 pdg = prim->GetPdgCode();
3d5d5078 442 //printf("i %d, %s %d %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(),
443 // prim->GetName(), prim->GetPdgCode());
444
34c16486 445 if(pdg == 22)
446 {
3d5d5078 447 // Get tag of this particle photon from fragmentation, decay, prompt ...
2644ead9 448 tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader());
34c16486 449 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
450 {
3d5d5078 451 //A conversion photon from a hadron, skip this kind of photon
34c16486 452 // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n ");
453 // GetMCAnalysisUtils()->PrintMCTag(tag);
3d5d5078 454
455 return;
456 }
457
458 //Get photon kinematics
85c4406e 459 if(prim->Energy() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception
3d5d5078 460
34c16486 461 photonY = 0.5*TMath::Log((prim->Energy()-prim->Pz())/(prim->Energy()+prim->Pz())) ;
462 photonE = prim->Energy() ;
463 photonPt = prim->Pt() ;
464 photonPhi = TMath::RadToDeg()*prim->Phi() ;
3d5d5078 465 if(photonPhi < 0) photonPhi+=TMath::TwoPi();
34c16486 466 photonEta = prim->Eta() ;
3d5d5078 467
468 //Check if photons hit the Calorimeter
469 TLorentzVector lv;
470 prim->Momentum(lv);
34c16486 471 inacceptance = kFALSE;
472 if (fCalorimeter == "PHOS")
473 {
474 if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet())
475 {
3d5d5078 476 Int_t mod ;
477 Double_t x,z ;
85c4406e 478 if(GetPHOSGeometry()->ImpactOnEmc(prim,mod,z,x))
3d5d5078 479 inacceptance = kTRUE;
480 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
481 }
34c16486 482 else
483 {
85c4406e 484 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
3d5d5078 485 inacceptance = kTRUE ;
486 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
487 }
85c4406e 488 }
34c16486 489 else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet())
490 {
491 if(GetEMCALGeometry())
492 {
3d5d5078 493 Int_t absID=0;
494
495 GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID);
496
85c4406e 497 if( absID >= 0)
3d5d5078 498 inacceptance = kTRUE;
499
85c4406e 500 // if(GetEMCALGeometry()->Impact(phot1) && GetEMCALGeometry()->Impact(phot2))
3d5d5078 501 // inacceptance = kTRUE;
502 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
503 }
34c16486 504 else
505 {
85c4406e 506 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
3d5d5078 507 inacceptance = kTRUE ;
508 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
509 }
510 } //In EMCAL
511
512 //Fill histograms
c5693f62 513 fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ;
3d5d5078 514 if(TMath::Abs(photonY) < 1.0)
515 {
c5693f62 516 fhEPrimMC [kmcPPhoton]->Fill(photonE ) ;
517 fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ;
518 fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ;
4cf13296 519 fhEtaPrimMC[kmcPPhoton]->Fill(photonE , photonEta) ;
3d5d5078 520 }
34c16486 521 if(inacceptance)
522 {
523 fhEPrimMCAcc [kmcPPhoton]->Fill(photonE ) ;
524 fhPtPrimMCAcc [kmcPPhoton]->Fill(photonPt) ;
c5693f62 525 fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ;
4cf13296 526 fhEtaPrimMCAcc[kmcPPhoton]->Fill(photonE , photonEta) ;
34c16486 527 fhYPrimMCAcc [kmcPPhoton]->Fill(photonE , photonY) ;
3d5d5078 528 }//Accepted
529
530 //Origin of photon
c5693f62 531 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[kmcPPrompt])
3d5d5078 532 {
34c16486 533 mcIndex = kmcPPrompt;
3d5d5078 534 }
c5693f62 535 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[kmcPFragmentation])
3d5d5078 536 {
34c16486 537 mcIndex = kmcPFragmentation ;
3d5d5078 538 }
c5693f62 539 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[kmcPISR])
3d5d5078 540 {
34c16486 541 mcIndex = kmcPISR;
3d5d5078 542 }
c5693f62 543 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[kmcPPi0Decay])
3d5d5078 544 {
34c16486 545 mcIndex = kmcPPi0Decay;
3d5d5078 546 }
85c4406e 547 else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
c5693f62 548 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[kmcPOtherDecay])
3d5d5078 549 {
34c16486 550 mcIndex = kmcPOtherDecay;
3d5d5078 551 }
c5693f62 552 else if(fhEPrimMC[kmcPOther])
3d5d5078 553 {
34c16486 554 mcIndex = kmcPOther;
3d5d5078 555 }//Other origin
34c16486 556
557 fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ;
558 if(TMath::Abs(photonY) < 1.0)
559 {
560 fhEPrimMC [mcIndex]->Fill(photonE ) ;
561 fhPtPrimMC [mcIndex]->Fill(photonPt) ;
562 fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ;
4cf13296 563 fhEtaPrimMC[mcIndex]->Fill(photonE , photonEta) ;
34c16486 564 }
4cf13296 565
34c16486 566 if(inacceptance)
567 {
568 fhEPrimMCAcc [mcIndex]->Fill(photonE ) ;
569 fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ;
570 fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ;
4cf13296 571 fhEtaPrimMCAcc[mcIndex]->Fill(photonE , photonEta) ;
34c16486 572 fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ;
573 }//Accepted
574
85c4406e 575 }// Primary photon
576 }//loop on primaries
3d5d5078 577 }//stack exists and data is MC
578 }//read stack
34c16486 579 else if(GetReader()->ReadAODMCParticles())
580 {
2644ead9 581 TClonesArray * mcparticles = GetReader()->GetAODMCParticles();
34c16486 582 if(mcparticles)
583 {
3d5d5078 584 Int_t nprim = mcparticles->GetEntriesFast();
585
586 for(Int_t i=0; i < nprim; i++)
587 {
667a3592 588 if(GetReader()->AcceptOnlyHIJINGLabels() && !GetReader()->IsHIJINGLabel(i)) continue ;
589
85c4406e 590 AliAODMCParticle * prim = (AliAODMCParticle *) mcparticles->At(i);
3d5d5078 591
34c16486 592 pdg = prim->GetPdgCode();
3d5d5078 593
34c16486 594 if(pdg == 22)
595 {
3d5d5078 596 // Get tag of this particle photon from fragmentation, decay, prompt ...
2644ead9 597 tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader());
34c16486 598 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
599 {
3d5d5078 600 //A conversion photon from a hadron, skip this kind of photon
34c16486 601 // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n ");
602 // GetMCAnalysisUtils()->PrintMCTag(tag);
3d5d5078 603
604 return;
605 }
606
607 //Get photon kinematics
85c4406e 608 if(prim->E() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception
3d5d5078 609
34c16486 610 photonY = 0.5*TMath::Log((prim->E()-prim->Pz())/(prim->E()+prim->Pz())) ;
611 photonE = prim->E() ;
612 photonPt = prim->Pt() ;
03734799 613 photonPhi = prim->Phi() ;
3d5d5078 614 if(photonPhi < 0) photonPhi+=TMath::TwoPi();
34c16486 615 photonEta = prim->Eta() ;
3d5d5078 616
617 //Check if photons hit the Calorimeter
618 TLorentzVector lv;
619 lv.SetPxPyPzE(prim->Px(),prim->Py(),prim->Pz(),prim->E());
34c16486 620 inacceptance = kFALSE;
621 if (fCalorimeter == "PHOS")
622 {
623 if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet())
624 {
3d5d5078 625 Int_t mod ;
626 Double_t x,z ;
627 Double_t vtx[]={prim->Xv(),prim->Yv(),prim->Zv()};
628 if(GetPHOSGeometry()->ImpactOnEmc(vtx, prim->Theta(),prim->Phi(),mod,z,x))
629 inacceptance = kTRUE;
630 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
631 }
34c16486 632 else
633 {
85c4406e 634 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
3d5d5078 635 inacceptance = kTRUE ;
636 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
637 }
85c4406e 638 }
34c16486 639 else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet())
640 {
641 if(GetEMCALGeometry())
642 {
3d5d5078 643 Int_t absID=0;
644
645 GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID);
646
85c4406e 647 if( absID >= 0)
3d5d5078 648 inacceptance = kTRUE;
649
650 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
651 }
34c16486 652 else
653 {
85c4406e 654 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
3d5d5078 655 inacceptance = kTRUE ;
656 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
657 }
658 } //In EMCAL
659
660 //Fill histograms
661
c5693f62 662 fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ;
3d5d5078 663 if(TMath::Abs(photonY) < 1.0)
664 {
c5693f62 665 fhEPrimMC [kmcPPhoton]->Fill(photonE ) ;
666 fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ;
667 fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ;
4cf13296 668 fhEtaPrimMC[kmcPPhoton]->Fill(photonE , photonEta) ;
3d5d5078 669 }
34c16486 670
671 if(inacceptance)
672 {
c5693f62 673 fhEPrimMCAcc[kmcPPhoton] ->Fill(photonE ) ;
674 fhPtPrimMCAcc[kmcPPhoton] ->Fill(photonPt) ;
675 fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ;
4cf13296 676 fhEtaPrimMCAcc[kmcPPhoton]->Fill(photonE , photonEta) ;
c5693f62 677 fhYPrimMCAcc[kmcPPhoton] ->Fill(photonE , photonY) ;
3d5d5078 678 }//Accepted
679
3d5d5078 680 //Origin of photon
c5693f62 681 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[kmcPPrompt])
3d5d5078 682 {
34c16486 683 mcIndex = kmcPPrompt;
3d5d5078 684 }
34c16486 685 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[kmcPFragmentation])
3d5d5078 686 {
34c16486 687 mcIndex = kmcPFragmentation ;
3d5d5078 688 }
c5693f62 689 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[kmcPISR])
3d5d5078 690 {
34c16486 691 mcIndex = kmcPISR;
3d5d5078 692 }
c5693f62 693 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[kmcPPi0Decay])
3d5d5078 694 {
34c16486 695 mcIndex = kmcPPi0Decay;
3d5d5078 696 }
85c4406e 697 else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
34c16486 698 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[kmcPOtherDecay])
3d5d5078 699 {
34c16486 700 mcIndex = kmcPOtherDecay;
3d5d5078 701 }
c5693f62 702 else if(fhEPrimMC[kmcPOther])
3d5d5078 703 {
34c16486 704 mcIndex = kmcPOther;
3d5d5078 705 }//Other origin
34c16486 706
707 fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ;
708 if(TMath::Abs(photonY) < 1.0)
709 {
710 fhEPrimMC [mcIndex]->Fill(photonE ) ;
711 fhPtPrimMC [mcIndex]->Fill(photonPt) ;
712 fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ;
4cf13296 713 fhEtaPrimMC[mcIndex]->Fill(photonE , photonEta) ;
34c16486 714 }
715 if(inacceptance)
716 {
717 fhEPrimMCAcc [mcIndex]->Fill(photonE ) ;
718 fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ;
719 fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ;
4cf13296 720 fhEtaPrimMCAcc[mcIndex]->Fill(photonE , photonEta) ;
34c16486 721 fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ;
722 }//Accepted
85c4406e 723
724 }// Primary photon
725 }//loop on primaries
3d5d5078 726
c5693f62 727 }//kmc array exists and data is MC
3d5d5078 728 } // read AOD MC
729}
521636d2 730
b94e038e 731//________________________________________________________________________________________________________________
732void AliAnaPhoton::FillEMCALTriggerClusterBCHistograms(Int_t idcalo, Float_t ecluster, Float_t tofcluster,
733 Float_t etacluster, Float_t phicluster)
b2e375c7 734
735{
736 // Fill trigger related histograms
737
738 if(!fFillEMCALBCHistograms || fCalorimeter!="EMCAL") return ;
739
740 Float_t tofclusterUS = TMath::Abs(tofcluster);
741
742 if(ecluster > 2)
743 {
744 if (tofclusterUS < 25) fhEtaPhiEMCALBC0->Fill(etacluster, phicluster);
745 else if (tofclusterUS < 75) fhEtaPhiEMCALBC1->Fill(etacluster, phicluster);
746 else fhEtaPhiEMCALBCN->Fill(etacluster, phicluster);
747 }
748
749 Int_t bc = GetReader()->GetTriggerClusterBC();
750 Int_t id = GetReader()->GetTriggerClusterId();
751 Bool_t badMax = GetReader()->IsBadMaxCellTriggerEvent();
752
eb86112d 753 Int_t histoBC = bc+5;
754 if(GetReader()->AreBadTriggerEventsRemoved()) histoBC=0; // histograms created only for one BC since the others where rejected
755
b2e375c7 756 if(id==-2)
757 {
758 //printf("AliAnaPhoton::ClusterSelected() - No trigger found bc=%d\n",bc);
759 fhEtaPhiNoTrigger->Fill(etacluster, phicluster);
760 fhTimeNoTrigger ->Fill(ecluster, tofcluster);
761 }
762 else if(TMath::Abs(bc) < 6)
763 {
764 if(!GetReader()->IsBadCellTriggerEvent() && !GetReader()->IsExoticEvent() )
765 {
766 if(GetReader()->IsTriggerMatched())
767 {
eb86112d 768 if(ecluster > 2) fhEtaPhiTriggerEMCALBC[histoBC]->Fill(etacluster, phicluster);
769 fhTimeTriggerEMCALBC[histoBC]->Fill(ecluster, tofcluster);
770 if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[histoBC]->Fill(ecluster, tofcluster);
b2e375c7 771
772 if(idcalo == GetReader()->GetTriggerClusterId())
773 {
eb86112d 774 fhEtaPhiTriggerEMCALBCCluster[histoBC]->Fill(etacluster, phicluster);
126b8c62 775 fhTimeTriggerEMCALBCCluster ->Fill(ecluster, tofcluster);
b2e375c7 776
777 if(bc==0)
778 {
93c2e459 779 Float_t threshold = GetReader()->GetEventTriggerL1Threshold() ;
780 if(GetReader()->IsEventEMCALL0()) threshold = GetReader()->GetEventTriggerL0Threshold() ;
781
b2e375c7 782 if(ecluster > threshold)
783 fhEtaPhiTriggerEMCALBCClusterOverTh->Fill(etacluster, phicluster);
784 else if(ecluster > threshold-1)
785 fhEtaPhiTriggerEMCALBCClusterBelowTh1->Fill(etacluster, phicluster);
786 else
787 fhEtaPhiTriggerEMCALBCClusterBelowTh2->Fill(etacluster, phicluster);
788 }
789 }
790 }
791 else
792 {
eb86112d 793 if(ecluster > 2) fhEtaPhiTriggerEMCALBCUM[histoBC]->Fill(etacluster, phicluster);
794 fhTimeTriggerEMCALBCUM[histoBC]->Fill(ecluster, tofcluster);
b2e375c7 795
126b8c62 796 if(bc==0)
797 {
798 if(GetReader()->IsTriggerMatchedOpenCuts(0)) fhTimeTriggerEMCALBC0UMReMatchOpenTime ->Fill(ecluster, tofcluster);
799 if(GetReader()->IsTriggerMatchedOpenCuts(1)) fhTimeTriggerEMCALBC0UMReMatchCheckNeigh ->Fill(ecluster, tofcluster);
800 if(GetReader()->IsTriggerMatchedOpenCuts(2)) fhTimeTriggerEMCALBC0UMReMatchBoth ->Fill(ecluster, tofcluster);
801 }
802
b2e375c7 803 if(idcalo == GetReader()->GetTriggerClusterId())
804 {
eb86112d 805 fhEtaPhiTriggerEMCALBCUMCluster[histoBC]->Fill(etacluster, phicluster);
126b8c62 806 fhTimeTriggerEMCALBCUMCluster->Fill(ecluster, tofcluster);
b2e375c7 807 if(bc==0)
808 {
93c2e459 809 Float_t threshold = GetReader()->GetEventTriggerL1Threshold() ;
810 if(GetReader()->IsEventEMCALL0()) threshold = GetReader()->GetEventTriggerL0Threshold() ;
811
b2e375c7 812 if(ecluster > threshold)
813 fhEtaPhiTriggerEMCALBCUMClusterOverTh->Fill(etacluster, phicluster);
814 else if(ecluster > threshold-1)
815 fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->Fill(etacluster, phicluster);
816 else
817 fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->Fill(etacluster, phicluster);
818
819 if(GetReader()->IsTriggerMatchedOpenCuts(0))
820 {
126b8c62 821 fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster->Fill(etacluster, phicluster);
822 fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster ->Fill(ecluster, tofcluster);
b2e375c7 823 }
824 if(GetReader()->IsTriggerMatchedOpenCuts(1))
825 {
126b8c62 826 fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster->Fill(etacluster, phicluster);
827 fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster ->Fill(ecluster, tofcluster);
b2e375c7 828 }
829 if(GetReader()->IsTriggerMatchedOpenCuts(2))
830 {
126b8c62 831 fhEtaPhiTriggerEMCALBCUMReMatchBothCluster->Fill(etacluster, phicluster);
832 fhTimeTriggerEMCALBCUMReMatchBothCluster ->Fill(ecluster, tofcluster);
b2e375c7 833 }
834
835 }
836 }
837 }
838 }// neither bad nor exotic
839 else if(GetReader()->IsBadCellTriggerEvent() && GetReader()->IsExoticEvent())
840 {
841 if(GetReader()->IsTriggerMatched())
842 {
843 if(ecluster > 2) fhEtaPhiTriggerEMCALBCBadExotic->Fill(etacluster, phicluster);
844 fhTimeTriggerEMCALBCBadExotic->Fill(ecluster, tofcluster);
845 if(badMax) fhTimeTriggerEMCALBCBadMaxCellExotic->Fill(ecluster, tofcluster);
846 }
847 else
848 {
849 if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMBadExotic->Fill(etacluster, phicluster);
850 fhTimeTriggerEMCALBCUMBadExotic->Fill(ecluster, tofcluster);
851 if(badMax) fhTimeTriggerEMCALBCUMBadMaxCellExotic->Fill(ecluster, tofcluster);
852
853 }
854 }// Bad and exotic cluster trigger
855 else if(GetReader()->IsBadCellTriggerEvent() )
856 {
857 if(GetReader()->IsTriggerMatched())
858 {
859 if(ecluster > 2) fhEtaPhiTriggerEMCALBCBad->Fill(etacluster, phicluster);
860 fhTimeTriggerEMCALBCBad->Fill(ecluster, tofcluster);
861 if(badMax) fhTimeTriggerEMCALBCBadMaxCell->Fill(ecluster, tofcluster);
862 }
863 else
864 {
865 if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMBad->Fill(etacluster, phicluster);
866 fhTimeTriggerEMCALBCUMBad->Fill(ecluster, tofcluster);
867 if(badMax) fhTimeTriggerEMCALBCUMBadMaxCell->Fill(ecluster, tofcluster);
868 }
869 }// Bad cluster trigger
870 else if(GetReader()->IsExoticEvent() )
871 {
872 if(GetReader()->IsTriggerMatched())
873 {
874 if(ecluster > 2) fhEtaPhiTriggerEMCALBCExotic->Fill(etacluster, phicluster);
875 fhTimeTriggerEMCALBCExotic->Fill(ecluster, tofcluster);
876 }
877 else
878 {
879 if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMExotic->Fill(etacluster, phicluster);
880 fhTimeTriggerEMCALBCUMExotic->Fill(ecluster, tofcluster);
881 }
882 }
883 }
884 else if(TMath::Abs(bc) >= 6)
885 printf("AliAnaPhoton::ClusterSelected() - Trigger BC not expected = %d\n",bc);
886
887}
888
b94e038e 889//_________________________________________________________________________________________________________
890void AliAnaPhoton::FillClusterPileUpHistograms(AliVCluster * calo, Bool_t matched, Float_t ptcluster,
891 Float_t etacluster, Float_t phicluster, Float_t l0cluster)
b2e375c7 892{
893 // Fill some histograms related to pile up before any cluster cut is applied
894
895 if(!fFillPileUpHistograms) return ;
896
897 // Get the fraction of the cluster energy that carries the cell with highest energy and its absId
898 AliVCaloCells* cells = 0;
899 if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
900 else cells = GetPHOSCells();
901
902 Float_t maxCellFraction = 0.;
903 Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, calo,maxCellFraction);
904
905 Double_t tmax = cells->GetCellTime(absIdMax);
906 GetCaloUtils()->RecalibrateCellTime(tmax, fCalorimeter, absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
907 tmax*=1.e9;
908
909 Bool_t okPhoton = kFALSE;
910 if( GetCaloPID()->GetIdentifiedParticleType(calo)== AliCaloPID::kPhoton) okPhoton = kTRUE;
911
912 Float_t clusterLongTimePt = 0;
913 Float_t clusterOKTimePt = 0;
126b8c62 914
915 //Loop on cells inside cluster, max cell must be over 100 MeV and time in BC=0
916 if(cells->GetCellAmplitude(absIdMax) > 0.1 && TMath::Abs(tmax) < 30)
b2e375c7 917 {
126b8c62 918 for (Int_t ipos = 0; ipos < calo->GetNCells(); ipos++)
b2e375c7 919 {
126b8c62 920 Int_t absId = calo->GetCellsAbsId()[ipos];
921
922 if( absId == absIdMax ) continue ;
923
b2e375c7 924 Double_t time = cells->GetCellTime(absId);
925 Float_t amp = cells->GetCellAmplitude(absId);
926 Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
927 GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,time,cells);
928 time*=1e9;
929
930 Float_t diff = (tmax-time);
931
932 if(GetReader()->IsInTimeWindow(time,amp)) clusterOKTimePt += amp;
933 else clusterLongTimePt += amp;
934
36769d30 935 if( cells->GetCellAmplitude(absIdMax) < 0.1 ) continue ;
126b8c62 936
b2e375c7 937 if(GetReader()->IsPileUpFromSPD())
938 {
126b8c62 939 fhClusterCellTimePileUp[0]->Fill(ptcluster, time);
940 fhClusterTimeDiffPileUp[0]->Fill(ptcluster, diff);
b2e375c7 941 if(!matched)
942 {
126b8c62 943 fhClusterTimeDiffChargedPileUp[0]->Fill(ptcluster, diff);
944 if(okPhoton) fhClusterTimeDiffPhotonPileUp[0]->Fill(ptcluster, diff);
b2e375c7 945 }
946 }
947
948 if(GetReader()->IsPileUpFromEMCal())
949 {
126b8c62 950 fhClusterCellTimePileUp[1]->Fill(ptcluster, time);
951 fhClusterTimeDiffPileUp[1]->Fill(ptcluster, diff);
b2e375c7 952 if(!matched)
953 {
126b8c62 954 fhClusterTimeDiffChargedPileUp[1]->Fill(ptcluster, diff);
955 if(okPhoton) fhClusterTimeDiffPhotonPileUp[1]->Fill(ptcluster, diff);
b2e375c7 956 }
957 }
958
959 if(GetReader()->IsPileUpFromSPDOrEMCal())
960 {
126b8c62 961 fhClusterCellTimePileUp[2]->Fill(ptcluster, time);
962 fhClusterTimeDiffPileUp[2]->Fill(ptcluster, diff);
b2e375c7 963 if(!matched)
964 {
126b8c62 965 fhClusterTimeDiffChargedPileUp[2]->Fill(ptcluster, diff);
966 if(okPhoton) fhClusterTimeDiffPhotonPileUp[2]->Fill(ptcluster, diff);
b2e375c7 967 }
968 }
969
970 if(GetReader()->IsPileUpFromSPDAndEMCal())
971 {
126b8c62 972 fhClusterCellTimePileUp[3]->Fill(ptcluster, time);
973 fhClusterTimeDiffPileUp[3]->Fill(ptcluster, diff);
b2e375c7 974 if(!matched)
975 {
126b8c62 976 fhClusterTimeDiffChargedPileUp[3]->Fill(ptcluster, diff);
977 if(okPhoton) fhClusterTimeDiffPhotonPileUp[3]->Fill(ptcluster, diff);
b2e375c7 978 }
979 }
980
981 if(GetReader()->IsPileUpFromSPDAndNotEMCal())
982 {
126b8c62 983 fhClusterCellTimePileUp[4]->Fill(ptcluster, time);
984 fhClusterTimeDiffPileUp[4]->Fill(ptcluster, diff);
b2e375c7 985 if(!matched)
986 {
126b8c62 987 fhClusterTimeDiffChargedPileUp[4]->Fill(ptcluster, diff);
988 if(okPhoton) fhClusterTimeDiffPhotonPileUp[4]->Fill(ptcluster, diff);
b2e375c7 989 }
990 }
991
992 if(GetReader()->IsPileUpFromEMCalAndNotSPD())
993 {
126b8c62 994 fhClusterCellTimePileUp[5]->Fill(ptcluster, time);
995 fhClusterTimeDiffPileUp[5]->Fill(ptcluster, diff);
b2e375c7 996 if(!matched)
997 {
126b8c62 998 fhClusterTimeDiffChargedPileUp[5]->Fill(ptcluster, diff);
999 if(okPhoton) fhClusterTimeDiffPhotonPileUp[5]->Fill(ptcluster, diff);
b2e375c7 1000 }
1001 }
1002
1003 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal())
1004 {
126b8c62 1005 fhClusterCellTimePileUp[6]->Fill(ptcluster, time);
1006 fhClusterTimeDiffPileUp[6]->Fill(ptcluster, diff);
b2e375c7 1007 if(!matched)
1008 {
126b8c62 1009 fhClusterTimeDiffChargedPileUp[6]->Fill(ptcluster, diff);
1010 if(okPhoton) fhClusterTimeDiffPhotonPileUp[6]->Fill(ptcluster, diff);
b2e375c7 1011 }
1012 }
126b8c62 1013 }//loop
1014
1015
1016 Float_t frac = 0;
1017 if(clusterLongTimePt+clusterOKTimePt > 0.001)
1018 frac = clusterLongTimePt/(clusterLongTimePt+clusterOKTimePt);
1019 //printf("E long %f, E OK %f, Fraction large time %f, E %f\n",clusterLongTimePt,clusterOKTimePt,frac,ptcluster);
1020
1021 if(GetReader()->IsPileUpFromSPD()) {fhPtPileUp[0]->Fill(ptcluster); fhLambda0PileUp[0]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[0]->Fill(ptcluster,frac);}
1022 if(GetReader()->IsPileUpFromEMCal()) {fhPtPileUp[1]->Fill(ptcluster); fhLambda0PileUp[1]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[1]->Fill(ptcluster,frac);}
1023 if(GetReader()->IsPileUpFromSPDOrEMCal()) {fhPtPileUp[2]->Fill(ptcluster); fhLambda0PileUp[2]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[2]->Fill(ptcluster,frac);}
1024 if(GetReader()->IsPileUpFromSPDAndEMCal()) {fhPtPileUp[3]->Fill(ptcluster); fhLambda0PileUp[3]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[3]->Fill(ptcluster,frac);}
1025 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) {fhPtPileUp[4]->Fill(ptcluster); fhLambda0PileUp[4]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[4]->Fill(ptcluster,frac);}
1026 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) {fhPtPileUp[5]->Fill(ptcluster); fhLambda0PileUp[5]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[5]->Fill(ptcluster,frac);}
1027 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) {fhPtPileUp[6]->Fill(ptcluster); fhLambda0PileUp[6]->Fill(ptcluster,l0cluster); fhClusterEFracLongTimePileUp[6]->Fill(ptcluster,frac);}
1028
1029 fhEtaPhiBC0->Fill(etacluster,phicluster);
1030 if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBC0PileUpSPD ->Fill(etacluster,phicluster);
1031 }
b2e375c7 1032
b2e375c7 1033 else if (tmax > 25) {fhEtaPhiBCPlus ->Fill(etacluster,phicluster); if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBCPlusPileUpSPD ->Fill(etacluster,phicluster); }
1034 else if (tmax <-25) {fhEtaPhiBCMinus->Fill(etacluster,phicluster); if(GetReader()->IsPileUpFromSPD()) fhEtaPhiBCMinusPileUpSPD->Fill(etacluster,phicluster); }
1035}
1036
1037//_______________________________________________
85c4406e 1038void AliAnaPhoton::FillPileUpHistogramsPerEvent()
acd56ca4 1039{
1040 // Fill some histograms per event to understand pile-up
6227a9fd 1041 // Open the time cut in the reader to be more meaningful
1042
acd56ca4 1043 if(!fFillPileUpHistograms) return;
85c4406e 1044
0f7e7205 1045 AliVEvent * event = GetReader()->GetInputEvent();
1046
1047 AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
1048 AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
1049
1050 // N pile up vertices
1051 Int_t nVtxSPD = -1;
1052 Int_t nVtxTrk = -1;
1053 TLorentzVector mom;
1054
1055 if (esdEv)
1056 {
1057 nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
1058 nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
1059 }//ESD
1060 else if (aodEv)
1061 {
1062 nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
1063 nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
85c4406e 1064 }//AOD
0f7e7205 1065
1066
85c4406e 1067 // Get the appropriate list of clusters
0f7e7205 1068 TClonesArray * clusterList = 0;
1069 TString clusterListName = GetReader()->GetEMCALClusterListName();
1070 if (event->FindListObject(clusterListName))
1071 clusterList = dynamic_cast<TClonesArray*> (event->FindListObject(clusterListName));
1072 else if(GetReader()->GetOutputEvent())
1073 clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(clusterListName));
1074
1075 // Loop on clusters, get the maximum energy cluster as reference
85c4406e 1076 Int_t nclusters = 0;
0f7e7205 1077 if(clusterList) nclusters = clusterList->GetEntriesFast();
1078 else nclusters = event->GetNumberOfCaloClusters();
1079
85c4406e 1080 Int_t idMax = 0;
acd56ca4 1081 Float_t eMax = 0;
85c4406e 1082 Float_t tMax = 0;
acd56ca4 1083 for(Int_t iclus = 0; iclus < nclusters ; iclus++)
1084 {
0f7e7205 1085 AliVCluster * clus = 0;
85c4406e 1086 if(clusterList) clus = (AliVCluster*) (clusterList->At(iclus));
0f7e7205 1087 else clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus);
1088
1089 if(!clus) continue;
1090
1091 if(!clus->IsEMCAL()) continue;
1092
1093 Float_t tof = clus->GetTOF()*1e9;
b2e375c7 1094 if(clus->E() > eMax && TMath::Abs(tof) < 30)
acd56ca4 1095 {
1096 eMax = clus->E();
0f7e7205 1097 tMax = tof;
acd56ca4 1098 idMax = iclus;
1099 }
0f7e7205 1100
1101 clus->GetMomentum(mom,GetVertex(0));
1102 Float_t pt = mom.Pt();
1103
85c4406e 1104 fhPtNPileUpSPDVtx->Fill(pt,nVtxSPD);
0f7e7205 1105 fhPtNPileUpTrkVtx->Fill(pt,nVtxTrk);
85c4406e 1106
b2e375c7 1107 if(TMath::Abs(tof) < 30)
85c4406e 1108 {
1109 fhPtNPileUpSPDVtxTimeCut->Fill(pt,nVtxSPD);
1110 fhPtNPileUpTrkVtxTimeCut->Fill(pt,nVtxTrk);
0f7e7205 1111 }
85c4406e 1112
b2e375c7 1113 if(tof < 75 && tof > -30)
85c4406e 1114 {
1115 fhPtNPileUpSPDVtxTimeCut2->Fill(pt,nVtxSPD);
1116 fhPtNPileUpTrkVtxTimeCut2->Fill(pt,nVtxTrk);
1117 }
1118
b2e375c7 1119 fhTimePtNoCut->Fill(pt,tof);
1120 if(GetReader()->IsPileUpFromSPD()) fhTimePtSPD->Fill(pt,tof);
1121
acd56ca4 1122 }
0f7e7205 1123
6227a9fd 1124 if(eMax < 5) return;
acd56ca4 1125
1126 // Loop again on clusters to compare this max cluster t and the rest of the clusters, if E > 0.3
1127 Int_t n20 = 0;
1128 Int_t n40 = 0;
1129 Int_t n = 0;
1130 Int_t nOK = 0;
85c4406e 1131
acd56ca4 1132 for(Int_t iclus = 0; iclus < nclusters ; iclus++)
1133 {
0f7e7205 1134 AliVCluster * clus = 0;
85c4406e 1135 if(clusterList) clus = (AliVCluster*) (clusterList->At(iclus));
0f7e7205 1136 else clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus);
1137
1138 if(!clus) continue;
1139
1140 if(!clus->IsEMCAL()) continue;
acd56ca4 1141
1142 if(clus->E() < 0.3 || iclus==idMax) continue;
1143
1144 Float_t tdiff = TMath::Abs(tMax-clus->GetTOF()*1e9);
1145 n++;
0f7e7205 1146 if(tdiff < 25) nOK++;
acd56ca4 1147 else
1148 {
1149 n20++;
1150 if(tdiff > 40 ) n40++;
1151 }
1152 }
1153
1154 // Check pile-up and fill histograms depending on the different cluster multiplicities
1155 if(GetReader()->IsPileUpFromSPD())
85c4406e 1156 {
acd56ca4 1157 fhClusterMultSPDPileUp[0]->Fill(eMax,n );
1158 fhClusterMultSPDPileUp[1]->Fill(eMax,nOK);
1159 fhClusterMultSPDPileUp[2]->Fill(eMax,n20);
1160 fhClusterMultSPDPileUp[3]->Fill(eMax,n40);
1161 }
85c4406e 1162 else
acd56ca4 1163 {
1164 fhClusterMultNoPileUp[0]->Fill(eMax,n );
1165 fhClusterMultNoPileUp[1]->Fill(eMax,nOK);
1166 fhClusterMultNoPileUp[2]->Fill(eMax,n20);
85c4406e 1167 fhClusterMultNoPileUp[3]->Fill(eMax,n40);
1168 }
acd56ca4 1169
1170}
1171
1172
fad96885 1173//_________________________________________________________________________________________________
22ad7981 1174void AliAnaPhoton::FillPileUpHistograms(Float_t energy, Float_t pt, Float_t time)
2ad19c3d 1175{
1176 // Fill some histograms to understand pile-up
1177 if(!fFillPileUpHistograms) return;
1178
1179 //printf("E %f, time %f\n",energy,time);
1180 AliVEvent * event = GetReader()->GetInputEvent();
1181
fad96885 1182 if(GetReader()->IsPileUpFromSPD()) fhPtPhotonPileUp[0]->Fill(pt);
1183 if(GetReader()->IsPileUpFromEMCal()) fhPtPhotonPileUp[1]->Fill(pt);
1184 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPhotonPileUp[2]->Fill(pt);
1185 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPhotonPileUp[3]->Fill(pt);
1186 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPhotonPileUp[4]->Fill(pt);
1187 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPhotonPileUp[5]->Fill(pt);
1188 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPhotonPileUp[6]->Fill(pt);
1189
b2e375c7 1190 fhTimePtPhotonNoCut->Fill(pt,time);
1191 if(GetReader()->IsPileUpFromSPD()) fhTimePtPhotonSPD->Fill(pt,time);
2ad19c3d 1192
de101942 1193 if(energy < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold
2ad19c3d 1194
1195 AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
1196 AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
1197
1198 // N pile up vertices
0f7e7205 1199 Int_t nVtxSPD = -1;
1200 Int_t nVtxTrk = -1;
2ad19c3d 1201
1202 if (esdEv)
1203 {
0f7e7205 1204 nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
1205 nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
85c4406e 1206
2ad19c3d 1207 }//ESD
1208 else if (aodEv)
1209 {
0f7e7205 1210 nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
1211 nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
2ad19c3d 1212 }//AOD
1213
0f7e7205 1214 fhTimeNPileUpVertSPD ->Fill(time,nVtxSPD);
1215 fhTimeNPileUpVertTrack->Fill(time,nVtxTrk);
2ad19c3d 1216
85c4406e 1217 fhPtPhotonNPileUpSPDVtx->Fill(pt,nVtxSPD);
0f7e7205 1218 fhPtPhotonNPileUpTrkVtx->Fill(pt,nVtxTrk);
1219
1220 if(TMath::Abs(time) < 25)
85c4406e 1221 {
1222 fhPtPhotonNPileUpSPDVtxTimeCut->Fill(pt,nVtxSPD);
1223 fhPtPhotonNPileUpTrkVtxTimeCut->Fill(pt,nVtxTrk);
0f7e7205 1224 }
1225
85c4406e 1226 if(time < 75 && time > -25)
1227 {
1228 fhPtPhotonNPileUpSPDVtxTimeCut2->Fill(pt,nVtxSPD);
1229 fhPtPhotonNPileUpTrkVtxTimeCut2->Fill(pt,nVtxTrk);
1230 }
1231
1232 //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n",
0f7e7205 1233 // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVtxSPD,nVtxTrk);
2ad19c3d 1234
1235 Int_t ncont = -1;
5559f30a 1236 Float_t z1 = -1, z2 = -1;
2ad19c3d 1237 Float_t diamZ = -1;
0f7e7205 1238 for(Int_t iVert=0; iVert<nVtxSPD;iVert++)
2ad19c3d 1239 {
1240 if (esdEv)
1241 {
1242 const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert);
1243 ncont=pv->GetNContributors();
1244 z1 = esdEv->GetPrimaryVertexSPD()->GetZ();
1245 z2 = pv->GetZ();
1246 diamZ = esdEv->GetDiamondZ();
1247 }//ESD
1248 else if (aodEv)
1249 {
1250 AliAODVertex *pv=aodEv->GetVertex(iVert);
1251 if(pv->GetType()!=AliAODVertex::kPileupSPD) continue;
1252 ncont=pv->GetNContributors();
1253 z1=aodEv->GetPrimaryVertexSPD()->GetZ();
1254 z2=pv->GetZ();
1255 diamZ = aodEv->GetDiamondZ();
1256 }// AOD
1257
1258 Double_t distZ = TMath::Abs(z2-z1);
1259 diamZ = TMath::Abs(z2-diamZ);
85c4406e 1260
2ad19c3d 1261 fhTimeNPileUpVertContributors ->Fill(time,ncont);
1262 fhTimePileUpMainVertexZDistance->Fill(time,distZ);
1263 fhTimePileUpMainVertexZDiamond ->Fill(time,diamZ);
85c4406e 1264
2ad19c3d 1265 }// loop
1266}
1267
34c16486 1268//____________________________________________________________________________________
22ad7981 1269void AliAnaPhoton::FillShowerShapeHistograms(AliVCluster* cluster, Int_t mcTag)
34c16486 1270{
85c4406e 1271 //Fill cluster Shower Shape histograms
521636d2 1272
1273 if(!fFillSSHistograms || GetMixedEvent()) return;
85c4406e 1274
521636d2 1275 Float_t energy = cluster->E();
1276 Int_t ncells = cluster->GetNCells();
521636d2 1277 Float_t lambda0 = cluster->GetM02();
1278 Float_t lambda1 = cluster->GetM20();
1279 Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
1280
1281 TLorentzVector mom;
34c16486 1282 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
1283 {
1284 cluster->GetMomentum(mom,GetVertex(0)) ;
1285 }//Assume that come from vertex in straight line
1286 else
1287 {
521636d2 1288 Double_t vertex[]={0,0,0};
1289 cluster->GetMomentum(mom,vertex) ;
1290 }
1291
1292 Float_t eta = mom.Eta();
1293 Float_t phi = mom.Phi();
1294 if(phi < 0) phi+=TMath::TwoPi();
1295
1296 fhLam0E ->Fill(energy,lambda0);
1297 fhLam1E ->Fill(energy,lambda1);
1298 fhDispE ->Fill(energy,disp);
85c4406e 1299
34c16486 1300 if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5)
1301 {
521636d2 1302 fhLam0ETRD->Fill(energy,lambda0);
1303 fhLam1ETRD->Fill(energy,lambda1);
1304 fhDispETRD->Fill(energy,disp);
521636d2 1305 }
1306
34c16486 1307 Float_t l0 = 0., l1 = 0.;
85c4406e 1308 Float_t dispp= 0., dEta = 0., dPhi = 0.;
1309 Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
764ab1f4 1310 if(fCalorimeter == "EMCAL" && !fFillOnlySimpleSSHisto)
34c16486 1311 {
1312 GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), GetReader()->GetInputEvent()->GetEMCALCells(), cluster,
1313 l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi);
1314 //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",
1315 // l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi );
1316 //printf("AliAnaPhoton::FillShowerShapeHistogram - dispersion %f, dispersion eta+phi %f \n",
1317 // disp, dPhi+dEta );
1318 fhDispEtaE -> Fill(energy,dEta);
1319 fhDispPhiE -> Fill(energy,dPhi);
1320 fhSumEtaE -> Fill(energy,sEta);
1321 fhSumPhiE -> Fill(energy,sPhi);
1322 fhSumEtaPhiE -> Fill(energy,sEtaPhi);
1323 fhDispEtaPhiDiffE -> Fill(energy,dPhi-dEta);
1324 if(dEta+dPhi>0)fhSphericityE -> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
1325 if(dEta+sEta>0)fhDispSumEtaDiffE -> Fill(energy,(dEta-sEta)/((dEta+sEta)/2.));
85c4406e 1326 if(dPhi+sPhi>0)fhDispSumPhiDiffE -> Fill(energy,(dPhi-sPhi)/((dPhi+sPhi)/2.));
34c16486 1327
bfdcf7fb 1328 Int_t ebin = -1;
1329 if (energy < 2 ) ebin = 0;
1330 else if (energy < 4 ) ebin = 1;
1331 else if (energy < 6 ) ebin = 2;
1332 else if (energy < 10) ebin = 3;
85c4406e 1333 else if (energy < 15) ebin = 4;
1334 else if (energy < 20) ebin = 5;
1335 else ebin = 6;
bfdcf7fb 1336
1337 fhDispEtaDispPhi[ebin]->Fill(dEta ,dPhi);
1338 fhLambda0DispEta[ebin]->Fill(lambda0,dEta);
1339 fhLambda0DispPhi[ebin]->Fill(lambda0,dPhi);
1340
34c16486 1341 }
1342
85c4406e 1343 // if track-matching was of, check effect of track-matching residual cut
b5dbb99b 1344
1345 if(!fRejectTrackMatch)
1346 {
1347 Float_t dZ = cluster->GetTrackDz();
1348 Float_t dR = cluster->GetTrackDx();
34c16486 1349 if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
1350 {
b5dbb99b 1351 dR = 2000., dZ = 2000.;
1352 GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
85c4406e 1353 }
b5dbb99b 1354
1355 if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
1356 {
1357 fhLam0ETM ->Fill(energy,lambda0);
1358 fhLam1ETM ->Fill(energy,lambda1);
1359 fhDispETM ->Fill(energy,disp);
1360
34c16486 1361 if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5)
1362 {
b5dbb99b 1363 fhLam0ETMTRD->Fill(energy,lambda0);
1364 fhLam1ETMTRD->Fill(energy,lambda1);
1365 fhDispETMTRD->Fill(energy,disp);
1366 }
1367 }
85c4406e 1368 }// if track-matching was of, check effect of matching residual cut
b5dbb99b 1369
764ab1f4 1370
4301207e 1371 if(!fFillOnlySimpleSSHisto)
1372 {
764ab1f4 1373 if(energy < 2)
1374 {
1375 fhNCellsLam0LowE ->Fill(ncells,lambda0);
1376 fhNCellsLam1LowE ->Fill(ncells,lambda1);
1377 fhNCellsDispLowE ->Fill(ncells,disp);
1378
1379 fhLam1Lam0LowE ->Fill(lambda1,lambda0);
1380 fhLam0DispLowE ->Fill(lambda0,disp);
1381 fhDispLam1LowE ->Fill(disp,lambda1);
1382 fhEtaLam0LowE ->Fill(eta,lambda0);
85c4406e 1383 fhPhiLam0LowE ->Fill(phi,lambda0);
764ab1f4 1384 }
85c4406e 1385 else
764ab1f4 1386 {
1387 fhNCellsLam0HighE ->Fill(ncells,lambda0);
1388 fhNCellsLam1HighE ->Fill(ncells,lambda1);
1389 fhNCellsDispHighE ->Fill(ncells,disp);
1390
1391 fhLam1Lam0HighE ->Fill(lambda1,lambda0);
1392 fhLam0DispHighE ->Fill(lambda0,disp);
1393 fhDispLam1HighE ->Fill(disp,lambda1);
1394 fhEtaLam0HighE ->Fill(eta, lambda0);
1395 fhPhiLam0HighE ->Fill(phi, lambda0);
1396 }
521636d2 1397 }
4301207e 1398
34c16486 1399 if(IsDataMC())
1400 {
f66d95af 1401 AliVCaloCells* cells = 0;
1402 if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
1403 else cells = GetPHOSCells();
3d5d5078 1404
1405 //Fill histograms to check shape of embedded clusters
1406 Float_t fraction = 0;
85c4406e 1407 // printf("check embedding %i\n",GetReader()->IsEmbeddedClusterSelectionOn());
1408
34c16486 1409 if(GetReader()->IsEmbeddedClusterSelectionOn())
1410 {//Only working for EMCAL
85c4406e 1411 // printf("embedded\n");
3d5d5078 1412 Float_t clusterE = 0; // recalculate in case corrections applied.
1413 Float_t cellE = 0;
34c16486 1414 for(Int_t icell = 0; icell < cluster->GetNCells(); icell++)
1415 {
3d5d5078 1416 cellE = cells->GetCellAmplitude(cluster->GetCellAbsId(icell));
85c4406e 1417 clusterE+=cellE;
3d5d5078 1418 fraction+=cellE*cluster->GetCellAmplitudeFraction(icell);
1419 }
1420
1421 //Fraction of total energy due to the embedded signal
1422 fraction/=clusterE;
1423
85c4406e 1424 if(GetDebug() > 1 )
8d6b7f60 1425 printf("AliAnaPhoton::FillShowerShapeHistogram() - Energy fraction of embedded signal %2.3f, Energy %2.3f\n",fraction, clusterE);
3d5d5078 1426
1427 fhEmbeddedSignalFractionEnergy->Fill(clusterE,fraction);
1428
85c4406e 1429 } // embedded fraction
3d5d5078 1430
f66d95af 1431 // Get the fraction of the cluster energy that carries the cell with highest energy
f66d95af 1432 Float_t maxCellFraction = 0.;
4301207e 1433 Int_t absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster,maxCellFraction);
f66d95af 1434
4301207e 1435 if( absID < 0 ) AliFatal("Wrong absID");
1436
f66d95af 1437 // Check the origin and fill histograms
34c16486 1438
1439 Int_t mcIndex = -1;
1440
85c4406e 1441 if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
3d5d5078 1442 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
34c16486 1443 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
1444 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
1445 {
1446 mcIndex = kmcssPhoton ;
85c4406e 1447
34c16486 1448 if(!GetReader()->IsEmbeddedClusterSelectionOn())
1449 {
3d5d5078 1450 //Check particle overlaps in cluster
1451
85c4406e 1452 // Compare the primary depositing more energy with the rest,
8d6b7f60 1453 // if no photon/electron as comon ancestor (conversions), count as other particle
4914e781 1454 const UInt_t nlabels = cluster->GetNLabels();
1455 Int_t overpdg[nlabels];
1456 Int_t noverlaps = GetMCAnalysisUtils()->GetNOverlaps(cluster->GetLabels(), nlabels,mcTag,-1,GetReader(),overpdg);
1457
8d6b7f60 1458 //printf("N overlaps %d \n",noverlaps);
3d5d5078 1459
f27fe026 1460 if(noverlaps == 0)
34c16486 1461 {
3d5d5078 1462 fhMCPhotonELambda0NoOverlap ->Fill(energy, lambda0);
3d5d5078 1463 }
f27fe026 1464 else if(noverlaps == 1)
85c4406e 1465 {
3d5d5078 1466 fhMCPhotonELambda0TwoOverlap ->Fill(energy, lambda0);
3d5d5078 1467 }
f27fe026 1468 else if(noverlaps > 1)
85c4406e 1469 {
3d5d5078 1470 fhMCPhotonELambda0NOverlap ->Fill(energy, lambda0);
3d5d5078 1471 }
85c4406e 1472 else
34c16486 1473 {
f27fe026 1474 printf("AliAnaPhoton::FillShowerShapeHistogram() - n overlaps = %d!!\n", noverlaps);
3d5d5078 1475 }
1476 }//No embedding
1477
1478 //Fill histograms to check shape of embedded clusters
34c16486 1479 if(GetReader()->IsEmbeddedClusterSelectionOn())
1480 {
85c4406e 1481 if (fraction > 0.9)
3d5d5078 1482 {
1483 fhEmbedPhotonELambda0FullSignal ->Fill(energy, lambda0);
3d5d5078 1484 }
1485 else if(fraction > 0.5)
1486 {
1487 fhEmbedPhotonELambda0MostlySignal ->Fill(energy, lambda0);
3d5d5078 1488 }
1489 else if(fraction > 0.1)
85c4406e 1490 {
3d5d5078 1491 fhEmbedPhotonELambda0MostlyBkg ->Fill(energy, lambda0);
3d5d5078 1492 }
1493 else
1494 {
1495 fhEmbedPhotonELambda0FullBkg ->Fill(energy, lambda0);
3d5d5078 1496 }
1497 } // embedded
1498
521636d2 1499 }//photon no conversion
4431f13a 1500 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
1501 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
1502 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
1503 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
1504 {
1505 mcIndex = kmcssConversion ;
1506 }//conversion photon
1507
34c16486 1508 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron))
1509 {
1510 mcIndex = kmcssElectron ;
521636d2 1511 }//electron
34c16486 1512 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) )
1513 {
1514 mcIndex = kmcssPi0 ;
3d5d5078 1515
1516 //Fill histograms to check shape of embedded clusters
34c16486 1517 if(GetReader()->IsEmbeddedClusterSelectionOn())
1518 {
85c4406e 1519 if (fraction > 0.9)
3d5d5078 1520 {
1521 fhEmbedPi0ELambda0FullSignal ->Fill(energy, lambda0);
3d5d5078 1522 }
1523 else if(fraction > 0.5)
1524 {
1525 fhEmbedPi0ELambda0MostlySignal ->Fill(energy, lambda0);
3d5d5078 1526 }
1527 else if(fraction > 0.1)
85c4406e 1528 {
3d5d5078 1529 fhEmbedPi0ELambda0MostlyBkg ->Fill(energy, lambda0);
3d5d5078 1530 }
1531 else
1532 {
1533 fhEmbedPi0ELambda0FullBkg ->Fill(energy, lambda0);
3d5d5078 1534 }
85c4406e 1535 } // embedded
3d5d5078 1536
521636d2 1537 }//pi0
34c16486 1538 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) )
1539 {
1540 mcIndex = kmcssEta ;
85c4406e 1541 }//eta
1542 else
34c16486 1543 {
85c4406e 1544 mcIndex = kmcssOther ;
1545 }//other particles
521636d2 1546
34c16486 1547 fhMCELambda0 [mcIndex]->Fill(energy, lambda0);
1548 fhMCELambda1 [mcIndex]->Fill(energy, lambda1);
1549 fhMCEDispersion [mcIndex]->Fill(energy, disp);
1550 fhMCNCellsE [mcIndex]->Fill(energy, ncells);
1551 fhMCMaxCellDiffClusterE[mcIndex]->Fill(energy, maxCellFraction);
1552
764ab1f4 1553 if(!fFillOnlySimpleSSHisto)
34c16486 1554 {
764ab1f4 1555 if (energy < 2.)
1556 {
1557 fhMCLambda0vsClusterMaxCellDiffE0[mcIndex]->Fill(lambda0, maxCellFraction);
1558 fhMCNCellsvsClusterMaxCellDiffE0 [mcIndex]->Fill(ncells, maxCellFraction);
1559 }
1560 else if(energy < 6.)
1561 {
1562 fhMCLambda0vsClusterMaxCellDiffE2[mcIndex]->Fill(lambda0, maxCellFraction);
1563 fhMCNCellsvsClusterMaxCellDiffE2 [mcIndex]->Fill(ncells, maxCellFraction);
1564 }
1565 else
1566 {
1567 fhMCLambda0vsClusterMaxCellDiffE6[mcIndex]->Fill(lambda0, maxCellFraction);
1568 fhMCNCellsvsClusterMaxCellDiffE6 [mcIndex]->Fill(ncells, maxCellFraction);
1569 }
1570
1571 if(fCalorimeter == "EMCAL")
1572 {
1573 fhMCEDispEta [mcIndex]-> Fill(energy,dEta);
1574 fhMCEDispPhi [mcIndex]-> Fill(energy,dPhi);
1575 fhMCESumEtaPhi [mcIndex]-> Fill(energy,sEtaPhi);
1576 fhMCEDispEtaPhiDiff [mcIndex]-> Fill(energy,dPhi-dEta);
85c4406e 1577 if(dEta+dPhi>0)fhMCESphericity[mcIndex]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
764ab1f4 1578
1579 Int_t ebin = -1;
1580 if (energy < 2 ) ebin = 0;
1581 else if (energy < 4 ) ebin = 1;
1582 else if (energy < 6 ) ebin = 2;
1583 else if (energy < 10) ebin = 3;
85c4406e 1584 else if (energy < 15) ebin = 4;
1585 else if (energy < 20) ebin = 5;
1586 else ebin = 6;
764ab1f4 1587
1588 fhMCDispEtaDispPhi[ebin][mcIndex]->Fill(dEta ,dPhi);
1589 fhMCLambda0DispEta[ebin][mcIndex]->Fill(lambda0,dEta);
85c4406e 1590 fhMCLambda0DispPhi[ebin][mcIndex]->Fill(lambda0,dPhi);
764ab1f4 1591 }
34c16486 1592 }
521636d2 1593 }//MC data
1594
1595}
1596
4bfeae64 1597//__________________________________________________________________________
85c4406e 1598void AliAnaPhoton::FillTrackMatchingResidualHistograms(AliVCluster* cluster,
22ad7981 1599 Int_t cut)
4bfeae64 1600{
1601 // If selected, fill histograms with residuals of matched clusters, help to define track matching cut
1602 // Residual filled for different cuts 0 (No cut), after 1 PID cut
85c4406e 1603
4bfeae64 1604 Float_t dZ = cluster->GetTrackDz();
1605 Float_t dR = cluster->GetTrackDx();
1606
1607 if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
1608 {
1609 dR = 2000., dZ = 2000.;
1610 GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
85c4406e 1611 }
1612
b2e375c7 1613 AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent());
1614
1615 Bool_t positive = kFALSE;
1616 if(track) positive = (track->Charge()>0);
1617
4bfeae64 1618 if(fhTrackMatchedDEta[cut] && TMath::Abs(dR) < 999)
1619 {
1620 fhTrackMatchedDEta[cut]->Fill(cluster->E(),dZ);
1621 fhTrackMatchedDPhi[cut]->Fill(cluster->E(),dR);
4bfeae64 1622 if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhi[cut]->Fill(dZ,dR);
b2e375c7 1623
1624 if(track)
1625 {
1626 if(positive)
1627 {
1628 fhTrackMatchedDEtaPos[cut]->Fill(cluster->E(),dZ);
1629 fhTrackMatchedDPhiPos[cut]->Fill(cluster->E(),dR);
1630 if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhiPos[cut]->Fill(dZ,dR);
1631 }
1632 else
1633 {
1634 fhTrackMatchedDEtaNeg[cut]->Fill(cluster->E(),dZ);
1635 fhTrackMatchedDPhiNeg[cut]->Fill(cluster->E(),dR);
1636 if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhiNeg[cut]->Fill(dZ,dR);
1637 }
1638 }
4bfeae64 1639
1640 Int_t nSMod = GetModuleNumber(cluster);
1641
1642 if(fCalorimeter=="EMCAL" && nSMod > 5)
1643 {
1644 fhTrackMatchedDEtaTRD[cut]->Fill(cluster->E(),dZ);
1645 fhTrackMatchedDPhiTRD[cut]->Fill(cluster->E(),dR);
1646 }
1647
1648 // Check dEdx and E/p of matched clusters
b2e375c7 1649
4bfeae64 1650 if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
85c4406e 1651 {
85c4406e 1652 if(track)
4bfeae64 1653 {
4bfeae64 1654 Float_t dEdx = track->GetTPCsignal();
1655 Float_t eOverp = cluster->E()/track->P();
1656
1657 fhdEdx[cut] ->Fill(cluster->E(), dEdx);
1658 fhEOverP[cut]->Fill(cluster->E(), eOverp);
1659
1660 if(fCalorimeter=="EMCAL" && nSMod > 5)
1661 fhEOverPTRD[cut]->Fill(cluster->E(), eOverp);
1662
1663
1664 }
1665 else
85c4406e 1666 printf("AliAnaPhoton::FillTrackMatchingResidualHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
4bfeae64 1667
1668
1669
1670 if(IsDataMC())
1671 {
1672
2644ead9 1673 Int_t tag = GetMCAnalysisUtils()->CheckOrigin(cluster->GetLabels(),cluster->GetNLabels(),GetReader());
4bfeae64 1674
1675 if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
1676 {
1677 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
85c4406e 1678 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 2.5 );
4bfeae64 1679 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 0.5 );
1680 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 1.5 );
1681 else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 3.5 );
1682
1683 // Check if several particles contributed to cluster and discard overlapped mesons
85c4406e 1684 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
34c16486 1685 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
1686 {
4bfeae64 1687 if(cluster->GetNLabels()==1)
1688 {
1689 fhTrackMatchedDEtaMCNoOverlap[cut]->Fill(cluster->E(),dZ);
1690 fhTrackMatchedDPhiMCNoOverlap[cut]->Fill(cluster->E(),dR);
1691 }
85c4406e 1692 else
4bfeae64 1693 {
1694 fhTrackMatchedDEtaMCOverlap[cut]->Fill(cluster->E(),dZ);
1695 fhTrackMatchedDPhiMCOverlap[cut]->Fill(cluster->E(),dR);
1696 }
1697
1698 }// Check overlaps
1699
1700 }
1701 else
1702 {
1703 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
85c4406e 1704 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 6.5 );
4bfeae64 1705 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 4.5 );
1706 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 5.5 );
1707 else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 7.5 );
1708
1709 // Check if several particles contributed to cluster
85c4406e 1710 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
34c16486 1711 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
1712 {
4bfeae64 1713 fhTrackMatchedDEtaMCConversion[cut]->Fill(cluster->E(),dZ);
1714 fhTrackMatchedDPhiMCConversion[cut]->Fill(cluster->E(),dR);
1715
85c4406e 1716 }// Check overlaps
4bfeae64 1717
1718 }
1719
85c4406e 1720 } // MC
4bfeae64 1721
1722 } // residuals window
1723
1724 } // Small residual
1725
1726}
1727
1728//___________________________________________
0c1383b5 1729TObjString * AliAnaPhoton::GetAnalysisCuts()
85c4406e 1730{
0c1383b5 1731 //Save parameters used for analysis
1732 TString parList ; //this will be list of parameters used for this analysis.
5ae09196 1733 const Int_t buffersize = 255;
1734 char onePar[buffersize] ;
0c1383b5 1735
5ae09196 1736 snprintf(onePar,buffersize,"--- AliAnaPhoton ---\n") ;
85c4406e 1737 parList+=onePar ;
5ae09196 1738 snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ;
0c1383b5 1739 parList+=onePar ;
5ae09196 1740 snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster) \n",fMinDist) ;
0c1383b5 1741 parList+=onePar ;
5ae09196 1742 snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation) \n",fMinDist2) ;
0c1383b5 1743 parList+=onePar ;
5ae09196 1744 snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study) \n",fMinDist3) ;
0c1383b5 1745 parList+=onePar ;
5ae09196 1746 snprintf(onePar,buffersize,"fRejectTrackMatch: %d\n",fRejectTrackMatch) ;
85c4406e 1747 parList+=onePar ;
0c1383b5 1748
1749 //Get parameters set in base class.
1750 parList += GetBaseParametersList() ;
1751
1752 //Get parameters set in PID class.
1753 parList += GetCaloPID()->GetPIDParametersList() ;
1754
1755 //Get parameters set in FiducialCut class (not available yet)
85c4406e 1756 //parlist += GetFidCut()->GetFidCutParametersList()
0c1383b5 1757
1758 return new TObjString(parList) ;
1759}
1760
1c5acb87 1761//________________________________________________________________________
1762TList * AliAnaPhoton::GetCreateOutputObjects()
c2a62a94 1763{
85c4406e 1764 // Create histograms to be saved in output file and
477d6cee 1765 // store them in outputContainer
85c4406e 1766 TList * outputContainer = new TList() ;
1767 outputContainer->SetName("PhotonHistos") ;
4a745797 1768
85c4406e 1769 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin();
1770 Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin();
1771 Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
745913ae 1772 Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin();
85c4406e 1773 Int_t nbins = GetHistogramRanges()->GetHistoNClusterCellBins(); Int_t nmax = GetHistogramRanges()->GetHistoNClusterCellMax(); Int_t nmin = GetHistogramRanges()->GetHistoNClusterCellMin();
1774 Int_t ntimebins= GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin();
1775
1776 Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins();
1777 Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax();
09273901 1778 Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin();
85c4406e 1779 Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins();
1780 Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax();
09273901 1781 Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin();
1782
85c4406e 1783 Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
1784 Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax();
31ae6d59 1785 Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin();
85c4406e 1786 Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
1787 Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax();
31ae6d59 1788 Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
09273901 1789
d2655d46 1790 Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins for SS studies
1791
eb86112d 1792 Int_t nTrigBC = 1;
1793 Int_t iBCShift = 0;
1794 if(!GetReader()->AreBadTriggerEventsRemoved())
1795 {
1796 nTrigBC = 11;
1797 iBCShift = 5;
1798 }
1799
9e51e29a 1800 TString cut[] = {"Open","Reader","E","Time","NCells","NLM","Fidutial","Matching","Bad","PID"};
85c4406e 1801 for (Int_t i = 0; i < 10 ; i++)
fc195fd0 1802 {
1803 fhClusterCuts[i] = new TH1F(Form("hCut_%d_%s", i, cut[i].Data()),
1804 Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()),
85c4406e 1805 nptbins,ptmin,ptmax);
184ca640 1806 fhClusterCuts[i]->SetYTitle("d#it{N}/d#it{E} ");
1807 fhClusterCuts[i]->SetXTitle("#it{E} (GeV)");
85c4406e 1808 outputContainer->Add(fhClusterCuts[i]) ;
fc195fd0 1809 }
1810
6df33fcb 1811 fhEClusterSM = new TH2F("hEClusterSM","Raw clusters E and super-module number",
1812 nptbins,ptmin,ptmax,
1813 GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1814 fhEClusterSM->SetYTitle("SuperModule ");
184ca640 1815 fhEClusterSM->SetXTitle("#it{E} (GeV)");
6df33fcb 1816 outputContainer->Add(fhEClusterSM) ;
1817
184ca640 1818 fhPtClusterSM = new TH2F("hPtClusterSM","Raw clusters #it{p}_[T] and super-module number",
6df33fcb 1819 nptbins,ptmin,ptmax,
1820 GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1821 fhPtClusterSM->SetYTitle("SuperModule ");
184ca640 1822 fhPtClusterSM->SetXTitle("#it{E} (GeV)");
6df33fcb 1823 outputContainer->Add(fhPtClusterSM) ;
1824
1825 fhEPhotonSM = new TH2F("hEPhotonSM","Selected clusters E and super-module number",
1826 nptbins,ptmin,ptmax,
1827 GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1828 fhEPhotonSM->SetYTitle("SuperModule ");
184ca640 1829 fhEPhotonSM->SetXTitle("#it{E} (GeV)");
6df33fcb 1830 outputContainer->Add(fhEPhotonSM) ;
1831
184ca640 1832 fhPtPhotonSM = new TH2F("hPtPhotonSM","Selected clusters #it{p}_[T] and super-module number",
6df33fcb 1833 nptbins,ptmin,ptmax,
1834 GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1835 fhPtPhotonSM->SetYTitle("SuperModule ");
184ca640 1836 fhPtPhotonSM->SetXTitle("#it{E} (GeV)");
6df33fcb 1837 outputContainer->Add(fhPtPhotonSM) ;
1838
85c4406e 1839 fhNCellsE = new TH2F ("hNCellsE","# of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nbins,nmin,nmax);
184ca640 1840 fhNCellsE->SetXTitle("#it{E} (GeV)");
c4a7d28a 1841 fhNCellsE->SetYTitle("# of cells in cluster");
85c4406e 1842 outputContainer->Add(fhNCellsE);
f15c25da 1843
85c4406e 1844 fhCellsE = new TH2F ("hCellsE","energy of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nptbins*2,ptmin,ptmax);
184ca640 1845 fhCellsE->SetXTitle("#it{E}_{cluster} (GeV)");
1846 fhCellsE->SetYTitle("#it{E}_{cell} (GeV)");
85c4406e 1847 outputContainer->Add(fhCellsE);
5c46c992 1848
b2e375c7 1849 fhTimePt = new TH2F ("hTimePt","time of cluster vs pT of clusters", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 1850 fhTimePt->SetXTitle("#it{p}_[T] (GeV/#it{c})");
1851 fhTimePt->SetYTitle("#it{time} (ns)");
b2e375c7 1852 outputContainer->Add(fhTimePt);
6175da48 1853
f66d95af 1854 fhMaxCellDiffClusterE = new TH2F ("hMaxCellDiffClusterE","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters",
85c4406e 1855 nptbins,ptmin,ptmax, 500,0,1.);
184ca640 1856 fhMaxCellDiffClusterE->SetXTitle("#it{E}_{cluster} (GeV) ");
1857 fhMaxCellDiffClusterE->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
85c4406e 1858 outputContainer->Add(fhMaxCellDiffClusterE);
f66d95af 1859
85c4406e 1860 fhEPhoton = new TH1F("hEPhoton","Number of #gamma over calorimeter vs energy",nptbins,ptmin,ptmax);
184ca640 1861 fhEPhoton->SetYTitle("#it{counts}");
1862 fhEPhoton->SetXTitle("#it{E}_{#gamma}(GeV)");
85c4406e 1863 outputContainer->Add(fhEPhoton) ;
20218aea 1864
184ca640 1865 fhPtPhoton = new TH1F("hPtPhoton","Number of #gamma over calorimeter vs #it{p}_[T]",nptbins,ptmin,ptmax);
1866 fhPtPhoton->SetYTitle("#it{counts}");
1867 fhPtPhoton->SetXTitle("p_{T #gamma}(GeV/#it{c})");
85c4406e 1868 outputContainer->Add(fhPtPhoton) ;
1869
184ca640 1870 fhPtCentralityPhoton = new TH2F("hPtCentralityPhoton","centrality vs #it{p}_[T]",nptbins,ptmin,ptmax, 100,0,100);
c8710850 1871 fhPtCentralityPhoton->SetYTitle("Centrality");
184ca640 1872 fhPtCentralityPhoton->SetXTitle("#it{p}_[T](GeV/#it{c})");
c8710850 1873 outputContainer->Add(fhPtCentralityPhoton) ;
1874
184ca640 1875 fhPtEventPlanePhoton = new TH2F("hPtEventPlanePhoton","centrality vs #it{p}_[T]",nptbins,ptmin,ptmax, 100,0,TMath::Pi());
c8710850 1876 fhPtEventPlanePhoton->SetYTitle("Event plane angle (rad)");
184ca640 1877 fhPtEventPlanePhoton->SetXTitle("#it{p}_[T] (GeV/#it{c})");
c8710850 1878 outputContainer->Add(fhPtEventPlanePhoton) ;
85c4406e 1879
c2a62a94 1880 fhEtaPhi = new TH2F
184ca640 1881 ("hEtaPhi","cluster,#it{E} > 0.5 GeV, #eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
c2a62a94 1882 fhEtaPhi->SetYTitle("#phi (rad)");
1883 fhEtaPhi->SetXTitle("#eta");
1884 outputContainer->Add(fhEtaPhi) ;
85c4406e 1885
c2a62a94 1886 if(fCalorimeter=="EMCAL" && fFillEMCALBCHistograms)
1887 {
1888 fhEtaPhiEMCALBC0 = new TH2F
184ca640 1889 ("hEtaPhiEMCALBC0","cluster,#it{E} > 2 GeV, #eta vs #phi, for clusters with |time| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax);
c2a62a94 1890 fhEtaPhiEMCALBC0->SetYTitle("#phi (rad)");
1891 fhEtaPhiEMCALBC0->SetXTitle("#eta");
1892 outputContainer->Add(fhEtaPhiEMCALBC0) ;
1893
1894 fhEtaPhiEMCALBC1 = new TH2F
184ca640 1895 ("hEtaPhiEMCALBC1","cluster,#it{E} > 2 GeV, #eta vs #phi, for clusters with 25 < |time| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax);
c2a62a94 1896 fhEtaPhiEMCALBC1->SetYTitle("#phi (rad)");
1897 fhEtaPhiEMCALBC1->SetXTitle("#eta");
1898 outputContainer->Add(fhEtaPhiEMCALBC1) ;
1899
1900 fhEtaPhiEMCALBCN = new TH2F
184ca640 1901 ("hEtaPhiEMCALBCN","cluster,#it{E} > 2 GeV, #eta vs #phi, for clusters with |time| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax);
c2a62a94 1902 fhEtaPhiEMCALBCN->SetYTitle("#phi (rad)");
1903 fhEtaPhiEMCALBCN->SetXTitle("#eta");
1904 outputContainer->Add(fhEtaPhiEMCALBCN) ;
1905
eb86112d 1906 for(Int_t i = 0; i < nTrigBC; i++)
c2a62a94 1907 {
1908 fhEtaPhiTriggerEMCALBC[i] = new TH2F
eb86112d 1909 (Form("hEtaPhiTriggerEMCALBC%d",i-iBCShift),
184ca640 1910 Form("cluster #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-iBCShift),
c2a62a94 1911 netabins,etamin,etamax,nphibins,phimin,phimax);
1912 fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
1913 fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta");
1914 outputContainer->Add(fhEtaPhiTriggerEMCALBC[i]) ;
1915
1916 fhTimeTriggerEMCALBC[i] = new TH2F
eb86112d 1917 (Form("hTimeTriggerEMCALBC%d",i-iBCShift),
184ca640 1918 Form("cluster #it{time} vs #it{E} of clusters, Trigger EMCAL-BC=%d",i-iBCShift),
c2a62a94 1919 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 1920 fhTimeTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)");
1921 fhTimeTriggerEMCALBC[i]->SetYTitle("#it{time} (ns)");
c2a62a94 1922 outputContainer->Add(fhTimeTriggerEMCALBC[i]);
1923
1924 fhTimeTriggerEMCALBCPileUpSPD[i] = new TH2F
eb86112d 1925 (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-iBCShift),
184ca640 1926 Form("cluster #it{time} vs #it{E} of clusters, Trigger EMCAL-BC=%d",i-iBCShift),
c2a62a94 1927 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 1928 fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)");
1929 fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{time} (ns)");
c2a62a94 1930 outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]);
afb3af8a 1931
1932 fhEtaPhiTriggerEMCALBCUM[i] = new TH2F
eb86112d 1933 (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-iBCShift),
184ca640 1934 Form("cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-iBCShift),
afb3af8a 1935 netabins,etamin,etamax,nphibins,phimin,phimax);
1936 fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
1937 fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta");
1938 outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ;
1939
1940 fhTimeTriggerEMCALBCUM[i] = new TH2F
eb86112d 1941 (Form("hTimeTriggerEMCALBC%d_UnMatch",i-iBCShift),
184ca640 1942 Form("cluster #it{time} vs #it{E} of clusters, unmatched trigger EMCAL-BC=%d",i-iBCShift),
afb3af8a 1943 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 1944 fhTimeTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)");
1945 fhTimeTriggerEMCALBCUM[i]->SetYTitle("#it{time} (ns)");
afb3af8a 1946 outputContainer->Add(fhTimeTriggerEMCALBCUM[i]);
1947
1948 fhEtaPhiTriggerEMCALBCCluster[i] = new TH2F
eb86112d 1949 (Form("hEtaPhiTriggerEMCALBC%d_OnlyTrigger",i-iBCShift),
1950 Form("trigger cluster, #eta vs #phi, Trigger EMCAL-BC=%d",i-iBCShift),
afb3af8a 1951 netabins,etamin,etamax,nphibins,phimin,phimax);
1952 fhEtaPhiTriggerEMCALBCCluster[i]->SetYTitle("#phi (rad)");
1953 fhEtaPhiTriggerEMCALBCCluster[i]->SetXTitle("#eta");
1954 outputContainer->Add(fhEtaPhiTriggerEMCALBCCluster[i]) ;
126b8c62 1955
afb3af8a 1956 fhEtaPhiTriggerEMCALBCUMCluster[i] = new TH2F
eb86112d 1957 (Form("hEtaPhiTriggerEMCALBC%d_OnlyTrigger_UnMatch",i-iBCShift),
1958 Form("trigger cluster, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-iBCShift),
afb3af8a 1959 netabins,etamin,etamax,nphibins,phimin,phimax);
1960 fhEtaPhiTriggerEMCALBCUMCluster[i]->SetYTitle("#phi (rad)");
1961 fhEtaPhiTriggerEMCALBCUMCluster[i]->SetXTitle("#eta");
1962 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMCluster[i]) ;
c2a62a94 1963 }
afb3af8a 1964
126b8c62 1965 fhTimeTriggerEMCALBCCluster = new TH2F("hTimeTriggerEMCALBC_OnlyTrigger",
184ca640 1966 "trigger cluster #it{time} vs #it{E} of clusters",
126b8c62 1967 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 1968 fhTimeTriggerEMCALBCCluster->SetXTitle("#it{E} (GeV)");
1969 fhTimeTriggerEMCALBCCluster->SetYTitle("#it{time} (ns)");
126b8c62 1970 outputContainer->Add(fhTimeTriggerEMCALBCCluster);
1971
1972 fhTimeTriggerEMCALBCUMCluster = new TH2F("hTimeTriggerEMCALBC_OnlyTrigger_UnMatch",
184ca640 1973 "trigger cluster #it{time} vs #it{E} of clusters, unmatched trigger",
126b8c62 1974 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 1975 fhTimeTriggerEMCALBCUMCluster->SetXTitle("#it{E} (GeV)");
1976 fhTimeTriggerEMCALBCUMCluster->SetYTitle("#it{time} (ns)");
126b8c62 1977 outputContainer->Add(fhTimeTriggerEMCALBCUMCluster);
1978
afb3af8a 1979 fhEtaPhiTriggerEMCALBCClusterOverTh = new TH2F
1980 ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_OverThreshold",
184ca640 1981 "trigger cluster #it{E} > trigger threshold, #eta vs #phi, Trigger EMCAL-BC=0",
afb3af8a 1982 netabins,etamin,etamax,nphibins,phimin,phimax);
1983 fhEtaPhiTriggerEMCALBCClusterOverTh->SetYTitle("#phi (rad)");
1984 fhEtaPhiTriggerEMCALBCClusterOverTh->SetXTitle("#eta");
1985 outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterOverTh) ;
85c4406e 1986
afb3af8a 1987 fhEtaPhiTriggerEMCALBCUMClusterOverTh = new TH2F
1988 ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_OverThreshold_UnMatch",
184ca640 1989 "trigger cluster #it{E} > trigger threshold, #eta vs #phi, unmatched trigger EMCAL-BC=0",
afb3af8a 1990 netabins,etamin,etamax,nphibins,phimin,phimax);
1991 fhEtaPhiTriggerEMCALBCUMClusterOverTh->SetYTitle("#phi (rad)");
1992 fhEtaPhiTriggerEMCALBCUMClusterOverTh->SetXTitle("#eta");
1993 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterOverTh) ;
85c4406e 1994
afb3af8a 1995 fhEtaPhiTriggerEMCALBCClusterBelowTh1 = new TH2F
1996 ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold1",
184ca640 1997 "trigger cluster thresh-1 < #it{E} < thres, #eta vs #phi, Trigger EMCAL-BC=0",
afb3af8a 1998 netabins,etamin,etamax,nphibins,phimin,phimax);
1999 fhEtaPhiTriggerEMCALBCClusterBelowTh1->SetYTitle("#phi (rad)");
2000 fhEtaPhiTriggerEMCALBCClusterBelowTh1->SetXTitle("#eta");
2001 outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterBelowTh1) ;
2002
2003 fhEtaPhiTriggerEMCALBCUMClusterBelowTh1 = new TH2F
2004 ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold1_UnMatch",
184ca640 2005 "trigger cluster thresh-1 < #it{E} < thres, #eta vs #phi, unmatched trigger EMCAL-BC=0",
afb3af8a 2006 netabins,etamin,etamax,nphibins,phimin,phimax);
2007 fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->SetYTitle("#phi (rad)");
2008 fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->SetXTitle("#eta");
2009 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterBelowTh1) ;
85c4406e 2010
afb3af8a 2011 fhEtaPhiTriggerEMCALBCClusterBelowTh2 = new TH2F
2012 ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold2",
184ca640 2013 "trigger cluster thresh-2 < #it{E} < thres, #eta vs #phi, Trigger EMCAL-BC=0",
afb3af8a 2014 netabins,etamin,etamax,nphibins,phimin,phimax);
2015 fhEtaPhiTriggerEMCALBCClusterBelowTh2->SetYTitle("#phi (rad)");
2016 fhEtaPhiTriggerEMCALBCClusterBelowTh2->SetXTitle("#eta");
2017 outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterBelowTh2) ;
2018
2019 fhEtaPhiTriggerEMCALBCUMClusterBelowTh2 = new TH2F
2020 ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold2_UnMatch",
184ca640 2021 "trigger cluster thresh-2 < #it{E} < thres, #eta vs #phi, unmatched trigger EMCAL-BC=0",
afb3af8a 2022 netabins,etamin,etamax,nphibins,phimin,phimax);
2023 fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->SetYTitle("#phi (rad)");
2024 fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->SetXTitle("#eta");
2025 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterBelowTh2) ;
85c4406e 2026
eb86112d 2027 if(!GetReader()->AreBadTriggerEventsRemoved())
2028 {
2029 fhEtaPhiTriggerEMCALBCExotic = new TH2F
2030 ("hEtaPhiTriggerExotic",
184ca640 2031 "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Exotic",
eb86112d 2032 netabins,etamin,etamax,nphibins,phimin,phimax);
2033 fhEtaPhiTriggerEMCALBCExotic->SetYTitle("#phi (rad)");
2034 fhEtaPhiTriggerEMCALBCExotic->SetXTitle("#eta");
2035 outputContainer->Add(fhEtaPhiTriggerEMCALBCExotic) ;
2036
2037 fhTimeTriggerEMCALBCExotic = new TH2F
2038 ("hTimeTriggerExotic",
184ca640 2039 "cluster #it{time} vs #it{E} of clusters, Trigger Exotic ",
eb86112d 2040 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2041 fhTimeTriggerEMCALBCExotic->SetXTitle("#it{E} (GeV)");
2042 fhTimeTriggerEMCALBCExotic->SetYTitle("#it{time} (ns)");
eb86112d 2043 outputContainer->Add(fhTimeTriggerEMCALBCExotic);
2044
2045 fhEtaPhiTriggerEMCALBCUMExotic = new TH2F
2046 ("hEtaPhiTriggerExotic_UnMatch",
184ca640 2047 "cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Exotic",
eb86112d 2048 netabins,etamin,etamax,nphibins,phimin,phimax);
2049 fhEtaPhiTriggerEMCALBCUMExotic->SetYTitle("#phi (rad)");
2050 fhEtaPhiTriggerEMCALBCUMExotic->SetXTitle("#eta");
2051 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMExotic) ;
2052
2053 fhTimeTriggerEMCALBCUMExotic = new TH2F
2054 ("hTimeTriggerExotic_UnMatch",
184ca640 2055 "cluster #it{time} vs #it{E} of clusters, unmatched trigger Exotic",
eb86112d 2056 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2057 fhTimeTriggerEMCALBCUMExotic->SetXTitle("#it{E} (GeV)");
2058 fhTimeTriggerEMCALBCUMExotic->SetYTitle("#it{time} (ns)");
eb86112d 2059 outputContainer->Add(fhTimeTriggerEMCALBCUMExotic);
2060
2061 fhEtaPhiTriggerEMCALBCExoticCluster = new TH2F
2062 ("hEtaPhiTriggerExotic_OnlyTrigger",
184ca640 2063 "trigger cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Exotic",
eb86112d 2064 netabins,etamin,etamax,nphibins,phimin,phimax);
2065 fhEtaPhiTriggerEMCALBCExoticCluster->SetYTitle("#phi (rad)");
2066 fhEtaPhiTriggerEMCALBCExoticCluster->SetXTitle("#eta");
2067 outputContainer->Add(fhEtaPhiTriggerEMCALBCExoticCluster) ;
2068
2069 fhTimeTriggerEMCALBCExoticCluster = new TH2F
2070 ("hTimeTriggerExotic_OnlyTrigger",
184ca640 2071 "trigger cluster #it{time} vs #it{E} of clusters, Trigger Exotic",
eb86112d 2072 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2073 fhTimeTriggerEMCALBCExoticCluster->SetXTitle("#it{E} (GeV)");
2074 fhTimeTriggerEMCALBCExoticCluster->SetYTitle("#it{time} (ns)");
eb86112d 2075 outputContainer->Add(fhTimeTriggerEMCALBCExoticCluster);
2076
2077 fhEtaPhiTriggerEMCALBCUMExoticCluster = new TH2F
2078 ("hEtaPhiTriggerExotic_OnlyTrigger_UnMatch",
184ca640 2079 "trigger cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Exotic",
eb86112d 2080 netabins,etamin,etamax,nphibins,phimin,phimax);
2081 fhEtaPhiTriggerEMCALBCUMExoticCluster->SetYTitle("#phi (rad)");
2082 fhEtaPhiTriggerEMCALBCUMExoticCluster->SetXTitle("#eta");
2083 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMExoticCluster) ;
2084
2085 fhTimeTriggerEMCALBCUMExoticCluster = new TH2F
2086 ("hTimeTriggerExotic_OnlyTrigger_UnMatch",
184ca640 2087 "trigger cluster #it{time} vs #it{E} of clusters, unmatched trigger Exotic",
eb86112d 2088 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2089 fhTimeTriggerEMCALBCUMExoticCluster->SetXTitle("#it{E} (GeV)");
2090 fhTimeTriggerEMCALBCUMExoticCluster->SetYTitle("#it{time} (ns)");
eb86112d 2091 outputContainer->Add(fhTimeTriggerEMCALBCUMExoticCluster);
2092
2093 fhEtaPhiTriggerEMCALBCBad = new TH2F
2094 ("hEtaPhiTriggerBad",
184ca640 2095 "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Bad",
eb86112d 2096 netabins,etamin,etamax,nphibins,phimin,phimax);
2097 fhEtaPhiTriggerEMCALBCBad->SetYTitle("#phi (rad)");
2098 fhEtaPhiTriggerEMCALBCBad->SetXTitle("#eta");
2099 outputContainer->Add(fhEtaPhiTriggerEMCALBCBad) ;
2100
2101 fhTimeTriggerEMCALBCBad = new TH2F
2102 ("hTimeTriggerBad",
184ca640 2103 "cluster #it{time} vs #it{E} of clusters, Trigger Bad ",
eb86112d 2104 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2105 fhTimeTriggerEMCALBCBad->SetXTitle("#it{E} (GeV)");
2106 fhTimeTriggerEMCALBCBad->SetYTitle("#it{time} (ns)");
eb86112d 2107 outputContainer->Add(fhTimeTriggerEMCALBCBad);
2108
2109 fhEtaPhiTriggerEMCALBCUMBad = new TH2F
2110 ("hEtaPhiTriggerBad_UnMatch",
184ca640 2111 "cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Bad",
eb86112d 2112 netabins,etamin,etamax,nphibins,phimin,phimax);
2113 fhEtaPhiTriggerEMCALBCUMBad->SetYTitle("#phi (rad)");
2114 fhEtaPhiTriggerEMCALBCUMBad->SetXTitle("#eta");
2115 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBad) ;
2116
2117 fhTimeTriggerEMCALBCUMBad = new TH2F
2118 ("hTimeTriggerBad_UnMatch",
184ca640 2119 "cluster #it{time} vs #it{E} of clusters, unmatched trigger Bad",
eb86112d 2120 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2121 fhTimeTriggerEMCALBCUMBad->SetXTitle("#it{E} (GeV)");
2122 fhTimeTriggerEMCALBCUMBad->SetYTitle("#it{time} (ns)");
eb86112d 2123 outputContainer->Add(fhTimeTriggerEMCALBCUMBad);
2124
2125 fhEtaPhiTriggerEMCALBCBadCluster = new TH2F
2126 ("hEtaPhiTriggerBad_OnlyTrigger",
184ca640 2127 "trigger cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Bad",
eb86112d 2128 netabins,etamin,etamax,nphibins,phimin,phimax);
2129 fhEtaPhiTriggerEMCALBCBadCluster->SetYTitle("#phi (rad)");
2130 fhEtaPhiTriggerEMCALBCBadCluster->SetXTitle("#eta");
2131 outputContainer->Add(fhEtaPhiTriggerEMCALBCBadCluster) ;
2132
2133 fhTimeTriggerEMCALBCBadCluster = new TH2F
2134 ("hTimeTriggerBad_OnlyTrigger",
184ca640 2135 "trigger cluster #it{time} vs #it{E} of clusters, Trigger Bad",
eb86112d 2136 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2137 fhTimeTriggerEMCALBCBadCluster->SetXTitle("#it{E} (GeV)");
2138 fhTimeTriggerEMCALBCBadCluster->SetYTitle("#it{time} (ns)");
eb86112d 2139 outputContainer->Add(fhTimeTriggerEMCALBCBadCluster);
2140
2141 fhEtaPhiTriggerEMCALBCUMBadCluster = new TH2F
2142 ("hEtaPhiTriggerBad_OnlyTrigger_UnMatch",
184ca640 2143 "trigger cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Bad",
eb86112d 2144 netabins,etamin,etamax,nphibins,phimin,phimax);
2145 fhEtaPhiTriggerEMCALBCUMBadCluster->SetYTitle("#phi (rad)");
2146 fhEtaPhiTriggerEMCALBCUMBadCluster->SetXTitle("#eta");
2147 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadCluster) ;
2148
2149 fhTimeTriggerEMCALBCUMBadCluster = new TH2F
2150 ("hTimeTriggerBad_OnlyTrigger_UnMatch",
184ca640 2151 "trigger cluster time vs #it{E} of clusters, unmatched trigger Bad",
eb86112d 2152 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2153 fhTimeTriggerEMCALBCUMBadCluster->SetXTitle("#it{E} (GeV)");
2154 fhTimeTriggerEMCALBCUMBadCluster->SetYTitle("#it{time} (ns)");
eb86112d 2155 outputContainer->Add(fhTimeTriggerEMCALBCUMBadCluster);
2156
2157 fhEtaPhiTriggerEMCALBCBadExotic = new TH2F
2158 ("hEtaPhiTriggerBadExotic",
184ca640 2159 "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Bad&Exotic",
eb86112d 2160 netabins,etamin,etamax,nphibins,phimin,phimax);
2161 fhEtaPhiTriggerEMCALBCBadExotic->SetYTitle("#phi (rad)");
2162 fhEtaPhiTriggerEMCALBCBadExotic->SetXTitle("#eta");
2163 outputContainer->Add(fhEtaPhiTriggerEMCALBCBadExotic) ;
2164
2165 fhTimeTriggerEMCALBCBadExotic = new TH2F
2166 ("hTimeTriggerBadExotic",
184ca640 2167 "cluster #it{time} vs #it{E} of clusters, Trigger Bad&Exotic ",
eb86112d 2168 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2169 fhTimeTriggerEMCALBCBadExotic->SetXTitle("#it{E} (GeV)");
2170 fhTimeTriggerEMCALBCBadExotic->SetYTitle("#it{time} (ns)");
eb86112d 2171 outputContainer->Add(fhTimeTriggerEMCALBCBadExotic);
2172
2173 fhEtaPhiTriggerEMCALBCUMBadExotic = new TH2F
2174 ("hEtaPhiTriggerBadExotic_UnMatch",
184ca640 2175 "cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Bad&Exotic",
eb86112d 2176 netabins,etamin,etamax,nphibins,phimin,phimax);
2177 fhEtaPhiTriggerEMCALBCUMBadExotic->SetYTitle("#phi (rad)");
2178 fhEtaPhiTriggerEMCALBCUMBadExotic->SetXTitle("#eta");
2179 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadExotic) ;
2180
2181 fhTimeTriggerEMCALBCUMBadExotic = new TH2F
2182 ("hTimeTriggerBadExotic_UnMatch",
184ca640 2183 "cluster #it{time} vs #it{E} of clusters, unmatched trigger Bad&Exotic",
eb86112d 2184 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2185 fhTimeTriggerEMCALBCUMBadExotic->SetXTitle("#it{E} (GeV)");
2186 fhTimeTriggerEMCALBCUMBadExotic->SetYTitle("#it{time} (ns)");
eb86112d 2187 outputContainer->Add(fhTimeTriggerEMCALBCUMBadExotic);
2188
2189 fhEtaPhiTriggerEMCALBCBadExoticCluster = new TH2F
2190 ("hEtaPhiTriggerBadExotic_OnlyTrigger",
184ca640 2191 "trigger cluster #it{E} > 2 GeV, #eta vs #phi, Trigger Bad&Exotic",
eb86112d 2192 netabins,etamin,etamax,nphibins,phimin,phimax);
2193 fhEtaPhiTriggerEMCALBCBadExoticCluster->SetYTitle("#phi (rad)");
2194 fhEtaPhiTriggerEMCALBCBadExoticCluster->SetXTitle("#eta");
2195 outputContainer->Add(fhEtaPhiTriggerEMCALBCBadExoticCluster) ;
2196
2197 fhTimeTriggerEMCALBCBadExoticCluster = new TH2F
2198 ("hTimeTriggerBadExotic_OnlyTrigger",
184ca640 2199 "trigger cluster #it{time} vs #it{E} of clusters, Trigger Bad&Exotic",
eb86112d 2200 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2201 fhTimeTriggerEMCALBCBadExoticCluster->SetXTitle("#it{E} (GeV)");
2202 fhTimeTriggerEMCALBCBadExoticCluster->SetYTitle("#it{time} (ns)");
eb86112d 2203 outputContainer->Add(fhTimeTriggerEMCALBCBadExoticCluster);
2204
2205 fhEtaPhiTriggerEMCALBCUMBadExoticCluster = new TH2F
2206 ("hEtaPhiTriggerBadExotic_OnlyTrigger_UnMatch",
184ca640 2207 "trigger cluster #it{E} > 2 GeV, #eta vs #phi, unmatched trigger Bad&Exotic",
eb86112d 2208 netabins,etamin,etamax,nphibins,phimin,phimax);
2209 fhEtaPhiTriggerEMCALBCUMBadExoticCluster->SetYTitle("#phi (rad)");
2210 fhEtaPhiTriggerEMCALBCUMBadExoticCluster->SetXTitle("#eta");
2211 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadExoticCluster) ;
2212
2213 fhTimeTriggerEMCALBCUMBadExoticCluster = new TH2F
2214 ("hTimeTriggerBadExotic_OnlyTrigger_UnMatch",
184ca640 2215 "trigger cluster #it{time} vs #it{E} of clusters, unmatched trigger Bad&Exotic",
eb86112d 2216 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2217 fhTimeTriggerEMCALBCUMBadExoticCluster->SetXTitle("#it{E} (GeV)");
2218 fhTimeTriggerEMCALBCUMBadExoticCluster->SetYTitle("#it{time} (ns)");
eb86112d 2219 outputContainer->Add(fhTimeTriggerEMCALBCUMBadExoticCluster);
2220
2221 fhTimeTriggerEMCALBCBadMaxCell = new TH2F
2222 ("hTimeTriggerBadMaxCell",
184ca640 2223 "cluster #it{time} vs #it{E} of clusters, Trigger BadMaxCell",
eb86112d 2224 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2225 fhTimeTriggerEMCALBCBadMaxCell->SetXTitle("#it{E} (GeV)");
2226 fhTimeTriggerEMCALBCBadMaxCell->SetYTitle("#it{time} (ns)");
eb86112d 2227 outputContainer->Add(fhTimeTriggerEMCALBCBadMaxCell);
2228
2229 fhTimeTriggerEMCALBCUMBadMaxCell = new TH2F
2230 ("hTimeTriggerBadMaxCell_UnMatch",
184ca640 2231 "cluster #it{time} vs #it{E} of clusters, unmatched trigger BadMaxCell",
eb86112d 2232 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2233 fhTimeTriggerEMCALBCUMBadMaxCell->SetXTitle("#it{E} (GeV)");
2234 fhTimeTriggerEMCALBCUMBadMaxCell->SetYTitle("#it{time} (ns)");
eb86112d 2235 outputContainer->Add(fhTimeTriggerEMCALBCUMBadMaxCell);
2236
2237
2238 fhTimeTriggerEMCALBCBadMaxCellExotic = new TH2F
2239 ("hTimeTriggerBadMaxCellExotic",
184ca640 2240 "cluster #it{time} vs #it{E} of clusters, Trigger BadMaxCell&Exotic",
eb86112d 2241 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2242 fhTimeTriggerEMCALBCBadMaxCellExotic->SetXTitle("#it{E} (GeV)");
2243 fhTimeTriggerEMCALBCBadMaxCellExotic->SetYTitle("#it{time} (ns)");
eb86112d 2244 outputContainer->Add(fhTimeTriggerEMCALBCBadMaxCellExotic);
2245
2246 fhTimeTriggerEMCALBCUMBadMaxCellExotic = new TH2F
2247 ("hTimeTriggerBadMaxCellExotic_UnMatch",
184ca640 2248 "cluster #it{time} vs #it{E} of clusters, unmatched trigger BadMaxCell&Exotic",
eb86112d 2249 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2250 fhTimeTriggerEMCALBCUMBadMaxCellExotic->SetXTitle("#it{E} (GeV)");
2251 fhTimeTriggerEMCALBCUMBadMaxCellExotic->SetYTitle("#it{time} (ns)");
eb86112d 2252 outputContainer->Add(fhTimeTriggerEMCALBCUMBadMaxCellExotic);
2253
2254 fhTimeNoTrigger = new TH2F
2255 ("hTimeNoTrigger",
2256 "events with no foundable trigger, time vs e of clusters",
2257 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2258 fhTimeNoTrigger->SetXTitle("#it{E} (GeV)");
2259 fhTimeNoTrigger->SetYTitle("#it{time} (ns)");
eb86112d 2260 outputContainer->Add(fhTimeNoTrigger);
2261
2262 fhEtaPhiNoTrigger = new TH2F
2263 ("hEtaPhiNoTrigger",
2264 "events with no foundable trigger, eta vs phi of clusters",
2265 netabins,etamin,etamax,nphibins,phimin,phimax);
2266 fhEtaPhiNoTrigger->SetYTitle("#phi (rad)");
2267 fhEtaPhiNoTrigger->SetXTitle("#eta");
2268 outputContainer->Add(fhEtaPhiNoTrigger) ;
2269 }
85c4406e 2270
126b8c62 2271 fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster = new TH2F("hEtaPhiTriggerEMCALBC0_OnlyTrigger_UnMatch_ReMatch_OpenTime",
184ca640 2272 "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=0, un match, rematch open time",
85c4406e 2273 netabins,etamin,etamax,nphibins,phimin,phimax);
126b8c62 2274 fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster->SetYTitle("#phi (rad)");
2275 fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster->SetXTitle("#eta");
2276 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMReMatchOpenTimeCluster) ;
85c4406e 2277
126b8c62 2278 fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster = new TH2F("hTimeTrigger_OnlyTrigger_UnMatch_ReMatch_OpenTime",
184ca640 2279 "cluster #it{time} vs #it{E} of clusters, no match, rematch open time",
85c4406e 2280 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2281 fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster->SetXTitle("#it{E} (GeV)");
2282 fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster->SetYTitle("#it{time} (ns)");
126b8c62 2283 outputContainer->Add(fhTimeTriggerEMCALBCUMReMatchOpenTimeCluster);
85c4406e 2284
2285
126b8c62 2286 fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster = new TH2F("hEtaPhiTriggerEMCALBC0_OnlyTrigger_UnMatch_ReMatch_CheckNeighbours",
184ca640 2287 "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=0, un match, rematch with neighbour patches",
85c4406e 2288 netabins,etamin,etamax,nphibins,phimin,phimax);
126b8c62 2289 fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster->SetYTitle("#phi (rad)");
2290 fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster->SetXTitle("#eta");
2291 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMReMatchCheckNeighCluster) ;
85c4406e 2292
126b8c62 2293 fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster = new TH2F("hTimeTrigger_OnlyTrigger_UnMatch_ReMatch_CheckNeighbours",
184ca640 2294 "cluster #it{time} vs #it{E} of clusters, no match, rematch with neigbour parches",
85c4406e 2295 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2296 fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster->SetXTitle("#it{E} (GeV)");
2297 fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster->SetYTitle("#it{time} (ns)");
126b8c62 2298 outputContainer->Add(fhTimeTriggerEMCALBCUMReMatchCheckNeighCluster);
85c4406e 2299
126b8c62 2300 fhEtaPhiTriggerEMCALBCUMReMatchBothCluster = new TH2F("hEtaPhiTriggerEMCALBC0_OnlyTrigger_UnMatch_ReMatch_Both",
184ca640 2301 "cluster #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=0, un match, rematch open time and neighbour",
85c4406e 2302 netabins,etamin,etamax,nphibins,phimin,phimax);
126b8c62 2303 fhEtaPhiTriggerEMCALBCUMReMatchBothCluster->SetYTitle("#phi (rad)");
2304 fhEtaPhiTriggerEMCALBCUMReMatchBothCluster->SetXTitle("#eta");
2305 outputContainer->Add(fhEtaPhiTriggerEMCALBCUMReMatchBothCluster) ;
85c4406e 2306
126b8c62 2307 fhTimeTriggerEMCALBCUMReMatchBothCluster = new TH2F("hTimeTrigger_OnlyTrigger_UnMatch_ReMatch_Both",
184ca640 2308 "cluster #it{time} vs #it{E} of clusters, no match, rematch open time and neigbour",
85c4406e 2309 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2310 fhTimeTriggerEMCALBCUMReMatchBothCluster->SetXTitle("#it{E} (GeV)");
2311 fhTimeTriggerEMCALBCUMReMatchBothCluster->SetYTitle("#it{time} (ns)");
126b8c62 2312 outputContainer->Add(fhTimeTriggerEMCALBCUMReMatchBothCluster);
2313
2314 fhTimeTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_OpenTime",
184ca640 2315 "cluster #it{time} vs #it{E} of clusters, no match, rematch open time",
126b8c62 2316 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2317 fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)");
2318 fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{time} (ns)");
126b8c62 2319 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchOpenTime);
2320
2321
2322 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_CheckNeighbours",
184ca640 2323 "cluster #it{time} vs #it{E} of clusters, no match, rematch with neigbour parches",
126b8c62 2324 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2325 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)");
2326 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{time} (ns)");
126b8c62 2327 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchCheckNeigh);
2328
2329 fhTimeTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_Both",
184ca640 2330 "cluster #it{time} vs #it{E} of clusters, no match, rematch open time and neigbour",
126b8c62 2331 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2332 fhTimeTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)");
2333 fhTimeTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{time} (ns)");
126b8c62 2334 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchBoth);
85c4406e 2335
c2a62a94 2336 }
2337
477d6cee 2338 fhPhiPhoton = new TH2F
184ca640 2339 ("hPhiPhoton","#phi_{#gamma} vs #it{p}_[T]",nptbins,ptmin,ptmax,nphibins,phimin,phimax);
6175da48 2340 fhPhiPhoton->SetYTitle("#phi (rad)");
184ca640 2341 fhPhiPhoton->SetXTitle("p_{T #gamma} (GeV/#it{c})");
85c4406e 2342 outputContainer->Add(fhPhiPhoton) ;
477d6cee 2343
2344 fhEtaPhoton = new TH2F
184ca640 2345 ("hEtaPhoton","#eta_{#gamma} vs #it{p}_[T]",nptbins,ptmin,ptmax,netabins,etamin,etamax);
477d6cee 2346 fhEtaPhoton->SetYTitle("#eta");
184ca640 2347 fhEtaPhoton->SetXTitle("p_{T #gamma} (GeV/#it{c})");
477d6cee 2348 outputContainer->Add(fhEtaPhoton) ;
2349
6175da48 2350 fhEtaPhiPhoton = new TH2F
85c4406e 2351 ("hEtaPhiPhoton","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
6175da48 2352 fhEtaPhiPhoton->SetYTitle("#phi (rad)");
2353 fhEtaPhiPhoton->SetXTitle("#eta");
2354 outputContainer->Add(fhEtaPhiPhoton) ;
34c16486 2355 if(GetMinPt() < 0.5)
2356 {
20218aea 2357 fhEtaPhi05Photon = new TH2F
74e3eb22 2358 ("hEtaPhi05Photon","#eta vs #phi, E < 0.5",netabins,etamin,etamax,nphibins,phimin,phimax);
20218aea 2359 fhEtaPhi05Photon->SetYTitle("#phi (rad)");
2360 fhEtaPhi05Photon->SetXTitle("#eta");
2361 outputContainer->Add(fhEtaPhi05Photon) ;
2362 }
85c4406e 2363
c2a62a94 2364 if(fCalorimeter=="EMCAL" && fFillEMCALBCHistograms)
2365 {
2366 fhEtaPhiPhotonEMCALBC0 = new TH2F
184ca640 2367 ("hEtaPhiPhotonEMCALBC0","identified photon, #it{E} > 2 GeV, #eta vs #phi, for clusters with |time| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax);
c2a62a94 2368 fhEtaPhiPhotonEMCALBC0->SetYTitle("#phi (rad)");
2369 fhEtaPhiPhotonEMCALBC0->SetXTitle("#eta");
2370 outputContainer->Add(fhEtaPhiPhotonEMCALBC0) ;
2371
2372 fhEtaPhiPhotonEMCALBC1 = new TH2F
184ca640 2373 ("hEtaPhiPhotonEMCALBC1","identified photon, #it{E} > 2 GeV, #eta vs #phi, for clusters with 25 < |time| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax);
c2a62a94 2374 fhEtaPhiPhotonEMCALBC1->SetYTitle("#phi (rad)");
2375 fhEtaPhiPhotonEMCALBC1->SetXTitle("#eta");
2376 outputContainer->Add(fhEtaPhiPhotonEMCALBC1) ;
2377
2378 fhEtaPhiPhotonEMCALBCN = new TH2F
184ca640 2379 ("hEtaPhiPhotonEMCALBCN","identified photon, #it{E} > 2 GeV, #eta vs #phi, for clusters with |time| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax);
c2a62a94 2380 fhEtaPhiPhotonEMCALBCN->SetYTitle("#phi (rad)");
2381 fhEtaPhiPhotonEMCALBCN->SetXTitle("#eta");
2382 outputContainer->Add(fhEtaPhiPhotonEMCALBCN) ;
2383
eb86112d 2384 for(Int_t i = 0; i < nTrigBC; i++)
c2a62a94 2385 {
2386 fhEtaPhiPhotonTriggerEMCALBC[i] = new TH2F
eb86112d 2387 (Form("hEtaPhiPhotonTriggerEMCALBC%d",i-iBCShift),
184ca640 2388 Form("photon #it{E} > 2 GeV, #eta vs #phi, PhotonTrigger EMCAL-BC=%d",i-iBCShift),
c2a62a94 2389 netabins,etamin,etamax,nphibins,phimin,phimax);
2390 fhEtaPhiPhotonTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
2391 fhEtaPhiPhotonTriggerEMCALBC[i]->SetXTitle("#eta");
2392 outputContainer->Add(fhEtaPhiPhotonTriggerEMCALBC[i]) ;
2393
2394 fhTimePhotonTriggerEMCALBC[i] = new TH2F
eb86112d 2395 (Form("hTimePhotonTriggerEMCALBC%d",i-iBCShift),
184ca640 2396 Form("photon #it{time} vs #it{E} of clusters, PhotonTrigger EMCAL-BC=%d",i-iBCShift),
c2a62a94 2397 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2398 fhTimePhotonTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)");
2399 fhTimePhotonTriggerEMCALBC[i]->SetYTitle("#it{time} (ns)");
c2a62a94 2400 outputContainer->Add(fhTimePhotonTriggerEMCALBC[i]);
2401
2402 fhTimePhotonTriggerEMCALBCPileUpSPD[i] = new TH2F
eb86112d 2403 (Form("hTimePhotonTriggerEMCALBC%dPileUpSPD",i-iBCShift),
184ca640 2404 Form("photon #it{time} vs #it{E}, PhotonTrigger EMCAL-BC=%d",i-iBCShift),
c2a62a94 2405 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2406 fhTimePhotonTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)");
2407 fhTimePhotonTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{time} (ns)");
c2a62a94 2408 outputContainer->Add(fhTimePhotonTriggerEMCALBCPileUpSPD[i]);
2409
afb3af8a 2410 fhEtaPhiPhotonTriggerEMCALBCUM[i] = new TH2F
eb86112d 2411 (Form("hEtaPhiPhotonTriggerEMCALBC%d_UnMatch",i-iBCShift),
184ca640 2412 Form("photon #it{E} > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-iBCShift),
afb3af8a 2413 netabins,etamin,etamax,nphibins,phimin,phimax);
2414 fhEtaPhiPhotonTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
2415 fhEtaPhiPhotonTriggerEMCALBCUM[i]->SetXTitle("#eta");
2416 outputContainer->Add(fhEtaPhiPhotonTriggerEMCALBCUM[i]) ;
2417
2418 fhTimePhotonTriggerEMCALBCUM[i] = new TH2F
eb86112d 2419 (Form("hTimePhotonTriggerEMCALBC%d_UnMatch",i-iBCShift),
184ca640 2420 Form("photon #it{time} vs #it{E}, unmatched trigger EMCAL-BC=%d",i-iBCShift),
afb3af8a 2421 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2422 fhTimePhotonTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)");
2423 fhTimePhotonTriggerEMCALBCUM[i]->SetYTitle("#it{time} (ns)");
afb3af8a 2424 outputContainer->Add(fhTimePhotonTriggerEMCALBCUM[i]);
2425
c2a62a94 2426 }
126b8c62 2427
2428 fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimePhotonTriggerBC0_UnMatch_ReMatch_OpenTime",
184ca640 2429 "cluster #it{time} vs #it{E} of photons, no match, rematch open time",
126b8c62 2430 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2431 fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)");
2432 fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{time} (ns)");
126b8c62 2433 outputContainer->Add(fhTimePhotonTriggerEMCALBC0UMReMatchOpenTime);
2434
2435
2436 fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimePhotonTriggerBC0_UnMatch_ReMatch_CheckNeighbours",
184ca640 2437 "cluster #it{time} vs #it{E} of photons, no match, rematch with neigbour parches",
126b8c62 2438 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2439 fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)");
2440 fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{time} (ns)");
126b8c62 2441 outputContainer->Add(fhTimePhotonTriggerEMCALBC0UMReMatchCheckNeigh);
2442
2443 fhTimePhotonTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimePhotonTriggerBC0_UnMatch_ReMatch_Both",
184ca640 2444 "cluster #it{time} vs #it{E} of photons, no match, rematch open time and neigbour",
126b8c62 2445 nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
184ca640 2446 fhTimePhotonTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)");
2447 fhTimePhotonTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{time} (ns)");
126b8c62 2448 outputContainer->Add(fhTimePhotonTriggerEMCALBC0UMReMatchBoth);
2449
c2a62a94 2450 }
6175da48 2451
9e51e29a 2452 fhNLocMax = new TH2F("hNLocMax","Number of local maxima in cluster",
85c4406e 2453 nptbins,ptmin,ptmax,10,0,10);
9e51e29a 2454 fhNLocMax ->SetYTitle("N maxima");
184ca640 2455 fhNLocMax ->SetXTitle("#it{E} (GeV)");
85c4406e 2456 outputContainer->Add(fhNLocMax) ;
9e51e29a 2457
521636d2 2458 //Shower shape
34c16486 2459 if(fFillSSHistograms)
2460 {
85c4406e 2461 fhLam0E = new TH2F ("hLam0E","#lambda_{0}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
521636d2 2462 fhLam0E->SetYTitle("#lambda_{0}^{2}");
184ca640 2463 fhLam0E->SetXTitle("#it{E} (GeV)");
85c4406e 2464 outputContainer->Add(fhLam0E);
521636d2 2465
85c4406e 2466 fhLam1E = new TH2F ("hLam1E","#lambda_{1}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
521636d2 2467 fhLam1E->SetYTitle("#lambda_{1}^{2}");
184ca640 2468 fhLam1E->SetXTitle("#it{E} (GeV)");
85c4406e 2469 outputContainer->Add(fhLam1E);
521636d2 2470
85c4406e 2471 fhDispE = new TH2F ("hDispE"," dispersion^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
521636d2 2472 fhDispE->SetYTitle("D^{2}");
184ca640 2473 fhDispE->SetXTitle("#it{E} (GeV) ");
521636d2 2474 outputContainer->Add(fhDispE);
85c4406e 2475
b5dbb99b 2476 if(!fRejectTrackMatch)
2477 {
85c4406e 2478 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 2479 fhLam0ETM->SetYTitle("#lambda_{0}^{2}");
184ca640 2480 fhLam0ETM->SetXTitle("#it{E} (GeV)");
85c4406e 2481 outputContainer->Add(fhLam0ETM);
b5dbb99b 2482
85c4406e 2483 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 2484 fhLam1ETM->SetYTitle("#lambda_{1}^{2}");
184ca640 2485 fhLam1ETM->SetXTitle("#it{E} (GeV)");
85c4406e 2486 outputContainer->Add(fhLam1ETM);
b5dbb99b 2487
85c4406e 2488 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 2489 fhDispETM->SetYTitle("D^{2}");
184ca640 2490 fhDispETM->SetXTitle("#it{E} (GeV) ");
b5dbb99b 2491 outputContainer->Add(fhDispETM);
2492 }
521636d2 2493
b5dbb99b 2494 if(fCalorimeter == "EMCAL")
2495 {
85c4406e 2496 fhLam0ETRD = new TH2F ("hLam0ETRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
521636d2 2497 fhLam0ETRD->SetYTitle("#lambda_{0}^{2}");
184ca640 2498 fhLam0ETRD->SetXTitle("#it{E} (GeV)");
85c4406e 2499 outputContainer->Add(fhLam0ETRD);
521636d2 2500
85c4406e 2501 fhLam1ETRD = new TH2F ("hLam1ETRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
521636d2 2502 fhLam1ETRD->SetYTitle("#lambda_{1}^{2}");
184ca640 2503 fhLam1ETRD->SetXTitle("#it{E} (GeV)");
85c4406e 2504 outputContainer->Add(fhLam1ETRD);
521636d2 2505
85c4406e 2506 fhDispETRD = new TH2F ("hDispETRD"," dispersion^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
521636d2 2507 fhDispETRD->SetYTitle("Dispersion^{2}");
184ca640 2508 fhDispETRD->SetXTitle("#it{E} (GeV) ");
b5dbb99b 2509 outputContainer->Add(fhDispETRD);
2510
2511 if(!fRejectTrackMatch)
2512 {
85c4406e 2513 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 2514 fhLam0ETMTRD->SetYTitle("#lambda_{0}^{2}");
184ca640 2515 fhLam0ETMTRD->SetXTitle("#it{E} (GeV)");
85c4406e 2516 outputContainer->Add(fhLam0ETMTRD);
b5dbb99b 2517
85c4406e 2518 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 2519 fhLam1ETMTRD->SetYTitle("#lambda_{1}^{2}");
184ca640 2520 fhLam1ETMTRD->SetXTitle("#it{E} (GeV)");
85c4406e 2521 outputContainer->Add(fhLam1ETMTRD);
b5dbb99b 2522
85c4406e 2523 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 2524 fhDispETMTRD->SetYTitle("Dispersion^{2}");
184ca640 2525 fhDispETMTRD->SetXTitle("#it{E} (GeV) ");
85c4406e 2526 outputContainer->Add(fhDispETMTRD);
2527 }
2528 }
521636d2 2529
764ab1f4 2530 if(!fFillOnlySimpleSSHisto)
34c16486 2531 {
85c4406e 2532 fhNCellsLam0LowE = new TH2F ("hNCellsLam0LowE","N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
764ab1f4 2533 fhNCellsLam0LowE->SetXTitle("N_{cells}");
2534 fhNCellsLam0LowE->SetYTitle("#lambda_{0}^{2}");
85c4406e 2535 outputContainer->Add(fhNCellsLam0LowE);
764ab1f4 2536
184ca640 2537 fhNCellsLam0HighE = new TH2F ("hNCellsLam0HighE","N_{cells} in cluster vs #lambda_{0}^{2}, #it{E} > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
764ab1f4 2538 fhNCellsLam0HighE->SetXTitle("N_{cells}");
2539 fhNCellsLam0HighE->SetYTitle("#lambda_{0}^{2}");
85c4406e 2540 outputContainer->Add(fhNCellsLam0HighE);
764ab1f4 2541
85c4406e 2542 fhNCellsLam1LowE = new TH2F ("hNCellsLam1LowE","N_{cells} in cluster vs #lambda_{1}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
764ab1f4 2543 fhNCellsLam1LowE->SetXTitle("N_{cells}");
2544 fhNCellsLam1LowE->SetYTitle("#lambda_{0}^{2}");
85c4406e 2545 outputContainer->Add(fhNCellsLam1LowE);
764ab1f4 2546
184ca640 2547 fhNCellsLam1HighE = new TH2F ("hNCellsLam1HighE","N_{cells} in cluster vs #lambda_{1}^{2}, #it{E} > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
764ab1f4 2548 fhNCellsLam1HighE->SetXTitle("N_{cells}");
2549 fhNCellsLam1HighE->SetYTitle("#lambda_{0}^{2}");
85c4406e 2550 outputContainer->Add(fhNCellsLam1HighE);
764ab1f4 2551
85c4406e 2552 fhNCellsDispLowE = new TH2F ("hNCellsDispLowE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
764ab1f4 2553 fhNCellsDispLowE->SetXTitle("N_{cells}");
2554 fhNCellsDispLowE->SetYTitle("D^{2}");
85c4406e 2555 outputContainer->Add(fhNCellsDispLowE);
764ab1f4 2556
85c4406e 2557 fhNCellsDispHighE = new TH2F ("hNCellsDispHighE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
764ab1f4 2558 fhNCellsDispHighE->SetXTitle("N_{cells}");
2559 fhNCellsDispHighE->SetYTitle("D^{2}");
85c4406e 2560 outputContainer->Add(fhNCellsDispHighE);
764ab1f4 2561
85c4406e 2562 fhEtaLam0LowE = new TH2F ("hEtaLam0LowE","#eta vs #lambda_{0}^{2}, E < 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
764ab1f4 2563 fhEtaLam0LowE->SetYTitle("#lambda_{0}^{2}");
2564 fhEtaLam0LowE->SetXTitle("#eta");
85c4406e 2565 outputContainer->Add(fhEtaLam0LowE);
764ab1f4 2566
85c4406e 2567 fhPhiLam0LowE = new TH2F ("hPhiLam0LowE","#phi vs #lambda_{0}^{2}, E < 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
764ab1f4 2568 fhPhiLam0LowE->SetYTitle("#lambda_{0}^{2}");
2569 fhPhiLam0LowE->SetXTitle("#phi");
85c4406e 2570 outputContainer->Add(fhPhiLam0LowE);
764ab1f4 2571
184ca640 2572 fhEtaLam0HighE = new TH2F ("hEtaLam0HighE","#eta vs #lambda_{0}^{2}, #it{E} > 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
764ab1f4 2573 fhEtaLam0HighE->SetYTitle("#lambda_{0}^{2}");
2574 fhEtaLam0HighE->SetXTitle("#eta");
85c4406e 2575 outputContainer->Add(fhEtaLam0HighE);
764ab1f4 2576
184ca640 2577 fhPhiLam0HighE = new TH2F ("hPhiLam0HighE","#phi vs #lambda_{0}^{2}, #it{E} > 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
764ab1f4 2578 fhPhiLam0HighE->SetYTitle("#lambda_{0}^{2}");
2579 fhPhiLam0HighE->SetXTitle("#phi");
85c4406e 2580 outputContainer->Add(fhPhiLam0HighE);
764ab1f4 2581
85c4406e 2582 fhLam1Lam0LowE = new TH2F ("hLam1Lam0LowE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
764ab1f4 2583 fhLam1Lam0LowE->SetYTitle("#lambda_{0}^{2}");
2584 fhLam1Lam0LowE->SetXTitle("#lambda_{1}^{2}");
85c4406e 2585 outputContainer->Add(fhLam1Lam0LowE);
764ab1f4 2586
184ca640 2587 fhLam1Lam0HighE = new TH2F ("hLam1Lam0HighE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
764ab1f4 2588 fhLam1Lam0HighE->SetYTitle("#lambda_{0}^{2}");
2589 fhLam1Lam0HighE->SetXTitle("#lambda_{1}^{2}");
85c4406e 2590 outputContainer->Add(fhLam1Lam0HighE);
764ab1f4 2591
85c4406e 2592 fhLam0DispLowE = new TH2F ("hLam0DispLowE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
764ab1f4 2593 fhLam0DispLowE->SetXTitle("#lambda_{0}^{2}");
2594 fhLam0DispLowE->SetYTitle("D^{2}");
85c4406e 2595 outputContainer->Add(fhLam0DispLowE);
764ab1f4 2596
184ca640 2597 fhLam0DispHighE = new TH2F ("hLam0DispHighE","#lambda_{0}^{2} vs dispersion^{2} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
764ab1f4 2598 fhLam0DispHighE->SetXTitle("#lambda_{0}^{2}");
2599 fhLam0DispHighE->SetYTitle("D^{2}");
85c4406e 2600 outputContainer->Add(fhLam0DispHighE);
764ab1f4 2601
85c4406e 2602 fhDispLam1LowE = new TH2F ("hDispLam1LowE","Dispersion^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
764ab1f4 2603 fhDispLam1LowE->SetXTitle("D^{2}");
2604 fhDispLam1LowE->SetYTitle("#lambda_{1}^{2}");
85c4406e 2605 outputContainer->Add(fhDispLam1LowE);
764ab1f4 2606
184ca640 2607 fhDispLam1HighE = new TH2F ("hDispLam1HighE","Dispersion^{2} vs #lambda_{1^{2}} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
764ab1f4 2608 fhDispLam1HighE->SetXTitle("D^{2}");
2609 fhDispLam1HighE->SetYTitle("#lambda_{1}^{2}");
85c4406e 2610 outputContainer->Add(fhDispLam1HighE);
764ab1f4 2611
2612 if(fCalorimeter == "EMCAL")
34c16486 2613 {
85c4406e 2614 fhDispEtaE = new TH2F ("hDispEtaE","#sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
184ca640 2615 fhDispEtaE->SetXTitle("#it{E} (GeV)");
764ab1f4 2616 fhDispEtaE->SetYTitle("#sigma^{2}_{#eta #eta}");
85c4406e 2617 outputContainer->Add(fhDispEtaE);
764ab1f4 2618
85c4406e 2619 fhDispPhiE = new TH2F ("hDispPhiE","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
184ca640 2620 fhDispPhiE->SetXTitle("#it{E} (GeV)");
764ab1f4 2621 fhDispPhiE->SetYTitle("#sigma^{2}_{#phi #phi}");
85c4406e 2622 outputContainer->Add(fhDispPhiE);
764ab1f4 2623
85c4406e 2624 fhSumEtaE = new TH2F ("hSumEtaE","#delta^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i})^{2} / #Sigma w_{i} - <#eta>^{2} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
184ca640 2625 fhSumEtaE->SetXTitle("#it{E} (GeV)");
764ab1f4 2626 fhSumEtaE->SetYTitle("#delta^{2}_{#eta #eta}");
85c4406e 2627 outputContainer->Add(fhSumEtaE);
764ab1f4 2628
85c4406e 2629 fhSumPhiE = new TH2F ("hSumPhiE","#delta^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs E",
2630 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
184ca640 2631 fhSumPhiE->SetXTitle("#it{E} (GeV)");
764ab1f4 2632 fhSumPhiE->SetYTitle("#delta^{2}_{#phi #phi}");
85c4406e 2633 outputContainer->Add(fhSumPhiE);
764ab1f4 2634
85c4406e 2635 fhSumEtaPhiE = new TH2F ("hSumEtaPhiE","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",
2636 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
184ca640 2637 fhSumEtaPhiE->SetXTitle("#it{E} (GeV)");
764ab1f4