AliPhysics  c7b8e89 (c7b8e89)
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  Int_t status = 0;
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,status)) 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,
1057  clus->GetClusterMCEdepFraction(),
1058  nLabel, pdg);
1059 
1060  // Matched clusters with tracks, also do some MC comparison, needs input from ClusterMCHistograms
1061  if( matched && fFillAllTMHisto)
1062  ClusterMatchedWithTrackHistograms(clus,mcOK,pdg);
1063 
1064  // Invariant mass
1065  // Try to reduce background with a mild shower shape cut and no more than 1 maxima
1066  // in cluster and remove low energy clusters
1067 
1068  if ( fFillAllPi0Histo
1069  && nCaloClusters > 1
1070  && nCaloCellsPerCluster > 1
1071  && GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells) == 1
1072  && clus->GetM02() < fInvMassMaxM02Cut
1073  && clus->GetM02() > fInvMassMinM02Cut
1074  && clus->E() > fInvMassMinECut
1075  && clus->E() < fInvMassMaxECut
1076  )
1077  InvariantMassHistograms(iclus, nModule, caloClusters,cells);
1078 
1079  } // Cluster loop
1080 
1081  // Number of clusters histograms
1082  if(nCaloClustersAccepted > 0) fhNClusters->Fill(nCaloClustersAccepted, GetEventWeight());
1083 
1084  // Number of clusters per module
1085  for(Int_t imod = 0; imod < fNModules; imod++ )
1086  {
1087  if ( imod < fFirstModule || imod > fLastModule ) continue ;
1088 
1089  AliDebug(1,Form("Module %d calo %s clusters %d, sum E %f", imod, GetCalorimeterString().Data(), nClustersInModule[imod], energyInModule[imod]));
1090 
1091  fhNClustersMod ->Fill(nClustersInModule[imod], imod, GetEventWeight());
1092  fhSumClustersEnergyMod->Fill(energyInModule [imod], imod, GetEventWeight());
1093 
1094  fhNClustersSumEnergyPerMod[imod]->Fill(energyInModule[imod], nClustersInModule[imod], GetEventWeight());
1095  }
1096 
1097  delete [] nClustersInModule;
1098  delete [] energyInModule;
1099 }
1100 
1101 //__________________________________________________________________________________
1110 //__________________________________________________________________________________
1112  const Int_t * labels,
1113  const UShort_t * edepFrac,
1114  Int_t nLabels, Int_t & pdg )
1115 {
1116  if(!labels || nLabels<=0)
1117  {
1118  AliWarning(Form("Strange, labels array %p, n labels %d", labels,nLabels));
1119  return kFALSE;
1120  }
1121 
1122  AliDebug(1,Form("Primaries: nlabels %d",nLabels));
1123 
1124  // Play with the MC stack if available
1125  Int_t label = labels[0];
1126 
1127  if(label < 0)
1128  {
1129  AliDebug(1,Form(" *** bad label ***: label %d", label));
1130  return kFALSE;
1131  }
1132 
1133  if( label >= GetMC()->GetNumberOfTracks())
1134  {
1135  AliDebug(1,Form("*** large label ***: label %d, n tracks %d", label, GetMC()->GetNumberOfTracks()));
1136  return kFALSE;
1137  }
1138 
1139  Float_t e = fClusterMomentum.E();
1140  Float_t eta = fClusterMomentum.Eta();
1141  Float_t phi = fClusterMomentum.Phi();
1142  if(phi < 0) phi +=TMath::TwoPi();
1143 
1144  AliVParticle * primary = 0x0;
1145 
1146  Int_t pdg0 =-1; Int_t status = -1; Int_t iMother = -1; Int_t iParent = -1;
1147  Float_t vxMC = 0; Float_t vyMC = 0;
1148  Float_t eMC = 0; //Float_t ptMC= 0;
1149  Float_t phiMC = 0; Float_t etaMC = 0;
1150  Int_t charge = 0;
1151 
1152  // Check the origin.
1153  Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels, edepFrac,nLabels, GetMC(),
1154  GetReader()->GetNameOfMCEventHederGeneratorToAccept(),e);
1155 
1156  if ( !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown) )
1157  {
1158  primary = GetMC()->GetTrack(label);
1159  iMother = label;
1160  pdg0 = TMath::Abs(primary->PdgCode());
1161  pdg = pdg0;
1162  status = primary->MCStatusCode();
1163  vxMC = primary->Xv();
1164  vyMC = primary->Yv();
1165  iParent = primary->GetMother();
1166 
1167  AliDebug(1,"Cluster most contributing mother:");
1168  AliDebug(1,Form("\t Mother label %d, pdg %d, %s, status %d, Primary? %d, Physical Primary? %d, parent %d",
1169  iMother, pdg0, primary->GetName(),status, primary->IsPrimary(), primary->IsPhysicalPrimary(), iParent));
1170 
1171  // Get final particle, no conversion products
1172  if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
1173  {
1174  // Get the parent
1175  primary = GetMC()->GetTrack(iParent);
1176  pdg = TMath::Abs(primary->PdgCode());
1177 
1178  AliDebug(2,"Converted cluster!. Find before conversion:");
1179 
1180  while((pdg == 22 || pdg == 11) && status != 1) //&& !aodprimary->IsPhysicalPrimary()
1181  {
1182  Int_t iMotherOrg = iMother;
1183  iMother = iParent;
1184  primary = GetMC()->GetTrack(iMother);
1185  status = primary->MCStatusCode();
1186  pdg = TMath::Abs(primary->PdgCode());
1187  iParent = primary->GetMother();
1188 
1189  // If gone too back and non stable, assign the decay photon/electron
1190  // there are other possible decays, ignore them for the moment
1191  if(pdg==111 || pdg==221)
1192  {
1193  primary = GetMC()->GetTrack(iMotherOrg);
1194  break;
1195  }
1196 
1197  if( iParent < 0 )
1198  {
1199  iParent = iMother;
1200  break;
1201  }
1202 
1203  AliDebug(2,Form("\t pdg %d, index %d, %s, status %d",pdg, iMother, primary->GetName(),status));
1204  }
1205 
1206  AliDebug(1,"Converted Cluster mother before conversion:");
1207  AliDebug(1,Form("\t Mother label %d, pdg %d, %s, status %d, Primary? %d, Physical Primary? %d, parent %d",
1208  iMother, pdg, primary->GetName(), status, primary->IsPrimary(), primary->IsPhysicalPrimary(), iParent));
1209 
1210  }
1211 
1212  // Overlapped pi0 (or eta, there will be very few), get the meson
1213  if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) ||
1214  GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta))
1215  {
1216  AliDebug(2,"Overlapped Meson decay!, Find it:");
1217 
1218  while(pdg != 111 && pdg != 221)
1219  {
1220  //printf("iMother %d, pdg %d, iParent %d, pdg %d\n",iMother,pdg,iParent,GetMC()->Particle(iParent)->GetPdgCode());
1221  iMother = iParent;
1222  primary = GetMC()->GetTrack(iMother);
1223  status = primary->MCStatusCode();
1224  pdg = TMath::Abs(primary->PdgCode());
1225  iParent = primary->GetMother();
1226 
1227  if( iParent < 0 ) break;
1228 
1229  AliDebug(2,Form("\t pdg %d, %s, index %d",pdg, primary->GetName(),iMother));
1230 
1231  if(iMother==-1)
1232  {
1233  AliWarning("Tagged as Overlapped photon but meson not found, why?");
1234  //break;
1235  }
1236  }
1237 
1238  AliDebug(2,Form("Overlapped %s decay, label %d",primary->GetName(),iMother));
1239  }
1240 
1241  eMC = primary->E();
1242  //ptMC = primary->Pt();
1243  phiMC = primary->Phi();
1244  etaMC = primary->Eta();
1245  pdg = TMath::Abs(primary->PdgCode());
1246  //charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
1247  charge = primary->Charge();
1248  }
1249 
1250  //Float_t vz = primary->Vz();
1251  Float_t rVMC = TMath::Sqrt(vxMC*vxMC + vyMC*vyMC);
1252  if( ( pdg == 22 || TMath::Abs(pdg) == 11 ) && status != 1 )
1253  {
1254  fhEMVxyz ->Fill(vxMC, vyMC, GetEventWeight());//,vz);
1255  fhEMR ->Fill(e , rVMC, GetEventWeight());
1256  }
1257 
1258  //printf("reco e %f, pt %f, phi %f, eta %f \n", e, pt, phi, eta);
1259  //printf("prim e %f, pt %f, phi %f, eta %f \n", eMC,ptMC,phiMC ,etaMC );
1260  //printf("vertex: vx %f, vy %f, vz %f, r %f \n", vxMC, vyMC, vz, r);
1261 
1262  // Overlapped pi0 (or eta, there will be very few)
1263  Int_t mcIndex = -1;
1264  if ( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0 ) )
1265  {
1266  mcIndex = kmcPi0;
1267  } // Overlapped pizero decay
1268  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta ) )
1269  {
1270  mcIndex = kmcEta;
1271  } // Overlapped eta decay
1272  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton ) )
1273  {
1274  if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
1275  mcIndex = kmcPhotonConv ;
1276  else
1277  mcIndex = kmcPhoton ;
1278  } // photon
1279  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron) )
1280  {
1281  mcIndex = kmcElectron;
1282  fhEMVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
1283  fhEMR ->Fill(e , rVMC, GetEventWeight());
1284  }
1285  else if(charge == 0)
1286  {
1287  mcIndex = kmcNeHadron;
1288  fhHaVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
1289  fhHaR ->Fill(e , rVMC, GetEventWeight());
1290  }
1291  else if(charge!=0)
1292  {
1293  mcIndex = kmcChHadron;
1294  fhHaVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
1295  fhHaR ->Fill(e , rVMC, GetEventWeight());
1296  }
1297 
1298  //printf("mc index %d\n",mcIndex);
1299 
1300  if( mcIndex >= 0 && mcIndex < 7 && e > 0.5 && eMC > 0.5)
1301  {
1302  fhRecoMCE [mcIndex][(matched)]->Fill(e , eMC , GetEventWeight());
1303  fhRecoMCEta [mcIndex][(matched)]->Fill(eta, etaMC , GetEventWeight());
1304  fhRecoMCPhi [mcIndex][(matched)]->Fill(phi, phiMC , GetEventWeight());
1305  fhRecoMCRatioE [mcIndex][(matched)]->Fill(e , e/eMC , GetEventWeight());
1306  fhRecoMCDeltaE [mcIndex][(matched)]->Fill(e , eMC-e , GetEventWeight());
1307  fhRecoMCDeltaPhi[mcIndex][(matched)]->Fill(e , phiMC-phi, GetEventWeight());
1308  fhRecoMCDeltaEta[mcIndex][(matched)]->Fill(e , etaMC-eta, GetEventWeight());
1309  }
1310 
1311  if( primary ) return kTRUE ;
1312  else return kFALSE;
1313 }
1314 
1315 //_________________________________________________________________________________________________________
1320 //_________________________________________________________________________________________________________
1322 {
1323  Float_t e = fClusterMomentum.E();
1324  Float_t pt = fClusterMomentum.Pt();
1325  Float_t eta = fClusterMomentum.Eta();
1326  Float_t phi = fClusterMomentum.Phi();
1327  if(phi < 0) phi +=TMath::TwoPi();
1328 
1329  fhECharged ->Fill(e , GetEventWeight());
1330  fhPtCharged ->Fill(pt , GetEventWeight());
1331  fhPhiCharged ->Fill(phi, GetEventWeight());
1332  fhEtaCharged ->Fill(eta, GetEventWeight());
1333 
1334  if ( fFillAllTH3 ) fhEtaPhiECharged->Fill(eta, phi, e, GetEventWeight());
1335  else if ( e > 0.5 ) fhEtaPhiCharged ->Fill(eta, phi, GetEventWeight());
1336 
1337  // Study the track and matched cluster if track exists.
1338 
1339  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(clus, GetReader()->GetInputEvent());
1340 
1341  if(!track) return ;
1342 
1343  Double_t tpt = track->Pt();
1344  Double_t tmom = track->P();
1345  Double_t dedx = track->GetTPCsignal();
1346  Int_t nITS = track->GetNcls(0);
1347  Int_t nTPC = track->GetNcls(1);
1348  Bool_t positive = kFALSE;
1349  if(track) positive = (track->Charge()>0);
1350 
1351  // Residuals
1352  Float_t deta = clus->GetTrackDz();
1353  Float_t dphi = clus->GetTrackDx();
1354  Double_t dR = TMath::Sqrt(dphi*dphi + deta*deta);
1355  Int_t nModule = GetModuleNumber(clus);
1356 
1357  if( TMath::Abs(dphi) < 999 )
1358  {
1359  if(positive)
1360  {
1361  fhTrackMatchedDEtaPos->Fill(e, deta, GetEventWeight());
1362  fhTrackMatchedDPhiPos->Fill(e, dphi, GetEventWeight());
1363 
1364  if(e > 0.5)
1365  {
1366  fhTrackMatchedDEtaPosMod ->Fill(deta, nModule, GetEventWeight());
1367  fhTrackMatchedDPhiPosMod ->Fill(dphi, nModule, GetEventWeight());
1368  fhTrackMatchedDEtaDPhiPos->Fill(deta, dphi , GetEventWeight());
1369  }
1370  }
1371  else
1372  {
1373  fhTrackMatchedDEtaNeg->Fill(e, deta, GetEventWeight());
1374  fhTrackMatchedDPhiNeg->Fill(e, dphi, GetEventWeight());
1375 
1376  if(e > 0.5)
1377  {
1378  fhTrackMatchedDEtaNegMod ->Fill(deta, nModule, GetEventWeight());
1379  fhTrackMatchedDPhiNegMod ->Fill(dphi, nModule, GetEventWeight());
1380  fhTrackMatchedDEtaDPhiNeg->Fill(deta, dphi , GetEventWeight());
1381  }
1382  }
1383  }
1384 
1385  Double_t eOverP = e/tmom;
1386  fh1EOverP->Fill(tpt, eOverP, GetEventWeight());
1387  if(e > 0.5 && tpt > 0.5) fh1EOverPMod->Fill(eOverP, nModule, GetEventWeight());
1388 
1389  if(dR < 0.02)
1390  {
1391  fh1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
1392  if(e > 0.5 && tpt > 0.5) fh1EOverPR02Mod->Fill(eOverP, nModule, GetEventWeight());
1393 
1394  if(dedx > 60 && dedx < 100)
1395  {
1396  fh1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
1397  if(e > 0.5 && tpt > 0.5) fh1EleEOverPMod->Fill(eOverP, nModule, GetEventWeight());
1398  }
1399  }
1400 
1401  fh2dR->Fill(e, dR, GetEventWeight());
1402  fh2MatchdEdx->Fill(tmom, dedx, GetEventWeight());
1403 
1404  if(e > 0.5 && tmom > 0.5)
1405  {
1406  fh2dRMod->Fill(dR, nModule, GetEventWeight());
1407  fh2MatchdEdxMod->Fill(dedx, nModule, GetEventWeight());
1408  }
1409 
1410  if(dR < 0.02 && eOverP > 0.6 && eOverP < 1.2
1411  && clus->GetNCells() > 1 && nITS > 3 && nTPC > 20)
1412  {
1413  fh2EledEdx->Fill(tmom, dedx, GetEventWeight());
1414  if(e > 0.5 && tmom > 0.5) fh2EledEdxMod->Fill(dedx, nModule, GetEventWeight());
1415  }
1416 
1417  if(IsDataMC() && okPrimary)
1418  {
1419  Double_t charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
1420 
1421  if(TMath::Abs(pdg) == 11)
1422  {
1423  fhMCEle1EOverP ->Fill(tpt , eOverP, GetEventWeight());
1424  fhMCEle1dR ->Fill(dR , GetEventWeight());
1425  fhMCEle2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
1426 
1427  if(dR < 0.02)
1428  {
1429  fhMCEle1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
1430  if(dedx > 60 && dedx < 100) fhMCEle1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
1431  }
1432  }
1433  else if(charge!=0)
1434  {
1435  fhMCChHad1EOverP ->Fill(tpt , eOverP, GetEventWeight());
1436  fhMCChHad1dR ->Fill(dR , GetEventWeight());
1437  fhMCChHad2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
1438 
1439  if(dR < 0.02)
1440  {
1441  fhMCChHad1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
1442  if(dedx > 60 && dedx < 100) fhMCChHad1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
1443  }
1444  }
1445  else if(charge == 0)
1446  {
1447  fhMCNeutral1EOverP ->Fill(tpt , eOverP, GetEventWeight());
1448  fhMCNeutral1dR ->Fill(dR , GetEventWeight());
1449  fhMCNeutral2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
1450 
1451  if(dR < 0.02)
1452  {
1453  fhMCNeutral1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
1454  if(dedx > 60 && dedx < 100) fhMCNeutral1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
1455  }
1456  }
1457  } // DataMC
1458 }
1459 
1460 //___________________________________
1463 //___________________________________
1465 {
1466  // Clusters arrays
1467  TObjArray * caloClustersEMCAL = GetEMCALClusters();
1468  TObjArray * caloClustersPHOS = GetPHOSClusters();
1469 
1470  if(!caloClustersEMCAL || !caloClustersPHOS)
1471  {
1472  AliDebug(1,Form("PHOS (%p) or EMCAL (%p) clusters array not available, do not correlate",caloClustersPHOS,caloClustersEMCAL));
1473  return ;
1474  }
1475 
1476  // Cells arrays
1477  AliVCaloCells * cellsEMCAL = GetEMCALCells();
1478  AliVCaloCells * cellsPHOS = GetPHOSCells();
1479 
1480  if(!cellsEMCAL || !cellsPHOS)
1481  {
1482  AliDebug(1,Form("PHOS (%p) or EMCAL (%p) cells array ot available, do not correlate",cellsPHOS,cellsEMCAL));
1483  return ;
1484  }
1485 
1486  // Clusters parameters
1487  Int_t nclEMCAL = 0;
1488  Int_t nclDCAL = 0;
1489  Int_t nclPHOS = 0;
1490 
1491  Float_t sumClusterEnergyEMCAL = 0;
1492  Float_t sumClusterEnergyDCAL = 0;
1493  Float_t sumClusterEnergyPHOS = 0;
1494 
1495  Int_t iclus = 0;
1496  Float_t energy = 0;
1497  AliVCluster* cluster = 0;
1498  for(iclus = 0 ; iclus < caloClustersEMCAL->GetEntriesFast() ; iclus++)
1499  {
1500  cluster = (AliVCluster*)caloClustersEMCAL->At(iclus);
1501  Float_t energy = cluster->E();
1502 
1503  if( energy < 0.5 ) continue;
1504 
1505  if(cluster->GetCellsAbsId()[0] < 12288)
1506  {
1507  nclEMCAL++;
1508  sumClusterEnergyEMCAL += energy;
1509  }
1510  else
1511  {
1512  nclDCAL++;
1513  sumClusterEnergyDCAL += energy;
1514  }
1515  }
1516 
1517  for(iclus = 0 ; iclus < caloClustersPHOS ->GetEntriesFast(); iclus++)
1518  {
1519  cluster = (AliVCluster*) caloClustersPHOS->At(iclus);
1520 
1521  energy = cluster->E();
1522 
1523  if( energy < 0.5 ) continue;
1524 
1525  nclPHOS++;
1526  sumClusterEnergyPHOS += energy;
1527  }
1528 
1529  // Cells parameters
1530  Int_t ncellsEMCAL = 0 ;
1531  Int_t ncellsDCAL = 0 ;
1532  Int_t ncellsPHOS = 0;
1533 
1534  Float_t sumCellEnergyEMCAL = 0;
1535  Float_t sumCellEnergyDCAL = 0;
1536  Float_t sumCellEnergyPHOS = 0;
1537  Int_t icell = 0;
1538  for(icell = 0 ; icell < cellsEMCAL->GetNumberOfCells() ; icell++)
1539  {
1540  Float_t amp = cellsEMCAL->GetAmplitude(icell);
1541  Int_t cellId = cellsEMCAL->GetCellNumber(icell);
1542 
1543  if (amp < fEMCALCellAmpMin) continue;
1544 
1545  if( cellId < 12288)
1546  {
1547  ncellsEMCAL++;
1548  sumCellEnergyEMCAL += amp;
1549  }
1550  else
1551  {
1552  ncellsDCAL++;
1553  sumCellEnergyDCAL += amp;
1554  }
1555  }
1556 
1557  for(icell = 0 ; icell < cellsPHOS->GetNumberOfCells(); icell++)
1558  {
1559  Float_t amp = cellsPHOS->GetAmplitude(icell);
1560  Int_t cellId = cellsPHOS->GetCellNumber(icell);
1561 
1562  if ( cellId < 0 ) continue ; // CPV
1563 
1564  if ( amp < fPHOSCellAmpMin ) continue;
1565 
1566  ncellsPHOS++;
1567  sumCellEnergyPHOS += amp;
1568  }
1569 
1570  // Fill Histograms
1571 
1572  fhEMCALPHOSCorrNClusters->Fill(nclEMCAL , nclPHOS , GetEventWeight());
1573  fhEMCALPHOSCorrEClusters->Fill(sumClusterEnergyEMCAL, sumClusterEnergyPHOS, GetEventWeight());
1574  fhEMCALPHOSCorrNCells ->Fill(ncellsEMCAL , ncellsPHOS , GetEventWeight());
1575  fhEMCALPHOSCorrECells ->Fill(sumCellEnergyEMCAL , sumCellEnergyPHOS , GetEventWeight());
1576 
1577  fhEMCALDCALCorrNClusters->Fill(nclEMCAL , nclDCAL , GetEventWeight());
1578  fhEMCALDCALCorrEClusters->Fill(sumClusterEnergyEMCAL, sumClusterEnergyDCAL, GetEventWeight());
1579  fhEMCALDCALCorrNCells ->Fill(ncellsEMCAL , ncellsDCAL , GetEventWeight());
1580  fhEMCALDCALCorrECells ->Fill(sumCellEnergyEMCAL , sumCellEnergyDCAL , GetEventWeight());
1581 
1582  fhDCALPHOSCorrNClusters ->Fill(nclDCAL , nclPHOS , GetEventWeight());
1583  fhDCALPHOSCorrEClusters ->Fill(sumClusterEnergyDCAL , sumClusterEnergyPHOS, GetEventWeight());
1584  fhDCALPHOSCorrNCells ->Fill(ncellsDCAL , ncellsPHOS , GetEventWeight());
1585  fhDCALPHOSCorrECells ->Fill(sumCellEnergyDCAL , sumCellEnergyPHOS , GetEventWeight());
1586 
1587  Int_t v0S = GetV0Signal(0) + GetV0Signal(1);
1589  Int_t trM = GetTrackMultiplicity();
1590  Float_t cen = GetEventCentrality();
1591  Float_t ep = GetEventPlaneAngle();
1592 
1593  Int_t ncl = nclPHOS;
1594  Float_t sumClusterEnergy = sumClusterEnergyPHOS;
1595  Int_t ncells = ncellsPHOS;
1596  Float_t sumCellEnergy = sumCellEnergyPHOS;
1597 
1598  if ( GetCalorimeter() == kEMCAL )
1599  {
1600  ncl = nclEMCAL + nclDCAL;
1601  sumClusterEnergy = sumClusterEnergyEMCAL + sumClusterEnergyDCAL;
1602  ncells = ncellsEMCAL + ncellsDCAL;
1603  sumCellEnergy = sumCellEnergyEMCAL + sumCellEnergyDCAL;
1604  }
1605 
1606  fhCaloV0MCorrNClusters ->Fill(v0M, ncl , GetEventWeight());
1607  fhCaloV0MCorrEClusters ->Fill(v0M, sumClusterEnergy, GetEventWeight());
1608  fhCaloV0MCorrNCells ->Fill(v0M, ncells , GetEventWeight());
1609  fhCaloV0MCorrECells ->Fill(v0M, sumCellEnergy , GetEventWeight());
1610 
1611  fhCaloV0SCorrNClusters ->Fill(v0S, ncl , GetEventWeight());
1612  fhCaloV0SCorrEClusters ->Fill(v0S, sumClusterEnergy, GetEventWeight());
1613  fhCaloV0SCorrNCells ->Fill(v0S, ncells , GetEventWeight());
1614  fhCaloV0SCorrECells ->Fill(v0S, sumCellEnergy , GetEventWeight());
1615 
1616  fhCaloTrackMCorrNClusters->Fill(trM, ncl , GetEventWeight());
1617  fhCaloTrackMCorrEClusters->Fill(trM, sumClusterEnergy, GetEventWeight());
1618  fhCaloTrackMCorrNCells ->Fill(trM, ncells , GetEventWeight());
1619  fhCaloTrackMCorrECells ->Fill(trM, sumCellEnergy , GetEventWeight());
1620 
1621  fhCaloCenNClusters ->Fill(cen, ncl , GetEventWeight());
1622  fhCaloCenEClusters ->Fill(cen, sumClusterEnergy, GetEventWeight());
1623  fhCaloCenNCells ->Fill(cen, ncells , GetEventWeight());
1624  fhCaloCenECells ->Fill(cen, sumCellEnergy , GetEventWeight());
1625 
1626  fhCaloEvPNClusters ->Fill(ep , ncl , GetEventWeight());
1627  fhCaloEvPEClusters ->Fill(ep , sumClusterEnergy, GetEventWeight());
1628  fhCaloEvPNCells ->Fill(ep , ncells , GetEventWeight());
1629  fhCaloEvPECells ->Fill(ep , sumCellEnergy , GetEventWeight());
1630 
1631  AliDebug(1,"Correlate():");
1632  AliDebug(1,Form("\t EMCAL: N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
1633  ncellsEMCAL,nclEMCAL, sumCellEnergyEMCAL,sumClusterEnergyEMCAL));
1634  AliDebug(1,Form("\t DCAL : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
1635  ncellsDCAL,nclDCAL, sumCellEnergyDCAL,sumClusterEnergyDCAL));
1636  AliDebug(1,Form("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
1637  ncellsPHOS,nclPHOS,sumCellEnergyPHOS,sumClusterEnergyPHOS));
1638  AliDebug(1,Form("\t V0 : Signal %d, Multiplicity %d, Track Multiplicity %d", v0S,v0M,trM));
1639  AliDebug(1,Form("\t centrality : %f, Event plane angle %f", cen,ep));
1640 }
1641 
1642 //_________________________________________________
1644 //_________________________________________________
1646 {
1647  TString parList ; //this will be list of parameters used for this analysis.
1648  const Int_t buffersize = 255;
1649  char onePar[buffersize] ;
1650 
1651  snprintf(onePar,buffersize,"--- AliAnaCalorimeterQA ---:") ;
1652  parList+=onePar ;
1653  snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
1654  parList+=onePar ;
1655  snprintf(onePar,buffersize,"Time Cut : %2.2f < T < %2.2f ns;",fTimeCutMin, fTimeCutMax) ;
1656  parList+=onePar ;
1657  snprintf(onePar,buffersize,"Cell Amplitude: PHOS > %2.2f GeV, EMCAL > %2.2f GeV;",fPHOSCellAmpMin, fEMCALCellAmpMin) ;
1658  parList+=onePar ;
1659  snprintf(onePar,buffersize,"Cluster M02: EMCAL > %2.2f ;",fEMCALClusterM02Min) ;
1660  parList+=onePar ;
1661  snprintf(onePar,buffersize,"N cells per cluster: PHOS >= %d, EMCAL >= %d;",fPHOSClusterNCellMin, fEMCALClusterNCellMin) ;
1662  parList+=onePar ;
1663  snprintf(onePar,buffersize,"Inv. Mass %2.1f < E_cl < %2.1f GeV;",fInvMassMinECut, fInvMassMaxECut) ;
1664  parList+=onePar ;
1665  snprintf(onePar,buffersize,"Inv. Mass %2.1f < M02 < %2.1f GeV;",fInvMassMinM02Cut, fInvMassMaxM02Cut) ;
1666  parList+=onePar ;
1667  snprintf(onePar,buffersize,"Cluster pair opening angle < %2.1f rad;",fInvMassMaxOpenAngle) ;
1668  parList+=onePar ;
1669  snprintf(onePar,buffersize,"Cluster pair time difference < %2.1f rad;",fInvMassMaxTimeDifference) ;
1670  parList+=onePar ;
1671 
1672  //Get parameters set in base class.
1673  //parList += GetBaseParametersList() ;
1674 
1675  //Get parameters set in FiducialCut class (not available yet)
1676  //parlist += GetFidCut()->GetFidCutParametersList()
1677 
1678  return new TObjString(parList) ;
1679 }
1680 
1681 //___________________________________________________
1684 //___________________________________________________
1686 {
1687  TList * outputContainer = new TList() ;
1688  outputContainer->SetName("QAHistos") ;
1689 
1690  // Init the number of modules, set in the class AliCalorimeterUtils
1691  //
1692  InitCaloParameters(); // See AliCaloTrackCorrBaseClass
1693 
1694  Int_t totalSM = fLastModule-fFirstModule+1;
1695 
1696  //printf("N SM %d, first SM %d, last SM %d, total %d\n",fNModules,fFirstModule,fLastModule, totalSM);
1697 
1698  // Histogram binning and ranges
1699  //
1720 
1724 
1725  // TM residuals
1732 
1733  // Cell column-row histograms, see base class for data members setting
1734  //fNMaxColsFull+2,-1.5,fNMaxColsFull+0.5, fNMaxRowsFull+2,-1.5,fNMaxRowsFull+0.5
1735  Int_t ncolcell = fNMaxColsFull+2;
1736  Float_t colcellmin = -1.5;
1737  Float_t colcellmax = fNMaxColsFull+0.5;
1738 
1740  Float_t rowcellmin = fNMaxRowsFullMin-1.5;
1741  Float_t rowcellmax = fNMaxRowsFullMax+0.5;
1742 
1743  //
1744  // Init histograms
1745  //
1746 
1747  // Calorimeter cluster histograms
1748  //
1750  {
1751  fhE = new TH1F ("hE","#it{E} reconstructed clusters ", nptbins*5,ptmin,ptmax*5);
1752  fhE->SetXTitle("#it{E} (GeV)");
1753  outputContainer->Add(fhE);
1754 
1755  fhPt = new TH1F ("hPt","#it{p}_{T} reconstructed clusters", nptbins,ptmin,ptmax);
1756  fhPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1757  outputContainer->Add(fhPt);
1758 
1759  fhNClusters = new TH1F ("hNClusters","# clusters", nclbins,nclmin,nclmax);
1760  fhNClusters->SetXTitle("#it{n}_{clusters}");
1761  outputContainer->Add(fhNClusters);
1762 
1763  fhNCellsPerCluster = new TH2F ("hNCellsPerCluster","# cells per cluster vs energy",nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
1764  fhNCellsPerCluster->SetXTitle("#it{E} (GeV)");
1765  fhNCellsPerCluster->SetYTitle("#it{n}_{cells}");
1766  outputContainer->Add(fhNCellsPerCluster);
1767 
1768  fhNCellsPerClusterWeirdMod = new TH2F ("hNCellsPerClusterWeirdMod","# cells per cluster, E > 100 GeV, per SM",
1769  nceclbins*2,nceclmin,nceclmax*2,totalSM,fFirstModule-0.5,fLastModule+0.5);
1770  fhNCellsPerClusterWeirdMod->SetYTitle("SM number");
1771  fhNCellsPerClusterWeirdMod->SetXTitle("#it{n}_{cells}");
1772  outputContainer->Add(fhNCellsPerClusterWeirdMod);
1773 
1774  // Acceptance plots
1775  //
1776  fhPhi = new TH1F ("hPhi","#varphi reconstructed clusters ",nphibins,phimin,phimax);
1777  fhPhi->SetXTitle("#varphi (rad)");
1778  outputContainer->Add(fhPhi);
1779 
1780  fhEta = new TH1F ("hEta","#eta reconstructed clusters ",netabins,etamin,etamax);
1781  fhEta->SetXTitle("#eta ");
1782  outputContainer->Add(fhEta);
1783 
1785  {
1786  for(Int_t ie=0; ie<fNEBinCuts; ie++)
1787  {
1788  fhEBinClusterEtaPhi[ie] = new TH2F
1789  (Form("hEBin%d_Cluster_EtaPhi",ie),
1790  Form("#eta vs #varphi, cluster, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
1791  netabins,etamin,etamax,nphibins,phimin,phimax);
1792  fhEBinClusterEtaPhi[ie]->SetYTitle("#varphi (rad)");
1793  fhEBinClusterEtaPhi[ie]->SetXTitle("#eta");
1794  outputContainer->Add(fhEBinClusterEtaPhi[ie]) ;
1795 
1796  fhEBinClusterColRow[ie] = new TH2F
1797  (Form("hEBin%d_Cluster_ColRow",ie),
1798  Form("column vs row, cluster max E cell, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
1799  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
1800  fhEBinClusterColRow[ie]->SetYTitle("row");
1801  fhEBinClusterColRow[ie]->SetXTitle("column");
1802  outputContainer->Add(fhEBinClusterColRow[ie]) ;
1803 
1805  {
1806  fhEBinCellColRow[ie] = new TH2F
1807  (Form("hEBin%d_Cell_ColRow",ie),
1808  Form("column vs row, cell, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
1809  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
1810  fhEBinCellColRow[ie]->SetYTitle("row");
1811  fhEBinCellColRow[ie]->SetXTitle("column");
1812  outputContainer->Add(fhEBinCellColRow[ie]) ;
1813  }
1814  }
1815  }
1816  else
1817  {
1818  if(fFillAllTH3)
1819  {
1820  fhEtaPhiE = new TH3F ("hEtaPhiE","#eta vs #varphi vs energy, reconstructed clusters",
1821  netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax);
1822  fhEtaPhiE->SetXTitle("#eta ");
1823  fhEtaPhiE->SetYTitle("#varphi (rad)");
1824  fhEtaPhiE->SetZTitle("#it{E} (GeV) ");
1825  outputContainer->Add(fhEtaPhiE);
1826  }
1827  else
1828  {
1829  fhEtaPhi = new TH2F ("hEtaPhi","#eta vs #varphi for #it{E} > 0.5 GeV, reconstructed clusters",
1830  netabins,etamin,etamax,nphibins,phimin,phimax);
1831  fhEtaPhi->SetXTitle("#eta ");
1832  fhEtaPhi->SetYTitle("#varphi (rad)");
1833  outputContainer->Add(fhEtaPhi);
1834  }
1835  }
1836 
1837  fhClusterTimeEnergy = new TH2F ("hClusterTimeEnergy","energy vs TOF, reconstructed clusters",
1838  nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1839  fhClusterTimeEnergy->SetXTitle("#it{E} (GeV) ");
1840  fhClusterTimeEnergy->SetYTitle("TOF (ns)");
1841  outputContainer->Add(fhClusterTimeEnergy);
1842 
1844  {
1845  fhClusterPairDiffTimeE = new TH2F("hClusterPairDiffTimeE","cluster pair time difference vs E, only good clusters",
1846  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1847  fhClusterPairDiffTimeE->SetXTitle("#it{E}_{cluster} (GeV)");
1848  fhClusterPairDiffTimeE->SetYTitle("#Delta #it{t} (ns)");
1849  outputContainer->Add(fhClusterPairDiffTimeE);
1850 
1851  fhClusterPairDiffTimeESameMod = new TH2F("hClusterPairDiffTimeESameMod","cluster pair time difference vs E, only good clusters",
1852  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1853  fhClusterPairDiffTimeESameMod->SetXTitle("#it{E}_{cluster} (GeV)");
1854  fhClusterPairDiffTimeESameMod->SetYTitle("#Delta #it{t} (ns)");
1855  outputContainer->Add(fhClusterPairDiffTimeESameMod);
1856  }
1857 
1858  // Shower shape
1859  //
1860  //fhDispersion = new TH2F ("hDispersion","shower shape, Dispersion^{2} vs E for bad cluster ",
1861  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1862  //fhDispersion->SetXTitle("#it{E}_{cluster} (GeV)");
1863  //fhDispersion->SetYTitle("Dispersion");
1864  //outputContainer->Add(fhDispersion);
1865 
1866  fhLambda0 = new TH2F ("hLambda0","shower shape, #lambda^{2}_{0} vs E",
1867  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1868  fhLambda0->SetXTitle("#it{E}_{cluster} (GeV)");
1869  fhLambda0->SetYTitle("#lambda^{2}_{0}");
1870  outputContainer->Add(fhLambda0);
1871 
1872  fhLambda1 = new TH2F ("hLambda1","shower shape, #lambda^{2}_{1} vs E",
1873  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1874  fhLambda1->SetXTitle("#it{E}_{cluster} (GeV)");
1875  fhLambda1->SetYTitle("#lambda^{2}_{1}");
1876  outputContainer->Add(fhLambda1);
1877 
1878  fhNLocMax = new TH2F ("hNLocMax","#it{n}_{LM} vs E",
1879  nptbins,ptmin,ptmax,10,0,10);
1880  fhNLocMax->SetXTitle("#it{E}_{cluster} (GeV)");
1881  fhNLocMax->SetYTitle("#it{n}_{LM}");
1882  outputContainer->Add(fhNLocMax);
1883 
1884  fhNLocMaxStd = new TH2F ("hNLocMaxStd","#it{n}_{LM} vs E",
1885  nptbins,ptmin,ptmax,10,0,10);
1886  fhNLocMaxStd->SetXTitle("#it{E}_{cluster} (GeV)");
1887  fhNLocMaxStd->SetYTitle("#it{n}_{LM}");
1888  outputContainer->Add(fhNLocMaxStd);
1889 
1891  {
1892  fhClusterMaxCellCloseCellRatio = new TH2F ("hClusterMaxCellCloseCellRatio","energy vs ratio of max cell / neighbour cell, reconstructed clusters",
1893  nptbins,ptmin,ptmax, 100,0,1.);
1894  fhClusterMaxCellCloseCellRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1895  fhClusterMaxCellCloseCellRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{cell max}");
1896  outputContainer->Add(fhClusterMaxCellCloseCellRatio);
1897 
1898  fhClusterMaxCellCloseCellDiff = new TH2F ("hClusterMaxCellCloseCellDiff","energy vs ratio of max cell / neighbour cell, reconstructed clusters",
1899  nptbins,ptmin,ptmax, 500,0,100.);
1900  fhClusterMaxCellCloseCellDiff->SetXTitle("#it{E}_{cluster} (GeV) ");
1901  fhClusterMaxCellCloseCellDiff->SetYTitle("#it{E}_{cell max}-#it{E}_{cell i} (GeV)");
1902  outputContainer->Add(fhClusterMaxCellCloseCellDiff);
1903 
1904  fhClusterMaxCellDiff = new TH2F ("hClusterMaxCellDiff","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters",
1905  nptbins,ptmin,ptmax, 500,0,1.);
1906  fhClusterMaxCellDiff->SetXTitle("#it{E}_{cluster} (GeV) ");
1907  fhClusterMaxCellDiff->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1908  outputContainer->Add(fhClusterMaxCellDiff);
1909 
1910  fhClusterMaxCellECross = new TH2F ("hClusterMaxCellECross","1 - Energy in cross around max energy cell / max energy cell vs cluster energy, good clusters",
1911  nptbins,ptmin,ptmax, 400,-1,1.);
1912  fhClusterMaxCellECross->SetXTitle("#it{E}_{cluster} (GeV) ");
1913  fhClusterMaxCellECross->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell max}");
1914  outputContainer->Add(fhClusterMaxCellECross);
1915  }
1916 
1917  if(fStudyBadClusters)
1918  {
1919  fhNCellsPerClusterNoCut = new TH2F ("hNCellsPerClusterNoCut","# cells per cluster vs energy, no bad clusters cut",
1920  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
1921  fhNCellsPerClusterNoCut->SetXTitle("#it{E} (GeV)");
1922  fhNCellsPerClusterNoCut->SetYTitle("#it{n}_{cells}");
1923  outputContainer->Add(fhNCellsPerClusterNoCut);
1924 
1925  fhNCellsPerClusterWeirdModNoCut = new TH2F ("hNCellsPerClusterWeirdNoCutMod","# cells per cluster vs energy, E > 100, no bad clusters cut, per SM",
1926  nceclbins,nceclmin,nceclmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
1927  fhNCellsPerClusterWeirdModNoCut->SetYTitle("SM number");
1928  fhNCellsPerClusterWeirdModNoCut->SetXTitle("#it{n}_{cells}");
1929  outputContainer->Add(fhNCellsPerClusterWeirdModNoCut);
1930 
1931  fhBadClusterEnergy = new TH1F ("hBadClusterEnergy","Bad cluster energy", nptbins,ptmin,ptmax);
1932  fhBadClusterEnergy->SetXTitle("#it{E}_{cluster} (GeV) ");
1933  outputContainer->Add(fhBadClusterEnergy);
1934 
1935  fhBadClusterEtaPhi = new TH2F ("hBadClusterEtaPhi","Bad cluster, #eta vs #varphi, #it{E} > 0.5 GeV",
1936  netabins,etamin,etamax,nphibins,phimin,phimax);
1937  fhBadClusterEtaPhi->SetXTitle("#eta ");
1938  fhBadClusterEtaPhi->SetXTitle("#varphi (rad) ");
1939  outputContainer->Add(fhBadClusterEtaPhi);
1940 
1941  fhBadClusterLambda0 = new TH2F ("hBadClusterLambda0","Bad cluster,shower shape, #lambda^{2}_{0} vs E",
1942  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1943  fhBadClusterLambda0->SetXTitle("#it{E}_{cluster}");
1944  fhBadClusterLambda0->SetYTitle("#lambda^{2}_{0}");
1945  outputContainer->Add(fhBadClusterLambda0);
1946 
1947  fhBadClusterLambda1 = new TH2F ("hBadClusterLambda1","Bad cluster,shower shape, #lambda^{2}_{1} vs E for bad cluster ",
1948  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1949  fhBadClusterLambda1->SetXTitle("#it{E}_{cluster}");
1950  fhBadClusterLambda1->SetYTitle("#lambda^{2}_{1}");
1951  outputContainer->Add(fhBadClusterLambda1);
1952 
1953  fhBadClusterTimeEnergy = new TH2F ("hBadClusterTimeEnergy","energy vs TOF of reconstructed bad clusters",
1954  nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1955  fhBadClusterTimeEnergy->SetXTitle("#it{E}_{cluster} (GeV) ");
1956  fhBadClusterTimeEnergy->SetYTitle("#it{t} (ns)");
1957  outputContainer->Add(fhBadClusterTimeEnergy);
1958 
1960  {
1961  fhBadClusterPairDiffTimeE = new TH2F("hBadClusterPairDiffTimeE","cluster pair time difference (bad - good) vs E from bad cluster",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1962  fhBadClusterPairDiffTimeE->SetXTitle("#it{E}_{bad cluster} (GeV)");
1963  fhBadClusterPairDiffTimeE->SetYTitle("#Delta #it{t} (ns)");
1964  outputContainer->Add(fhBadClusterPairDiffTimeE);
1965  }
1966 
1968  {
1969  fhClusterMaxCellDiffNoCut = new TH2F ("hClusterMaxCellDiffNoCut","energy vs difference of cluster energy - max cell energy / cluster energy",
1970  nptbins,ptmin,ptmax, 500,0,1.);
1971  fhClusterMaxCellDiffNoCut->SetXTitle("#it{E}_{cluster} (GeV) ");
1972  fhClusterMaxCellDiffNoCut->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1973  outputContainer->Add(fhClusterMaxCellDiffNoCut);
1974 
1975  fhBadClusterMaxCellCloseCellRatio = new TH2F ("hBadClusterMaxCellCloseCellRatio","energy vs ratio of max cell / neighbour cell constributing cell, reconstructed bad clusters",
1976  nptbins,ptmin,ptmax, 100,0,1.);
1977  fhBadClusterMaxCellCloseCellRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1978  fhBadClusterMaxCellCloseCellRatio->SetYTitle("ratio");
1979  outputContainer->Add(fhBadClusterMaxCellCloseCellRatio);
1980 
1981  fhBadClusterMaxCellCloseCellDiff = new TH2F ("hBadClusterMaxCellCloseCellDiff","energy vs ratio of max cell - neighbour cell constributing cell, reconstructed bad clusters",
1982  nptbins,ptmin,ptmax, 500,0,100);
1983  fhBadClusterMaxCellCloseCellDiff->SetXTitle("#it{E}_{cluster} (GeV) ");
1984  fhBadClusterMaxCellCloseCellDiff->SetYTitle("#it{E}_{cell max} - #it{E}_{cell i} (GeV)");
1985  outputContainer->Add(fhBadClusterMaxCellCloseCellDiff);
1986 
1987  fhBadClusterMaxCellDiff = new TH2F ("hBadClusterMaxCellDiff","energy vs difference of cluster energy - max cell energy / cluster energy for bad clusters",
1988  nptbins,ptmin,ptmax, 500,0,1.);
1989  fhBadClusterMaxCellDiff->SetXTitle("#it{E}_{cluster} (GeV) ");
1990  fhBadClusterMaxCellDiff->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max}) / #it{E}_{cluster}");
1991  outputContainer->Add(fhBadClusterMaxCellDiff);
1992 
1993  fhBadClusterMaxCellECross = new TH2F ("hBadClusterMaxCellECross","1 - #it{E}_{+} around max energy cell / max energy cell vs cluster energy, bad clusters",
1994  nptbins,ptmin,ptmax, 400,-1,1.);
1995  fhBadClusterMaxCellECross->SetXTitle("#it{E}_{cluster} (GeV) ");
1996  fhBadClusterMaxCellECross->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell max}");
1997  outputContainer->Add(fhBadClusterMaxCellECross);
1998 
2000  {
2001  fhBadCellTimeSpreadRespectToCellMax = new TH2F ("hBadCellTimeSpreadRespectToCellMax","#it{t}_{cell max}-#it{t}_{cell i} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2002  fhBadCellTimeSpreadRespectToCellMax->SetXTitle("#it{E} (GeV)");
2003  fhBadCellTimeSpreadRespectToCellMax->SetYTitle("#Delta #it{t}_{cell max - i} (ns)");
2004  outputContainer->Add(fhBadCellTimeSpreadRespectToCellMax);
2005 
2006  // fhBadClusterMaxCellDiffAverageTime = new TH2F ("hBadClusterMaxCellDiffAverageTime","#it{t}_{cell max}-#it{t}_{average} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2007  // fhBadClusterMaxCellDiffAverageTime->SetXTitle("#it{E} (GeV)");
2008  // fhBadClusterMaxCellDiffAverageTime->SetYTitle("#Delta #it{t}_{cell max - average} (ns)");
2009  // outputContainer->Add(fhBadClusterMaxCellDiffAverageTime);
2010  //
2011  // fhBadClusterMaxCellDiffWeightedTime = new TH2F ("hBadClusterMaxCellDiffWeightedTime","#it{t}_{cell max}-#it{t}_{weighted} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2012  // fhBadClusterMaxCellDiffWeightedTime->SetXTitle("#it{E} (GeV)");
2013  // fhBadClusterMaxCellDiffWeightedTime->SetYTitle("#Delta #it{t}_{cell max - weighted} (ns)");
2014  // outputContainer->Add(fhBadClusterMaxCellDiffWeightedTime);
2015  }
2016  }
2017  }
2018 
2019  // Track Matching
2020  if(fFillAllTMHisto)
2021  {
2022  fhTrackMatchedDEtaNeg = new TH2F("hTrackMatchedDEtaNeg","d#eta of cluster-negative track vs cluster energy",
2023  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
2024  fhTrackMatchedDEtaNeg->SetYTitle("d#eta");
2025  fhTrackMatchedDEtaNeg->SetXTitle("#it{E}_{cluster} (GeV)");
2026 
2027  fhTrackMatchedDPhiNeg = new TH2F("hTrackMatchedDPhiNeg","d#varphi of cluster-negative track vs cluster energy",
2028  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
2029  fhTrackMatchedDPhiNeg->SetYTitle("d#varphi (rad)");
2030  fhTrackMatchedDPhiNeg->SetXTitle("#it{E}_{cluster} (GeV)");
2031 
2032  fhTrackMatchedDEtaDPhiNeg = new TH2F("hTrackMatchedDEtaDPhiNeg","d#eta vs d#varphi of cluster- negative track vs cluster energy",
2033  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
2034  fhTrackMatchedDEtaDPhiNeg->SetYTitle("d#varphi (rad)");
2035  fhTrackMatchedDEtaDPhiNeg->SetXTitle("d#eta");
2036 
2037  fhTrackMatchedDEtaPos = new TH2F("hTrackMatchedDEtaPos","d#eta of cluster-positive track vs cluster energy",
2038  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
2039  fhTrackMatchedDEtaPos->SetYTitle("d#eta");
2040  fhTrackMatchedDEtaPos->SetXTitle("#it{E}_{cluster} (GeV)");
2041 
2042  fhTrackMatchedDPhiPos = new TH2F("hTrackMatchedDPhiPos","d#varphi of cluster-positive track vs cluster energy",
2043  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
2044  fhTrackMatchedDPhiPos->SetYTitle("d#varphi (rad)");
2045  fhTrackMatchedDPhiPos->SetXTitle("#it{E}_{cluster} (GeV)");
2046 
2047  fhTrackMatchedDEtaDPhiPos = new TH2F("hTrackMatchedDEtaDPhiPos","d#eta vs d#varphi of cluster-positive track vs cluster energy",
2048  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
2049  fhTrackMatchedDEtaDPhiPos->SetYTitle("d#varphi (rad)");
2050  fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta");
2051 
2052 
2053  fhTrackMatchedDEtaNegMod = new TH2F("hTrackMatchedDEtaNegPerModule","d#eta of cluster-negative track vs module, E > 0.5 GeV",
2054  nresetabins,resetamin,resetamax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2055  fhTrackMatchedDEtaNegMod->SetXTitle("d#eta");
2056  fhTrackMatchedDEtaNegMod->SetYTitle("Module");
2057 
2058  fhTrackMatchedDPhiNegMod = new TH2F("hTrackMatchedDPhiNegPerModule","d#varphi of cluster-negative track vs module, E > 0.5 GeV",
2059  nresetabins,resetamin,resetamax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2060  fhTrackMatchedDPhiNegMod->SetXTitle("d#varphi (rad)");
2061  fhTrackMatchedDPhiNegMod->SetYTitle("Module");
2062 
2063  fhTrackMatchedDEtaPosMod = new TH2F("hTrackMatchedDEtaPosPerModule","d#eta of cluster-positive track vs module, E > 0.5 GeV",
2064  nresetabins,resetamin,resetamax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2065  fhTrackMatchedDEtaPosMod->SetXTitle("d#eta");
2066  fhTrackMatchedDEtaPosMod->SetYTitle("Module");
2067 
2068  fhTrackMatchedDPhiPosMod = new TH2F("hTrackMatchedDPhiPosPerModule","d#varphi of cluster-positive track vs module, E > 0.5 GeV",
2069  nresetabins,resetamin,resetamax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2070  fhTrackMatchedDPhiPosMod->SetXTitle("d#varphi (rad)");
2071  fhTrackMatchedDPhiPosMod->SetYTitle("Module");
2072 
2073  outputContainer->Add(fhTrackMatchedDEtaNeg) ;
2074  outputContainer->Add(fhTrackMatchedDPhiNeg) ;
2075  outputContainer->Add(fhTrackMatchedDEtaPos) ;
2076  outputContainer->Add(fhTrackMatchedDPhiPos) ;
2077  outputContainer->Add(fhTrackMatchedDEtaDPhiNeg) ;
2078  outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ;
2079 
2080  outputContainer->Add(fhTrackMatchedDEtaNegMod) ;
2081  outputContainer->Add(fhTrackMatchedDPhiNegMod) ;
2082  outputContainer->Add(fhTrackMatchedDEtaPosMod) ;
2083  outputContainer->Add(fhTrackMatchedDPhiPosMod) ;
2084 
2085  fhECharged = new TH1F ("hECharged","#it{E} reconstructed clusters, matched with track", nptbins,ptmin,ptmax);
2086  fhECharged->SetXTitle("#it{E} (GeV)");
2087  outputContainer->Add(fhECharged);
2088 
2089  fhPtCharged = new TH1F ("hPtCharged","#it{p}_{T} reconstructed clusters, matched with track", nptbins,ptmin,ptmax);
2090  fhPtCharged->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2091  outputContainer->Add(fhPtCharged);
2092 
2093  fhPhiCharged = new TH1F ("hPhiCharged","#varphi reconstructed clusters, matched with track",nphibins,phimin,phimax);
2094  fhPhiCharged->SetXTitle("#varphi (rad)");
2095  outputContainer->Add(fhPhiCharged);
2096 
2097  fhEtaCharged = new TH1F ("hEtaCharged","#eta reconstructed clusters, matched with track",netabins,etamin,etamax);
2098  fhEtaCharged->SetXTitle("#eta ");
2099  outputContainer->Add(fhEtaCharged);
2100 
2101  if(fFillAllTH3)
2102  {
2103  fhEtaPhiECharged = new TH3F ("hEtaPhiECharged","#eta vs #varphi, reconstructed clusters, matched with track",
2104  netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax);
2105  fhEtaPhiECharged->SetXTitle("#eta ");
2106  fhEtaPhiECharged->SetYTitle("#varphi ");
2107  fhEtaPhiECharged->SetZTitle("#it{E} (GeV) ");
2108  outputContainer->Add(fhEtaPhiECharged);
2109  }
2110  else
2111  {
2112  fhEtaPhiCharged = new TH2F ("hEtaPhiCharged","#eta vs #varphi for #it{E} > 0.5 GeV, reconstructed clusters, with matched track",
2113  netabins,etamin,etamax,nphibins,phimin,phimax);
2114  fhEtaPhiCharged->SetXTitle("#eta ");
2115  fhEtaPhiCharged->SetYTitle("#varphi (rad)");
2116  outputContainer->Add(fhEtaPhiCharged);
2117  }
2118 
2119  fh1EOverP = new TH2F("h1EOverP","TRACK matches #it{E}/#it{p}",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
2120  fh1EOverP->SetYTitle("#it{E}/#it{p}");
2121  fh1EOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2122  outputContainer->Add(fh1EOverP);
2123 
2124  fh2dR = new TH2F("h2dR","TRACK matches #Delta #it{R}",nptbins,ptmin,ptmax,ndRbins,dRmin,dRmax);
2125  fh2dR->SetYTitle("#Delta #it{R} (rad)");
2126  fh2dR->SetXTitle("#it{E} cluster (GeV)");
2127  outputContainer->Add(fh2dR) ;
2128 
2129  fh2MatchdEdx = new TH2F("h2MatchdEdx","#it{dE/dx} vs. #it{p} for all matches",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
2130  fh2MatchdEdx->SetXTitle("p (GeV/#it{c})");
2131  fh2MatchdEdx->SetYTitle("<#it{dE/dx}>");
2132  outputContainer->Add(fh2MatchdEdx);
2133 
2134  fh2EledEdx = new TH2F("h2EledEdx","#it{dE/dx} vs. #it{p} for electrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
2135  fh2EledEdx->SetXTitle("p (GeV/#it{c})");
2136  fh2EledEdx->SetYTitle("<#it{dE/dx}>");
2137  outputContainer->Add(fh2EledEdx) ;
2138 
2139  fh1EOverPR02 = new TH2F("h1EOverPR02","TRACK matches #it{E}/#it{p}, all",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
2140  fh1EOverPR02->SetYTitle("#it{E}/#it{p}");
2141  fh1EOverPR02->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2142  outputContainer->Add(fh1EOverPR02);
2143 
2144  fh1EleEOverP = new TH2F("h1EleEOverP","Electron candidates #it{E}/#it{p} (60<#it{dE/dx}<100)",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
2145  fh1EleEOverP->SetYTitle("#it{E}/#it{p}");
2146  fh1EleEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2147  outputContainer->Add(fh1EleEOverP);
2148 
2149 
2150  // Projections per SM
2151 
2152  fh1EOverPMod = new TH2F
2153  ("h1EOverP_PerModule","TRACK matches #it{E}/#it{p}, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2154  nPoverEbins,eOverPmin,eOverPmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2155  fh1EOverPMod->SetXTitle("#it{E}/#it{p}");
2156  fh1EOverPMod->SetYTitle("Module");
2157  outputContainer->Add(fh1EOverPMod);
2158 
2159  fh2dRMod = new TH2F
2160  ("h2dR_PerModule","TRACK matches #Delta #it{R}, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2161  ndRbins,dRmin,dRmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2162  fh2dRMod->SetXTitle("#Delta #it{R} (rad)");
2163  fh2dRMod->SetYTitle("Module");
2164  outputContainer->Add(fh2dRMod) ;
2165 
2166  fh2MatchdEdxMod = new TH2F
2167  ("h2MatchdEdx_PerModule","#it{dE/dx} vs. #it{p} for all matches, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2168  ndedxbins,dedxmin,dedxmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2169  fh2MatchdEdxMod->SetYTitle("Module");
2170  fh2MatchdEdxMod->SetXTitle("<#it{dE/dx}>");
2171  outputContainer->Add(fh2MatchdEdxMod);
2172 
2173  fh2EledEdxMod = new TH2F
2174  ("h2EledEdx_PerModule","#it{dE/dx} vs. #it{p} for electrons, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2175  ndedxbins,dedxmin,dedxmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2176  fh2EledEdxMod->SetYTitle("Module");
2177  fh2EledEdxMod->SetXTitle("<#it{dE/dx}>");
2178  outputContainer->Add(fh2EledEdxMod) ;
2179 
2180  fh1EOverPR02Mod = new TH2F
2181  ("h1EOverPR02_PerModule","TRACK matches #it{E}/#it{p}, all, #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2182  nPoverEbins,eOverPmin,eOverPmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2183  fh1EOverPR02Mod->SetXTitle("#it{E}/#it{p}");
2184  fh1EOverPR02Mod->SetYTitle("Module");
2185  outputContainer->Add(fh1EOverPR02Mod);
2186 
2187  fh1EleEOverPMod = new TH2F
2188  ("h1EleEOverP_PerModule","Electron candidates #it{E}/#it{p} (60<#it{dE/dx}<100), #it{E}_{cl}&#it{p}_{tr}>0.5 Gev/#it{c}",
2189  nPoverEbins,eOverPmin,eOverPmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2190  fh1EleEOverPMod->SetXTitle("#it{E}/#it{p}");
2191  fh1EleEOverPMod->SetYTitle("Module");
2192  outputContainer->Add(fh1EleEOverPMod);
2193  }
2194 
2195  if(fFillAllPi0Histo)
2196  {
2197  if ( fFirstModule < 12 )
2198  {
2199  fhIM = new TH2F ("hIM","Cluster pairs (EMCAL or PHOS) Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1",
2200  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2201  fhIM->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2202  fhIM->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2203  outputContainer->Add(fhIM);
2204 
2205  fhIMDiff = new TH2F ("hIMDiff","Cluster pairs (EMCAL or PHOS) Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, different SM",
2206  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2207  fhIMDiff->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2208  fhIMDiff->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2209  outputContainer->Add(fhIMDiff);
2210 
2211  fhIMSame = new TH2F ("hIMSame","Cluster pairs (EMCAL or PHOS) Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, same SM",
2212  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2213  fhIMSame->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2214  fhIMSame->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2215  outputContainer->Add(fhIMSame);
2216 
2218  {
2219  fhIMEMCALPHOS = new TH2F ("hIMEMCALPHOS","Cluster pairs in DCAL-PHOS Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1",
2220  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2221  fhIMEMCALPHOS->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2222  fhIMEMCALPHOS->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2223  outputContainer->Add(fhIMEMCALPHOS);
2224 
2225  fhIMEMCALPHOSSame = new TH2F ("hIMEMCALPHOSSame","Cluster pairs in DCAL-PHOS Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, same #varphi sector",
2226  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2227  fhIMEMCALPHOSSame->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2228  fhIMEMCALPHOSSame->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2229  outputContainer->Add(fhIMEMCALPHOSSame);
2230  }
2231  }
2232 
2233  if ( fNModules > 12 && (GetCalorimeter() == kEMCAL || GetCalorimeter() == kDCAL) && fLastModule > 11 )
2234  {
2235  fhIMDCAL = new TH2F ("hIMDCAL","Cluster pairs in DCAL Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1",
2236  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2237  fhIMDCAL->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2238  fhIMDCAL->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2239  outputContainer->Add(fhIMDCAL);
2240 
2241  fhIMDCALDiff = new TH2F ("hIMDCALDiff","Cluster pairs in DCAL Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, different SM",
2242  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2243  fhIMDCALDiff->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2244  fhIMDCALDiff->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2245  outputContainer->Add(fhIMDCALDiff);
2246 
2247  fhIMDCALSame = new TH2F ("hIMDCALSame","Cluster pairs in DCAL Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, same SM",
2248  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2249  fhIMDCALSame->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2250  fhIMDCALSame->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2251  outputContainer->Add(fhIMDCALSame);
2252 
2253  fhIMDCALPHOS = new TH2F ("hIMDCALPHOS","Cluster pairs in DCAL-PHOS Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1",
2254  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2255  fhIMDCALPHOS->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2256  fhIMDCALPHOS->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2257  outputContainer->Add(fhIMDCALPHOS);
2258 
2259  fhIMDCALPHOSSame = new TH2F ("hIMDCALPHOSSame","Cluster pairs in DCAL-PHOS Invariant mass vs reconstructed pair #it{p}_{T}, ncell > 1, same #varphi sector",
2260  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2261  fhIMDCALPHOSSame->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2262  fhIMDCALPHOSSame->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2263  outputContainer->Add(fhIMDCALPHOSSame);
2264  }
2265 
2267  {
2268  if ( fFirstModule < 12 )
2269  {
2270  fhClusterPairDiffTimeEPi0Mass = new TH2F("hClusterPairDiffTimeEPi0Mass","cluster pair time difference vs E, only good clusters",
2271  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2272  fhClusterPairDiffTimeEPi0Mass->SetXTitle("#it{E}_{cluster} (GeV)");
2273  fhClusterPairDiffTimeEPi0Mass->SetYTitle("#Delta #it{t} (ns)");
2274  outputContainer->Add(fhClusterPairDiffTimeEPi0Mass);
2275 
2276  fhClusterPairDiffTimeEPi0MassSame = new TH2F("hClusterPairDiffTimeEPi0MassSame","cluster pair time difference vs E, only good clusters",
2277  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2278  fhClusterPairDiffTimeEPi0MassSame->SetXTitle("#it{E}_{cluster} (GeV)");
2279  fhClusterPairDiffTimeEPi0MassSame->SetYTitle("#Delta #it{t} (ns)");
2280  outputContainer->Add(fhClusterPairDiffTimeEPi0MassSame);
2281  }
2282 
2283  if ( fNModules > 12 && (GetCalorimeter() == kEMCAL || GetCalorimeter() == kDCAL) && fLastModule > 11 )
2284  {
2285  fhClusterPairDiffTimeEPi0MassDCal = new TH2F("hClusterPairDiffTimeEPi0MassDCal","cluster pair time difference vs E, only good clusters",
2286  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2287  fhClusterPairDiffTimeEPi0MassDCal->SetXTitle("#it{E}_{cluster} (GeV)");
2288  fhClusterPairDiffTimeEPi0MassDCal->SetYTitle("#Delta #it{t} (ns)");
2289  outputContainer->Add(fhClusterPairDiffTimeEPi0MassDCal);
2290 
2291  fhClusterPairDiffTimeEPi0MassDCalSame = new TH2F("hClusterPairDiffTimeEPi0MassDCalSame","cluster pair time difference vs E, only good clusters",
2292  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2293  fhClusterPairDiffTimeEPi0MassDCalSame->SetXTitle("#it{E}_{cluster} (GeV)");
2294  fhClusterPairDiffTimeEPi0MassDCalSame->SetYTitle("#Delta #it{t} (ns)");
2295  outputContainer->Add(fhClusterPairDiffTimeEPi0MassDCalSame);
2296  }
2297  }
2298 
2299  fhAsym = new TH2F ("hAssym","Cluster pairs Asymmetry vs reconstructed pair energy",nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax);
2300  fhAsym->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2301  fhAsym->SetYTitle("#it{Asymmetry}");
2302  outputContainer->Add(fhAsym);
2303 
2305  {
2306  fhOpAngle = new TH2F ("hOpeningAngle","Cluster pairs opening angle vs reconstructed pair #it{p}_{T}, ncell > 1",
2307  nptbins,ptmin,ptmax, 180,0,TMath::Pi());
2308  fhOpAngle->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2309  fhOpAngle->SetYTitle("Opening angle (degrees)");
2310  outputContainer->Add(fhOpAngle);
2311 
2312  Int_t nBinOpAngle = TMath::Nint(fInvMassMaxOpenAngle*TMath::RadToDeg()); // bin of 1 degree size
2313  fhIMvsOpAngle = new TH2F ("hIMvsOpAngle","Cluster pairs Invariant mass vs reconstructed pair opening angle, ncell > 1",
2314  nBinOpAngle,0.,fInvMassMaxOpenAngle,nmassbins,massmin,massmax);
2315  fhIMvsOpAngle->SetXTitle("Opening angle (degrees)");
2316  fhIMvsOpAngle->SetYTitle("M_{cluster pairs} (GeV/#it{c}^{2})");
2317  outputContainer->Add(fhIMvsOpAngle);
2318  }
2319  }
2320 
2321  if(fFillAllPosHisto2)
2322  {
2323  fhXYZ = new TH3F ("hXYZ","Cluster: #it{x} vs #it{y} vs #it{z}",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax);
2324  fhXYZ->SetXTitle("#it{x} (cm)");
2325  fhXYZ->SetYTitle("#it{y} (cm)");
2326  fhXYZ->SetZTitle("#it{z} (cm) ");
2327  outputContainer->Add(fhXYZ);
2328 
2329  fhXE = new TH2F ("hXE","Cluster X position vs cluster energy",xbins,xmin,xmax,nptbins,ptmin,ptmax);
2330  fhXE->SetXTitle("#it{x} (cm)");
2331  fhXE->SetYTitle("#it{E} (GeV)");
2332  outputContainer->Add(fhXE);
2333 
2334  fhYE = new TH2F ("hYE","Cluster Y position vs cluster energy",ybins,ymin,ymax,nptbins,ptmin,ptmax);
2335  fhYE->SetXTitle("#it{y} (cm)");
2336  fhYE->SetYTitle("#it{E} (GeV)");
2337  outputContainer->Add(fhYE);
2338 
2339  fhZE = new TH2F ("hZE","Cluster Z position vs cluster energy",zbins,zmin,zmax,nptbins,ptmin,ptmax);
2340  fhZE->SetXTitle("#it{z} (cm)");
2341  fhZE->SetYTitle("#it{E} (GeV)");
2342  outputContainer->Add(fhZE);
2343 
2344  fhRE = new TH2F ("hRE","Cluster R position vs cluster energy",rbins,rmin,rmax,nptbins,ptmin,ptmax);
2345  fhRE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)");
2346  fhRE->SetYTitle("#it{E} (GeV)");
2347  outputContainer->Add(fhRE);
2348 
2349  fhXNCells = new TH2F ("hXNCells","Cluster X position vs N Cells per Cluster",xbins,xmin,xmax,nceclbins,nceclmin,nceclmax);
2350  fhXNCells->SetXTitle("#it{x} (cm)");
2351  fhXNCells->SetYTitle("N cells per cluster");
2352  outputContainer->Add(fhXNCells);
2353 
2354  fhYNCells = new TH2F ("hYNCells","Cluster Y position vs N Cells per Cluster",ybins,ymin,ymax,nceclbins,nceclmin,nceclmax);
2355  fhYNCells->SetXTitle("#it{y} (cm)");
2356  fhYNCells->SetYTitle("N cells per cluster");
2357  outputContainer->Add(fhYNCells);
2358 
2359  fhZNCells = new TH2F ("hZNCells","Cluster Z position vs N Cells per Cluster",zbins,zmin,zmax,nceclbins,nceclmin,nceclmax);
2360  fhZNCells->SetXTitle("#it{z} (cm)");
2361  fhZNCells->SetYTitle("N cells per cluster");
2362  outputContainer->Add(fhZNCells);
2363 
2364  fhRNCells = new TH2F ("hRNCells","Cluster R position vs N Cells per Cluster",rbins,rmin,rmax,nceclbins,nceclmin,nceclmax);
2365  fhRNCells->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)");
2366  fhRNCells->SetYTitle("N cells per cluster");
2367  outputContainer->Add(fhRNCells);
2368  }
2369 
2370  if(fFillAllPosHisto)
2371  {
2372  fhRCellE = new TH2F ("hRCellE","Cell R position vs cell energy",rbins,rmin,rmax,nptbins,ptmin,ptmax);
2373  fhRCellE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)");
2374  fhRCellE->SetYTitle("#it{E} (GeV)");
2375  outputContainer->Add(fhRCellE);
2376 
2377  fhXCellE = new TH2F ("hXCellE","Cell X position vs cell energy",xbins,xmin,xmax,nptbins,ptmin,ptmax);
2378  fhXCellE->SetXTitle("#it{x} (cm)");
2379  fhXCellE->SetYTitle("#it{E} (GeV)");
2380  outputContainer->Add(fhXCellE);
2381 
2382  fhYCellE = new TH2F ("hYCellE","Cell Y position vs cell energy",ybins,ymin,ymax,nptbins,ptmin,ptmax);
2383  fhYCellE->SetXTitle("#it{y} (cm)");
2384  fhYCellE->SetYTitle("#it{E} (GeV)");
2385  outputContainer->Add(fhYCellE);
2386 
2387  fhZCellE = new TH2F ("hZCellE","Cell Z position vs cell energy",zbins,zmin,zmax,nptbins,ptmin,ptmax);
2388  fhZCellE->SetXTitle("#it{z} (cm)");
2389  fhZCellE->SetYTitle("#it{E} (GeV)");
2390  outputContainer->Add(fhZCellE);
2391 
2392  fhXYZCell = new TH3F ("hXYZCell","Cell : #it{x} vs #it{y} vs #it{z}",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax);
2393  fhXYZCell->SetXTitle("#it{x} (cm)");
2394  fhXYZCell->SetYTitle("#it{y} (cm)");
2395  fhXYZCell->SetZTitle("#it{z} (cm)");
2396  outputContainer->Add(fhXYZCell);
2397 
2398  Float_t dx = TMath::Abs(xmin)+TMath::Abs(xmax);
2399  Float_t dy = TMath::Abs(ymin)+TMath::Abs(ymax);
2400  Float_t dz = TMath::Abs(zmin)+TMath::Abs(zmax);
2401  Float_t dr = TMath::Abs(rmin)+TMath::Abs(rmax);
2402 
2403  fhDeltaCellClusterRNCells = new TH2F ("hDeltaCellClusterRNCells","Cluster-Cell R position vs N Cells per Cluster",rbins*2,-dr,dr,nceclbins,nceclmin,nceclmax);
2404  fhDeltaCellClusterRNCells->SetXTitle("#it{r} = #sqrt{x^{2}+y^{2}}, #it{r}_{clus}-#it{r}_{cell} (cm)");
2405  fhDeltaCellClusterRNCells->SetYTitle("#it{n}_{cells per cluster}");
2406  outputContainer->Add(fhDeltaCellClusterRNCells);
2407 
2408  fhDeltaCellClusterXNCells = new TH2F ("hDeltaCellClusterXNCells","Cluster-Cell X position vs N Cells per Cluster",xbins*2,-dx,dx,nceclbins,nceclmin,nceclmax);
2409  fhDeltaCellClusterXNCells->SetXTitle("#it{x}_{clus}-#it{x}_{cell} (cm)");
2410  fhDeltaCellClusterXNCells->SetYTitle("#it{n}_{cells per cluster}");
2411  outputContainer->Add(fhDeltaCellClusterXNCells);
2412 
2413  fhDeltaCellClusterYNCells = new TH2F ("hDeltaCellClusterYNCells","Cluster-Cell Y position vs N Cells per Cluster",ybins*2,-dy,dy,nceclbins,nceclmin,nceclmax);
2414  fhDeltaCellClusterYNCells->SetXTitle("#it{y}_{clus}-#it{y}_{cell} (cm)");
2415  fhDeltaCellClusterYNCells->SetYTitle("N cells per cluster");
2416  outputContainer->Add(fhDeltaCellClusterYNCells);
2417 
2418  fhDeltaCellClusterZNCells = new TH2F ("hDeltaCellClusterZNCells","Cluster-Cell Z position vs N Cells per Cluster",zbins*2,-dz,dz,nceclbins,nceclmin,nceclmax);
2419  fhDeltaCellClusterZNCells->SetXTitle("#it{z}_{clus}-#it{z}_{cell} (cm)");
2420  fhDeltaCellClusterZNCells->SetYTitle("#it{n}_{cells per cluster}");
2421  outputContainer->Add(fhDeltaCellClusterZNCells);
2422 
2423  fhDeltaCellClusterRE = new TH2F ("hDeltaCellClusterRE","Cluster-Cell R position vs cluster energy",rbins*2,-dr,dr,nptbins,ptmin,ptmax);
2424  fhDeltaCellClusterRE->SetXTitle("#it{r} = #sqrt{x^{2}+y^{2}}, #it{r}_{clus}-#it{r}_{cell} (cm)");
2425  fhDeltaCellClusterRE->SetYTitle("#it{E} (GeV)");
2426  outputContainer->Add(fhDeltaCellClusterRE);
2427 
2428  fhDeltaCellClusterXE = new TH2F ("hDeltaCellClusterXE","Cluster-Cell X position vs cluster energy",xbins*2,-dx,dx,nptbins,ptmin,ptmax);
2429  fhDeltaCellClusterXE->SetXTitle("#it{x}_{clus}-#it{x}_{cell} (cm)");
2430  fhDeltaCellClusterXE->SetYTitle("#it{E} (GeV)");
2431  outputContainer->Add(fhDeltaCellClusterXE);
2432 
2433  fhDeltaCellClusterYE = new TH2F ("hDeltaCellClusterYE","Cluster-Cell Y position vs cluster energy",ybins*2,-dy,dy,nptbins,ptmin,ptmax);
2434  fhDeltaCellClusterYE->SetXTitle("#it{y}_{clus}-#it{y}_{cell} (cm)");
2435  fhDeltaCellClusterYE->SetYTitle("#it{E} (GeV)");
2436  outputContainer->Add(fhDeltaCellClusterYE);
2437 
2438  fhDeltaCellClusterZE = new TH2F ("hDeltaCellClusterZE","Cluster-Cell Z position vs cluster energy",zbins*2,-dz,dz,nptbins,ptmin,ptmax);
2439  fhDeltaCellClusterZE->SetXTitle("#it{z}_{clus}-#it{z}_{cell} (cm)");
2440  fhDeltaCellClusterZE->SetYTitle("#it{E} (GeV)");
2441  outputContainer->Add(fhDeltaCellClusterZE);
2442 
2443  if(fFillAllTH3)
2444  {
2445  fhEtaPhiAmpCell = new TH3F ("hEtaPhiAmpCell","Cell #eta vs cell #varphi vs cell energy",
2446  netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax);
2447  fhEtaPhiAmpCell->SetXTitle("#eta ");
2448  fhEtaPhiAmpCell->SetYTitle("#varphi (rad)");
2449  fhEtaPhiAmpCell->SetZTitle("#it{E} (GeV) ");
2450  outputContainer->Add(fhEtaPhiAmpCell);
2451  }
2452  else
2453  {
2454  fhEtaPhiCell = new TH2F ("hEtaPhiCell","Cell #eta vs cell #varphi vs cell energy",
2455  netabins,etamin,etamax,nphibins,phimin,phimax);
2456  fhEtaPhiCell->SetXTitle("#eta ");
2457  fhEtaPhiCell->SetYTitle("#varphi (rad)");
2458  outputContainer->Add(fhEtaPhiCell);
2459  }
2460  }
2461 
2463  {
2464  fhCellTimeSpreadRespectToCellMax = new TH2F ("hCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} per cluster", nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
2465  fhCellTimeSpreadRespectToCellMax->SetXTitle("#it{E} (GeV)");
2466  fhCellTimeSpreadRespectToCellMax->SetYTitle("#Delta #it{t}_{cell max-i} (ns)");
2467  outputContainer->Add(fhCellTimeSpreadRespectToCellMax);
2468 
2469  // fhClusterMaxCellDiffAverageTime = new TH2F ("hClusterMaxCellDiffAverageTime","t_{cell max}-t_{average} per cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2470  // fhClusterMaxCellDiffAverageTime->SetXTitle("#it{E} (GeV)");
2471  // fhClusterMaxCellDiffAverageTime->SetYTitle("#Delta #it{t}_{cell max - average} (ns)");
2472  // outputContainer->Add(fhClusterMaxCellDiffAverageTime);
2473  //
2474  // fhClusterMaxCellDiffWeightedTime = new TH2F ("hClusterMaxCellDiffWeightedTime","t_{cell max}-t_{weighted} per cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
2475  // fhClusterMaxCellDiffWeightedTime->SetXTitle("#it{E} (GeV)");
2476  // fhClusterMaxCellDiffWeightedTime->SetYTitle("#Delta #it{t}_{cell max - weighted} (ns)");
2477  // outputContainer->Add(fhClusterMaxCellDiffWeightedTime);
2478  }
2479 
2480  // Module histograms
2481 
2482  fhEMod = new TH2F ("hE_Mod","Cluster reconstructed Energy in each present Module",nptbins,ptmin,ptmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2483  fhEMod->SetXTitle("#it{E} (GeV)");
2484  fhEMod->SetYTitle("Module");
2485  outputContainer->Add(fhEMod);
2486 
2487  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);
2488  fhEWeirdMod->SetXTitle("#it{E} (GeV)");
2489  fhEWeirdMod->SetYTitle("Module");
2490  outputContainer->Add(fhEWeirdMod);
2491 
2492  fhNClustersMod = new TH2F ("hNClusters_Mod","# clusters vs Module", nclbins,nclmin+0.5,nclmax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2493  fhNClustersMod->SetXTitle("number of clusters");
2494  fhNClustersMod->SetYTitle("Module");
2495  outputContainer->Add(fhNClustersMod);
2496 
2497  fhSumClustersEnergyMod = new TH2F ("hSumClustersEnergy_Mod","# clusters vs Module", 1000, 0, 2000,totalSM,fFirstModule-0.5,fLastModule+0.5);
2498  fhSumClustersEnergyMod->SetXTitle("#Sigma_{clusters} #it{E} (GeV)");
2499  fhSumClustersEnergyMod->SetYTitle("Module");
2500  outputContainer->Add(fhSumClustersEnergyMod);
2501 
2503 
2504  fhIMMod = new TH2F*[fNModules];
2505 
2507 
2508  if(fStudyBadClusters)
2510 
2511 
2512  for(Int_t imod = 0; imod < fNModules; imod++)
2513  {
2514  if(imod < fFirstModule || imod > fLastModule) continue;
2515 
2516  fhNClustersSumEnergyPerMod[imod] = new TH2F (Form("hNClustersSumEnergy_Mod%d",imod),
2517  Form("# clusters in SM vs sum of clusters energy in Module %d",imod),
2518  nptbins,ptmin,ptmax*4, nclbins,nclmin,nclmax);
2519  fhNClustersSumEnergyPerMod[imod]->SetXTitle("#Sigma #it{E} (GeV)");
2520  fhNClustersSumEnergyPerMod[imod]->SetYTitle("#Sigma #it{n}_{clusters}");
2521  outputContainer->Add(fhNClustersSumEnergyPerMod[imod]);
2522 
2523  fhNCellsPerClusterMod[imod] = new TH2F (Form("hNCellsPerCluster_Mod%d",imod),
2524  Form("# cells per cluster vs cluster energy in Module %d",imod),
2525  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
2526  fhNCellsPerClusterMod[imod]->SetXTitle("#it{E} (GeV)");
2527  fhNCellsPerClusterMod[imod]->SetYTitle("#it{n}_{cells per cluster}");
2528  outputContainer->Add(fhNCellsPerClusterMod[imod]);
2529 
2530  if(fStudyBadClusters)
2531  {
2532  fhNCellsPerClusterModNoCut[imod] = new TH2F (Form("hNCellsPerClusterNoCut_Mod%d",imod),
2533  Form("# cells per cluster vs cluster energy in Module %d, no cut",imod),
2534  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
2535  fhNCellsPerClusterModNoCut[imod]->SetXTitle("#it{E} (GeV)");
2536  fhNCellsPerClusterModNoCut[imod]->SetYTitle("#it{n}_{cells per cluster}");
2537  outputContainer->Add(fhNCellsPerClusterModNoCut[imod]);
2538  }
2539 
2540  if(fFillAllPi0Histo)
2541  {
2542  fhIMMod[imod] = new TH2F (Form("hIM_Mod%d",imod),
2543  Form("Cluster pairs Invariant mass vs reconstructed pair energy in Module %d, n cell > 1",imod),
2544  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
2545  fhIMMod[imod]->SetXTitle("#it{p}_{T, cluster pairs} (GeV) ");
2546  fhIMMod[imod]->SetYTitle("#it{M}_{cluster pairs} (GeV/#it{c}^{2})");
2547  outputContainer->Add(fhIMMod[imod]);
2548  }
2549  }
2550  }
2551 
2552  // Calorimeter cells
2553  //
2555  {
2556  fhNCells = new TH1F ("hNCells","# cells", ncebins,ncemin+0.5,ncemax);
2557  fhNCells->SetXTitle("#it{n}_{cells}");
2558  outputContainer->Add(fhNCells);
2559 
2560  fhNCellsCutAmpMin = new TH1F ("hNCellsCutAmpMin",Form("# cells amp > %1.2f-%1.2f",fEMCALCellAmpMin,fPHOSCellAmpMin), ncebins,ncemin+0.5,ncemax);
2561  fhNCellsCutAmpMin->SetXTitle("#it{n}_{cells}");
2562  outputContainer->Add(fhNCellsCutAmpMin);
2563 
2564  fhAmplitude = new TH1F ("hAmplitude","#it{E}_{cell}", nptbins,ptmin,ptmax/2);
2565  fhAmplitude->SetXTitle("#it{E}_{cell} (GeV)");
2566  outputContainer->Add(fhAmplitude);
2567 
2568  fhAmpMod = new TH2F ("hAmp_Mod","Cell energy in each present Module",nptbins,ptmin,ptmax/2,totalSM,fFirstModule-0.5,fLastModule+0.5);
2569  fhAmpMod->SetXTitle("#it{E} (GeV)");
2570  fhAmpMod->SetYTitle("Module");
2571  outputContainer->Add(fhAmpMod);
2572 
2573  fhAmpWeirdMod = new TH2F ("hAmpWeird_Mod","Cell energy in each present Module, ridiculously large E",200,0,10000,totalSM,fFirstModule-0.5,fLastModule+0.5);
2574  fhAmpWeirdMod->SetXTitle("#it{E} (GeV)");
2575  fhAmpWeirdMod->SetYTitle("Module");
2576  outputContainer->Add(fhAmpWeirdMod);
2577 
2579  {
2580  fhTimeMod = new TH2F ("hTime_Mod","Cell time in each present Module",ntimebins,timemin,timemax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2581  fhTimeMod->SetXTitle("t (ns)");
2582  fhTimeMod->SetYTitle("Module");
2583  outputContainer->Add(fhTimeMod);
2584  }
2585 
2587  {
2588  //..Create the fhAmpId TH2D with increasing binwidth
2589  //..0-10 GeV (0.05), 10-20 GeV (0.2), 20-30 GeV (0.5)
2590  Double_t binWidth=(ptfinemax-ptfinemin)/nfineptbins;
2591  TCustomBinning xBinning;
2592  xBinning.SetMinimum(ptfinemin);
2593  xBinning.AddStep(ptfinemax,binWidth); //..first entries of the array are the set ranges and bins
2594  xBinning.AddStep(ptfinemax*2,binWidth*4); //..expand the previously defined range by 2 but increase the bin width
2595  xBinning.AddStep(ptfinemax*4,binWidth*10);//..expand the previously defined range by 4 but increase the bin width
2596 
2597  TCustomBinning yBinning;
2598  yBinning.SetMinimum(0);
2599  yBinning.AddStep(fNMaxRows*fNMaxCols*fNModules,1); //..add cells with binwidth 1
2600 
2601  TArrayD xbinsArray;
2602  xBinning.CreateBinEdges(xbinsArray);
2603  TArrayD ybinsArray;
2604  yBinning.CreateBinEdges(ybinsArray);
2605 
2606  fhAmpId = new TH2F ("hAmpId","#it{E}_{cell}", xbinsArray.GetSize() - 1, xbinsArray.GetArray(), ybinsArray.GetSize() - 1, ybinsArray.GetArray());
2607  fhAmpId->SetXTitle("#it{E}_{cell} (GeV)");
2608  outputContainer->Add(fhAmpId);
2609 
2610  fhAmpIdLowGain = new TH2F ("hAmpIdLG","Low gain: #it{E}_{cell}", nfineptbins,15,ptfinemax+15,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
2611  fhAmpIdLowGain->SetXTitle("#it{E}_{cell} (GeV)");
2612  outputContainer->Add(fhAmpIdLowGain);
2613  }
2614 
2616  {
2617  fhTime = new TH1F ("hTime","#it{t}_{cell}",ntimebins,timemin,timemax);
2618  fhTime->SetXTitle("#it{t}_{cell} (ns)");
2619  outputContainer->Add(fhTime);
2620 
2621  // fhTimeVz = new TH2F ("hTimeVz","#it{t}_{cell} vs vertex, amplitude > 0.5 GeV",100, 0, 50,ntimebins,timemin,timemax);
2622  // fhTimeVz->SetXTitle("|v_{z}| (cm)");
2623  // fhTimeVz->SetYTitle("#it{t}_{cell} (ns)");
2624  // outputContainer->Add(fhTimeVz);
2625 
2626  fhTimeAmp = new TH2F ("hTimeAmp","#it{t}_{cell} vs #it{E}_{cell}",nptbins,ptmin,ptmax/2,ntimebins,timemin,timemax);
2627  fhTimeAmp->SetYTitle("#it{t}_{cell} (ns)");
2628  fhTimeAmp->SetXTitle("#it{E}_{cell} (GeV)");
2629  outputContainer->Add(fhTimeAmp);
2630 
2631  fhTimeAmpLowGain = new TH2F ("hTimeAmpLG","Low gain: #it{t}_{cell} vs #it{E}_{cell}",nptbins,ptmin,ptmax/2,ntimebins,timemin,timemax);
2632  fhTimeAmpLowGain->SetYTitle("#it{t}_{cell} (ns)");
2633  fhTimeAmpLowGain->SetXTitle("#it{E}_{cell} (GeV)");
2634  outputContainer->Add(fhTimeAmpLowGain);
2635 
2637  {
2638  fhCellIdCellLargeTimeSpread= new TH1F ("hCellIdCellLargeTimeSpread","Cells with time 100 ns larger than cell max in cluster ",
2640  fhCellIdCellLargeTimeSpread->SetXTitle("Absolute Cell Id");
2641  outputContainer->Add(fhCellIdCellLargeTimeSpread);
2642 
2643  fhTimeId = new TH2F ("hTimeId","#it{t}_{cell} vs Absolute Id",
2644  ntimebins,timemin,timemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
2645  fhTimeId->SetXTitle("#it{t}_{cell} (ns)");
2646  fhTimeId->SetYTitle("Cell Absolute Id");
2647  outputContainer->Add(fhTimeId);
2648 
2649  fhTimeIdLowGain = new TH2F ("hTimeIdLG","Low gain: #it{t}_{cell} vs Absolute Id",
2650  ntimebins,timemin,timemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
2651  fhTimeIdLowGain->SetXTitle("#it{t}_{cell} (ns)");
2652  fhTimeIdLowGain->SetYTitle("Cell Absolute Id");
2653  outputContainer->Add(fhTimeIdLowGain);
2654 
2655  if(GetCaloUtils()->IsL1PhaseInTimeRecalibrationOn()==1)
2656  {
2657  fhTimeL1UnCorrId = new TH2F ("hTimeL1UnCorrId","#it{t}_{cell} vs Absolute Id",
2658  ntimebins,timemin,timemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
2659  fhTimeL1UnCorrId->SetXTitle("#it{t}_{cell} (ns)");
2660  fhTimeL1UnCorrId->SetYTitle("Cell Absolute Id");
2661  outputContainer->Add(fhTimeL1UnCorrId);
2662  }
2663  }
2664 
2665  for(Int_t bc = 0; bc < 4; bc++)
2666  {
2667  fhTimePerSMPerBC[bc] = new TH2F (Form("hTimePerSM_BC%d",bc),
2668  Form("#it{t}_{cell} vs super-module, for BC/4=%d",bc),
2669  ntimebins,timemin,timemax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2670  fhTimePerSMPerBC[bc]->SetXTitle("#it{t}_{cell} (ns)");
2671  fhTimePerSMPerBC[bc]->SetYTitle("Module");
2672  outputContainer->Add(fhTimePerSMPerBC[bc]);
2673  }
2674  }
2675 
2676  fhCellECross = new TH2F ("hCellECross","1 - Energy in cross around cell / cell energy",
2677  nptbins,ptmin,ptmax/2, 400,-1,1.);
2678  fhCellECross->SetXTitle("#it{E}_{cell} (GeV) ");
2679  fhCellECross->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell}");
2680  outputContainer->Add(fhCellECross);
2681 
2682  fhNCellsMod = new TH2F ("hNCells_Mod","# cells vs Module", ncebins,ncemin+0.5,ncemax,totalSM,fFirstModule-0.5,fLastModule+0.5);
2683  fhNCellsMod->SetXTitle("#it{n}_{cells}");
2684  fhNCellsMod->SetYTitle("Module");
2685  outputContainer->Add(fhNCellsMod);
2686 
2687  fhSumCellsAmpMod = new TH2F ("hSumCellsAmp_Mod","# cells vs Module", 1000, 0, 2000,totalSM,fFirstModule-0.5,fLastModule+0.5);
2688  fhSumCellsAmpMod->SetXTitle("#Sigma_{cells} #it{Amp} (GeV)");
2689  fhSumCellsAmpMod->SetYTitle("Module");
2690  outputContainer->Add(fhSumCellsAmpMod);
2691 
2692  fhGridCells = new TH2F ("hGridCells",Form("Entries in grid of cells"),
2693  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2694  fhGridCells->SetYTitle("row (phi direction)");
2695  fhGridCells->SetXTitle("column (eta direction)");
2696  outputContainer->Add(fhGridCells);
2697 
2698  fhGridCellsE = new TH2F ("hGridCellsE","Accumulated energy in grid of cells",
2699  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2700  fhGridCellsE->SetYTitle("row (phi direction)");
2701  fhGridCellsE->SetXTitle("column (eta direction)");
2702  outputContainer->Add(fhGridCellsE);
2703 
2704  fhGridCellsLowGain = new TH2F ("hGridCellsLG",Form("Low gain: Entries in grid of cells"),
2705  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2706  fhGridCellsLowGain->SetYTitle("row (phi direction)");
2707  fhGridCellsLowGain->SetXTitle("column (eta direction)");
2708  outputContainer->Add(fhGridCellsLowGain);
2709 
2710  fhGridCellsELowGain = new TH2F ("hGridCellsELG","Low gain: Accumulated energy in grid of cells",
2711  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2712  fhGridCellsELowGain->SetYTitle("row (phi direction)");
2713  fhGridCellsELowGain->SetXTitle("column (eta direction)");
2714  outputContainer->Add(fhGridCellsELowGain);
2715 
2717  {
2718  fhGridCellsTime = new TH2F ("hGridCellsTime","Accumulated time in grid of cells",
2719  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2720  fhGridCellsTime->SetYTitle("row (phi direction)");
2721  fhGridCellsTime->SetXTitle("column (eta direction)");
2722  outputContainer->Add(fhGridCellsTime);
2723 
2724  fhGridCellsTimeLowGain = new TH2F ("hGridCellsTimeLG","Low gain: Accumulated time in grid of cells",
2725  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2726  fhGridCellsTimeLowGain->SetYTitle("row (phi direction)");
2727  fhGridCellsTimeLowGain->SetXTitle("column (eta direction)");
2728  outputContainer->Add(fhGridCellsTimeLowGain);
2729  }
2730 
2732  {
2734 
2735  for(Int_t imod = 0; imod < fNModules; imod++)
2736  {
2737  if(imod < fFirstModule || imod > fLastModule) continue;
2738 
2739  fhNCellsSumAmpPerMod[imod] = new TH2F (Form("hNCellsSumAmp_Mod%d",imod),
2740  Form("# cells in SM vs sum of cells energy in Module %d",imod),
2741  nptbins,ptmin,ptmax*4, ncebins,ncemin,ncemax);
2742  fhNCellsSumAmpPerMod[imod]->SetXTitle("#Sigma #it{Amplitude} (GeV)");
2743  fhNCellsSumAmpPerMod[imod]->SetYTitle("#Sigma #it{n}_{cells}");
2744  outputContainer->Add(fhNCellsSumAmpPerMod[imod]);}
2745  }
2746 
2748  {
2750 
2751  for(Int_t imod = 0; imod < fNModules; imod++)
2752  {
2753  for(Int_t ircu = 0; ircu < fNRCU; ircu++)
2754  {
2755  if( ircu ==1 &&
2756  (imod == 10 || imod== 11 || imod == 18 || imod == 19)
2757  ) continue;
2758 
2759  fhTimeAmpPerRCU[imod*fNRCU+ircu] = new TH2F (Form("hTimeAmp_Mod%d_RCU%d",imod,ircu),
2760  Form("#it{E}_{cell} vs #it{t}_{cell} in Module %d, RCU %d ",imod,ircu),
2761  nptbins,ptmin,ptmax/2,ntimebins,timemin,timemax);
2762  fhTimeAmpPerRCU[imod*fNRCU+ircu]->SetXTitle("#it{E} (GeV)");
2763  fhTimeAmpPerRCU[imod*fNRCU+ircu]->SetYTitle("#it{t} (ns)");
2764  outputContainer->Add(fhTimeAmpPerRCU[imod*fNRCU+ircu]);
2765 
2766  }
2767  }
2768  }
2769  }
2770 
2771  // Detectors correlation
2772  //
2773  if(fCorrelate)
2774  {
2775  // PHOS vs EMCAL
2776  fhEMCALPHOSCorrNClusters = new TH2F ("hEMCALPHOSCorrNClusters","# clusters in EMCAL vs PHOS", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax);
2777  fhEMCALPHOSCorrNClusters->SetXTitle("number of clusters in EMCAL");
2778  fhEMCALPHOSCorrNClusters->SetYTitle("number of clusters in PHOS");
2779  outputContainer->Add(fhEMCALPHOSCorrNClusters);
2780 
2781  fhEMCALPHOSCorrEClusters = new TH2F ("hEMCALPHOSCorrEClusters","summed energy of clusters in EMCAL vs PHOS", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2);
2782  fhEMCALPHOSCorrEClusters->SetXTitle("#Sigma #it{E} of clusters in EMCAL (GeV)");
2783  fhEMCALPHOSCorrEClusters->SetYTitle("#Sigma #it{E} of clusters in PHOS (GeV)");
2784  outputContainer->Add(fhEMCALPHOSCorrEClusters);
2785 
2786  fhEMCALPHOSCorrNCells = new TH2F ("hEMCALPHOSCorrNCells","# Cells in EMCAL vs PHOS", ncebins,ncemin,ncemax, ncebins,ncemin,ncemax);
2787  fhEMCALPHOSCorrNCells->SetXTitle("number of Cells in EMCAL");
2788  fhEMCALPHOSCorrNCells->SetYTitle("number of Cells in PHOS");
2789  outputContainer->Add(fhEMCALPHOSCorrNCells);
2790 
2791  fhEMCALPHOSCorrECells = new TH2F ("hEMCALPHOSCorrECells","summed energy of Cells in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4);
2792  fhEMCALPHOSCorrECells->SetXTitle("#Sigma #it{E} of Cells in EMCAL (GeV)");
2793  fhEMCALPHOSCorrECells->SetYTitle("#Sigma #it{E} of Cells in PHOS (GeV)");
2794  outputContainer->Add(fhEMCALPHOSCorrECells);
2795 
2796  // DCal vs EMCAL
2797  fhEMCALDCALCorrNClusters = new TH2F ("hEMCALDCALCorrNClusters","# clusters in EMCAL vs DCAL", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax);
2798  fhEMCALDCALCorrNClusters->SetXTitle("number of clusters in EMCAL");
2799  fhEMCALDCALCorrNClusters->SetYTitle("number of clusters in DCAL");
2800  outputContainer->Add(fhEMCALDCALCorrNClusters);
2801 
2802  fhEMCALDCALCorrEClusters = new TH2F ("hEMCALDCALCorrEClusters","summed energy of clusters in EMCAL vs DCAL", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2);
2803  fhEMCALDCALCorrEClusters->SetXTitle("#Sigma #it{E} of clusters in EMCAL (GeV)");
2804  fhEMCALDCALCorrEClusters->SetYTitle("#Sigma #it{E} of clusters in DCAL (GeV)");
2805  outputContainer->Add(fhEMCALDCALCorrEClusters);
2806 
2807  fhEMCALDCALCorrNCells = new TH2F ("hEMCALDCALCorrNCells","# Cells in EMCAL vs DCAL", ncebins,ncemin,ncemax, ncebins,ncemin,ncemax);
2808  fhEMCALDCALCorrNCells->SetXTitle("number of Cells in EMCAL");
2809  fhEMCALDCALCorrNCells->SetYTitle("number of Cells in DCAL");
2810  outputContainer->Add(fhEMCALDCALCorrNCells);
2811 
2812  fhEMCALDCALCorrECells = new TH2F ("hEMCALDCALCorrECells","summed energy of Cells in EMCAL vs DCAL", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4);
2813  fhEMCALDCALCorrECells->SetXTitle("#Sigma #it{E} of Cells in EMCAL (GeV)");
2814  fhEMCALDCALCorrECells->SetYTitle("#Sigma #it{E} of Cells in DCAL (GeV)");
2815  outputContainer->Add(fhEMCALDCALCorrECells);
2816 
2817 
2818  // DCAL vs PHOS
2819  fhDCALPHOSCorrNClusters = new TH2F ("hDCALPHOSCorrNClusters","# clusters in DCAL vs PHOS", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax);
2820  fhDCALPHOSCorrNClusters->SetXTitle("number of clusters in DCAL");
2821  fhDCALPHOSCorrNClusters->SetYTitle("number of clusters in PHOS");
2822  outputContainer->Add(fhDCALPHOSCorrNClusters);
2823 
2824  fhDCALPHOSCorrEClusters = new TH2F ("hDCALPHOSCorrEClusters","summed energy of clusters in DCAL vs PHOS", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2);
2825  fhDCALPHOSCorrEClusters->SetXTitle("#Sigma #it{E} of clusters in DCAL (GeV)");
2826  fhDCALPHOSCorrEClusters->SetYTitle("#Sigma #it{E} of clusters in PHOS (GeV)");
2827  outputContainer->Add(fhDCALPHOSCorrEClusters);
2828 
2829  fhDCALPHOSCorrNCells = new TH2F ("hDCALPHOSCorrNCells","# Cells in DCAL vs PHOS", ncebins,ncemin,ncemax, ncebins,ncemin,ncemax);
2830  fhDCALPHOSCorrNCells->SetXTitle("number of Cells in DCAL");
2831  fhDCALPHOSCorrNCells->SetYTitle("number of Cells in PHOS");
2832  outputContainer->Add(fhDCALPHOSCorrNCells);
2833 
2834  fhDCALPHOSCorrECells = new TH2F ("hDCALPHOSCorrECells","summed energy of Cells in DCAL vs PHOS", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4);
2835  fhDCALPHOSCorrECells->SetXTitle("#Sigma #it{E} of Cells in DCAL (GeV)");
2836  fhDCALPHOSCorrECells->SetYTitle("#Sigma #it{E} of Cells in PHOS (GeV)");
2837  outputContainer->Add(fhDCALPHOSCorrECells);
2838 
2839  // Calorimeter vs. V0 signal
2840 
2841  fhCaloV0SCorrNClusters = new TH2F ("hCaloV0SNClusters",Form("# clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nclbins,nclmin,nclmax);
2842  fhCaloV0SCorrNClusters->SetXTitle("V0 signal");
2843  fhCaloV0SCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
2844  outputContainer->Add(fhCaloV0SCorrNClusters);
2845 
2846  fhCaloV0SCorrEClusters = new TH2F ("hCaloV0SEClusters",Form("summed energy of clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
2847  fhCaloV0SCorrEClusters->SetXTitle("V0 signal");
2848  fhCaloV0SCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
2849  outputContainer->Add(fhCaloV0SCorrEClusters);
2850 
2851  fhCaloV0SCorrNCells = new TH2F ("hCaloV0SNCells",Form("# Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax, ncebins,ncemin,ncemax);
2852  fhCaloV0SCorrNCells->SetXTitle("V0 signal");
2853  fhCaloV0SCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
2854  outputContainer->Add(fhCaloV0SCorrNCells);
2855 
2856  fhCaloV0SCorrECells = new TH2F ("hCaloV0SECells",Form("summed energy of Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
2857  fhCaloV0SCorrECells->SetXTitle("V0 signal");
2858  fhCaloV0SCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
2859  outputContainer->Add(fhCaloV0SCorrECells);
2860 
2861  // Calorimeter vs V0 multiplicity
2862 
2863  fhCaloV0MCorrNClusters = new TH2F ("hCaloV0MNClusters",Form("# clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nclbins,nclmin,nclmax);
2864  fhCaloV0MCorrNClusters->SetXTitle("V0 signal");
2865  fhCaloV0MCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
2866  outputContainer->Add(fhCaloV0MCorrNClusters);
2867 
2868  fhCaloV0MCorrEClusters = new TH2F ("hCaloV0MEClusters",Form("summed energy of clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
2869  fhCaloV0MCorrEClusters->SetXTitle("V0 signal");
2870  fhCaloV0MCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
2871  outputContainer->Add(fhCaloV0MCorrEClusters);
2872 
2873  fhCaloV0MCorrNCells = new TH2F ("hCaloV0MNCells",Form("# Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax, ncebins,ncemin,ncemax);
2874  fhCaloV0MCorrNCells->SetXTitle("V0 signal");
2875  fhCaloV0MCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
2876  outputContainer->Add(fhCaloV0MCorrNCells);
2877 
2878  fhCaloV0MCorrECells = new TH2F ("hCaloV0MECells",Form("summed energy of Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
2879  fhCaloV0MCorrECells->SetXTitle("V0 signal");
2880  fhCaloV0MCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
2881  outputContainer->Add(fhCaloV0MCorrECells);
2882 
2883  //Calorimeter VS Track multiplicity
2884  fhCaloTrackMCorrNClusters = new TH2F ("hCaloTrackMNClusters",Form("# clusters in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nclbins,nclmin,nclmax);
2885  fhCaloTrackMCorrNClusters->SetXTitle("# tracks");
2886  fhCaloTrackMCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
2887  outputContainer->Add(fhCaloTrackMCorrNClusters);
2888 
2889  fhCaloTrackMCorrEClusters = new TH2F ("hCaloTrackMEClusters",Form("summed energy of clusters in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
2890  fhCaloTrackMCorrEClusters->SetXTitle("# tracks");
2891  fhCaloTrackMCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
2892  outputContainer->Add(fhCaloTrackMCorrEClusters);
2893 
2894  fhCaloTrackMCorrNCells = new TH2F ("hCaloTrackMNCells",Form("# Cells in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax, ncebins,ncemin,ncemax);
2895  fhCaloTrackMCorrNCells->SetXTitle("# tracks");
2896  fhCaloTrackMCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
2897  outputContainer->Add(fhCaloTrackMCorrNCells);
2898 
2899  fhCaloTrackMCorrECells = new TH2F ("hCaloTrackMECells",Form("summed energy of Cells in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
2900  fhCaloTrackMCorrECells->SetXTitle("# tracks");
2901  fhCaloTrackMCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
2902  outputContainer->Add(fhCaloTrackMCorrECells);
2903 
2904  fhCaloCenNClusters = new TH2F ("hCaloCenNClusters","# clusters in calorimeter vs centrality",100,0,100,nclbins,nclmin,nclmax);
2905  fhCaloCenNClusters->SetYTitle("number of clusters in calorimeter");
2906  fhCaloCenNClusters->SetXTitle("Centrality");
2907  outputContainer->Add(fhCaloCenNClusters);
2908 
2909  fhCaloCenEClusters = new TH2F ("hCaloCenEClusters","summed energy of clusters in calorimeter vs centrality",100,0,100,nptbins,ptmin,ptmax*2);
2910  fhCaloCenEClusters->SetYTitle("#Sigma #it{E} of clusters in calorimeter (GeV)");
2911  fhCaloCenEClusters->SetXTitle("Centrality");
2912  outputContainer->Add(fhCaloCenEClusters);
2913 
2914  fhCaloCenNCells = new TH2F ("hCaloCenNCells","# Cells in calorimeter vs centrality",100,0,100,ncebins,ncemin,ncemax);
2915  fhCaloCenNCells->SetYTitle("number of Cells in calorimeter");
2916  fhCaloCenNCells->SetXTitle("Centrality");
2917  outputContainer->Add(fhCaloCenNCells);
2918 
2919  fhCaloCenECells = new TH2F ("hCaloCenECells","summed energy of Cells in calorimeter vs centrality",100,0,100,nptbins*2,ptmin,ptmax*4);
2920  fhCaloCenECells->SetYTitle("#Sigma #it{E} of Cells in calorimeter (GeV)");
2921  fhCaloCenECells->SetXTitle("Centrality");
2922  outputContainer->Add(fhCaloCenECells);
2923 
2924  fhCaloEvPNClusters = new TH2F ("hCaloEvPNClusters","# clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nclbins,nclmin,nclmax);
2925  fhCaloEvPNClusters->SetYTitle("number of clusters in calorimeter");
2926  fhCaloEvPNClusters->SetXTitle("Event plane angle (rad)");
2927  outputContainer->Add(fhCaloEvPNClusters);
2928 
2929  fhCaloEvPEClusters = new TH2F ("hCaloEvPEClusters","summed energy of clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins,ptmin,ptmax*2);
2930  fhCaloEvPEClusters->SetYTitle("#Sigma #it{E} of clusters in calorimeter (GeV)");
2931  fhCaloEvPEClusters->SetXTitle("Event plane angle (rad)");
2932  outputContainer->Add(fhCaloEvPEClusters);
2933 
2934  fhCaloEvPNCells = new TH2F ("hCaloEvPNCells","# Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),ncebins,ncemin,ncemax);
2935  fhCaloEvPNCells->SetYTitle("number of Cells in calorimeter");
2936  fhCaloEvPNCells->SetXTitle("Event plane angle (rad)");
2937  outputContainer->Add(fhCaloEvPNCells);
2938 
2939  fhCaloEvPECells = new TH2F ("hCaloEvPECells","summed energy of Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins*2,ptmin,ptmax*4);
2940  fhCaloEvPECells->SetYTitle("#Sigma #it{E} of Cells in calorimeter (GeV)");
2941  fhCaloEvPECells->SetXTitle("Event plane angle (rad)");
2942  outputContainer->Add(fhCaloEvPECells);
2943  } // correlate calorimeters
2944 
2945  // Monte Carlo Histograms
2946  //
2947  if(IsDataMC())
2948  {
2949  TString particleName[] = {
2950  "Photon", "Pi0", "Eta",
2951  "Electron", "PhotonConv",
2952  "NeutralHadron", "ChargedHadron" };
2953 
2954  // Pure MC
2955 
2956  for(Int_t iPart = 0; iPart < 4; iPart++)
2957  {
2958  fhGenMCE [iPart] = new TH1F(Form("hGenMCE_%s",particleName[iPart].Data()) ,
2959  Form("#it{E} of generated %s",particleName[iPart].Data()),
2960  nptbins,ptmin,ptmax);
2961 
2962  fhGenMCPt[iPart] = new TH1F(Form("hGenMCPt_%s",particleName[iPart].Data()) ,
2963  Form("#it{p}_{T} of generated %s",particleName[iPart].Data()),
2964  nptbins,ptmin,ptmax);
2965 
2966  fhGenMCEtaPhi[iPart] = new TH2F(Form("hGenMCEtaPhi_%s",particleName[iPart].Data()),
2967  Form("Y vs #varphi of generated %s",particleName[iPart].Data()),
2968  200,-1,1,360,0,TMath::TwoPi());
2969 
2970  fhGenMCE [iPart] ->SetXTitle("#it{E} (GeV)");
2971  fhGenMCPt[iPart] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2972  fhGenMCEtaPhi[iPart]->SetXTitle("#eta");
2973  fhGenMCEtaPhi[iPart]->SetYTitle("#varphi (rad)");
2974 
2975  outputContainer->Add(fhGenMCE [iPart]);
2976  outputContainer->Add(fhGenMCPt [iPart]);
2977  outputContainer->Add(fhGenMCEtaPhi[iPart]);
2978 
2979 
2980  fhGenMCAccE [iPart] = new TH1F(Form("hGenMCAccE_%s",particleName[iPart].Data()) ,
2981  Form("#it{E} of generated %s",particleName[iPart].Data()),
2982  nptbins,ptmin,ptmax);
2983  fhGenMCAccPt[iPart] = new TH1F(Form("hGenMCAccPt_%s",particleName[iPart].Data()) ,
2984  Form("#it{p}_{T} of generated %s",particleName[iPart].Data()),
2985  nptbins,ptmin,ptmax);
2986  fhGenMCAccEtaPhi[iPart] = new TH2F(Form("hGenMCAccEtaPhi_%s",particleName[iPart].Data()),
2987  Form("Y vs #varphi of generated %s",particleName[iPart].Data()),
2988  netabins,etamin,etamax,nphibins,phimin,phimax);
2989 
2990  fhGenMCAccE [iPart] ->SetXTitle("#it{E} (GeV)");
2991  fhGenMCAccPt[iPart] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2992  fhGenMCAccEtaPhi[iPart]->SetXTitle("#eta");
2993  fhGenMCAccEtaPhi[iPart]->SetYTitle("#varphi (rad)");
2994 
2995  outputContainer->Add(fhGenMCAccE [iPart]);
2996  outputContainer->Add(fhGenMCAccPt [iPart]);
2997  outputContainer->Add(fhGenMCAccEtaPhi[iPart]);
2998 
2999  }
3000 
3002  {
3003  for(Int_t iPart = 0; iPart < 7; iPart++)
3004  {
3005  for(Int_t iCh = 0; iCh < 2; iCh++)
3006  {
3007  fhRecoMCRatioE[iPart][iCh] = new TH2F (Form("hRecoMCRatioE_%s_Match%d",particleName[iPart].Data(),iCh),
3008  Form("Reconstructed/Generated E, %s, Matched %d",particleName[iPart].Data(),iCh),
3009  nptbins, ptmin, ptmax, 200,0,2);
3010  fhRecoMCRatioE[iPart][iCh]->SetYTitle("#it{E}_{reconstructed}/#it{E}_{generated}");
3011  fhRecoMCRatioE[iPart][iCh]->SetXTitle("#it{E}_{reconstructed} (GeV)");
3012  outputContainer->Add(fhRecoMCRatioE[iPart][iCh]);
3013 
3014 
3015  fhRecoMCDeltaE[iPart][iCh] = new TH2F (Form("hRecoMCDeltaE_%s_Match%d",particleName[iPart].Data(),iCh),
3016  Form("Generated - Reconstructed E, %s, Matched %d",particleName[iPart].Data(),iCh),
3017  nptbins, ptmin, ptmax, nptbins*2,-ptmax,ptmax);
3018  fhRecoMCDeltaE[iPart][iCh]->SetYTitle("#Delta #it{E} (GeV)");
3019  fhRecoMCDeltaE[iPart][iCh]->SetXTitle("#it{E}_{reconstructed} (GeV)");
3020  outputContainer->Add(fhRecoMCDeltaE[iPart][iCh]);
3021 
3022  fhRecoMCDeltaPhi[iPart][iCh] = new TH2F (Form("hRecoMCDeltaPhi_%s_Match%d",particleName[iPart].Data(),iCh),
3023  Form("Generated - Reconstructed #varphi, %s, Matched %d",particleName[iPart].Data(),iCh),
3024  nptbins, ptmin, ptmax, nphibins*2,-phimax,phimax);
3025  fhRecoMCDeltaPhi[iPart][iCh]->SetYTitle("#Delta #varphi (rad)");
3026  fhRecoMCDeltaPhi[iPart][iCh]->SetXTitle("#it{E}_{reconstructed} (GeV)");
3027  outputContainer->Add(fhRecoMCDeltaPhi[iPart][iCh]);
3028 
3029  fhRecoMCDeltaEta[iPart][iCh] = new TH2F (Form("hRecoMCDeltaEta_%s_Match%d",particleName[iPart].Data(),iCh),
3030  Form("Generated - Reconstructed #eta, %s, Matched %d",particleName[iPart].Data(),iCh),
3031  nptbins, ptmin, ptmax,netabins*2,-etamax,etamax);
3032  fhRecoMCDeltaEta[iPart][iCh]->SetYTitle("#Delta #eta ");
3033  fhRecoMCDeltaEta[iPart][iCh]->SetXTitle("#it{E}_{reconstructed} (GeV)");
3034  outputContainer->Add(fhRecoMCDeltaEta[iPart][iCh]);
3035 
3036  fhRecoMCE[iPart][iCh] = new TH2F (Form("hRecoMCE_%s_Match%d",particleName[iPart].Data(),iCh),
3037  Form("#it{E} distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh),
3038  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
3039  fhRecoMCE[iPart][iCh]->SetXTitle("#it{E}_{rec} (GeV)");
3040  fhRecoMCE[iPart][iCh]->SetYTitle("#it{E}_{gen} (GeV)");
3041  outputContainer->Add(fhRecoMCE[iPart][iCh]);
3042 
3043  fhRecoMCPhi[iPart][iCh] = new TH2F (Form("hRecoMCPhi_%s_Match%d",particleName[iPart].Data(),iCh),
3044  Form("#varphi distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh),
3045  nphibins,phimin,phimax, nphibins,phimin,phimax);
3046  fhRecoMCPhi[iPart][iCh]->SetXTitle("#varphi_{reconstructed} (rad)");
3047  fhRecoMCPhi[iPart][iCh]->SetYTitle("#varphi_{generated} (rad)");
3048  outputContainer->Add(fhRecoMCPhi[iPart][iCh]);
3049 
3050  fhRecoMCEta[iPart][iCh] = new TH2F (Form("hRecoMCEta_%s_Match%d",particleName[iPart].Data(),iCh),
3051  Form("#eta distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh),
3052  netabins,etamin,etamax,netabins,etamin,etamax);
3053  fhRecoMCEta[iPart][iCh]->SetXTitle("#eta_{reconstructed} ");
3054  fhRecoMCEta[iPart][iCh]->SetYTitle("#eta_{generated} ");
3055  outputContainer->Add(fhRecoMCEta[iPart][iCh]);
3056  }
3057  }
3058 
3059  // Vertex of generated particles
3060 
3061  fhEMVxyz = new TH2F ("hEMVxyz","Production vertex of reconstructed ElectroMagnetic particles",nvdistbins,vdistmin,vdistmax,nvdistbins,vdistmin,vdistmax);//,100,0,500);
3062  fhEMVxyz->SetXTitle("#it{v}_{x}");
3063  fhEMVxyz->SetYTitle("#it{v}_{y}");
3064  //fhEMVxyz->SetZTitle("v_{z}");
3065  outputContainer->Add(fhEMVxyz);
3066 
3067  fhHaVxyz = new TH2F ("hHaVxyz","Production vertex of reconstructed hadrons",nvdistbins,vdistmin,vdistmax,nvdistbins,vdistmin,vdistmax);//,100,0,500);
3068  fhHaVxyz->SetXTitle("#it{v}_{x}");
3069  fhHaVxyz->SetYTitle("#it{v}_{y}");
3070  //fhHaVxyz->SetZTitle("v_{z}");
3071  outputContainer->Add(fhHaVxyz);
3072 
3073  fhEMR = new TH2F ("hEMR","Distance to production vertex of reconstructed ElectroMagnetic particles vs E rec",nptbins,ptmin,ptmax,nvdistbins,vdistmin,vdistmax);
3074  fhEMR->SetXTitle("#it{E} (GeV)");
3075  fhEMR->SetYTitle("TMath::Sqrt(v_{x}^{2}+v_{y}^{2})");
3076  outputContainer->Add(fhEMR);
3077 
3078  fhHaR = new TH2F ("hHaR","Distance to production vertex of reconstructed Hadrons vs E rec",nptbins,ptmin,ptmax,nvdistbins,vdistmin,vdistmax);
3079  fhHaR->SetXTitle("#it{E} (GeV)");
3080  fhHaR->SetYTitle("TMath::Sqrt(v_{x}^{2}+v_{y}^{2})");
3081  outputContainer->Add(fhHaR);
3082 
3083  // Track Matching
3084 
3085  fhMCEle1EOverP = new TH2F("hMCEle1EOverP","TRACK matches #it{E}/#it{p}, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3086  fhMCEle1EOverP->SetYTitle("#it{E}/#it{p}");
3087  fhMCEle1EOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3088  outputContainer->Add(fhMCEle1EOverP);
3089 
3090  fhMCEle1dR = new TH1F("hMCEle1dR","TRACK matches dR, MC electrons",ndRbins,dRmin,dRmax);
3091  fhMCEle1dR->SetXTitle("#Delta #it{R} (rad)");
3092  outputContainer->Add(fhMCEle1dR) ;
3093 
3094  fhMCEle2MatchdEdx = new TH2F("hMCEle2MatchdEdx","#it{dE/dx} vs. #it{p} for all matches, MC electrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
3095  fhMCEle2MatchdEdx->SetXTitle("#it{p} (GeV/#it{c})");
3096  fhMCEle2MatchdEdx->SetYTitle("<#it{dE/dx}>");
3097  outputContainer->Add(fhMCEle2MatchdEdx);
3098 
3099  fhMCChHad1EOverP = new TH2F("hMCChHad1EOverP","TRACK matches #it{E}/#it{p}, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3100  fhMCChHad1EOverP->SetYTitle("#it{E}/#it{p}");
3101  fhMCChHad1EOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3102  outputContainer->Add(fhMCChHad1EOverP);
3103 
3104  fhMCChHad1dR = new TH1F("hMCChHad1dR","TRACK matches dR, MC charged hadrons",ndRbins,dRmin,dRmax);
3105  fhMCChHad1dR->SetXTitle("#Delta R (rad)");
3106  outputContainer->Add(fhMCChHad1dR) ;
3107 
3108  fhMCChHad2MatchdEdx = new TH2F("hMCChHad2MatchdEdx","#it{dE/dx} vs. #it{p} for all matches, MC charged hadrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
3109  fhMCChHad2MatchdEdx->SetXTitle("#it{p} (GeV/#it{c})");
3110  fhMCChHad2MatchdEdx->SetYTitle("#it{dE/dx}>");
3111  outputContainer->Add(fhMCChHad2MatchdEdx);
3112 
3113  fhMCNeutral1EOverP = new TH2F("hMCNeutral1EOverP","TRACK matches #it{E}/#it{p}, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3114  fhMCNeutral1EOverP->SetYTitle("#it{E}/#it{p}");
3115  fhMCNeutral1EOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3116  outputContainer->Add(fhMCNeutral1EOverP);
3117 
3118  fhMCNeutral1dR = new TH1F("hMCNeutral1dR","TRACK matches dR, MC neutrals",ndRbins,dRmin,dRmax);
3119  fhMCNeutral1dR->SetXTitle("#Delta #it{R} (rad)");
3120  outputContainer->Add(fhMCNeutral1dR) ;
3121 
3122  fhMCNeutral2MatchdEdx = new TH2F("hMCNeutral2MatchdEdx","#it{dE/dx} vs. #it{p} for all matches, MC neutrals",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
3123  fhMCNeutral2MatchdEdx->SetXTitle("#it{p} (GeV/#it{c})");
3124  fhMCNeutral2MatchdEdx->SetYTitle("#it{dE/dx}>");
3125  outputContainer->Add(fhMCNeutral2MatchdEdx);
3126 
3127  fhMCEle1EOverPR02 = new TH2F("hMCEle1EOverPR02","TRACK matches #it{E}/#it{p}, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3128  fhMCEle1EOverPR02->SetYTitle("#it{E}/#it{p}");
3129  fhMCEle1EOverPR02->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3130  outputContainer->Add(fhMCEle1EOverPR02);
3131 
3132  fhMCChHad1EOverPR02 = new TH2F("hMCChHad1EOverPR02","TRACK matches #it{E}/#it{p}, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3133  fhMCChHad1EOverPR02->SetYTitle("#it{E}/#it{p}");
3134  fhMCChHad1EOverPR02->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3135  outputContainer->Add(fhMCChHad1EOverPR02);
3136 
3137  fhMCNeutral1EOverPR02 = new TH2F("hMCNeutral1EOverPR02","TRACK matches #it{E}/#it{p}, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3138  fhMCNeutral1EOverPR02->SetYTitle("#it{E}/#it{p}");
3139  fhMCNeutral1EOverPR02->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3140  outputContainer->Add(fhMCNeutral1EOverPR02);
3141 
3142  fhMCEle1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates #it{E}/#it{p} (60<dEdx<100), MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3143  fhMCEle1EleEOverP->SetYTitle("#it{E}/#it{p}");
3144  fhMCEle1EleEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3145  outputContainer->Add(fhMCEle1EleEOverP);
3146 
3147  fhMCChHad1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates #it{E}/#it{p} (60<dEdx<100), MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3148  fhMCChHad1EleEOverP->SetYTitle("#it{E}/#it{p}");
3149  fhMCChHad1EleEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3150  outputContainer->Add(fhMCChHad1EleEOverP);
3151 
3152  fhMCNeutral1EleEOverP = new TH2F("hMCNeutral1EleEOverP","Electron candidates #it{E}/#it{p} (60<dEdx<100), MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
3153  fhMCNeutral1EleEOverP->SetYTitle("#it{E}/#it{p}");
3154  fhMCNeutral1EleEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3155  outputContainer->Add(fhMCNeutral1EleEOverP);
3156  }
3157  }
3158 
3159  // for(Int_t i = 0; i < outputContainer->GetEntries() ; i++)
3160  // printf("i=%d, name= %s\n",i,outputContainer->At(i)->GetName());
3161 
3162  return outputContainer;
3163 }
3164 
3165 //___________________________________________________________________________________________________________
3171 //___________________________________________________________________________________________________________
3172 void AliAnaCalorimeterQA::InvariantMassHistograms(Int_t iclus, Int_t nModule, const TObjArray* caloClusters,
3173  AliVCaloCells * cells)
3174 {
3175  AliDebug(1,"Start");
3176 
3177  //Get vertex for photon momentum calculation and event selection
3178  Double_t v[3] = {0,0,0}; //vertex ;
3179  //GetReader()->GetVertex(v);
3180 
3181  Int_t nModule2 = -1;
3182  Int_t nCaloClusters = caloClusters->GetEntriesFast();
3183 
3184  Float_t phi1 = fClusterMomentum.Phi();
3185  if(phi1 < 0) phi1 += TMath::TwoPi();
3186 
3187  Double_t tof1 = ((AliVCluster*) caloClusters->At(iclus))->GetTOF()*1.e9;
3188  if(tof1>400) tof1-=fConstantTimeShift;
3189 
3190  for(Int_t jclus = iclus + 1 ; jclus < nCaloClusters ; jclus++)
3191  {
3192  AliVCluster* clus2 = (AliVCluster*) caloClusters->At(jclus);
3193 
3194  Float_t maxCellFraction = 0.;
3195  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus2, maxCellFraction);
3196 
3197  Double_t tof2 = clus2->GetTOF()*1.e9;
3198  if(tof2>400) tof2-=fConstantTimeShift;
3199 
3200  Double_t diffTof = tof1-tof2;
3201 
3202  // Try to reduce background with a mild shower shape cut and no more
3203  // than 1 local maximum in cluster and remove low energy clusters
3204 
3205  if( !IsGoodCluster(absIdMax, clus2->GetM02(), clus2->GetNCells(), cells)
3206  || GetCaloUtils()->GetNumberOfLocalMaxima(clus2,cells) > 1
3207  || clus2->GetM02() > fInvMassMaxM02Cut
3208  || clus2->GetM02() < fInvMassMinM02Cut
3209  || clus2->E() < fInvMassMinECut
3210  || clus2->E() > fInvMassMaxECut
3211  || TMath::Abs(diffTof) > fInvMassMaxTimeDifference
3212  ) continue;
3213 
3214  // Get cluster kinematics
3215  clus2->GetMomentum(fClusterMomentum2,v);
3216 
3217  // Check only certain regions
3218  Bool_t in2 = kTRUE;
3220  if(!in2) continue;
3221 
3222  Float_t pairPt = (fClusterMomentum+fClusterMomentum2).Pt();
3223 
3224  // Opening angle cut, avoid combination of DCal and EMCal clusters
3225  Double_t angle = fClusterMomentum.Angle(fClusterMomentum2.Vect());
3226 
3227  if ( fFillInvMassOpenAngle ) fhOpAngle->Fill(pairPt, angle, GetEventWeight()) ;
3228 
3229  if( angle > fInvMassMaxOpenAngle ) continue;
3230 
3231  // Get module of cluster
3232  nModule2 = GetModuleNumber(clus2);
3233 
3234  // Fill histograms
3236  Float_t asym = TMath::Abs( fClusterMomentum.E() - fClusterMomentum2.E() ) /
3237  ( fClusterMomentum.E() + fClusterMomentum2.E() );
3238 
3239  // All modules
3240  // Combine EMCal or PHOS clusters
3241 
3242  Float_t phi2 = fClusterMomentum2.Phi();
3243  if(phi2 < 0) phi2 += TMath::TwoPi();
3244 
3245  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));
3246 
3247  Bool_t inPi0Window = kFALSE;
3248  if(mass < 0.18 && mass > 0.1) inPi0Window = kTRUE ;
3249 
3250  if ( nModule < 12 && nModule2 < 12 )
3251  {
3252  fhIM ->Fill(pairPt, mass, GetEventWeight());
3253 
3254  if( fFillPi0PairDiffTime && inPi0Window )
3255  fhClusterPairDiffTimeEPi0Mass->Fill(pairPt, diffTof, GetEventWeight());
3256 
3257  if ( nModule == nModule2 )
3258  {
3259  fhIMSame->Fill(pairPt, mass, GetEventWeight());
3260 
3261  if( fFillPi0PairDiffTime && inPi0Window )
3262  fhClusterPairDiffTimeEPi0MassSame->Fill(pairPt, diffTof, GetEventWeight());
3263  }
3264  else
3265  {
3266  fhIMDiff->Fill(pairPt, mass, GetEventWeight());
3267  }
3268  }
3269  // Combine DCal clusters
3270  else if ( ( GetCalorimeter() == kEMCAL || GetCalorimeter() == kDCAL ) &&
3271  nModule > 11 && nModule2 > 11 && fNModules > 12 )
3272  {
3273  fhIMDCAL->Fill(pairPt, mass, GetEventWeight());
3274 
3275  if( fFillPi0PairDiffTime && inPi0Window )
3276  fhClusterPairDiffTimeEPi0MassDCal->Fill(pairPt, diffTof, GetEventWeight());
3277 
3278  if ( nModule == nModule2 )
3279  {
3280  fhIMDCALSame->Fill(pairPt, mass, GetEventWeight());
3281 
3282  if( fFillPi0PairDiffTime && inPi0Window )
3283  fhClusterPairDiffTimeEPi0MassDCalSame->Fill(pairPt, diffTof, GetEventWeight());
3284  }
3285  else
3286  {
3287  fhIMDCALDiff->Fill(pairPt, mass, GetEventWeight());
3288  }
3289  }
3290 
3291  if ( fFillInvMassOpenAngle ) fhIMvsOpAngle->Fill(mass, angle, GetEventWeight());
3292 
3293  // Single module
3294  if(nModule == nModule2 && nModule >= 0 && nModule < fNModules)
3295  fhIMMod[nModule]->Fill(pairPt, mass, GetEventWeight());
3296 
3297  // Asymetry histograms
3298  fhAsym->Fill(pairPt, asym, GetEventWeight());
3299  } // 2nd cluster loop
3300 
3301  //
3302  // Combine PHOS and DCal
3303  //
3304 
3305  if( ( GetCalorimeter() == kEMCAL || GetCalorimeter() == kDCAL ) &&
3306  fNModules > 12 && nModule > 11)
3307  {
3308  AliDebug(1,"Check DCal-PHOS pairs\n");
3309 
3310  Int_t sector1 = -1;
3311  Int_t sector2 = -1;
3312 
3313  if(phi1 >= 260*TMath::DegToRad() && phi1 < 280) sector1 = 0;
3314  if(phi1 >= 280*TMath::DegToRad() && phi1 < 300) sector1 = 1;
3315  if(phi1 >= 300*TMath::DegToRad() && phi1 < 320) sector1 = 2;
3316 
3317  for(Int_t jclus = 0 ; jclus < GetPHOSClusters()->GetEntriesFast() ; jclus++)
3318  {
3319  AliVCluster* clus2 = (AliVCluster*) GetPHOSClusters()->At(jclus);
3320 
3321  Float_t maxCellFraction = 0.;
3322  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus2, maxCellFraction);
3323 
3324  // Try to reduce background, remove low energy clusters
3325  if( !IsGoodCluster(absIdMax, clus2->GetM02(), clus2->GetNCells(), cells)
3326  || clus2->E() < fInvMassMinECut
3327  || clus2->E() > fInvMassMaxECut
3328  ) continue;
3329 
3330  // Get cluster kinematics
3331  clus2->GetMomentum(fClusterMomentum2,v);
3332 
3333  // Fill histograms
3334 
3336  Float_t pairPt = (fClusterMomentum+fClusterMomentum2).Pt();
3337  //Float_t asym = TMath::Abs( fClusterMomentum.E() - fClusterMomentum2.E() ) /
3338  //( fClusterMomentum.E() + fClusterMomentum2.E() );
3339 
3340  fhIMDCALPHOS->Fill(pairPt, mass, GetEventWeight());
3341 
3342  Float_t phiPHOS = fClusterMomentum2.Phi();
3343  if(phiPHOS < 0) phiPHOS += TMath::TwoPi();
3344 
3345  if(phiPHOS >= 260*TMath::DegToRad() && phiPHOS < 280) sector2 = 0;
3346  if(phiPHOS >= 280*TMath::DegToRad() && phiPHOS < 300) sector2 = 1;
3347  if(phiPHOS >= 300*TMath::DegToRad() && phiPHOS < 320) sector2 = 2;
3348 
3349  if(sector1 == sector2) fhIMDCALPHOSSame->Fill(pairPt, mass, GetEventWeight());
3350 
3351  } // PHOS cluster loop
3352  } // DCal-PHOS combination
3353 
3354 
3355  // Select EMCal clusters in DCal eta acceptance
3356  // Cross check combination of DCal-PHOS pairs
3357  if( fFillInvMassInEMCALWithPHOSDCalAcc && TMath::Abs(fClusterMomentum.Eta() > 0.22))
3358  {
3359  AliDebug(1,"Check EMCAL(DCal)-EMCAL(PHOS) pairs\n");
3360 
3361  Int_t sector1 = -1;
3362  Int_t sector2 = -1;
3363 
3364  if(phi1 >= 80*TMath::DegToRad() && phi1 < 100) sector1 = 0;
3365  if(phi1 >= 100*TMath::DegToRad() && phi1 < 120) sector1 = 1;
3366  if(phi1 >= 120*TMath::DegToRad() && phi1 < 140) sector1 = 2;
3367  if(phi1 >= 140*TMath::DegToRad() && phi1 < 160) sector1 = 3;
3368  if(phi1 >= 160*TMath::DegToRad() && phi1 < 180) sector1 = 4;
3369  if(phi1 >= 180*TMath::DegToRad() && phi1 < 190) sector1 = 5;
3370 
3371  for(Int_t jclus = 0 ; jclus < caloClusters->GetEntriesFast() ; jclus++)
3372  {
3373  AliVCluster* clus2 = (AliVCluster*) caloClusters->At(jclus);
3374 
3375  Float_t maxCellFraction = 0.;
3376  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus2, maxCellFraction);
3377 
3378  Double_t tof2 = clus2->GetTOF()*1.e9;
3379  if(tof2>400) tof2-=fConstantTimeShift;
3380 
3381  Double_t diffTof = TMath::Abs(tof1-tof2);
3382 
3383  // Try to reduce background with a mild shower shape cut and no more
3384  // than 1 local maximum in cluster and remove low energy clusters
3385  if( !IsGoodCluster(absIdMax, clus2->GetM02(), clus2->GetNCells(), cells)
3386  || GetCaloUtils()->GetNumberOfLocalMaxima(clus2,cells) > 1
3387  || clus2->GetM02() > fInvMassMaxM02Cut
3388  || clus2->GetM02() < fInvMassMinM02Cut
3389  || clus2->E() < fInvMassMinECut
3390  || clus2->E() > fInvMassMaxECut
3391  || TMath::Abs(diffTof) > fInvMassMaxTimeDifference
3392  ) continue;
3393 
3394  // Get cluster kinematics
3395  clus2->GetMomentum(fClusterMomentum2,v);
3396 
3397  // Select EMCal clusters in PHOS acceptance
3398  if(TMath::Abs(fClusterMomentum2.Eta() > 0.13)) continue ;
3399 
3400  // Fill histograms
3401 
3403  Float_t pairPt = (fClusterMomentum+fClusterMomentum2).Pt();
3404  //Float_t asym = TMath::Abs( fClusterMomentum.E() - fClusterMomentum2.E() ) /
3405  //( fClusterMomentum.E() + fClusterMomentum2.E() );
3406 
3407  fhIMEMCALPHOS->Fill(pairPt, mass, GetEventWeight());
3408 
3409  Float_t phiPHOS = fClusterMomentum2.Phi();
3410  if(phiPHOS < 0) phiPHOS += TMath::TwoPi();
3411 
3412  if(phiPHOS >= 80*TMath::DegToRad() && phiPHOS < 100) sector2 = 0;
3413  if(phiPHOS >= 100*TMath::DegToRad() && phiPHOS < 120) sector2 = 1;
3414  if(phiPHOS >= 120*TMath::DegToRad() && phiPHOS < 140) sector2 = 2;
3415  if(phiPHOS >= 140*TMath::DegToRad() && phiPHOS < 160) sector2 = 3;
3416  if(phiPHOS >= 160*TMath::DegToRad() && phiPHOS < 180) sector2 = 4;
3417  if(phiPHOS >= 180*TMath::DegToRad() && phiPHOS < 190) sector2 = 5;
3418 
3419  if(sector1 == sector2) fhIMEMCALPHOSSame->Fill(pairPt, mass, GetEventWeight());
3420 
3421  } // PHOS cluster loop
3422  } // EMCal(DCal)-EMCAL(PHOS) combination
3423 
3424  AliDebug(1,"End");
3425 }
3426 
3427 //______________________________
3429 //______________________________
3431 {
3432  if(GetCalorimeter() != kPHOS && GetCalorimeter() !=kEMCAL)
3433  AliFatal(Form("Wrong calorimeter name <%s>", GetCalorimeterString().Data()));
3434 
3435  //if(GetReader()->GetDataType()== AliCaloTrackReader::kMC)
3436  // AliFatal("Analysis of reconstructed data, MC reader not aplicable");
3437 }
3438 
3439 //________________________________________
3441 //________________________________________
3443 {
3444  AddToHistogramsName("AnaCaloQA_");
3445 
3446  fTimeCutMin = -9999999;
3447  fTimeCutMax = 9999999;
3448 
3449  fEMCALCellAmpMin = 0.2; // 200 MeV
3450  fPHOSCellAmpMin = 0.2; // 200 MeV
3451  fCellAmpMin = 0.2; // 200 MeV
3452 
3453  fEMCALClusterM02Min = 0.05;
3454 
3455  fEMCALClusterNCellMin = 2; // at least 2
3456  fPHOSClusterNCellMin = 3; // at least 3
3457 
3458  fInvMassMinECut = 0.5; // 500 MeV
3459  fInvMassMaxECut = 10;
3460 
3461  fInvMassMinM02Cut = 0.1;
3462  fInvMassMaxM02Cut = 0.4;
3463 
3464  fInvMassMaxTimeDifference = 200; // ns, quite open
3465 
3466  fInvMassMaxOpenAngle = 100*TMath::DegToRad(); // 100 degrees
3467 
3468 // fNEBinCuts = 14;
3469 // fEBinCuts[0] = 0.; fEBinCuts[1] = 0.3; fEBinCuts[2] = 0.5;
3470 // fEBinCuts[3] = 1.; fEBinCuts[4] = 2. ; fEBinCuts[5] = 3. ;
3471 // fEBinCuts[6] = 4.; fEBinCuts[7] = 6. ; fEBinCuts[8] = 8. ;
3472 // fEBinCuts[9] = 10.; fEBinCuts[10]= 12.; fEBinCuts[11]= 16.;
3473 // fEBinCuts[12]= 20.; fEBinCuts[13]= 50.; fEBinCuts[14]= 100.;
3474 // for(Int_t i = fNEBinCuts; i < 15; i++) fEBinCuts[i] = 1000.;
3475 
3476  fNEBinCuts = 7;
3477  fEBinCuts[0] = 2. ; fEBinCuts[1] = 4. ; fEBinCuts[2] = 6. ;
3478  fEBinCuts[3] = 8. ; fEBinCuts[4] = 10.; fEBinCuts[5] = 12.;
3479  fEBinCuts[6] = 16.; fEBinCuts[7] = 20.;
3480  for(Int_t i = fNEBinCuts+1; i < 15; i++) fEBinCuts[i] = 1000.;
3481 }
3482 
3483 //_____________________________________________________________________________
3491 //_____________________________________________________________________________
3493  Int_t nCellsPerCluster, AliVCaloCells* cells)
3494 {
3495  //if(!fStudyBadClusters) return kTRUE;
3496 
3497  if(GetCalorimeter() == kEMCAL)
3498  {
3499 
3500  if( m02 < fEMCALClusterM02Min || nCellsPerCluster < fEMCALClusterNCellMin )
3501  return kFALSE ; // mild shower shape cut for exotics
3502 
3503  if(!GetCaloUtils()->GetEMCALRecoUtils()->IsRejectExoticCluster())
3504  {
3505  return !(GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(absIdMax,cells,(GetReader()->GetInputEvent())->GetBunchCrossNumber()));
3506  }
3507  else
3508  {
3509  return kTRUE;
3510  }
3511  }
3512  else // PHOS
3513  {
3514  if( m02 < 0.05 || nCellsPerCluster < fPHOSClusterNCellMin ) return kFALSE ; // mild shower shape cut for exotics
3515 
3516  Float_t ampMax = cells->GetCellAmplitude(absIdMax);
3517  GetCaloUtils()->RecalibrateCellAmplitude(ampMax, GetCalorimeter(), absIdMax);
3518 
3519  if(ampMax < 0.01) return kFALSE;
3520 
3521  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
3522 
3523  if(1-GetCaloUtils()->GetECross(absIdMax,cells,bc)/ampMax > 0.95)
3524  return kFALSE;
3525  else
3526  return kTRUE;
3527  }
3528 }
3529 
3530 //_________________________________________________________
3532 //_________________________________________________________
3534 {
3535  if(! opt)
3536  return;
3537 
3538  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3540 
3541  printf("Select Calorimeter %s \n",GetCalorimeterString().Data());
3542  printf("Time Cut: %3.1f < TOF < %3.1f\n" , fTimeCutMin, fTimeCutMax);
3543  printf("EMCAL Min Amplitude : %2.1f GeV/c\n", fEMCALCellAmpMin) ;
3544  printf("PHOS Min Amplitude : %2.1f GeV/c\n", fPHOSCellAmpMin) ;
3545  printf("EMCAL Min M02 : %2.2f\n" , fEMCALClusterM02Min) ;
3546  printf("EMCAL Min n cells : %d\n" , fEMCALClusterNCellMin) ;
3547  printf("PHOS Min n cells : %d\n" , fPHOSClusterNCellMin) ;
3548 
3549  printf("Inv. Mass %2.1f < E_clus < %2.1f GeV/c\n" , fInvMassMinECut , fInvMassMaxECut ) ;
3550  printf("Inv. Mass %2.1f < M02_clus < %2.1f GeV/c\n", fInvMassMinM02Cut, fInvMassMaxM02Cut) ;
3551  printf("Inv. Mass open angle : %2.1f deg\n" , fInvMassMaxOpenAngle*TMath::RadToDeg()) ;
3552  printf("Inv. Mass time difference: %2.1f ns\n" , fInvMassMaxTimeDifference) ;
3553 }
3554 
3555 //_____________________________________________________
3557 //_____________________________________________________
3559 {
3560  AliDebug(1,"Start");
3561 
3562  //Print("");
3563 
3564  // Play with the MC stack if available
3565  if(IsDataMC()) MCHistograms();
3566 
3567  // Correlate Calorimeters and V0 and track Multiplicity
3568  if(fCorrelate) Correlate();
3569 
3570  // Get List with CaloClusters , calo Cells, init min amplitude
3571  TObjArray * caloClusters = NULL;
3572  AliVCaloCells * cells = 0x0;
3573  if (GetCalorimeter() == kPHOS)
3574  {
3576  caloClusters = GetPHOSClusters();
3577  cells = GetPHOSCells();
3578  }
3579  else if (GetCalorimeter() == kEMCAL)
3580  {
3582  caloClusters = GetEMCALClusters();
3583  cells = GetEMCALCells();
3584  }
3585  else
3586  AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Wrong calorimeter name <%s>, END", GetCalorimeterString().Data()));
3587 
3588  if( !caloClusters || !cells )
3589  {
3590  AliWarning(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - No CaloClusters or CaloCells available"));
3591  return;
3592  }
3593 
3594  if(caloClusters->GetEntriesFast() == 0) return ;
3595 
3596  //printf("QA: N cells %d, N clusters %d \n",cells->GetNumberOfCells(),caloClusters->GetEntriesFast());
3597 
3598  // Clusters
3599  ClusterLoopHistograms(caloClusters,cells);
3600 
3601  // Cells
3602  CellHistograms(cells);
3603 
3604  AliDebug(1,"End");
3605 }
3606 
3607 //______________________________________
3611 //______________________________________
3613 {
3614  if ( !GetMC() ) return;
3615 
3616  Int_t pdg = 0 ;
3617  Int_t status = 0 ;
3618  Int_t nprim = GetMC()->GetNumberOfTracks();
3619 
3620  AliVParticle * primary= 0;
3621 
3622  //printf("N primaries %d\n",nprim);
3623  for(Int_t i=0 ; i < nprim; i++)
3624  {
3625  if ( !GetReader()->AcceptParticleMCLabel( i ) ) continue ;
3626 
3627  // Get the generated particles, check that it is primary (not parton, resonance)
3628  // and get its momentum. Different way to recover from ESD or AOD
3629 
3630  primary = GetMC()->GetTrack(i) ;
3631  if(!primary)
3632  {
3633  AliWarning("Primaries pointer not available!!");
3634  continue;
3635  }
3636 
3637  pdg = primary->PdgCode();
3638  status = primary->MCStatusCode();
3639 
3640  //printf("Input: i %d, %s, pdg %d, status %d \n",i, primStack->GetName(), pdg, status);
3641 
3642  //if (!primAOD->IsPrimary()) continue; //accept all which is not MC transport generated. Don't know how to avoid partons
3643 
3644  if ( status > 11 ) continue; //Working for PYTHIA and simple generators, check for HERWIG, HIJING?
3645 
3646  // Protection against floating point exception
3647  if ( primary->E() == TMath::Abs(primary->Pz()) ||
3648  (primary->E() - primary->Pz()) < 1e-3 ||
3649  (primary->E() + primary->Pz()) < 0 ) continue ;
3650 
3651  //printf("Take : i %d, %s, pdg %d, status %d \n",i, primStack->GetName(), pdg, status);
3652 
3653  // Photon kinematics
3654  primary->Momentum(fPrimaryMomentum);
3655 
3656  Float_t eMC = fPrimaryMomentum.E();
3657  if(eMC < 0.2) continue;
3658 
3659  Float_t ptMC = fPrimaryMomentum.E();
3660 
3661  Float_t etaMC = fPrimaryMomentum.Eta();
3662 
3663  // Only particles in |eta| < 1
3664  if (TMath::Abs(etaMC) > 1) continue;
3665 
3666  Float_t phiMC = fPrimaryMomentum.Phi();
3667  if(phiMC < 0)
3668  phiMC += TMath::TwoPi();
3669 
3670  Int_t mcIndex = -1;
3671  if (pdg==22) mcIndex = kmcPhoton;
3672  else if (pdg==111) mcIndex = kmcPi0;
3673  else if (pdg==221) mcIndex = kmcEta;
3674  else if (TMath::Abs(pdg)==11) mcIndex = kmcElectron;
3675 
3676  if( mcIndex >=0 )
3677  {
3678  fhGenMCE [mcIndex]->Fill( eMC, GetEventWeight());
3679  fhGenMCPt[mcIndex]->Fill(ptMC, GetEventWeight());
3680  if(eMC > 0.5) fhGenMCEtaPhi[mcIndex]->Fill(etaMC, phiMC, GetEventWeight());
3681 
3682  Bool_t inacceptance = kTRUE;
3683  // Check same fidutial borders as in data analysis on top of real acceptance if real was requested.
3684  if( IsFiducialCutOn() && !GetFiducialCut()->IsInFiducialCut(fPrimaryMomentum.Eta(),fPrimaryMomentum.Phi(),GetCalorimeter()) )
3685  inacceptance = kFALSE ;
3686 
3687  if ( IsRealCaloAcceptanceOn() ) // defined on base class
3688  {
3689  if ( !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primary) ) inacceptance = kFALSE ;
3690  }
3691 
3692  if(!inacceptance) continue;
3693 
3694  fhGenMCAccE [mcIndex]->Fill( eMC, GetEventWeight());
3695  fhGenMCAccPt[mcIndex]->Fill(ptMC, GetEventWeight());
3696  if(eMC > 0.5) fhGenMCAccEtaPhi[mcIndex]->Fill(etaMC, phiMC, GetEventWeight());
3697  }
3698  }
3699 }
3700 
3701 
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 GetHistoEOverPMin() const
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
Int_t CheckOrigin(Int_t label, AliMCEvent *mcevent, TString selectHeaderName, Float_t clusE)
TH2F * fhClusterPairDiffTimeE
! Pair of clusters time difference vs E
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
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
Bool_t ClusterMCHistograms(Bool_t matched, const Int_t *labels, const UShort_t *edepFrac, Int_t nLabels, Int_t &pdg)
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.
Float_t GetHistoEOverPMax() const
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
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
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)
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.
Int_t GetHistoEOverPBins() const
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.