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