AliPhysics  8d00e07 (8d00e07)
AliAnaCalorimeterQA.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 // --- ROOT system ---
17 #include <TObjArray.h>
18 #include <TDatabasePDG.h>
19 #include <TH3F.h>
20 #include <TObjString.h>
21 
22 //---- AliRoot system ----
23 #include "AliAnaCalorimeterQA.h"
24 #include "AliCaloTrackReader.h"
25 #include "AliVCaloCells.h"
26 #include "AliFiducialCut.h"
27 #include "AliVCluster.h"
28 #include "AliVTrack.h"
29 #include "AliVEvent.h"
30 #include "AliMCEvent.h"
31 #include "AliVEventHandler.h"
32 #include "AliVParticle.h"
33 #include "AliMCAnalysisUtils.h"
34 #include "TCustomBinning.h"
35 
36 // --- Detectors ---
37 #include "AliPHOSGeoUtils.h"
38 #include "AliEMCALGeometry.h"
39 
41 ClassImp(AliAnaCalorimeterQA) ;
43 
44 //__________________________________________
47 //__________________________________________
50 
51 // Switches
52 fFillAllCellTimeHisto(kTRUE),
53 fFillAllPosHisto(kFALSE), fFillAllPosHisto2(kFALSE),
54 fFillAllTH3(kFALSE),
55 fFillAllTMHisto(kTRUE), fFillClusterMaxCellHisto(kFALSE),
56 fFillAllPi0Histo(kTRUE), fFillInvMassOpenAngle(kFALSE),
57 fFillPi0PairDiffTime(kFALSE), fFillInvMassInEMCALWithPHOSDCalAcc(kFALSE),
58 fFillEBinAcceptanceHisto(kFALSE), fFillAllClusterHistograms(kTRUE),
59 fFillAllCellHistograms(kTRUE), fFillAllCellAbsIdHistograms(kTRUE),
60 fCorrelate(kTRUE), fStudyBadClusters(kFALSE),
61 
62 // Parameters and cuts
63 fTimeCutMin(-10000), fTimeCutMax(10000),
64 fCellAmpMin(0),
65 fEMCALCellAmpMin(0), fPHOSCellAmpMin(0),
66 fEMCALClusterM02Min(0),
67 fEMCALClusterNCellMin(0), fPHOSClusterNCellMin(0),
68 fNEBinCuts(0),
69 
70 // Invariant mass
71 fInvMassMinECut(0), fInvMassMaxECut(0),
72 fInvMassMinM02Cut(0), fInvMassMaxM02Cut(0),
73 fInvMassMaxOpenAngle(0), fInvMassMaxTimeDifference(0),
74 
75 fClusterMomentum(), fClusterMomentum2(),
76 fPrimaryMomentum(),
77 fConstantTimeShift(0),
78 
79 // Histograms
80 fhE(0), fhPt(0),
81 fhPhi(0), fhEta(0),
82 fhEtaPhi(0), fhEtaPhiE(0),
83 fhECharged(0), fhPtCharged(0),
84 fhPhiCharged(0), fhEtaCharged(0),
85 fhEtaPhiCharged(0), fhEtaPhiECharged(0),
86 
87 // Invariant mass
88 fhIM(0), fhIMSame(0), fhIMDiff(0),
89 fhIMDCAL(0), fhIMDCALSame(0), fhIMDCALDiff(0),
90 fhIMDCALPHOS(0), fhIMDCALPHOSSame(0),
91 fhIMEMCALPHOS(0), fhIMEMCALPHOSSame(0),
92 fhAsym(0),
93 fhOpAngle(0), fhIMvsOpAngle(0),
94 fhNCellsPerCluster(0), fhNCellsPerClusterNoCut(0),
95 fhNClusters(0),
96 
97 // Timing
98 fhClusterTimeEnergy(0), fhCellTimeSpreadRespectToCellMax(0),
99 fhCellIdCellLargeTimeSpread(0), fhClusterPairDiffTimeE(0), fhClusterPairDiffTimeESameMod(0),
100 fhClusterMaxCellCloseCellRatio(0), fhClusterMaxCellCloseCellDiff(0),
101 fhClusterMaxCellDiff(0), fhClusterMaxCellDiffNoCut(0),
102 //fhClusterMaxCellDiffAverageTime(0), fhClusterMaxCellDiffWeightedTime(0),
103 fhClusterMaxCellECross(0),
104 // fhDispersion(0),
105 fhLambda0(0), fhLambda1(0),
106 fhNLocMax(0), fhNLocMaxStd(0),
107 
108 // bad clusters
109 fhBadClusterEnergy(0), fhBadClusterTimeEnergy(0), fhBadClusterEtaPhi(0),
110 fhBadClusterPairDiffTimeE(0), fhBadCellTimeSpreadRespectToCellMax(0),
111 fhBadClusterMaxCellCloseCellRatio(0), fhBadClusterMaxCellCloseCellDiff(0), fhBadClusterMaxCellDiff(0),
112 //fhBadClusterMaxCellDiffAverageTime(0), fhBadClusterMaxCellDiffWeightedTime(0),
113 fhBadClusterMaxCellECross(0),
114 fhBadClusterLambda0(0), fhBadClusterLambda1(0),
115 
116 // Position
117 fhRNCells(0), fhXNCells(0),
118 fhYNCells(0), fhZNCells(0),
119 fhRE(0), fhXE(0),
120 fhYE(0), fhZE(0),
121 fhXYZ(0),
122 fhRCellE(0), fhXCellE(0),
123 fhYCellE(0), fhZCellE(0),
124 fhXYZCell(0),
125 fhDeltaCellClusterRNCells(0), fhDeltaCellClusterXNCells(0),
126 fhDeltaCellClusterYNCells(0), fhDeltaCellClusterZNCells(0),
127 fhDeltaCellClusterRE(0), fhDeltaCellClusterXE(0),
128 fhDeltaCellClusterYE(0), fhDeltaCellClusterZE(0),
129 
130 // Cells
131 fhNCells(0), fhNCellsCutAmpMin(0),
132 fhAmplitude(0), fhAmpId(0),
133 fhEtaPhiAmpCell(0), fhEtaPhiCell(0),
134 fhTime(0), //fhTimeVz(0),
135 fhTimeId(0), fhTimeL1UnCorrId(0), fhTimeAmp(0),
136 fhAmpIdLowGain(0), fhTimeIdLowGain(0), fhTimeAmpLowGain(0),
137 
138 fhCellECross(0),
139 
140 fhEMCALPHOSCorrNClusters(0), fhEMCALPHOSCorrEClusters(0),
141 fhEMCALPHOSCorrNCells(0), fhEMCALPHOSCorrECells(0),
142 fhEMCALDCALCorrNClusters(0), fhEMCALDCALCorrEClusters(0),
143 fhEMCALDCALCorrNCells(0), fhEMCALDCALCorrECells(0),
144 fhDCALPHOSCorrNClusters(0), fhDCALPHOSCorrEClusters(0),
145 fhDCALPHOSCorrNCells(0), fhDCALPHOSCorrECells(0),
146 fhCaloV0SCorrNClusters(0), fhCaloV0SCorrEClusters(0),
147 fhCaloV0SCorrNCells(0), fhCaloV0SCorrECells(0),
148 fhCaloV0MCorrNClusters(0), fhCaloV0MCorrEClusters(0),
149 fhCaloV0MCorrNCells(0), fhCaloV0MCorrECells(0),
150 fhCaloTrackMCorrNClusters(0), fhCaloTrackMCorrEClusters(0),
151 fhCaloTrackMCorrNCells(0), fhCaloTrackMCorrECells(0),
152 fhCaloCenNClusters(0), fhCaloCenEClusters(0),
153 fhCaloCenNCells(0), fhCaloCenECells(0),
154 fhCaloEvPNClusters(0), fhCaloEvPEClusters(0),
155 fhCaloEvPNCells(0), fhCaloEvPECells(0),
156 
157 // Super-Module dependent histograms
158 fhEMod(0), fhAmpMod(0),
159 fhEWeirdMod(0), fhAmpWeirdMod(0),
160 fhTimeMod(0),
161 fhNClustersMod(0), fhNCellsMod(0),
162 fhNCellsSumAmpPerMod(0), fhNClustersSumEnergyPerMod(0),
163 fhNCellsPerClusterMod(0), fhNCellsPerClusterModNoCut(0),
164 fhNCellsPerClusterWeirdMod(0), fhNCellsPerClusterWeirdModNoCut(0),
165 
166 fhGridCells(0), fhGridCellsE(0), fhGridCellsTime(0),
167 fhGridCellsLowGain(0), fhGridCellsELowGain(0), fhGridCellsTimeLowGain(0),
168 fhTimeAmpPerRCU(0), fhIMMod(0),
169 
170 // MC and reco
171 fhRecoMCE(), fhRecoMCPhi(), fhRecoMCEta(),
172 fhRecoMCDeltaE(), fhRecoMCRatioE(),
173 fhRecoMCDeltaPhi(), fhRecoMCDeltaEta(),
174 
175 // MC only
176 fhGenMCE(), fhGenMCPt(), fhGenMCEtaPhi(),
177 fhGenMCAccE(), fhGenMCAccPt(), fhGenMCAccEtaPhi(),
178 
179 // Matched MC
180 fhEMVxyz(0), fhEMR(0),
181 fhHaVxyz(0), fhHaR(0),
182 fh1EOverP(0), fh2dR(0),
183 fh2EledEdx(0), fh2MatchdEdx(0),
184 fh1EOverPR02(0), fh1EleEOverP(0),
185 fhMCEle1EOverP(0), fhMCEle1dR(0), fhMCEle2MatchdEdx(0),
186 fhMCChHad1EOverP(0), fhMCChHad1dR(0), fhMCChHad2MatchdEdx(0),
187 fhMCNeutral1EOverP(0), fhMCNeutral1dR(0), fhMCNeutral2MatchdEdx(0),
188 fhMCEle1EOverPR02(0), fhMCChHad1EOverPR02(0), fhMCNeutral1EOverPR02(0),
189 fhMCEle1EleEOverP(0), fhMCChHad1EleEOverP(0), fhMCNeutral1EleEOverP(0),
190 fhTrackMatchedDEtaNeg(0), fhTrackMatchedDPhiNeg(0), fhTrackMatchedDEtaDPhiNeg(0),
191 fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0),
192 fhTrackMatchedDEtaNegMod(0), fhTrackMatchedDPhiNegMod(0),
193 fhTrackMatchedDEtaPosMod(0), fhTrackMatchedDPhiPosMod(0)
194 {
195  // MC
196 
197  for(Int_t i = 0; i < 7; i++)
198  {
199  fhRecoMCE[i][0] = 0; fhRecoMCE[i][1] = 0;
200  fhRecoMCPhi[i][0] = 0; fhRecoMCPhi[i][1] = 0;
201  fhRecoMCEta[i][0] = 0; fhRecoMCEta[i][1] = 0;
202  fhRecoMCDeltaE[i][0] = 0; fhRecoMCDeltaE[i][1] = 0;
203  fhRecoMCRatioE[i][0] = 0; fhRecoMCRatioE[i][1] = 0;
204  fhRecoMCDeltaPhi[i][0] = 0; fhRecoMCDeltaPhi[i][1] = 0;
205  fhRecoMCDeltaEta[i][0] = 0; fhRecoMCDeltaEta[i][1] = 0;
206  }
207 
208  for(Int_t i = 0; i < 4; i++)
209  {
210  fhGenMCE[i] = 0;
211  fhGenMCPt[i] = 0;
212  fhGenMCEtaPhi[i] = 0;
213  fhGenMCAccE[i] = 0;
214  fhGenMCAccPt[i] = 0;
215  fhGenMCAccEtaPhi[i] = 0;
216  }
217 
218  //
219 
220  for(Int_t i = 0; i < 14; i++)
221  {
222  fhEBinClusterEtaPhi[i] = 0 ;
223  fhEBinClusterColRow[i] = 0 ;
224  fhEBinCellColRow [i] = 0 ;
225  }
226 
227  for(Int_t bc = 0; bc < 4; bc++) fhTimePerSMPerBC[bc] = 0 ;
228 
229  InitParameters();
230 }
231 
232 //______________________________________________________________________________________________________________________
241 //______________________________________________________________________________________________________________________
242 void AliAnaCalorimeterQA::BadClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells,
243  Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac,
244  Double_t tmax)
245 {
246  // printf("AliAnaCalorimeterQA::BadClusterHistograms() - Event %d - Calorimeter %s \n \t E %f, n cells %d, max cell absId %d, maxCellFrac %f\n",
247  // GetReader()->GetEventNumber(), GetCalorimeterString().Data(),
248  // clus->E(),clus->GetNCells(),absIdMax,maxCellFraction);
249 
250  Double_t tof = clus->GetTOF()*1.e9;
251  if(tof > 400) tof-=fConstantTimeShift;
252 
253  Float_t energy = clus->E();
254 
255  fhBadClusterEnergy ->Fill(energy, GetEventWeight());
256  fhBadClusterTimeEnergy ->Fill(energy, tof , GetEventWeight());
257 
259  {
260  fhBadClusterMaxCellDiff ->Fill(energy, maxCellFraction, GetEventWeight());
261  fhBadClusterMaxCellECross->Fill(energy, eCrossFrac , GetEventWeight());
262  }
263 
264  Float_t phi = fClusterMomentum.Phi();
265  if(phi < 0) phi += TMath::TwoPi();
266 
267  if(energy > 0.5) fhBadClusterEtaPhi->Fill(fClusterMomentum.Eta(), phi, GetEventWeight());
268 
269  fhBadClusterLambda0->Fill(energy, clus->GetM02());
270  fhBadClusterLambda1->Fill(energy, clus->GetM20());
271 
273  {
274  // Clusters in event time difference bad minus good
275 
276  for(Int_t iclus2 = 0; iclus2 < caloClusters->GetEntriesFast(); iclus2++ )
277  {
278  AliVCluster* clus2 = (AliVCluster*) caloClusters->At(iclus2);
279 
280  if(clus->GetID() == clus2->GetID()) continue;
281 
282  Float_t maxCellFraction2 = 0.;
283  Int_t absIdMax2 = GetCaloUtils()->GetMaxEnergyCell(cells, clus2,maxCellFraction2);
284 
285  if(IsGoodCluster(absIdMax2, clus->GetM02(), clus->GetNCells(), cells) && clus2->GetM02() > 0.1 )
286  {
287  Double_t tof2 = clus2->GetTOF()*1.e9;
288  if(tof2>400) tof2-=fConstantTimeShift;
289 
290  fhBadClusterPairDiffTimeE ->Fill(clus->E(), (tof-tof2), GetEventWeight());
291  }
292  } // loop
293  }
294 
295 // // Max cell compared to other cells in cluster
296 // if(fFillAllCellTimeHisto && fFillClusterMaxCellHisto)
297 // {
298 // // Get some time averages
299 // Double_t timeAverages[2] = {0.,0.};
300 // CalculateAverageTime(clus, cells, timeAverages);
301 //
302 // fhBadClusterMaxCellDiffAverageTime ->Fill(clus->E(), tmax-timeAverages[0], GetEventWeight());
303 // fhBadClusterMaxCellDiffWeightedTime->Fill(clus->E(), tmax-timeAverages[1], GetEventWeight());
304 // }
305 
307  {
308  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
309  {
310  Int_t absId = clus->GetCellsAbsId()[ipos];
311  if(absId!=absIdMax && cells->GetCellAmplitude(absIdMax) > 0.01)
312  {
313  Float_t frac = cells->GetCellAmplitude(absId)/cells->GetCellAmplitude(absIdMax);
314 
315  fhBadClusterMaxCellCloseCellRatio->Fill(clus->E(), frac, GetEventWeight());
316  fhBadClusterMaxCellCloseCellDiff ->Fill(clus->E(), cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId), GetEventWeight());
317 
319  {
320  Double_t time = cells->GetCellTime(absId);
321  GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
322 
323  Float_t diff = (tmax-(time*1e9-fConstantTimeShift));
324  fhBadCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff, GetEventWeight());
325 
326  }
327  } // Not max
328  } // loop
329  }
330 }
331 
332 //______________________________________________________________________
337 //______________________________________________________________________
339  AliVCaloCells* cells,
340  Double_t timeAverages[2])
341 {
342  // First recalculate energy in case non linearity was applied
343  Float_t energy = 0;
344  Float_t ampMax = 0, amp = 0;
345 //Int_t absIdMax = -1;
346 
347  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
348  {
349  Int_t id = clus->GetCellsAbsId()[ipos];
350 
351  // Recalibrate cell energy if needed
352  amp = cells->GetCellAmplitude(id);
354 
355  energy += amp;
356 
357  if(amp> ampMax)
358  {
359  ampMax = amp;
360 // absIdMax = id;
361  }
362  } // energy loop
363 
364  // Calculate average time of cells in cluster and weighted average
365  Double_t aTime = 0;
366  Double_t wTime = 0;
367  Float_t wTot = 0;
368  Double_t time = 0;
369  Int_t id =-1;
370  Double_t w = 0;
371  Int_t ncells = clus->GetNCells();
372 
373  for (Int_t ipos = 0; ipos < ncells; ipos++)
374  {
375  id = clus ->GetCellsAbsId()[ipos];
376  amp = cells->GetCellAmplitude(id);
377  time = cells->GetCellTime(id);
378 
379  // Recalibrate energy and time
381  GetCaloUtils()->RecalibrateCellTime (time, GetCalorimeter(), id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
382 
383  w = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(cells->GetCellAmplitude(id),energy);
384  aTime += time*1e9;
385  wTime += time*1e9 * w;
386  wTot += w;
387  }
388 
389  if(ncells > 0) aTime /= ncells;
390  else aTime = 0;
391 
392  if(wTot > 0) wTime /= wTot;
393  else wTime = 0;
394 
395  timeAverages[0] = aTime;
396  timeAverages[1] = wTime;
397 }
398 
399 //____________________________________________________________
402 //____________________________________________________________
403 void AliAnaCalorimeterQA::CellHistograms(AliVCaloCells *cells)
404 {
405  if(!fFillAllCellHistograms) return;
406 
407  Int_t ncells = cells->GetNumberOfCells();
408  if( ncells > 0 ) fhNCells->Fill(ncells, GetEventWeight()) ; // Not ok for PHOS with CPV
409 
410  Int_t ncellsCut = 0;
411  Float_t ecellsCut = 0;
412 
413  AliDebug(1,Form("%s cell entries %d", GetCalorimeterString().Data(), ncells));
414 
415  // Init arrays and used variables
416  Int_t *nCellsInModule = new Int_t [fNModules];
417  Float_t *eCellsInModule = new Float_t[fNModules];
418 
419  for(Int_t imod = 0; imod < fNModules; imod++ )
420  {
421  nCellsInModule[imod] = 0 ;
422  eCellsInModule[imod] = 0.;
423  }
424 
425  Int_t icol = -1, icolAbs = -1;
426  Int_t irow = -1, irowAbs = -1;
427  Int_t iRCU = -1;
428  Float_t amp = 0.;
429  Double_t time = 0.;
430  Double_t timeL1UnCorr= 0.;
431  Int_t id = -1;
432  Bool_t highG = kFALSE;
433  Float_t recalF = 1.;
434  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
435 
436  for (Int_t iCell = 0; iCell < cells->GetNumberOfCells(); iCell++)
437  {
438  if ( cells->GetCellNumber(iCell) < 0 ) continue; // CPV
439 
440  AliDebug(2,Form("Cell : amp %f, absId %d", cells->GetAmplitude(iCell), cells->GetCellNumber(iCell)));
441 
442  Int_t nModule = GetModuleNumberCellIndexesAbsCaloMap(cells->GetCellNumber(iCell),GetCalorimeter(),
443  icol , irow, iRCU,
444  icolAbs, irowAbs );
445 
446  if ( nModule < fFirstModule || nModule > fLastModule )
447  {
448  AliDebug(1,Form("Cell module out of range %d",nModule));
449  continue ;
450  }
451 
452  AliDebug(2,Form("\t module %d, column %d (%d), row %d (%d)", nModule,icolAbs,icol,irowAbs,irow));
453 
454  // Check if the cell is a bad channel
455  if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn())
456  {
457  if(GetCalorimeter()==kEMCAL)
458  {
459  if(GetCaloUtils()->GetEMCALChannelStatus(nModule,icol,irow)) continue;
460  }
461  else
462  {
463  if(GetCaloUtils()->GetPHOSChannelStatus(nModule,icol,irow) ) continue;
464  }
465  } // use bad channel map
466 
467  amp = cells->GetAmplitude(iCell)*recalF;
468  time = cells->GetTime(iCell);
469  id = cells->GetCellNumber(iCell);
470  highG = cells->GetCellHighGain(id);
471  if(IsDataMC()) highG = kTRUE; // MC does not distinguish High and Low, put them all in high
472 
473  // Amplitude recalibration if set
475 
476  // Time recalibration if set
477  GetCaloUtils()->RecalibrateCellTime (time, GetCalorimeter(), id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
478  timeL1UnCorr=time;
479  // Correction of L1 phase if set
480  GetCaloUtils()->RecalibrateCellTimeL1Phase(time,0 , nModule, GetReader()->GetInputEvent()->GetBunchCrossNumber());
481  // Transform time to ns
482  time *= 1.0e9;
483  time-=fConstantTimeShift;
484  timeL1UnCorr *= 1.0e9;
485  timeL1UnCorr-=fConstantTimeShift;
486 
487  if(time < fTimeCutMin || time > fTimeCutMax)
488  {
489  AliDebug(1,Form("Remove cell with Time %f",time));
490  continue;
491  }
492 
493  // Remove exotic cells, defined only for EMCAL
494  if(GetCalorimeter()==kEMCAL &&
495  GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(id, cells, bc)) continue;
496 
497  Double_t binWidthCorrection=1;
498  if(amp>=10)binWidthCorrection=1.0/4;
499  if(amp>=20)binWidthCorrection=1.0/10;
500  fhAmplitude ->Fill(amp, GetEventWeight());
501  fhAmpMod ->Fill(amp, nModule, GetEventWeight());
502  fhAmpWeirdMod->Fill(amp, nModule, GetEventWeight());
503 
505  {
506  fhAmpId->Fill(amp, id , GetEventWeight()*binWidthCorrection);
507 
508  if(!highG) fhAmpIdLowGain->Fill(amp, id, GetEventWeight());
509  }
510 
512  {
513  for(Int_t ie = 0; ie < fNEBinCuts; ie++)
514  {
515  if( amp >= fEBinCuts[ie] && amp < fEBinCuts[ie+1] )
516  {
517  fhEBinCellColRow[ie]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
518  }
519  }
520  }
521 
522  // E cross for exotic cells
523  if(amp > 0.05)
524  {
525  fhCellECross->Fill(amp, 1-GetCaloUtils()->GetECross(id,cells,bc)/amp, GetEventWeight());
526  ecellsCut+=amp ;
527  }
528 
529  if ( amp > fCellAmpMin )
530  {
531  ncellsCut++ ;
532  nCellsInModule[nModule]++ ;
533  eCellsInModule[nModule]+=amp;
534 
535  fhGridCells ->Fill(icolAbs, irowAbs, GetEventWeight());
536  fhGridCellsE->Fill(icolAbs, irowAbs, amp );
537 
538  if(!highG)
539  {
540  fhGridCellsLowGain ->Fill(icolAbs, irowAbs, GetEventWeight());
541  fhGridCellsELowGain->Fill(icolAbs, irowAbs, amp );
542  }
543 
545  {
546  //printf("%s: time %g\n",GetCalorimeterString().Data(), time);
547 
548  // Double_t v[3] = {0,0,0}; //vertex ;
549  // GetReader()->GetVertex(v);
550  // if(amp > 0.5) fhTimeVz ->Fill(TMath::Abs(v[2]), time, GetEventWeight());
551 
552  fhTime ->Fill(time, GetEventWeight());
553  fhTimeAmp ->Fill(amp , time, GetEventWeight());
554 
556  {
557  fhTimeId ->Fill(time, id , GetEventWeight());
558 
559  if(GetCaloUtils()->IsL1PhaseInTimeRecalibrationOn()==1)
560  fhTimeL1UnCorrId ->Fill(timeL1UnCorr, id , GetEventWeight());
561  }
562 
563  Int_t bc = (GetReader()->GetInputEvent()->GetBunchCrossNumber())%4;
564  fhTimePerSMPerBC[bc]->Fill(time, nModule, GetEventWeight());
565 
566  fhGridCellsTime->Fill(icolAbs, irowAbs, time);
567  if(!highG) fhGridCellsTimeLowGain->Fill(icolAbs, irowAbs, time);
568 
569  fhTimeMod->Fill(time, nModule, GetEventWeight());
570 
572  fhTimeAmpPerRCU[nModule*fNRCU+iRCU]->Fill(amp, time, GetEventWeight());
573 
574  if(!highG)
575  {
577  fhTimeIdLowGain ->Fill(time, id , GetEventWeight());
578  fhTimeAmpLowGain->Fill(amp , time, GetEventWeight());
579  }
580  }
581  }
582 
583  // Get Eta-Phi position of Cell
584  if(fFillAllPosHisto)
585  {
586  if ( GetCalorimeter() == kEMCAL && GetCaloUtils()->IsEMCALGeoMatrixSet() )
587  {
588  Float_t celleta = 0.;
589  Float_t cellphi = 0.;
590  GetEMCALGeometry()->EtaPhiFromIndex(id, celleta, cellphi);
591 
592  if ( cellphi < 0 ) cellphi+=TMath::TwoPi();
593 
594  if(fFillAllTH3)
595  fhEtaPhiAmpCell->Fill(celleta, cellphi, amp, GetEventWeight());
596  else
597  fhEtaPhiCell ->Fill(celleta, cellphi, GetEventWeight());
598 
599  Double_t cellpos[] = {0, 0, 0};
600  GetEMCALGeometry()->GetGlobal(id, cellpos);
601 
602  fhXCellE->Fill(cellpos[0], amp, GetEventWeight()) ;
603  fhYCellE->Fill(cellpos[1], amp, GetEventWeight()) ;
604  fhZCellE->Fill(cellpos[2], amp, GetEventWeight()) ;
605 
606  Float_t rcell = TMath::Sqrt(cellpos[0]*cellpos[0]+cellpos[1]*cellpos[1]);//+cellpos[2]*cellpos[2]);
607  fhRCellE ->Fill(rcell, amp, GetEventWeight()) ;
608 
609  fhXYZCell->Fill(cellpos[0], cellpos[1], cellpos[2], GetEventWeight()) ;
610  } // EMCAL Cells
611  else if ( GetCalorimeter() == kPHOS && GetCaloUtils()->IsPHOSGeoMatrixSet() )
612  {
613  TVector3 xyz;
614  Int_t relId[4], module;
615  Float_t xCell, zCell;
616 
617  GetPHOSGeometry()->AbsToRelNumbering(id,relId);
618  module = relId[0];
619  GetPHOSGeometry()->RelPosInModule(relId,xCell,zCell);
620  GetPHOSGeometry()->Local2Global(module,xCell,zCell,xyz);
621 
622  Float_t rcell = TMath::Sqrt(xyz.X()*xyz.X()+xyz.Y()*xyz.Y());
623 
624  fhXCellE ->Fill(xyz.X(), amp, GetEventWeight()) ;
625  fhYCellE ->Fill(xyz.Y(), amp, GetEventWeight()) ;
626  fhZCellE ->Fill(xyz.Z(), amp, GetEventWeight()) ;
627  fhRCellE ->Fill(rcell , amp, GetEventWeight()) ;
628 
629  fhXYZCell->Fill(xyz.X(), xyz.Y(), xyz.Z(), GetEventWeight()) ;
630  } // PHOS cells
631  } // Fill cell position histograms
632 
633 
634  } // Cell loop
635 
636  // Fill the cells after the cut on min amplitude and bad/exotic channels
637  if( ncellsCut > 0 ) fhNCellsCutAmpMin->Fill(ncellsCut, GetEventWeight()) ;
638 
639  // Number of cells per module
640  for(Int_t imod = 0; imod < fNModules; imod++ )
641  {
642  if ( imod < fFirstModule || imod > fLastModule ) continue ;
643 
644  AliDebug(1,Form("Module %d, calo %s, N cells %d, sum Amp %f", imod, GetCalorimeterString().Data(), nCellsInModule[imod], eCellsInModule[imod]));
645 
646  fhNCellsMod ->Fill(nCellsInModule[imod], imod, GetEventWeight()) ;
647  fhSumCellsAmpMod->Fill(eCellsInModule[imod], imod, GetEventWeight()) ;
648 
650  fhNCellsSumAmpPerMod[imod]->Fill(eCellsInModule[imod], nCellsInModule[imod], GetEventWeight());
651  }
652 
653  delete [] nCellsInModule;
654  delete [] eCellsInModule;
655 }
656 
657 //__________________________________________________________________________
660 //__________________________________________________________________________
662 {
663  Int_t nCaloCellsPerCluster = clus->GetNCells();
664 
665  UShort_t * indexList = clus->GetCellsAbsId();
666 
667  Float_t pos[3];
668  clus->GetPosition(pos);
669 
670  Float_t clEnergy = clus->E();
671 
672  // Loop on cluster cells
673  for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++)
674  {
675  // printf("Index %d\n",ipos);
676  Int_t absId = indexList[ipos];
677 
678  //Get position of cell compare to cluster
679 
680  if ( GetCalorimeter() == kEMCAL && GetCaloUtils()->IsEMCALGeoMatrixSet() )
681  {
682  Double_t cellpos[] = {0, 0, 0};
683  GetEMCALGeometry()->GetGlobal(absId, cellpos);
684 
685  fhDeltaCellClusterXNCells->Fill(pos[0]-cellpos[0], nCaloCellsPerCluster, GetEventWeight()) ;
686  fhDeltaCellClusterYNCells->Fill(pos[1]-cellpos[1], nCaloCellsPerCluster, GetEventWeight()) ;
687  fhDeltaCellClusterZNCells->Fill(pos[2]-cellpos[2], nCaloCellsPerCluster, GetEventWeight()) ;
688 
689  fhDeltaCellClusterXE->Fill(pos[0]-cellpos[0], clEnergy, GetEventWeight()) ;
690  fhDeltaCellClusterYE->Fill(pos[1]-cellpos[1], clEnergy, GetEventWeight()) ;
691  fhDeltaCellClusterZE->Fill(pos[2]-cellpos[2], clEnergy, GetEventWeight()) ;
692 
693  Float_t r = TMath::Sqrt(pos[0] *pos[0] + pos[1] * pos[1] );
694  Float_t rcell = TMath::Sqrt(cellpos[0]*cellpos[0] + cellpos[1]* cellpos[1]);
695 
696  fhDeltaCellClusterRNCells->Fill(r-rcell, nCaloCellsPerCluster, GetEventWeight()) ;
697  fhDeltaCellClusterRE ->Fill(r-rcell, clEnergy , GetEventWeight()) ;
698  } // EMCAL and its matrices are available
699  else if ( GetCalorimeter() == kPHOS && GetCaloUtils()->IsPHOSGeoMatrixSet() )
700  {
701  TVector3 xyz;
702  Int_t relId[4], module;
703  Float_t xCell, zCell;
704 
705  GetPHOSGeometry()->AbsToRelNumbering(absId,relId);
706  module = relId[0];
707  GetPHOSGeometry()->RelPosInModule(relId,xCell,zCell);
708  GetPHOSGeometry()->Local2Global(module,xCell,zCell,xyz);
709 
710  fhDeltaCellClusterXNCells->Fill(pos[0]-xyz.X(), nCaloCellsPerCluster, GetEventWeight()) ;
711  fhDeltaCellClusterYNCells->Fill(pos[1]-xyz.Y(), nCaloCellsPerCluster, GetEventWeight()) ;
712  fhDeltaCellClusterZNCells->Fill(pos[2]-xyz.Z(), nCaloCellsPerCluster, GetEventWeight()) ;
713 
714  fhDeltaCellClusterXE->Fill(pos[0]-xyz.X(), clEnergy, GetEventWeight()) ;
715  fhDeltaCellClusterYE->Fill(pos[1]-xyz.Y(), clEnergy, GetEventWeight()) ;
716  fhDeltaCellClusterZE->Fill(pos[2]-xyz.Z(), clEnergy, GetEventWeight()) ;
717 
718  Float_t r = TMath::Sqrt(pos[0] * pos[0] + pos[1] * pos[1] );
719  Float_t rcell = TMath::Sqrt(xyz.X() * xyz.X() + xyz.Y() * xyz.Y());
720 
721  fhDeltaCellClusterRNCells->Fill(r-rcell, nCaloCellsPerCluster, GetEventWeight()) ;
722  fhDeltaCellClusterRE ->Fill(r-rcell, clEnergy , GetEventWeight()) ;
723  } // PHOS and its matrices are available
724  } // cluster cell loop
725 }
726 
727 //__________________________________________________________________________________________________________________
736 //__________________________________________________________________________________________________________________
737 void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells,
738  Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac,
739  Double_t tmax)
740 {
741  Double_t tof = clus->GetTOF()*1.e9;
742  if(tof>400) tof-=fConstantTimeShift;
743  fhClusterTimeEnergy ->Fill(clus->E(), tof , GetEventWeight());
744 
745  fhLambda0 ->Fill(clus->E(), clus->GetM02() , GetEventWeight());
746  fhLambda1 ->Fill(clus->E(), clus->GetM20() , GetEventWeight());
747 //fhDispersion ->Fill(clus->E(), clus->GetDispersion(), GetEventWeight());
748  fhNLocMax ->Fill(clus->E(), GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells), GetEventWeight());
749  fhNLocMaxStd ->Fill(clus->E(), clus->GetNExMax() , GetEventWeight());
750 
752  {
753  fhClusterMaxCellDiff ->Fill(clus->E(), maxCellFraction, GetEventWeight());
754  fhClusterMaxCellECross->Fill(clus->E(), eCrossFrac , GetEventWeight());
755  }
756 
757  Int_t nModule = GetModuleNumber(clus);
758  Int_t nCaloCellsPerCluster = clus->GetNCells();
759 
760  // Clusters in event time difference
762  {
763  for(Int_t iclus2 = 0; iclus2 < caloClusters->GetEntriesFast(); iclus2++ )
764  {
765  AliVCluster* clus2 = (AliVCluster*) caloClusters->At(iclus2);
766 
767  if( clus->GetID() == clus2->GetID() ) continue;
768 
769  if( clus->GetM02() > 0.01 && clus2->GetM02() > 0.01 )
770  {
771  Int_t nModule2 = GetModuleNumber(clus2);
772 
773  Double_t tof2 = clus2->GetTOF()*1.e9;
774  if(tof2>400) tof2-=fConstantTimeShift;
775 
776 
777  fhClusterPairDiffTimeE ->Fill(clus->E(), tof-tof2, GetEventWeight());
778 
779  if ( nModule2 == nModule )
780  fhClusterPairDiffTimeESameMod->Fill(clus->E(), tof-tof2, GetEventWeight());
781  }
782  } // loop
783  } // fill cluster pair time diff
784 
785  if(nCaloCellsPerCluster > 1 &&
787  {
788  // Check time of cells respect to max energy cell
789 
790 // if(fFillAllCellTimeHisto && fFillClusterMaxCellHisto)
791 // {
792 // // Get some time averages
793 // Double_t timeAverages[2] = {0.,0.};
794 // CalculateAverageTime(clus, cells, timeAverages);
795 //
796 // fhClusterMaxCellDiffAverageTime ->Fill(clus->E(), tmax-timeAverages[0], GetEventWeight());
797 // fhClusterMaxCellDiffWeightedTime ->Fill(clus->E(), tmax-timeAverages[1], GetEventWeight());
798 // }
799 
800  for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++)
801  {
802  Int_t absId = clus->GetCellsAbsId()[ipos];
803  if( absId == absIdMax || cells->GetCellAmplitude(absIdMax) < 0.01 ) continue;
804 
805  Float_t frac = cells->GetCellAmplitude(absId)/cells->GetCellAmplitude(absIdMax);
806 
808  {
809  fhClusterMaxCellCloseCellRatio->Fill(clus->E(), frac, GetEventWeight());
810  fhClusterMaxCellCloseCellDiff ->Fill(clus->E(), cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId), GetEventWeight());
811  }
812 
814  {
815  Double_t time = cells->GetCellTime(absId);
816  GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
817 
818  Float_t diff = (tmax-(time*1.0e9-fConstantTimeShift));
819 
821  fhCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff, GetEventWeight());
822 
824  TMath::Abs(TMath::Abs(diff) > 100) && clus->E() > 1 )
826  }
827 
828  } // Fill cell-cluster histogram loop
829  } // Check time and energy of cells respect to max energy cell if cluster of more than 1 cell
830 
831  Float_t e = fClusterMomentum.E();
832  Float_t pt = fClusterMomentum.Pt();
833  Float_t eta = fClusterMomentum.Eta();
834  Float_t phi = GetPhi(fClusterMomentum.Phi());
835 
836  AliDebug(1,Form("cluster: E %2.3f, pT %2.3f, eta %2.3f, phi %2.3f",e,pt,eta,phi*TMath::RadToDeg()));
837 
838  fhE ->Fill(e, GetEventWeight());
839  if(nModule >=0 && nModule < fNModules)
840  {
841  fhEMod ->Fill(e, nModule, GetEventWeight());
842  fhEWeirdMod->Fill(e, nModule, GetEventWeight()); // different binning
843  }
844 
845  fhPt ->Fill(pt , GetEventWeight());
846  fhPhi ->Fill(phi, GetEventWeight());
847  fhEta ->Fill(eta, GetEventWeight());
848 
850  {
851  Int_t icol = -1, irow = -1, iRCU = -1, icolAbs = -1, irowAbs = -1;
852  GetModuleNumberCellIndexesAbsCaloMap(absIdMax,GetCalorimeter(), icol, irow, iRCU, icolAbs, irowAbs);
853 
854  for(Int_t ie = 0; ie < fNEBinCuts; ie++)
855  {
856  if( e >= fEBinCuts[ie] && e < fEBinCuts[ie+1] )
857  {
858  fhEBinClusterEtaPhi[ie]->Fill(eta,phi,GetEventWeight()) ;
859 
860  fhEBinClusterColRow[ie]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
861  }
862  }
863  }
864  else if ( fFillAllTH3 ) fhEtaPhiE->Fill(eta, phi, e, GetEventWeight());
865  else if ( e > 0.5 ) fhEtaPhi ->Fill(eta, phi, GetEventWeight());
866 
867  // Cells per cluster
868  fhNCellsPerCluster->Fill(e, nCaloCellsPerCluster, GetEventWeight());
869 
870  if(e > 100)
871  fhNCellsPerClusterWeirdMod->Fill(nCaloCellsPerCluster, nModule, GetEventWeight());
872 
873  // Position
875  {
876  Float_t pos[3] ;
877  clus->GetPosition(pos);
878 
879  fhXE ->Fill(pos[0], e, GetEventWeight());
880  fhYE ->Fill(pos[1], e, GetEventWeight());
881  fhZE ->Fill(pos[2], e, GetEventWeight());
882 
883  fhXYZ ->Fill(pos[0], pos[1], pos[2], GetEventWeight());
884 
885  fhXNCells->Fill(pos[0], nCaloCellsPerCluster, GetEventWeight());
886  fhYNCells->Fill(pos[1], nCaloCellsPerCluster, GetEventWeight());
887  fhZNCells->Fill(pos[2], nCaloCellsPerCluster, GetEventWeight());
888 
889  Float_t rxyz = TMath::Sqrt(pos[0]*pos[0]+pos[1]*pos[1]);//+pos[2]*pos[2]);
890 
891  fhRE ->Fill(rxyz, e , GetEventWeight());
892  fhRNCells->Fill(rxyz, nCaloCellsPerCluster, GetEventWeight());
893  }
894 
895  if( nModule >= 0 && nModule < fNModules ) fhNCellsPerClusterMod[nModule]->Fill(e, nCaloCellsPerCluster, GetEventWeight());
896 }
897 
898 //____________________________________________________________________________
910 //____________________________________________________________________________
912  AliVCaloCells* cells)
913 {
914  if(!fFillAllClusterHistograms) return;
915 
916  Int_t nLabel = 0 ;
917  Int_t *labels = 0x0;
918  Int_t nCaloClusters = caloClusters->GetEntriesFast() ;
919  Int_t nCaloClustersAccepted = 0 ;
920  Int_t nCaloCellsPerCluster = 0 ;
921  Bool_t matched = kFALSE;
922  Int_t nModule =-1 ;
923  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
924 
925  // Get vertex for photon momentum calculation and event selection
926  Double_t v[3] = {0,0,0}; //vertex ;
927 //GetReader()->GetVertex(v);
928 
929  Int_t *nClustersInModule = new Int_t [fNModules];
930  Float_t *energyInModule = new Float_t[fNModules];
931  for(Int_t imod = 0; imod < fNModules; imod++ )
932  {
933  nClustersInModule[imod] = 0;
934  energyInModule [imod] = 0;
935  }
936 
937  AliDebug(1,Form("In %s there are %d clusters", GetCalorimeterString().Data(), nCaloClusters));
938 
939  // Loop over CaloClusters
940  for(Int_t iclus = 0; iclus < nCaloClusters; iclus++)
941  {
942  AliDebug(1,Form("Cluster: %d/%d, data %d",iclus+1,nCaloClusters,GetReader()->GetDataType()));
943 
944  AliVCluster* clus = (AliVCluster*) caloClusters->At(iclus);
945 
946  // SuperModule number of cluster
947  nModule = GetModuleNumber(clus);
948  if ( nModule < fFirstModule || nModule > fLastModule )
949  {
950  AliDebug(1,Form("Cluster module out of range %d",nModule));
951  continue ;
952  }
953 
954  // Get the fraction of the cluster energy that carries the cell with highest energy and its absId
955  Float_t maxCellFraction = 0.;
956  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus,maxCellFraction);
957 
958  // Cut on time of clusters
959  Double_t tof = clus->GetTOF()*1.e9;
960  if(tof>400) tof-=fConstantTimeShift;
961 
962  if( tof < fTimeCutMin || tof > fTimeCutMax )
963  {
964  AliDebug(1,Form("Remove cluster with TOF %2.2f",tof));
965  continue;
966  }
967 
968  // Get cluster kinematics
969  clus->GetMomentum(fClusterMomentum,v);
970 
971  // Check only certain regions
972  Bool_t in = kTRUE;
974  if(!in)
975  {
976  AliDebug(1,Form("Remove cluster with phi %2.2f and eta %2.2f",
977  GetPhi(fClusterMomentum.Phi())*TMath::RadToDeg(),fClusterMomentum.Eta()));
978  continue;
979  }
980 
981  // MC labels
982  nLabel = clus->GetNLabels();
983  labels = clus->GetLabels();
984 
985  // Cells per cluster
986  nCaloCellsPerCluster = clus->GetNCells();
987 
988  // Cluster mathed with track?
989  matched = GetCaloPID()->IsTrackMatched(clus,GetCaloUtils(), GetReader()->GetInputEvent());
990 
991  // Get time of max cell
992  Double_t tmax = cells->GetCellTime(absIdMax);
993  GetCaloUtils()->RecalibrateCellTime(tmax, GetCalorimeter(), absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
994  tmax*=1.e9;
995  tmax-=fConstantTimeShift;
996  //
997  // Fill histograms related to single cluster
998  //
999 
1000  // Fill some histograms before applying the exotic cell / bad map cut
1001  if(fStudyBadClusters)
1002  {
1003  fhNCellsPerClusterNoCut->Fill(clus->E(), nCaloCellsPerCluster, GetEventWeight());
1004 
1005  if(nModule >=0 && nModule < fNModules)
1006  {
1007  fhNCellsPerClusterModNoCut[nModule]->Fill(clus->E(), nCaloCellsPerCluster, GetEventWeight());
1008  if(clus->E() > 100) fhNCellsPerClusterWeirdModNoCut->Fill(nCaloCellsPerCluster, nModule, GetEventWeight());
1009  }
1010 
1012  fhClusterMaxCellDiffNoCut->Fill(clus->E(), maxCellFraction, GetEventWeight());
1013  }
1014 
1015  Float_t ampMax = cells->GetCellAmplitude(absIdMax);
1016  GetCaloUtils()->RecalibrateCellAmplitude(ampMax,GetCalorimeter(), absIdMax);
1017 
1018  // Check bad clusters if requested and rejection was not on
1019  Bool_t goodCluster = IsGoodCluster(absIdMax, clus->GetM02(), nCaloCellsPerCluster, cells);
1020 
1021  Float_t eCrossFrac = 0;
1022  if(ampMax > 0.01) eCrossFrac = 1-GetCaloUtils()->GetECross(absIdMax,cells,bc)/ampMax;
1023 
1024  AliDebug(1,Form("Accept cluster? %d",goodCluster));
1025 
1026  if(!goodCluster)
1027  {
1028  if ( fStudyBadClusters ) BadClusterHistograms(clus, caloClusters,
1029  cells, absIdMax,
1030  maxCellFraction,
1031  eCrossFrac, tmax);
1032  continue;
1033  }
1034 
1035  //
1036  ClusterHistograms(clus, caloClusters, cells, absIdMax,
1037  maxCellFraction, eCrossFrac, tmax);
1038 
1039  nCaloClustersAccepted++;
1040 
1041  //
1042  if(nModule >=0 && nModule < fNModules && fClusterMomentum.E() > 2*fCellAmpMin)
1043  {
1044  nClustersInModule[nModule]++;
1045  if(clus->E() > 0.5)
1046  energyInModule [nModule] += clus->E();
1047  }
1048 
1049  // Cells in cluster position
1051 
1052  // Fill histograms related to single cluster, mc vs data
1053  Int_t mcOK = kFALSE;
1054  Int_t pdg = -1;
1055  if(IsDataMC() && nLabel > 0 && labels)
1056  mcOK = ClusterMCHistograms(matched, labels, nLabel, pdg);
1057 
1058  // Matched clusters with tracks, also do some MC comparison, needs input from ClusterMCHistograms
1059  if( matched && fFillAllTMHisto)
1060  ClusterMatchedWithTrackHistograms(clus,mcOK,pdg);
1061 
1062  // Invariant mass
1063  // Try to reduce background with a mild shower shape cut and no more than 1 maxima
1064  // in cluster and remove low energy clusters
1065 
1066  if ( fFillAllPi0Histo
1067  && nCaloClusters > 1
1068  && nCaloCellsPerCluster > 1
1069  && GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells) == 1
1070  && clus->GetM02() < fInvMassMaxM02Cut
1071  && clus->GetM02() > fInvMassMinM02Cut
1072  && clus->E() > fInvMassMinECut
1073  && clus->E() < fInvMassMaxECut
1074  )
1075  InvariantMassHistograms(iclus, nModule, caloClusters,cells);
1076 
1077  } // Cluster loop
1078 
1079  // Number of clusters histograms
1080  if(nCaloClustersAccepted > 0) fhNClusters->Fill(nCaloClustersAccepted, GetEventWeight());
1081 
1082  // Number of clusters per module
1083  for(Int_t imod = 0; imod < fNModules; imod++ )
1084  {
1085  if ( imod < fFirstModule || imod > fLastModule ) continue ;
1086 
1087  AliDebug(1,Form("Module %d calo %s clusters %d, sum E %f", imod, GetCalorimeterString().Data(), nClustersInModule[imod], energyInModule[imod]));
1088 
1089  fhNClustersMod ->Fill(nClustersInModule[imod], imod, GetEventWeight());
1090  fhSumClustersEnergyMod->Fill(energyInModule [imod], imod, GetEventWeight());
1091 
1092  fhNClustersSumEnergyPerMod[imod]->Fill(energyInModule[imod], nClustersInModule[imod], GetEventWeight());
1093  }
1094 
1095  delete [] nClustersInModule;
1096  delete [] energyInModule;
1097 }
1098 
1099 //__________________________________________________________________________________
1108 //__________________________________________________________________________________
1110  Int_t nLabels, Int_t & pdg )
1111 {
1112  if(!labels || nLabels<=0)
1113  {
1114  AliWarning(Form("Strange, labels array %p, n labels %d", labels,nLabels));
1115  return kFALSE;
1116  }
1117 
1118  AliDebug(1,Form("Primaries: nlabels %d",nLabels));
1119 
1120  // Play with the MC stack if available
1121  Int_t label = labels[0];
1122 
1123  if(label < 0)
1124  {
1125  AliDebug(1,Form(" *** bad label ***: label %d", label));
1126  return kFALSE;
1127  }
1128 
1129  if( label >= GetMC()->GetNumberOfTracks())
1130  {
1131  AliDebug(1,Form("*** large label ***: label %d, n tracks %d", label, GetMC()->GetNumberOfTracks()));
1132  return kFALSE;
1133  }
1134 
1135  Float_t e = fClusterMomentum.E();
1136  Float_t eta = fClusterMomentum.Eta();
1137  Float_t phi = fClusterMomentum.Phi();
1138  if(phi < 0) phi +=TMath::TwoPi();
1139 
1140  AliVParticle * primary = 0x0;
1141 
1142  Int_t pdg0 =-1; Int_t status = -1; Int_t iMother = -1; Int_t iParent = -1;
1143  Float_t vxMC = 0; Float_t vyMC = 0;
1144  Float_t eMC = 0; //Float_t ptMC= 0;
1145  Float_t phiMC = 0; Float_t etaMC = 0;
1146  Int_t charge = 0;
1147 
1148  // Check the origin.
1149  Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels, nLabels, GetMC());
1150 
1151  if ( !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown) )
1152  {
1153  primary = GetMC()->GetTrack(label);
1154  iMother = label;
1155  pdg0 = TMath::Abs(primary->PdgCode());
1156  pdg = pdg0;
1157  status = primary->MCStatusCode();
1158  vxMC = primary->Xv();
1159  vyMC = primary->Yv();
1160  iParent = primary->GetMother();
1161 
1162  AliDebug(1,"Cluster most contributing mother:");
1163  AliDebug(1,Form("\t Mother label %d, pdg %d, %s, status %d, Primary? %d, Physical Primary? %d, parent %d",
1164  iMother, pdg0, primary->GetName(),status, primary->IsPrimary(), primary->IsPhysicalPrimary(), iParent));
1165 
1166  // Get final particle, no conversion products
1167  if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
1168  {
1169  // Get the parent
1170  primary = GetMC()->GetTrack(iParent);
1171  pdg = TMath::Abs(primary->PdgCode());
1172 
1173  AliDebug(2,"Converted cluster!. Find before conversion:");
1174 
1175  while((pdg == 22 || pdg == 11) && status != 1) //&& !aodprimary->IsPhysicalPrimary()
1176  {
1177  Int_t iMotherOrg = iMother;
1178  iMother = iParent;
1179  primary = GetMC()->GetTrack(iMother);
1180  status = primary->MCStatusCode();
1181  pdg = TMath::Abs(primary->PdgCode());
1182  iParent = primary->GetMother();
1183 
1184  // If gone too back and non stable, assign the decay photon/electron
1185  // there are other possible decays, ignore them for the moment
1186  if(pdg==111 || pdg==221)
1187  {
1188  primary = GetMC()->GetTrack(iMotherOrg);
1189  break;
1190  }
1191 
1192  if( iParent < 0 )
1193  {
1194  iParent = iMother;
1195  break;
1196  }
1197 
1198  AliDebug(2,Form("\t pdg %d, index %d, %s, status %d",pdg, iMother, primary->GetName(),status));
1199  }
1200 
1201  AliDebug(1,"Converted Cluster mother before conversion:");
1202  AliDebug(1,Form("\t Mother label %d, pdg %d, %s, status %d, Primary? %d, Physical Primary? %d, parent %d",
1203  iMother, pdg, primary->GetName(), status, primary->IsPrimary(), primary->IsPhysicalPrimary(), iParent));
1204 
1205  }
1206 
1207  // Overlapped pi0 (or eta, there will be very few), get the meson
1208  if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) ||
1209  GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta))
1210  {
1211  AliDebug(2,"Overlapped Meson decay!, Find it:");
1212 
1213  while(pdg != 111 && pdg != 221)
1214  {
1215  //printf("iMother %d, pdg %d, iParent %d, pdg %d\n",iMother,pdg,iParent,GetMC()->Particle(iParent)->GetPdgCode());
1216  iMother = iParent;
1217  primary = GetMC()->GetTrack(iMother);
1218  status = primary->MCStatusCode();
1219  pdg = TMath::Abs(primary->PdgCode());
1220  iParent = primary->GetMother();
1221 
1222  if( iParent < 0 ) break;
1223 
1224  AliDebug(2,Form("\t pdg %d, %s, index %d",pdg, primary->GetName(),iMother));
1225 
1226  if(iMother==-1)
1227  {
1228  AliWarning("Tagged as Overlapped photon but meson not found, why?");
1229  //break;
1230  }
1231  }
1232 
1233  AliDebug(2,Form("Overlapped %s decay, label %d",primary->GetName(),iMother));
1234  }
1235 
1236  eMC = primary->E();
1237  //ptMC = primary->Pt();
1238  phiMC = primary->Phi();
1239  etaMC = primary->Eta();
1240  pdg = TMath::Abs(primary->PdgCode());
1241  //charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
1242  charge = primary->Charge();
1243  }
1244 
1245  //Float_t vz = primary->Vz();
1246  Float_t rVMC = TMath::Sqrt(vxMC*vxMC + vyMC*vyMC);
1247  if( ( pdg == 22 || TMath::Abs(pdg) == 11 ) && status != 1 )
1248  {
1249  fhEMVxyz ->Fill(vxMC, vyMC, GetEventWeight());//,vz);
1250  fhEMR ->Fill(e , rVMC, GetEventWeight());
1251  }
1252 
1253  //printf("reco e %f, pt %f, phi %f, eta %f \n", e, pt, phi, eta);
1254  //printf("prim e %f, pt %f, phi %f, eta %f \n", eMC,ptMC,phiMC ,etaMC );
1255  //printf("vertex: vx %f, vy %f, vz %f, r %f \n", vxMC, vyMC, vz, r);
1256 
1257  // Overlapped pi0 (or eta, there will be very few)
1258  Int_t mcIndex = -1;
1259  if ( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0 ) )
1260  {
1261  mcIndex = kmcPi0;
1262  } // Overlapped pizero decay
1263  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta ) )
1264  {
1265  mcIndex = kmcEta;
1266  } // Overlapped eta decay
1267  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton ) )
1268  {
1269  if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
1270  mcIndex = kmcPhotonConv ;
1271  else
1272  mcIndex = kmcPhoton ;
1273  } // photon
1274  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron) )
1275  {
1276  mcIndex = kmcElectron;
1277  fhEMVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
1278  fhEMR ->Fill(e , rVMC, GetEventWeight());
1279  }
1280  else if(charge == 0)
1281  {
1282  mcIndex = kmcNeHadron;
1283  fhHaVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
1284  fhHaR ->Fill(e , rVMC, GetEventWeight());
1285  }
1286  else if(charge!=0)
1287  {
1288  mcIndex = kmcChHadron;
1289  fhHaVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
1290  fhHaR ->Fill(e , rVMC, GetEventWeight());
1291  }
1292 
1293  //printf("mc index %d\n",mcIndex);
1294 
1295  if( mcIndex >= 0 && mcIndex < 7 && e > 0.5 && eMC > 0.5)
1296  {
1297  fhRecoMCE [mcIndex][(matched)]->Fill(e , eMC , GetEventWeight());
1298  fhRecoMCEta [mcIndex][(matched)]->Fill(eta, etaMC , GetEventWeight());
1299  fhRecoMCPhi [mcIndex][(matched)]->Fill(phi, phiMC , GetEventWeight());
1300  fhRecoMCRatioE [mcIndex][(matched)]->Fill(e , e/eMC , GetEventWeight());
1301  fhRecoMCDeltaE [mcIndex][(matched)]->Fill(e , eMC-e , GetEventWeight());
1302  fhRecoMCDeltaPhi[mcIndex][(matched)]->Fill(e , phiMC-phi, GetEventWeight());
1303  fhRecoMCDeltaEta[mcIndex][(matched)]->Fill(e , etaMC-eta, GetEventWeight());
1304  }
1305 
1306  if( primary ) return kTRUE ;
1307  else return kFALSE;
1308 }
1309 
1310 //_________________________________________________________________________________________________________
1315 //_________________________________________________________________________________________________________
1317 {
1318  Float_t e = fClusterMomentum.E();
1319  Float_t pt = fClusterMomentum.Pt();
1320  Float_t eta = fClusterMomentum.Eta();
1321  Float_t phi = fClusterMomentum.Phi();
1322  if(phi < 0) phi +=TMath::TwoPi();
1323 
1324  fhECharged ->Fill(e , GetEventWeight());
1325  fhPtCharged ->Fill(pt , GetEventWeight());
1326  fhPhiCharged ->Fill(phi, GetEventWeight());
1327  fhEtaCharged ->Fill(eta, GetEventWeight());
1328 
1329  if ( fFillAllTH3 ) fhEtaPhiECharged->Fill(eta, phi, e, GetEventWeight());
1330  else if ( e > 0.5 ) fhEtaPhiCharged ->Fill(eta, phi, GetEventWeight());
1331 
1332  // Study the track and matched cluster if track exists.
1333 
1334  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(clus, GetReader()->GetInputEvent());
1335 
1336  if(!track) return ;
1337 
1338  Double_t tpt = track->Pt();
1339  Double_t tmom = track->P();
1340  Double_t dedx = track->GetTPCsignal();
1341  Int_t nITS = track->GetNcls(0);
1342  Int_t nTPC = track->GetNcls(1);
1343  Bool_t positive = kFALSE;
1344  if(track) positive = (track->Charge()>0);
1345 
1346  // Residuals
1347  Float_t deta = clus->GetTrackDz();
1348  Float_t dphi = clus->GetTrackDx();
1349  Double_t dR = TMath::Sqrt(dphi*dphi + deta*deta);
1350  Int_t nModule = GetModuleNumber(clus);
1351 
1352  if( TMath::Abs(dphi) < 999 )
1353  {
1354  if(positive)
1355  {
1356  fhTrackMatchedDEtaPos->Fill(e, deta, GetEventWeight());
1357  fhTrackMatchedDPhiPos->Fill(e, dphi, GetEventWeight());
1358 
1359  if(e > 0.5)
1360  {
1361  fhTrackMatchedDEtaPosMod ->Fill(deta, nModule, GetEventWeight());
1362  fhTrackMatchedDPhiPosMod ->Fill(dphi, nModule, GetEventWeight());
1363  fhTrackMatchedDEtaDPhiPos->Fill(deta, dphi , GetEventWeight());
1364  }
1365  }
1366  else
1367  {
1368  fhTrackMatchedDEtaNeg->Fill(e, deta, GetEventWeight());
1369  fhTrackMatchedDPhiNeg->Fill(e, dphi, GetEventWeight());
1370 
1371  if(e > 0.5)
1372  {
1373  fhTrackMatchedDEtaNegMod ->Fill(deta, nModule, GetEventWeight());
1374  fhTrackMatchedDPhiNegMod ->Fill(dphi, nModule, GetEventWeight());
1375  fhTrackMatchedDEtaDPhiNeg->Fill(deta, dphi , GetEventWeight());
1376  }
1377  }
1378  }
1379 
1380  Double_t eOverP = e/tmom;
1381  fh1EOverP->Fill(tpt, eOverP, GetEventWeight());
1382  if(e > 0.5 && tpt > 0.5) fh1EOverPMod->Fill(eOverP, nModule, GetEventWeight());
1383 
1384  if(dR < 0.02)
1385  {
1386  fh1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
1387  if(e > 0.5 && tpt > 0.5) fh1EOverPR02Mod->Fill(eOverP, nModule, GetEventWeight());
1388 
1389  if(dedx > 60 && dedx < 100)
1390  {
1391  fh1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
1392  if(e > 0.5 && tpt > 0.5) fh1EleEOverPMod->Fill(eOverP, nModule, GetEventWeight());
1393  }
1394  }
1395 
1396  fh2dR->Fill(e, dR, GetEventWeight());
1397  fh2MatchdEdx->Fill(tmom, dedx, GetEventWeight());
1398 
1399  if(e > 0.5 && tmom > 0.5)
1400  {
1401  fh2dRMod->Fill(dR, nModule, GetEventWeight());
1402  fh2MatchdEdxMod->Fill(dedx, nModule, GetEventWeight());
1403  }
1404 
1405  if(dR < 0.02 && eOverP > 0.6 && eOverP < 1.2
1406  && clus->GetNCells() > 1 && nITS > 3 && nTPC > 20)
1407  {
1408  fh2EledEdx->Fill(tmom, dedx, GetEventWeight());
1409  if(e > 0.5 && tmom > 0.5) fh2EledEdxMod->Fill(dedx, nModule, GetEventWeight());
1410  }
1411 
1412  if(IsDataMC() && okPrimary)
1413  {
1414  Double_t charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
1415 
1416  if(TMath::Abs(pdg) == 11)
1417  {
1418  fhMCEle1EOverP ->Fill(tpt , eOverP, GetEventWeight());
1419  fhMCEle1dR ->Fill(dR , GetEventWeight());
1420  fhMCEle2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
1421 
1422  if(dR < 0.02)
1423  {
1424  fhMCEle1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
1425  if(dedx > 60 && dedx < 100) fhMCEle1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
1426  }
1427  }
1428  else if(charge!=0)
1429  {
1430  fhMCChHad1EOverP ->Fill(tpt , eOverP, GetEventWeight());
1431  fhMCChHad1dR ->Fill(dR , GetEventWeight());
1432  fhMCChHad2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
1433 
1434  if(dR < 0.02)
1435  {
1436  fhMCChHad1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
1437  if(dedx > 60 && dedx < 100) fhMCChHad1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
1438  }
1439  }
1440  else if(charge == 0)
1441  {
1442  fhMCNeutral1EOverP ->Fill(tpt , eOverP, GetEventWeight());
1443  fhMCNeutral1dR ->Fill(dR , GetEventWeight());
1444  fhMCNeutral2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
1445 
1446  if(dR < 0.02)
1447  {
1448  fhMCNeutral1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
1449  if(dedx > 60 && dedx < 100) fhMCNeutral1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
1450  }
1451  }
1452  } // DataMC
1453 }
1454 
1455 //___________________________________
1458 //___________________________________
1460 {
1461  // Clusters arrays
1462  TObjArray * caloClustersEMCAL = GetEMCALClusters();
1463  TObjArray * caloClustersPHOS = GetPHOSClusters();
1464 
1465  if(!caloClustersEMCAL || !caloClustersPHOS)
1466  {
1467  AliDebug(1,Form("PHOS (%p) or EMCAL (%p) clusters array not available, do not correlate",caloClustersPHOS,caloClustersEMCAL));
1468  return ;
1469  }
1470 
1471  // Cells arrays
1472  AliVCaloCells * cellsEMCAL = GetEMCALCells();
1473  AliVCaloCells * cellsPHOS = GetPHOSCells();
1474 
1475  if(!cellsEMCAL || !cellsPHOS)
1476  {
1477  AliDebug(1,Form("PHOS (%p) or EMCAL (%p) cells array ot available, do not correlate",cellsPHOS,cellsEMCAL));
1478  return ;
1479  }
1480 
1481  // Clusters parameters
1482  Int_t nclEMCAL = 0;
1483  Int_t nclDCAL = 0;
1484  Int_t nclPHOS = 0;
1485 
1486  Float_t sumClusterEnergyEMCAL = 0;
1487  Float_t sumClusterEnergyDCAL = 0;
1488  Float_t sumClusterEnergyPHOS = 0;
1489 
1490  Int_t iclus = 0;
1491  Float_t energy = 0;
1492  AliVCluster* cluster = 0;
1493  for(iclus = 0 ; iclus < caloClustersEMCAL->GetEntriesFast() ; iclus++)
1494  {
1495  cluster = (AliVCluster*)caloClustersEMCAL->At(iclus);
1496  Float_t energy = cluster->E();
1497 
1498  if( energy < 0.5 ) continue;
1499 
1500  if(cluster->GetCellsAbsId()[0] < 12288)
1501  {
1502  nclEMCAL++;
1503  sumClusterEnergyEMCAL += energy;
1504  }
1505  else
1506  {
1507  nclDCAL++;
1508  sumClusterEnergyDCAL += energy;
1509  }
1510  }
1511 
1512  for(iclus = 0 ; iclus < caloClustersPHOS ->GetEntriesFast(); iclus++)
1513  {
1514  cluster = (AliVCluster*) caloClustersPHOS->At(iclus);
1515 
1516  energy = cluster->E();
1517 
1518  if( energy < 0.5 ) continue;
1519 
1520  nclPHOS++;
1521  sumClusterEnergyPHOS += energy;
1522  }
1523 
1524  // Cells parameters
1525  Int_t ncellsEMCAL = 0 ;
1526  Int_t ncellsDCAL = 0 ;
1527  Int_t ncellsPHOS = 0;
1528 
1529  Float_t sumCellEnergyEMCAL = 0;
1530  Float_t sumCellEnergyDCAL = 0;
1531  Float_t sumCellEnergyPHOS = 0;
1532  Int_t icell = 0;
1533  for(icell = 0 ; icell < cellsEMCAL->GetNumberOfCells() ; icell++)
1534  {
1535  Float_t amp = cellsEMCAL->GetAmplitude(icell);
1536  Int_t cellId = cellsEMCAL->GetCellNumber(icell);
1537 
1538  if (amp < fEMCALCellAmpMin) continue;
1539 
1540  if( cellId < 12288)
1541  {
1542  ncellsEMCAL++;
1543  sumCellEnergyEMCAL += amp;
1544  }
1545  else
1546  {
1547  ncellsDCAL++;
1548  sumCellEnergyDCAL += amp;
1549  }
1550  }
1551 
1552  for(icell = 0 ; icell < cellsPHOS->GetNumberOfCells(); icell++)
1553  {
1554  Float_t amp = cellsPHOS->GetAmplitude(icell);
1555  Int_t cellId = cellsPHOS->GetCellNumber(icell);
1556 
1557  if ( cellId < 0 ) continue ; // CPV
1558 
1559  if ( amp < fPHOSCellAmpMin ) continue;
1560 
1561  ncellsPHOS++;
1562  sumCellEnergyPHOS += amp;
1563  }
1564 
1565  // Fill Histograms
1566 
1567  fhEMCALPHOSCorrNClusters->Fill(nclEMCAL , nclPHOS , GetEventWeight());
1568  fhEMCALPHOSCorrEClusters->Fill(sumClusterEnergyEMCAL, sumClusterEnergyPHOS, GetEventWeight());
1569  fhEMCALPHOSCorrNCells ->Fill(ncellsEMCAL , ncellsPHOS , GetEventWeight());
1570  fhEMCALPHOSCorrECells ->Fill(sumCellEnergyEMCAL , sumCellEnergyPHOS , GetEventWeight());
1571 
1572  fhEMCALDCALCorrNClusters->Fill(nclEMCAL , nclDCAL , GetEventWeight());
1573  fhEMCALDCALCorrEClusters->Fill(sumClusterEnergyEMCAL, sumClusterEnergyDCAL, GetEventWeight());
1574  fhEMCALDCALCorrNCells ->Fill(ncellsEMCAL , ncellsDCAL , GetEventWeight());
1575  fhEMCALDCALCorrECells ->Fill(sumCellEnergyEMCAL , sumCellEnergyDCAL , GetEventWeight());
1576 
1577  fhDCALPHOSCorrNClusters ->Fill(nclDCAL , nclPHOS , GetEventWeight());
1578  fhDCALPHOSCorrEClusters ->Fill(sumClusterEnergyDCAL , sumClusterEnergyPHOS, GetEventWeight());
1579  fhDCALPHOSCorrNCells ->Fill(ncellsDCAL , ncellsPHOS , GetEventWeight());
1580  fhDCALPHOSCorrECells ->Fill(sumCellEnergyDCAL , sumCellEnergyPHOS , GetEventWeight());
1581 
1582  Int_t v0S = GetV0Signal(0) + GetV0Signal(1);
1584  Int_t trM = GetTrackMultiplicity();
1585  Float_t cen = GetEventCentrality();
1586  Float_t ep = GetEventPlaneAngle();
1587 
1588  Int_t ncl = nclPHOS;
1589  Float_t sumClusterEnergy = sumClusterEnergyPHOS;
1590  Int_t ncells = ncellsPHOS;
1591  Float_t sumCellEnergy = sumCellEnergyPHOS;
1592 
1593  if ( GetCalorimeter() == kEMCAL )
1594  {
1595  ncl = nclEMCAL + nclDCAL;
1596  sumClusterEnergy = sumClusterEnergyEMCAL + sumClusterEnergyDCAL;
1597  ncells = ncellsEMCAL + ncellsDCAL;
1598  sumCellEnergy = sumCellEnergyEMCAL + sumCellEnergyDCAL;
1599  }
1600 
1601  fhCaloV0MCorrNClusters ->Fill(v0M, ncl , GetEventWeight());
1602  fhCaloV0MCorrEClusters ->Fill(v0M, sumClusterEnergy, GetEventWeight());
1603  fhCaloV0MCorrNCells ->Fill(v0M, ncells , GetEventWeight());
1604  fhCaloV0MCorrECells ->Fill(v0M, sumCellEnergy , GetEventWeight());
1605 
1606  fhCaloV0SCorrNClusters ->Fill(v0S, ncl , GetEventWeight());
1607  fhCaloV0SCorrEClusters ->Fill(v0S, sumClusterEnergy, GetEventWeight());
1608  fhCaloV0SCorrNCells ->Fill(v0S, ncells , GetEventWeight());
1609  fhCaloV0SCorrECells ->Fill(v0S, sumCellEnergy , GetEventWeight());
1610 
1611  fhCaloTrackMCorrNClusters->Fill(trM, ncl , GetEventWeight());
1612  fhCaloTrackMCorrEClusters->Fill(trM, sumClusterEnergy, GetEventWeight());
1613  fhCaloTrackMCorrNCells ->Fill(trM, ncells , GetEventWeight());
1614  fhCaloTrackMCorrECells ->Fill(trM, sumCellEnergy , GetEventWeight());
1615 
1616  fhCaloCenNClusters ->Fill(cen, ncl , GetEventWeight());
1617  fhCaloCenEClusters ->Fill(cen, sumClusterEnergy, GetEventWeight());
1618  fhCaloCenNCells ->Fill(cen, ncells , GetEventWeight());
1619  fhCaloCenECells ->Fill(cen, sumCellEnergy , GetEventWeight());
1620 
1621  fhCaloEvPNClusters ->Fill(ep , ncl , GetEventWeight());
1622  fhCaloEvPEClusters ->Fill(ep , sumClusterEnergy, GetEventWeight());
1623  fhCaloEvPNCells ->Fill(ep , ncells , GetEventWeight());
1624  fhCaloEvPECells ->Fill(ep , sumCellEnergy , GetEventWeight());
1625 
1626  AliDebug(1,"Correlate():");
1627  AliDebug(1,Form("\t EMCAL: N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
1628  ncellsEMCAL,nclEMCAL, sumCellEnergyEMCAL,sumClusterEnergyEMCAL));
1629  AliDebug(1,Form("\t DCAL : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
1630  ncellsDCAL,nclDCAL, sumCellEnergyDCAL,sumClusterEnergyDCAL));
1631  AliDebug(1,Form("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
1632  ncellsPHOS,nclPHOS,sumCellEnergyPHOS,sumClusterEnergyPHOS));
1633  AliDebug(1,Form("\t V0 : Signal %d, Multiplicity %d, Track Multiplicity %d", v0S,v0M,trM));
1634  AliDebug(1,Form("\t centrality : %f, Event plane angle %f", cen,ep));
1635 }
1636 
1637 //_________________________________________________
1639 //_________________________________________________
1641 {
1642  TString parList ; //this will be list of parameters used for this analysis.
1643  const Int_t buffersize = 255;
1644  char onePar[buffersize] ;
1645 
1646  snprintf(onePar,buffersize,"--- AliAnaCalorimeterQA ---:") ;
1647  parList+=onePar ;
1648  snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
1649  parList+=onePar ;
1650  snprintf(onePar,buffersize,"Time Cut : %2.2f < T < %2.2f ns;",fTimeCutMin, fTimeCutMax) ;
1651  parList+=onePar ;
1652  snprintf(onePar,buffersize,"Cell Amplitude: PHOS > %2.2f GeV, EMCAL > %2.2f GeV;",fPHOSCellAmpMin, fEMCALCellAmpMin) ;
1653  parList+=onePar ;
1654  snprintf(onePar,buffersize,"Cluster M02: EMCAL > %2.2f ;",fEMCALClusterM02Min) ;
1655  parList+=onePar ;
1656  snprintf(onePar,buffersize,"N cells per cluster: PHOS >= %d, EMCAL >= %d;",fPHOSClusterNCellMin, fEMCALClusterNCellMin) ;
1657  parList+=onePar ;
1658  snprintf(onePar,buffersize,"Inv. Mass %2.1f < E_cl < %2.1f GeV;",fInvMassMinECut, fInvMassMaxECut) ;
1659  parList+=onePar ;
1660  snprintf(onePar,buffersize,"Inv. Mass %2.1f < M02 < %2.1f GeV;",fInvMassMinM02Cut, fInvMassMaxM02Cut) ;
1661  parList+=onePar ;
1662  snprintf(onePar,buffersize,"Cluster pair opening angle < %2.1f rad;",fInvMassMaxOpenAngle) ;
1663  parList+=onePar ;
1664  snprintf(onePar,buffersize,"Cluster pair time difference < %2.1f rad;",fInvMassMaxTimeDifference) ;
1665  parList+=onePar ;
1666 
1667  //Get parameters set in base class.
1668  //parList += GetBaseParametersList() ;
1669 
1670  //Get parameters set in FiducialCut class (not available yet)
1671  //parlist += GetFidCut()->GetFidCutParametersList()
1672 
1673  return new TObjString(parList) ;
1674 }
1675 
1676 //___________________________________________________
1679 //___________________________________________________
1681 {
1682  TList * outputContainer = new TList() ;
1683  outputContainer->SetName("QAHistos") ;
1684 
1685  // Init the number of modules, set in the class AliCalorimeterUtils
1686  //
1687  InitCaloParameters(); // See AliCaloTrackCorrBaseClass
1688 
1689  Int_t totalSM = fLastModule-fFirstModule+1;
1690 
1691  //printf("N SM %d, first SM %d, last SM %d, total %d\n",fNModules,fFirstModule,fLastModule, totalSM);
1692 
1693  // Histogram binning and ranges
1694  //
1715 
1719 
1720  // TM residuals
1727 
1728  // Cell column-row histograms, see base class for data members setting
1729  //fNMaxColsFull+2,-1.5,fNMaxColsFull+0.5, fNMaxRowsFull+2,-1.5,fNMaxRowsFull+0.5
1730  Int_t ncolcell = fNMaxColsFull+2;
1731  Float_t colcellmin = -1.5;
1732  Float_t colcellmax = fNMaxColsFull+0.5;
1733 
1735  Float_t rowcellmin = fNMaxRowsFullMin-1.5;
1736  Float_t rowcellmax = fNMaxRowsFullMax+0.5;
1737 
1738  //
1739  // Init histograms
1740  //
1741 
1742  // Calorimeter cluster histograms
1743  //
1745  {
1746  fhE = new TH1F ("hE","#it{E} reconstructed clusters ", nptbins*5,ptmin,ptmax*5);
1747  fhE->SetXTitle("#it{E} (GeV)");
1748  outputContainer->Add(fhE);
1749 
1750  fhPt = new TH1F ("hPt","#it{p}_{T} reconstructed clusters", nptbins,ptmin,ptmax);
1751  fhPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1752  outputContainer->Add(fhPt);
1753 
1754  fhNClusters = new TH1F ("hNClusters","# clusters", nclbins,nclmin,nclmax);
1755  fhNClusters->SetXTitle("#it{n}_{clusters}");
1756  outputContainer->Add(fhNClusters);
1757 
1758  fhNCellsPerCluster = new TH2F ("hNCellsPerCluster","# cells per cluster vs energy",nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
1759  fhNCellsPerCluster->SetXTitle("#it{E} (GeV)");
1760  fhNCellsPerCluster->SetYTitle("#it{n}_{cells}");
1761  outputContainer->Add(fhNCellsPerCluster);
1762 
1763  fhNCellsPerClusterWeirdMod = new TH2F ("hNCellsPerClusterWeirdMod","# cells per cluster, E > 100 GeV, per SM",
1764  nceclbins*2,nceclmin,nceclmax*2,totalSM,fFirstModule-0.5,fLastModule+0.5);
1765  fhNCellsPerClusterWeirdMod->SetYTitle("SM number");
1766  fhNCellsPerClusterWeirdMod->SetXTitle("#it{n}_{cells}");
1767  outputContainer->Add(fhNCellsPerClusterWeirdMod);
1768 
1769  // Acceptance plots
1770  //
1771  fhPhi = new TH1F ("hPhi","#varphi reconstructed clusters ",nphibins,phimin,phimax);
1772  fhPhi->SetXTitle("#varphi (rad)");
1773  outputContainer->Add(fhPhi);
1774 
1775  fhEta = new TH1F ("hEta","#eta reconstructed clusters ",netabins,etamin,etamax);
1776  fhEta->SetXTitle("#eta ");
1777  outputContainer->Add(fhEta);
1778 
1780  {
1781  for(Int_t ie=0; ie<fNEBinCuts; ie++)
1782  {
1783  fhEBinClusterEtaPhi[ie] = new TH2F
1784  (Form("hEBin%d_Cluster_EtaPhi",ie),
1785  Form("#eta vs #varphi, cluster, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
1786  netabins,etamin,etamax,nphibins,phimin,phimax);
1787  fhEBinClusterEtaPhi[ie]->SetYTitle("#varphi (rad)");
1788  fhEBinClusterEtaPhi[ie]->SetXTitle("#eta");
1789  outputContainer->Add(fhEBinClusterEtaPhi[ie]) ;
1790 
1791  fhEBinClusterColRow[ie] = new TH2F
1792  (Form("hEBin%d_Cluster_ColRow",ie),
1793  Form("column vs row, cluster max E cell, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
1794  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
1795  fhEBinClusterColRow[ie]->SetYTitle("row");
1796  fhEBinClusterColRow[ie]->SetXTitle("column");
1797  outputContainer->Add(fhEBinClusterColRow[ie]) ;
1798 
1800  {
1801  fhEBinCellColRow[ie] = new TH2F
1802  (Form("hEBin%d_Cell_ColRow",ie),
1803  Form("column vs row, cell, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
1804  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
1805  fhEBinCellColRow[ie]->SetYTitle("row");
1806  fhEBinCellColRow[ie]->SetXTitle("column");
1807  outputContainer->Add(fhEBinCellColRow[ie]) ;
1808  }
1809  }
1810  }
1811  else
1812  {
1813  if(fFillAllTH3)
1814  {
1815  fhEtaPhiE = new TH3F ("hEtaPhiE","#eta vs #varphi vs energy, reconstructed clusters",
1816  netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax);
1817  fhEtaPhiE->SetXTitle("#eta ");
1818  fhEtaPhiE->SetYTitle("#varphi (rad)");
1819  fhEtaPhiE->SetZTitle("#it{E} (GeV) ");
1820  outputContainer->Add(fhEtaPhiE);
1821  }
1822  else
1823  {
1824  fhEtaPhi = new TH2F ("hEtaPhi","#eta vs #varphi for #it{E} > 0.5 GeV, reconstructed clusters",
1825  netabins,etamin,etamax,nphibins,phimin,phimax);
1826  fhEtaPhi->SetXTitle("#eta ");
1827  fhEtaPhi->SetYTitle("#varphi (rad)");
1828  outputContainer->Add(fhEtaPhi);
1829  }
1830  }
1831 
1832  fhClusterTimeEnergy = new TH2F ("hClusterTimeEnergy","energy vs TOF, reconstructed clusters",
1833  nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1834  fhClusterTimeEnergy->SetXTitle("#it{E} (GeV) ");
1835  fhClusterTimeEnergy->SetYTitle("TOF (ns)");
1836  outputContainer->Add(fhClusterTimeEnergy);
1837 
1839  {
1840  fhClusterPairDiffTimeE = new TH2F("hClusterPairDiffTimeE","cluster pair time difference vs E, only good clusters",
1841  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1842  fhClusterPairDiffTimeE->SetXTitle("#it{E}_{cluster} (GeV)");
1843  fhClusterPairDiffTimeE->SetYTitle("#Delta #it{t} (ns)");
1844  outputContainer->Add(fhClusterPairDiffTimeE);
1845 
1846  fhClusterPairDiffTimeESameMod = new TH2F("hClusterPairDiffTimeESameMod","cluster pair time difference vs E, only good clusters",
1847  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1848  fhClusterPairDiffTimeESameMod->SetXTitle("#it{E}_{cluster} (GeV)");
1849  fhClusterPairDiffTimeESameMod->SetYTitle("#Delta #it{t} (ns)");
1850  outputContainer->Add(fhClusterPairDiffTimeESameMod);
1851  }
1852 
1853  // Shower shape
1854  //
1855  //fhDispersion = new TH2F ("hDispersion","shower shape, Dispersion^{2} vs E for bad cluster ",
1856  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1857  //fhDispersion->SetXTitle("#it{E}_{cluster} (GeV)");
1858  //fhDispersion->SetYTitle("Dispersion");
1859  //outputContainer->Add(fhDispersion);
1860 
1861  fhLambda0 = new TH2F ("hLambda0","shower shape, #lambda^{2}_{0} vs E",
1862  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1863  fhLambda0->SetXTitle("#it{E}_{cluster} (GeV)");
1864  fhLambda0->SetYTitle("#lambda^{2}_{0}");
1865  outputContainer->Add(fhLambda0);
1866 
1867  fhLambda1 = new TH2F ("hLambda1","shower shape, #lambda^{2}_{1} vs E",
1868  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1869  fhLambda1->SetXTitle("#it{E}_{cluster} (GeV)");
1870  fhLambda1->SetYTitle("#lambda^{2}_{1}");
1871  outputContainer->Add(fhLambda1);
1872 
1873  fhNLocMax = new TH2F ("hNLocMax","#it{n}_{LM} vs E",
1874  nptbins,ptmin,ptmax,10,0,10);
1875  fhNLocMax->SetXTitle("#it{E}_{cluster} (GeV)");
1876  fhNLocMax->SetYTitle("#it{n}_{LM}");
1877  outputContainer->Add(fhNLocMax);
1878 
1879  fhNLocMaxStd = new TH2F ("hNLocMaxStd","#it{n}_{LM} vs E",
1880  nptbins,ptmin,ptmax,10,0,10);
1881  fhNLocMaxStd->SetXTitle("#it{E}_{cluster} (GeV)");
1882  fhNLocMaxStd->SetYTitle("#it{n}_{LM}");
1883  outputContainer->Add(fhNLocMaxStd);
1884 
1886  {
1887  fhClusterMaxCellCloseCellRatio = new TH2F ("hClusterMaxCellCloseCellRatio","energy vs ratio of max cell / neighbour cell, reconstructed clusters",
1888  nptbins,ptmin,ptmax, 100,0,1.);
1889  fhClusterMaxCellCloseCellRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1890  fhClusterMaxCellCloseCellRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{cell max}");
1891  outputContainer->Add(fhClusterMaxCellCloseCellRatio);
1892 
1893  fhClusterMaxCellCloseCellDiff = new TH2F ("hClusterMaxCellCloseCellDiff","energy vs ratio of max cell / neighbour cell, reconstructed clusters",
1894  nptbins,ptmin,ptmax, 500,0,100.);
1895  fhClusterMaxCellCloseCellDiff->SetXTitle("#it{E}_{cluster} (GeV) ");
1896  fhClusterMaxCellCloseCellDiff->SetYTitle("#it{E}_{cell max}-#it{E}_{cell i} (GeV)");
1897  outputContainer->Add(fhClusterMaxCellCloseCellDiff);
1898 
1899  fhClusterMaxCellDiff = new TH2F ("hClusterMaxCellDiff","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters",
1900  nptbins,ptmin,ptmax, 500,0,1.);
1901  fhClusterMaxCellDiff->SetXTitle("#it{E}_{cluster} (GeV) ");
1902  fhClusterMaxCellDiff->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1903  outputContainer->Add(fhClusterMaxCellDiff);
1904 
1905  fhClusterMaxCellECross = new TH2F ("hClusterMaxCellECross","1 - Energy in cross around max energy cell / max energy cell vs cluster energy, good clusters",
1906  nptbins,ptmin,ptmax, 400,-1,1.);
1907  fhClusterMaxCellECross->SetXTitle("#it{E}_{cluster} (GeV) ");
1908  fhClusterMaxCellECross->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell max}");
1909  outputContainer->Add(fhClusterMaxCellECross);
1910  }
1911 
1912  if(fStudyBadClusters)
1913  {
1914  fhNCellsPerClusterNoCut = new TH2F ("hNCellsPerClusterNoCut","# cells per cluster vs energy, no bad clusters cut",
1915  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
1916  fhNCellsPerClusterNoCut->SetXTitle("#it{E} (GeV)");
1917  fhNCellsPerClusterNoCut->SetYTitle("#it{n}_{cells}");
1918  outputContainer->Add(fhNCellsPerClusterNoCut);
1919 
1920  fhNCellsPerClusterWeirdModNoCut = new TH2F ("hNCellsPerClusterWeirdNoCutMod","# cells per cluster vs energy, E > 100, no bad clusters cut, per SM",
1921  nceclbins,nceclmin,nceclmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
1922  fhNCellsPerClusterWeirdModNoCut->SetYTitle("SM number");
1923  fhNCellsPerClusterWeirdModNoCut->SetXTitle("#it{n}_{cells}");
1924  outputContainer->Add(fhNCellsPerClusterWeirdModNoCut);
1925 
1926  fhBadClusterEnergy = new TH1F ("hBadClusterEnergy","Bad cluster energy", nptbins,ptmin,ptmax);
1927  fhBadClusterEnergy->SetXTitle("#it{E}_{cluster} (GeV) ");
1928  outputContainer->Add(fhBadClusterEnergy);
1929 
1930  fhBadClusterEtaPhi = new TH2F ("hBadClusterEtaPhi","Bad cluster, #eta vs #varphi, #it{E} > 0.5 GeV",
1931  netabins,etamin,etamax,nphibins,phimin,phimax);
1932  fhBadClusterEtaPhi->SetXTitle("#eta ");
1933  fhBadClusterEtaPhi->SetXTitle("#varphi (rad) ");
1934  outputContainer->Add(fhBadClusterEtaPhi);
1935 
1936  fhBadClusterLambda0 = new TH2F ("hBadClusterLambda0","Bad cluster,shower shape, #lambda^{2}_{0} vs E",
1937  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1938  fhBadClusterLambda0->SetXTitle("#it{E}_{cluster}");
1939  fhBadClusterLambda0->SetYTitle("#lambda^{2}_{0}");
1940  outputContainer->Add(fhBadClusterLambda0);
1941 
1942  fhBadClusterLambda1 = new TH2F ("hBadClusterLambda1","Bad cluster,shower shape, #lambda^{2}_{1} vs E for bad cluster ",
1943  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1944  fhBadClusterLambda1->SetXTitle("#it{E}_{cluster}");
1945  fhBadClusterLambda1->SetYTitle("#lambda^{2}_{1}");
1946  outputContainer->Add(fhBadClusterLambda1);
1947 
1948  fhBadClusterTimeEnergy = new TH2F ("hBadClusterTimeEnergy","energy vs TOF of reconstructed bad clusters",
1949  nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1950  fhBadClusterTimeEnergy->SetXTitle("#it{E}_{cluster} (GeV) ");
1951  fhBadClusterTimeEnergy->SetYTitle("#it{t} (ns)");
1952  outputContainer->Add(fhBadClusterTimeEnergy);
1953 
1955  {
1956  fhBadClusterPairDiffTimeE = new TH2F("hBadClusterPairDiffTimeE","cluster pair time difference (bad - good) vs E from bad cluster",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1957  fhBadClusterPairDiffTimeE->SetXTitle("#it{E}_{bad cluster} (GeV)");
1958  fhBadClusterPairDiffTimeE->SetYTitle("#Delta #it{t} (ns)");
1959  outputContainer->Add(fhBadClusterPairDiffTimeE);
1960  }
1961 
1963  {
1964  fhClusterMaxCellDiffNoCut = new TH2F ("hClusterMaxCellDiffNoCut","energy vs difference of cluster energy - max cell energy / cluster energy",
1965  nptbins,ptmin,ptmax, 500,0,1.);
1966  fhClusterMaxCellDiffNoCut->SetXTitle("#it{E}_{cluster} (GeV) ");
1967  fhClusterMaxCellDiffNoCut->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1968  outputContainer->Add(fhClusterMaxCellDiffNoCut);
1969 
1970  fhBadClusterMaxCellCloseCellRatio = new TH2F ("hBadClusterMaxCellCloseCellRatio","energy vs ratio of max cell / neighbour cell constributing cell, reconstructed bad clusters",
1971  nptbins,ptmin,ptmax, 100,0,1.);
1972  fhBadClusterMaxCellCloseCellRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1973  fhBadClusterMaxCellCloseCellRatio->SetYTitle("ratio");
1974  outputContainer->Add(fhBadClusterMaxCellCloseCellRatio);
1975 
1976  fhBadClusterMaxCellCloseCellDiff = new TH2F ("hBadClusterMaxCellCloseCellDiff","energy vs ratio of max cell - neighbour cell constributing cell, reconstructed bad clusters",
1977  nptbins,ptmin,ptmax, 500,0,100);
1978  fhBadClusterMaxCellCloseCellDiff->SetXTitle("#it{E}_{cluster} (GeV) ");
1979  fhBadClusterMaxCellCloseCellDiff->SetYTitle("#it{E}_{cell max} - #it{E}_{cell i} (GeV)");
1980  outputContainer->Add(fhBadClusterMaxCellCloseCellDiff);
1981 
1982  fhBadClusterMaxCellDiff = new TH2F ("hBadClusterMaxCellDiff","energy vs difference of cluster energy - max cell energy / cluster energy for bad clusters",
1983  nptbins,ptmin,ptmax, 500,0,1.);
1984  fhBadClusterMaxCellDiff->SetXTitle("#it{E}_{cluster} (GeV) ");
1985  fhBadClusterMaxCellDiff->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max}) / #it{E}_{cluster}");
1986  outputContainer->Add(fhBadClusterMaxCellDiff);
1987 
1988  fhBadClusterMaxCellECross = new TH2F ("hBadClusterMaxCellECross","1 - #it{E}_{+} around max energy cell / max energy cell vs cluster energy, bad clusters",
1989  nptbins,ptmin,ptmax, 400,-1,1.);
1990  fhBadClusterMaxCellECross->SetXTitle("#it{E}_{cluster} (GeV) ");
1991  fhBadClusterMaxCellECross->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell max}");
1992  outputContainer->Add(fhBadClusterMaxCellECross);
1993 
1995  {
1996  fhBadCellTimeSpreadRespectToCellMax = new TH2F ("hBadCellTimeSpreadRespectToCellMax","#it{t}_{cell max}-#it{t}_{cell i} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1997  fhBadCellTimeSpreadRespectToCellMax->SetXTitle("#it{E} (GeV)");
1998  fhBadCellTimeSpreadRespectToCellMax->SetYTitle("#Delta #it{t}_{cell max - i} (ns)");
1999  outputContainer->Add(fhBadCellTimeSpreadRespectToCellMax);
2000 
2001  // fhBadClusterMaxCellDiffAverageTime = new TH2F ("hBadClusterMaxCellDiffAverageTime","#it{t}_{cell max}-#it{t}_{average} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2002  // fhBadClusterMaxCellDiffAverageTime->SetXTitle("#it{E} (GeV)");
2003  // fhBadClusterMaxCellDiffAverageTime->SetYTitle("#Delta #it{t}_{cell max - average} (ns)");
2004  // outputContainer->Add(fhBadClusterMaxCellDiffAverageTime);
2005  //
2006  // fhBadClusterMaxCellDiffWeightedTime = new TH2F ("hBadClusterMaxCellDiffWeightedTime","#it{t}_{cell max}-#it{t}_{weighted} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2007  // fhBadClusterMaxCellDiffWeightedTime->SetXTitle("#it{E} (GeV)");
2008  // fhBadClusterMaxCellDiffWeightedTime->SetYTitle("#Delta #it{t}_{cell max - weighted} (ns)");
2009  // outputContainer->Add(fhBadClusterMaxCellDiffWeightedTime);
2010  }
2011  }
2012  }
2013 
2014  // Track Matching
2015  if(fFillAllTMHisto)
2016  {
2017  fhTrackMatchedDEtaNeg = new TH2F("hTrackMatchedDEtaNeg","d#eta of cluster-negative track vs cluster energy",
2018  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
2019  fhTrackMatchedDEtaNeg->SetYTitle("d#eta");
2020  fhTrackMatchedDEtaNeg->SetXTitle("#it{E}_{cluster} (GeV)");
2021 
2022  fhTrackMatchedDPhiNeg = new TH2F("hTrackMatchedDPhiNeg","d#varphi of cluster-negative track vs cluster energy",
2023  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
2024  fhTrackMatchedDPhiNeg->SetYTitle("d#varphi (rad)");
2025  fhTrackMatchedDPhiNeg->SetXTitle("#it{E}_{cluster} (GeV)");
2026 
2027  fhTrackMatchedDEtaDPhiNeg = new TH2F("hTrackMatchedDEtaDPhiNeg","d#eta vs d#varphi of cluster- negative track vs cluster energy",
2028  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
2029  fhTrackMatchedDEtaDPhiNeg->SetYTitle("d#varphi (rad)");
2030  fhTrackMatchedDEtaDPhiNeg->SetXTitle("d#eta");
2031 
2032  fhTrackMatchedDEtaPos = new TH2F("hTrackMatchedDEtaPos","d#eta of cluster-positive track vs cluster energy",
2033  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
2034  fhTrackMatchedDEtaPos->SetYTitle("d#eta");
2035  fhTrackMatchedDEtaPos->SetXTitle("#it{E}_{cluster} (GeV)");
2036 
2037  fhTrackMatchedDPhiPos = new TH2F("hTrackMatchedDPhiPos","d#varphi of cluster-positive track vs cluster energy",
2038  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
2039  fhTrackMatchedDPhiPos->SetYTitle("d#varphi (rad)");
2040  fhTrackMatchedDPhiPos->SetXTitle("#it{E}_{cluster} (GeV)");
2041 
2042  fhTrackMatchedDEtaDPhiPos = new TH2F("hTrackMatchedDEtaDPhiPos","d#eta vs d#varphi of cluster-positive track vs cluster energy",
2043  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
2044  fhTrackMatchedDEtaDPhiPos->SetYTitle("d#varphi (rad)");
2045  fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta");
2046 
2047 
2048  fhTrackMatchedDEtaNegMod = new TH2F("hTrackMatchedDEtaNegPerModule","d#eta of cluster-negative track vs module, E > 0.5 GeV",
2049  nresetabins,resetamin,resetamax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2050  fhTrackMatchedDEtaNegMod->SetXTitle("d#eta");
2051  fhTrackMatchedDEtaNegMod->SetYTitle("Module");
2052 
2053  fhTrackMatchedDPhiNegMod = new TH2F("hTrackMatchedDPhiNegPerModule","d#varphi of cluster-negative track vs module, E > 0.5 GeV",
2054  nresetabins,resetamin,resetamax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2055  fhTrackMatchedDPhiNegMod->SetXTitle("d#varphi (rad)");
2056  fhTrackMatchedDPhiNegMod->SetYTitle("Module");
2057 
2058  fhTrackMatchedDEtaPosMod = new TH2F("hTrackMatchedDEtaPosPerModule","d#eta of cluster-positive track vs module, E > 0.5 GeV",
2059  nresetabins,resetamin,resetamax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2060  fhTrackMatchedDEtaPosMod->SetXTitle("d#eta");
2061  fhTrackMatchedDEtaPosMod->SetYTitle("Module");
2062 
2063  fhTrackMatchedDPhiPosMod = new TH2F("hTrackMatchedDPhiPosPerModule","d#varphi of cluster-positive track vs module, E > 0.5 GeV",
2064  nresetabins,resetamin,resetamax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2065  fhTrackMatchedDPhiPosMod->SetXTitle("d#varphi (rad)");
2066  fhTrackMatchedDPhiPosMod->SetYTitle("Module");
2067 
2068  outputContainer->Add(fhTrackMatchedDEtaNeg) ;
2069  outputContainer->Add(fhTrackMatchedDPhiNeg) ;
2070  outputContainer->Add(fhTrackMatchedDEtaPos) ;
2071  outputContainer->Add(fhTrackMatchedDPhiPos) ;
2072  outputContainer->Add(fhTrackMatchedDEtaDPhiNeg) ;
2073  outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ;
2074 
2075  outputContainer->Add(fhTrackMatchedDEtaNegMod) ;
2076  outputContainer->Add(fhTrackMatchedDPhiNegMod) ;
2077  outputContainer->Add(fhTrackMatchedDEtaPosMod) ;
2078  outputContainer->Add(fhTrackMatchedDPhiPosMod) ;
2079 
2080  fhECharged = new TH1F ("hECharged","#it{E} reconstructed clusters, matched with track", nptbins,ptmin,ptmax);
2081  fhECharged->SetXTitle("#it{E} (GeV)");
2082  outputContainer->Add(fhECharged);
2083 
2084  fhPtCharged = new TH1F ("hPtCharged","#it{p}_{T} reconstructed clusters, matched with track", nptbins,ptmin,ptmax);
2085  fhPtCharged->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2086  outputContainer->Add(fhPtCharged);
2087 
2088  fhPhiCharged = new TH1F ("hPhiCharged","#varphi reconstructed clusters, matched with track",nphibins,phimin,phimax);
2089  fhPhiCharged->SetXTitle("#varphi (rad)");
2090  outputContainer->Add(fhPhiCharged);
2091 
2092  fhEtaCharged = new TH1F ("hEtaCharged","#eta reconstructed clusters, matched with track",netabins,etamin,etamax);
2093  fhEtaCharged->SetXTitle("#eta ");
2094  outputContainer->Add(fhEtaCharged);
2095 
2096  if(fFillAllTH3)
2097  {
2098  fhEtaPhiECharged = new TH3F ("hEtaPhiECharged","#eta vs #varphi, reconstructed clusters, matched with track",
2099  netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax);
2100  fhEtaPhiECharged->SetXTitle("#eta ");
2101  fhEtaPhiECharged->SetYTitle("#varphi ");
2102  fhEtaPhiECharged->SetZTitle("#it{E} (GeV) ");
2103  outputContainer->Add(fhEtaPhiECharged);
2104  }
2105  else
2106  {
2107  fhEtaPhiCharged = new TH2F ("hEtaPhiCharged","#eta vs #varphi for #it{E} > 0.5 GeV, reconstructed clusters, with matched track",
2108  netabins,etamin,etamax,nphibins,phimin,phimax);
2109  fhEtaPhiCharged->SetXTitle("#eta ");
2110  fhEtaPhiCharged->SetYTitle("#varphi (rad)");
2111  outputContainer->Add(fhEtaPhiCharged);
2112  }
2113 
2114  fh1EOverP = new TH2F("h1EOverP","TRACK matches #it{E}/#it{p}",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
2115  fh1EOverP->SetYTitle("#it{E}/#it{p}");
2116  fh1EOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2117  outputContainer->Add(fh1EOverP);
2118 
2119  fh2dR = new TH2F("h2dR","TRACK matches #Delta #it{R}",nptbins,ptmin,ptmax,ndRbins,dRmin,dRmax);
2120  fh2dR->SetYTitle("#Delta #it{R} (rad)");
2121  fh2dR->SetXTitle("#it{E} cluster (GeV)");
2122  outputContainer->Add(fh2dR) ;
2123 
2124  fh2MatchdEdx = new TH2F("h2MatchdEdx","#it{dE/dx} vs. #it{p} for all matches",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
2125  fh2MatchdEdx->SetXTitle("p (GeV/#it{c})");
2126  fh2MatchdEdx->SetYTitle("<#it{dE/dx}>");
2127  outputContainer->Add(fh2MatchdEdx);
2128 
2129  fh2EledEdx = new TH2F("h2EledEdx","#it{dE/dx} vs. #it{p} for electrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
2130  fh2EledEdx->SetXTitle("p (GeV/#it{c})");
2131  fh2EledEdx->SetYTitle("<#it{dE/dx}>");
2132  outputContainer->Add(fh2EledEdx) ;
2133 
2134  fh1EOverPR02 = new TH2F("h1EOverPR02","TRACK matches #it{E}/#it{p}, all",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
2135  fh1EOverPR02->SetYTitle("#it{E}/#it{p}");
2136  fh1EOverPR02->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2137  outputContainer->Add(fh1EOverPR02);
2138 
2139  fh1EleEOverP = new TH2F("h1EleEOverP","Electron candidates #it{E}/#it{p} (60<#it{dE/dx}<100)",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
2140  fh1EleEOverP->SetYTitle("#it{E}/#it{p}");
2141  fh1EleEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2142  outputContainer->Add(fh1EleEOverP);
2143 
2144 
2145  // Projections per SM
2146 
2147  fh1EOverPMod = new TH2F
2148  ("h1EOverP_PerModule","TRACK matches #it{E}/#it{p}, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2149  nPoverEbins,eOverPmin,eOverPmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2150  fh1EOverPMod->SetXTitle("#it{E}/#it{p}");
2151  fh1EOverPMod->SetYTitle("Module");
2152  outputContainer->Add(fh1EOverPMod);
2153 
2154  fh2dRMod = new TH2F
2155  ("h2dR_PerModule","TRACK matches #Delta #it{R}, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2156  ndRbins,dRmin,dRmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2157  fh2dRMod->SetXTitle("#Delta #it{R} (rad)");
2158  fh2dRMod->SetYTitle("Module");
2159  outputContainer->Add(fh2dRMod) ;
2160 
2161  fh2MatchdEdxMod = new TH2F
2162  ("h2MatchdEdx_PerModule","#it{dE/dx} vs. #it{p} for all matches, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2163  ndedxbins,dedxmin,dedxmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2164  fh2MatchdEdxMod->SetYTitle("Module");
2165  fh2MatchdEdxMod->SetXTitle("<#it{dE/dx}>");
2166  outputContainer->Add(fh2MatchdEdxMod);
2167 
2168  fh2EledEdxMod = new TH2F
2169  ("h2EledEdx_PerModule","#it{dE/dx} vs. #it{p} for electrons, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2170  ndedxbins,dedxmin,dedxmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2171  fh2EledEdxMod->SetYTitle("Module");
2172  fh2EledEdxMod->SetXTitle("<#it{dE/dx}>");
2173  outputContainer->Add(fh2EledEdxMod) ;
2174 
2175  fh1EOverPR02Mod = new TH2F
2176  ("h1EOverPR02_PerModule","TRACK matches #it{E}/#it{p}, all, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2177  nPoverEbins,eOverPmin,eOverPmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2178  fh1EOverPR02Mod->SetXTitle("#it{E}/#it{p}");
2179  fh1EOverPR02Mod->SetYTitle("Module");
2180  outputContainer->Add(fh1EOverPR02Mod);
2181 
2182  fh1EleEOverPMod = new TH2F
2183  ("h1EleEOverP_PerModule","Electron candidates #it{E}/#it{p} (60<#it{dE/dx}<100), #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2184  nPoverEbins,eOverPmin,eOverPmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2185  fh1EleEOverPMod->SetXTitle("#it{E}/#it{p}");
2186  fh1EleEOverPMod->SetYTitle("Module");
2187  outputContainer->Add(fh1EleEOverPMod);
2188  }
2189 
2190  if(fFillAllPi0Histo)
2191  {
2192  if ( fFirstModule < 12 )
2193  {
2194  fhIM = new TH2F ("hIM","Cluster pairs (EMCAL or PHOS) Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1",
2195  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2196  fhIM->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2197  fhIM->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2198  outputContainer->Add(fhIM);
2199 
2200  fhIMDiff = new TH2F ("hIMDiff","Cluster pairs (EMCAL or PHOS) Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, different SM",
2201  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2202  fhIMDiff->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2203  fhIMDiff->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2204  outputContainer->Add(fhIMDiff);
2205 
2206  fhIMSame = new TH2F ("hIMSame","Cluster pairs (EMCAL or PHOS) Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, same SM",
2207  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2208  fhIMSame->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2209  fhIMSame->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2210  outputContainer->Add(fhIMSame);
2211 
2213  {
2214  fhIMEMCALPHOS = new TH2F ("hIMEMCALPHOS","Cluster pairs in DCAL-PHOS Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1",
2215  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2216  fhIMEMCALPHOS->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2217  fhIMEMCALPHOS->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2218  outputContainer->Add(fhIMEMCALPHOS);
2219 
2220  fhIMEMCALPHOSSame = new TH2F ("hIMEMCALPHOSSame","Cluster pairs in DCAL-PHOS Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, same #varphi sector",
2221  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2222  fhIMEMCALPHOSSame->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2223  fhIMEMCALPHOSSame->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2224  outputContainer->Add(fhIMEMCALPHOSSame);
2225  }
2226  }
2227 
2228  if ( fNModules > 12 && (GetCalorimeter() == kEMCAL || GetCalorimeter() == kDCAL) && fLastModule > 11 )
2229  {
2230  fhIMDCAL = new TH2F ("hIMDCAL","Cluster pairs in DCAL Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1",
2231  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2232  fhIMDCAL->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2233  fhIMDCAL->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2234  outputContainer->Add(fhIMDCAL);
2235 
2236  fhIMDCALDiff = new TH2F ("hIMDCALDiff","Cluster pairs in DCAL Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, different SM",
2237  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2238  fhIMDCALDiff->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2239  fhIMDCALDiff->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2240  outputContainer->Add(fhIMDCALDiff);
2241 
2242  fhIMDCALSame = new TH2F ("hIMDCALSame","Cluster pairs in DCAL Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, same SM",
2243  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2244  fhIMDCALSame->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2245  fhIMDCALSame->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2246  outputContainer->Add(fhIMDCALSame);
2247 
2248  fhIMDCALPHOS = new TH2F ("hIMDCALPHOS","Cluster pairs in DCAL-PHOS Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1",
2249  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2250  fhIMDCALPHOS->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2251  fhIMDCALPHOS->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2252  outputContainer->Add(fhIMDCALPHOS);
2253 
2254  fhIMDCALPHOSSame = new TH2F ("hIMDCALPHOSSame","Cluster pairs in DCAL-PHOS Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, same #varphi sector",
2255  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2256  fhIMDCALPHOSSame->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2257  fhIMDCALPHOSSame->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2258  outputContainer->Add(fhIMDCALPHOSSame);
2259  }
2260 
2262  {
2263  if ( fFirstModule < 12 )
2264  {
2265  fhClusterPairDiffTimeEPi0Mass = new TH2F("hClusterPairDiffTimeEPi0Mass","cluster pair time difference vs E, only good clusters",
2266  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2267  fhClusterPairDiffTimeEPi0Mass->SetXTitle("#it{E}_{cluster} (GeV)");
2268  fhClusterPairDiffTimeEPi0Mass->SetYTitle("#Delta #it{t} (ns)");
2269  outputContainer->Add(fhClusterPairDiffTimeEPi0Mass);
2270 
2271  fhClusterPairDiffTimeEPi0MassSame = new TH2F("hClusterPairDiffTimeEPi0MassSame","cluster pair time difference vs E, only good clusters",
2272  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2273  fhClusterPairDiffTimeEPi0MassSame->SetXTitle("#it{E}_{cluster} (GeV)");
2274  fhClusterPairDiffTimeEPi0MassSame->SetYTitle("#Delta #it{t} (ns)");
2275  outputContainer->Add(fhClusterPairDiffTimeEPi0MassSame);
2276  }
2277 
2278  if ( fNModules > 12 && (GetCalorimeter() == kEMCAL || GetCalorimeter() == kDCAL) && fLastModule > 11 )
2279  {
2280  fhClusterPairDiffTimeEPi0MassDCal = new TH2F("hClusterPairDiffTimeEPi0MassDCal","cluster pair time difference vs E, only good clusters",
2281  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2282  fhClusterPairDiffTimeEPi0MassDCal->SetXTitle("#it{E}_{cluster} (GeV)");
2283  fhClusterPairDiffTimeEPi0MassDCal->SetYTitle("#Delta #it{t} (ns)");
2284  outputContainer->Add(fhClusterPairDiffTimeEPi0MassDCal);
2285 
2286  fhClusterPairDiffTimeEPi0MassDCalSame = new TH2F("hClusterPairDiffTimeEPi0MassDCalSame","cluster pair time difference vs E, only good clusters",
2287  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2288  fhClusterPairDiffTimeEPi0MassDCalSame->SetXTitle("#it{E}_{cluster} (GeV)");
2289  fhClusterPairDiffTimeEPi0MassDCalSame->SetYTitle("#Delta #it{t} (ns)");
2290  outputContainer->Add(fhClusterPairDiffTimeEPi0MassDCalSame);
2291  }
2292  }
2293 
2294  fhAsym = new TH2F ("hAssym","Cluster pairs Asymmetry vs reconstructed pair energy",nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax);
2295  fhAsym->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2296  fhAsym->SetYTitle("#it{Asymmetry}");
2297  outputContainer->Add(fhAsym);
2298 
2300  {
2301  fhOpAngle = new TH2F ("hOpeningAngle","Cluster pairs opening angle vs reconstructed pair #it{p}_{T}, ncell > 1",
2302  nptbins,ptmin,ptmax, 180,0,TMath::Pi());
2303  fhOpAngle->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2304  fhOpAngle->SetYTitle("Opening angle (degrees)");
2305  outputContainer->Add(fhOpAngle);
2306 
2307  Int_t nBinOpAngle = TMath::Nint(fInvMassMaxOpenAngle*TMath::RadToDeg()); // bin of 1 degree size
2308  fhIMvsOpAngle = new TH2F ("hIMvsOpAngle","Cluster pairs Invariant mass vs reconstructed pair opening angle, ncell > 1",
2309  nBinOpAngle,0.,fInvMassMaxOpenAngle,nmassbins,massmin,massmax);
2310  fhIMvsOpAngle->SetXTitle("Opening angle (degrees)");
2311  fhIMvsOpAngle->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2312  outputContainer->Add(fhIMvsOpAngle);
2313  }
2314  }
2315 
2316  if(fFillAllPosHisto2)
2317  {
2318  fhXYZ = new TH3F ("hXYZ","Cluster: #it{x} vs #it{y} vs #it{z}",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax);
2319  fhXYZ->SetXTitle("#it{x} (cm)");
2320  fhXYZ->SetYTitle("#it{y} (cm)");
2321  fhXYZ->SetZTitle("#it{z} (cm) ");
2322  outputContainer->Add(fhXYZ);
2323 
2324  fhXE = new TH2F ("hXE","Cluster X position vs cluster energy",xbins,xmin,xmax,nptbins,ptmin,ptmax);
2325  fhXE->SetXTitle("#it{x} (cm)");
2326  fhXE->SetYTitle("#it{E} (GeV)");
2327  outputContainer->Add(fhXE);
2328 
2329  fhYE = new TH2F ("hYE","Cluster Y position vs cluster energy",ybins,ymin,ymax,nptbins,ptmin,ptmax);
2330  fhYE->SetXTitle("#it{y} (cm)");
2331  fhYE->SetYTitle("#it{E} (GeV)");
2332  outputContainer->Add(fhYE);
2333 
2334  fhZE = new TH2F ("hZE","Cluster Z position vs cluster energy",zbins,zmin,zmax,nptbins,ptmin,ptmax);
2335  fhZE->SetXTitle("#it{z} (cm)");
2336  fhZE->SetYTitle("#it{E} (GeV)");
2337  outputContainer->Add(fhZE);
2338 
2339  fhRE = new TH2F ("hRE","Cluster R position vs cluster energy",rbins,rmin,rmax,nptbins,ptmin,ptmax);
2340  fhRE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)");
2341  fhRE->SetYTitle("#it{E} (GeV)");
2342  outputContainer->Add(fhRE);
2343 
2344  fhXNCells = new TH2F ("hXNCells","Cluster X position vs N Cells per Cluster",xbins,xmin,xmax,nceclbins,nceclmin,nceclmax);
2345  fhXNCells->SetXTitle("#it{x} (cm)");
2346  fhXNCells->SetYTitle("N cells per cluster");
2347  outputContainer->Add(fhXNCells);
2348 
2349  fhYNCells = new TH2F ("hYNCells","Cluster Y position vs N Cells per Cluster",ybins,ymin,ymax,nceclbins,nceclmin,nceclmax);
2350  fhYNCells->SetXTitle("#it{y} (cm)");
2351  fhYNCells->SetYTitle("N cells per cluster");
2352  outputContainer->Add(fhYNCells);
2353 
2354  fhZNCells = new TH2F ("hZNCells","Cluster Z position vs N Cells per Cluster",zbins,zmin,zmax,nceclbins,nceclmin,nceclmax);
2355  fhZNCells->SetXTitle("#it{z} (cm)");
2356  fhZNCells->SetYTitle("N cells per cluster");
2357  outputContainer->Add(fhZNCells);
2358 
2359  fhRNCells = new TH2F ("hRNCells","Cluster R position vs N Cells per Cluster",rbins,rmin,rmax,nceclbins,nceclmin,nceclmax);
2360  fhRNCells->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)");
2361  fhRNCells->SetYTitle("N cells per cluster");
2362  outputContainer->Add(fhRNCells);
2363  }
2364 
2365  if(fFillAllPosHisto)
2366  {
2367  fhRCellE = new TH2F ("hRCellE","Cell R position vs cell energy",rbins,rmin,rmax,nptbins,ptmin,ptmax);
2368  fhRCellE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)");
2369  fhRCellE->SetYTitle("#it{E} (GeV)");
2370  outputContainer->Add(fhRCellE);
2371 
2372  fhXCellE = new TH2F ("hXCellE","Cell X position vs cell energy",xbins,xmin,xmax,nptbins,ptmin,ptmax);
2373  fhXCellE->SetXTitle("#it{x} (cm)");
2374  fhXCellE->SetYTitle("#it{E} (GeV)");
2375  outputContainer->Add(fhXCellE);
2376 
2377  fhYCellE = new TH2F ("hYCellE","Cell Y position vs cell energy",ybins,ymin,ymax,nptbins,ptmin,ptmax);
2378  fhYCellE->SetXTitle("#it{y} (cm)");
2379  fhYCellE->SetYTitle("#it{E} (GeV)");
2380  outputContainer->Add(fhYCellE);
2381 
2382  fhZCellE = new TH2F ("hZCellE","Cell Z position vs cell energy",zbins,zmin,zmax,nptbins,ptmin,ptmax);
2383  fhZCellE->SetXTitle("#it{z} (cm)");
2384  fhZCellE->SetYTitle("#it{E} (GeV)");
2385  outputContainer->Add(fhZCellE);
2386 
2387  fhXYZCell = new TH3F ("hXYZCell","Cell : #it{x} vs #it{y} vs #it{z}",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax);
2388  fhXYZCell->SetXTitle("#it{x} (cm)");
2389  fhXYZCell->SetYTitle("#it{y} (cm)");
2390  fhXYZCell->SetZTitle("#it{z} (cm)");
2391  outputContainer->Add(fhXYZCell);
2392 
2393  Float_t dx = TMath::Abs(xmin)+TMath::Abs(xmax);
2394  Float_t dy = TMath::Abs(ymin)+TMath::Abs(ymax);
2395  Float_t dz = TMath::Abs(zmin)+TMath::Abs(zmax);
2396  Float_t dr = TMath::Abs(rmin)+TMath::Abs(rmax);
2397 
2398  fhDeltaCellClusterRNCells = new TH2F ("hDeltaCellClusterRNCells","Cluster-Cell R position vs N Cells per Cluster",rbins*2,-dr,dr,nceclbins,nceclmin,nceclmax);
2399  fhDeltaCellClusterRNCells->SetXTitle("#it{r} = #sqrt{x^{2}+y^{2}}, #it{r}_{clus}-#it{r}_{cell} (cm)");
2400  fhDeltaCellClusterRNCells->SetYTitle("#it{n}_{cells per cluster}");
2401  outputContainer->Add(fhDeltaCellClusterRNCells);
2402 
2403  fhDeltaCellClusterXNCells = new TH2F ("hDeltaCellClusterXNCells","Cluster-Cell X position vs N Cells per Cluster",xbins*2,-dx,dx,nceclbins,nceclmin,nceclmax);
2404  fhDeltaCellClusterXNCells->SetXTitle("#it{x}_{clus}-#it{x}_{cell} (cm)");
2405  fhDeltaCellClusterXNCells->SetYTitle("#it{n}_{cells per cluster}");
2406  outputContainer->Add(fhDeltaCellClusterXNCells);
2407 
2408  fhDeltaCellClusterYNCells = new TH2F ("hDeltaCellClusterYNCells","Cluster-Cell Y position vs N Cells per Cluster",ybins*2,-dy,dy,nceclbins,nceclmin,nceclmax);
2409  fhDeltaCellClusterYNCells->SetXTitle("#it{y}_{clus}-#it{y}_{cell} (cm)");
2410  fhDeltaCellClusterYNCells->SetYTitle("N cells per cluster");
2411  outputContainer->Add(fhDeltaCellClusterYNCells);
2412 
2413  fhDeltaCellClusterZNCells = new TH2F ("hDeltaCellClusterZNCells","Cluster-Cell Z position vs N Cells per Cluster",zbins*2,-dz,dz,nceclbins,nceclmin,nceclmax);
2414  fhDeltaCellClusterZNCells->SetXTitle("#it{z}_{clus}-#it{z}_{cell} (cm)");
2415  fhDeltaCellClusterZNCells->SetYTitle("#it{n}_{cells per cluster}");
2416  outputContainer->Add(fhDeltaCellClusterZNCells);
2417 
2418  fhDeltaCellClusterRE = new TH2F ("hDeltaCellClusterRE","Cluster-Cell R position vs cluster energy",rbins*2,-dr,dr,nptbins,ptmin,ptmax);
2419  fhDeltaCellClusterRE->SetXTitle("#it{r} = #sqrt{x^{2}+y^{2}}, #it{r}_{clus}-#it{r}_{cell} (cm)");
2420  fhDeltaCellClusterRE->SetYTitle("#it{E} (GeV)");
2421  outputContainer->Add(fhDeltaCellClusterRE);
2422 
2423  fhDeltaCellClusterXE = new TH2F ("hDeltaCellClusterXE","Cluster-Cell X position vs cluster energy",xbins*2,-dx,dx,nptbins,ptmin,ptmax);
2424  fhDeltaCellClusterXE->SetXTitle("#it{x}_{clus}-#it{x}_{cell} (cm)");
2425  fhDeltaCellClusterXE->SetYTitle("#it{E} (GeV)");
2426  outputContainer->Add(fhDeltaCellClusterXE);
2427 
2428  fhDeltaCellClusterYE = new TH2F ("hDeltaCellClusterYE","Cluster-Cell Y position vs cluster energy",ybins*2,-dy,dy,nptbins,ptmin,ptmax);
2429  fhDeltaCellClusterYE->SetXTitle("#it{y}_{clus}-#it{y}_{cell} (cm)");
2430  fhDeltaCellClusterYE->SetYTitle("#it{E} (GeV)");
2431  outputContainer->Add(fhDeltaCellClusterYE);
2432 
2433  fhDeltaCellClusterZE = new TH2F ("hDeltaCellClusterZE","Cluster-Cell Z position vs cluster energy",zbins*2,-dz,dz,nptbins,ptmin,ptmax);
2434  fhDeltaCellClusterZE->SetXTitle("#it{z}_{clus}-#it{z}_{cell} (cm)");
2435  fhDeltaCellClusterZE->SetYTitle("#it{E} (GeV)");
2436  outputContainer->Add(fhDeltaCellClusterZE);
2437 
2438  if(fFillAllTH3)
2439  {
2440  fhEtaPhiAmpCell = new TH3F ("hEtaPhiAmpCell","Cell #eta vs cell #varphi vs cell energy",
2441  netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax);
2442  fhEtaPhiAmpCell->SetXTitle("#eta ");
2443  fhEtaPhiAmpCell->SetYTitle("#varphi (rad)");
2444  fhEtaPhiAmpCell->SetZTitle("#it{E} (GeV) ");
2445  outputContainer->Add(fhEtaPhiAmpCell);
2446  }
2447  else
2448  {
2449  fhEtaPhiCell = new TH2F ("hEtaPhiCell","Cell #eta vs cell #varphi vs cell energy",
2450  netabins,etamin,etamax,nphibins,phimin,phimax);
2451  fhEtaPhiCell->SetXTitle("#eta ");
2452  fhEtaPhiCell->SetYTitle("#varphi (rad)");
2453  outputContainer->Add(fhEtaPhiCell);
2454  }
2455  }
2456 
2458  {
2459  fhCellTimeSpreadRespectToCellMax = new TH2F ("hCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} per cluster", nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
2460  fhCellTimeSpreadRespectToCellMax->SetXTitle("#it{E} (GeV)");
2461  fhCellTimeSpreadRespectToCellMax->SetYTitle("#Delta #it{t}_{cell max-i} (ns)");
2462  outputContainer->Add(fhCellTimeSpreadRespectToCellMax);
2463 
2464  // fhClusterMaxCellDiffAverageTime = new TH2F ("hClusterMaxCellDiffAverageTime","t_{cell max}-t_{average} per cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2465  // fhClusterMaxCellDiffAverageTime->SetXTitle("#it{E} (GeV)");
2466  // fhClusterMaxCellDiffAverageTime->SetYTitle("#Delta #it{t}_{cell max - average} (ns)");
2467  // outputContainer->Add(fhClusterMaxCellDiffAverageTime);
2468  //
2469  // fhClusterMaxCellDiffWeightedTime = new TH2F ("hClusterMaxCellDiffWeightedTime","t_{cell max}-t_{weighted} per cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2470  // fhClusterMaxCellDiffWeightedTime->SetXTitle("#it{E} (GeV)");
2471  // fhClusterMaxCellDiffWeightedTime->SetYTitle("#Delta #it{t}_{cell max - weighted} (ns)");
2472  // outputContainer->Add(fhClusterMaxCellDiffWeightedTime);
2473  }
2474 
2475  // Module histograms
2476 
2477  fhEMod = new TH2F ("hE_Mod","Cluster reconstructed Energy in each present Module",nptbins,ptmin,ptmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2478  fhEMod->SetXTitle("#it{E} (GeV)");
2479  fhEMod->SetYTitle("Module");
2480  outputContainer->Add(fhEMod);
2481 
2482  fhEWeirdMod = new TH2F ("hEWeird_Mod","Cluster reconstructed Energy in each present Module, ridiculously large E",200,0,10000,totalSM,fFirstModule-0.5,fLastModule+0.5);
2483  fhEWeirdMod->SetXTitle("#it{E} (GeV)");
2484  fhEWeirdMod->SetYTitle("Module");
2485  outputContainer->Add(fhEWeirdMod);
2486 
2487  fhNClustersMod = new TH2F ("hNClusters_Mod","# clusters vs Module", nclbins,nclmin+0.5,nclmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2488  fhNClustersMod->SetXTitle("number of clusters");
2489  fhNClustersMod->SetYTitle("Module");
2490  outputContainer->Add(fhNClustersMod);
2491 
2492  fhSumClustersEnergyMod = new TH2F ("hSumClustersEnergy_Mod","# clusters vs Module", 1000, 0, 2000,totalSM,fFirstModule-0.5,fLastModule+0.5);
2493  fhSumClustersEnergyMod->SetXTitle("#Sigma_{clusters} #it{E} (GeV)");
2494  fhSumClustersEnergyMod->SetYTitle("Module");
2495  outputContainer->Add(fhSumClustersEnergyMod);
2496 
2498 
2499  fhIMMod = new TH2F*[fNModules];
2500 
2502 
2503  if(fStudyBadClusters)
2505 
2506 
2507  for(Int_t imod = 0; imod < fNModules; imod++)
2508  {
2509  if(imod < fFirstModule || imod > fLastModule) continue;
2510 
2511  fhNClustersSumEnergyPerMod[imod] = new TH2F (Form("hNClustersSumEnergy_Mod%d",imod),
2512  Form("# clusters in SM vs sum of clusters energy in Module %d",imod),
2513  nptbins,ptmin,ptmax*4, nclbins,nclmin,nclmax);
2514  fhNClustersSumEnergyPerMod[imod]->SetXTitle("#Sigma #it{E} (GeV)");
2515  fhNClustersSumEnergyPerMod[imod]->SetYTitle("#Sigma #it{n}_{clusters}");
2516  outputContainer->Add(fhNClustersSumEnergyPerMod[imod]);
2517 
2518  fhNCellsPerClusterMod[imod] = new TH2F (Form("hNCellsPerCluster_Mod%d",imod),
2519  Form("# cells per cluster vs cluster energy in Module %d",imod),
2520  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
2521  fhNCellsPerClusterMod[imod]->SetXTitle("#it{E} (GeV)");
2522  fhNCellsPerClusterMod[imod]->SetYTitle("#it{n}_{cells per cluster}");
2523  outputContainer->Add(fhNCellsPerClusterMod[imod]);
2524 
2525  if(fStudyBadClusters)
2526  {
2527  fhNCellsPerClusterModNoCut[imod] = new TH2F (Form("hNCellsPerClusterNoCut_Mod%d",imod),
2528  Form("# cells per cluster vs cluster energy in Module %d, no cut",imod),
2529  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
2530  fhNCellsPerClusterModNoCut[imod]->SetXTitle("#it{E} (GeV)");
2531  fhNCellsPerClusterModNoCut[imod]->SetYTitle("#it{n}_{cells per cluster}");
2532  outputContainer->Add(fhNCellsPerClusterModNoCut[imod]);
2533  }
2534 
2535  if(fFillAllPi0Histo)
2536  {
2537  fhIMMod[imod] = new TH2F (Form("hIM_Mod%d",imod),
2538  Form("Cluster pairs Invariant mass vs reconstructed pair energy in Module %d, n cell > 1",imod),
2539  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2540  fhIMMod[imod]->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2541  fhIMMod[imod]->SetYTitle("#it{M}_{cluster pairs} (GeV/#it{c}^{2})");
2542  outputContainer->Add(fhIMMod[imod]);
2543  }
2544  }
2545  }
2546 
2547  // Calorimeter cells
2548  //
2550  {
2551  fhNCells = new TH1F ("hNCells","# cells", ncebins,ncemin+0.5,ncemax);
2552  fhNCells->SetXTitle("#it{n}_{cells}");
2553  outputContainer->Add(fhNCells);
2554 
2555  fhNCellsCutAmpMin = new TH1F ("hNCellsCutAmpMin",Form("# cells amp > %1.2f-%1.2f",fEMCALCellAmpMin,fPHOSCellAmpMin), ncebins,ncemin+0.5,ncemax);
2556  fhNCellsCutAmpMin->SetXTitle("#it{n}_{cells}");
2557  outputContainer->Add(fhNCellsCutAmpMin);
2558 
2559  fhAmplitude = new TH1F ("hAmplitude","#it{E}_{cell}", nptbins,ptmin,ptmax/2);
2560  fhAmplitude->SetXTitle("#it{E}_{cell} (GeV)");
2561  outputContainer->Add(fhAmplitude);
2562 
2563  fhAmpMod = new TH2F ("hAmp_Mod","Cell energy in each present Module",nptbins,ptmin,ptmax/2,totalSM,fFirstModule-0.5,fLastModule+0.5);
2564  fhAmpMod->SetXTitle("#it{E} (GeV)");
2565  fhAmpMod->SetYTitle("Module");
2566  outputContainer->Add(fhAmpMod);
2567 
2568  fhAmpWeirdMod = new TH2F ("hAmpWeird_Mod","Cell energy in each present Module, ridiculously large E",200,0,10000,totalSM,fFirstModule-0.5,fLastModule+0.5);
2569  fhAmpWeirdMod->SetXTitle("#it{E} (GeV)");
2570  fhAmpWeirdMod->SetYTitle("Module");
2571  outputContainer->Add(fhAmpWeirdMod);
2572 
2574  {
2575  fhTimeMod = new TH2F ("hTime_Mod","Cell time in each present Module",ntimebins,timemin,timemax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2576  fhTimeMod->SetXTitle("t (ns)");
2577  fhTimeMod->SetYTitle("Module");
2578  outputContainer->Add(fhTimeMod);
2579  }
2580 
2582  {
2583  //..Create the fhAmpId TH2D with increasing binwidth
2584  //..0-10 GeV (0.05), 10-20 GeV (0.2), 20-30 GeV (0.5)
2585  Double_t binWidth=(ptfinemax-ptfinemin)/nfineptbins;
2586  TCustomBinning xBinning;
2587  xBinning.SetMinimum(ptfinemin);
2588  xBinning.AddStep(ptfinemax,binWidth); //..first entries of the array are the set ranges and bins
2589  xBinning.AddStep(ptfinemax*2,binWidth*4); //..expand the previously defined range by 2 but increase the bin width
2590  xBinning.AddStep(ptfinemax*4,binWidth*10);//..expand the previously defined range by 4 but increase the bin width
2591 
2592  TCustomBinning yBinning;
2593  yBinning.SetMinimum(0);
2594  yBinning.AddStep(fNMaxRows*fNMaxCols*fNModules,1); //..add cells with binwidth 1
2595 
2596  TArrayD xbinsArray;
2597  xBinning.CreateBinEdges(xbinsArray);
2598  TArrayD ybinsArray;
2599  yBinning.CreateBinEdges(ybinsArray);
2600 
2601  fhAmpId = new TH2F ("hAmpId","#it{E}_{cell}", xbinsArray.GetSize() - 1, xbinsArray.GetArray(), ybinsArray.GetSize() - 1, ybinsArray.GetArray());
2602  fhAmpId->SetXTitle("#it{E}_{cell} (GeV)");
2603  outputContainer->Add(fhAmpId);
2604 
2605  fhAmpIdLowGain = new TH2F ("hAmpIdLG","Low gain: #it{E}_{cell}", nfineptbins,15,ptfinemax+15,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
2606  fhAmpIdLowGain->SetXTitle("#it{E}_{cell} (GeV)");
2607  outputContainer->Add(fhAmpIdLowGain);
2608  }
2609 
2611  {
2612  fhTime = new TH1F ("hTime","#it{t}_{cell}",ntimebins,timemin,timemax);
2613  fhTime->SetXTitle("#it{t}_{cell} (ns)");
2614  outputContainer->Add(fhTime);
2615 
2616  // fhTimeVz = new TH2F ("hTimeVz","#it{t}_{cell} vs vertex, amplitude > 0.5 GeV",100, 0, 50,ntimebins,timemin,timemax);
2617  // fhTimeVz->SetXTitle("|v_{z}| (cm)");
2618  // fhTimeVz->SetYTitle("#it{t}_{cell} (ns)");
2619  // outputContainer->Add(fhTimeVz);
2620 
2621  fhTimeAmp = new TH2F ("hTimeAmp","#it{t}_{cell} vs #it{E}_{cell}",nptbins,ptmin,ptmax/2,ntimebins,timemin,timemax);
2622  fhTimeAmp->SetYTitle("#it{t}_{cell} (ns)");
2623  fhTimeAmp->SetXTitle("#it{E}_{cell} (GeV)");
2624  outputContainer->Add(fhTimeAmp);
2625 
2626  fhTimeAmpLowGain = new TH2F ("hTimeAmpLG","Low gain: #it{t}_{cell} vs #it{E}_{cell}",nptbins,ptmin,ptmax/2,ntimebins,timemin,timemax);
2627  fhTimeAmpLowGain->SetYTitle("#it{t}_{cell} (ns)");
2628  fhTimeAmpLowGain->SetXTitle("#it{E}_{cell} (GeV)");
2629  outputContainer->Add(fhTimeAmpLowGain);
2630 
2632  {
2633  fhCellIdCellLargeTimeSpread= new TH1F ("hCellIdCellLargeTimeSpread","Cells with time 100 ns larger than cell max in cluster ",
2635  fhCellIdCellLargeTimeSpread->SetXTitle("Absolute Cell Id");
2636  outputContainer->Add(fhCellIdCellLargeTimeSpread);
2637 
2638  fhTimeId = new TH2F ("hTimeId","#it{t}_{cell} vs Absolute Id",
2639  ntimebins,timemin,timemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
2640  fhTimeId->SetXTitle("#it{t}_{cell} (ns)");
2641  fhTimeId->SetYTitle("Cell Absolute Id");
2642  outputContainer->Add(fhTimeId);
2643 
2644  fhTimeIdLowGain = new TH2F ("hTimeIdLG","Low gain: #it{t}_{cell} vs Absolute Id",
2645  ntimebins,timemin,timemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
2646  fhTimeIdLowGain->SetXTitle("#it{t}_{cell} (ns)");
2647  fhTimeIdLowGain->SetYTitle("Cell Absolute Id");
2648  outputContainer->Add(fhTimeIdLowGain);
2649 
2650  if(GetCaloUtils()->IsL1PhaseInTimeRecalibrationOn()==1)
2651  {
2652  fhTimeL1UnCorrId = new TH2F ("hTimeL1UnCorrId","#it{t}_{cell} vs Absolute Id",
2653  ntimebins,timemin,timemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
2654  fhTimeL1UnCorrId->SetXTitle("#it{t}_{cell} (ns)");
2655  fhTimeL1UnCorrId->SetYTitle("Cell Absolute Id");
2656  outputContainer->Add(fhTimeL1UnCorrId);
2657  }
2658  }
2659 
2660  for(Int_t bc = 0; bc < 4; bc++)
2661  {
2662  fhTimePerSMPerBC[bc] = new TH2F (Form("hTimePerSM_BC%d",bc),
2663  Form("#it{t}_{cell} vs super-module, for BC/4=%d",bc),
2664  ntimebins,timemin,timemax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2665  fhTimePerSMPerBC[bc]->SetXTitle("#it{t}_{cell} (ns)");
2666  fhTimePerSMPerBC[bc]->SetYTitle("Module");
2667  outputContainer->Add(fhTimePerSMPerBC[bc]);
2668  }
2669  }
2670 
2671  fhCellECross = new TH2F ("hCellECross","1 - Energy in cross around cell / cell energy",
2672  nptbins,ptmin,ptmax/2, 400,-1,1.);
2673  fhCellECross->SetXTitle("#it{E}_{cell} (GeV) ");
2674  fhCellECross->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell}");
2675  outputContainer->Add(fhCellECross);
2676 
2677  fhNCellsMod = new TH2F ("hNCells_Mod","# cells vs Module", ncebins,ncemin+0.5,ncemax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2678  fhNCellsMod->SetXTitle("#it{n}_{cells}");
2679  fhNCellsMod->SetYTitle("Module");
2680  outputContainer->Add(fhNCellsMod);
2681 
2682  fhSumCellsAmpMod = new TH2F ("hSumCellsAmp_Mod","# cells vs Module", 1000, 0, 2000,totalSM,fFirstModule-0.5,fLastModule+0.5);
2683  fhSumCellsAmpMod->SetXTitle("#Sigma_{cells} #it{Amp} (GeV)");
2684  fhSumCellsAmpMod->SetYTitle("Module");
2685  outputContainer->Add(fhSumCellsAmpMod);
2686 
2687  fhGridCells = new TH2F ("hGridCells",Form("Entries in grid of cells"),
2688  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2689  fhGridCells->SetYTitle("row (phi direction)");
2690  fhGridCells->SetXTitle("column (eta direction)");
2691  outputContainer->Add(fhGridCells);
2692 
2693  fhGridCellsE = new TH2F ("hGridCellsE","Accumulated energy in grid of cells",
2694  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2695  fhGridCellsE->SetYTitle("row (phi direction)");
2696  fhGridCellsE->SetXTitle("column (eta direction)");
2697  outputContainer->Add(fhGridCellsE);
2698 
2699  fhGridCellsLowGain = new TH2F ("hGridCellsLG",Form("Low gain: Entries in grid of cells"),
2700  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2701  fhGridCellsLowGain->SetYTitle("row (phi direction)");
2702  fhGridCellsLowGain->SetXTitle("column (eta direction)");
2703  outputContainer->Add(fhGridCellsLowGain);
2704 
2705  fhGridCellsELowGain = new TH2F ("hGridCellsELG","Low gain: Accumulated energy in grid of cells",
2706  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2707  fhGridCellsELowGain->SetYTitle("row (phi direction)");
2708  fhGridCellsELowGain->SetXTitle("column (eta direction)");
2709  outputContainer->Add(fhGridCellsELowGain);
2710 
2712  {
2713  fhGridCellsTime = new TH2F ("hGridCellsTime","Accumulated time in grid of cells",
2714  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2715  fhGridCellsTime->SetYTitle("row (phi direction)");
2716  fhGridCellsTime->SetXTitle("column (eta direction)");
2717  outputContainer->Add(fhGridCellsTime);
2718 
2719  fhGridCellsTimeLowGain = new TH2F ("hGridCellsTimeLG","Low gain: Accumulated time in grid of cells",
2720  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2721  fhGridCellsTimeLowGain->SetYTitle("row (phi direction)");
2722  fhGridCellsTimeLowGain->SetXTitle("column (eta direction)");
2723  outputContainer->Add(fhGridCellsTimeLowGain);
2724  }
2725 
2727  {
2729 
2730  for(Int_t imod = 0; imod < fNModules; imod++)
2731  {
2732  if(imod < fFirstModule || imod > fLastModule) continue;
2733 
2734  fhNCellsSumAmpPerMod[imod] = new TH2F (Form("hNCellsSumAmp_Mod%d",imod),
2735  Form("# cells in SM vs sum of cells energy in Module %d",imod),
2736  nptbins,ptmin,ptmax*4, ncebins,ncemin,ncemax);
2737  fhNCellsSumAmpPerMod[imod]->SetXTitle("#Sigma #it{Amplitude} (GeV)");
2738  fhNCellsSumAmpPerMod[imod]->SetYTitle("#Sigma #it{n}_{cells}");
2739  outputContainer->Add(fhNCellsSumAmpPerMod[imod]);}
2740  }
2741 
2743  {
2745 
2746  for(Int_t imod = 0; imod < fNModules; imod++)
2747  {
2748  for(Int_t ircu = 0; ircu < fNRCU; ircu++)
2749  {
2750  if( ircu ==1 &&
2751  (imod == 10 || imod== 11 || imod == 18 || imod == 19)
2752  ) continue;
2753 
2754  fhTimeAmpPerRCU[imod*fNRCU+ircu] = new TH2F (Form("hTimeAmp_Mod%d_RCU%d",imod,ircu),
2755  Form("#it{E}_{cell} vs #it{t}_{cell} in Module %d, RCU %d ",imod,ircu),
2756  nptbins,ptmin,ptmax/2,ntimebins,timemin,timemax);
2757  fhTimeAmpPerRCU[imod*fNRCU+ircu]->SetXTitle("#it{E} (GeV)");
2758  fhTimeAmpPerRCU[imod*fNRCU+ircu]->SetYTitle("#it{t} (ns)");
2759  outputContainer->Add(fhTimeAmpPerRCU[imod*fNRCU+ircu]);
2760 
2761  }
2762  }
2763  }
2764  }
2765 
2766  // Detectors correlation
2767  //
2768  if(fCorrelate)
2769  {
2770  // PHOS vs EMCAL
2771  fhEMCALPHOSCorrNClusters = new TH2F ("hEMCALPHOSCorrNClusters","# clusters in EMCAL vs PHOS", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax);
2772  fhEMCALPHOSCorrNClusters->SetXTitle("number of clusters in EMCAL");
2773  fhEMCALPHOSCorrNClusters->SetYTitle("number of clusters in PHOS");
2774  outputContainer->Add(fhEMCALPHOSCorrNClusters);
2775 
2776  fhEMCALPHOSCorrEClusters = new TH2F ("hEMCALPHOSCorrEClusters","summed energy of clusters in EMCAL vs PHOS", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2);
2777  fhEMCALPHOSCorrEClusters->SetXTitle("#Sigma #it{E} of clusters in EMCAL (GeV)");
2778  fhEMCALPHOSCorrEClusters->SetYTitle("#Sigma #it{E} of clusters in PHOS (GeV)");
2779  outputContainer->Add(fhEMCALPHOSCorrEClusters);
2780 
2781  fhEMCALPHOSCorrNCells = new TH2F ("hEMCALPHOSCorrNCells","# Cells in EMCAL vs PHOS", ncebins,ncemin,ncemax, ncebins,ncemin,ncemax);
2782  fhEMCALPHOSCorrNCells->SetXTitle("number of Cells in EMCAL");
2783  fhEMCALPHOSCorrNCells->SetYTitle("number of Cells in PHOS");
2784  outputContainer->Add(fhEMCALPHOSCorrNCells);
2785 
2786  fhEMCALPHOSCorrECells = new TH2F ("hEMCALPHOSCorrECells","summed energy of Cells in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4);
2787  fhEMCALPHOSCorrECells->SetXTitle("#Sigma #it{E} of Cells in EMCAL (GeV)");
2788  fhEMCALPHOSCorrECells->SetYTitle("#Sigma #it{E} of Cells in PHOS (GeV)");
2789  outputContainer->Add(fhEMCALPHOSCorrECells);
2790 
2791  // DCal vs EMCAL
2792  fhEMCALDCALCorrNClusters = new TH2F ("hEMCALDCALCorrNClusters","# clusters in EMCAL vs DCAL", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax);
2793  fhEMCALDCALCorrNClusters->SetXTitle("number of clusters in EMCAL");
2794  fhEMCALDCALCorrNClusters->SetYTitle("number of clusters in DCAL");
2795  outputContainer->Add(fhEMCALDCALCorrNClusters);
2796 
2797  fhEMCALDCALCorrEClusters = new TH2F ("hEMCALDCALCorrEClusters","summed energy of clusters in EMCAL vs DCAL", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2);
2798  fhEMCALDCALCorrEClusters->SetXTitle("#Sigma #it{E} of clusters in EMCAL (GeV)");
2799  fhEMCALDCALCorrEClusters->SetYTitle("#Sigma #it{E} of clusters in DCAL (GeV)");
2800  outputContainer->Add(fhEMCALDCALCorrEClusters);
2801 
2802  fhEMCALDCALCorrNCells = new TH2F ("hEMCALDCALCorrNCells","# Cells in EMCAL vs DCAL", ncebins,ncemin,ncemax, ncebins,ncemin,ncemax);
2803  fhEMCALDCALCorrNCells->SetXTitle("number of Cells in EMCAL");
2804  fhEMCALDCALCorrNCells->SetYTitle("number of Cells in DCAL");
2805  outputContainer->Add(fhEMCALDCALCorrNCells);
2806 
2807  fhEMCALDCALCorrECells = new TH2F ("hEMCALDCALCorrECells","summed energy of Cells in EMCAL vs DCAL", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4);
2808  fhEMCALDCALCorrECells->SetXTitle("#Sigma #it{E} of Cells in EMCAL (GeV)");
2809  fhEMCALDCALCorrECells->SetYTitle("#Sigma #it{E} of Cells in DCAL (GeV)");
2810  outputContainer->Add(fhEMCALDCALCorrECells);
2811 
2812 
2813  // DCAL vs PHOS
2814  fhDCALPHOSCorrNClusters = new TH2F ("hDCALPHOSCorrNClusters","# clusters in DCAL vs PHOS", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax);
2815  fhDCALPHOSCorrNClusters->SetXTitle("number of clusters in DCAL");
2816  fhDCALPHOSCorrNClusters->SetYTitle("number of clusters in PHOS");
2817  outputContainer->Add(fhDCALPHOSCorrNClusters);
2818 
2819  fhDCALPHOSCorrEClusters = new TH2F ("hDCALPHOSCorrEClusters","summed energy of clusters in DCAL vs PHOS", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2);
2820  fhDCALPHOSCorrEClusters->SetXTitle("#Sigma #it{E} of clusters in DCAL (GeV)");
2821  fhDCALPHOSCorrEClusters->SetYTitle("#Sigma #it{E} of clusters in PHOS (GeV)");
2822  outputContainer->Add(fhDCALPHOSCorrEClusters);
2823 
2824  fhDCALPHOSCorrNCells = new TH2F ("hDCALPHOSCorrNCells","# Cells in DCAL vs PHOS", ncebins,ncemin,ncemax, ncebins,ncemin,ncemax);
2825  fhDCALPHOSCorrNCells->SetXTitle("number of Cells in DCAL");
2826  fhDCALPHOSCorrNCells->SetYTitle("number of Cells in PHOS");
2827  outputContainer->Add(fhDCALPHOSCorrNCells);
2828 
2829  fhDCALPHOSCorrECells = new TH2F ("hDCALPHOSCorrECells","summed energy of Cells in DCAL vs PHOS", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4);
2830  fhDCALPHOSCorrECells->SetXTitle("#Sigma #it{E} of Cells in DCAL (GeV)");
2831  fhDCALPHOSCorrECells->SetYTitle("#Sigma #it{E} of Cells in PHOS (GeV)");
2832  outputContainer->Add(fhDCALPHOSCorrECells);
2833 
2834  // Calorimeter vs. V0 signal
2835 
2836  fhCaloV0SCorrNClusters = new TH2F ("hCaloV0SNClusters",Form("# clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nclbins,nclmin,nclmax);
2837  fhCaloV0SCorrNClusters->SetXTitle("V0 signal");
2838  fhCaloV0SCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
2839  outputContainer->Add(fhCaloV0SCorrNClusters);
2840 
2841  fhCaloV0SCorrEClusters = new TH2F ("hCaloV0SEClusters",Form("summed energy of clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
2842  fhCaloV0SCorrEClusters->SetXTitle("V0 signal");
2843  fhCaloV0SCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
2844  outputContainer->Add(fhCaloV0SCorrEClusters);
2845 
2846  fhCaloV0SCorrNCells = new TH2F ("hCaloV0SNCells",Form("# Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax, ncebins,ncemin,ncemax);
2847  fhCaloV0SCorrNCells->SetXTitle("V0 signal");
2848  fhCaloV0SCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
2849  outputContainer->Add(fhCaloV0SCorrNCells);
2850 
2851  fhCaloV0SCorrECells = new TH2F ("hCaloV0SECells",Form("summed energy of Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
2852  fhCaloV0SCorrECells->SetXTitle("V0 signal");
2853  fhCaloV0SCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
2854  outputContainer->Add(fhCaloV0SCorrECells);
2855 
2856  // Calorimeter vs V0 multiplicity
2857 
2858  fhCaloV0MCorrNClusters = new TH2F ("hCaloV0MNClusters",Form("# clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nclbins,nclmin,nclmax);
2859  fhCaloV0MCorrNClusters->SetXTitle("V0 signal");
2860  fhCaloV0MCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
2861  outputContainer->Add(fhCaloV0MCorrNClusters);
2862 
2863  fhCaloV0MCorrEClusters = new TH2F ("hCaloV0MEClusters",Form("summed energy of clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
2864  fhCaloV0MCorrEClusters->SetXTitle("V0 signal");
2865  fhCaloV0MCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
2866  outputContainer->Add(fhCaloV0MCorrEClusters);
2867 
2868  fhCaloV0MCorrNCells = new TH2F ("hCaloV0MNCells",Form("# Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax, ncebins,ncemin,ncemax);
2869  fhCaloV0MCorrNCells->SetXTitle("V0 signal");
2870  fhCaloV0MCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
2871  outputContainer->Add(fhCaloV0MCorrNCells);
2872 
2873  fhCaloV0MCorrECells = new TH2F ("hCaloV0MECells",Form("summed energy of Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
2874  fhCaloV0MCorrECells->SetXTitle("V0 signal");
2875  fhCaloV0MCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
2876  outputContainer->Add(fhCaloV0MCorrECells);
2877 
2878  //Calorimeter VS Track multiplicity
2879  fhCaloTrackMCorrNClusters = new TH2F ("hCaloTrackMNClusters",Form("# clusters in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nclbins,nclmin,nclmax);
2880  fhCaloTrackMCorrNClusters->SetXTitle("# tracks");
2881  fhCaloTrackMCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
2882  outputContainer->Add(fhCaloTrackMCorrNClusters);
2883 
2884  fhCaloTrackMCorrEClusters = new TH2F ("hCaloTrackMEClusters",Form("summed energy of clusters in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
2885  fhCaloTrackMCorrEClusters->SetXTitle("# tracks");
2886  fhCaloTrackMCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
2887  outputContainer->Add(fhCaloTrackMCorrEClusters);
2888 
2889  fhCaloTrackMCorrNCells = new TH2F ("hCaloTrackMNCells",Form("# Cells in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax, ncebins,ncemin,ncemax);
2890  fhCaloTrackMCorrNCells->SetXTitle("# tracks");
2891  fhCaloTrackMCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
2892  outputContainer->Add(fhCaloTrackMCorrNCells);
2893 
2894  fhCaloTrackMCorrECells = new TH2F ("hCaloTrackMECells",Form("summed energy of Cells in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
2895  fhCaloTrackMCorrECells->SetXTitle("# tracks");
2896  fhCaloTrackMCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
2897  outputContainer->Add(fhCaloTrackMCorrECells);
2898 
2899  fhCaloCenNClusters = new TH2F ("hCaloCenNClusters","# clusters in calorimeter vs centrality",100,0,100,nclbins,nclmin,nclmax);
2900  fhCaloCenNClusters->SetYTitle("number of clusters in calorimeter");
2901  fhCaloCenNClusters->SetXTitle("Centrality");
2902  outputContainer->Add(fhCaloCenNClusters);
2903 
2904  fhCaloCenEClusters = new TH2F ("hCaloCenEClusters","summed energy of clusters in calorimeter vs centrality",100,0,100,nptbins,ptmin,ptmax*2);
2905  fhCaloCenEClusters->SetYTitle("#Sigma #it{E} of clusters in calorimeter (GeV)");
2906  fhCaloCenEClusters->SetXTitle("Centrality");
2907  outputContainer->Add(fhCaloCenEClusters);
2908 
2909  fhCaloCenNCells = new TH2F ("hCaloCenNCells","# Cells in calorimeter vs centrality",100,0,100,ncebins,ncemin,ncemax);
2910  fhCaloCenNCells->SetYTitle("number of Cells in calorimeter");
2911  fhCaloCenNCells->SetXTitle("Centrality");
2912  outputContainer->Add(fhCaloCenNCells);
2913 
2914  fhCaloCenECells = new TH2F ("hCaloCenECells","summed energy of Cells in calorimeter vs centrality",100,0,100,nptbins*2,ptmin,ptmax*4);
2915  fhCaloCenECells->SetYTitle("#Sigma #it{E} of Cells in calorimeter (GeV)");
2916  fhCaloCenECells->SetXTitle("Centrality");
2917  outputContainer->Add(fhCaloCenECells);
2918 
2919  fhCaloEvPNClusters = new TH2F ("hCaloEvPNClusters","# clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nclbins,nclmin,nclmax);
2920  fhCaloEvPNClusters->SetYTitle("number of clusters in calorimeter");
2921  fhCaloEvPNClusters->SetXTitle("Event plane angle (rad)");
2922  outputContainer->Add(fhCaloEvPNClusters);
2923 
2924  fhCaloEvPEClusters = new TH2F ("hCaloEvPEClusters","summed energy of clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins,ptmin,ptmax*2);
2925  fhCaloEvPEClusters->SetYTitle("#Sigma #it{E} of clusters in calorimeter (GeV)");
2926  fhCaloEvPEClusters->SetXTitle("Event plane angle (rad)");
2927  outputContainer->Add(fhCaloEvPEClusters);
2928 
2929  fhCaloEvPNCells = new TH2F ("hCaloEvPNCells","# Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),ncebins,ncemin,ncemax);
2930  fhCaloEvPNCells->SetYTitle("number of Cells in calorimeter");
2931  fhCaloEvPNCells->SetXTitle("Event plane angle (rad)");
2932  outputContainer->Add(fhCaloEvPNCells);
2933 
2934  fhCaloEvPECells = new TH2F ("hCaloEvPECells","summed energy of Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins*2,ptmin,ptmax*4);
2935  fhCaloEvPECells->SetYTitle("#Sigma #it{E} of Cells in calorimeter (GeV)");
2936  fhCaloEvPECells->SetXTitle("Event plane angle (rad)");
2937  outputContainer->Add(fhCaloEvPECells);
2938  } // correlate calorimeters
2939 
2940  // Monte Carlo Histograms
2941  //
2942  if(IsDataMC())
2943  {
2944  TString particleName[] = {
2945  "Photon", "Pi0", "Eta",
2946  "Electron", "PhotonConv",
2947  "NeutralHadron", "ChargedHadron" };
2948 
2949  // Pure MC
2950 
2951  for(Int_t iPart = 0; iPart < 4; iPart++)
2952  {
2953  fhGenMCE [iPart] = new TH1F(Form("hGenMCE_%s",particleName[iPart].Data()) ,
2954  Form("#it{E} of generated %s",particleName[iPart].Data()),
2955  nptbins,ptmin,ptmax);
2956 
2957  fhGenMCPt[iPart] = new TH1F(Form("hGenMCPt_%s",particleName[iPart].Data()) ,
2958  Form("#it{p}_{T} of generated %s",particleName[iPart].Data()),
2959  nptbins,ptmin,ptmax);
2960 
2961  fhGenMCEtaPhi[iPart] = new TH2F(Form("hGenMCEtaPhi_%s",particleName[iPart].Data()),
2962  Form("Y vs #varphi of generated %s",particleName[iPart].Data()),
2963  200,-1,1,360,0,TMath::TwoPi());
2964 
2965  fhGenMCE [iPart] ->SetXTitle("#it{E} (GeV)");
2966  fhGenMCPt[iPart] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2967  fhGenMCEtaPhi[iPart]->SetXTitle("#eta");
2968  fhGenMCEtaPhi[iPart]->SetYTitle("#varphi (rad)");
2969 
2970  outputContainer->Add(fhGenMCE [iPart]);
2971  outputContainer->Add(fhGenMCPt [iPart]);
2972  outputContainer->Add(fhGenMCEtaPhi[iPart]);
2973 
2974 
2975  fhGenMCAccE [iPart] = new TH1F(Form("hGenMCAccE_%s",particleName[iPart].Data()) ,
2976  Form("#it{E} of generated %s",particleName[iPart].Data()),
2977  nptbins,ptmin,ptmax);
2978  fhGenMCAccPt[iPart] = new TH1F(Form("hGenMCAccPt_%s",particleName[iPart].Data()) ,
2979  Form("#it{p}_{T} of generated %s",particleName[iPart].Data()),
2980  nptbins,ptmin,ptmax);
2981  fhGenMCAccEtaPhi[iPart] = new TH2F(Form("hGenMCAccEtaPhi_%s",particleName[iPart].Data()),
2982  Form("Y vs #varphi of generated %s",particleName[iPart].Data()),
2983  netabins,etamin,etamax,nphibins,phimin,phimax);
2984 
2985  fhGenMCAccE [iPart] ->SetXTitle("#it{E} (GeV)");
2986  fhGenMCAccPt[iPart] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2987  fhGenMCAccEtaPhi[iPart]->SetXTitle("#eta");
2988  fhGenMCAccEtaPhi[iPart]->SetYTitle("#varphi (rad)");
2989 
2990  outputContainer->Add(fhGenMCAccE [iPart]);
2991  outputContainer->Add(fhGenMCAccPt [iPart]);
2992  outputContainer->Add(fhGenMCAccEtaPhi[iPart]);
2993 
2994  }
2995 
2997  {
2998  for(Int_t iPart = 0; iPart < 7; iPart++)
2999  {
3000  for(Int_t iCh = 0; iCh < 2; iCh++)
3001  {
3002  fhRecoMCRatioE[iPart][iCh] = new TH2F (Form("hRecoMCRatioE_%s_Match%d",particleName[iPart].Data(),iCh),
3003  Form("Reconstructed/Generated E, %s, Matched %d",particleName[iPart].Data(),iCh),
3004  nptbins, ptmin, ptmax, 200,0,2);
3005  fhRecoMCRatioE[iPart][iCh]->SetYTitle("#it{E}_{reconstructed}/#it{E}_{generated}");
3006  fhRecoMCRatioE[iPart][iCh]->SetXTitle("#it{E}_{reconstructed} (GeV)");
3007  outputContainer->Add(fhRecoMCRatioE[iPart][iCh]);
3008 
3009 
3010  fhRecoMCDeltaE[iPart][iCh] = new TH2F (Form("hRecoMCDeltaE_%s_Match%d",particleName[iPart].Data(),iCh),
3011  Form("Generated - Reconstructed E, %s, Matched %d",particleName[iPart].Data(),iCh),
3012  nptbins, ptmin, ptmax, nptbins*2,-ptmax,ptmax);
3013  fhRecoMCDeltaE[iPart][iCh]->SetYTitle("#Delta #it{E} (GeV)");
3014  fhRecoMCDeltaE[iPart][iCh]->SetXTitle("#it{E}_{reconstructed} (GeV)");
3015  outputContainer->Add(fhRecoMCDeltaE[iPart][iCh]);
3016 
3017  fhRecoMCDeltaPhi[iPart][iCh] = new TH2F (Form("hRecoMCDeltaPhi_%s_Match%d",particleName[iPart].Data(),iCh),
3018  Form("Generated - Reconstructed #varphi, %s, Matched %d",particleName[iPart].Data(),iCh),
3019  nptbins, ptmin, ptmax, nphibins*2,-phimax,phimax);
3020  fhRecoMCDeltaPhi[iPart][iCh]->SetYTitle("#Delta #varphi (rad)");
3021  fhRecoMCDeltaPhi[iPart][iCh]->SetXTitle("#it{E}_{reconstructed} (GeV)");
3022  outputContainer->Add(fhRecoMCDeltaPhi[iPart][iCh]);
3023 
3024  fhRecoMCDeltaEta[iPart][iCh] = new TH2F (Form("hRecoMCDeltaEta_%s_Match%d",particleName[iPart].Data(),iCh),
3025  Form("Generated - Reconstructed #eta, %s, Matched %d",particleName[iPart].Data(),iCh),
3026  nptbins, ptmin, ptmax,netabins*2,-etamax,etamax);
3027  fhRecoMCDeltaEta[iPart][iCh]->SetYTitle("#Delta #eta ");
3028  fhRecoMCDeltaEta[iPart][iCh]->SetXTitle("#it{E}_{reconstructed} (GeV)");
3029  outputContainer->Add(fhRecoMCDeltaEta[iPart][iCh]);
3030 
3031  fhRecoMCE[iPart][iCh] = new TH2F (Form("hRecoMCE_%s_Match%d",particleName[iPart].Data(),iCh),
3032  Form("#it{E} distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh),
3033  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
3034  fhRecoMCE[iPart][iCh]->SetXTitle("#it{E}_{rec} (GeV)");
3035  fhRecoMCE[iPart][iCh]->SetYTitle("#it{E}_{gen} (GeV)");
3036  outputContainer->Add(fhRecoMCE[iPart][iCh]);
3037 
3038  fhRecoMCPhi[iPart][iCh] = new TH2F (Form("hRecoMCPhi_%s_Match%d",particleName[iPart].Data(),iCh),
3039  Form("#varphi distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh),
3040  nphibins,phimin,phimax, nphibins,phimin,phimax);
3041  fhRecoMCPhi[iPart][iCh]->SetXTitle("#varphi_{reconstructed} (rad)");
3042  fhRecoMCPhi[iPart][iCh]->SetYTitle("#varphi_{generated} (rad)");
3043  outputContainer->Add(fhRecoMCPhi[iPart][iCh]);
3044 
3045  fhRecoMCEta[iPart][iCh] = new TH2F (Form("hRecoMCEta_%s_Match%d",particleName[iPart].Data(),iCh),
3046  Form("#eta distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh),
3047  netabins,etamin,etamax,netabins,etamin,etamax);
3048  fhRecoMCEta[iPart][iCh]->SetXTitle("#eta_{reconstructed} ");
3049  fhRecoMCEta[iPart][iCh]->SetYTitle("#eta_{generated} ");
3050  outputContainer->Add(fhRecoMCEta[iPart][iCh]);
3051  }
3052  }
3053 
3054  // Vertex of generated particles
3055 
3056  fhEMVxyz = new TH2F ("hEMVxyz","Production vertex of reconstructed ElectroMagnetic particles",nvdistbins,vdistmin,vdistmax,nvdistbins,vdistmin,vdistmax);//,100,0,500);
3057  fhEMVxyz->SetXTitle("#it{v}_{x}");
3058  fhEMVxyz->SetYTitle("#it{v}_{y}");
3059  //fhEMVxyz->SetZTitle("v_{z}");
3060  outputContainer->Add(fhEMVxyz);
3061 
3062  fhHaVxyz = new TH2F ("hHaVxyz","Production vertex of reconstructed hadrons",nvdistbins,vdistmin,vdistmax,nvdistbins,vdistmin,vdistmax);//,100,0,500);
3063  fhHaVxyz->SetXTitle("#it{v}_{x}");
3064  fhHaVxyz->SetYTitle("#it{v}_{y}");
3065  //fhHaVxyz->SetZTitle("v_{z}");
3066  outputContainer->Add(fhHaVxyz);
3067 
3068  fhEMR = new TH2F ("hEMR","Distance to production vertex of reconstructed ElectroMagnetic particles vs E rec",nptbins,ptmin,ptmax,nvdistbins,vdistmin,vdistmax);
3069  fhEMR->SetXTitle("#it{E} (GeV)");
3070  fhEMR->SetYTitle("TMath::Sqrt(v_{x}^{2}+v_{y}^{2})");
3071  outputContainer->Add(fhEMR);
3072 
3073  fhHaR = new TH2F ("hHaR","Distance to production vertex of reconstructed Hadrons vs E rec",nptbins,ptmin,ptmax,nvdistbins,vdistmin,vdistmax);
3074  fhHaR->SetXTitle("#it{E} (GeV)");
3075  fhHaR->SetYTitle("TMath::Sqrt(v_{x}^{2}+v_{y}^{2})");
3076  outputContainer->Add(fhHaR);
3077 
3078  // Track Matching
3079 
3080  fhMCEle1EOverP = new TH2F("hMCEle1EOverP","TRACK matches #it{E}/#it{p}, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3081  fhMCEle1EOverP->SetYTitle("#it{E}/#it{p}");
3082  fhMCEle1EOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3083  outputContainer->Add(fhMCEle1EOverP);
3084 
3085  fhMCEle1dR = new TH1F("hMCEle1dR","TRACK matches dR, MC electrons",ndRbins,dRmin,dRmax);
3086  fhMCEle1dR->SetXTitle("#Delta #it{R} (rad)");
3087  outputContainer->Add(fhMCEle1dR) ;
3088 
3089  fhMCEle2MatchdEdx = new TH2F("hMCEle2MatchdEdx","#it{dE/dx} vs. #it{p} for all matches, MC electrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
3090  fhMCEle2MatchdEdx->SetXTitle("#it{p} (GeV/#it{c})");
3091  fhMCEle2MatchdEdx->SetYTitle("<#it{dE/dx}>");
3092  outputContainer->Add(fhMCEle2MatchdEdx);
3093 
3094  fhMCChHad1EOverP = new TH2F("hMCChHad1EOverP","TRACK matches #it{E}/#it{p}, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3095  fhMCChHad1EOverP->SetYTitle("#it{E}/#it{p}");
3096  fhMCChHad1EOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3097  outputContainer->Add(fhMCChHad1EOverP);
3098 
3099  fhMCChHad1dR = new TH1F("hMCChHad1dR","TRACK matches dR, MC charged hadrons",ndRbins,dRmin,dRmax);
3100  fhMCChHad1dR->SetXTitle("#Delta R (rad)");
3101  outputContainer->Add(fhMCChHad1dR) ;
3102 
3103  fhMCChHad2MatchdEdx = new TH2F("hMCChHad2MatchdEdx","#it{dE/dx} vs. #it{p} for all matches, MC charged hadrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
3104  fhMCChHad2MatchdEdx->SetXTitle("#it{p} (GeV/#it{c})");
3105  fhMCChHad2MatchdEdx->SetYTitle("#it{dE/dx}>");
3106  outputContainer->Add(fhMCChHad2MatchdEdx);
3107 
3108  fhMCNeutral1EOverP = new TH2F("hMCNeutral1EOverP","TRACK matches #it{E}/#it{p}, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3109  fhMCNeutral1EOverP->SetYTitle("#it{E}/#it{p}");
3110  fhMCNeutral1EOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3111  outputContainer->Add(fhMCNeutral1EOverP);
3112 
3113  fhMCNeutral1dR = new TH1F("hMCNeutral1dR","TRACK matches dR, MC neutrals",ndRbins,dRmin,dRmax);
3114  fhMCNeutral1dR->SetXTitle("#Delta #it{R} (rad)");
3115  outputContainer->Add(fhMCNeutral1dR) ;
3116 
3117  fhMCNeutral2MatchdEdx = new TH2F("hMCNeutral2MatchdEdx","#it{dE/dx} vs. #it{p} for all matches, MC neutrals",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
3118  fhMCNeutral2MatchdEdx->SetXTitle("#it{p} (GeV/#it{c})");
3119  fhMCNeutral2MatchdEdx->SetYTitle("#it{dE/dx}>");
3120  outputContainer->Add(fhMCNeutral2MatchdEdx);
3121 
3122  fhMCEle1EOverPR02 = new TH2F("hMCEle1EOverPR02","TRACK matches #it{E}/#it{p}, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3123  fhMCEle1EOverPR02->SetYTitle("#it{E}/#it{p}");
3124  fhMCEle1EOverPR02->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3125  outputContainer->Add(fhMCEle1EOverPR02);
3126 
3127  fhMCChHad1EOverPR02 = new TH2F("hMCChHad1EOverPR02","TRACK matches #it{E}/#it{p}, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3128  fhMCChHad1EOverPR02->SetYTitle("#it{E}/#it{p}");
3129  fhMCChHad1EOverPR02->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3130  outputContainer->Add(fhMCChHad1EOverPR02);
3131 
3132  fhMCNeutral1EOverPR02 = new TH2F("hMCNeutral1EOverPR02","TRACK matches #it{E}/#it{p}, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3133  fhMCNeutral1EOverPR02->SetYTitle("#it{E}/#it{p}");
3134  fhMCNeutral1EOverPR02->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3135  outputContainer->Add(fhMCNeutral1EOverPR02);
3136 
3137  fhMCEle1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates #it{E}/#it{p} (60<dEdx<100), MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3138  fhMCEle1EleEOverP->SetYTitle("#it{E}/#it{p}");
3139  fhMCEle1EleEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3140  outputContainer->Add(fhMCEle1EleEOverP);
3141 
3142  fhMCChHad1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates #it{E}/#it{p} (60<dEdx<100), MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3143  fhMCChHad1EleEOverP->SetYTitle("#it{E}/#it{p}");
3144  fhMCChHad1EleEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3145  outputContainer->Add(fhMCChHad1EleEOverP);
3146 
3147  fhMCNeutral1EleEOverP = new TH2F("hMCNeutral1EleEOverP","Electron candidates #it{E}/#it{p} (60<dEdx<100), MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3148  fhMCNeutral1EleEOverP->SetYTitle("#it{E}/#it{p}");
3149  fhMCNeutral1EleEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3150  outputContainer->Add(fhMCNeutral1EleEOverP);
3151  }
3152  }
3153 
3154  // for(Int_t i = 0; i < outputContainer->GetEntries() ; i++)
3155  // printf("i=%d, name= %s\n",i,outputContainer->At(i)->GetName());
3156 
3157  return outputContainer;
3158 }
3159 
3160 //___________________________________________________________________________________________________________
3166 //___________________________________________________________________________________________________________
3167 void AliAnaCalorimeterQA::InvariantMassHistograms(Int_t iclus, Int_t nModule, const TObjArray* caloClusters,
3168  AliVCaloCells * cells)
3169 {
3170  AliDebug(1,"Start");
3171 
3172  //Get vertex for photon momentum calculation and event selection
3173  Double_t v[3] = {0,0,0}; //vertex ;
3174  //GetReader()->GetVertex(v);
3175 
3176  Int_t nModule2 = -1;
3177  Int_t nCaloClusters = caloClusters->GetEntriesFast();
3178 
3179  Float_t phi1 = fClusterMomentum.Phi();
3180  if(phi1 < 0) phi1 += TMath::TwoPi();
3181 
3182  Double_t tof1 = ((AliVCluster*) caloClusters->At(iclus))->GetTOF()*1.e9;
3183  if(tof1>400) tof1-=fConstantTimeShift;
3184 
3185  for(Int_t jclus = iclus + 1 ; jclus < nCaloClusters ; jclus++)
3186  {
3187  AliVCluster* clus2 = (AliVCluster*) caloClusters->At(jclus);
3188 
3189  Float_t maxCellFraction = 0.;
3190  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus2, maxCellFraction);
3191 
3192  Double_t tof2 = clus2->GetTOF()*1.e9;
3193  if(tof2>400) tof2-=fConstantTimeShift;
3194 
3195  Double_t diffTof = tof1-tof2;
3196 
3197  // Try to reduce background with a mild shower shape cut and no more
3198  // than 1 local maximum in cluster and remove low energy clusters
3199 
3200  if( !IsGoodCluster(absIdMax, clus2->GetM02(), clus2->GetNCells(), cells)
3201  || GetCaloUtils()->GetNumberOfLocalMaxima(clus2,cells) > 1
3202  || clus2->GetM02() > fInvMassMaxM02Cut
3203  || clus2->GetM02() < fInvMassMinM02Cut
3204  || clus2->E() < fInvMassMinECut
3205  || clus2->E() > fInvMassMaxECut
3206  || TMath::Abs(diffTof) > fInvMassMaxTimeDifference
3207  ) continue;
3208 
3209  // Get cluster kinematics
3210  clus2->GetMomentum(fClusterMomentum2,v);
3211 
3212  // Check only certain regions
3213  Bool_t in2 = kTRUE;
3215  if(!in2) continue;
3216 
3217  Float_t pairPt = (fClusterMomentum+fClusterMomentum2).Pt();
3218 
3219  // Opening angle cut, avoid combination of DCal and EMCal clusters
3220  Double_t angle = fClusterMomentum.Angle(fClusterMomentum2.Vect());
3221 
3222  if ( fFillInvMassOpenAngle ) fhOpAngle->Fill(pairPt, angle, GetEventWeight()) ;
3223 
3224  if( angle > fInvMassMaxOpenAngle ) continue;
3225 
3226  // Get module of cluster
3227  nModule2 = GetModuleNumber(clus2);
3228 
3229  // Fill histograms
3231  Float_t asym = TMath::Abs( fClusterMomentum.E() - fClusterMomentum2.E() ) /
3232  ( fClusterMomentum.E() + fClusterMomentum2.E() );
3233 
3234  // All modules
3235  // Combine EMCal or PHOS clusters
3236 
3237  Float_t phi2 = fClusterMomentum2.Phi();
3238  if(phi2 < 0) phi2 += TMath::TwoPi();
3239 
3240  AliDebug(1,Form("Selected pair: pT %f, mass %f, asym %f, angle %f, diffTof %f, SM1 %d, SM2 %d\n",pairPt,mass,asym,angle,diffTof,nModule,nModule2));
3241 
3242  Bool_t inPi0Window = kFALSE;
3243  if(mass < 0.18 && mass > 0.1) inPi0Window = kTRUE ;
3244 
3245  if ( nModule < 12 && nModule2 < 12 )
3246  {
3247  fhIM ->Fill(pairPt, mass, GetEventWeight());
3248 
3249  if( fFillPi0PairDiffTime && inPi0Window )
3250  fhClusterPairDiffTimeEPi0Mass->Fill(pairPt, diffTof, GetEventWeight());
3251 
3252  if ( nModule == nModule2 )
3253  {
3254  fhIMSame->Fill(pairPt, mass, GetEventWeight());
3255 
3256  if( fFillPi0PairDiffTime && inPi0Window )
3257  fhClusterPairDiffTimeEPi0MassSame->Fill(pairPt, diffTof, GetEventWeight());
3258  }
3259  else
3260  {
3261  fhIMDiff->Fill(pairPt, mass, GetEventWeight());
3262  }
3263  }
3264  // Combine DCal clusters
3265  else if ( ( GetCalorimeter() == kEMCAL || GetCalorimeter() == kDCAL ) &&
3266  nModule > 11 && nModule2 > 11 && fNModules > 12 )
3267  {
3268  fhIMDCAL->Fill(pairPt, mass, GetEventWeight());
3269 
3270  if( fFillPi0PairDiffTime && inPi0Window )
3271  fhClusterPairDiffTimeEPi0MassDCal->Fill(pairPt, diffTof, GetEventWeight());
3272 
3273  if ( nModule == nModule2 )
3274  {
3275  fhIMDCALSame->Fill(pairPt, mass, GetEventWeight());
3276 
3277  if( fFillPi0PairDiffTime && inPi0Window )
3278  fhClusterPairDiffTimeEPi0MassDCalSame->Fill(pairPt, diffTof, GetEventWeight());
3279  }
3280  else
3281  {
3282  fhIMDCALDiff->Fill(pairPt, mass, GetEventWeight());
3283  }
3284  }
3285 
3286  if ( fFillInvMassOpenAngle ) fhIMvsOpAngle->Fill(mass, angle, GetEventWeight());
3287 
3288  // Single module
3289  if(nModule == nModule2 && nModule >= 0 && nModule < fNModules)
3290  fhIMMod[nModule]->Fill(pairPt, mass, GetEventWeight());
3291 
3292  // Asymetry histograms
3293  fhAsym->Fill(pairPt, asym, GetEventWeight());
3294  } // 2nd cluster loop
3295 
3296  //
3297  // Combine PHOS and DCal
3298  //
3299 
3300  if( ( GetCalorimeter() == kEMCAL || GetCalorimeter() == kDCAL ) &&
3301  fNModules > 12 && nModule > 11)
3302  {
3303  AliDebug(1,"Check DCal-PHOS pairs\n");
3304 
3305  Int_t sector1 = -1;
3306  Int_t sector2 = -1;
3307 
3308  if(phi1 >= 260*TMath::DegToRad() && phi1 < 280) sector1 = 0;
3309  if(phi1 >= 280*TMath::DegToRad() && phi1 < 300) sector1 = 1;
3310  if(phi1 >= 300*TMath::DegToRad() && phi1 < 320) sector1 = 2;
3311 
3312  for(Int_t jclus = 0 ; jclus < GetPHOSClusters()->GetEntriesFast() ; jclus++)
3313  {
3314  AliVCluster* clus2 = (AliVCluster*) GetPHOSClusters()->At(jclus);
3315 
3316  Float_t maxCellFraction = 0.;
3317  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus2, maxCellFraction);
3318 
3319  // Try to reduce background, remove low energy clusters
3320  if( !IsGoodCluster(absIdMax, clus2->GetM02(), clus2->GetNCells(), cells)
3321  || clus2->E() < fInvMassMinECut
3322  || clus2->E() > fInvMassMaxECut
3323  ) continue;
3324 
3325  // Get cluster kinematics
3326  clus2->GetMomentum(fClusterMomentum2,v);
3327 
3328  // Fill histograms
3329 
3331  Float_t pairPt = (fClusterMomentum+fClusterMomentum2).Pt();
3332  //Float_t asym = TMath::Abs( fClusterMomentum.E() - fClusterMomentum2.E() ) /
3333  //( fClusterMomentum.E() + fClusterMomentum2.E() );
3334 
3335  fhIMDCALPHOS->Fill(pairPt, mass, GetEventWeight());
3336 
3337  Float_t phiPHOS = fClusterMomentum2.Phi();
3338  if(phiPHOS < 0) phiPHOS += TMath::TwoPi();
3339 
3340  if(phiPHOS >= 260*TMath::DegToRad() && phiPHOS < 280) sector2 = 0;
3341  if(phiPHOS >= 280*TMath::DegToRad() && phiPHOS < 300) sector2 = 1;
3342  if(phiPHOS >= 300*TMath::DegToRad() && phiPHOS < 320) sector2 = 2;
3343 
3344  if(sector1 == sector2) fhIMDCALPHOSSame->Fill(pairPt, mass, GetEventWeight());
3345 
3346  } // PHOS cluster loop
3347  } // DCal-PHOS combination
3348 
3349 
3350  // Select EMCal clusters in DCal eta acceptance
3351  // Cross check combination of DCal-PHOS pairs
3352  if( fFillInvMassInEMCALWithPHOSDCalAcc && TMath::Abs(fClusterMomentum.Eta() > 0.22))
3353  {
3354  AliDebug(1,"Check EMCAL(DCal)-EMCAL(PHOS) pairs\n");
3355 
3356  Int_t sector1 = -1;
3357  Int_t sector2 = -1;
3358 
3359  if(phi1 >= 80*TMath::DegToRad() && phi1 < 100) sector1 = 0;
3360  if(phi1 >= 100*TMath::DegToRad() && phi1 < 120) sector1 = 1;
3361  if(phi1 >= 120*TMath::DegToRad() && phi1 < 140) sector1 = 2;
3362  if(phi1 >= 140*TMath::DegToRad() && phi1 < 160) sector1 = 3;
3363  if(phi1 >= 160*TMath::DegToRad() && phi1 < 180) sector1 = 4;
3364  if(phi1 >= 180*TMath::DegToRad() && phi1 < 190) sector1 = 5;
3365 
3366  for(Int_t jclus = 0 ; jclus < caloClusters->GetEntriesFast() ; jclus++)
3367  {
3368  AliVCluster* clus2 = (AliVCluster*) caloClusters->At(jclus);
3369 
3370  Float_t maxCellFraction = 0.;
3371  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus2, maxCellFraction);
3372 
3373  Double_t tof2 = clus2->GetTOF()*1.e9;
3374  if(tof2>400) tof2-=fConstantTimeShift;
3375 
3376  Double_t diffTof = TMath::Abs(tof1-tof2);
3377 
3378  // Try to reduce background with a mild shower shape cut and no more
3379  // than 1 local maximum in cluster and remove low energy clusters
3380  if( !IsGoodCluster(absIdMax, clus2->GetM02(), clus2->GetNCells(), cells)
3381  || GetCaloUtils()->GetNumberOfLocalMaxima(clus2,cells) > 1
3382  || clus2->GetM02() > fInvMassMaxM02Cut
3383  || clus2->GetM02() < fInvMassMinM02Cut
3384  || clus2->E() < fInvMassMinECut
3385  || clus2->E() > fInvMassMaxECut
3386  || TMath::Abs(diffTof) > fInvMassMaxTimeDifference
3387  ) continue;
3388 
3389  // Get cluster kinematics
3390  clus2->GetMomentum(fClusterMomentum2,v);
3391 
3392  // Select EMCal clusters in PHOS acceptance
3393  if(TMath::Abs(fClusterMomentum2.Eta() > 0.13)) continue ;
3394 
3395  // Fill histograms
3396 
3398  Float_t pairPt = (fClusterMomentum+fClusterMomentum2).Pt();
3399  //Float_t asym = TMath::Abs( fClusterMomentum.E() - fClusterMomentum2.E() ) /
3400  //( fClusterMomentum.E() + fClusterMomentum2.E() );
3401 
3402  fhIMEMCALPHOS->Fill(pairPt, mass, GetEventWeight());
3403 
3404  Float_t phiPHOS = fClusterMomentum2.Phi();
3405  if(phiPHOS < 0) phiPHOS += TMath::TwoPi();
3406 
3407  if(phiPHOS >= 80*TMath::DegToRad() && phiPHOS < 100) sector2 = 0;
3408  if(phiPHOS >= 100*TMath::DegToRad() && phiPHOS < 120) sector2 = 1;
3409  if(phiPHOS >= 120*TMath::DegToRad() && phiPHOS < 140) sector2 = 2;
3410  if(phiPHOS >= 140*TMath::DegToRad() && phiPHOS < 160) sector2 = 3;
3411  if(phiPHOS >= 160*TMath::DegToRad() && phiPHOS < 180) sector2 = 4;
3412  if(phiPHOS >= 180*TMath::DegToRad() && phiPHOS < 190) sector2 = 5;
3413 
3414  if(sector1 == sector2) fhIMEMCALPHOSSame->Fill(pairPt, mass, GetEventWeight());
3415 
3416  } // PHOS cluster loop
3417  } // EMCal(DCal)-EMCAL(PHOS) combination
3418 
3419  AliDebug(1,"End");
3420 }
3421 
3422 //______________________________
3424 //______________________________
3426 {
3427  if(GetCalorimeter() != kPHOS && GetCalorimeter() !=kEMCAL)
3428  AliFatal(Form("Wrong calorimeter name <%s>", GetCalorimeterString().Data()));
3429 
3430  //if(GetReader()->GetDataType()== AliCaloTrackReader::kMC)
3431  // AliFatal("Analysis of reconstructed data, MC reader not aplicable");
3432 }
3433 
3434 //________________________________________
3436 //________________________________________
3438 {
3439  AddToHistogramsName("AnaCaloQA_");
3440 
3441  fTimeCutMin = -9999999;
3442  fTimeCutMax = 9999999;
3443 
3444  fEMCALCellAmpMin = 0.2; // 200 MeV
3445  fPHOSCellAmpMin = 0.2; // 200 MeV
3446  fCellAmpMin = 0.2; // 200 MeV
3447 
3448  fEMCALClusterM02Min = 0.05;
3449 
3450  fEMCALClusterNCellMin = 2; // at least 2
3451  fPHOSClusterNCellMin = 3; // at least 3
3452 
3453  fInvMassMinECut = 0.5; // 500 MeV
3454  fInvMassMaxECut = 10;
3455 
3456  fInvMassMinM02Cut = 0.1;
3457  fInvMassMaxM02Cut = 0.4;
3458 
3459  fInvMassMaxTimeDifference = 200; // ns, quite open
3460 
3461  fInvMassMaxOpenAngle = 100*TMath::DegToRad(); // 100 degrees
3462 
3463 // fNEBinCuts = 14;
3464 // fEBinCuts[0] = 0.; fEBinCuts[1] = 0.3; fEBinCuts[2] = 0.5;
3465 // fEBinCuts[3] = 1.; fEBinCuts[4] = 2. ; fEBinCuts[5] = 3. ;
3466 // fEBinCuts[6] = 4.; fEBinCuts[7] = 6. ; fEBinCuts[8] = 8. ;
3467 // fEBinCuts[9] = 10.; fEBinCuts[10]= 12.; fEBinCuts[11]= 16.;
3468 // fEBinCuts[12]= 20.; fEBinCuts[13]= 50.; fEBinCuts[14]= 100.;
3469 // for(Int_t i = fNEBinCuts; i < 15; i++) fEBinCuts[i] = 1000.;
3470 
3471  fNEBinCuts = 7;
3472  fEBinCuts[0] = 2. ; fEBinCuts[1] = 4. ; fEBinCuts[2] = 6. ;
3473  fEBinCuts[3] = 8. ; fEBinCuts[4] = 10.; fEBinCuts[5] = 12.;
3474  fEBinCuts[6] = 16.; fEBinCuts[7] = 20.;
3475  for(Int_t i = fNEBinCuts+1; i < 15; i++) fEBinCuts[i] = 1000.;
3476 }
3477 
3478 //_____________________________________________________________________________
3486 //_____________________________________________________________________________
3488  Int_t nCellsPerCluster, AliVCaloCells* cells)
3489 {
3490  //if(!fStudyBadClusters) return kTRUE;
3491 
3492  if(GetCalorimeter() == kEMCAL)
3493  {
3494 
3495  if( m02 < fEMCALClusterM02Min || nCellsPerCluster < fEMCALClusterNCellMin )
3496  return kFALSE ; // mild shower shape cut for exotics
3497 
3498  if(!GetCaloUtils()->GetEMCALRecoUtils()->IsRejectExoticCluster())
3499  {
3500  return !(GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(absIdMax,cells,(GetReader()->GetInputEvent())->GetBunchCrossNumber()));
3501  }
3502  else
3503  {
3504  return kTRUE;
3505  }
3506  }
3507  else // PHOS
3508  {
3509  if( m02 < 0.05 || nCellsPerCluster < fPHOSClusterNCellMin ) return kFALSE ; // mild shower shape cut for exotics
3510 
3511  Float_t ampMax = cells->GetCellAmplitude(absIdMax);
3512  GetCaloUtils()->RecalibrateCellAmplitude(ampMax, GetCalorimeter(), absIdMax);
3513 
3514  if(ampMax < 0.01) return kFALSE;
3515 
3516  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
3517 
3518  if(1-GetCaloUtils()->GetECross(absIdMax,cells,bc)/ampMax > 0.95)
3519  return kFALSE;
3520  else
3521  return kTRUE;
3522  }
3523 }
3524 
3525 //_________________________________________________________
3527 //_________________________________________________________
3528 void AliAnaCalorimeterQA::Print(const Option_t * opt) const
3529 {
3530  if(! opt)
3531  return;
3532 
3533  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3535 
3536  printf("Select Calorimeter %s \n",GetCalorimeterString().Data());
3537  printf("Time Cut: %3.1f < TOF < %3.1f\n" , fTimeCutMin, fTimeCutMax);
3538  printf("EMCAL Min Amplitude : %2.1f GeV/c\n", fEMCALCellAmpMin) ;
3539  printf("PHOS Min Amplitude : %2.1f GeV/c\n", fPHOSCellAmpMin) ;
3540  printf("EMCAL Min M02 : %2.2f\n" , fEMCALClusterM02Min) ;
3541  printf("EMCAL Min n cells : %d\n" , fEMCALClusterNCellMin) ;
3542  printf("PHOS Min n cells : %d\n" , fPHOSClusterNCellMin) ;
3543 
3544  printf("Inv. Mass %2.1f < E_clus < %2.1f GeV/c\n" , fInvMassMinECut , fInvMassMaxECut ) ;
3545  printf("Inv. Mass %2.1f < M02_clus < %2.1f GeV/c\n", fInvMassMinM02Cut, fInvMassMaxM02Cut) ;
3546  printf("Inv. Mass open angle : %2.1f deg\n" , fInvMassMaxOpenAngle*TMath::RadToDeg()) ;
3547  printf("Inv. Mass time difference: %2.1f ns\n" , fInvMassMaxTimeDifference) ;
3548 }
3549 
3550 //_____________________________________________________
3552 //_____________________________________________________
3554 {
3555  AliDebug(1,"Start");
3556 
3557  //Print("");
3558 
3559  // Play with the MC stack if available
3560  if(IsDataMC()) MCHistograms();
3561 
3562  // Correlate Calorimeters and V0 and track Multiplicity
3563  if(fCorrelate) Correlate();
3564 
3565  // Get List with CaloClusters , calo Cells, init min amplitude
3566  TObjArray * caloClusters = NULL;
3567  AliVCaloCells * cells = 0x0;
3568  if (GetCalorimeter() == kPHOS)
3569  {
3571  caloClusters = GetPHOSClusters();
3572  cells = GetPHOSCells();
3573  }
3574  else if (GetCalorimeter() == kEMCAL)
3575  {
3577  caloClusters = GetEMCALClusters();
3578  cells = GetEMCALCells();
3579  }
3580  else
3581  AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Wrong calorimeter name <%s>, END", GetCalorimeterString().Data()));
3582 
3583  if( !caloClusters || !cells )
3584  {
3585  AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - No CaloClusters or CaloCells available"));
3586  return; // trick coverity
3587  }
3588 
3589  if(caloClusters->GetEntriesFast() == 0) return ;
3590 
3591  //printf("QA: N cells %d, N clusters %d \n",cells->GetNumberOfCells(),caloClusters->GetEntriesFast());
3592 
3593  // Clusters
3594  ClusterLoopHistograms(caloClusters,cells);
3595 
3596  // Cells
3597  CellHistograms(cells);
3598 
3599  AliDebug(1,"End");
3600 }
3601 
3602 //______________________________________
3606 //______________________________________
3608 {
3609  if ( !GetMC() ) return;
3610 
3611  Int_t pdg = 0 ;
3612  Int_t status = 0 ;
3613  Int_t nprim = GetMC()->GetNumberOfTracks();
3614 
3615  AliVParticle * primary= 0;
3616 
3617  //printf("N primaries %d\n",nprim);
3618  for(Int_t i=0 ; i < nprim; i++)
3619  {
3620  if ( !GetReader()->AcceptParticleMCLabel( i ) ) continue ;
3621 
3622  // Get the generated particles, check that it is primary (not parton, resonance)
3623  // and get its momentum. Different way to recover from ESD or AOD
3624 
3625  primary = GetMC()->GetTrack(i) ;
3626  if(!primary)
3627  {
3628  AliWarning("Primaries pointer not available!!");
3629  continue;
3630  }
3631 
3632  pdg = primary->PdgCode();
3633  status = primary->MCStatusCode();
3634 
3635  //printf("Input: i %d, %s, pdg %d, status %d \n",i, primStack->GetName(), pdg, status);
3636 
3637  //if (!primAOD->IsPrimary()) continue; //accept all which is not MC transport generated. Don't know how to avoid partons
3638 
3639  if ( status > 11 ) continue; //Working for PYTHIA and simple generators, check for HERWIG, HIJING?
3640 
3641  // Protection against floating point exception
3642  if ( primary->E() == TMath::Abs(primary->Pz()) ||
3643  (primary->E() - primary->Pz()) < 1e-3 ||
3644  (primary->E() + primary->Pz()) < 0 ) continue ;
3645 
3646  //printf("Take : i %d, %s, pdg %d, status %d \n",i, primStack->GetName(), pdg, status);
3647 
3648  // Photon kinematics
3649  primary->Momentum(fPrimaryMomentum);
3650 
3651  Float_t eMC = fPrimaryMomentum.E();
3652  if(eMC < 0.2) continue;
3653 
3654  Float_t ptMC = fPrimaryMomentum.E();
3655 
3656  Float_t etaMC = fPrimaryMomentum.Eta();
3657 
3658  // Only particles in |eta| < 1
3659  if (TMath::Abs(etaMC) > 1) continue;
3660 
3661  Float_t phiMC = fPrimaryMomentum.Phi();
3662  if(phiMC < 0)
3663  phiMC += TMath::TwoPi();
3664 
3665  Int_t mcIndex = -1;
3666  if (pdg==22) mcIndex = kmcPhoton;
3667  else if (pdg==111) mcIndex = kmcPi0;
3668  else if (pdg==221) mcIndex = kmcEta;
3669  else if (TMath::Abs(pdg)==11) mcIndex = kmcElectron;
3670 
3671  if( mcIndex >=0 )
3672  {
3673  fhGenMCE [mcIndex]->Fill( eMC, GetEventWeight());
3674  fhGenMCPt[mcIndex]->Fill(ptMC, GetEventWeight());
3675  if(eMC > 0.5) fhGenMCEtaPhi[mcIndex]->Fill(etaMC, phiMC, GetEventWeight());
3676 
3677  Bool_t inacceptance = kTRUE;
3678  // Check same fidutial borders as in data analysis on top of real acceptance if real was requested.
3679  if( IsFiducialCutOn() && !GetFiducialCut()->IsInFiducialCut(fPrimaryMomentum.Eta(),fPrimaryMomentum.Phi(),GetCalorimeter()) )
3680  inacceptance = kFALSE ;
3681 
3682  if ( IsRealCaloAcceptanceOn() ) // defined on base class
3683  {
3684  if ( !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primary) ) inacceptance = kFALSE ;
3685  }
3686 
3687  if(!inacceptance) continue;
3688 
3689  fhGenMCAccE [mcIndex]->Fill( eMC, GetEventWeight());
3690  fhGenMCAccPt[mcIndex]->Fill(ptMC, GetEventWeight());
3691  if(eMC > 0.5) fhGenMCAccEtaPhi[mcIndex]->Fill(etaMC, phiMC, GetEventWeight());
3692  }
3693  }
3694 }
3695 
3696 
Int_t charge
Float_t GetHistoZMax() const
TH2F * fhCaloV0MCorrEClusters
! Calo vs V0 multiplicity, total measured cluster energy
Float_t GetHistoPtMax() const
TH2F * fhTimeIdLowGain
! Time vs Absolute cell Id, low gain
TH2F * fhDeltaCellClusterRE
! R cluster - R cell distribution (cm) vs cluster energy
Bool_t IsGoodCluster(Int_t absIdMax, Float_t m02, Int_t nCellsPerCluster, AliVCaloCells *cells)
TH2F * fhDCALPHOSCorrNCells
! DCAL vs PHOS, number of cells
Int_t pdg
TH2F * fhNCellsPerClusterNoCut
! N cells per cluster vs cluster energy, before cuts
TH2F * fhMCNeutral1EOverPR02
! p/E for track-cluster matches, dR < 0.2, MC neutral
TH2F * fhNCellsMod
! Number of towers/crystals with signal for different module, Reco
TH3F * fhXYZ
! cluster X vs Y vs Z (cm)
TH2F * fh1EOverPMod
! p/E for track-cluster matches, per SM
TH2F * fh1EOverPR02Mod
! p/E for track-cluster matches, dR < 0.2, per SM
Int_t GetHistoNClusterCellMin() const
TH2F * fhDeltaCellClusterYNCells
! Y cluster - Y cell distribution (cm) vs N cells in cluster
TH1F * fhPt
! pT distribution, Reco
Float_t GetHistoPtMin() const
Int_t GetHistoFinePtBins() const
TH2F * fhClusterMaxCellECross
! 1 - Energy in cross around max energy cell / max energy cell vs cluster energy, good clusters ...
const Double_t ymax
Definition: AddTaskCFDStar.C:7
Bool_t IsMCParticleInCalorimeterAcceptance(Int_t calo, AliVParticle *particle)
Check that a MC AOD is in the calorimeter acceptance.
Int_t fNMaxColsFull
Number of EMCAL/PHOS columns full detector.
Bool_t fFillPi0PairDiffTime
Fill time difference histograms of cluster pairs in pi0 mass window, only if fFillAllPi0Histo=kTRUE.
double Double_t
Definition: External.C:58
Int_t GetHistoShowerShapeBins() const
Definition: External.C:260
TH2F * fhGridCellsE
! Cells ordered in column/row for different module, weighted with energy, Reco
TH1F * fhPtCharged
! pT distribution, Reco, matched with track
Float_t GetHistodEdxMax() const
TH2F * fhClusterMaxCellDiff
! Difference between cluster energy and energy of cell with more energy, good clusters only ...
virtual void AddToHistogramsName(TString add)
virtual AliVCaloCells * GetEMCALCells() const
TH2F * fh2dR
! distance between projected track and cluster (eta-phi units)
Float_t fInvMassMinECut
Minimum energy cut value for clusters entering the invariant mass calculation.
TH2F * fh2dRMod
! distance between projected track and cluster (eta-phi units), per SM
Definition: External.C:236
Int_t GetHistoNCellsMin() const
TH2F * fhBadClusterEtaPhi
! Time Max cell of bad cluster
Float_t fEMCALCellAmpMin
Amplitude Threshold on EMCal cells.
TH2F * fhIMDCALPHOS
! Cluster pairs invariant mass vs pair pT, for DCal-PHOS pairs
TH1F * fhEta
! eta distribution, Reco
TH2F * fhTimeMod
! Cell time distribution for different module, Reco
TH2F * fhMCChHad1EleEOverP
! p/E for track-cluster matches, dR < 0.2, 60 < dEdx < 100, MC charged hadrons
TH2F * fh2MatchdEdxMod
! dE/dx for all matches, per SM
TH2F * fh2EledEdx
! dE/dx vs. momentum for electron candidates
TH2F * fhTrackMatchedDPhiNeg
! Phi distance between track and cluster vs cluster E, after and before photon cuts ...
virtual Int_t GetModuleNumberCellIndexesAbsCaloMap(Int_t absId, Int_t calo, Int_t &icol, Int_t &irow, Int_t &iRCU, Int_t &icolAbs, Int_t &irowAbs) const
TH2F * fhSumCellsAmpMod
! Sum of towers/crystals signal for different module, Reco
Int_t fLastModule
Last EMCAL/PHOS module, set in CaloUtils or depending fidutial cuts.
AliEMCALRecoUtils * GetEMCALRecoUtils() const
Bool_t fFillInvMassOpenAngle
Fill opening angle histograms of cluster pairs, only if fFillAllPi0Histo=kTRUE.
Int_t GetHistoTrackMultiplicityMax() const
TH2F * fhCaloTrackMCorrNClusters
! Calo vs Track Multiplicity, number of clusters
Float_t GetECross(Int_t absId, AliVCaloCells *cells, Int_t bc)
Float_t GetPhi(Float_t phi) const
Shift phi angle in case of negative value 360 degrees. Example TLorenzVector::Phi defined in -pi to p...
TH3F * fhEtaPhiE
! eta vs phi vs E, Reco
Float_t GetHistoVertexDistMin() const
Float_t fPHOSCellAmpMin
Amplitude Threshold on PHOS cells.
TH1F * fhBadClusterEnergy
! Energy of bad cluster
virtual AliVEvent * GetInputEvent() const
TH2F * fhRecoMCRatioE[7][2]
! Reco/Gen E generated particle vs reconstructed E
Double_t mass
TH2F * fhCaloCenECells
! Calo vs centrality, total measured cell energy
TH2F * fhIMDCALDiff
! Cluster pairs invariant mass vs pair pT, for DCal pairs
TH2F ** fhNClustersSumEnergyPerMod
! N clusters vs sum of energies in different module, Reco
energy
Definition: HFPtSpectrum.C:44
TH2F * fhEMCALDCALCorrEClusters
! EMCAL vs DCAL, total measured cluster energy
TH1F * fhGenMCAccE[4]
! pt of primary particle, in acceptance
TH2F * fhXNCells
! X (cm) cluster distribution vs N cells in cluster
TH2F * fhRCellE
! R=sqrt(x^2+y^2) (cm) cell distribution vs cell energy
TH1F * fhGenMCPt[4]
! pt of primary particle
TH2F * fhClusterPairDiffTimeESameMod
! Pair of clusters time difference vs E, in same Mod
Float_t GetHistodRMax() const
Int_t fNModules
Number of EMCAL/PHOS modules to use in analysis, set in CaloUtils.
virtual Double_t GetEventPlaneAngle() const
void ClusterMatchedWithTrackHistograms(AliVCluster *clus, Bool_t mcOK, Int_t pdg)
TH2F * fhEtaPhi
! eta-phi distribution, Reco
TH2F * fhIMSame
! Cluster pairs invariant mass vs pair pT, for EMCAL or PHOS pairs
TH1F * fhGenMCAccPt[4]
! pt of primary particle, in acceptance
Float_t GetHistoXMin() const
Bool_t fFillAllCellAbsIdHistograms
Fill all cell related histograms where one axis is the cell absId.
TH2F * fhNLocMaxStd
! Cluster Number of local Maxima, stored
Double_t fTimeCutMax
Remove clusters/cells with time larger than this value, in ns.
Float_t fCellAmpMin
Amplitude Threshold on calorimeter cells, set at execution time.
TH2F * fhIMEMCALPHOSSame
! Cluster pairs invariant mass vs pair pT, for EMCAL(DCal eta acceptance)-EMCAL (PHOS eta acceptance)...
TH2F * fhCaloEvPECells
! Calo vs event plane angle, total measured cell energy
virtual Int_t GetV0Multiplicity(Int_t i) const
Int_t fNMaxCols
Number of EMCAL/PHOS columns per SM.
TH1F * fhNCellsCutAmpMin
! Number of towers/crystals with signal, with min amplitude
Bool_t IsTrackMatched(AliVCluster *cluster, AliCalorimeterUtils *cu, AliVEvent *event)
void Init()
Check if the calorimeter setting is ok, if not abort.
Int_t GetHistoMassBins() const
TH2F ** fhNCellsPerClusterModNoCut
! N cells per clusters different module, Reco, No cut
Int_t GetHistoPhiBins() const
TH2F * fhClusterMaxCellCloseCellRatio
! Ratio between max cell energy and cell energy of the same cluster
void InvariantMassHistograms(Int_t iclus, Int_t nModule, const TObjArray *caloClusters, AliVCaloCells *cells)
TH2F * fhRecoMCDeltaE[7][2]
! Gen-Reco E generated particle vs reconstructed E
TH2F ** fhTimeAmpPerRCU
! Time vs Amplitude measured in towers/crystals different RCU
Class for the Calorimeter QA analysis.
Float_t fInvMassMaxECut
Maximum energy cut value for clusters entering the invariant mass calculation.
Float_t GetHistoMassMin() const
Bool_t fFillAllPosHisto
Fill all the position related histograms.
void AddStep(Double_t max, Double_t binwidth)
TH2F * fhEMCALPHOSCorrEClusters
! EMCAL vs PHOS, total measured cluster energy
Float_t fEBinCuts[15]
Energy bins cut.
TH2F * fhNCellsPerClusterWeirdModNoCut
! N cells per clusters different module, Reco, No cut, ridiculously large energy
Bool_t fFillAllTH3
Fill TH3 histograms.
Int_t GetHistoXBins() const
Int_t GetHistoV0SignalBins() const
TH2F * fhClusterTimeEnergy
! Cluster Time vs Energy
TH2F * fhDeltaCellClusterRNCells
! R cluster - R cell distribution (cm) vs N cells in cluster
Int_t GetHistoTrackMultiplicityMin() const
Bool_t IsExoticCell(Int_t absId, AliVCaloCells *cells, Int_t bc=-1)
TH1F * fhMCChHad1dR
! distance between projected track and cluster, MC charged hadrons
TH1F * fhTime
! Time measured in towers/crystals
Int_t fFirstModule
First EMCAL/PHOS module, set in CaloUtils or depending fidutial cuts.
TH2F * fhCaloCenNClusters
! Calo vs centrality, number of clusters
Float_t GetHistoTrackResidualPhiMin() const
TH2F * fhBadClusterMaxCellDiff
! Difference between cluster energy and energy of cell with more energy
TH2F * fhBadClusterMaxCellECross
! 1 - Energy in cross around max energy cell / max energy cell vs cluster energy, bad clusters ...
Float_t GetHistoTrackResidualEtaMin() const
TH2F * fhTrackMatchedDEtaDPhiNeg
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV, after and before ...
Int_t GetHistoNClusterCellBins() const
TH1F * fhPhiCharged
! phi distribution, Reco, matched with track
TH2F * fh1EOverPR02
! p/E for track-cluster matches, dR < 0.2
TH2F * fhMCEle1EleEOverP
! p/E for track-cluster matches, dR < 0.2, 60 < dEdx < 100, MC electrons
TH2F * fhBadClusterMaxCellCloseCellDiff
! Difference between max cell energy and cell energy of the same cluster for bad clusters ...
Float_t GetHistoYMax() const
Float_t GetHistoDiffTimeMin() const
void MakeAnalysisFillHistograms()
Main task method, call all the methods filling QA histograms.
TH2F * fhCellECross
! 1 - Energy in cross around cell / cell energy
TH2F * fhClusterPairDiffTimeE
! Pair of clusters time difference vs E
Int_t GetHistoPOverEBins() const
TH2F * fhClusterPairDiffTimeEPi0Mass
! EMCal/PHOS Cluster time TOF difference, for pairs in 0.1 < mass < 0.18
TH2F * fhBadClusterMaxCellCloseCellRatio
! Ratio between max cell energy and cell energy of the same cluster for bad clusters ...
Float_t GetHistoPhiMin() const
Float_t GetHistoDiffTimeMax() const
TH1F * fhCellIdCellLargeTimeSpread
! Cells with large time respect to max (diff > 100 ns)
Int_t GetHistoVertexDistBins() const
Int_t CheckOrigin(Int_t label, const AliMCEvent *mcevent)
TH2F * fhEMCALPHOSCorrNClusters
! EMCAL vs PHOS, number of clusters
TH2F * fhIMDCALSame
! Cluster pairs invariant mass vs pair pT, for DCal pairs
TH2F * fhCaloTrackMCorrEClusters
! Calo vs Track Multiplicity, total measured cluster energy
TH2F * fhZNCells
! Z (cm) cluster distribution vs N cells in cluster
Int_t GetHistoZBins() const
TH1F * fhE
! E distribution, Reco
TH2F * fhTrackMatchedDPhiPosMod
! Phi distance between positive track and cluster vs module for E > 0.5 GeV
TH2F * fhDeltaCellClusterYE
! Y cluster - Y cell distribution (cm) vs cluster energy
TH2F * fhEBinCellColRow[14]
! Column and row location of cell in different energy bins.
TH2F * fhZE
! Z (cm) cluster distribution vs cluster energy
TH2F * fhEMCALDCALCorrNClusters
! EMCAL vs DCAL, number of clusters
TH1F * fhEtaCharged
! eta-phi distribution, Reco, matched with track
Bool_t fFillAllPi0Histo
Fill invariant mass histograms.
TH2F * fhTimePerSMPerBC[4]
! Time vs SM number for BC%4=0,1,2,3
Float_t GetCellWeight(Float_t eCell, Float_t eCluster) const
const Double_t etamin
Float_t GetHistoAsymmetryMax() const
Float_t GetHistoMassMax() const
TH1F * fhPhi
! phi distribution, Reco
Base class for CaloTrackCorr analysis algorithms.
Bool_t fFillAllClusterHistograms
Fill all cluster related histograms.
virtual TString GetCalorimeterString() const
Bool_t fFillInvMassInEMCALWithPHOSDCalAcc
Fill invariant mass histograms of EMCal clusters in DCal and PHOS eta acceptance each, only if fFillAllPi0Histo=kTRUE.
TH2F * fhBadClusterPairDiffTimeE
! Pair of clusters time difference vs E, bad cluster
TLorentzVector fClusterMomentum
! Cluster momentum, temporary container
TH2F * fhEtaPhiCharged
! eta distribution, Reco, matched with track
TH2F * fhRecoMCDeltaPhi[7][2]
! Gen-Reco phi generated particle vs reconstructed E
virtual Bool_t IsRealCaloAcceptanceOn() const
Float_t GetHistodEdxMin() const
TLorentzVector fClusterMomentum2
! Cluster momentum, temporary container
virtual AliFiducialCut * GetFiducialCut()
int Int_t
Definition: External.C:63
TH2F * fhClusterMaxCellDiffNoCut
! Difference between cluster energy and energy of cell with more energy, no bad cluster rejection ...
virtual AliHistogramRanges * GetHistogramRanges()
TH2F * fhMCNeutral2MatchdEdx
! dE/dx vs. momentum for all matches, MC neutral
Float_t fEMCALClusterM02Min
Minimum M02 on EMCal clusters.
TH2F * fhCaloCenEClusters
! Calo vs centrality, total measured cluster energy
Int_t GetHistoDiffTimeBins() const
TH2F * fhNLocMax
! Cluster Number of local Maxima, from CaloUtils
float Float_t
Definition: External.C:68
TH3F * fhEtaPhiECharged
! eta vs phi vs E, Reco, matched with track
TH2F * fhBadCellTimeSpreadRespectToCellMax
! Difference of the time of cell with maximum dep energy and the rest of cells for bad clusters ...
TH2F * fhDeltaCellClusterXE
! X cluster - X cell distribution (cm) vs cluster energy
Float_t GetHistoTrackResidualPhiMax() const
TH2F * fhEMCALPHOSCorrNCells
! EMCAL vs PHOS, number of cells
TH2F * fhEtaPhiCell
! eta vs phi, cells
Int_t GetHistoAsymmetryBins() const
const Double_t ptmax
Float_t fInvMassMinM02Cut
Minimum M02 shower shape cut value for clusters entering the invariant mass calculation.
Double_t fTimeCutMin
Remove clusters/cells with time smaller than this value, in ns.
Float_t GetHistoRMin() const
virtual AliEMCALGeometry * GetEMCALGeometry() const
Int_t fNEBinCuts
Number of energy bin cuts.
Float_t GetHistoRMax() const
Bool_t fFillClusterMaxCellHisto
Fill cluster cell max histograms.
TH2F * fhTrackMatchedDPhiNegMod
! Phi distance between negative track and cluster vs module for E > 0.5 GeV
void InitParameters()
Initialize the parameters of the analysis.
TH2F * fhNCellsPerCluster
! N cells per cluster vs cluster energy
TH2F * fhNCellsPerClusterWeirdMod
! N cells per clusters different module, Reco, ridiculously large energy
TH2F * fhGenMCAccEtaPhi[4]
! eta vs phi of primary particle, in acceptance
Bool_t IsInFiducialCut(Float_t eta, Float_t phi, Int_t det) const
TH2F * fhAmpMod
! Cell amplitude distribution for different module, Reco
const Double_t zmin
TH2F * fhCaloV0SCorrNCells
! Calo vs V0 signal, number of cells
Int_t GetHistoV0MultiplicityBins() const
TH2F ** fhIMMod
! cluster pairs invariant mass, different module,
TH2F ** fhNCellsPerClusterMod
! N cells per clusters different module, Reco
TH2F * fhTrackMatchedDEtaPos
! Eta distance between track and cluster vs cluster E, after and before photon cuts ...
Int_t GetHistoV0SignalMin() const
Helper class creating user defined custom binning.
Int_t GetHistoV0MultiplicityMin() const
Float_t GetHistoShowerShapeMin() const
TH3F * fhEtaPhiAmpCell
! eta vs phi vs amplitude, cells
TH2F * fh1EleEOverPMod
! p/E for track-cluster matches, dR < 0.2, 60 < dEdx < 100, per SM
TH2F * fhCaloEvPNCells
! Calo vs event plane angle, number of cells
TH2F * fhBadClusterLambda0
! Cluster Lambda0 vs Energy, clusters declared bad
Float_t GetHistoXMax() const
TH2F * fhClusterPairDiffTimeEPi0MassDCalSame
! DCal Cluster time TOF difference, for pairs in 0.1 < mass < 0.18, pairs in same Module ...
TH2F * fhRecoMCPhi[7][2]
! phi generated particle vs reconstructed phi
Int_t GetHistodEdxBins() const
TH2F * fhTimeId
! Time vs Absolute cell Id
virtual AliCalorimeterUtils * GetCaloUtils() const
TH2F * fh1EOverP
! p/E for track-cluster matches
Int_t fNMaxRowsFullMin
Last of EMCAL/PHOS rows full detector.
Int_t GetHistoNClusterCellMax() const
TH2F * fhIMvsOpAngle
! Cluster pairs opening angle vs mass
TH2F * fhRecoMCEta[7][2]
! eta generated particle vs reconstructed Eta
Int_t GetHistoTrackResidualEtaBins() const
TH2F * fh2EledEdxMod
! dE/dx for electron candidates, per SM
TH2F * fhBadClusterLambda1
! Cluster Lambda1 vs Energy, clusters declared bad
TH2F * fhMCEle1EOverPR02
! p/E for track-cluster matches, dR < 0.2, MC electrons
Int_t fEMCALClusterNCellMin
Minimum number of cells on EMCal clusters.
Int_t GetHistoTrackResidualPhiBins() const
TH1F * fhNClusters
! Number of clusters
virtual AliPHOSGeoUtils * GetPHOSGeometry() const
TH2F * fhMCEle1EOverP
! p/E for track-cluster matches, MC electrons
const Double_t ptmin
TH1F * fhMCEle1dR
! distance between projected track and cluster, MC electrons
virtual Int_t GetV0Signal(Int_t i) const
TH2F * fhOpAngle
! Cluster pairs opening angle vs pair pT
TH1F * fhGenMCE[4]
! pt of primary particle
TH2F * fhIMDiff
! Cluster pairs invariant mass vs pair pT, for EMCAL or PHOS pairs
TH2F * fhEMR
! Electromagnetic distance to vertex vs rec energy
virtual Double_t GetEventWeight() const
TH2F * fhClusterPairDiffTimeEPi0MassDCal
! DCal Cluster time TOF difference, for pairs in 0.1 < mass < 0.18
TH2F * fhCaloTrackMCorrNCells
! Calo vs V0 Track Multiplicity, number of cells
Int_t GetNumberOfLocalMaxima(AliVCluster *cluster, AliVCaloCells *cells)
Find the number of local maxima in cluster.
Int_t GetHistoTrackMultiplicityBins() const
TH2F * fhIMDCALPHOSSame
! Cluster pairs invariant mass vs pair pT, for DCal-PHOS pairs
TH2F * fhDeltaCellClusterXNCells
! X cluster - X cell distribution (cm) vs N cells in cluster
TH2F * fhTrackMatchedDEtaDPhiPos
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV, after and before ...
TH2F * fhEBinClusterEtaPhi[14]
! Eta-Phi location of cluster in different energy bins.
TH1F * fhNCells
! Number of towers/crystals with signal
TH2F * fhIMDCAL
! Cluster pairs invariant mass vs pair pT, for DCal pairs
TH2F * fhTrackMatchedDPhiPos
! Phi distance between track and cluster vs cluster E, after and before photon cuts ...
TH2F * fhCaloEvPNClusters
! Calo vs event plane angle, number of clusters
virtual TObjArray * GetPHOSClusters() const
TH2F * fhDCALPHOSCorrNClusters
! DCAL vs PHOS, number of clusters
Int_t GetHistoRBins() const
Float_t GetHistoEtaMin() const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TH2F * fhXCellE
! X (cm) cell distribution vs cell energy
TH2F * fhIMEMCALPHOS
! Cluster pairs invariant mass vs pair pT, for EMCAL(DCal eta acceptance)-EMCAL (PHOS eta acceptance)...
TH2F * fhHaR
! Hadron distance to vertex vs rec energy
TH2F * fhAmpWeirdMod
! Cell amplitude distribution for different module, very large Amp, Reco
TH2F * fhRE
! R=sqrt(x^2+y^2) (cm) cluster distribution vs cluster energy
Int_t GetHistoNClustersMin() const
virtual void CreateBinEdges(TArrayD &edges) const
TH2F * fhIM
! Cluster pairs invariant mass vs pair pT, for EMCAL or PHOS pairs
Float_t GetHistoVertexDistMax() const
TH2F * fhTimeAmp
! Time vs Amplitude
Float_t GetHistoZMin() const
void CalculateAverageTime(AliVCluster *clus, AliVCaloCells *cells, Double_t timeAverages[2])
TH2F * fhMCEle2MatchdEdx
! dE/dx vs. momentum for all matches, MC electrons
Int_t GetHistoYBins() const
Int_t GetHistoNClustersBins() const
TH1F * fhECharged
! E distribution, Reco, matched with track
TH2F * fhNClustersMod
! Number of clusters for different module, Reco
Int_t fNRCU
Number of EMCAL/PHOS RCU.
TH2F * fhHaVxyz
! Hadron production vertex
TH2F * fhAmpId
! Amplitude measured in towers/crystals vs id of tower.
TH2F * fhCaloV0SCorrECells
! Calo vs V0 signal, total measured cell energy
Float_t GetHistoEtaMax() const
Float_t GetHistodRMin() const
TH1F * fhAmplitude
! Amplitude measured in towers/crystals
Int_t GetHistoPtBins() const
TH2F * fhEMod
! Cluster E distribution for different module, Reco
TH2F * fhRNCells
! R=sqrt(x^2+y^2) (cm) cluster distribution vs N cells in cluster
Int_t fPHOSClusterNCellMin
Minimum number of cells on PHOS clusters.
TH2F * fhTrackMatchedDEtaNeg
! Eta distance between track and cluster vs cluster E, after and before photon cuts ...
TH2F * fhZCellE
! Z (cm) cell distribution vs cell energy
TH2F * fhGridCellsTime
! Cells ordered in column/row for different module, weighted with time, Reco
AliVTrack * GetMatchedTrack(AliVCluster *cluster, AliVEvent *event, Int_t index=-1) const
TH2F * fhEBinClusterColRow[14]
! Column and row location of cluster max E cell in different energy bins.
void RecalibrateCellTimeL1Phase(Double_t &time, Int_t calo, Int_t iSM, Int_t bunchCrossNumber) const
Recalculate time L1 phase shift if time recalibration available for EMCAL.
TH3F * fhXYZCell
! cell X vs Y vs Z (cm)
Float_t fInvMassMaxOpenAngle
Combine clusters within with a maximum opening angle between them. In radians.
TLorentzVector fPrimaryMomentum
! Primary MC momentum, temporary container
virtual Int_t GetModuleNumber(AliCaloTrackParticle *part) const
Float_t GetHistoPOverEMax() const
TH2F * fhCaloEvPEClusters
! Calo vs event plane angle, total measured cluster energy
Bool_t fCorrelate
Correlate PHOS/EMCAL cells/clusters, also with V0 and track multiplicity.
Bool_t fFillAllCellTimeHisto
Fill all cell time histo.
TH2F * fhTrackMatchedDEtaPosMod
! Eta distance between positive track and cluster vs module for E > 0.5 GeV
TH2F * fhDeltaCellClusterZNCells
! Z cluster - Z cell distribution (cm) vs N cells in cluster
void ClusterHistograms(AliVCluster *cluster, const TObjArray *caloClusters, AliVCaloCells *cells, Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac, Double_t tmax)
Bool_t fFillAllPosHisto2
Fill all the position related histograms 2.
const Double_t etamax
TObjString * GetAnalysisCuts()
Save parameters used for analysis in a string.
void RecalibrateCellAmplitude(Float_t &amp, Int_t calo, Int_t absId) const
Recalculate cell energy if recalibration factor.
TH2F * fhYCellE
! Y (cm) cell distribution vs cell energy
Int_t GetHistoV0MultiplicityMax() const
virtual AliMCAnalysisUtils * GetMCAnalysisUtils()
Float_t GetHistoAsymmetryMin() const
Int_t GetHistoV0SignalMax() const
const Double_t ymin
Definition: AddTaskCFDStar.C:6
TH2F * fhCaloV0MCorrNClusters
! Calo vs V0 multiplicity , number of clusters
TH2F * fh1EleEOverP
! p/E for track-cluster matches, dR < 0.2, 60 < dEdx < 100
Int_t GetHistoNCellsMax() const
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
TH2F ** fhNCellsSumAmpPerMod
! N cells vs sum of amplitude in different modules, Reco
Int_t GetHistoTimeBins() const
Float_t GetHistoPOverEMin() const
unsigned short UShort_t
Definition: External.C:28
TH2F * fhDeltaCellClusterZE
! Z cluster - Z cell distribution (cm) vs cluster energy
Float_t GetHistoFinePtMin() const
TH2F * fhAmpIdLowGain
! Amplitude measured in towers/crystals vs id of tower, low gain towers
void CellInClusterPositionHistograms(AliVCluster *cluster)
Bool_t ClusterMCHistograms(Bool_t matched, const Int_t *labels, Int_t nLabels, Int_t &pdg)
TH2F * fhGridCellsELowGain
! Cells ordered in column/row for different module, weighted with energy, Reco, low gain ...
TH2F * fh2MatchdEdx
! dE/dx vs. momentum for all matches
void BadClusterHistograms(AliVCluster *clus, const TObjArray *caloClusters, AliVCaloCells *cells, Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac, Double_t tmax)
const char Option_t
Definition: External.C:48
Float_t GetHistoTimeMax() const
Float_t GetHistoTimeMin() const
Float_t GetHistoShowerShapeMax() const
TH2F * fhMCChHad1EOverP
! p/E for track-cluster matches, MC charged hadrons
TH2F * fhRecoMCDeltaEta[7][2]
! Gen-Reco eta generated particle vs reconstructed E
TH2F * fhMCChHad2MatchdEdx
! dE/dx vs. momentum for all matches, MC charged
TH2F * fhClusterMaxCellCloseCellDiff
! Difference between max cell energy and cell energy of the same cluster
TH2F * fhXE
! X (cm) cluster distribution vs cluster energy
const Double_t zmax
TH2F * fhGridCells
! Cells ordered in column/row for different module, Reco
Float_t GetHistoPhiMax() const
Int_t GetHistoNCellsBins() const
TH2F * fhGridCellsTimeLowGain
! Cells ordered in column/row for different module, weighted with time, Reco, low gain ...
TH2F * fhCaloTrackMCorrECells
! Calo vs V0 Track Multipliticy, total measured cell energy
bool Bool_t
Definition: External.C:53
virtual AliCaloTrackReader * GetReader() const
Float_t fInvMassMaxM02Cut
Maximum M02 shower shape cut value for clusters entering the invariant mass calculation.
Int_t fNMaxRowsFullMax
First of EMCAL/PHOS rows full detector.
TH2F * fhEMVxyz
! Electromagnetic particle production vertex
Int_t GetHistoEtaBins() const
TH2F * fhLambda0
! Cluster Lambda0 vs Energy
void CellHistograms(AliVCaloCells *cells)
TH2F * fhCaloV0MCorrECells
! Calo vs V0 multiplicity, total measured cell energy
Float_t GetHistoTrackResidualEtaMax() const
TH2F * fhEMCALDCALCorrNCells
! EMCAL vs DCAL, number of cells
TH2F * fhMCNeutral1EleEOverP
! p/E for track-cluster matches, dR < 0.2, 60 < dEdx < 100, MC neutral
virtual TObjArray * GetEMCALClusters() const
TH2F * fhClusterPairDiffTimeEPi0MassSame
! EMCal/PHOS Cluster time TOF difference, for pairs in 0.1 < mass < 0.18, pairs in same Module ...
Float_t GetHistoFinePtMax() const
TH2F * fhYE
! Y (cm) cluster distribution vs cluster energy
virtual AliVCaloCells * GetPHOSCells() const
TH1F * fhMCNeutral1dR
! Distance between projected track and cluster, MC neutral
Float_t GetHistoYMin() const
TH2F * fhBadClusterTimeEnergy
! Time Max cell of bad cluster
TH2F * fhCaloV0SCorrEClusters
! Calo vs V0 signal, total measured cluster energy
Bool_t fFillAllCellHistograms
Fill all cell related histograms.
TH2F * fhDCALPHOSCorrEClusters
! DCAL vs PHOS, total measured cluster energy
Bool_t fStudyBadClusters
Study bad clusters not passing selection criteria (exotic, shower shape, n cells).
TH2F * fhCaloCenNCells
! Calo vs centrality, number of cells
TH2F * fhYNCells
! Y (cm) cluster distribution vs N cells in cluster
void RecalibrateCellTime(Double_t &time, Int_t calo, Int_t absId, Int_t bunchCrossNumber) const
Recalculate time if time recalibration available for EMCAL not ready for PHOS.
Int_t GetMaxEnergyCell(AliVCaloCells *cells, AliVCluster *clu, Float_t &fraction) const
For a given CaloCluster, it gets the absId of the cell with maximum energy deposit.
TH2F * fhCaloV0MCorrNCells
! Calo vs V0 multiplicity, number of cells
TH2F * fhMCNeutral1EOverP
! p/E for track-cluster matches, MC neutral
TH2F * fhMCChHad1EOverPR02
! p/E for track-cluster matches, dR < 0.2, MC charged hadrons
Int_t nptbins
Int_t GetHistodRBins() const
TH2F * fhGridCellsLowGain
! Cells ordered in column/row for different module, Reco, low gain
TH2F * fhAsym
! Cluster pairs invariant mass vs pair pT
TH2F * fhRecoMCE[7][2]
! E generated particle vs reconstructed E
TH2F * fhTrackMatchedDEtaNegMod
! Eta distance between negative track and cluster vs module for E > 0.5 GeV
TH2F * fhEMCALPHOSCorrECells
! EMCAL vs PHOS, total measured cell energy
Int_t GetHistoNClustersMax() const
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
TH2F * fhTimeAmpLowGain
! Time vs Amplitude, low gain
void ClusterLoopHistograms(const TObjArray *clusters, AliVCaloCells *cells)
TH2F * fhDCALPHOSCorrECells
! DCAL vs PHOS, total measured cell energy
Bool_t fFillEBinAcceptanceHisto
Fill histograms with cluster eta-phi distribution and column-row cell, for different energy bins...
const Double_t phimin
TH2F * fhEMCALDCALCorrECells
! EMCAL vs DCAL, total measured cell energy
Float_t fInvMassMaxTimeDifference
Maximum difference between the time of the 2 clusters to be considered in invariant mass...
TH2F * fhEWeirdMod
! Cluster E distribution for different module, very large E, Reco
TH2F * fhCellTimeSpreadRespectToCellMax
! Difference of the time of cell with maximum dep energy and the rest of cells
Bool_t fFillAllTMHisto
Fill track matching histograms.
TH2F * fhSumClustersEnergyMod
! Sum of clusters energy for different module, Reco
void SetMinimum(Double_t min)
TH2F * fhTimeL1UnCorrId
! Time (not corrected for L1 phase) vs Absolute cell Id
Int_t fNMaxRows
Number of EMCAL/PHOS rows per SM.
TH2F * fhCaloV0SCorrNClusters
! Calo vs V0 signal , number of clusters
TH2F * fhGenMCEtaPhi[4]
! eta vs phi of primary particle
TH2F * fhLambda1
! Cluster Lambda1 vs Energy
Float_t fConstantTimeShift
Apply a 600 ns time shift in case of simulation, shift in ns.