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