AliPhysics  ff1d528 (ff1d528)
 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 //__________________________________________
46 //__________________________________________
49 
50 // Switches
51 fFillAllCellTimeHisto(kTRUE),
52 fFillAllPosHisto(kFALSE), fFillAllPosHisto2(kFALSE),
53 fFillAllTH3(kFALSE),
54 fFillAllTMHisto(kTRUE), fFillClusterMaxCellHisto(kFALSE),
55 fFillAllPi0Histo(kTRUE), fFillInvMassOpenAngle(kFALSE),
56 fFillPi0PairDiffTime(kFALSE), fFillInvMassInEMCALWithPHOSDCalAcc(kFALSE),
57 fFillEBinAcceptanceHisto(kFALSE), fFillAllClusterHistograms(kTRUE),
58 fFillAllCellHistograms(kTRUE), fFillAllCellAbsIdHistograms(kTRUE),
59 fCorrelate(kTRUE), fStudyBadClusters(kFALSE),
60 fStudyClustersAsymmetry(kFALSE), fStudyExotic(kFALSE),
61 fStudyWeight(kFALSE), fStudyTCardCorrelation(kFALSE),
62 fStudyM02Dependence (kFALSE),
63 
64 // Parameters and cuts
65 fTimeCutMin(-10000), fTimeCutMax(10000),
66 fCellAmpMin(0),
67 fEMCALCellAmpMin(0), fPHOSCellAmpMin(0),
68 fEMCALClusterM02Min(0),
69 fEMCALClusterNCellMin(0), fPHOSClusterNCellMin(0),
70 fNEBinCuts(0),
71 
72 // Invariant mass
73 fInvMassMinECut(0), fInvMassMaxECut(0),
74 fInvMassMinM02Cut(0), fInvMassMaxM02Cut(0),
75 fInvMassMaxOpenAngle(0), fInvMassMaxTimeDifference(0),
76 
78 //fExoNECrossCuts(0), fExoECrossCuts(),
79 //fExoNDTimeCuts(0), fExoDTimeCuts(),
80 
81 fClusterMomentum(), fClusterMomentum2(),
82 fPrimaryMomentum(),
83 fConstantTimeShift(0),
84 
85 // Histograms
86 fhE(0), fhPt(0),
87 fhPhi(0), fhEta(0),
88 fhEtaPhi(0), fhEtaPhiE(0),
89 fhECharged(0), fhPtCharged(0),
90 fhPhiCharged(0), fhEtaCharged(0),
91 fhEtaPhiCharged(0), fhEtaPhiECharged(0),
92 
93 // Invariant mass
94 fhIM(0), fhIMSame(0), fhIMDiff(0),
95 fhIMDCAL(0), fhIMDCALSame(0), fhIMDCALDiff(0),
96 fhIMDCALPHOS(0), fhIMDCALPHOSSame(0),
97 fhIMEMCALPHOS(0), fhIMEMCALPHOSSame(0),
98 fhAsym(0),
99 fhOpAngle(0), fhIMvsOpAngle(0),
100 fhNCellsPerCluster(0), fhNCellsPerClusterNoCut(0),
101 fhNClusters(0),
102 
103 // Timing
104 fhClusterTimeEnergy(0), fhCellTimeSpreadRespectToCellMax(0),
105 fhCellIdCellLargeTimeSpread(0), fhClusterPairDiffTimeE(0), fhClusterPairDiffTimeESameMod(0),
106 fhClusterMaxCellCloseCellRatio(0), fhClusterMaxCellCloseCellDiff(0),
107 fhClusterMaxCellDiff(0), fhClusterMaxCellDiffNoCut(0),
108 //fhClusterMaxCellDiffAverageTime(0), fhClusterMaxCellDiffWeightedTime(0),
109 fhClusterMaxCellECross(0),
110 // fhDispersion(0),
111 fhLambda0(0), fhLambda1(0), fhNLocMax(0),
112 
113 fhEnergyTMEtaResidual1Cell(0), fhEnergyTMPhiResidual1Cell(0),
114 fhColRowExoticHighE1CellPosTime(0), fhColRowExoticHighE1CellNegTime(0), fhColRowExoticHighE1CellNulTime(0),
115 fhEnergyTMEtaResidualExotic(0), fhEnergyTMPhiResidualExotic(0),
116 fhColRowExoticHighEPosTime(0), fhColRowExoticHighENegTime(0), fhColRowExoticHighENulTime(0),
117 fhColRowHighEPosTime(0), fhColRowHighENegTime(0), fhColRowHighENulTime(0),
118 fhEnergyTMEtaResidualTCardCorrNoSelection1Cell(0), fhEnergyTMPhiResidualTCardCorrNoSelection1Cell(0),
119 fhEnergyTMEtaResidualTCardCorrNoSelectionExotic(0), fhEnergyTMPhiResidualTCardCorrNoSelectionExotic(0),
120 
121 
122 // bad clusters
123 fhBadClusterEnergy(0), fhBadClusterTimeEnergy(0), fhBadClusterEtaPhi(0),
124 fhBadClusterPairDiffTimeE(0), fhBadCellTimeSpreadRespectToCellMax(0),
125 fhBadClusterMaxCellCloseCellRatio(0), fhBadClusterMaxCellCloseCellDiff(0), fhBadClusterMaxCellDiff(0),
126 //fhBadClusterMaxCellDiffAverageTime(0), fhBadClusterMaxCellDiffWeightedTime(0),
127 fhBadClusterMaxCellECross(0),
128 fhBadClusterLambda0(0), fhBadClusterLambda1(0),
129 fhBadClusterDeltaIEtaDeltaIPhiE0(0), fhBadClusterDeltaIEtaDeltaIPhiE2(0),
130 fhBadClusterDeltaIEtaDeltaIPhiE6(0), fhBadClusterDeltaIA(0),
131 
132 // Position
133 fhRNCells(0), fhXNCells(0),
134 fhYNCells(0), fhZNCells(0),
135 fhRE(0), fhXE(0),
136 fhYE(0), fhZE(0),
137 fhXYZ(0),
138 fhRCellE(0), fhXCellE(0),
139 fhYCellE(0), fhZCellE(0),
140 fhXYZCell(0),
141 fhDeltaCellClusterRNCells(0), fhDeltaCellClusterXNCells(0),
142 fhDeltaCellClusterYNCells(0), fhDeltaCellClusterZNCells(0),
143 fhDeltaCellClusterRE(0), fhDeltaCellClusterXE(0),
144 fhDeltaCellClusterYE(0), fhDeltaCellClusterZE(0),
145 
146 // Cells
147 fhNCells(0), fhNCellsCutAmpMin(0),
148 fhAmplitude(0), fhAmpId(0),
149 fhEtaPhiAmpCell(0), fhEtaPhiCell(0),
150 fhTime(0), //fhTimeVz(0),
151 fhTimeId(0), fhTimeL1UnCorrId(0), fhTimeAmp(0),
152 fhAmpIdLowGain(0), fhTimeIdLowGain(0), fhTimeAmpLowGain(0),
153 
154 fhCellECross(0),
155 
156 fhEMCALPHOSCorrNClusters(0), fhEMCALPHOSCorrEClusters(0),
157 fhEMCALPHOSCorrNCells(0), fhEMCALPHOSCorrECells(0),
158 fhEMCALDCALCorrNClusters(0), fhEMCALDCALCorrEClusters(0),
159 fhEMCALDCALCorrNCells(0), fhEMCALDCALCorrECells(0),
160 fhDCALPHOSCorrNClusters(0), fhDCALPHOSCorrEClusters(0),
161 fhDCALPHOSCorrNCells(0), fhDCALPHOSCorrECells(0),
162 fhCaloV0SCorrNClusters(0), fhCaloV0SCorrEClusters(0),
163 fhCaloV0SCorrNCells(0), fhCaloV0SCorrECells(0),
164 fhCaloV0MCorrNClusters(0), fhCaloV0MCorrEClusters(0),
165 fhCaloV0MCorrNCells(0), fhCaloV0MCorrECells(0),
166 fhCaloTrackMCorrNClusters(0), fhCaloTrackMCorrEClusters(0),
167 fhCaloTrackMCorrNCells(0), fhCaloTrackMCorrECells(0),
168 fhCaloCenNClusters(0), fhCaloCenEClusters(0),
169 fhCaloCenNCells(0), fhCaloCenECells(0),
170 fhCaloEvPNClusters(0), fhCaloEvPEClusters(0),
171 fhCaloEvPNCells(0), fhCaloEvPECells(0),
172 
173 // Super-Module dependent histograms
174 fhEMod(0), fhAmpMod(0),
175 fhEWeirdMod(0), fhAmpWeirdMod(0),
176 fhTimeMod(0),
177 fhNClustersMod(0), fhNCellsMod(0),
178 fhNCellsSumAmpPerMod(0), fhNClustersSumEnergyPerMod(0),
179 fhNCellsPerClusterMod(0), fhNCellsPerClusterModNoCut(0),
180 fhNCellsPerClusterWeirdMod(0), fhNCellsPerClusterWeirdModNoCut(0),
181 
182 fhGridCells(0), fhGridCellsE(0), fhGridCellsTime(0),
183 fhGridCellsLowGain(0), fhGridCellsELowGain(0), fhGridCellsTimeLowGain(0),
184 fhTimeAmpPerRCU(0), fhIMMod(0),
185 
186 // Weight studies
187 fhECellClusterRatio(0), fhECellClusterLogRatio(0),
188 fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
189 fhECellTotalRatio(0), fhECellTotalLogRatio(0),
190 fhECellTotalRatioMod(0), fhECellTotalLogRatioMod(0),
191 
192 //fhExoL0ECross(0), fhExoL1ECross(0),
193 
194 // MC and reco
195 fhRecoMCE(), fhRecoMCPhi(), fhRecoMCEta(),
196 fhRecoMCDeltaE(), fhRecoMCRatioE(),
197 fhRecoMCDeltaPhi(), fhRecoMCDeltaEta(),
198 
199 // MC only
200 fhGenMCE(), fhGenMCPt(), fhGenMCEtaPhi(),
201 fhGenMCAccE(), fhGenMCAccPt(), fhGenMCAccEtaPhi(),
202 
203 // Matched MC
204 fhEMVxyz(0), fhEMR(0),
205 fhHaVxyz(0), fhHaR(0),
206 fh1EOverP(0), fh2dR(0),
207 fh2EledEdx(0), fh2MatchdEdx(0),
208 fh1EOverPR02(0), fh1EleEOverP(0),
209 fhMCEle1EOverP(0), fhMCEle1dR(0), fhMCEle2MatchdEdx(0),
210 fhMCChHad1EOverP(0), fhMCChHad1dR(0), fhMCChHad2MatchdEdx(0),
211 fhMCNeutral1EOverP(0), fhMCNeutral1dR(0), fhMCNeutral2MatchdEdx(0),
212 fhMCEle1EOverPR02(0), fhMCChHad1EOverPR02(0), fhMCNeutral1EOverPR02(0),
213 fhMCEle1EleEOverP(0), fhMCChHad1EleEOverP(0), fhMCNeutral1EleEOverP(0),
214 fhTrackMatchedDEtaNeg(0), fhTrackMatchedDPhiNeg(0), fhTrackMatchedDEtaDPhiNeg(0),
215 fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0),
216 fhTrackMatchedDEtaNegMod(0), fhTrackMatchedDPhiNegMod(0),
217 fhTrackMatchedDEtaPosMod(0), fhTrackMatchedDPhiPosMod(0),
218 fhClusterTimeEnergyM02(0), fhCellTimeSpreadRespectToCellMaxM02(0),
219 fhClusterMaxCellCloseCellRatioM02(0), fhClusterMaxCellCloseCellDiffM02(0),
220 fhClusterMaxCellDiffM02(0), fhClusterMaxCellECrossM02(0), fhNCellsPerClusterM02(0)
221 {
222  // Weight studies
223  for(Int_t i =0; i < 12; i++)
224  {
225  for(Int_t j = 0; j < 4; j++)
226  {
227  for(Int_t k = 0; k < 3; k++)
228  {
229  fhLambda0ForW0AndCellCuts [i][j][k] = 0;
230 // fhLambda1ForW0AndCellCuts [i][j][k] = 0;
231  fhLambda0ForW0AndCellCutsEta0[i][j][k] = 0;
232  }
233  }
234  for(Int_t j = 0; j < 5; j++)
235  {
236  fhLambda0ForW0MC[i][j] = 0;
237 // fhLambda1ForW0MC[i][j] = 0;
238  }
239  }
240 
241  // Cluster size
244  fhDeltaIA[0] = 0 ; fhDeltaIAL0[0] = 0; fhDeltaIAL1[0] = 0;
245  fhDeltaIA[1] = 0 ; fhDeltaIAL0[1] = 0; fhDeltaIAL1[1] = 0;
246  fhDeltaIANCells[0] = 0 ; fhDeltaIANCells[1] = 0;
247  fhDeltaIAMC[0] = 0 ; fhDeltaIAMC[1] = 0;
248  fhDeltaIAMC[2] = 0 ; fhDeltaIAMC[3] = 0;
249 
250 // // Exotic
251 // for (Int_t ie = 0; ie < 10 ; ie++)
252 // {
253 // fhExoDTime[ie] = 0;
254 // for (Int_t idt = 0; idt < 5 ; idt++)
255 // {
256 // fhExoNCell [ie][idt] = 0;
257 // fhExoL0 [ie][idt] = 0;
258 // fhExoL1 [ie][idt] = 0;
259 // fhExoECross [ie][idt] = 0;
260 // fhExoTime [ie][idt] = 0;
261 // fhExoL0NCell [ie][idt] = 0;
262 // fhExoL1NCell [ie][idt] = 0;
263 // }
264 // }
265 
266  // MC
267 
268  for(Int_t i = 0; i < 7; i++)
269  {
270  fhRecoMCE[i][0] = 0; fhRecoMCE[i][1] = 0;
271  fhRecoMCPhi[i][0] = 0; fhRecoMCPhi[i][1] = 0;
272  fhRecoMCEta[i][0] = 0; fhRecoMCEta[i][1] = 0;
273  fhRecoMCDeltaE[i][0] = 0; fhRecoMCDeltaE[i][1] = 0;
274  fhRecoMCRatioE[i][0] = 0; fhRecoMCRatioE[i][1] = 0;
275  fhRecoMCDeltaPhi[i][0] = 0; fhRecoMCDeltaPhi[i][1] = 0;
276  fhRecoMCDeltaEta[i][0] = 0; fhRecoMCDeltaEta[i][1] = 0;
277  }
278 
279  for(Int_t i = 0; i < 4; i++)
280  {
281  fhGenMCE[i] = 0;
282  fhGenMCPt[i] = 0;
283  fhGenMCEtaPhi[i] = 0;
284  fhGenMCAccE[i] = 0;
285  fhGenMCAccPt[i] = 0;
286  fhGenMCAccEtaPhi[i] = 0;
287  }
288 
289  for(Int_t i = 0; i < 14; i++)
290  {
291  fhEBinClusterEtaPhi[i] = 0 ;
292  fhEBinClusterColRow[i] = 0 ;
293  fhEBinCellColRow [i] = 0 ;
294  }
295 
296  for(Int_t bc = 0; bc < 4; bc++) fhTimePerSMPerBC[bc] = 0 ;
297 
298  // TCard correl studies
299  for(Int_t tm = 0; tm < 2; tm++)
300  {
301  fhEnergyTime1Cell [tm] = 0;
302  fhColRowExoticLowE1Cell [tm] = 0;
303  fhColRowExoticHighE1Cell[tm] = 0;
304 
305  fhEnergyTimeExotic [tm] = 0;
306  fhColRowExoticLowE [tm] = 0 ;
307  fhColRowExoticHighE[tm] = 0 ;
312 
315 
318 
323 
328 
331 
340 
350 
357 
367 
377 
378 
379  fhNCellsTCardCorrNoSelection [tm] = 0 ;
382  fhExoticTCardCorrNoSelection [tm] = 0 ;
385 
394 
395  for(Int_t i = 0; i < 6; i++)
396  {
397  for(Int_t j = 0; j < 6; j++)
398  {
399  fhLambda0TCardCorrelNCell[i][j][tm] = 0 ;
400  fhLambda1TCardCorrelNCell[i][j][tm] = 0 ;
401  fhLambda0NLM1TCardCorrelNCell[i][j][tm] = 0 ;
402  fhLambda1NLM1TCardCorrelNCell[i][j][tm] = 0 ;
403  fhLambda0NLM2TCardCorrelNCell[i][j][tm] = 0 ;
404  fhLambda1NLM2TCardCorrelNCell[i][j][tm] = 0 ;
405 // fhLambdaRTCardCorrelNCell[i][j][tm] = 0 ;
406  fhNLocMaxTCardCorrelNCell[i][j][tm] = 0 ;
407 
408  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm] = 0 ;
409  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm] = 0 ;
410  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm] = 0 ;
411  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm] = 0 ;
412  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm] = 0 ;
413  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm] = 0 ;
414  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm] = 0 ;
415  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm] = 0 ;
416  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm] = 0 ;
417 
418  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm] = 0 ;
419  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm] = 0 ;
420  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm] = 0 ;
421  fhLogECellNLM1TCardCorrelNCell[i][j][tm] = 0 ;
422  fhLogECellNLM2TCardCorrelNCell[i][j][tm] = 0 ;
423  fhLogECellNLM3TCardCorrelNCell[i][j][tm] = 0 ;
424  fhECellWeightNLM1TCardCorrelNCell [i][j][tm] = 0 ;
425  fhECellWeightNLM2TCardCorrelNCell [i][j][tm] = 0 ;
426  fhECellWeightNLM3TCardCorrelNCell [i][j][tm] = 0 ;
427 
428  fhMassEClusTCardCorrelNCell[i][j][tm] = 0 ;
429 // fhMassEPairTCardCorrelNCell[i][j][tm] = 0 ;
430  fhExoticTCardCorrelNCell [i][j][tm] = 0 ;
431  fhTimeDiffTCardCorrelNCell [i][j][tm] = 0 ;
432  fhTimeDiffExoTCardCorrelNCell[i][j][tm] = 0 ;
433  fhColRowTCardCorrelNCellLowE [i][j][tm] = 0 ;
434  fhColRowTCardCorrelNCellHighE[i][j][tm] = 0 ;
435  }
436 
437 // fhLambda0TCardCorrelN[i][tm] = 0 ;
438 // fhNCellsTCardCorrelN [i][tm] = 0 ;
439 // fhExoticTCardCorrelN [i][tm] = 0 ;
440 // fhColRowTCardCorrelNLowE [i][tm] = 0 ;
441 // fhColRowTCardCorrelNHighE[i][tm] = 0 ;
442 //
443 // fhLambda0TCardCorrelNAllSameTCard[i][tm] = 0 ;
444 // fhNCellsTCardCorrelNAllSameTCard [i][tm] = 0 ;
445 // fhExoticTCardCorrelNAllSameTCard [i][tm] = 0 ;
446 // fhColRowTCardCorrelNAllSameTCardLowE [i][tm] = 0 ;
447 // fhColRowTCardCorrelNAllSameTCardHighE[i][tm] = 0 ;
448 //
449 // fhLambda0TCardCorrelNExotic[i][tm] = 0 ;
450 // fhNCellsTCardCorrelNExotic [i][tm] = 0 ;
451 // fhColRowTCardCorrelNLowEExotic [i][tm] = 0 ;
452 // fhColRowTCardCorrelNHighEExotic[i][tm] = 0 ;
453 //
454 // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm] = 0 ;
455 // fhNCellsTCardCorrelNAllSameTCardExotic [i][tm] = 0 ;
456 // fhColRowTCardCorrelNAllSameTCardLowEExotic [i][tm] = 0 ;
457 // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm] = 0 ;
458 // fhLambda0TCardCorrelNearRow[i][tm] = 0 ;
459 // fhNCellsTCardCorrelNearRow [i][tm] = 0 ;
460  }
461 
462 // for(Int_t i = 0; i < 4; i++)
463 // {
464 // fhLambda0TCardCorrel2ndMax[i][tm] = 0 ;
465 // fhNCellsTCardCorrel2ndMax [i][tm] = 0 ;
466 // fhLambda0TCardCorrelExotic[i][tm] = 0 ;
467 // fhNCellsTCardCorrelExotic [i][tm] = 0 ;
468 // }
469 
470  for(Int_t i = 0; i < 14; i++)
471  {
472  fhLambda0Exoticity[i][tm] = 0;
473  fhLambda1Exoticity[i][tm] = 0;
474 // fhLambdaRExoticity[i][tm] = 0;
475  fhNCellsExoticity [i][tm] = 0;
476  fhTimeExoticity [i][tm] = 0;
477  fhLambda0Lambda1 [i][tm] = 0;
478 
479 // fhLambda0ExoticityAllSameTCard[i][tm] = 0;
480 // fhLambda1ExoticityAllSameTCard[i][tm] = 0;
481 // fhLambdaRExoticityAllSameTCard[i][tm] = 0;
482 // fhNCellsExoticityAllSameTCard [i][tm] = 0;
483 // fhLambda0Lambda1AllSameTCard [i][tm] = 0;
484 
485  fhNCellsTCardSameAndDiff [i][tm] = 0;
487  }
488 
489  for(Int_t j = 0; j < 6; j++)
490  {
491  for(Int_t k = 0; k < 6; k++)
492  {
493  fhLambda0ExoticityPerNCell[j][k][tm] = 0;
494  fhLambda1ExoticityPerNCell[j][k][tm] = 0;
495 // fhLambdaRExoticityPerNCell[j][k][tm] = 0;
496  }
497  }
498 
499 // for(Int_t i = 0; i < 7; i++)
500 // {
501 // fhLambda0TCardCorrel[i][tm] = 0 ;
502 // fhNCellsTCardCorrel [i][tm] = 0 ;
503 // fhExoticTCardCorrel [i][tm] = 0 ;
504 //
505 // fhLambda0TCardCorrelOtherTCard[i][tm] = 0 ;
506 // fhNCellsTCardCorrelOtherTCard [i][tm] = 0 ;
507 // fhExoticTCardCorrelOtherTCard [i][tm] = 0 ;
508 // fhColRowTCardCorrelOtherTCardLowE [i][tm] = 0 ;
509 // fhColRowTCardCorrelOtherTCardHighE[i][tm] = 0 ;
510 // }
511 
512  for(Int_t i = 0; i < 12; i++)
513  {
514  fhTCardCorrECellMaxDiff[i][tm]=0;
515  fhTCardCorrEClusterDiff[i][tm]=0;
516 // fhTCardCorrECellMaxRat [i][tm]=0;
517 // fhTCardCorrEClusterRat [i][tm]=0;
518  fhTCardCorrTCellMaxDiff[i][tm]=0;
519 
520  fhTCardCorrECellMaxDiffExo[i][tm]=0;
521  fhTCardCorrEClusterDiffExo[i][tm]=0;
522 // fhTCardCorrECellMaxRatExo [i][tm]=0;
523 // fhTCardCorrEClusterRatExo [i][tm]=0;
524  fhTCardCorrTCellMaxDiffExo[i][tm]=0;
525  }
526  }
527 
528  for(Int_t i = 0; i < fNEBinCuts; i++)
529  {
534 // fhTMPhiResidualExoticityAllSameTCard[i] = 0;
535 // fhTMEtaResidualExoticityAllSameTCard[i] = 0;
536  }
537 
538  InitParameters();
539 }
540 
541 //______________________________________________________________________________________________________________________
551 //______________________________________________________________________________________________________________________
552 void AliAnaCalorimeterQA::BadClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells,
553  Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac,
554  Double_t tmax)
555 {
556  // printf("AliAnaCalorimeterQA::BadClusterHistograms() - Event %d - Calorimeter %s \n \t E %f, n cells %d, max cell absId %d, maxCellFrac %f\n",
557  // GetReader()->GetEventNumber(), GetCalorimeterString().Data(),
558  // clus->E(),clus->GetNCells(),absIdMax,maxCellFraction);
559 
560  Double_t tof = clus->GetTOF()*1.e9;
561  if(tof > 400) tof-=fConstantTimeShift;
562 
563  Float_t energy = clus->E();
564 
565  fhBadClusterEnergy ->Fill(energy, GetEventWeight());
566  fhBadClusterTimeEnergy ->Fill(energy, tof , GetEventWeight());
567 
569  {
570  fhBadClusterMaxCellDiff ->Fill(energy, maxCellFraction, GetEventWeight());
571  fhBadClusterMaxCellECross->Fill(energy, eCrossFrac , GetEventWeight());
572  }
573 
574  Float_t phi = fClusterMomentum.Phi();
575  if(phi < 0) phi += TMath::TwoPi();
576 
577  if(energy > 0.5) fhBadClusterEtaPhi->Fill(fClusterMomentum.Eta(), phi, GetEventWeight());
578 
579  fhBadClusterLambda0->Fill(energy, clus->GetM02());
580  fhBadClusterLambda1->Fill(energy, clus->GetM20());
581 
582  if(fStudyClustersAsymmetry) ClusterAsymmetryHistograms(clus,absIdMax,kFALSE);
583 
585  {
586  // Clusters in event time difference bad minus good
587 
588  for(Int_t iclus2 = 0; iclus2 < caloClusters->GetEntriesFast(); iclus2++ )
589  {
590  AliVCluster* clus2 = (AliVCluster*) caloClusters->At(iclus2);
591 
592  if(clus->GetID() == clus2->GetID()) continue;
593 
594  Float_t maxCellFraction2 = 0.;
595  Int_t absIdMax2 = GetCaloUtils()->GetMaxEnergyCell(cells, clus2,maxCellFraction2);
596 
597  if(IsGoodCluster(absIdMax2, clus->GetM02(), clus->GetNCells(), cells) && clus2->GetM02() > 0.1 )
598  {
599  Double_t tof2 = clus2->GetTOF()*1.e9;
600  if(tof2>400) tof2-=fConstantTimeShift;
601 
602  fhBadClusterPairDiffTimeE ->Fill(clus->E(), (tof-tof2), GetEventWeight());
603  }
604  } // loop
605  }
606 
607 // // Max cell compared to other cells in cluster
608 // if(fFillAllCellTimeHisto && fFillClusterMaxCellHisto)
609 // {
610 // // Get some time averages
611 // Double_t timeAverages[2] = {0.,0.};
612 // CalculateAverageTime(clus, cells, timeAverages);
613 //
614 // fhBadClusterMaxCellDiffAverageTime ->Fill(clus->E(), tmax-timeAverages[0], GetEventWeight());
615 // fhBadClusterMaxCellDiffWeightedTime->Fill(clus->E(), tmax-timeAverages[1], GetEventWeight());
616 // }
617 
619  {
620  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
621  {
622  Int_t absId = clus->GetCellsAbsId()[ipos];
623  if(absId!=absIdMax && cells->GetCellAmplitude(absIdMax) > 0.01)
624  {
625  Float_t frac = cells->GetCellAmplitude(absId)/cells->GetCellAmplitude(absIdMax);
626 
627  fhBadClusterMaxCellCloseCellRatio->Fill(clus->E(), frac, GetEventWeight());
628  fhBadClusterMaxCellCloseCellDiff ->Fill(clus->E(), cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId), GetEventWeight());
629 
631  {
632  Double_t time = cells->GetCellTime(absId);
633  GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
634 
635  Float_t diff = (tmax-(time*1e9-fConstantTimeShift));
636  fhBadCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff, GetEventWeight());
637 
638  }
639  } // Not max
640  } // loop
641  }
642 }
643 
644 //______________________________________________________________________
649 //______________________________________________________________________
651  AliVCaloCells* cells,
652  Double_t timeAverages[2])
653 {
654  // First recalculate energy in case non linearity was applied
655  Float_t energy = 0;
656  Float_t ampMax = 0, amp = 0;
657 //Int_t absIdMax = -1;
658 
659  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
660  {
661  Int_t id = clus->GetCellsAbsId()[ipos];
662 
663  // Recalibrate cell energy if needed
664  amp = cells->GetCellAmplitude(id);
666 
667  energy += amp;
668 
669  if(amp> ampMax)
670  {
671  ampMax = amp;
672 // absIdMax = id;
673  }
674  } // energy loop
675 
676  // Calculate average time of cells in cluster and weighted average
677  Double_t aTime = 0;
678  Double_t wTime = 0;
679  Float_t wTot = 0;
680  Double_t time = 0;
681  Int_t id =-1;
682  Double_t w = 0;
683  Int_t ncells = clus->GetNCells();
684 
685  for (Int_t ipos = 0; ipos < ncells; ipos++)
686  {
687  id = clus ->GetCellsAbsId()[ipos];
688  amp = cells->GetCellAmplitude(id);
689  time = cells->GetCellTime(id);
690 
691  // Recalibrate energy and time
693  GetCaloUtils()->RecalibrateCellTime (time, GetCalorimeter(), id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
694 
695  w = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(cells->GetCellAmplitude(id),energy);
696  aTime += time*1e9;
697  wTime += time*1e9 * w;
698  wTot += w;
699  }
700 
701  if(ncells > 0) aTime /= ncells;
702  else aTime = 0;
703 
704  if(wTot > 0) wTime /= wTot;
705  else wTime = 0;
706 
707  timeAverages[0] = aTime;
708  timeAverages[1] = wTime;
709 }
710 
711 //____________________________________________________________
713 //____________________________________________________________
714 void AliAnaCalorimeterQA::CellHistograms(AliVCaloCells *cells)
715 {
716  if(!fFillAllCellHistograms) return;
717 
718  Int_t ncells = cells->GetNumberOfCells();
719  if( ncells > 0 ) fhNCells->Fill(ncells, GetEventWeight()) ; // Not ok for PHOS with CPV
720 
721  Int_t ncellsCut = 0;
722  Float_t ecellsCut = 0;
723 
724  AliDebug(1,Form("%s cell entries %d", GetCalorimeterString().Data(), ncells));
725 
726  // Init arrays and used variables
727  Int_t *nCellsInModule = new Int_t [fNModules];
728  Float_t *eCellsInModule = new Float_t[fNModules];
729 
730  for(Int_t imod = 0; imod < fNModules; imod++ )
731  {
732  nCellsInModule[imod] = 0 ;
733  eCellsInModule[imod] = 0.;
734  }
735 
736  Int_t icol = -1, icolAbs = -1;
737  Int_t irow = -1, irowAbs = -1;
738  Int_t iRCU = -1;
739  Float_t amp = 0.;
740  Double_t time = 0.;
741  Double_t timeL1UnCorr= 0.;
742  Int_t id = -1;
743  Bool_t highG = kFALSE;
744  Float_t recalF = 1.;
745  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
746 
747  for (Int_t iCell = 0; iCell < cells->GetNumberOfCells(); iCell++)
748  {
749  if ( cells->GetCellNumber(iCell) < 0 ) continue; // CPV
750 
751  AliDebug(2,Form("Cell : amp %f, absId %d", cells->GetAmplitude(iCell), cells->GetCellNumber(iCell)));
752 
753  Int_t nModule = GetModuleNumberCellIndexesAbsCaloMap(cells->GetCellNumber(iCell),GetCalorimeter(),
754  icol , irow, iRCU,
755  icolAbs, irowAbs );
756 
757  if ( nModule < fFirstModule || nModule > fLastModule )
758  {
759  AliDebug(1,Form("Cell module out of range %d",nModule));
760  continue ;
761  }
762 
763  AliDebug(2,Form("\t module %d, column %d (%d), row %d (%d)", nModule,icolAbs,icol,irowAbs,irow));
764 
765  // Check if the cell is a bad channel
766  if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn())
767  {
768  if(GetCalorimeter()==kEMCAL)
769  {
770  if(GetCaloUtils()->GetEMCALChannelStatus(nModule,icol,irow)) continue;
771  }
772  else
773  {
774  if(GetCaloUtils()->GetPHOSChannelStatus(nModule,icol,irow) ) continue;
775  }
776  } // use bad channel map
777 
778  amp = cells->GetAmplitude(iCell)*recalF;
779  time = cells->GetTime(iCell);
780  id = cells->GetCellNumber(iCell);
781  highG = cells->GetCellHighGain(id);
782  if(IsDataMC()) highG = kTRUE; // MC does not distinguish High and Low, put them all in high
783 
784  // Amplitude recalibration if set
786 
787  // Time recalibration if set
788  GetCaloUtils()->RecalibrateCellTime (time, GetCalorimeter(), id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
789  timeL1UnCorr=time;
790  // Correction of L1 phase if set
791  GetCaloUtils()->RecalibrateCellTimeL1Phase(time,0 , nModule, GetReader()->GetInputEvent()->GetBunchCrossNumber());
792  // Transform time to ns
793  time *= 1.0e9;
794  time-=fConstantTimeShift;
795  timeL1UnCorr *= 1.0e9;
796  timeL1UnCorr-=fConstantTimeShift;
797 
798  if(time < fTimeCutMin || time > fTimeCutMax)
799  {
800  AliDebug(1,Form("Remove cell with Time %f",time));
801  continue;
802  }
803 
804  // Remove exotic cells, defined only for EMCAL
805  if(GetCalorimeter()==kEMCAL &&
806  GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(id, cells, bc)) continue;
807 
808  Double_t binWidthCorrection=1;
809  if(amp>=10)binWidthCorrection=1.0/4;
810  if(amp>=20)binWidthCorrection=1.0/10;
811  fhAmplitude ->Fill(amp, GetEventWeight());
812  fhAmpMod ->Fill(amp, nModule, GetEventWeight());
813  fhAmpWeirdMod->Fill(amp, nModule, GetEventWeight());
814 
816  {
817  fhAmpId->Fill(amp, id , GetEventWeight()*binWidthCorrection);
818 
819  if(!highG) fhAmpIdLowGain->Fill(amp, id, GetEventWeight());
820  }
821 
823  {
824  for(Int_t ie = 0; ie < fNEBinCuts; ie++)
825  {
826  if( amp >= fEBinCuts[ie] && amp < fEBinCuts[ie+1] )
827  {
828  fhEBinCellColRow[ie]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
829  }
830  }
831  }
832 
833  // E cross for exotic cells
834  if(amp > 0.05)
835  {
836  fhCellECross->Fill(amp, 1-GetECross(id,cells)/amp, GetEventWeight());
837  ecellsCut+=amp ;
838  if(fStudyWeight) eCellsInModule[nModule]+=amp ;
839  }
840 
841  if ( amp > fCellAmpMin )
842  {
843  ncellsCut++ ;
844  nCellsInModule[nModule]++ ;
845 
846  if(!fStudyWeight) eCellsInModule[nModule]+=amp ;
847 
848  fhGridCells ->Fill(icolAbs, irowAbs, GetEventWeight());
849  fhGridCellsE->Fill(icolAbs, irowAbs, amp );
850 
851  if(!highG)
852  {
853  fhGridCellsLowGain ->Fill(icolAbs, irowAbs, GetEventWeight());
854  fhGridCellsELowGain->Fill(icolAbs, irowAbs, amp );
855  }
856 
858  {
859  //printf("%s: time %g\n",GetCalorimeterString().Data(), time);
860 
861  // Double_t v[3] = {0,0,0}; //vertex ;
862  // GetReader()->GetVertex(v);
863  // if(amp > 0.5) fhTimeVz ->Fill(TMath::Abs(v[2]), time, GetEventWeight());
864 
865  fhTime ->Fill(time, GetEventWeight());
866  fhTimeAmp ->Fill(amp , time, GetEventWeight());
867 
869  {
870  fhTimeId ->Fill(time, id , GetEventWeight());
871 
872  if(GetCaloUtils()->IsL1PhaseInTimeRecalibrationOn()==1)
873  fhTimeL1UnCorrId ->Fill(timeL1UnCorr, id , GetEventWeight());
874  }
875 
876  Int_t bc = (GetReader()->GetInputEvent()->GetBunchCrossNumber())%4;
877  fhTimePerSMPerBC[bc]->Fill(time, nModule, GetEventWeight());
878 
879  fhGridCellsTime->Fill(icolAbs, irowAbs, time);
880  if(!highG) fhGridCellsTimeLowGain->Fill(icolAbs, irowAbs, time);
881 
882  fhTimeMod->Fill(time, nModule, GetEventWeight());
883 
885  fhTimeAmpPerRCU[nModule*fNRCU+iRCU]->Fill(amp, time, GetEventWeight());
886 
887  if(!highG)
888  {
890  fhTimeIdLowGain ->Fill(time, id , GetEventWeight());
891  fhTimeAmpLowGain->Fill(amp , time, GetEventWeight());
892  }
893  }
894  }
895 
896  // Get Eta-Phi position of Cell
897  if(fFillAllPosHisto)
898  {
899  if ( GetCalorimeter() == kEMCAL && GetCaloUtils()->IsEMCALGeoMatrixSet() )
900  {
901  Float_t celleta = 0.;
902  Float_t cellphi = 0.;
903  GetEMCALGeometry()->EtaPhiFromIndex(id, celleta, cellphi);
904 
905  if ( cellphi < 0 ) cellphi+=TMath::TwoPi();
906 
907  if(fFillAllTH3)
908  fhEtaPhiAmpCell->Fill(celleta, cellphi, amp, GetEventWeight());
909  else
910  fhEtaPhiCell ->Fill(celleta, cellphi, GetEventWeight());
911 
912  Double_t cellpos[] = {0, 0, 0};
913  GetEMCALGeometry()->GetGlobal(id, cellpos);
914 
915  fhXCellE->Fill(cellpos[0], amp, GetEventWeight()) ;
916  fhYCellE->Fill(cellpos[1], amp, GetEventWeight()) ;
917  fhZCellE->Fill(cellpos[2], amp, GetEventWeight()) ;
918 
919  Float_t rcell = TMath::Sqrt(cellpos[0]*cellpos[0]+cellpos[1]*cellpos[1]);//+cellpos[2]*cellpos[2]);
920  fhRCellE ->Fill(rcell, amp, GetEventWeight()) ;
921 
922  fhXYZCell->Fill(cellpos[0], cellpos[1], cellpos[2], GetEventWeight()) ;
923  } // EMCAL Cells
924  else if ( GetCalorimeter() == kPHOS && GetCaloUtils()->IsPHOSGeoMatrixSet() )
925  {
926  TVector3 xyz;
927  Int_t relId[4], module;
928  Float_t xCell, zCell;
929 
930  GetPHOSGeometry()->AbsToRelNumbering(id,relId);
931  module = relId[0];
932  GetPHOSGeometry()->RelPosInModule(relId,xCell,zCell);
933  GetPHOSGeometry()->Local2Global(module,xCell,zCell,xyz);
934 
935  Float_t rcell = TMath::Sqrt(xyz.X()*xyz.X()+xyz.Y()*xyz.Y());
936 
937  fhXCellE ->Fill(xyz.X(), amp, GetEventWeight()) ;
938  fhYCellE ->Fill(xyz.Y(), amp, GetEventWeight()) ;
939  fhZCellE ->Fill(xyz.Z(), amp, GetEventWeight()) ;
940  fhRCellE ->Fill(rcell , amp, GetEventWeight()) ;
941 
942  fhXYZCell->Fill(xyz.X(), xyz.Y(), xyz.Z(), GetEventWeight()) ;
943  } // PHOS cells
944  } // Fill cell position histograms
945 
946 
947  } // Cell loop
948 
949  // Fill the cells after the cut on min amplitude and bad/exotic channels
950  if( ncellsCut > 0 ) fhNCellsCutAmpMin->Fill(ncellsCut, GetEventWeight()) ;
951 
952  // Number of cells per module
953  for(Int_t imod = 0; imod < fNModules; imod++ )
954  {
955  if ( imod < fFirstModule || imod > fLastModule ) continue ;
956 
957  AliDebug(1,Form("Module %d, calo %s, N cells %d, sum Amp %f", imod, GetCalorimeterString().Data(), nCellsInModule[imod], eCellsInModule[imod]));
958 
959  fhNCellsMod ->Fill(nCellsInModule[imod], imod, GetEventWeight()) ;
960  fhSumCellsAmpMod->Fill(eCellsInModule[imod], imod, GetEventWeight()) ;
961 
963  fhNCellsSumAmpPerMod[imod]->Fill(eCellsInModule[imod], nCellsInModule[imod], GetEventWeight());
964  }
965 
966  // Check energy distribution in calorimeter for selected cells
967  if(fStudyWeight)
968  {
969  for (Int_t iCell = 0; iCell < cells->GetNumberOfCells(); iCell++)
970  {
971  if ( cells->GetCellNumber(iCell) < 0 ) continue; // CPV
972 
973  AliDebug(2,Form("Cell : amp %f, absId %d", cells->GetAmplitude(iCell), cells->GetCellNumber(iCell)));
974 
975  Int_t nModule = GetModuleNumberCellIndexes(cells->GetCellNumber(iCell),GetCalorimeter(), icol, irow, iRCU);
976 
977  AliDebug(2,Form("\t module %d, column %d, row %d", nModule,icol,irow));
978 
979  if(nModule < fNModules)
980  {
981  //Check if the cell is a bad channel
982  if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn())
983  {
984  if(GetCalorimeter()==kEMCAL)
985  {
986  if(GetCaloUtils()->GetEMCALChannelStatus(nModule, icol, irow)) continue;
987  }
988  else
989  {
990  if(GetCaloUtils()->GetPHOSChannelStatus (nModule, icol, irow) ) continue;
991  }
992  } // use bad channel map
993 
994  amp = cells->GetAmplitude(iCell)*recalF;
995  time = cells->GetTime(iCell);
996  id = cells->GetCellNumber(iCell);
997 
998  // Amplitude recalibration if set
1000 
1001  // Time recalibration if set
1003  GetReader()->GetInputEvent()->GetBunchCrossNumber());
1004 
1005  // Transform time to ns
1006  time *= 1.0e9;
1007  time -= fConstantTimeShift;
1008 
1009  if(time < fTimeCutMin || time > fTimeCutMax)
1010  {
1011  AliDebug(1,Form("Remove cell with Time %f",time));
1012  continue;
1013  }
1014 
1015  // Remove exotic cells, defined only for EMCAL
1016  if(GetCalorimeter()==kEMCAL &&
1017  GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(id, cells, bc)) continue;
1018 
1019  // E cross for exotic cells
1020  if(amp > 0.05)
1021  {
1022  if(ecellsCut > 0)
1023  {
1024  Float_t ratio = amp/ecellsCut;
1025  fhECellTotalRatio ->Fill(ecellsCut, ratio , GetEventWeight());
1026  fhECellTotalLogRatio ->Fill(ecellsCut,TMath::Log(ratio), GetEventWeight());
1027  }
1028 
1029  if(eCellsInModule[nModule] > 0)
1030  {
1031  Float_t ratioMod = amp/eCellsInModule[nModule];
1032  fhECellTotalRatioMod [nModule]->Fill(eCellsInModule[nModule], ratioMod , GetEventWeight());
1033  fhECellTotalLogRatioMod[nModule]->Fill(eCellsInModule[nModule],TMath::Log(ratioMod), GetEventWeight());
1034  }
1035  } // amp > 0.5
1036  } // nMod > 0 < Max
1037  } // cell loop
1038  } // weight studies
1039 
1040  delete [] nCellsInModule;
1041  delete [] eCellsInModule;
1042 }
1043 
1044 //__________________________________________________________________________
1046 //__________________________________________________________________________
1048 {
1049  Int_t nCaloCellsPerCluster = clus->GetNCells();
1050 
1051  UShort_t * indexList = clus->GetCellsAbsId();
1052 
1053  Float_t pos[3];
1054  clus->GetPosition(pos);
1055 
1056  Float_t clEnergy = clus->E();
1057 
1058  // Loop on cluster cells
1059  for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++)
1060  {
1061  // printf("Index %d\n",ipos);
1062  Int_t absId = indexList[ipos];
1063 
1064  //Get position of cell compare to cluster
1065 
1066  if ( GetCalorimeter() == kEMCAL && GetCaloUtils()->IsEMCALGeoMatrixSet() )
1067  {
1068  Double_t cellpos[] = {0, 0, 0};
1069  GetEMCALGeometry()->GetGlobal(absId, cellpos);
1070 
1071  fhDeltaCellClusterXNCells->Fill(pos[0]-cellpos[0], nCaloCellsPerCluster, GetEventWeight()) ;
1072  fhDeltaCellClusterYNCells->Fill(pos[1]-cellpos[1], nCaloCellsPerCluster, GetEventWeight()) ;
1073  fhDeltaCellClusterZNCells->Fill(pos[2]-cellpos[2], nCaloCellsPerCluster, GetEventWeight()) ;
1074 
1075  fhDeltaCellClusterXE->Fill(pos[0]-cellpos[0], clEnergy, GetEventWeight()) ;
1076  fhDeltaCellClusterYE->Fill(pos[1]-cellpos[1], clEnergy, GetEventWeight()) ;
1077  fhDeltaCellClusterZE->Fill(pos[2]-cellpos[2], clEnergy, GetEventWeight()) ;
1078 
1079  Float_t r = TMath::Sqrt(pos[0] *pos[0] + pos[1] * pos[1] );
1080  Float_t rcell = TMath::Sqrt(cellpos[0]*cellpos[0] + cellpos[1]* cellpos[1]);
1081 
1082  fhDeltaCellClusterRNCells->Fill(r-rcell, nCaloCellsPerCluster, GetEventWeight()) ;
1083  fhDeltaCellClusterRE ->Fill(r-rcell, clEnergy , GetEventWeight()) ;
1084  } // EMCAL and its matrices are available
1085  else if ( GetCalorimeter() == kPHOS && GetCaloUtils()->IsPHOSGeoMatrixSet() )
1086  {
1087  TVector3 xyz;
1088  Int_t relId[4], module;
1089  Float_t xCell, zCell;
1090 
1091  GetPHOSGeometry()->AbsToRelNumbering(absId,relId);
1092  module = relId[0];
1093  GetPHOSGeometry()->RelPosInModule(relId,xCell,zCell);
1094  GetPHOSGeometry()->Local2Global(module,xCell,zCell,xyz);
1095 
1096  fhDeltaCellClusterXNCells->Fill(pos[0]-xyz.X(), nCaloCellsPerCluster, GetEventWeight()) ;
1097  fhDeltaCellClusterYNCells->Fill(pos[1]-xyz.Y(), nCaloCellsPerCluster, GetEventWeight()) ;
1098  fhDeltaCellClusterZNCells->Fill(pos[2]-xyz.Z(), nCaloCellsPerCluster, GetEventWeight()) ;
1099 
1100  fhDeltaCellClusterXE->Fill(pos[0]-xyz.X(), clEnergy, GetEventWeight()) ;
1101  fhDeltaCellClusterYE->Fill(pos[1]-xyz.Y(), clEnergy, GetEventWeight()) ;
1102  fhDeltaCellClusterZE->Fill(pos[2]-xyz.Z(), clEnergy, GetEventWeight()) ;
1103 
1104  Float_t r = TMath::Sqrt(pos[0] * pos[0] + pos[1] * pos[1] );
1105  Float_t rcell = TMath::Sqrt(xyz.X() * xyz.X() + xyz.Y() * xyz.Y());
1106 
1107  fhDeltaCellClusterRNCells->Fill(r-rcell, nCaloCellsPerCluster, GetEventWeight()) ;
1108  fhDeltaCellClusterRE ->Fill(r-rcell, clEnergy , GetEventWeight()) ;
1109  } // PHOS and its matrices are available
1110  } // cluster cell loop
1111 }
1112 
1113 //___________________________________________________
1123 //___________________________________________________
1124 void AliAnaCalorimeterQA::ChannelCorrelationInTCard(AliVCluster* clus, AliVCaloCells* cells,
1125  Bool_t matched, Int_t absIdMax, Float_t exoticity)
1126 {
1127  // Get the col and row of the leading cluster cell
1128 
1129  Int_t icol = -1, irow = -1, iRCU = -1, icolAbs = -1, irowAbs = -1;
1130  GetModuleNumberCellIndexesAbsCaloMap(absIdMax,GetCalorimeter(), icol, irow, iRCU, icolAbs, irowAbs);
1131 
1132  Float_t energy = clus->E();
1133  Int_t ebin = -1;
1134  for(Int_t ie = 0; ie < fNEBinCuts; ie++)
1135  {
1136  if( energy >= fEBinCuts[ie] && energy < fEBinCuts[ie+1] ) ebin = ie;
1137  }
1138 
1139  Int_t ncells = clus->GetNCells();
1140  Double_t time = clus->GetTOF()*1.e9;
1141  time-=fConstantTimeShift;
1142  Float_t deta = clus->GetTrackDz();
1143  Float_t dphi = clus->GetTrackDx();
1144 
1145  //if(clus->GetNCells()==1 && clus->E() > 4)printf("TCard E %f, NCells %d\n",energy,clus->GetNCells());
1146 
1147  if(fStudyExotic)
1148  {
1149  if ( ncells == 1 )
1150  {
1151  if(energy >= 5 && energy < 8)
1152  fhColRowExoticLowE1Cell [matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
1153  else if(energy >= 8)
1154  {
1155  fhColRowExoticHighE1Cell[matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
1156 
1157  if ( time > 5) fhColRowExoticHighE1CellPosTime->Fill(icolAbs,irowAbs,GetEventWeight());
1158  else if( time < -5) fhColRowExoticHighE1CellNegTime->Fill(icolAbs,irowAbs,GetEventWeight());
1159  else fhColRowExoticHighE1CellNulTime->Fill(icolAbs,irowAbs,GetEventWeight());
1160  }
1161 
1162  fhEnergyTime1Cell[matched]->Fill(energy,time,GetEventWeight());
1163  fhEnergyTMEtaResidual1Cell->Fill(energy,deta,GetEventWeight());
1164  fhEnergyTMPhiResidual1Cell->Fill(energy,dphi,GetEventWeight());
1165  }
1166  else if(exoticity > 0.97)
1167  {
1168  if(energy >= 5 && energy < 8)
1169  fhColRowExoticLowE [matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
1170  else if(energy >= 8)
1171  {
1172  fhColRowExoticHighE[matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
1173 
1174  if ( time > 5) fhColRowExoticHighEPosTime->Fill(icolAbs,irowAbs,GetEventWeight());
1175  else if( time < -5) fhColRowExoticHighENegTime->Fill(icolAbs,irowAbs,GetEventWeight());
1176  else fhColRowExoticHighENulTime->Fill(icolAbs,irowAbs,GetEventWeight());
1177  }
1178 
1179  fhEnergyTimeExotic[matched]->Fill(energy,time,GetEventWeight());
1180  fhEnergyTMEtaResidualExotic->Fill(energy,deta,GetEventWeight());
1181  fhEnergyTMPhiResidualExotic->Fill(energy,dphi,GetEventWeight());
1182 
1183  for (Int_t ipos = 0; ipos < ncells; ipos++)
1184  {
1185  Int_t absId = clus->GetCellsAbsId()[ipos];
1186 
1187  Float_t eCell = cells->GetCellAmplitude(absId);
1189 
1190  // consider cells with enough energy weight and not the reference one
1191  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
1192 
1193  if( absId == absIdMax || weight < 0.01 ) continue;
1194 
1195  Int_t rowDiff = -100, colDiff = -100;
1196  Bool_t sameTCard = GetCaloUtils()->IsAbsIDsFromTCard(absIdMax,absId,rowDiff,colDiff);
1197 
1198  // Get the col and row of the secondary cluster cell
1199  Int_t icol2 = -1, irow2 = -1, iRCU2 = -1, icolAbs2 = -1, irowAbs2 = -1;
1200  GetModuleNumberCellIndexesAbsCaloMap(absId,GetCalorimeter(), icol2, irow2, iRCU2, icolAbs2, irowAbs2);
1201 
1202  if ( !sameTCard )
1203  {
1204  if(energy >= 5 && energy < 8)
1205  fhColRowExotic2ndCellDiffLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1206  else if(energy >= 8)
1207  fhColRowExotic2ndCellDiffHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1208  }
1209  else
1210  {
1211  if(energy >= 5 && energy < 8)
1212  fhColRowExotic2ndCellSameLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1213  else if(energy >= 8)
1214  fhColRowExotic2ndCellSameHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1215  }
1216  }
1217 
1218  }
1219  else if ( energy > 8 )
1220  {
1221  if ( time > 5) fhColRowHighEPosTime->Fill(icolAbs,irowAbs,GetEventWeight());
1222  else if( time < -5) fhColRowHighENegTime->Fill(icolAbs,irowAbs,GetEventWeight());
1223  else fhColRowHighENulTime->Fill(icolAbs,irowAbs,GetEventWeight());
1224  }
1225 
1226  if(ebin > -1)
1227  {
1228  fhTMPhiResidualExoticityLooseCut[ebin]->Fill(exoticity,dphi);
1229  fhTMEtaResidualExoticityLooseCut[ebin]->Fill(exoticity,deta);
1230  }
1231  }
1232  else if ( energy > 8 && ncells > 1 && exoticity < 0.97)
1233  {
1234  if ( time > 5) fhColRowHighEPosTime->Fill(icolAbs,irowAbs,GetEventWeight());
1235  else if( time < -5) fhColRowHighENegTime->Fill(icolAbs,irowAbs,GetEventWeight());
1236  else fhColRowHighENulTime->Fill(icolAbs,irowAbs,GetEventWeight());
1237  }
1238 
1239  // Clean the sample
1240 
1241  // away from dead region
1242  if ( clus->GetDistanceToBadChannel() < 5 ) return ;
1243 
1244  // in center of SM
1245  Int_t etaRegion = -1, phiRegion = -1;
1246  GetCaloUtils()->GetEMCALSubregion(clus,cells,etaRegion,phiRegion);
1247  // Region 0: center of SM ~0.18<|eta|<0.55
1248  if ( etaRegion !=0 ) return ;
1249 
1250  if(fStudyExotic)
1251  {
1252  if ( ncells == 1 )
1253  {
1254  fhEnergyTimeTCardCorrNoSelection1Cell[matched]->Fill(energy,time,GetEventWeight());
1257  }
1258  else if(exoticity > 0.97)
1259  {
1260  fhEnergyTimeTCardCorrNoSelectionExotic[matched]->Fill(energy,time,GetEventWeight());
1263  }
1264  }
1265 
1266  Float_t m02 = clus->GetM02();
1267  Float_t m20 = clus->GetM20();
1268  Float_t lamR = 0;
1269  if ( m02 > 0.001 ) lamR = m20/m02;
1270 
1271  Int_t absIdList[ncells];
1272  Float_t maxEList [ncells];
1273  Int_t nlm = GetCaloUtils()->GetNumberOfLocalMaxima(clus, cells, absIdList, maxEList) ;
1274 //Int_t nlm = GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells);
1275 
1276  //
1277  // Correlation to max
1278  //
1279  Int_t nCellWithWeight = 1;
1280  Bool_t nearRow = kFALSE;
1281  Bool_t nearCol = kFALSE;
1282  Int_t nCorr = 0;
1283  Int_t nCorrNo = 0;
1284  Int_t sameCol = 0;
1285  Int_t other = 0;
1286  Int_t sameRow = 0;
1287  Float_t eCellMax = cells->GetCellAmplitude(absIdMax);
1288  Double_t tCellMax = cells->GetCellTime(absIdMax);
1289  //printf("Org E %2.2f, t %2.2f\n",eCellMax,tCellMax*1e9);
1290  GetCaloUtils()->RecalibrateCellAmplitude(eCellMax, GetCalorimeter(), absIdMax);
1291  GetCaloUtils()->RecalibrateCellTime(tCellMax, GetCalorimeter(), absIdMax, GetReader()->GetInputEvent()->GetBunchCrossNumber());
1292  //printf("New E %2.2f, t %2.2f\n",eCellMax,tCellMax*1e9);
1293 
1294  tCellMax *= 1.0e9;
1295  tCellMax-=fConstantTimeShift;
1296 
1297  // correlation not max cells
1298 // Int_t nCorr2 = 0;
1299 // Int_t sameCol2 = 0;
1300 // Int_t other2 = 0;
1301 // Int_t sameRow2 = 0;
1302 
1303  // Get second highest energy cell
1304 // Int_t absId2ndMax = -1;
1305  Float_t emax2nd = 0;
1306  Bool_t sameTCard2ndMax = kFALSE;
1307 //Int_t rowDiff2 = -100;
1308 //Int_t colDiff2 = -100;
1309 
1310  Float_t eCellSameRowSameTCardNearCol = 0.;
1311  Float_t eCellSameRowDiffTCardNearCol = 0.;
1312  Double_t tCellSameRowSameTCardNearCol = 0.;
1313  Double_t tCellSameRowDiffTCardNearCol = 0.;
1314 
1315  //printf("Cluster E %2.2f, ncells %d, absIdMax %d, eCell Max %2.2f\n", energy, ncells, absIdMax, cells->GetCellAmplitude(absIdMax));
1316 
1317  //
1318  // Loop on the cluster cells, define correlations
1319  //
1320  for (Int_t ipos = 0; ipos < ncells; ipos++)
1321  {
1322  Int_t absId = clus->GetCellsAbsId()[ipos];
1323 
1324  Float_t eCell = cells->GetCellAmplitude(absId);
1325  Double_t tCell = cells->GetCellTime(absId);
1326 
1328  GetCaloUtils()->RecalibrateCellTime(tCell, GetCalorimeter(), absId, GetReader()->GetInputEvent()->GetBunchCrossNumber());
1329  tCell *= 1.0e9;
1330  tCell-=fConstantTimeShift;
1331 
1332  // consider cells with enough energy weight and not the reference one
1333  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
1334 
1335  if( absId == absIdMax || weight < 0.01 ) continue;
1336 
1337  if (nlm==1)
1338  {
1339  fhECellClusRatNLM1TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
1340  fhLogECellNLM1TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1341  fhECellWeightNLM1TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
1342  }
1343  else if(nlm==2)
1344  {
1345  fhECellClusRatNLM2TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
1346  fhLogECellNLM2TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1347  fhECellWeightNLM2TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
1348  }
1349  else
1350  {
1351  fhECellClusRatNLM3TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
1352  fhLogECellNLM3TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1353  fhECellWeightNLM3TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
1354  }
1355 
1356  Int_t rowDiff = -100, colDiff = -100;
1357  Bool_t sameTCard = GetCaloUtils()->IsAbsIDsFromTCard(absIdMax,absId,rowDiff,colDiff);
1358 
1359  if(sameTCard)
1360  {
1361  if (nlm==1)
1362  {
1363  fhECellSameClusRatNLM1TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
1364  fhLogECellSameNLM1TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1365  fhECellSameWeightNLM1TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
1366  }
1367  else if(nlm==2)
1368  {
1369  fhECellSameClusRatNLM2TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
1370  fhLogECellSameNLM2TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1371  fhECellSameWeightNLM2TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
1372  }
1373  else
1374  {
1375  fhECellSameClusRatNLM3TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
1376  fhLogECellSameNLM3TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1377  fhECellSameWeightNLM3TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
1378  }
1379  }
1380 
1381  //if(eCellMax < eCell) printf("Check: E max %f (id %d), E sec %f (id %d)\n",eCellMax,absIdMax, eCell,absId);
1382 
1383  nCellWithWeight++;
1384 
1385  //printf("\t cell %d, absId %d, E %2.2f, w %2.2f, tcard %d\n", ipos, absId, eCell, weight, sameTCard);
1386 
1387  Int_t indexType = -1;
1388  if ( sameTCard )
1389  {
1390  nCorr++;
1391 
1392  if(TMath::Abs(rowDiff) == 1) nearRow = kTRUE;
1393  if(TMath::Abs(colDiff) == 1) nearCol = kTRUE;
1394 
1395  if ( rowDiff == 0 && colDiff != 0 )
1396  {
1397  if ( nearCol ) indexType = 6;
1398  else indexType = 7;
1399 
1400  sameRow++;
1401  /*printf("\t \t E %2.2f, Same row, diff row %d, col %d\n",eCell,rowDiff,colDiff);*/
1402  }
1403  else if ( rowDiff != 0 && colDiff == 0 )
1404  {
1405  if ( nearRow ) indexType = 8;
1406  else indexType = 9;
1407 
1408  sameCol++;
1409  /*printf("\t \t E %2.2f, Same col, diff row %d, col %d\n",eCell,rowDiff,colDiff);*/
1410  }
1411  else
1412  {
1413  if ( nearRow && nearCol) indexType = 10;
1414  else indexType = 11;
1415 
1416  other++;
1417  /*printf("\t \t E %2.2f, Diff row/col, diff row %d, col %d\n",eCell,rowDiff,colDiff);*/
1418  }
1419  }
1420  else
1421  {
1422  nCorrNo++;
1423 
1424  if ( rowDiff == 0 && colDiff != 0 )
1425  {
1426  if ( nearCol ) indexType = 0;
1427  else indexType = 1;
1428 
1429  }
1430  else if ( rowDiff != 0 && colDiff == 0 )
1431  {
1432  if ( nearRow ) indexType = 2;
1433  else indexType = 3;
1434  }
1435  else
1436  {
1437  if ( nearCol && nearRow ) indexType = 4;
1438  else indexType = 5;
1439  }
1440  }
1441 
1442  if ( rowDiff == 0 && TMath::Abs(colDiff) == 1 )
1443  {
1444  if(sameTCard)
1445  {
1446  eCellSameRowSameTCardNearCol = eCell;
1447  tCellSameRowSameTCardNearCol = tCell;
1448  }
1449  else
1450  {
1451  eCellSameRowDiffTCardNearCol = eCell;
1452  tCellSameRowDiffTCardNearCol = tCell;
1453  }
1454  }
1455 
1456  if( indexType >=0 )
1457  {
1458  Float_t eCellDiff = eCellMax - eCell;
1459  Float_t eClusDiff = energy - eCell;
1460 // Float_t eCellRat = eCell / eCellMax;
1461 // Float_t eClusRat = eCell / energy ;
1462  Float_t tCellDiff = tCellMax - tCell;
1463 
1464  fhTCardCorrECellMaxDiff[indexType][matched]->Fill(energy, eCellDiff, GetEventWeight());
1465  fhTCardCorrEClusterDiff[indexType][matched]->Fill(energy, eClusDiff, GetEventWeight());
1466 // fhTCardCorrECellMaxRat [indexType][matched]->Fill(energy, eCellRat , GetEventWeight());
1467 // fhTCardCorrEClusterRat [indexType][matched]->Fill(energy, eClusRat , GetEventWeight());
1468  fhTCardCorrTCellMaxDiff[indexType][matched]->Fill(energy, tCellDiff, GetEventWeight());
1469 
1470  if ( fStudyExotic && exoticity > 0.97 )
1471  {
1472  fhTCardCorrECellMaxDiffExo[indexType][matched]->Fill(energy, eCellDiff, GetEventWeight());
1473  fhTCardCorrEClusterDiffExo[indexType][matched]->Fill(energy, eClusDiff, GetEventWeight());
1474 // fhTCardCorrECellMaxRatExo [indexType][matched]->Fill(energy, eCellRat , GetEventWeight());
1475 // fhTCardCorrEClusterRatExo [indexType][matched]->Fill(energy, eClusRat , GetEventWeight());
1476  fhTCardCorrTCellMaxDiffExo[indexType][matched]->Fill(energy, tCellDiff, GetEventWeight());
1477  }
1478  }
1479 
1480  if ( fStudyExotic && exoticity > 0.97 )
1481  {
1482  // Get the col and row of the secondary cluster cell
1483  Int_t icol2 = -1, irow2 = -1, iRCU2 = -1, icolAbs2 = -1, irowAbs2 = -1;
1484  GetModuleNumberCellIndexesAbsCaloMap(absId,GetCalorimeter(), icol2, irow2, iRCU2, icolAbs2, irowAbs2);
1485 
1486  if ( !sameTCard )
1487  {
1488  if(energy >= 5 && energy < 8)
1489  fhColRowTCardCorrNoSelectionExotic2ndCellDiffLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1490  else if(energy >= 8)
1491  fhColRowTCardCorrNoSelectionExotic2ndCellDiffHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1492  }
1493  else
1494  {
1495  if(energy >= 5 && energy < 8)
1496  fhColRowTCardCorrNoSelectionExotic2ndCellSameLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1497  else if(energy >= 8)
1498  fhColRowTCardCorrNoSelectionExotic2ndCellSameHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1499  }
1500  }
1501 
1502  if ( eCell > emax2nd )
1503  {
1504  emax2nd = eCell;
1505 // absId2ndMax = absId;
1506  if(sameTCard)
1507  {
1508  sameTCard2ndMax = kTRUE;
1509 // rowDiff2 = rowDiff;
1510 // colDiff2 = colDiff;
1511  }
1512  else
1513  {
1514  sameTCard2ndMax = kFALSE;
1515 // rowDiff2 = -100;
1516 // colDiff2 = -100;
1517  }
1518  }
1519 
1520 // //
1521 // // Other TCard correlations
1522 // //
1523 // if ( sameTCard ) continue;
1524 //
1525 // for (Int_t ipos2 = 0; ipos2 < ncells; ipos2++)
1526 // {
1527 // Int_t absId2 = clus->GetCellsAbsId()[ipos2];
1528 //
1529 // eCell = cells->GetCellAmplitude(absId2);
1530 // // consider cells with enough energy weight and not the reference one
1531 // weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
1532 //
1533 // if( absId2 == absIdMax || absId2 == absId || weight < 0.01 ) continue;
1534 //
1535 // rowDiff = -100, colDiff = -100;
1536 // Bool_t sameTCard2 = GetCaloUtils()->IsAbsIDsFromTCard(absId,absId2,rowDiff,colDiff);
1537 //
1538 // if(sameTCard2)
1539 // {
1540 // nCorr2++;
1541 // if ( rowDiff == 0 && colDiff != 0 ) sameRow2++;
1542 // else if ( rowDiff != 0 && colDiff == 0 ) sameCol2++;
1543 // else other2++;
1544 // }
1545 // //printf("\t cell %d, absId %d, E %2.2f, w %2.2f, tcard %d\n", ipos, absId, eCell, weight, sameTCard);
1546 // } // second cluster cell lopp for secondary TCard correlations
1547  } // cluster cell loop
1548 
1549  Float_t ratioNcells = nCellWithWeight/(ncells*1.);
1550  fhNCellsTCardCorrRatioWithWeightNoSelection[matched]->Fill(energy, ratioNcells, GetEventWeight());
1551  //printf("E %2.2f, ncells %d, nCellWithWeight %d, ratio %2.2f\n",energy,ncells,nCellWithWeight,ratioNcells);
1552 
1553  // If only one relevant cell, it makes no sense to continue
1554  if ( nCellWithWeight <= 1 ) return;
1555 
1556  // It should not happen, unless very exotic clusters
1557  if ( m02 < 0.001 )
1558  {
1559  printf("AliAnaCalorimeterQA: M02 %f, M20 %f, E %2.3f, ncell %d, n with weight %d; max cell E %2.3f\n",
1560  m02,m20,energy,ncells,nCellWithWeight,eCellMax);
1561  }
1562 
1563  //printf("\t Same col %d, same row %d, diff other %d\n",sameCol,sameRow,other);
1564  //printf("\t Second cell: E %2.2f, absId %d, correl %d, rowDiff %d, rowCol %d\n",emax,absId2ndMax,sameTCard2,rowDiff2, colDiff2);
1565 
1566  //
1567  // Fill histograms for different cell correlation criteria
1568  //
1569  if(energy >= 5 && energy < 8)
1570  fhColRowTCardCorrNoSelectionLowE [matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
1571  else if(energy >= 8)
1572  fhColRowTCardCorrNoSelectionHighE[matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
1573 
1574  if ( fStudyExotic && exoticity > 0.97 )
1575  {
1576  if(energy >= 5 && energy < 8)
1577  fhColRowTCardCorrNoSelectionExoticLowE [matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
1578  else if(energy >= 8)
1579  fhColRowTCardCorrNoSelectionExoticHighE[matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
1580  }
1581 
1582  fhLambda0TCardCorrNoSelection[matched]->Fill(energy, m02, GetEventWeight());
1583  fhLambda1TCardCorrNoSelection[matched]->Fill(energy, m20, GetEventWeight());
1584 
1585  if ( nlm == 1 )
1586  {
1587  fhLambda0NLM1TCardCorrNoSelection[matched]->Fill(energy, m02, GetEventWeight());
1588  fhLambda1NLM1TCardCorrNoSelection[matched]->Fill(energy, m20, GetEventWeight());
1589  }
1590  else if( nlm == 2 )
1591  {
1592  fhLambda0NLM2TCardCorrNoSelection[matched]->Fill(energy, m02, GetEventWeight());
1593  fhLambda1NLM2TCardCorrNoSelection[matched]->Fill(energy, m20, GetEventWeight());
1594  }
1595 
1596  fhLambdaRTCardCorrNoSelection[matched]->Fill(energy,lamR, GetEventWeight());
1597  fhNLocMaxTCardCorrNoSelection[matched]->Fill(energy, nlm, GetEventWeight());
1598  fhExoticTCardCorrNoSelection [matched]->Fill(energy, exoticity, GetEventWeight());
1599 
1600  if (nlm==1)
1601  {
1602  fhEMaxRatNLM1TCardCorrNoSelection [matched]->Fill(energy, eCellMax/energy , GetEventWeight());
1603  fhE2ndRatNLM1TCardCorrNoSelection [matched]->Fill(energy, emax2nd/energy , GetEventWeight());
1604  fhE2ndEMaxRatNLM1TCardCorrNoSelection[matched]->Fill(energy, emax2nd/eCellMax, GetEventWeight());
1605  }
1606  else if(nlm==2)
1607  {
1608  fhEMaxRatNLM2TCardCorrNoSelection [matched]->Fill(energy, eCellMax/energy , GetEventWeight());
1609  fhE2ndRatNLM2TCardCorrNoSelection [matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1610  fhE2ndEMaxRatNLM2TCardCorrNoSelection[matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1611  }
1612  else
1613  {
1614  fhEMaxRatNLM3TCardCorrNoSelection [matched]->Fill(energy, eCellMax/energy , GetEventWeight());
1615  fhE2ndRatNLM3TCardCorrNoSelection [matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1616  fhE2ndEMaxRatNLM3TCardCorrNoSelection[matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1617  }
1618 
1619  if(sameTCard2ndMax)
1620  {
1621  if (nlm==1)
1622  {
1623  fhE2ndSameRatNLM1TCardCorrNoSelection [matched]->Fill(energy, emax2nd/energy , GetEventWeight());
1624  fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[matched]->Fill(energy, emax2nd/eCellMax, GetEventWeight());
1625  }
1626  else if(nlm==2)
1627  {
1628  fhE2ndSameRatNLM2TCardCorrNoSelection [matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1629  fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1630  }
1631  else
1632  {
1633  fhE2ndSameRatNLM3TCardCorrNoSelection [matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1634  fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1635  }
1636  }
1637 
1638  fhNCellsTCardCorrNoSelection [matched]->Fill(energy, ncells, GetEventWeight());
1639  fhNCellsTCardCorrWithWeightNoSelection[matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1640 
1641  if(eCellSameRowSameTCardNearCol > 0 && eCellSameRowDiffTCardNearCol > 0)
1642  {
1643  Float_t eDiff = eCellSameRowSameTCardNearCol - eCellSameRowDiffTCardNearCol ;
1644  Float_t tDiff = tCellSameRowSameTCardNearCol - tCellSameRowDiffTCardNearCol ;
1645 
1646  fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[matched]->Fill(energy , eDiff, GetEventWeight());
1647  fhSameRowDiffColAndTCardCellsTimeDiffClusterE [matched]->Fill(energy , tDiff, GetEventWeight());
1648  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[matched]->Fill(eCellMax, eDiff, GetEventWeight());
1649  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE [matched]->Fill(eCellMax, tDiff, GetEventWeight());
1650 
1651  if ( fStudyExotic && exoticity > 0.97 )
1652  {
1653  fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[matched]->Fill(energy , eDiff, GetEventWeight());
1654  fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo [matched]->Fill(energy , tDiff, GetEventWeight());
1655  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[matched]->Fill(eCellMax, eDiff, GetEventWeight());
1656  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo [matched]->Fill(eCellMax, tDiff, GetEventWeight());
1657  }
1658  }
1659 
1661  Int_t nCorrInd = nCorr;
1662  if(nCorr > 4) nCorrInd = 5;
1663 
1664  Int_t nCorrNoInd = nCorrNo;
1665  if(nCorrNoInd > 4) nCorrNoInd = 5;
1666 
1667 // fhLambda0TCardCorrelN[nCorrInd][matched]->Fill(energy, m02, GetEventWeight());
1668 // fhNCellsTCardCorrelN [nCorrInd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1669 // fhExoticTCardCorrelN [nCorrInd][matched]->Fill(energy, exoticity, GetEventWeight());
1670 //
1671 // if ( energy >= 2 && energy < 8 )
1672 // fhColRowTCardCorrelNLowE [nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1673 // if ( energy >= 8 )
1674 // fhColRowTCardCorrelNHighE[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1675 
1676  if ( nlm == 1 )
1677  {
1678  fhLambda0NLM1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m02, GetEventWeight());
1679  fhLambda1NLM1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m20, GetEventWeight());
1680  }
1681  else if( nlm == 2 )
1682  {
1683  fhLambda0NLM2TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m02, GetEventWeight());
1684  fhLambda1NLM2TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m20, GetEventWeight());
1685  }
1686 
1687  fhLambda0TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m02, GetEventWeight());
1688  fhLambda1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m20, GetEventWeight());
1689 //fhLambdaRTCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy,lamR, GetEventWeight());
1690  fhNLocMaxTCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, nlm, GetEventWeight());
1691 
1692  if(fStudyExotic)
1693  fhExoticTCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, exoticity, GetEventWeight());
1694 
1695  if (nlm==1)
1696  {
1697  fhEMaxRatNLM1TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, eCellMax/energy , GetEventWeight());
1698  fhE2ndRatNLM1TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, emax2nd/energy , GetEventWeight());
1699  fhE2ndEMaxRatNLM1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, emax2nd/eCellMax, GetEventWeight());
1700  }
1701  else if(nlm==2)
1702  {
1703  fhEMaxRatNLM2TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, eCellMax/energy, GetEventWeight());
1704  fhE2ndRatNLM2TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1705  fhE2ndEMaxRatNLM2TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1706  }
1707  else
1708  {
1709  fhEMaxRatNLM3TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, eCellMax/energy, GetEventWeight());
1710  fhE2ndRatNLM3TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1711  fhE2ndEMaxRatNLM3TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1712  }
1713 
1714  // Time diff in cluster, depending nCells
1715  for (Int_t ipos = 0; ipos < ncells; ipos++)
1716  {
1717  Int_t absId = clus->GetCellsAbsId()[ipos];
1718 
1719  Float_t eCell = cells->GetCellAmplitude(absId);
1720  Double_t tCell = cells->GetCellTime(absId);
1721 
1723  GetCaloUtils()->RecalibrateCellTime(tCell, GetCalorimeter(), absId, GetReader()->GetInputEvent()->GetBunchCrossNumber());
1724  tCell *= 1.0e9;
1725  tCell-=fConstantTimeShift;
1726 
1727  // consider cells with enough energy weight and not the reference one
1728  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
1729 
1730  if( absId == absIdMax || weight < 0.01 ) continue;
1731 
1732  Float_t tDiffMaxSecondary = tCellMax - tCell;
1733  //printf("Time max %f, second %f, diff %f\n",tCellMax,tCell,tDiffMaxSecondary);
1734  fhTimeDiffTCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, tDiffMaxSecondary, GetEventWeight());
1735  if ( fStudyExotic && exoticity > 0.97 )
1736  {
1737  fhTimeDiffExoTCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, tDiffMaxSecondary, GetEventWeight());
1738  // Get the col and row of the secondary cluster cell
1739  Int_t icol2 = -1, irow2 = -1, iRCU2 = -1, icolAbs2 = -1, irowAbs2 = -1;
1740  GetModuleNumberCellIndexesAbsCaloMap(absId,GetCalorimeter(), icol2, irow2, iRCU2, icolAbs2, irowAbs2);
1741 
1742  Int_t rowDiff = -100, colDiff = -100;
1743  Bool_t sameTCard = GetCaloUtils()->IsAbsIDsFromTCard(absIdMax,absId,rowDiff,colDiff);
1744 
1745  if ( !sameTCard )
1746  {
1747  if ( energy >= 5 && energy < 8 && nCorr == 0 )
1748  fhColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1749  else if ( energy >= 8 && nCorr == 0 )
1750  fhColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1751  }
1752  else
1753  {
1754  if ( energy >= 5 && energy < 8 && nCorrNo == 0 )
1755  fhColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1756  else if ( energy >= 8 && nCorrNo == 0 )
1757  fhColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1758  }
1759  } // exotic
1760 
1761  if (nlm==1)
1762  {
1763  fhECellClusRatNLM1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, eCell/energy, GetEventWeight());
1764  fhLogECellNLM1TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1765  fhECellWeightNLM1TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, weight, GetEventWeight());
1766  }
1767  else if(nlm==2)
1768  {
1769  fhECellClusRatNLM2TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, eCell/energy, GetEventWeight());
1770  fhLogECellNLM2TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1771  fhECellWeightNLM2TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, weight, GetEventWeight());
1772  }
1773  else
1774  {
1775  fhECellClusRatNLM3TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, eCell/energy, GetEventWeight());
1776  fhLogECellNLM3TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1777  fhECellWeightNLM3TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, weight, GetEventWeight());
1778  }
1779  } //cell loop
1780 
1781  // Invariant mass for clusters looking like photons, depending number of cells
1782  if(m02 > fInvMassMinM02Cut && m02 < fInvMassMaxM02Cut)
1783  {
1784  for(Int_t jclus = 0 ; jclus < GetEMCALClusters()->GetEntriesFast() ; jclus++)
1785  {
1786  AliVCluster* clus2 = (AliVCluster*) GetEMCALClusters()->At(jclus);
1787 
1788  Float_t maxCellFraction = 0.;
1789  Int_t absIdMax2 = GetCaloUtils()->GetMaxEnergyCell(cells, clus2, maxCellFraction);
1790 
1791  Double_t tof2 = clus2->GetTOF()*1.e9;
1792  if(tof2>400) tof2-=fConstantTimeShift;
1793 
1794  Double_t diffTof = tCellMax-tof2;
1795 
1796  // Try to reduce background with a mild shower shape cut and no more
1797  // than 1 local maximum in cluster and remove low energy clusters
1798 
1799  if( absIdMax == absIdMax2
1800  || !IsGoodCluster(absIdMax2, clus2->GetM02(), clus2->GetNCells(), cells)
1801  || GetCaloUtils()->GetNumberOfLocalMaxima(clus2,cells) > 1
1802  || clus2->GetM02() > fInvMassMaxM02Cut
1803  || clus2->GetM02() < fInvMassMinM02Cut
1804  || clus2->E() < fInvMassMinECut
1805  || clus2->E() > fInvMassMaxECut
1806  || TMath::Abs(diffTof) > fInvMassMaxTimeDifference
1807  ) continue;
1808 
1809  // Get cluster kinematics
1810  Double_t v[3] = {0,0,0}; //vertex ;
1811  clus2->GetMomentum(fClusterMomentum2,v);
1812 
1813  // Check only certain regions
1814  Bool_t in2 = kTRUE;
1816  if(!in2) continue;
1817 
1818  //Float_t pairE = (fClusterMomentum+fClusterMomentum2).E();
1819 
1820  // Opening angle cut, avoid combination of DCal and EMCal clusters
1821  Double_t angle = fClusterMomentum.Angle(fClusterMomentum2.Vect());
1822 
1823  if( angle > fInvMassMaxOpenAngle ) continue;
1824 
1825  // Fill histograms
1827  fhMassEClusTCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, mass, GetEventWeight());
1828  //fhMassEPairTCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(pairE , mass, GetEventWeight());
1829  }
1830  }
1831 
1832  if ( energy >= 5 && energy < 8)
1833  fhColRowTCardCorrelNCellLowE [nCorrInd][nCorrNoInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1834  else if ( energy >= 8 )
1835  fhColRowTCardCorrelNCellHighE[nCorrInd][nCorrNoInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1836 
1837 // if(nCorrNo == 0)
1838 // {
1839 // fhLambda0TCardCorrelNAllSameTCard[nCorrInd][matched]->Fill(energy, m02, GetEventWeight());
1840 // fhNCellsTCardCorrelNAllSameTCard [nCorrInd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1841 // fhExoticTCardCorrelNAllSameTCard [nCorrInd][matched]->Fill(energy, exoticity, GetEventWeight());
1842 // if ( energy >= 2 && energy < 8 )
1843 // fhColRowTCardCorrelNAllSameTCardLowE[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1844 // else if ( energy >= 8 )
1845 // fhColRowTCardCorrelNAllSameTCardHighE[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1846 // }
1847 
1849 
1850  if ( fStudyExotic && exoticity > 0.97 )
1851  {
1852  if ( energy >= 5 && energy < 8)
1853  fhColRowTCardCorrelNCellExoticLowE [nCorrInd][nCorrNoInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1854  else if ( energy >= 8 )
1855  fhColRowTCardCorrelNCellExoticHighE[nCorrInd][nCorrNoInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1856 
1857 // fhLambda0TCardCorrelNExotic[nCorrInd][matched]->Fill(energy, m02, GetEventWeight());
1858 // fhNCellsTCardCorrelNExotic [nCorrInd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1859 //
1860 // if ( energy > 5 && energy <= 8 )
1861 // fhColRowTCardCorrelNLowEExotic [nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1862 // if ( energy > 8 )
1863 // fhColRowTCardCorrelNHighEExotic[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1864 //
1865 // if(nCorrNo == 0)
1866 // {
1867 // fhLambda0TCardCorrelNAllSameTCardExotic[nCorrInd][matched]->Fill(energy, m02, GetEventWeight());
1868 // fhNCellsTCardCorrelNAllSameTCardExotic [nCorrInd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1869 //
1870 // if ( energy > 2 && energy <=8 )
1871 // fhColRowTCardCorrelNAllSameTCardLowEExotic [nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1872 // if ( energy > 8 )
1873 // fhColRowTCardCorrelNAllSameTCardHighEExotic[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1874 // }
1875 //
1876 // Int_t indexExo = -1;
1877 // if (!nearRow && nearCol ) indexExo = 0;
1878 // else if (!nearRow && !nearCol ) indexExo = 1;
1879 // else if ( nearRow && nearCol ) indexExo = 2;
1880 // else if ( nearRow && !nearCol ) indexExo = 3;
1881 //
1882 // if(indexExo >= 0)
1883 // {
1884 // fhLambda0TCardCorrelExotic[indexExo][matched]->Fill(energy, m02, GetEventWeight());
1885 // fhNCellsTCardCorrelExotic [indexExo][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1886 // }
1887  }
1888 
1889 
1890  if( ebin > -1 )
1891  {
1892  fhLambda0Lambda1 [ebin][matched]->Fill(m20, m02, GetEventWeight());
1893  fhNCellsTCardSameAndDiff[ebin][matched]->Fill(nCorrNo, nCorr, GetEventWeight());
1894  // if(nCorrNo == 0)
1895  // fhLambda0Lambda1AllSameTCard [ebin][matched]->Fill(m20, m02, GetEventWeight());
1896 
1897  if(fStudyExotic)
1898  {
1899  fhLambda0Exoticity[ebin][matched]->Fill(exoticity, m02, GetEventWeight());
1900  fhLambda1Exoticity[ebin][matched]->Fill(exoticity, m20, GetEventWeight());
1901  //fhLambdaRExoticity[ebin][matched]->Fill(exoticity,lamR, GetEventWeight());
1902  fhNCellsExoticity [ebin][matched]->Fill(exoticity, nCellWithWeight, GetEventWeight());
1903  fhTimeExoticity [ebin][matched]->Fill(exoticity, tCellMax, GetEventWeight());
1904 
1905  if(energy > 8)
1906  {
1907  fhLambda0ExoticityPerNCell[nCorrInd][nCorrNoInd][matched]->Fill(exoticity, m02, GetEventWeight());
1908  fhLambda1ExoticityPerNCell[nCorrInd][nCorrNoInd][matched]->Fill(exoticity, m20, GetEventWeight());
1909  //fhLambdaRExoticityPerNCell[nCorrInd][nCorrNoInd][matched]->Fill(exoticity,lamR, GetEventWeight());
1910  }
1911 
1912  // if(nCorrNo == 0)
1913  // {
1914  // fhLambda0ExoticityAllSameTCard[ebin][matched]->Fill(exoticity, m02, GetEventWeight());
1915  // fhLambda1ExoticityAllSameTCard[ebin][matched]->Fill(exoticity, m20, GetEventWeight());
1916  // fhLambdaRExoticityAllSameTCard[ebin][matched]->Fill(exoticity,lamR, GetEventWeight());
1917  // fhNCellsExoticityAllSameTCard [ebin][matched]->Fill(exoticity, nCellWithWeight, GetEventWeight());
1918  // }
1919 
1920  if ( exoticity > 0.97 )
1921  fhNCellsTCardSameAndDiffExotic[ebin][matched]->Fill(nCorrNo, nCorr, GetEventWeight());
1922 
1923  // Track matching residuals
1924  fhTMPhiResidualExoticity[ebin]->Fill(exoticity,dphi);
1925  fhTMEtaResidualExoticity[ebin]->Fill(exoticity,deta);
1926 
1927  // if(nCorrNo==0)
1928  // {
1929  // fhTMPhiResidualExoticityAllSameTCard[ebin]->Fill(exoticity,dphi);
1930  // fhTMEtaResidualExoticityAllSameTCard[ebin]->Fill(exoticity,deta);
1931  // }
1932  }
1933  }
1934 
1935  Float_t nCellRat = nCorr*1. / ((nCorr+nCorrNo)*1.);
1936  fhNCellsTCardSameAndDiffFraction[matched]->Fill(energy, nCellRat, GetEventWeight());
1937  if ( fStudyExotic && exoticity > 0.97 )
1938  fhNCellsTCardSameAndDiffFractionExotic[matched]->Fill(energy, nCellRat, GetEventWeight());
1939 
1940 // if(nCorr > 0)
1941 // {
1942 // Int_t index = -1;
1943 // if (!sameRow && sameCol && !other ) index = 0;
1944 // else if (!sameRow && !sameCol && other ) index = 1;
1945 // else if (!sameRow && sameCol && other ) index = 2;
1946 // else if ( sameRow && sameCol && !other ) index = 3;
1947 // else if ( sameRow && !sameCol && other ) index = 4;
1948 // else if ( sameRow && sameCol && other ) index = 5;
1949 // else if ( sameRow && !sameCol && !other ) index = 6;
1950 // else printf("case not considered: sameRow %d, sameCol %d, other %d, nearRow %d\n",sameRow,sameCol,other,nearRow);
1951 //
1952 // if(index >= 0)
1953 // {
1954 // fhLambda0TCardCorrel[index][matched]->Fill(energy, m02, GetEventWeight());
1955 // fhNCellsTCardCorrel [index][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1956 // fhExoticTCardCorrel [index][matched]->Fill(energy, exoticity, GetEventWeight());
1957 // }
1958 //
1959 // // Comment out, no special effect observed
1960 // Int_t indexNR = -1;
1961 // if ( nearRow )
1962 // {
1963 // if (!sameRow && sameCol && !other ) indexNR = 0;
1964 // else if (!sameRow && !sameCol && other ) indexNR = 1;
1965 // else if (!sameRow && sameCol && other ) indexNR = 2;
1966 // else if ( sameRow && sameCol && !other ) indexNR = 3;
1967 // else if ( sameRow && !sameCol && other ) indexNR = 4;
1968 // else if ( sameRow && sameCol && other ) indexNR = 5;
1969 // else printf("\t near row case not considered!: sameRow %d, sameCol %d, other %d\n",sameRow,sameCol,other);
1970 // }
1971 //
1972 // if ( indexNR >= 0 )
1973 // {
1974 // fhLambda0TCardCorrelNearRow[indexNR][matched]->Fill(energy, m02, GetEventWeight());
1975 // fhNCellsTCardCorrelNearRow [indexNR][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1976 // }
1977 //
1978 // if ( sameTCard2ndMax )
1979 // {
1980 // Int_t index2nd = -1;
1981 // if ( TMath::Abs(rowDiff2) == 1 && TMath::Abs(colDiff2) != 1 ) index2nd = 0;
1982 // else if( TMath::Abs(rowDiff2) != 1 && TMath::Abs(colDiff2) == 1 ) index2nd = 1;
1983 // else if( TMath::Abs(rowDiff2) == 1 && TMath::Abs(colDiff2) == 1 ) index2nd = 2;
1984 // else index2nd = 3;
1985 //
1986 // fhLambda0TCardCorrel2ndMax[index2nd][matched]->Fill(energy, m02, GetEventWeight());
1987 // fhNCellsTCardCorrel2ndMax [index2nd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1988 // }
1989 // }
1990 //
1991 // Int_t indexOtherTCard = -1;
1992 // if ( nCorr == 0 && nCorr2 == 0 ) indexOtherTCard = 6;
1993 // else if ( nCorr == 0 && nCorr2 > 0 )
1994 // {
1995 // if ( sameRow2 && !sameCol2 && !other2) indexOtherTCard = 0;
1996 // else if ( !sameRow2 && sameCol2 && !other2) indexOtherTCard = 1;
1997 // else indexOtherTCard = 2;
1998 // }
1999 // else if ( nCorr > 0 && nCorr2 > 0 )
2000 // {
2001 // if ( sameRow2 && !sameCol2 && !other2) indexOtherTCard = 3;
2002 // else if ( !sameRow2 && sameCol2 && !other2) indexOtherTCard = 4;
2003 // else indexOtherTCard = 5;
2004 // }
2005 //
2006 // if ( indexOtherTCard >= 0 )
2007 // {
2008 // fhLambda0TCardCorrelOtherTCard[indexOtherTCard][matched]->Fill(energy, m02, GetEventWeight());
2009 // fhNCellsTCardCorrelOtherTCard [indexOtherTCard][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
2010 // fhExoticTCardCorrelOtherTCard [indexOtherTCard][matched]->Fill(energy, exoticity, GetEventWeight());
2011 // if ( energy >= 2 && energy < 8 )
2012 // fhColRowTCardCorrelOtherTCardLowE[indexOtherTCard][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
2013 // else if ( energy >= 8 )
2014 // fhColRowTCardCorrelOtherTCardHighE[indexOtherTCard][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
2015 // }
2016 }
2017 
2018 
2019 //_____________________________________________________________________________________
2020 // Study the shape of the cluster in cell units terms.
2021 //_____________________________________________________________________________________
2023  Bool_t goodCluster)
2024 {
2025  // No use to study clusters with less than 4 cells
2026  if( clus->GetNCells() <= 3 ) return;
2027 
2028  Int_t dIeta = 0;
2029  Int_t dIphi = 0;
2030 
2031  Int_t ietaMax=-1; Int_t iphiMax = 0; Int_t rcuMax = 0;
2032  Int_t smMax = GetModuleNumberCellIndexes(absIdMax,GetCalorimeter(), ietaMax, iphiMax, rcuMax);
2033 
2034  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
2035  {
2036  Int_t absId = clus->GetCellsAbsId()[ipos];
2037 
2038  Int_t ieta=-1; Int_t iphi = 0; Int_t rcu = 0;
2039  Int_t sm = GetModuleNumberCellIndexes(absId,GetCalorimeter(), ieta, iphi, rcu);
2040 
2041  if(dIphi < TMath::Abs(iphi-iphiMax)) dIphi = TMath::Abs(iphi-iphiMax);
2042 
2043  if(smMax==sm)
2044  {
2045  if(dIeta < TMath::Abs(ieta-ietaMax)) dIeta = TMath::Abs(ieta-ietaMax);
2046  }
2047  else
2048  {
2049  Int_t ietaShift = ieta;
2050  Int_t ietaMaxShift = ietaMax;
2051  if (ieta > ietaMax) ietaMaxShift+=48;
2052  else ietaShift +=48;
2053  if(dIeta < TMath::Abs(ietaShift-ietaMaxShift)) dIeta = TMath::Abs(ietaShift-ietaMaxShift);
2054  }
2055  }// Fill cell-cluster histogram loop
2056 
2057  Float_t dIA = 1.*(dIphi-dIeta)/(dIeta+dIphi);
2058 
2059  if(goodCluster)
2060  {
2061  // Was cluster matched?
2062  Bool_t matched = GetCaloPID()->IsTrackMatched(clus,GetCaloUtils(),GetReader()->GetInputEvent());
2063 
2064  if (clus->E() < 2 ) fhDeltaIEtaDeltaIPhiE0[matched]->Fill(dIeta, dIphi, GetEventWeight());
2065  else if(clus->E() < 6 ) fhDeltaIEtaDeltaIPhiE2[matched]->Fill(dIeta, dIphi, GetEventWeight());
2066  else fhDeltaIEtaDeltaIPhiE6[matched]->Fill(dIeta, dIphi, GetEventWeight());
2067 
2068  fhDeltaIA[matched]->Fill(clus->E(), dIA, GetEventWeight());
2069 
2070  if(clus->E() > 0.5)
2071  {
2072  fhDeltaIAL0 [matched]->Fill(clus->GetM02() , dIA, GetEventWeight());
2073  fhDeltaIAL1 [matched]->Fill(clus->GetM20() , dIA, GetEventWeight());
2074  fhDeltaIANCells[matched]->Fill(clus->GetNCells(), dIA, GetEventWeight());
2075  }
2076 
2077  // Origin of clusters
2078  Int_t nLabel = clus->GetNLabels();
2079  Int_t* labels = clus->GetLabels();
2080 
2081  if(IsDataMC())
2082  {
2083  Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels, nLabel, GetMC());
2084 
2085  if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) &&
2086  !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) &&
2087  !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta) &&
2088  !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) ){
2089  fhDeltaIAMC[0]->Fill(clus->E(), dIA, GetEventWeight()); // Pure Photon
2090  }
2093  fhDeltaIAMC[1]->Fill(clus->E(), dIA, GetEventWeight()); // Pure electron
2094  }
2097  fhDeltaIAMC[2]->Fill(clus->E(), dIA, GetEventWeight()); // Converted cluster
2098  }
2100  fhDeltaIAMC[3]->Fill(clus->E(), dIA, GetEventWeight()); // Hadrons
2101  }
2102 
2103  } // MC
2104  } // good cluster
2105  else
2106  {
2107  if (clus->E() < 2 ) fhBadClusterDeltaIEtaDeltaIPhiE0->Fill(dIeta, dIphi, GetEventWeight());
2108  else if(clus->E() < 6 ) fhBadClusterDeltaIEtaDeltaIPhiE2->Fill(dIeta, dIphi, GetEventWeight());
2109  else fhBadClusterDeltaIEtaDeltaIPhiE6->Fill(dIeta, dIphi, GetEventWeight());
2110 
2111  fhBadClusterDeltaIA->Fill(clus->E(), dIA, GetEventWeight());
2112  }
2113 }
2114 
2115 //__________________________________________________________________________________________________________________
2124 //__________________________________________________________________________________________________________________
2125 void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells,
2126  Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac,
2127  Double_t tmax)
2128 {
2129  Double_t tof = clus->GetTOF()*1.e9;
2130  if(tof>400) tof-=fConstantTimeShift;
2131  fhClusterTimeEnergy ->Fill(clus->E(), tof , GetEventWeight());
2132 
2133  fhLambda0 ->Fill(clus->E(), clus->GetM02() , GetEventWeight());
2134  fhLambda1 ->Fill(clus->E(), clus->GetM20() , GetEventWeight());
2135 //fhDispersion ->Fill(clus->E(), clus->GetDispersion(), GetEventWeight());
2136  fhNLocMax ->Fill(clus->E(), GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells), GetEventWeight());
2137 
2139  {
2140  fhClusterMaxCellDiff ->Fill(clus->E(), maxCellFraction, GetEventWeight());
2141  fhClusterMaxCellECross->Fill(clus->E(), eCrossFrac , GetEventWeight());
2142  }
2143 
2145  {
2146  fhClusterMaxCellDiffM02 ->Fill(clus->E(), maxCellFraction, clus->GetM02(), GetEventWeight());
2147  fhClusterMaxCellECrossM02->Fill(clus->E(), eCrossFrac , clus->GetM02(), GetEventWeight());
2148  fhClusterTimeEnergyM02 ->Fill(clus->E(), tof , clus->GetM02(), GetEventWeight());
2149  }
2150 
2151  if(fStudyClustersAsymmetry) ClusterAsymmetryHistograms(clus,absIdMax,kTRUE);
2152 
2153  Int_t nModule = GetModuleNumber(clus);
2154  Int_t nCaloCellsPerCluster = clus->GetNCells();
2155 
2156  // Clusters in event time difference
2158  {
2159  for(Int_t iclus2 = 0; iclus2 < caloClusters->GetEntriesFast(); iclus2++ )
2160  {
2161  AliVCluster* clus2 = (AliVCluster*) caloClusters->At(iclus2);
2162 
2163  if( clus->GetID() == clus2->GetID() ) continue;
2164 
2165  if( clus->GetM02() > 0.01 && clus2->GetM02() > 0.01 )
2166  {
2167  Int_t nModule2 = GetModuleNumber(clus2);
2168 
2169  Double_t tof2 = clus2->GetTOF()*1.e9;
2170  if(tof2>400) tof2-=fConstantTimeShift;
2171 
2172 
2173  fhClusterPairDiffTimeE ->Fill(clus->E(), tof-tof2, GetEventWeight());
2174 
2175  if ( nModule2 == nModule )
2176  fhClusterPairDiffTimeESameMod->Fill(clus->E(), tof-tof2, GetEventWeight());
2177  }
2178  } // loop
2179  } // fill cluster pair time diff
2180 
2181  if(nCaloCellsPerCluster > 1 &&
2183  {
2184  // Check time of cells respect to max energy cell
2185 
2186 // if(fFillAllCellTimeHisto && fFillClusterMaxCellHisto)
2187 // {
2188 // // Get some time averages
2189 // Double_t timeAverages[2] = {0.,0.};
2190 // CalculateAverageTime(clus, cells, timeAverages);
2191 //
2192 // fhClusterMaxCellDiffAverageTime ->Fill(clus->E(), tmax-timeAverages[0], GetEventWeight());
2193 // fhClusterMaxCellDiffWeightedTime ->Fill(clus->E(), tmax-timeAverages[1], GetEventWeight());
2194 // }
2195 
2196  for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++)
2197  {
2198  Int_t absId = clus->GetCellsAbsId()[ipos];
2199  if( absId == absIdMax || cells->GetCellAmplitude(absIdMax) < 0.01 ) continue;
2200 
2201  Float_t frac = cells->GetCellAmplitude(absId)/cells->GetCellAmplitude(absIdMax);
2202 
2204  {
2205  fhClusterMaxCellCloseCellRatio->Fill(clus->E(), frac, GetEventWeight());
2206  fhClusterMaxCellCloseCellDiff ->Fill(clus->E(), cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId), GetEventWeight());
2207  }
2208 
2210  {
2211  fhClusterMaxCellCloseCellRatioM02->Fill(clus->E(), frac, clus->GetM02(), GetEventWeight());
2212  fhClusterMaxCellCloseCellDiffM02 ->Fill(clus->E(), cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId), clus->GetM02(),GetEventWeight());
2213  }
2214 
2216  {
2217  Double_t time = cells->GetCellTime(absId);
2218  GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
2219 
2220  Float_t diff = (tmax-(time*1.0e9-fConstantTimeShift));
2221 
2223  fhCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff, GetEventWeight());
2224 
2225  if(fStudyM02Dependence)
2226  fhCellTimeSpreadRespectToCellMaxM02->Fill(clus->E(), diff, clus->GetM02(), GetEventWeight());
2227 
2229  TMath::Abs(TMath::Abs(diff) > 100) && clus->E() > 1 )
2231  }
2232 
2233  } // Fill cell-cluster histogram loop
2234  } // Check time and energy of cells respect to max energy cell if cluster of more than 1 cell
2235 
2236  Float_t e = fClusterMomentum.E();
2237  Float_t pt = fClusterMomentum.Pt();
2238  Float_t eta = fClusterMomentum.Eta();
2239  Float_t phi = GetPhi(fClusterMomentum.Phi());
2240 
2241  AliDebug(1,Form("cluster: E %2.3f, pT %2.3f, eta %2.3f, phi %2.3f",e,pt,eta,phi*TMath::RadToDeg()));
2242 
2243  fhE ->Fill(e, GetEventWeight());
2244  if(nModule >=0 && nModule < fNModules)
2245  {
2246  fhEMod ->Fill(e, nModule, GetEventWeight());
2247  fhEWeirdMod->Fill(e, nModule, GetEventWeight()); // different binning
2248  }
2249 
2250  fhPt ->Fill(pt , GetEventWeight());
2251  fhPhi ->Fill(phi, GetEventWeight());
2252  fhEta ->Fill(eta, GetEventWeight());
2253 
2255  {
2256  Int_t icol = -1, irow = -1, iRCU = -1, icolAbs = -1, irowAbs = -1;
2257  GetModuleNumberCellIndexesAbsCaloMap(absIdMax,GetCalorimeter(), icol, irow, iRCU, icolAbs, irowAbs);
2258 
2259  for(Int_t ie = 0; ie < fNEBinCuts; ie++)
2260  {
2261  if( e >= fEBinCuts[ie] && e < fEBinCuts[ie+1] )
2262  {
2263  fhEBinClusterEtaPhi[ie]->Fill(eta,phi,GetEventWeight()) ;
2264 
2265  fhEBinClusterColRow[ie]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
2266  }
2267  }
2268  }
2269  else if ( fFillAllTH3 ) fhEtaPhiE->Fill(eta, phi, e, GetEventWeight());
2270  else if ( e > 0.5 ) fhEtaPhi ->Fill(eta, phi, GetEventWeight());
2271 
2272  // Cells per cluster
2273  fhNCellsPerCluster->Fill(e, nCaloCellsPerCluster, GetEventWeight());
2274 
2276  fhNCellsPerClusterM02->Fill(e, nCaloCellsPerCluster, clus->GetM02(),GetEventWeight());
2277 
2278  if(e > 100)
2279  fhNCellsPerClusterWeirdMod->Fill(nCaloCellsPerCluster, nModule, GetEventWeight());
2280 
2281  // Position
2282  if(fFillAllPosHisto2)
2283  {
2284  Float_t pos[3] ;
2285  clus->GetPosition(pos);
2286 
2287  fhXE ->Fill(pos[0], e, GetEventWeight());
2288  fhYE ->Fill(pos[1], e, GetEventWeight());
2289  fhZE ->Fill(pos[2], e, GetEventWeight());
2290 
2291  fhXYZ ->Fill(pos[0], pos[1], pos[2], GetEventWeight());
2292 
2293  fhXNCells->Fill(pos[0], nCaloCellsPerCluster, GetEventWeight());
2294  fhYNCells->Fill(pos[1], nCaloCellsPerCluster, GetEventWeight());
2295  fhZNCells->Fill(pos[2], nCaloCellsPerCluster, GetEventWeight());
2296 
2297  Float_t rxyz = TMath::Sqrt(pos[0]*pos[0]+pos[1]*pos[1]);//+pos[2]*pos[2]);
2298 
2299  fhRE ->Fill(rxyz, e , GetEventWeight());
2300  fhRNCells->Fill(rxyz, nCaloCellsPerCluster, GetEventWeight());
2301  }
2302 
2303  if( nModule >= 0 && nModule < fNModules ) fhNCellsPerClusterMod[nModule]->Fill(e, nCaloCellsPerCluster, GetEventWeight());
2304 }
2305 
2306 //____________________________________________________________________________
2318 //____________________________________________________________________________
2320  AliVCaloCells* cells)
2321 {
2322  if(!fFillAllClusterHistograms) return;
2323 
2324  Int_t nLabel = 0 ;
2325  Int_t *labels = 0x0;
2326  Int_t nCaloClusters = caloClusters->GetEntriesFast() ;
2327  Int_t nCaloClustersAccepted = 0 ;
2328  Int_t nCaloCellsPerCluster = 0 ;
2329  Bool_t matched = kFALSE;
2330  Int_t nModule =-1 ;
2331 
2332  // Get vertex for photon momentum calculation and event selection
2333  Double_t v[3] = {0,0,0}; //vertex ;
2334 //GetReader()->GetVertex(v);
2335 
2336  Int_t *nClustersInModule = new Int_t [fNModules];
2337  Float_t *energyInModule = new Float_t[fNModules];
2338  for(Int_t imod = 0; imod < fNModules; imod++ )
2339  {
2340  nClustersInModule[imod] = 0;
2341  energyInModule [imod] = 0;
2342  }
2343 
2344  AliDebug(1,Form("In %s there are %d clusters", GetCalorimeterString().Data(), nCaloClusters));
2345 
2346  // Loop over CaloClusters
2347  for(Int_t iclus = 0; iclus < nCaloClusters; iclus++)
2348  {
2349  AliDebug(1,Form("Cluster: %d/%d, data %d",iclus+1,nCaloClusters,GetReader()->GetDataType()));
2350 
2351  AliVCluster* clus = (AliVCluster*) caloClusters->At(iclus);
2352 
2353  // SuperModule number of cluster
2354  nModule = GetModuleNumber(clus);
2355  if ( nModule < fFirstModule || nModule > fLastModule )
2356  {
2357  AliDebug(1,Form("Cluster module out of range %d",nModule));
2358  continue ;
2359  }
2360 
2361  // Get the fraction of the cluster energy that carries the cell with highest energy and its absId
2362  Float_t maxCellFraction = 0.;
2363  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus,maxCellFraction);
2364 
2365  // Cut on time of clusters
2366  Double_t tof = clus->GetTOF()*1.e9;
2367  if(tof>400) tof-=fConstantTimeShift;
2368 
2369  if( tof < fTimeCutMin || tof > fTimeCutMax )
2370  {
2371  AliDebug(1,Form("Remove cluster with TOF %2.2f",tof));
2372  continue;
2373  }
2374 
2375  // Get cluster kinematics
2376  clus->GetMomentum(fClusterMomentum,v);
2377 
2378  // Check only certain regions
2379  Bool_t in = kTRUE;
2381  if(!in)
2382  {
2383  AliDebug(1,Form("Remove cluster with phi %2.2f and eta %2.2f",
2384  GetPhi(fClusterMomentum.Phi())*TMath::RadToDeg(),fClusterMomentum.Eta()));
2385  continue;
2386  }
2387 
2388  // MC labels
2389  nLabel = clus->GetNLabels();
2390  labels = clus->GetLabels();
2391 
2392  // Cells per cluster
2393  nCaloCellsPerCluster = clus->GetNCells();
2394 
2395  // Cluster mathed with track?
2396  matched = GetCaloPID()->IsTrackMatched(clus,GetCaloUtils(), GetReader()->GetInputEvent());
2397 
2398  // Get time of max cell
2399  Double_t tmax = cells->GetCellTime(absIdMax);
2400  GetCaloUtils()->RecalibrateCellTime(tmax, GetCalorimeter(), absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
2401  tmax*=1.e9;
2402  tmax-=fConstantTimeShift;
2403  //
2404  // Fill histograms related to single cluster
2405  //
2406 
2407  // Fill some histograms before applying the exotic cell / bad map cut
2408  if(fStudyBadClusters)
2409  {
2410  fhNCellsPerClusterNoCut->Fill(clus->E(), nCaloCellsPerCluster, GetEventWeight());
2411 
2412  if(nModule >=0 && nModule < fNModules)
2413  {
2414  fhNCellsPerClusterModNoCut[nModule]->Fill(clus->E(), nCaloCellsPerCluster, GetEventWeight());
2415  if(clus->E() > 100) fhNCellsPerClusterWeirdModNoCut->Fill(nCaloCellsPerCluster, nModule, GetEventWeight());
2416  }
2417 
2419  fhClusterMaxCellDiffNoCut->Fill(clus->E(), maxCellFraction, GetEventWeight());
2420  }
2421 
2422  Float_t ampMax = cells->GetCellAmplitude(absIdMax);
2423  GetCaloUtils()->RecalibrateCellAmplitude(ampMax,GetCalorimeter(), absIdMax);
2424 
2425  //if(fStudyExotic) ExoticHistograms(absIdMax, ampMax, clus, cells);
2426 
2427  // Check bad clusters if requested and rejection was not on
2428  Bool_t goodCluster = IsGoodCluster(absIdMax, clus->GetM02(), nCaloCellsPerCluster, cells);
2429 
2430  Float_t eCrossFrac = 0;
2431  if(ampMax > 0.01) eCrossFrac = 1-GetECross(absIdMax,cells)/ampMax;
2432 
2433  AliDebug(1,Form("Accept cluster? %d",goodCluster));
2434 
2435  if(!goodCluster)
2436  {
2437  if ( fStudyBadClusters ) BadClusterHistograms(clus, caloClusters,
2438  cells, absIdMax,
2439  maxCellFraction,
2440  eCrossFrac, tmax);
2441  continue;
2442  }
2443 
2444  //
2445  ClusterHistograms(clus, caloClusters, cells, absIdMax,
2446  maxCellFraction, eCrossFrac, tmax);
2447 
2448  nCaloClustersAccepted++;
2449 
2450  //
2451  if(fStudyTCardCorrelation) ChannelCorrelationInTCard(clus, cells, matched, absIdMax, eCrossFrac);
2452 
2453  //
2454  if(nModule >=0 && nModule < fNModules && fClusterMomentum.E() > 2*fCellAmpMin)
2455  {
2456  nClustersInModule[nModule]++;
2457  if(clus->E() > 0.5)
2458  energyInModule [nModule] += clus->E();
2459  }
2460 
2461  // Cluster weights
2462  if(fStudyWeight) WeightHistograms(clus, cells);
2463 
2464  // Cells in cluster position
2466 
2467  // Fill histograms related to single cluster, mc vs data
2468  Int_t mcOK = kFALSE;
2469  Int_t pdg = -1;
2470  if(IsDataMC() && nLabel > 0 && labels)
2471  mcOK = ClusterMCHistograms(matched, labels, nLabel, pdg);
2472 
2473  // Matched clusters with tracks, also do some MC comparison, needs input from ClusterMCHistograms
2474  if( matched && fFillAllTMHisto)
2475  ClusterMatchedWithTrackHistograms(clus,mcOK,pdg);
2476 
2477  // Invariant mass
2478  // Try to reduce background with a mild shower shape cut and no more than 1 maxima
2479  // in cluster and remove low energy clusters
2480 
2481  if ( fFillAllPi0Histo
2482  && nCaloClusters > 1
2483  && nCaloCellsPerCluster > 1
2484  && GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells) == 1
2485  && clus->GetM02() < fInvMassMaxM02Cut
2486  && clus->GetM02() > fInvMassMinM02Cut
2487  && clus->E() > fInvMassMinECut
2488  && clus->E() < fInvMassMaxECut
2489  )
2490  InvariantMassHistograms(iclus, nModule, caloClusters,cells);
2491 
2492  } // Cluster loop
2493 
2494  // Number of clusters histograms
2495  if(nCaloClustersAccepted > 0) fhNClusters->Fill(nCaloClustersAccepted, GetEventWeight());
2496 
2497  // Number of clusters per module
2498  for(Int_t imod = 0; imod < fNModules; imod++ )
2499  {
2500  if ( imod < fFirstModule || imod > fLastModule ) continue ;
2501 
2502  AliDebug(1,Form("Module %d calo %s clusters %d, sum E %f", imod, GetCalorimeterString().Data(), nClustersInModule[imod], energyInModule[imod]));
2503 
2504  fhNClustersMod ->Fill(nClustersInModule[imod], imod, GetEventWeight());
2505  fhSumClustersEnergyMod->Fill(energyInModule [imod], imod, GetEventWeight());
2506 
2507  fhNClustersSumEnergyPerMod[imod]->Fill(energyInModule[imod], nClustersInModule[imod], GetEventWeight());
2508  }
2509 
2510  delete [] nClustersInModule;
2511  delete [] energyInModule;
2512 }
2513 
2514 //__________________________________________________________________________________
2517 //__________________________________________________________________________________
2519  Int_t nLabels, Int_t & pdg )
2520 {
2521  if(!labels || nLabels<=0)
2522  {
2523  AliWarning(Form("Strange, labels array %p, n labels %d", labels,nLabels));
2524  return kFALSE;
2525  }
2526 
2527  AliDebug(1,Form("Primaries: nlabels %d",nLabels));
2528 
2529  // Play with the MC stack if available
2530  Int_t label = labels[0];
2531 
2532  if(label < 0)
2533  {
2534  AliDebug(1,Form(" *** bad label ***: label %d", label));
2535  return kFALSE;
2536  }
2537 
2538  if( label >= GetMC()->GetNumberOfTracks())
2539  {
2540  AliDebug(1,Form("*** large label ***: label %d, n tracks %d", label, GetMC()->GetNumberOfTracks()));
2541  return kFALSE;
2542  }
2543 
2544  Float_t e = fClusterMomentum.E();
2545  Float_t eta = fClusterMomentum.Eta();
2546  Float_t phi = fClusterMomentum.Phi();
2547  if(phi < 0) phi +=TMath::TwoPi();
2548 
2549  AliVParticle * primary = 0x0;
2550 
2551  Int_t pdg0 =-1; Int_t status = -1; Int_t iMother = -1; Int_t iParent = -1;
2552  Float_t vxMC = 0; Float_t vyMC = 0;
2553  Float_t eMC = 0; //Float_t ptMC= 0;
2554  Float_t phiMC = 0; Float_t etaMC = 0;
2555  Int_t charge = 0;
2556 
2557  // Check the origin.
2558  Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels, nLabels, GetMC());
2559 
2560  if ( !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown) )
2561  {
2562  primary = GetMC()->GetTrack(label);
2563  iMother = label;
2564  pdg0 = TMath::Abs(primary->PdgCode());
2565  pdg = pdg0;
2566  status = primary->MCStatusCode();
2567  vxMC = primary->Xv();
2568  vyMC = primary->Yv();
2569  iParent = primary->GetMother();
2570 
2571  AliDebug(1,"Cluster most contributing mother:");
2572  AliDebug(1,Form("\t Mother label %d, pdg %d, %s, status %d, Primary? %d, Physical Primary? %d, parent %d",
2573  iMother, pdg0, primary->GetName(),status, primary->IsPrimary(), primary->IsPhysicalPrimary(), iParent));
2574 
2575  // Get final particle, no conversion products
2576  if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
2577  {
2578  // Get the parent
2579  primary = GetMC()->GetTrack(iParent);
2580  pdg = TMath::Abs(primary->PdgCode());
2581 
2582  AliDebug(2,"Converted cluster!. Find before conversion:");
2583 
2584  while((pdg == 22 || pdg == 11) && status != 1) //&& !aodprimary->IsPhysicalPrimary()
2585  {
2586  Int_t iMotherOrg = iMother;
2587  iMother = iParent;
2588  primary = GetMC()->GetTrack(iMother);
2589  status = primary->MCStatusCode();
2590  pdg = TMath::Abs(primary->PdgCode());
2591  iParent = primary->GetMother();
2592 
2593  // If gone too back and non stable, assign the decay photon/electron
2594  // there are other possible decays, ignore them for the moment
2595  if(pdg==111 || pdg==221)
2596  {
2597  primary = GetMC()->GetTrack(iMotherOrg);
2598  break;
2599  }
2600 
2601  if( iParent < 0 )
2602  {
2603  iParent = iMother;
2604  break;
2605  }
2606 
2607  AliDebug(2,Form("\t pdg %d, index %d, %s, status %d",pdg, iMother, primary->GetName(),status));
2608  }
2609 
2610  AliDebug(1,"Converted Cluster mother before conversion:");
2611  AliDebug(1,Form("\t Mother label %d, pdg %d, %s, status %d, Primary? %d, Physical Primary? %d, parent %d",
2612  iMother, pdg, primary->GetName(), status, primary->IsPrimary(), primary->IsPhysicalPrimary(), iParent));
2613 
2614  }
2615 
2616  // Overlapped pi0 (or eta, there will be very few), get the meson
2617  if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) ||
2618  GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta))
2619  {
2620  AliDebug(2,"Overlapped Meson decay!, Find it:");
2621 
2622  while(pdg != 111 && pdg != 221)
2623  {
2624  //printf("iMother %d, pdg %d, iParent %d, pdg %d\n",iMother,pdg,iParent,GetMC()->Particle(iParent)->GetPdgCode());
2625  iMother = iParent;
2626  primary = GetMC()->GetTrack(iMother);
2627  status = primary->MCStatusCode();
2628  pdg = TMath::Abs(primary->PdgCode());
2629  iParent = primary->GetMother();
2630 
2631  if( iParent < 0 ) break;
2632 
2633  AliDebug(2,Form("\t pdg %d, %s, index %d",pdg, primary->GetName(),iMother));
2634 
2635  if(iMother==-1)
2636  {
2637  AliWarning("Tagged as Overlapped photon but meson not found, why?");
2638  //break;
2639  }
2640  }
2641 
2642  AliDebug(2,Form("Overlapped %s decay, label %d",primary->GetName(),iMother));
2643  }
2644 
2645  eMC = primary->E();
2646  //ptMC = primary->Pt();
2647  phiMC = primary->Phi();
2648  etaMC = primary->Eta();
2649  pdg = TMath::Abs(primary->PdgCode());
2650  //charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
2651  charge = primary->Charge();
2652  }
2653 
2654  //Float_t vz = primary->Vz();
2655  Float_t rVMC = TMath::Sqrt(vxMC*vxMC + vyMC*vyMC);
2656  if( ( pdg == 22 || TMath::Abs(pdg) == 11 ) && status != 1 )
2657  {
2658  fhEMVxyz ->Fill(vxMC, vyMC, GetEventWeight());//,vz);
2659  fhEMR ->Fill(e , rVMC, GetEventWeight());
2660  }
2661 
2662  //printf("reco e %f, pt %f, phi %f, eta %f \n", e, pt, phi, eta);
2663  //printf("prim e %f, pt %f, phi %f, eta %f \n", eMC,ptMC,phiMC ,etaMC );
2664  //printf("vertex: vx %f, vy %f, vz %f, r %f \n", vxMC, vyMC, vz, r);
2665 
2666  // Overlapped pi0 (or eta, there will be very few)
2667  Int_t mcIndex = -1;
2668  if ( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0 ) )
2669  {
2670  mcIndex = kmcPi0;
2671  } // Overlapped pizero decay
2672  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta ) )
2673  {
2674  mcIndex = kmcEta;
2675  } // Overlapped eta decay
2676  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton ) )
2677  {
2678  if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
2679  mcIndex = kmcPhotonConv ;
2680  else
2681  mcIndex = kmcPhoton ;
2682  } // photon
2683  else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron) )
2684  {
2685  mcIndex = kmcElectron;
2686  fhEMVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
2687  fhEMR ->Fill(e , rVMC, GetEventWeight());
2688  }
2689  else if(charge == 0)
2690  {
2691  mcIndex = kmcNeHadron;
2692  fhHaVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
2693  fhHaR ->Fill(e , rVMC, GetEventWeight());
2694  }
2695  else if(charge!=0)
2696  {
2697  mcIndex = kmcChHadron;
2698  fhHaVxyz->Fill(vxMC, vyMC, GetEventWeight());//,vz);
2699  fhHaR ->Fill(e , rVMC, GetEventWeight());
2700  }
2701 
2702  //printf("mc index %d\n",mcIndex);
2703 
2704  if( mcIndex >= 0 && mcIndex < 7 && e > 0.5 && eMC > 0.5)
2705  {
2706  fhRecoMCE [mcIndex][(matched)]->Fill(e , eMC , GetEventWeight());
2707  fhRecoMCEta [mcIndex][(matched)]->Fill(eta, etaMC , GetEventWeight());
2708  fhRecoMCPhi [mcIndex][(matched)]->Fill(phi, phiMC , GetEventWeight());
2709  fhRecoMCRatioE [mcIndex][(matched)]->Fill(e , e/eMC , GetEventWeight());
2710  fhRecoMCDeltaE [mcIndex][(matched)]->Fill(e , eMC-e , GetEventWeight());
2711  fhRecoMCDeltaPhi[mcIndex][(matched)]->Fill(e , phiMC-phi, GetEventWeight());
2712  fhRecoMCDeltaEta[mcIndex][(matched)]->Fill(e , etaMC-eta, GetEventWeight());
2713  }
2714 
2715  if( primary ) return kTRUE ;
2716  else return kFALSE;
2717 }
2718 
2719 //_________________________________________________________________________________________________________
2724 //_________________________________________________________________________________________________________
2726 {
2727  Float_t e = fClusterMomentum.E();
2728  Float_t pt = fClusterMomentum.Pt();
2729  Float_t eta = fClusterMomentum.Eta();
2730  Float_t phi = fClusterMomentum.Phi();
2731  if(phi < 0) phi +=TMath::TwoPi();
2732 
2733  fhECharged ->Fill(e , GetEventWeight());
2734  fhPtCharged ->Fill(pt , GetEventWeight());
2735  fhPhiCharged ->Fill(phi, GetEventWeight());
2736  fhEtaCharged ->Fill(eta, GetEventWeight());
2737 
2738  if ( fFillAllTH3 ) fhEtaPhiECharged->Fill(eta, phi, e, GetEventWeight());
2739  else if ( e > 0.5 ) fhEtaPhiCharged ->Fill(eta, phi, GetEventWeight());
2740 
2741  // Study the track and matched cluster if track exists.
2742 
2743  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(clus, GetReader()->GetInputEvent());
2744 
2745  if(!track) return ;
2746 
2747  Double_t tpt = track->Pt();
2748  Double_t tmom = track->P();
2749  Double_t dedx = track->GetTPCsignal();
2750  Int_t nITS = track->GetNcls(0);
2751  Int_t nTPC = track->GetNcls(1);
2752  Bool_t positive = kFALSE;
2753  if(track) positive = (track->Charge()>0);
2754 
2755  // Residuals
2756  Float_t deta = clus->GetTrackDz();
2757  Float_t dphi = clus->GetTrackDx();
2758  Double_t dR = TMath::Sqrt(dphi*dphi + deta*deta);
2759  Int_t nModule = GetModuleNumber(clus);
2760 
2761  if( TMath::Abs(dphi) < 999 )
2762  {
2763  if(positive)
2764  {
2765  fhTrackMatchedDEtaPos->Fill(e, deta, GetEventWeight());
2766  fhTrackMatchedDPhiPos->Fill(e, dphi, GetEventWeight());
2767 
2768  if(e > 0.5)
2769  {
2770  fhTrackMatchedDEtaPosMod ->Fill(deta, nModule, GetEventWeight());
2771  fhTrackMatchedDPhiPosMod ->Fill(dphi, nModule, GetEventWeight());
2772  fhTrackMatchedDEtaDPhiPos->Fill(deta, dphi , GetEventWeight());
2773  }
2774  }
2775  else
2776  {
2777  fhTrackMatchedDEtaNeg->Fill(e, deta, GetEventWeight());
2778  fhTrackMatchedDPhiNeg->Fill(e, dphi, GetEventWeight());
2779 
2780  if(e > 0.5)
2781  {
2782  fhTrackMatchedDEtaNegMod ->Fill(deta, nModule, GetEventWeight());
2783  fhTrackMatchedDPhiNegMod ->Fill(dphi, nModule, GetEventWeight());
2784  fhTrackMatchedDEtaDPhiNeg->Fill(deta, dphi , GetEventWeight());
2785  }
2786  }
2787  }
2788 
2789  Double_t eOverP = e/tmom;
2790  fh1EOverP->Fill(tpt, eOverP, GetEventWeight());
2791  if(e > 0.5 && tpt > 0.5) fh1EOverPMod->Fill(eOverP, nModule, GetEventWeight());
2792 
2793  if(dR < 0.02)
2794  {
2795  fh1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
2796  if(e > 0.5 && tpt > 0.5) fh1EOverPR02Mod->Fill(eOverP, nModule, GetEventWeight());
2797 
2798  if(dedx > 60 && dedx < 100)
2799  {
2800  fh1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
2801  if(e > 0.5 && tpt > 0.5) fh1EleEOverPMod->Fill(eOverP, nModule, GetEventWeight());
2802  }
2803  }
2804 
2805  fh2dR->Fill(e, dR, GetEventWeight());
2806  fh2MatchdEdx->Fill(tmom, dedx, GetEventWeight());
2807 
2808  if(e > 0.5 && tmom > 0.5)
2809  {
2810  fh2dRMod->Fill(dR, nModule, GetEventWeight());
2811  fh2MatchdEdxMod->Fill(dedx, nModule, GetEventWeight());
2812  }
2813 
2814  if(dR < 0.02 && eOverP > 0.6 && eOverP < 1.2
2815  && clus->GetNCells() > 1 && nITS > 3 && nTPC > 20)
2816  {
2817  fh2EledEdx->Fill(tmom, dedx, GetEventWeight());
2818  if(e > 0.5 && tmom > 0.5) fh2EledEdxMod->Fill(dedx, nModule, GetEventWeight());
2819  }
2820 
2821  if(IsDataMC() && okPrimary)
2822  {
2823  Double_t charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
2824 
2825  if(TMath::Abs(pdg) == 11)
2826  {
2827  fhMCEle1EOverP ->Fill(tpt , eOverP, GetEventWeight());
2828  fhMCEle1dR ->Fill(dR , GetEventWeight());
2829  fhMCEle2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
2830 
2831  if(dR < 0.02)
2832  {
2833  fhMCEle1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
2834  if(dedx > 60 && dedx < 100) fhMCEle1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
2835  }
2836  }
2837  else if(charge!=0)
2838  {
2839  fhMCChHad1EOverP ->Fill(tpt , eOverP, GetEventWeight());
2840  fhMCChHad1dR ->Fill(dR , GetEventWeight());
2841  fhMCChHad2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
2842 
2843  if(dR < 0.02)
2844  {
2845  fhMCChHad1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
2846  if(dedx > 60 && dedx < 100) fhMCChHad1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
2847  }
2848  }
2849  else if(charge == 0)
2850  {
2851  fhMCNeutral1EOverP ->Fill(tpt , eOverP, GetEventWeight());
2852  fhMCNeutral1dR ->Fill(dR , GetEventWeight());
2853  fhMCNeutral2MatchdEdx->Fill(tmom, dedx , GetEventWeight());
2854 
2855  if(dR < 0.02)
2856  {
2857  fhMCNeutral1EOverPR02->Fill(tpt, eOverP, GetEventWeight());
2858  if(dedx > 60 && dedx < 100) fhMCNeutral1EleEOverP->Fill(tpt, eOverP, GetEventWeight());
2859  }
2860  }
2861  } // DataMC
2862 }
2863 
2864 //___________________________________
2867 //___________________________________
2869 {
2870  // Clusters arrays
2871  TObjArray * caloClustersEMCAL = GetEMCALClusters();
2872  TObjArray * caloClustersPHOS = GetPHOSClusters();
2873 
2874  if(!caloClustersEMCAL || !caloClustersPHOS)
2875  {
2876  AliDebug(1,Form("PHOS (%p) or EMCAL (%p) clusters array not available, do not correlate",caloClustersPHOS,caloClustersEMCAL));
2877  return ;
2878  }
2879 
2880  // Cells arrays
2881  AliVCaloCells * cellsEMCAL = GetEMCALCells();
2882  AliVCaloCells * cellsPHOS = GetPHOSCells();
2883 
2884  if(!cellsEMCAL || !cellsPHOS)
2885  {
2886  AliDebug(1,Form("PHOS (%p) or EMCAL (%p) cells array ot available, do not correlate",cellsPHOS,cellsEMCAL));
2887  return ;
2888  }
2889 
2890  // Clusters parameters
2891  Int_t nclEMCAL = 0;
2892  Int_t nclDCAL = 0;
2893  Int_t nclPHOS = 0;
2894 
2895  Float_t sumClusterEnergyEMCAL = 0;
2896  Float_t sumClusterEnergyDCAL = 0;
2897  Float_t sumClusterEnergyPHOS = 0;
2898 
2899  Int_t iclus = 0;
2900  Float_t energy = 0;
2901  AliVCluster* cluster = 0;
2902  for(iclus = 0 ; iclus < caloClustersEMCAL->GetEntriesFast() ; iclus++)
2903  {
2904  cluster = (AliVCluster*)caloClustersEMCAL->At(iclus);
2905  Float_t energy = cluster->E();
2906 
2907  if( energy < 0.5 ) continue;
2908 
2909  if(cluster->GetCellsAbsId()[0] < 12288)
2910  {
2911  nclEMCAL++;
2912  sumClusterEnergyEMCAL += energy;
2913  }
2914  else
2915  {
2916  nclDCAL++;
2917  sumClusterEnergyDCAL += energy;
2918  }
2919  }
2920 
2921  for(iclus = 0 ; iclus < caloClustersPHOS ->GetEntriesFast(); iclus++)
2922  {
2923  cluster = (AliVCluster*) caloClustersPHOS->At(iclus);
2924 
2925  energy = cluster->E();
2926 
2927  if( energy < 0.5 ) continue;
2928 
2929  nclPHOS++;
2930  sumClusterEnergyPHOS += energy;
2931  }
2932 
2933  // Cells parameters
2934  Int_t ncellsEMCAL = 0 ;
2935  Int_t ncellsDCAL = 0 ;
2936  Int_t ncellsPHOS = 0;
2937 
2938  Float_t sumCellEnergyEMCAL = 0;
2939  Float_t sumCellEnergyDCAL = 0;
2940  Float_t sumCellEnergyPHOS = 0;
2941  Int_t icell = 0;
2942  for(icell = 0 ; icell < cellsEMCAL->GetNumberOfCells() ; icell++)
2943  {
2944  Float_t amp = cellsEMCAL->GetAmplitude(icell);
2945  Int_t cellId = cellsEMCAL->GetCellNumber(icell);
2946 
2947  if (amp < fEMCALCellAmpMin) continue;
2948 
2949  if( cellId < 12288)
2950  {
2951  ncellsEMCAL++;
2952  sumCellEnergyEMCAL += amp;
2953  }
2954  else
2955  {
2956  ncellsDCAL++;
2957  sumCellEnergyDCAL += amp;
2958  }
2959  }
2960 
2961  for(icell = 0 ; icell < cellsPHOS->GetNumberOfCells(); icell++)
2962  {
2963  Float_t amp = cellsPHOS->GetAmplitude(icell);
2964  Int_t cellId = cellsPHOS->GetCellNumber(icell);
2965 
2966  if ( cellId < 0 ) continue ; // CPV
2967 
2968  if ( amp < fPHOSCellAmpMin ) continue;
2969 
2970  ncellsPHOS++;
2971  sumCellEnergyPHOS += amp;
2972  }
2973 
2974  // Fill Histograms
2975 
2976  fhEMCALPHOSCorrNClusters->Fill(nclEMCAL , nclPHOS , GetEventWeight());
2977  fhEMCALPHOSCorrEClusters->Fill(sumClusterEnergyEMCAL, sumClusterEnergyPHOS, GetEventWeight());
2978  fhEMCALPHOSCorrNCells ->Fill(ncellsEMCAL , ncellsPHOS , GetEventWeight());
2979  fhEMCALPHOSCorrECells ->Fill(sumCellEnergyEMCAL , sumCellEnergyPHOS , GetEventWeight());
2980 
2981  fhEMCALDCALCorrNClusters->Fill(nclEMCAL , nclDCAL , GetEventWeight());
2982  fhEMCALDCALCorrEClusters->Fill(sumClusterEnergyEMCAL, sumClusterEnergyDCAL, GetEventWeight());
2983  fhEMCALDCALCorrNCells ->Fill(ncellsEMCAL , ncellsDCAL , GetEventWeight());
2984  fhEMCALDCALCorrECells ->Fill(sumCellEnergyEMCAL , sumCellEnergyDCAL , GetEventWeight());
2985 
2986  fhDCALPHOSCorrNClusters ->Fill(nclDCAL , nclPHOS , GetEventWeight());
2987  fhDCALPHOSCorrEClusters ->Fill(sumClusterEnergyDCAL , sumClusterEnergyPHOS, GetEventWeight());
2988  fhDCALPHOSCorrNCells ->Fill(ncellsDCAL , ncellsPHOS , GetEventWeight());
2989  fhDCALPHOSCorrECells ->Fill(sumCellEnergyDCAL , sumCellEnergyPHOS , GetEventWeight());
2990 
2991  Int_t v0S = GetV0Signal(0) + GetV0Signal(1);
2993  Int_t trM = GetTrackMultiplicity();
2994  Float_t cen = GetEventCentrality();
2995  Float_t ep = GetEventPlaneAngle();
2996 
2997  Int_t ncl = nclPHOS;
2998  Float_t sumClusterEnergy = sumClusterEnergyPHOS;
2999  Int_t ncells = ncellsPHOS;
3000  Float_t sumCellEnergy = sumCellEnergyPHOS;
3001 
3002  if ( GetCalorimeter() == kEMCAL )
3003  {
3004  ncl = nclEMCAL + nclDCAL;
3005  sumClusterEnergy = sumClusterEnergyEMCAL + sumClusterEnergyDCAL;
3006  ncells = ncellsEMCAL + ncellsDCAL;
3007  sumCellEnergy = sumCellEnergyEMCAL + sumCellEnergyDCAL;
3008  }
3009 
3010  fhCaloV0MCorrNClusters ->Fill(v0M, ncl , GetEventWeight());
3011  fhCaloV0MCorrEClusters ->Fill(v0M, sumClusterEnergy, GetEventWeight());
3012  fhCaloV0MCorrNCells ->Fill(v0M, ncells , GetEventWeight());
3013  fhCaloV0MCorrECells ->Fill(v0M, sumCellEnergy , GetEventWeight());
3014 
3015  fhCaloV0SCorrNClusters ->Fill(v0S, ncl , GetEventWeight());
3016  fhCaloV0SCorrEClusters ->Fill(v0S, sumClusterEnergy, GetEventWeight());
3017  fhCaloV0SCorrNCells ->Fill(v0S, ncells , GetEventWeight());
3018  fhCaloV0SCorrECells ->Fill(v0S, sumCellEnergy , GetEventWeight());
3019 
3020  fhCaloTrackMCorrNClusters->Fill(trM, ncl , GetEventWeight());
3021  fhCaloTrackMCorrEClusters->Fill(trM, sumClusterEnergy, GetEventWeight());
3022  fhCaloTrackMCorrNCells ->Fill(trM, ncells , GetEventWeight());
3023  fhCaloTrackMCorrECells ->Fill(trM, sumCellEnergy , GetEventWeight());
3024 
3025  fhCaloCenNClusters ->Fill(cen, ncl , GetEventWeight());
3026  fhCaloCenEClusters ->Fill(cen, sumClusterEnergy, GetEventWeight());
3027  fhCaloCenNCells ->Fill(cen, ncells , GetEventWeight());
3028  fhCaloCenECells ->Fill(cen, sumCellEnergy , GetEventWeight());
3029 
3030  fhCaloEvPNClusters ->Fill(ep , ncl , GetEventWeight());
3031  fhCaloEvPEClusters ->Fill(ep , sumClusterEnergy, GetEventWeight());
3032  fhCaloEvPNCells ->Fill(ep , ncells , GetEventWeight());
3033  fhCaloEvPECells ->Fill(ep , sumCellEnergy , GetEventWeight());
3034 
3035  AliDebug(1,"Correlate():");
3036  AliDebug(1,Form("\t EMCAL: N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
3037  ncellsEMCAL,nclEMCAL, sumCellEnergyEMCAL,sumClusterEnergyEMCAL));
3038  AliDebug(1,Form("\t DCAL : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
3039  ncellsDCAL,nclDCAL, sumCellEnergyDCAL,sumClusterEnergyDCAL));
3040  AliDebug(1,Form("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
3041  ncellsPHOS,nclPHOS,sumCellEnergyPHOS,sumClusterEnergyPHOS));
3042  AliDebug(1,Form("\t V0 : Signal %d, Multiplicity %d, Track Multiplicity %d", v0S,v0M,trM));
3043  AliDebug(1,Form("\t centrality : %f, Event plane angle %f", cen,ep));
3044 }
3045 
3046 //_________________________________________________
3048 //_________________________________________________
3050 {
3051  TString parList ; //this will be list of parameters used for this analysis.
3052  const Int_t buffersize = 255;
3053  char onePar[buffersize] ;
3054 
3055  snprintf(onePar,buffersize,"--- AliAnaCalorimeterQA ---:") ;
3056  parList+=onePar ;
3057  snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
3058  parList+=onePar ;
3059  snprintf(onePar,buffersize,"Time Cut : %2.2f < T < %2.2f ns;",fTimeCutMin, fTimeCutMax) ;
3060  parList+=onePar ;
3061  snprintf(onePar,buffersize,"Cell Amplitude: PHOS > %2.2f GeV, EMCAL > %2.2f GeV;",fPHOSCellAmpMin, fEMCALCellAmpMin) ;
3062  parList+=onePar ;
3063  snprintf(onePar,buffersize,"Cluster M02: EMCAL > %2.2f ;",fEMCALClusterM02Min) ;
3064  parList+=onePar ;
3065  snprintf(onePar,buffersize,"N cells per cluster: PHOS >= %d, EMCAL >= %d;",fPHOSClusterNCellMin, fEMCALClusterNCellMin) ;
3066  parList+=onePar ;
3067  snprintf(onePar,buffersize,"Inv. Mass %2.1f < E_cl < %2.1f GeV;",fInvMassMinECut, fInvMassMaxECut) ;
3068  parList+=onePar ;
3069  snprintf(onePar,buffersize,"Inv. Mass %2.1f < M02 < %2.1f GeV;",fInvMassMinM02Cut, fInvMassMaxM02Cut) ;
3070  parList+=onePar ;
3071  snprintf(onePar,buffersize,"Cluster pair opening angle < %2.1f rad;",fInvMassMaxOpenAngle) ;
3072  parList+=onePar ;
3073  snprintf(onePar,buffersize,"Cluster pair time difference < %2.1f rad;",fInvMassMaxTimeDifference) ;
3074  parList+=onePar ;
3075 
3076  //Get parameters set in base class.
3077  //parList += GetBaseParametersList() ;
3078 
3079  //Get parameters set in FiducialCut class (not available yet)
3080  //parlist += GetFidCut()->GetFidCutParametersList()
3081 
3082  return new TObjString(parList) ;
3083 }
3084 
3085 //___________________________________________________
3088 //___________________________________________________
3090 {
3091  TList * outputContainer = new TList() ;
3092  outputContainer->SetName("QAHistos") ;
3093 
3094  // Init the number of modules, set in the class AliCalorimeterUtils
3095  //
3096  InitCaloParameters(); // See AliCaloTrackCorrBaseClass
3097 
3098  Int_t totalSM = fLastModule-fFirstModule+1;
3099 
3100  //printf("N SM %d, first SM %d, last SM %d, total %d\n",fNModules,fFirstModule,fLastModule, totalSM);
3101 
3102  // Histogram binning and ranges
3103  //
3124 
3128 
3129  // TM residuals
3136 
3137  // Cell column-row histograms, see base class for data members setting
3138  //fNMaxColsFull+2,-1.5,fNMaxColsFull+0.5, fNMaxRowsFull+2,-1.5,fNMaxRowsFull+0.5
3139  Int_t ncolcell = fNMaxColsFull+2;
3140  Float_t colcellmin = -1.5;
3141  Float_t colcellmax = fNMaxColsFull+0.5;
3142 
3144  Float_t rowcellmin = fNMaxRowsFullMin-1.5;
3145  Float_t rowcellmax = fNMaxRowsFullMax+0.5;
3146 
3147  //
3148  // Init histograms
3149  //
3150 
3151  // Calorimeter cluster histograms
3152  //
3154  {
3155  fhE = new TH1F ("hE","#it{E} reconstructed clusters ", nptbins*5,ptmin,ptmax*5);
3156  fhE->SetXTitle("#it{E} (GeV)");
3157  outputContainer->Add(fhE);
3158 
3159  fhPt = new TH1F ("hPt","#it{p}_{T} reconstructed clusters", nptbins,ptmin,ptmax);
3160  fhPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3161  outputContainer->Add(fhPt);
3162 
3163  fhNClusters = new TH1F ("hNClusters","# clusters", nclbins,nclmin,nclmax);
3164  fhNClusters->SetXTitle("#it{n}_{clusters}");
3165  outputContainer->Add(fhNClusters);
3166 
3167  fhNCellsPerCluster = new TH2F ("hNCellsPerCluster","# cells per cluster vs energy",nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3168  fhNCellsPerCluster->SetXTitle("#it{E} (GeV)");
3169  fhNCellsPerCluster->SetYTitle("#it{n}_{cells}");
3170  outputContainer->Add(fhNCellsPerCluster);
3171 
3172  fhNCellsPerClusterWeirdMod = new TH2F ("hNCellsPerClusterWeirdMod","# cells per cluster, E > 100 GeV, per SM",
3173  nceclbins*2,nceclmin,nceclmax*2,totalSM,fFirstModule-0.5,fLastModule+0.5);
3174  fhNCellsPerClusterWeirdMod->SetYTitle("SM number");
3175  fhNCellsPerClusterWeirdMod->SetXTitle("#it{n}_{cells}");
3176  outputContainer->Add(fhNCellsPerClusterWeirdMod);
3177 
3178  // Acceptance plots
3179  //
3180  fhPhi = new TH1F ("hPhi","#varphi reconstructed clusters ",nphibins,phimin,phimax);
3181  fhPhi->SetXTitle("#varphi (rad)");
3182  outputContainer->Add(fhPhi);
3183 
3184  fhEta = new TH1F ("hEta","#eta reconstructed clusters ",netabins,etamin,etamax);
3185  fhEta->SetXTitle("#eta ");
3186  outputContainer->Add(fhEta);
3187 
3189  {
3190  for(Int_t ie=0; ie<fNEBinCuts; ie++)
3191  {
3192  fhEBinClusterEtaPhi[ie] = new TH2F
3193  (Form("hEBin%d_Cluster_EtaPhi",ie),
3194  Form("#eta vs #varphi, cluster, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
3195  netabins,etamin,etamax,nphibins,phimin,phimax);
3196  fhEBinClusterEtaPhi[ie]->SetYTitle("#varphi (rad)");
3197  fhEBinClusterEtaPhi[ie]->SetXTitle("#eta");
3198  outputContainer->Add(fhEBinClusterEtaPhi[ie]) ;
3199 
3200  fhEBinClusterColRow[ie] = new TH2F
3201  (Form("hEBin%d_Cluster_ColRow",ie),
3202  Form("column vs row, cluster max E cell, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
3203  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3204  fhEBinClusterColRow[ie]->SetYTitle("row");
3205  fhEBinClusterColRow[ie]->SetXTitle("column");
3206  outputContainer->Add(fhEBinClusterColRow[ie]) ;
3207 
3209  {
3210  fhEBinCellColRow[ie] = new TH2F
3211  (Form("hEBin%d_Cell_ColRow",ie),
3212  Form("column vs row, cell, %2.2f<#it{p}_{T}<%2.2f GeV/#it{c}",fEBinCuts[ie],fEBinCuts[ie+1]),
3213  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3214  fhEBinCellColRow[ie]->SetYTitle("row");
3215  fhEBinCellColRow[ie]->SetXTitle("column");
3216  outputContainer->Add(fhEBinCellColRow[ie]) ;
3217  }
3218  }
3219  }
3220  else
3221  {
3222  if(fFillAllTH3)
3223  {
3224  fhEtaPhiE = new TH3F ("hEtaPhiE","#eta vs #varphi vs energy, reconstructed clusters",
3225  netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax);
3226  fhEtaPhiE->SetXTitle("#eta ");
3227  fhEtaPhiE->SetYTitle("#varphi (rad)");
3228  fhEtaPhiE->SetZTitle("#it{E} (GeV) ");
3229  outputContainer->Add(fhEtaPhiE);
3230  }
3231  else
3232  {
3233  fhEtaPhi = new TH2F ("hEtaPhi","#eta vs #varphi for #it{E} > 0.5 GeV, reconstructed clusters",
3234  netabins,etamin,etamax,nphibins,phimin,phimax);
3235  fhEtaPhi->SetXTitle("#eta ");
3236  fhEtaPhi->SetYTitle("#varphi (rad)");
3237  outputContainer->Add(fhEtaPhi);
3238  }
3239  }
3240 
3241  fhClusterTimeEnergy = new TH2F ("hClusterTimeEnergy","energy vs TOF, reconstructed clusters",
3242  nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
3243  fhClusterTimeEnergy->SetXTitle("#it{E} (GeV) ");
3244  fhClusterTimeEnergy->SetYTitle("TOF (ns)");
3245  outputContainer->Add(fhClusterTimeEnergy);
3246 
3248  {
3249  fhClusterPairDiffTimeE = new TH2F("hClusterPairDiffTimeE","cluster pair time difference vs E, only good clusters",
3250  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
3251  fhClusterPairDiffTimeE->SetXTitle("#it{E}_{cluster} (GeV)");
3252  fhClusterPairDiffTimeE->SetYTitle("#Delta #it{t} (ns)");
3253  outputContainer->Add(fhClusterPairDiffTimeE);
3254 
3255  fhClusterPairDiffTimeESameMod = new TH2F("hClusterPairDiffTimeESameMod","cluster pair time difference vs E, only good clusters",
3256  nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
3257  fhClusterPairDiffTimeESameMod->SetXTitle("#it{E}_{cluster} (GeV)");
3258  fhClusterPairDiffTimeESameMod->SetYTitle("#Delta #it{t} (ns)");
3259  outputContainer->Add(fhClusterPairDiffTimeESameMod);
3260  }
3261 
3262  // Shower shape
3263  //
3264  //fhDispersion = new TH2F ("hDispersion","shower shape, Dispersion^{2} vs E for bad cluster ",
3265  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3266  //fhDispersion->SetXTitle("#it{E}_{cluster} (GeV)");
3267  //fhDispersion->SetYTitle("Dispersion");
3268  //outputContainer->Add(fhDispersion);
3269 
3270  fhLambda0 = new TH2F ("hLambda0","shower shape, #lambda^{2}_{0} vs E",
3271  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3272  fhLambda0->SetXTitle("#it{E}_{cluster} (GeV)");
3273  fhLambda0->SetYTitle("#lambda^{2}_{0}");
3274  outputContainer->Add(fhLambda0);
3275 
3276  fhLambda1 = new TH2F ("hLambda1","shower shape, #lambda^{2}_{1} vs E",
3277  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3278  fhLambda1->SetXTitle("#it{E}_{cluster} (GeV)");
3279  fhLambda1->SetYTitle("#lambda^{2}_{1}");
3280  outputContainer->Add(fhLambda1);
3281 
3282  fhNLocMax = new TH2F ("hNLocMax","#it{n}_{LM}vs E",
3283  nptbins,ptmin,ptmax,10,0,10);
3284  fhNLocMax->SetXTitle("#it{E}_{cluster} (GeV)");
3285  fhNLocMax->SetYTitle("#it{n}_{LM}");
3286  outputContainer->Add(fhNLocMax);
3287 
3289  {
3291  ("hColRowHighEPosTime",
3292  "column vs row, exo < 0.97, E > 8 GeV, t > 5 ns",
3293  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3294  fhColRowHighEPosTime->SetYTitle("row");
3295  fhColRowHighEPosTime->SetXTitle("column");
3296  outputContainer->Add(fhColRowHighEPosTime) ;
3297 
3299  ("hColRowHighENegTime",
3300  "column vs row, exo < 0.97, E > 8 GeV, t < -5 ns",
3301  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3302  fhColRowHighENegTime->SetYTitle("row");
3303  fhColRowHighENegTime->SetXTitle("column");
3304  outputContainer->Add(fhColRowHighENegTime) ;
3305 
3307  ("hColRowHighENulTime",
3308  "column vs row, exo < 0.97, E > 8 GeV, -5 < t < 5 ns",
3309  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3310  fhColRowHighENulTime->SetYTitle("row");
3311  fhColRowHighENulTime->SetXTitle("column");
3312  outputContainer->Add(fhColRowHighENulTime) ;
3313 
3314  if(fStudyExotic)
3315  {
3317  ("hColRowExoticHighE1CellPosTime",
3318  "column vs row, 1 cell, E > 8 GeV, t > 5 ns",
3319  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3320  fhColRowExoticHighE1CellPosTime->SetYTitle("row");
3321  fhColRowExoticHighE1CellPosTime->SetXTitle("column");
3322  outputContainer->Add(fhColRowExoticHighE1CellPosTime) ;
3323 
3325  ("hColRowExoticHighEPosTime",
3326  "column vs row, exo > 0.97, E > 8 GeV, t > 5 ns",
3327  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3328  fhColRowExoticHighEPosTime->SetYTitle("row");
3329  fhColRowExoticHighEPosTime->SetXTitle("column");
3330  outputContainer->Add(fhColRowExoticHighEPosTime) ;
3331 
3333  ("hColRowExoticHighE1CellNegTime",
3334  "column vs row, 1 cell, E > 8 GeV, t < -5 ns",
3335  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3336  fhColRowExoticHighE1CellNegTime->SetYTitle("row");
3337  fhColRowExoticHighE1CellNegTime->SetXTitle("column");
3338  outputContainer->Add(fhColRowExoticHighE1CellNegTime) ;
3339 
3341  ("hColRowExoticHighENegTime",
3342  "column vs row, exo > 0.97, E > 8 GeV, t < -5 ns",
3343  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3344  fhColRowExoticHighENegTime->SetYTitle("row");
3345  fhColRowExoticHighENegTime->SetXTitle("column");
3346  outputContainer->Add(fhColRowExoticHighENegTime) ;
3347 
3349  ("hColRowExoticHighE1CellNulTime",
3350  "column vs row, 1 cell, E > 8 GeV, -5 < t < 5 ns",
3351  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3352  fhColRowExoticHighE1CellNulTime->SetYTitle("row");
3353  fhColRowExoticHighE1CellNulTime->SetXTitle("column");
3354  outputContainer->Add(fhColRowExoticHighE1CellNulTime) ;
3355 
3357  ("hColRowExoticHighENulTime",
3358  "column vs row, exo > 0.97, E > 8 GeV, -5 < t < 5 ns",
3359  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3360  fhColRowExoticHighENulTime->SetYTitle("row");
3361  fhColRowExoticHighENulTime->SetXTitle("column");
3362  outputContainer->Add(fhColRowExoticHighENulTime) ;
3363  }
3364 
3365  TString add[] = {"","TrackMatched"};
3366  for(Int_t tm = 0; tm < 2; tm++)
3367  {
3369  (Form("hColRowTCardCorrNoSelectionLowE%s",add[tm].Data()),
3370  Form("column vs row, max E cell for TCard correlation selected clusters, 5 < E < 8 GeV %s",add[tm].Data()),
3371  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3372  fhColRowTCardCorrNoSelectionLowE[tm]->SetYTitle("row");
3373  fhColRowTCardCorrNoSelectionLowE[tm]->SetXTitle("column");
3374  outputContainer->Add(fhColRowTCardCorrNoSelectionLowE[tm]) ;
3375 
3377  (Form("hColRowTCardCorrNoSelectionHighE%s",add[tm].Data()),
3378  Form("column vs row, max E cell for TCard correlation selected clusters, E > 8 GeV %s",add[tm].Data()),
3379  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3380  fhColRowTCardCorrNoSelectionHighE[tm]->SetYTitle("row");
3381  fhColRowTCardCorrNoSelectionHighE[tm]->SetXTitle("column");
3382  outputContainer->Add(fhColRowTCardCorrNoSelectionHighE[tm]) ;
3383 
3384  //
3385 
3387  (Form("hNCellsTCardCorrNoSelection%s",add[tm].Data()),
3388  Form("# custer # cells vs #it{E} %s",add[tm].Data()),
3389  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3390  fhNCellsTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3391  fhNCellsTCardCorrNoSelection[tm]->SetYTitle("#it{n}_{cells}");
3392  outputContainer->Add(fhNCellsTCardCorrNoSelection[tm]);
3393 
3395  (Form("hNCellsTCardCorrWithWeightNoSelection%s",add[tm].Data()),
3396  Form("custer # cells vs #it{E}, w > 0.01 %s",add[tm].Data()),
3397  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3398  fhNCellsTCardCorrWithWeightNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3399  fhNCellsTCardCorrWithWeightNoSelection[tm]->SetYTitle("#it{n}_{cells}");
3400  outputContainer->Add(fhNCellsTCardCorrWithWeightNoSelection[tm]);
3401 
3403  (Form("hNCellsTCardCorrRatioWithWeightNoSelection%s",add[tm].Data()),
3404  Form("custer # cells vs #it{E}, w > 0.01 %s",add[tm].Data()),
3405  nptbins,ptmin,ptmax, 100,0,1);
3406  fhNCellsTCardCorrRatioWithWeightNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3407  fhNCellsTCardCorrRatioWithWeightNoSelection[tm]->SetYTitle("#it{n}^{w>0.01}_{cells} / #it{n}_{cells}");
3408  outputContainer->Add(fhNCellsTCardCorrRatioWithWeightNoSelection[tm]);
3409 
3411  (Form("hLambda0TCardCorrNoSelection%s",add[tm].Data()),
3412  Form("#lambda^{2}_{0} vs #it{E} %s",add[tm].Data()),
3413  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3414  fhLambda0TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3415  fhLambda0TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{0}");
3416  outputContainer->Add(fhLambda0TCardCorrNoSelection[tm]);
3417 
3419  (Form("hLambda1TCardCorrNoSelection%s",add[tm].Data()),
3420  Form("#lambda^{2}_{1} vs #it{E} %s",add[tm].Data()),
3421  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3422  fhLambda1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3423  fhLambda1TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{1}");
3424  outputContainer->Add(fhLambda1TCardCorrNoSelection[tm]);
3425 
3427  (Form("hLambda0NLM1TCardCorrNoSelection%s",add[tm].Data()),
3428  Form("#lambda^{2}_{0} vs #it{E}, nlm=1 %s",add[tm].Data()),
3429  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3430  fhLambda0NLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3431  fhLambda0NLM1TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{0}");
3432  outputContainer->Add(fhLambda0NLM1TCardCorrNoSelection[tm]);
3433 
3435  (Form("hLambda1NLM1TCardCorrNoSelection%s",add[tm].Data()),
3436  Form("#lambda^{2}_{1} vs #it{E}, nlm=1 %s",add[tm].Data()),
3437  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3438  fhLambda1NLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3439  fhLambda1NLM1TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{1}");
3440  outputContainer->Add(fhLambda1NLM1TCardCorrNoSelection[tm]);
3441 
3443  (Form("hLambda0NLM2TCardCorrNoSelection%s",add[tm].Data()),
3444  Form("#lambda^{2}_{0} vs #it{E}, nlm=2 %s",add[tm].Data()),
3445  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3446  fhLambda0NLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3447  fhLambda0NLM2TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{0}");
3448  outputContainer->Add(fhLambda0NLM2TCardCorrNoSelection[tm]);
3449 
3451  (Form("hLambda1NLM2TCardCorrNoSelection%s",add[tm].Data()),
3452  Form("#lambda^{2}_{1} vs #it{E}, nlm=2 %s",add[tm].Data()),
3453  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3454  fhLambda1NLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3455  fhLambda1NLM2TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{1}");
3456  outputContainer->Add(fhLambda1NLM2TCardCorrNoSelection[tm]);
3457 
3458 
3460  (Form("hLambdaRTCardCorrNoSelection%s",add[tm].Data()),
3461  Form("#lambda^{1}_{0}/#lambda^{2}_{0} vs #it{E} %s",add[tm].Data()),
3462  nptbins,ptmin,ptmax,110,0,1.1);
3463  fhLambdaRTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3464  fhLambdaRTCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
3465  outputContainer->Add(fhLambdaRTCardCorrNoSelection[tm]);
3466 
3468  (Form("hNLocMaxTCardCorrNoSelection%s",add[tm].Data()),
3469  Form("#it{n}_{LM} vs E %s",add[tm].Data()),
3470  nptbins,ptmin,ptmax,10,0,10);
3471  fhNLocMaxTCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3472  fhNLocMaxTCardCorrNoSelection[tm]->SetYTitle("#it{n}_{LM}");
3473  outputContainer->Add(fhNLocMaxTCardCorrNoSelection[tm]);
3474 
3476  (Form("hEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
3477  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
3478  nptbins,ptmin,ptmax,100,0,1);
3479  fhEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3480  fhEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
3481  outputContainer->Add(fhEMaxRatNLM1TCardCorrNoSelection[tm]);
3482 
3484  (Form("hEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
3485  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
3486  nptbins,ptmin,ptmax,100,0,1);
3487  fhEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3488  fhEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
3489  outputContainer->Add(fhEMaxRatNLM2TCardCorrNoSelection[tm]);
3490 
3492  (Form("hEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
3493  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
3494  nptbins,ptmin,ptmax,100,0,1);
3495  fhEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3496  fhEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
3497  outputContainer->Add(fhEMaxRatNLM3TCardCorrNoSelection[tm]);
3498 
3500  (Form("hE2ndRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
3501  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cluster} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
3502  nptbins,ptmin,ptmax,100,0,1);
3503  fhE2ndRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3504  fhE2ndRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
3505  outputContainer->Add(fhE2ndRatNLM1TCardCorrNoSelection[tm]);
3506 
3508  (Form("hE2ndRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
3509  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
3510  nptbins,ptmin,ptmax,100,0,1);
3511  fhE2ndRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3512  fhE2ndRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
3513  outputContainer->Add(fhE2ndRatNLM2TCardCorrNoSelection[tm]);
3514 
3516  (Form("hE2ndRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
3517  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
3518  nptbins,ptmin,ptmax,100,0,1);
3519  fhE2ndRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3520  fhE2ndRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
3521  outputContainer->Add(fhE2ndRatNLM3TCardCorrNoSelection[tm]);
3522 
3523 
3525  (Form("hE2ndEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
3526  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
3527  nptbins,ptmin,ptmax,100,0,1);
3528  fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3529  fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
3530  outputContainer->Add(fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]);
3531 
3533  (Form("hE2ndEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
3534  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
3535  nptbins,ptmin,ptmax,100,0,1);
3536  fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3537  fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
3538  outputContainer->Add(fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]);
3539 
3541  (Form("hE2ndEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
3542  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
3543  nptbins,ptmin,ptmax,100,0,1);
3544  fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3545  fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
3546  outputContainer->Add(fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]);
3547 
3549 
3551  (Form("hE2ndSameRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
3552  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cluster} vs E, 2nd in same TCard as leading, #it{n}_{LM}=1 %s",add[tm].Data()),
3553  nptbins,ptmin,ptmax,100,0,1);
3554  fhE2ndSameRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3555  fhE2ndSameRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
3556  outputContainer->Add(fhE2ndSameRatNLM1TCardCorrNoSelection[tm]);
3557 
3559  (Form("hE2ndSameRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
3560  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs E, 2nd in same TCard as leading, #it{n}_{LM}=2 %s",add[tm].Data()),
3561  nptbins,ptmin,ptmax,100,0,1);
3562  fhE2ndSameRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3563  fhE2ndSameRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
3564  outputContainer->Add(fhE2ndSameRatNLM2TCardCorrNoSelection[tm]);
3565 
3567  (Form("hE2ndSameRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
3568  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs E, 2nd in same TCard as leading, #it{n}_{LM}>2 %s",add[tm].Data()),
3569  nptbins,ptmin,ptmax,100,0,1);
3570  fhE2ndSameRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3571  fhE2ndSameRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
3572  outputContainer->Add(fhE2ndSameRatNLM3TCardCorrNoSelection[tm]);
3573 
3574 
3576  (Form("hE2ndSameEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
3577  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max} vs E, 2nd in same TCard as leading, #it{n}_{LM}=1 %s",add[tm].Data()),
3578  nptbins,ptmin,ptmax,100,0,1);
3579  fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3580  fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
3581  outputContainer->Add(fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]);
3582 
3584  (Form("hE2ndSameEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
3585  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs E, 2nd in same TCard as leading, #it{n}_{LM}=2 %s",add[tm].Data()),
3586  nptbins,ptmin,ptmax,100,0,1);
3587  fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3588  fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
3589  outputContainer->Add(fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]);
3590 
3592  (Form("hE2ndSameEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
3593  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs E, 2nd in same TCard as leading, #it{n}_{LM}>2 %s",add[tm].Data()),
3594  nptbins,ptmin,ptmax,100,0,1);
3595  fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3596  fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
3597  outputContainer->Add(fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]);
3598 
3600 
3602  (Form("hECellClusRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
3603  Form("#it{E}_{cell}/#it{E}_{cluster} vs E_{cluster}, #it{n}_{LM}=1 %s",add[tm].Data()),
3604  nptbins,ptmin,ptmax,100,0,1);
3605  fhECellClusRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3606  fhECellClusRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3607  outputContainer->Add(fhECellClusRatNLM1TCardCorrNoSelection[tm]);
3608 
3610  (Form("hECellClusRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
3611  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
3612  nptbins,ptmin,ptmax,100,0,1);
3613  fhECellClusRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3614  fhECellClusRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3615  outputContainer->Add(fhECellClusRatNLM2TCardCorrNoSelection[tm]);
3616 
3618  (Form("hECellClusRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
3619  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
3620  nptbins,ptmin,ptmax,100,0,1);
3621  fhECellClusRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3622  fhECellClusRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3623  outputContainer->Add(fhECellClusRatNLM3TCardCorrNoSelection[tm]);
3624 
3626  (Form("hLogECellNLM1TCardCorrNoSelection%s",add[tm].Data()),
3627  Form("log(#it{E}_{cell}) vs E_{cluster}, #it{n}_{LM}=1, w > 0.01 %s",add[tm].Data()),
3628  nptbins,ptmin,ptmax,150,-3,3);
3629  fhLogECellNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3630  fhLogECellNLM1TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
3631  outputContainer->Add(fhLogECellNLM1TCardCorrNoSelection[tm]);
3632 
3634  (Form("hLogECellNLM2TCardCorrNoSelection%s",add[tm].Data()),
3635  Form("log(#it{E}_{cell}) vs E, #it{n}_{LM}=2, w > 0.01 %s",add[tm].Data()),
3636  nptbins,ptmin,ptmax,150,-3,3);
3637  fhLogECellNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3638  fhLogECellNLM2TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
3639  outputContainer->Add(fhLogECellNLM2TCardCorrNoSelection[tm]);
3640 
3642  (Form("hLogECellNLM3TCardCorrNoSelection%s",add[tm].Data()),
3643  Form("log(#it{E}_{cell}) vs E, #it{n}_{LM}>2, w > 0.01 %s",add[tm].Data()),
3644  nptbins,ptmin,ptmax,150,-3,3);
3645  fhLogECellNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3646  fhLogECellNLM3TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
3647  outputContainer->Add(fhLogECellNLM3TCardCorrNoSelection[tm]);
3648 
3649 
3651  (Form("hECellWeightNLM1TCardCorrNoSelection%s",add[tm].Data()),
3652  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs E_{cluster}, #it{n}_{LM}=1 %s",add[tm].Data()),
3653  nptbins,ptmin,ptmax,90,0,4.5);
3654  fhECellWeightNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3655  fhECellWeightNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3656  outputContainer->Add(fhECellWeightNLM1TCardCorrNoSelection[tm]);
3657 
3659  (Form("hECellWeightNLM2TCardCorrNoSelection%s",add[tm].Data()),
3660  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
3661  nptbins,ptmin,ptmax,90,0,4.5);
3662  fhECellWeightNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3663  fhECellWeightNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3664  outputContainer->Add(fhECellWeightNLM2TCardCorrNoSelection[tm]);
3665 
3667  (Form("hECellWeightNLM3TCardCorrNoSelection%s",add[tm].Data()),
3668  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
3669  nptbins,ptmin,ptmax,90,0,4.5);
3670  fhECellWeightNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3671  fhECellWeightNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3672  outputContainer->Add(fhECellWeightNLM3TCardCorrNoSelection[tm]);
3673 
3674 
3676  (Form("hECellSameClusRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
3677  Form("#it{E}_{cell}/#it{E}_{cluster} vs E_{cluster}, cell from same T-Card as leading, #it{n}_{LM}=1 %s",add[tm].Data()),
3678  nptbins,ptmin,ptmax,100,0,1);
3679  fhECellSameClusRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3680  fhECellSameClusRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3681  outputContainer->Add(fhECellSameClusRatNLM1TCardCorrNoSelection[tm]);
3682 
3684  (Form("hECellSameClusRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
3685  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, cell from same T-Card as leading, #it{n}_{LM}=2 %s",add[tm].Data()),
3686  nptbins,ptmin,ptmax,100,0,1);
3687  fhECellSameClusRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3688  fhECellSameClusRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3689  outputContainer->Add(fhECellSameClusRatNLM2TCardCorrNoSelection[tm]);
3690 
3692  (Form("hECellSameClusRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
3693  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, cell from same T-Card as leading, #it{n}_{LM}>2 %s",add[tm].Data()),
3694  nptbins,ptmin,ptmax,100,0,1);
3695  fhECellSameClusRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3696  fhECellSameClusRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3697  outputContainer->Add(fhECellSameClusRatNLM3TCardCorrNoSelection[tm]);
3698 
3700  (Form("hLogECellSameNLM1TCardCorrNoSelection%s",add[tm].Data()),
3701  Form("log(#it{E}_{cell}) vs E_{cluster}, cell from same T-Card as leading, #it{n}_{LM}=1, w > 0.01 %s",add[tm].Data()),
3702  nptbins,ptmin,ptmax,150,-3,3);
3703  fhLogECellSameNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3704  fhLogECellSameNLM1TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
3705  outputContainer->Add(fhLogECellSameNLM1TCardCorrNoSelection[tm]);
3706 
3708  (Form("hLogECellSameNLM2TCardCorrNoSelection%s",add[tm].Data()),
3709  Form("log(#it{E}_{cell}) vs E, #it{n}_{LM}=2, cell from same T-Card as leading, w > 0.01 %s",add[tm].Data()),
3710  nptbins,ptmin,ptmax,150,-3,3);
3711  fhLogECellSameNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3712  fhLogECellSameNLM2TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
3713  outputContainer->Add(fhLogECellSameNLM2TCardCorrNoSelection[tm]);
3714 
3716  (Form("hLogECellSameNLM3TCardCorrNoSelection%s",add[tm].Data()),
3717  Form("log(#it{E}_{cell}) vs E, #it{n}_{LM}>2, cell from same T-Card as leading, w > 0.01 %s",add[tm].Data()),
3718  nptbins,ptmin,ptmax,150,-3,3);
3719  fhLogECellSameNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3720  fhLogECellSameNLM3TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
3721  outputContainer->Add(fhLogECellSameNLM3TCardCorrNoSelection[tm]);
3722 
3723 
3725  (Form("hECellSameWeightNLM1TCardCorrNoSelection%s",add[tm].Data()),
3726  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs E_{cluster}, cell from same T-Card as leading, #it{n}_{LM}=1 %s",add[tm].Data()),
3727  nptbins,ptmin,ptmax,90,0,4.5);
3728  fhECellSameWeightNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3729  fhECellSameWeightNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3730  outputContainer->Add(fhECellSameWeightNLM1TCardCorrNoSelection[tm]);
3731 
3733  (Form("hECellSameWeightNLM2TCardCorrNoSelection%s",add[tm].Data()),
3734  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs E, cell from same T-Card as leading, #it{n}_{LM}=2 %s",add[tm].Data()),
3735  nptbins,ptmin,ptmax,90,0,4.5);
3736  fhECellSameWeightNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3737  fhECellSameWeightNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3738  outputContainer->Add(fhECellSameWeightNLM2TCardCorrNoSelection[tm]);
3739 
3741  (Form("hECellSameWeightNLM3TCardCorrNoSelection%s",add[tm].Data()),
3742  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))vs E, cell from same T-Card as leading, #it{n}_{LM}>2 %s",add[tm].Data()),
3743  nptbins,ptmin,ptmax,90,0,4.5);
3744  fhECellSameWeightNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3745  fhECellSameWeightNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3746  outputContainer->Add(fhECellSameWeightNLM3TCardCorrNoSelection[tm]);
3747 
3749  (Form("hExoticTCardCorrNoSelection%s",add[tm].Data()),
3750  Form("exoticity vs #it{E} %s",add[tm].Data()),
3751  nptbins,ptmin,ptmax,200,-1,1);
3752  fhExoticTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
3753  fhExoticTCardCorrNoSelection[tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3754  outputContainer->Add(fhExoticTCardCorrNoSelection[tm]);
3755 
3757  (Form("hNCellsTCardSameAndDiffFraction%s",add[tm].Data()),
3758  Form("#it{n}_{cells} same TCard vs diff TCard fraction, w > 0.01, %s",add[tm].Data()),
3759  nptbins,ptmin,ptmax,100,0,1);
3760  fhNCellsTCardSameAndDiffFraction[tm]->SetXTitle("#it{E} (GeV)");
3761  fhNCellsTCardSameAndDiffFraction[tm]->SetYTitle("#it{n}_{cells} - same TCard / #it{n}_{cells} - total");
3762  outputContainer->Add(fhNCellsTCardSameAndDiffFraction[tm]);
3763 
3765  (Form("hSameRowDiffColAndTCardCellsEnergyDiffClusterE%s",add[tm].Data()),
3766  Form("#Delta row = 0, |#Delta col = 1|, with respect to leading cell, #it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} vs #it{E}_{cluster} %s",add[tm].Data()),
3767  nptbins,ptmin,ptmax,200,-10,10);
3768  fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3769  fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
3770  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]);
3771 
3773  (Form("hSameRowDiffColAndTCardCellsTimeDiffClusterE%s",add[tm].Data()),
3774  Form("#Delta row = 0, |#Delta col = 1|, with respect to leading cell, #it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} vs #it{E}_{cluster} %s",add[tm].Data()),
3775  nptbins,ptmin,ptmax,200,-100,100);
3776  fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3777  fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
3778  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]);
3779 
3781  (Form("hSameRowDiffColAndTCardCellsEnergyDiffCellMaxE%s",add[tm].Data()),
3782  Form("#Delta row = 0, |#Delta col = 1|, with respect to leading cell, #it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} vs #it{E}_{cell max} %s",add[tm].Data()),
3783  nptbins,ptmin,ptmax,200,-10,10);
3784  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
3785  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
3786  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]);
3787 
3789  (Form("hSameRowDiffColAndTCardCellsTimeDiffCellMaxE%s",add[tm].Data()),
3790  Form("#Delta row = 0, |#Delta col = 1|, with respect to leading cell, #it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} vs #it{E}_{cell max} %s",add[tm].Data()),
3791  nptbins,ptmin,ptmax,200,-100,100);
3792  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
3793  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
3794  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]);
3795 
3796  if(fStudyExotic)
3797  {
3798  fhEnergyTime1Cell[tm] = new TH2F
3799  (Form("hEnergyTime1Cell%s",add[tm].Data()),
3800  Form("#it{t} vs #it{E}, 1 cells cluster %s",add[tm].Data()),
3801  nptbins,ptmin,ptmax,300,-150,150);
3802  fhEnergyTime1Cell[tm]->SetXTitle("#it{E} (GeV)");
3803  fhEnergyTime1Cell[tm]->SetYTitle("#it{t} (ns)");
3804  outputContainer->Add(fhEnergyTime1Cell[tm]);
3805 
3806  fhEnergyTimeExotic[tm] = new TH2F
3807  (Form("hEnergyTimeExotic%s",add[tm].Data()),
3808  Form("#it{t} vs #it{E}, exo > 0.97, %s",add[tm].Data()),
3809  nptbins,ptmin,ptmax,300,-150,150);
3810  fhEnergyTimeExotic[tm]->SetXTitle("#it{E} (GeV)");
3811  fhEnergyTimeExotic[tm]->SetYTitle("#it{t} (ns)");
3812  outputContainer->Add(fhEnergyTimeExotic[tm]);
3813 
3815  (Form("hEnergyTimeTCardCorrNoSelection1Cell%s",add[tm].Data()),
3816  Form("#it{t} vs #it{E}, 1 cells cluster %s",add[tm].Data()),
3817  nptbins,ptmin,ptmax,300,-150,150);
3818  fhEnergyTimeTCardCorrNoSelection1Cell[tm]->SetXTitle("#it{E} (GeV)");
3819  fhEnergyTimeTCardCorrNoSelection1Cell[tm]->SetYTitle("#it{t} (ns)");
3820  outputContainer->Add(fhEnergyTimeTCardCorrNoSelection1Cell[tm]);
3821 
3823  (Form("hEnergyTimeTCardCorrNoSelectionExotic%s",add[tm].Data()),
3824  Form("#it{t} vs #it{E}, exo > 0.97, %s",add[tm].Data()),
3825  nptbins,ptmin,ptmax,300,-150,150);
3826  fhEnergyTimeTCardCorrNoSelectionExotic[tm]->SetXTitle("#it{E} (GeV)");
3827  fhEnergyTimeTCardCorrNoSelectionExotic[tm]->SetYTitle("#it{t} (ns)");
3828  outputContainer->Add(fhEnergyTimeTCardCorrNoSelectionExotic[tm]);
3829 
3830  fhColRowExoticLowE1Cell[tm] = new TH2F
3831  (Form("hColRowExoticLowE1Cell%s",add[tm].Data()),
3832  Form("column vs row, 1 cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3833  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3834  fhColRowExoticLowE1Cell[tm]->SetYTitle("row");
3835  fhColRowExoticLowE1Cell[tm]->SetXTitle("column");
3836  outputContainer->Add(fhColRowExoticLowE1Cell[tm]) ;
3837 
3838  fhColRowExoticHighE1Cell[tm] = new TH2F
3839  (Form("hColRowExoticHighE1Cell%s",add[tm].Data()),
3840  Form("column vs row, 1 cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3841  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3842  fhColRowExoticHighE1Cell[tm]->SetYTitle("row");
3843  fhColRowExoticHighE1Cell[tm]->SetXTitle("column");
3844  outputContainer->Add(fhColRowExoticHighE1Cell[tm]) ;
3845 
3846  fhColRowExoticLowE[tm] = new TH2F
3847  (Form("hColRowExoticLowE%s",add[tm].Data()),
3848  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3849  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3850  fhColRowExoticLowE[tm]->SetYTitle("row");
3851  fhColRowExoticLowE[tm]->SetXTitle("column");
3852  outputContainer->Add(fhColRowExoticLowE[tm]) ;
3853 
3854  fhColRowExoticHighE[tm] = new TH2F
3855  (Form("hColRowExoticHighE%s",add[tm].Data()),
3856  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3857  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3858  fhColRowExoticHighE[tm]->SetYTitle("row");
3859  fhColRowExoticHighE[tm]->SetXTitle("column");
3860  outputContainer->Add(fhColRowExoticHighE[tm]) ;
3861 
3863  (Form("hColRowExotic2ndCellDiffLowE%s",add[tm].Data()),
3864  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3865  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3866  fhColRowExotic2ndCellDiffLowE[tm]->SetYTitle("row");
3867  fhColRowExotic2ndCellDiffLowE[tm]->SetXTitle("column");
3868  outputContainer->Add(fhColRowExotic2ndCellDiffLowE[tm]) ;
3869 
3871  (Form("hColRowExotic2ndCellDiffHighE%s",add[tm].Data()),
3872  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3873  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3874  fhColRowExotic2ndCellDiffHighE[tm]->SetYTitle("row");
3875  fhColRowExotic2ndCellDiffHighE[tm]->SetXTitle("column");
3876  outputContainer->Add(fhColRowExotic2ndCellDiffHighE[tm]) ;
3877 
3879  (Form("hColRowExotic2ndCellSameLowE%s",add[tm].Data()),
3880  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3881  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3882  fhColRowExotic2ndCellSameLowE[tm]->SetYTitle("row");
3883  fhColRowExotic2ndCellSameLowE[tm]->SetXTitle("column");
3884  outputContainer->Add(fhColRowExotic2ndCellSameLowE[tm]) ;
3885 
3887  (Form("hColRowExotic2ndCellSameHighE%s",add[tm].Data()),
3888  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3889  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3890  fhColRowExotic2ndCellSameHighE[tm]->SetYTitle("row");
3891  fhColRowExotic2ndCellSameHighE[tm]->SetXTitle("column");
3892  outputContainer->Add(fhColRowExotic2ndCellSameHighE[tm]) ;
3893 
3895  (Form("hColRowTCardCorrNoSelectionExoticLowE%s",add[tm].Data()),
3896  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3897  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3898  fhColRowTCardCorrNoSelectionExoticLowE[tm]->SetYTitle("row");
3899  fhColRowTCardCorrNoSelectionExoticLowE[tm]->SetXTitle("column");
3900  outputContainer->Add(fhColRowTCardCorrNoSelectionExoticLowE[tm]) ;
3901 
3903  (Form("hColRowTCardCorrNoSelectionExoticHighE%s",add[tm].Data()),
3904  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3905  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3906  fhColRowTCardCorrNoSelectionExoticHighE[tm]->SetYTitle("row");
3907  fhColRowTCardCorrNoSelectionExoticHighE[tm]->SetXTitle("column");
3908  outputContainer->Add(fhColRowTCardCorrNoSelectionExoticHighE[tm]) ;
3909 
3911  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffLowE%s",add[tm].Data()),
3912  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3913  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3915  fhColRowTCardCorrNoSelectionExotic2ndCellDiffLowE[tm]->SetXTitle("column");
3916  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellDiffLowE[tm]) ;
3917 
3919  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffHighE%s",add[tm].Data()),
3920  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3921  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3923  fhColRowTCardCorrNoSelectionExotic2ndCellDiffHighE[tm]->SetXTitle("column");
3924  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellDiffHighE[tm]) ;
3925 
3927  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameLowE%s",add[tm].Data()),
3928  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3929  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3931  fhColRowTCardCorrNoSelectionExotic2ndCellSameLowE[tm]->SetXTitle("column");
3932  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellSameLowE[tm]) ;
3933 
3935  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameHighE%s",add[tm].Data()),
3936  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3937  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3939  fhColRowTCardCorrNoSelectionExotic2ndCellSameHighE[tm]->SetXTitle("column");
3940  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellSameHighE[tm]) ;
3941 
3943  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameLowE%s",add[tm].Data()),
3944  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3945  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3949 
3951  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameHighE%s",add[tm].Data()),
3952  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3953  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3957 
3959  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffLowE%s",add[tm].Data()),
3960  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3961  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3965 
3967  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffHighE%s",add[tm].Data()),
3968  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3969  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3973 
3975  (Form("hNCellsTCardSameAndDiffFraction_Exotic%s",add[tm].Data()),
3976  Form("#it{n}_{cells} same TCard vs diff TCard fraction, w > 0.01, exo > 0.97 %s",add[tm].Data()),
3977  nptbins,ptmin,ptmax,100,0,1);
3978  fhNCellsTCardSameAndDiffFractionExotic[tm]->SetXTitle("#it{E} (GeV)");
3979  fhNCellsTCardSameAndDiffFractionExotic[tm]->SetYTitle("#it{n}_{cells} - same TCard / #it{n}_{cells} - total");
3980  outputContainer->Add(fhNCellsTCardSameAndDiffFractionExotic[tm]);
3981 
3983  (Form("hSameRowDiffColAndTCardCellsEnergyDiffClusterEExo%s",add[tm].Data()),
3984  Form("#Delta row = 0, |#Delta col = 1|, with respect to leading cell, #it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} vs #it{E}_{cluster}, exo > 0.97 %s",add[tm].Data()),
3985  nptbins,ptmin,ptmax,200,-10,10);
3986  fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3987  fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
3988  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]);
3989 
3991  (Form("hSameRowDiffColAndTCardCellsTimeDiffClusterEExo%s",add[tm].Data()),
3992  Form("#Delta row = 0, |#Delta col = 1|, with respect to leading cell, #it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} vs #it{E}_{cluster}, exo > 0.97 %s",add[tm].Data()),
3993  nptbins,ptmin,ptmax,200,-100,100);
3994  fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3995  fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
3996  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]);
3997 
3999  (Form("hSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo%s",add[tm].Data()),
4000  Form("#Delta row = 0, |#Delta col = 1|, with respect to leading cell, #it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} vs #it{E}_{cell max}, exo > 0.97 %s",add[tm].Data()),
4001  nptbins,ptmin,ptmax,200,-10,10);
4002  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
4003  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
4004  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]);
4005 
4007  (Form("hSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo%s",add[tm].Data()),
4008  Form("#Delta row = 0, |#Delta col = 1|, with respect to leading cell, #it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} vs #it{E}_{cell max}, exo > 0.97 %s",add[tm].Data()),
4009  nptbins,ptmin,ptmax,200,-100,100);
4010  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
4011  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
4012  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]);
4013  }
4014 
4015  for(Int_t i = 0; i < 6; i++)
4016  {
4017  for(Int_t j = 0; j < 6; j++)
4018  {
4019  fhLambda0TCardCorrelNCell[i][j][tm] = new TH2F
4020  (Form("hLambda0TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4021  Form("#lambda^{2}_{0} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4022  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4023  fhLambda0TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4024  fhLambda0TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{0}");
4025  outputContainer->Add(fhLambda0TCardCorrelNCell[i][j][tm]);
4026 
4027  fhLambda1TCardCorrelNCell[i][j][tm] = new TH2F
4028  (Form("hLambda1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4029  Form("#lambda^{2}_{1} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4030  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4031  fhLambda1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4032  fhLambda1TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{1}");
4033  outputContainer->Add(fhLambda1TCardCorrelNCell[i][j][tm]);
4034 
4035  fhLambda0NLM1TCardCorrelNCell[i][j][tm] = new TH2F
4036  (Form("hLambda0NLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4037  Form("#lambda^{2}_{0} vs #it{E}, nlm=1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4038  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4039  fhLambda0NLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4040  fhLambda0NLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{0}");
4041  outputContainer->Add(fhLambda0NLM1TCardCorrelNCell[i][j][tm]);
4042 
4043  fhLambda1NLM1TCardCorrelNCell[i][j][tm] = new TH2F
4044  (Form("hLambda1NLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4045  Form("#lambda^{2}_{1} vs #it{E}, nlm=1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4046  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4047  fhLambda1NLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4048  fhLambda1NLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{1}");
4049  outputContainer->Add(fhLambda1NLM1TCardCorrelNCell[i][j][tm]);
4050 
4051  fhLambda0NLM2TCardCorrelNCell[i][j][tm] = new TH2F
4052  (Form("hLambda0NLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4053  Form("#lambda^{2}_{0} vs #it{E}, nlm=2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4054  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4055  fhLambda0NLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4056  fhLambda0NLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{0}");
4057  outputContainer->Add(fhLambda0NLM2TCardCorrelNCell[i][j][tm]);
4058 
4059  fhLambda1NLM2TCardCorrelNCell[i][j][tm] = new TH2F
4060  (Form("hLambda1NLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4061  Form("#lambda^{2}_{1} vs #it{E}, nlm=2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4062  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4063  fhLambda1NLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4064  fhLambda1NLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{1}");
4065  outputContainer->Add(fhLambda1NLM2TCardCorrelNCell[i][j][tm]);
4066 
4067 
4068  // fhLambdaRTCardCorrelNCell[i][j][tm] = new TH2F
4069  // (Form("hLambdaRTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4070  // Form("#lambda^{2}_{1}/#lambda^{2}_{0} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4071  // nptbins,ptmin,ptmax,110,0,1.1);
4072  // fhLambdaRTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4073  // fhLambdaRTCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
4074  // outputContainer->Add(fhLambdaRTCardCorrelNCell[i][j][tm]);
4075 
4076  fhNLocMaxTCardCorrelNCell[i][j][tm] = new TH2F
4077  (Form("hNLocMaxTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4078  Form("#it{n}_{LM} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4079  nptbins,ptmin,ptmax,10,0,10);
4080  fhNLocMaxTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4081  fhNLocMaxTCardCorrelNCell[i][j][tm]->SetYTitle("#it{n}_{LM}");
4082  outputContainer->Add(fhNLocMaxTCardCorrelNCell[i][j][tm]);
4083 
4084  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
4085  (Form("hEMaxRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4086  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} = 1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4087  nptbins,ptmin,ptmax,100,0,1);
4088  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4089  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
4090  outputContainer->Add(fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]);
4091 
4092  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
4093  (Form("hEMaxRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4094  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} = 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4095  nptbins,ptmin,ptmax,100,0,1);
4096  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4097  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
4098  outputContainer->Add(fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]);
4099 
4100  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
4101  (Form("hEMaxRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4102  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} > 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4103  nptbins,ptmin,ptmax,100,0,1);
4104  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4105  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
4106  outputContainer->Add(fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]);
4107 
4108  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
4109  (Form("hE2ndRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4110  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} = 1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4111  nptbins,ptmin,ptmax,100,0,1);
4112  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4113  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
4114  outputContainer->Add(fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]);
4115 
4116  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
4117  (Form("hE2ndRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4118  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} = 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4119  nptbins,ptmin,ptmax,100,0,1);
4120  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4121  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
4122  outputContainer->Add(fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]);
4123 
4124  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
4125  (Form("hE2ndRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4126  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} > 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4127  nptbins,ptmin,ptmax,100,0,1);
4128  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4129  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
4130  outputContainer->Add(fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]);
4131 
4132  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
4133  (Form("hE2ndEMaxRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4134  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max} vs #it{E}_{cluster}, #it{n}_{LM} = 1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4135  nptbins,ptmin,ptmax,100,0,1);
4136  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4137  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
4138  outputContainer->Add(fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]);
4139 
4140  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
4141  (Form("hE2ndEMaxRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4142  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs #it{E}_{cluster}, #it{n}_{LM} = 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4143  nptbins,ptmin,ptmax,100,0,1);
4144  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4145  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
4146  outputContainer->Add(fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]);
4147 
4148  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
4149  (Form("hE2ndEMaxRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4150  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs #it{E}_{cell}^{max}, #it{n}_{LM} > 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4151  nptbins,ptmin,ptmax,100,0,1);
4152  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4153  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
4154  outputContainer->Add(fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]);
4155 
4156 
4157  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
4158  (Form("hECellClusRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4159  Form("#it{E}_{cell}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} = 1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4160  nptbins,ptmin,ptmax,100,0,1);
4161  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4162  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
4163  outputContainer->Add(fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]);
4164 
4165  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
4166  (Form("hECellClusRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4167  Form("#it{E}_{cell}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} = 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4168  nptbins,ptmin,ptmax,100,0,1);
4169  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4170  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
4171  outputContainer->Add(fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]);
4172 
4173  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
4174  (Form("hECellClusRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4175  Form("#it{E}_{cell}/#it{E}_{cluster} vs #it{E}_{cluster}, #it{n}_{LM} > 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4176  nptbins,ptmin,ptmax,100,0,1);
4177  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4178  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
4179  outputContainer->Add(fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]);
4180 
4181  fhLogECellNLM1TCardCorrelNCell[i][j][tm] = new TH2F
4182  (Form("hLogECellNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4183  Form("log(#it{E}_{cell}) vs #it{E}_{cluster}, #it{n}_{LM} = 1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4184  nptbins,ptmin,ptmax,150,-3,3);
4185  fhLogECellNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4186  fhLogECellNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
4187  outputContainer->Add(fhLogECellNLM1TCardCorrelNCell[i][j][tm]);
4188 
4189  fhLogECellNLM2TCardCorrelNCell[i][j][tm] = new TH2F
4190  (Form("hLogECellNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4191  Form("log(#it{E}_{cell}) vs #it{E}_{cluster}, #it{n}_{LM} = 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4192  nptbins,ptmin,ptmax,150,-3,3);
4193  fhLogECellNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4194  fhLogECellNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
4195  outputContainer->Add(fhLogECellNLM2TCardCorrelNCell[i][j][tm]);
4196 
4197  fhLogECellNLM3TCardCorrelNCell[i][j][tm] = new TH2F
4198  (Form("hLogECellNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4199  Form("log(#it{E}_{cell}) vs #it{E}_{cluster}, #it{n}_{LM} > 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4200  nptbins,ptmin,ptmax,150,-3,3);
4201  fhLogECellNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4202  fhLogECellNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
4203  outputContainer->Add(fhLogECellNLM3TCardCorrelNCell[i][j][tm]);
4204 
4205  fhECellWeightNLM1TCardCorrelNCell[i][j][tm] = new TH2F
4206  (Form("hECellWeightNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4207  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs #it{E}_{cluster}, #it{n}_{LM} = 1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4208  nptbins,ptmin,ptmax,90,0,4.5);
4209  fhECellWeightNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4210  fhECellWeightNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
4211  outputContainer->Add(fhECellWeightNLM1TCardCorrelNCell[i][j][tm]);
4212 
4213  fhECellWeightNLM2TCardCorrelNCell[i][j][tm] = new TH2F
4214  (Form("hECellWeightNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4215  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs #it{E}_{cluster}, #it{n}_{LM} = 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4216  nptbins,ptmin,ptmax,90,0,4.5);
4217  fhECellWeightNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4218  fhECellWeightNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
4219  outputContainer->Add(fhECellWeightNLM2TCardCorrelNCell[i][j][tm]);
4220 
4221  fhECellWeightNLM3TCardCorrelNCell[i][j][tm] = new TH2F
4222  (Form("hECellWeightNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4223  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs #it{E}_{cluster}, #it{n}_{LM} > 2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4224  nptbins,ptmin,ptmax,90,0,4.5);
4225  fhECellWeightNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
4226  fhECellWeightNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("Log. weight");
4227  outputContainer->Add(fhECellWeightNLM3TCardCorrelNCell[i][j][tm]);
4228 
4229  fhMassEClusTCardCorrelNCell[i][j][tm] = new TH2F
4230  (Form("hMassEClusTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4231  Form("#it{M}_{#gamma #gamma} vs #it{E}_{cluster}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4232  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
4233  fhMassEClusTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
4234  fhMassEClusTCardCorrelNCell[i][j][tm]->SetYTitle("#it{M}_{#gamma #gamma}");
4235  outputContainer->Add(fhMassEClusTCardCorrelNCell[i][j][tm]);
4236 
4237  // fhMassEPairTCardCorrelNCell[i][j][tm] = new TH2F
4238  // (Form("hMassEPairTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4239  // Form("#it{M}_{#gamma #gamma} vs #it{E}_{pair}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4240  // nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
4241  // fhMassEPairTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{pair} (GeV)");
4242  // fhMassEPairTCardCorrelNCell[i][j][tm]->SetYTitle("#it{M}_{#gamma #gamma}");
4243  // outputContainer->Add(fhMassEPairTCardCorrelNCell[i][j][tm]);
4244 
4245  fhTimeDiffTCardCorrelNCell[i][j][tm] = new TH2F
4246  (Form("hTimeDiffTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4247  Form("#it{t}_{cell}^{max}-#it{t}_{cell}^{other} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4248  nptbins,ptmin,ptmax,300,-150,150);
4249  fhTimeDiffTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4250  fhTimeDiffTCardCorrelNCell[i][j][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell}^{other}");
4251  outputContainer->Add(fhTimeDiffTCardCorrelNCell[i][j][tm]);
4252 
4253  fhColRowTCardCorrelNCellLowE[i][j][tm] = new TH2F
4254  (Form("hColRowTCardCorrelNCellLowE_Same%d_Diff%d%s",i,j,add[tm].Data()),
4255  Form("column vs row, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4256  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4257  fhColRowTCardCorrelNCellLowE[i][j][tm]->SetYTitle("row");
4258  fhColRowTCardCorrelNCellLowE[i][j][tm]->SetXTitle("column");
4259  outputContainer->Add(fhColRowTCardCorrelNCellLowE[i][j][tm]) ;
4260 
4261  fhColRowTCardCorrelNCellHighE[i][j][tm] = new TH2F
4262  (Form("hColRowTCardCorrelNCellHighE_Same%d_Diff%d%s",i,j,add[tm].Data()),
4263  Form("column vs row,N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4264  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4265  fhColRowTCardCorrelNCellHighE[i][j][tm]->SetYTitle("row");
4266  fhColRowTCardCorrelNCellHighE[i][j][tm]->SetXTitle("column");
4267  outputContainer->Add(fhColRowTCardCorrelNCellHighE[i][j][tm]) ;
4268 
4269  if(fStudyExotic)
4270  {
4271  fhExoticTCardCorrelNCell[i][j][tm] = new TH2F
4272  (Form("hExoticTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4273  Form("exoticity vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4274  nptbins,ptmin,ptmax,200,-1,1);
4275  fhExoticTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4276  fhExoticTCardCorrelNCell[i][j][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4277  outputContainer->Add(fhExoticTCardCorrelNCell[i][j][tm]);
4278 
4279  fhTimeDiffExoTCardCorrelNCell[i][j][tm] = new TH2F
4280  (Form("hTimeDiffExoTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
4281  Form("#it{t}_{cell}^{max}-#it{t}_{cell}^{other} vs #it{E}, N cells with w > 0.01, exoticity > 0.97, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4282  nptbins,ptmin,ptmax,300,-150,150);
4283  fhTimeDiffExoTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
4284  fhTimeDiffExoTCardCorrelNCell[i][j][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell}^{other}");
4285  outputContainer->Add(fhTimeDiffExoTCardCorrelNCell[i][j][tm]);
4286 
4288  (Form("hColRowTCardCorrelNCellExoticLowE_Same%d_Diff%d%s",i,j,add[tm].Data()),
4289  Form("column vs row, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4290  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4291  fhColRowTCardCorrelNCellExoticLowE[i][j][tm]->SetYTitle("row");
4292  fhColRowTCardCorrelNCellExoticLowE[i][j][tm]->SetXTitle("column");
4293  outputContainer->Add(fhColRowTCardCorrelNCellExoticLowE[i][j][tm]) ;
4294 
4296  (Form("hColRowTCardCorrelNCellExoticHighE_Same%d_Diff%d%s",i,j,add[tm].Data()),
4297  Form("column vs row,N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
4298  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4299  fhColRowTCardCorrelNCellExoticHighE[i][j][tm]->SetYTitle("row");
4300  fhColRowTCardCorrelNCellExoticHighE[i][j][tm]->SetXTitle("column");
4301  outputContainer->Add(fhColRowTCardCorrelNCellExoticHighE[i][j][tm]) ;
4302  }
4303  }
4304 
4307 
4308  // fhLambda0TCardCorrelN[i][tm] = new TH2F
4309  // (Form("hLambda0TCardCorrelN_Case%d%s",i,add[tm].Data()),
4310  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
4311  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4312  // fhLambda0TCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
4313  // fhLambda0TCardCorrelN[i][tm]->SetYTitle("#lambda^{2}_{0}");
4314  // outputContainer->Add(fhLambda0TCardCorrelN[i][tm]);
4315  //
4316  // fhNCellsTCardCorrelN[i][tm] = new TH2F
4317  // (Form("hNCellsTCardCorrelN_Case%d%s",i,add[tm].Data()),
4318  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
4319  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4320  // fhNCellsTCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
4321  // fhNCellsTCardCorrelN[i][tm]->SetYTitle("#it{n}_{cells}");
4322  // outputContainer->Add(fhNCellsTCardCorrelN[i][tm]);
4323  //
4324  // fhExoticTCardCorrelN[i][tm] = new TH2F
4325  // (Form("hExoticTCardCorrelN_Case%d%s",i,add[tm].Data()),
4326  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
4327  // nptbins,ptmin,ptmax,200,-1,1);
4328  // fhExoticTCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
4329  // fhExoticTCardCorrelN[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4330  // outputContainer->Add(fhExoticTCardCorrelN[i][tm]);
4331  //
4332  // fhColRowTCardCorrelNLowE[i][tm] = new TH2F
4333  // (Form("hColRowTCardCorrelNLowE_Case%d%s",i,add[tm].Data()),
4334  // Form("column vs row, max E cell correl with TCard cell, E > 2 GeV, N corr = %d %s",i,add[tm].Data()),
4335  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4336  // fhColRowTCardCorrelNLowE[i][tm]->SetYTitle("row");
4337  // fhColRowTCardCorrelNLowE[i][tm]->SetXTitle("column");
4338  // outputContainer->Add(fhColRowTCardCorrelNLowE[i][tm]) ;
4339  //
4340  // fhColRowTCardCorrelNHighE[i][tm] = new TH2F
4341  // (Form("hColRowTCardCorrelNHighE_Case%d%s",i,add[tm].Data()),
4342  // Form("column vs row, max E cell correl with TCard cell, E > 8 GeV, N corr = %d %s",i,add[tm].Data()),
4343  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4344  // fhColRowTCardCorrelNHighE[i][tm]->SetYTitle("row");
4345  // fhColRowTCardCorrelNHighE[i][tm]->SetXTitle("column");
4346  // outputContainer->Add(fhColRowTCardCorrelNHighE[i][tm]) ;
4347  //
4348  // ////////
4349  // ////////
4350  //
4351  // fhLambda0TCardCorrelNExotic[i][tm] = new TH2F
4352  // (Form("hLambda0TCardCorrelN_Exotic_Case%d%s",i,add[tm].Data()),
4353  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, exo > 0.97, N corr = %d %s",i,add[tm].Data()),
4354  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4355  // fhLambda0TCardCorrelNExotic[i][tm]->SetXTitle("#it{E} (GeV)");
4356  // fhLambda0TCardCorrelNExotic[i][tm]->SetYTitle("#lambda^{2}_{0}");
4357  // outputContainer->Add(fhLambda0TCardCorrelNExotic[i][tm]);
4358  //
4359  // fhNCellsTCardCorrelNExotic[i][tm] = new TH2F
4360  // (Form("hNCellsTCardCorrelN_Exotic_Case%d%s",i,add[tm].Data()),
4361  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, exo > 0.97, N corr = %d %s",i,add[tm].Data()),
4362  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4363  // fhNCellsTCardCorrelNExotic[i][tm]->SetXTitle("#it{E} (GeV)");
4364  // fhNCellsTCardCorrelNExotic[i][tm]->SetYTitle("#it{n}_{cells}");
4365  // outputContainer->Add(fhNCellsTCardCorrelNExotic[i][tm]);
4366  //
4367  // fhColRowTCardCorrelNLowEExotic[i][tm] = new TH2F
4368  // (Form("hColRowTCardCorrelNLowEExotic_Case%d%s",i,add[tm].Data()),
4369  // Form("column vs row, max E cell correl with TCard cell, exo > 0.97, E > 2 GeV, N corr = %d %s",i,add[tm].Data()),
4370  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4371  // fhColRowTCardCorrelNLowEExotic[i][tm]->SetYTitle("row");
4372  // fhColRowTCardCorrelNLowEExotic[i][tm]->SetXTitle("column");
4373  // outputContainer->Add(fhColRowTCardCorrelNLowEExotic[i][tm]) ;
4374  //
4375  // fhColRowTCardCorrelNHighEExotic[i][tm] = new TH2F
4376  // (Form("hColRowTCardCorrelNHighEExotic_Case%d%s",i,add[tm].Data()),
4377  // Form("column vs row, max E cell correl with TCard cell, exo > 0.97, E > 8 GeV, N corr = %d %s",i,add[tm].Data()),
4378  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4379  // fhColRowTCardCorrelNHighEExotic[i][tm]->SetYTitle("row");
4380  // fhColRowTCardCorrelNHighEExotic[i][tm]->SetXTitle("column");
4381  // outputContainer->Add(fhColRowTCardCorrelNHighEExotic[i][tm]) ;
4382  //
4383  // ///////////
4384  // ///////////
4385  //
4386  // fhLambda0TCardCorrelNAllSameTCard[i][tm] = new TH2F
4387  // (Form("hLambda0TCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
4388  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4389  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4390  // fhLambda0TCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
4391  // fhLambda0TCardCorrelNAllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{0}");
4392  // outputContainer->Add(fhLambda0TCardCorrelNAllSameTCard[i][tm]);
4393  //
4394  // fhNCellsTCardCorrelNAllSameTCard[i][tm] = new TH2F
4395  // (Form("hNCellsTCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
4396  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4397  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4398  // fhNCellsTCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
4399  // fhNCellsTCardCorrelNAllSameTCard[i][tm]->SetYTitle("#it{n}_{cells}");
4400  // outputContainer->Add(fhNCellsTCardCorrelNAllSameTCard[i][tm]);
4401  //
4402  // fhExoticTCardCorrelNAllSameTCard[i][tm] = new TH2F
4403  // (Form("hExoticTCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
4404  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4405  // nptbins,ptmin,ptmax,200,-1,1);
4406  // fhExoticTCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
4407  // fhExoticTCardCorrelNAllSameTCard[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4408  // outputContainer->Add(fhExoticTCardCorrelNAllSameTCard[i][tm]);
4409  //
4410  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm] = new TH2F
4411  // (Form("hColRowTCardCorrelNAllSameTCardLowE_Case%d%s",i,add[tm].Data()),
4412  // Form("column vs row, max E cell correl with TCard cell, E > 2 GeV, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4413  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4414  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm]->SetYTitle("row");
4415  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm]->SetXTitle("column");
4416  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardLowE[i][tm]) ;
4417  //
4418  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm] = new TH2F
4419  // (Form("hColRowTCardCorrelNAllSameTCardHighE_Case%d%s",i,add[tm].Data()),
4420  // Form("column vs row, max E cell correl with TCard cell, E > 8 GeV, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4421  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4422  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm]->SetYTitle("row");
4423  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm]->SetXTitle("column");
4424  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardHighE[i][tm]) ;
4425  //
4426  // ////////
4427  //
4428  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm] = new TH2F
4429  // (Form("hLambda0TCardCorrelNAllSameTCard_Exotic_Case%d%s",i,add[tm].Data()),
4430  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, exo > 0.97, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4431  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4432  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]->SetXTitle("#it{E} (GeV)");
4433  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]->SetYTitle("#lambda^{2}_{0}");
4434  // outputContainer->Add(fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]);
4435  //
4436  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm] = new TH2F
4437  // (Form("hNCellsTCardCorrelNAllSameTCard_Exotic_Case%d%s",i,add[tm].Data()),
4438  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, exo > 0.97, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4439  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4440  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]->SetXTitle("#it{E} (GeV)");
4441  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]->SetYTitle("#it{n}_{cells}");
4442  // outputContainer->Add(fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]);
4443  //
4444  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm] = new TH2F
4445  // (Form("hColRowTCardCorrelNAllSameTCardLowEExotic_Case%d%s",i,add[tm].Data()),
4446  // Form("column vs row, max E cell correl with TCard cell, exo > 0.97, E > 2 GeV, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4447  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4448  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]->SetYTitle("row");
4449  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]->SetXTitle("column");
4450  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]) ;
4451  //
4452  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm] = new TH2F
4453  // (Form("hColRowTCardCorrelNAllSameTCardHighEExotic_Case%d%s",i,add[tm].Data()),
4454  // Form("column vs row, max E cell correl with TCard cell, exo > 0.97, E > 8 GeV, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
4455  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4456  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]->SetYTitle("row");
4457  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]->SetXTitle("column");
4458  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]) ;
4459  }
4460 
4461  // for(Int_t i = 0; i < 7; i++)
4462  // {
4463  // fhLambda0TCardCorrel[i][tm] = new TH2F
4464  // (Form("hLambda0TCardCorrel_Case%d%s",i,add[tm].Data()),
4465  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
4466  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4467  // fhLambda0TCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
4468  // fhLambda0TCardCorrel[i][tm]->SetYTitle("#lambda^{2}_{0}");
4469  // outputContainer->Add(fhLambda0TCardCorrel[i][tm]);
4470  //
4471  // fhNCellsTCardCorrel[i][tm] = new TH2F
4472  // (Form("hNCellsTCardCorrel_Case%d%s",i,add[tm].Data()),
4473  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
4474  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4475  // fhNCellsTCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
4476  // fhNCellsTCardCorrel[i][tm]->SetYTitle("#it{n}_{cells}");
4477  // outputContainer->Add(fhNCellsTCardCorrel[i][tm]);
4478  //
4479  // fhExoticTCardCorrel[i][tm] = new TH2F
4480  // (Form("hExoticTCardCorrel_Case%d%s",i,add[tm].Data()),
4481  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
4482  // nptbins,ptmin,ptmax,200,-1,1);
4483  // fhExoticTCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
4484  // fhExoticTCardCorrel[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4485  // outputContainer->Add(fhExoticTCardCorrel[i][tm]);
4486  // }
4487  //
4488  // for(Int_t i = 0; i < 4; i++)
4489  // {
4490  // fhLambda0TCardCorrelExotic[i][tm] = new TH2F
4491  // (Form("hLambda0TCardCorrel_Exotic_Case%d%s",i,add[tm].Data()),
4492  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, exo>0.97, case %d %s",i,add[tm].Data()),
4493  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4494  // fhLambda0TCardCorrelExotic[i][tm]->SetXTitle("#it{E} (GeV)");
4495  // fhLambda0TCardCorrelExotic[i][tm]->SetYTitle("#lambda^{2}_{0}");
4496  // outputContainer->Add(fhLambda0TCardCorrelExotic[i][tm]);
4497  //
4498  // fhNCellsTCardCorrelExotic[i][tm] = new TH2F
4499  // (Form("hNCellsTCardCorrel_Exotic_Case%d%s",i,add[tm].Data()),
4500  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, exot > 0.97,case %d %s",i,add[tm].Data()),
4501  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4502  // fhNCellsTCardCorrelExotic[i][tm]->SetXTitle("#it{E} (GeV)");
4503  // fhNCellsTCardCorrelExotic[i][tm]->SetYTitle("#it{n}_{cells}");
4504  // outputContainer->Add(fhNCellsTCardCorrelExotic[i][tm]);
4505  // }
4506 
4507 
4508  for(Int_t i = 0; i < fNEBinCuts; i++)
4509  {
4510  if(fStudyExotic)
4511  {
4512  fhLambda0Exoticity[i][tm] = new TH2F
4513  (Form("hLambda0Exoticity_EBin%d%s",i,add[tm].Data()),
4514  Form("#lambda^{2}_{0} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4515  200,-1,1,ssbins,ssmin,ssmax);
4516  fhLambda0Exoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4517  fhLambda0Exoticity[i][tm]->SetYTitle("#lambda^{2}_{0}");
4518  outputContainer->Add(fhLambda0Exoticity[i][tm]);
4519 
4520  fhLambda1Exoticity[i][tm] = new TH2F
4521  (Form("hLambda1Exoticity_EBin%d%s",i,add[tm].Data()),
4522  Form("#lambda^{2}_{1} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4523  200,-1,1,ssbins,ssmin,ssmax);
4524  fhLambda1Exoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4525  fhLambda1Exoticity[i][tm]->SetYTitle("#lambda^{2}_{1}");
4526  outputContainer->Add(fhLambda1Exoticity[i][tm]);
4527 
4528  // fhLambdaRExoticity[i][tm] = new TH2F
4529  // (Form("hLambdaRExoticity_EBin%d%s",i,add[tm].Data()),
4530  // Form("#lambda^{2}_{1}/#lambda^{2}_{0} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4531  // 200,-1,1,110,0,1.1);
4532  // fhLambdaRExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4533  // fhLambdaRExoticity[i][tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
4534  // outputContainer->Add(fhLambdaRExoticity[i][tm]);
4535 
4536  fhNCellsExoticity[i][tm] = new TH2F
4537  (Form("hNCellsExoticity_EBin%d%s",i,add[tm].Data()),
4538  Form("#it{n}_{cells} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4539  200,-1,1,nceclbins,nceclmin,nceclmax);
4540  fhNCellsExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4541  fhNCellsExoticity[i][tm]->SetYTitle("#it{n}_{cells}");
4542  outputContainer->Add(fhNCellsExoticity[i][tm]);
4543 
4544  fhTimeExoticity[i][tm] = new TH2F
4545  (Form("hTimeExoticity_EBin%d%s",i,add[tm].Data()),
4546  Form("#it{t} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4547  200,-1,1,100,-25,25);
4548  fhTimeExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4549  fhTimeExoticity[i][tm]->SetYTitle("#it{t} (ns)");
4550  outputContainer->Add(fhTimeExoticity[i][tm]);
4551 
4552  fhNCellsTCardSameAndDiffExotic[i][tm] = new TH2F
4553  (Form("hNCellsTCardSameAndDiff_Exotic_EBin%d%s",i,add[tm].Data()),
4554  Form("#it{n}_{cells} same TCard vs diff TCard, w > 0.01, %2.2f<#it{E}<%2.2f GeV, exo > 0.97 %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4555  nceclbins,nceclmin,nceclmax,nceclbins,nceclmin,nceclmax);
4556  fhNCellsTCardSameAndDiffExotic[i][tm]->SetXTitle("#it{n}_{cells} - diff TCard");
4557  fhNCellsTCardSameAndDiffExotic[i][tm]->SetYTitle("#it{n}_{cells} - same TCard");
4558  outputContainer->Add(fhNCellsTCardSameAndDiffExotic[i][tm]);
4559 
4560  // fhLambda0ExoticityAllSameTCard[i][tm] = new TH2F
4561  // (Form("hLambda0ExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
4562  // Form("#lambda^{2}_{0} vs #it{exoticity}, all cells same TCard as leading, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4563  // 200,-1,1,ssbins,ssmin,ssmax);
4564  // fhLambda0ExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4565  // fhLambda0ExoticityAllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{0}");
4566  // outputContainer->Add(fhLambda0ExoticityAllSameTCard[i][tm]);
4567  //
4568  // fhLambda1ExoticityAllSameTCard[i][tm] = new TH2F
4569  // (Form("hLambda1ExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
4570  // Form("#lambda^{2}_{1} vs #it{exoticity}, all cells same TCard as leading, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4571  // 200,-1,1,ssbins,ssmin,ssmax);
4572  // fhLambda1ExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4573  // fhLambda1ExoticityAllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{1}");
4574  // outputContainer->Add(fhLambda1ExoticityAllSameTCard[i][tm]);
4575  //
4576  // fhLambdaRExoticityAllSameTCard[i][tm] = new TH2F
4577  // (Form("hLambdaRExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
4578  // Form("#lambda^{2}_{1}/#lambda^{2}_{0} vs #it{exoticity}, all cells same TCard as leading, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4579  // 200,-1,1,110,0,1.1);
4580  // fhLambdaRExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4581  // fhLambdaRExoticityAllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
4582  // outputContainer->Add(fhLambdaRExoticityAllSameTCard[i][tm]);
4583  //
4584  // fhNCellsExoticityAllSameTCard[i][tm] = new TH2F
4585  // (Form("hNCellsExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
4586  // Form("#it{n}_{cells} vs #it{exoticity}, all cells same TCard as leading, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4587  // 200,-1,1,nceclbins,nceclmin,nceclmax);
4588  // fhNCellsExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4589  // fhNCellsExoticityAllSameTCard[i][tm]->SetYTitle("#it{n}_{cells}");
4590  // outputContainer->Add(fhNCellsExoticityAllSameTCard[i][tm]);
4591  //
4592  }
4593 
4594  fhNCellsTCardSameAndDiff[i][tm] = new TH2F
4595  (Form("hNCellsTCardSameAndDiff_EBin%d%s",i,add[tm].Data()),
4596  Form("#it{n}_{cells} same TCard vs diff TCard, w > 0.01, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4597  nceclbins,nceclmin,nceclmax,nceclbins,nceclmin,nceclmax);
4598  fhNCellsTCardSameAndDiff[i][tm]->SetXTitle("#it{n}_{cells} - diff TCard");
4599  fhNCellsTCardSameAndDiff[i][tm]->SetYTitle("#it{n}_{cells} - same TCard");
4600  outputContainer->Add(fhNCellsTCardSameAndDiff[i][tm]);
4601 
4602  fhLambda0Lambda1[i][tm] = new TH2F
4603  (Form("hLambda0Lambda1_EBin%d%s",i,add[tm].Data()),
4604  Form("#lambda^{2}_{0} vs #lambda^{2}_{1}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4605  ssbins,ssmin,ssmax,ssbins,ssmin,ssmax);
4606  fhLambda0Lambda1[i][tm]->SetXTitle("#lambda^{2}_{1}");
4607  fhLambda0Lambda1[i][tm]->SetYTitle("#lambda^{2}_{0}");
4608  outputContainer->Add(fhLambda0Lambda1[i][tm]);
4609 
4610  // fhLambda0Lambda1AllSameTCard[i][tm] = new TH2F
4611  // (Form("hLambda0Lambda1AllSameTCard_EBin%d%s",i,add[tm].Data()),
4612  // Form("#lambda^{2}_{0} vs #lambda^{2}_{1}, , all cells same TCard as leading, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
4613  // ssbins,ssmin,ssmax,ssbins,ssmin,ssmax);
4614  // fhLambda0Lambda1AllSameTCard[i][tm]->SetXTitle("#lambda^{2}_{1}");
4615  // fhLambda0Lambda1AllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{0}");
4616  // outputContainer->Add(fhLambda0Lambda1AllSameTCard[i][tm]);
4617  }
4618 
4619  if(fStudyExotic)
4620  {
4621  for(Int_t j = 0; j < 6; j++)
4622  {
4623  for(Int_t k = 0; k < 6; k++)
4624  {
4625  fhLambda0ExoticityPerNCell[j][k][tm] = new TH2F
4626  (Form("hLambda0Exoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
4627  Form("#lambda^{2}_{0} vs #it{exoticity}, #it{n}_{cell} TCard same = %d, diff =%d, #it{E}>8 GeV %s",j,k,add[tm].Data()),
4628  200,-1,1,ssbins,ssmin,ssmax);
4629  fhLambda0ExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4630  fhLambda0ExoticityPerNCell[j][k][tm]->SetYTitle("#lambda^{2}_{0}");
4631  outputContainer->Add(fhLambda0ExoticityPerNCell[j][k][tm]);
4632 
4633  fhLambda1ExoticityPerNCell[j][k][tm] = new TH2F
4634  (Form("hLambda1Exoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
4635  Form("#lambda^{2}_{1} vs #it{exoticity}, #it{n}_{cell} TCard same = %d, diff =%d, #it{E}>8 GeV %s",j,k,add[tm].Data()),
4636  200,-1,1,ssbins,ssmin,ssmax);
4637  fhLambda1ExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4638  fhLambda1ExoticityPerNCell[j][k][tm]->SetYTitle("#lambda^{2}_{1}");
4639  outputContainer->Add(fhLambda1ExoticityPerNCell[j][k][tm]);
4640 
4641  // fhLambdaRExoticityPerNCell[j][k][tm] = new TH2F
4642  // (Form("hLambdaRExoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
4643  // Form("#lambda^{2}_{1}/#lambda^{2}_{0} vs #it{exoticity}, #it{n}_{cell} TCard same = %d, diff =%d, #it{E}>8 GeV %s",j,k,add[tm].Data()),
4644  // 200,-1,1,110,0,1.1);
4645  // fhLambdaRExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4646  // fhLambdaRExoticityPerNCell[j][k][tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
4647  // outputContainer->Add(fhLambdaRExoticityPerNCell[j][k][tm]);
4648  }
4649  }
4650  }
4651 
4652  // for(Int_t i = 0; i < 6; i++)
4653  // {
4654  // fhLambda0TCardCorrelNearRow[i][tm] = new TH2F
4655  // (Form("hLambda0TCardCorrelNearRow_Case%d%s",i,add[tm].Data()),
4656  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, one TCard cell is 1 row away, case %d %s",i,add[tm].Data()),
4657  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4658  // fhLambda0TCardCorrelNearRow[i][tm]->SetXTitle("#it{E} (GeV)");
4659  // fhLambda0TCardCorrelNearRow[i][tm]->SetYTitle("#lambda^{2}_{0}");
4660  // outputContainer->Add(fhLambda0TCardCorrelNearRow[i][tm]);
4661  //
4662  // fhNCellsTCardCorrelNearRow[i][tm] = new TH2F
4663  // (Form("hNCellsTCardCorrelNearRow_Case%d%s",i,add[tm].Data()),
4664  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
4665  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4666  // fhNCellsTCardCorrelNearRow[i][tm]->SetXTitle("#it{E} (GeV)");
4667  // fhNCellsTCardCorrelNearRow[i][tm]->SetYTitle("#it{n}_{cells}");
4668  // outputContainer->Add(fhNCellsTCardCorrelNearRow[i][tm]);
4669  // }
4670  //
4671  // for(Int_t i = 0; i < 4; i++)
4672  // {
4673  // fhLambda0TCardCorrel2ndMax[i][tm] = new TH2F
4674  // (Form("hLambda0TCardCorrel2ndMax_Case%d%s",i,add[tm].Data()),
4675  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with 2nd max TCard cell, case %d %s",i,add[tm].Data()),
4676  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4677  // fhLambda0TCardCorrel2ndMax[i][tm]->SetXTitle("#it{E} (GeV)");
4678  // fhLambda0TCardCorrel2ndMax[i][tm]->SetYTitle("#lambda^{2}_{0}");
4679  // outputContainer->Add(fhLambda0TCardCorrel2ndMax[i][tm]);
4680  //
4681  // fhNCellsTCardCorrel2ndMax[i][tm] = new TH2F
4682  // (Form("hNCellsTCardCorrel2ndMax_Case%d%s",i,add[tm].Data()),
4683  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with 2nd max TCard cell, case %d %s",i,add[tm].Data()),
4684  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4685  // fhNCellsTCardCorrel2ndMax[i][tm]->SetXTitle("#it{E} (GeV)");
4686  // fhNCellsTCardCorrel2ndMax[i][tm]->SetYTitle("#it{n}_{cells}");
4687  // outputContainer->Add(fhNCellsTCardCorrel2ndMax[i][tm]);
4688  // }
4689  //
4690  // for(Int_t i = 0; i < 7; i++)
4691  // {
4692  // fhLambda0TCardCorrelOtherTCard[i][tm] = new TH2F
4693  // (Form("hLambda0TCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
4694  // Form("#lambda^{2}_{0} vs #it{E}, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
4695  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4696  // fhLambda0TCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
4697  // fhLambda0TCardCorrelOtherTCard[i][tm]->SetYTitle("#lambda^{2}_{0}");
4698  // outputContainer->Add(fhLambda0TCardCorrelOtherTCard[i][tm]);
4699  //
4700  // fhNCellsTCardCorrelOtherTCard[i][tm] = new TH2F
4701  // (Form("hNCellsTCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
4702  // Form("custer # cells vs #it{E}, w > 0.01, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
4703  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
4704  // fhNCellsTCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
4705  // fhNCellsTCardCorrelOtherTCard[i][tm]->SetYTitle("#it{n}_{cells}");
4706  // outputContainer->Add(fhNCellsTCardCorrelOtherTCard[i][tm]);
4707  //
4708  // fhExoticTCardCorrelOtherTCard[i][tm] = new TH2F
4709  // (Form("hExoticTCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
4710  // Form("exoticity vs #it{E}, w > 0.01, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
4711  // nptbins,ptmin,ptmax,200,-1,1);
4712  // fhExoticTCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
4713  // fhExoticTCardCorrelOtherTCard[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4714  // outputContainer->Add(fhExoticTCardCorrelOtherTCard[i][tm]);
4715  //
4716  // fhColRowTCardCorrelOtherTCardLowE[i][tm] = new TH2F
4717  // (Form("hColRowTCardCorrelOtherTCardLowE_Case%d%s",i,add[tm].Data()),
4718  // Form("column vs row for different 2 TCard correlation cases, E > 2 GeV, case %d %s",i,add[tm].Data()),
4719  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4720  // fhColRowTCardCorrelOtherTCardLowE[i][tm]->SetYTitle("row");
4721  // fhColRowTCardCorrelOtherTCardLowE[i][tm]->SetXTitle("column");
4722  // outputContainer->Add(fhColRowTCardCorrelOtherTCardLowE[i][tm]) ;
4723  //
4724  // fhColRowTCardCorrelOtherTCardHighE[i][tm] = new TH2F
4725  // (Form("hColRowTCardCorrelOtherTCardHighE_Case%d%s",i,add[tm].Data()),
4726  // Form("column vs row for different 2 TCard correlation cases, E > 8 GeV, case %d %s",i,add[tm].Data()),
4727  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
4728  // fhColRowTCardCorrelOtherTCardHighE[i][tm]->SetYTitle("row");
4729  // fhColRowTCardCorrelOtherTCardHighE[i][tm]->SetXTitle("column");
4730  // outputContainer->Add(fhColRowTCardCorrelOtherTCardHighE[i][tm]) ;
4731  // }
4732 
4733  for(Int_t i = 0; i < 12; i++)
4734  {
4735  fhTCardCorrECellMaxDiff[i][tm] = new TH2F
4736  (Form("hTCardCorrECellMaxDiff_Case%d%s",i,add[tm].Data()),
4737  Form("#it{E}_{cell}^{max}-#it{E}_{cell} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
4738  nptbins,ptmin,ptmax,210,-1,20);
4739  fhTCardCorrECellMaxDiff[i][tm]->SetXTitle("#it{E} (GeV)");
4740  fhTCardCorrECellMaxDiff[i][tm]->SetYTitle("#it{E}_{cell}^{max}-#it{E}_{cell} (GeV)");
4741  outputContainer->Add(fhTCardCorrECellMaxDiff[i][tm]);
4742 
4743  fhTCardCorrEClusterDiff[i][tm] = new TH2F
4744  (Form("hTCardCorrEClusterDiff_Case%d%s",i,add[tm].Data()),
4745  Form("#it{E}_{cluster}-#it{E}_{cell} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
4746  nptbins,ptmin,ptmax,210,-1,20);
4747  fhTCardCorrEClusterDiff[i][tm]->SetXTitle("#it{E} (GeV)");
4748  fhTCardCorrEClusterDiff[i][tm]->SetYTitle("#it{E}_{cluster}-#it{E}_{cell} (GeV)");
4749  outputContainer->Add(fhTCardCorrEClusterDiff[i][tm]);
4750 
4751  // fhTCardCorrECellMaxRat[i][tm] = new TH2F
4752  // (Form("hTCardCorrECellMaxRat_Case%d%s",i,add[tm].Data()),
4753  // Form("#it{E}_{cell}/#it{E}_{cell}^{max} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
4754  // nptbins,ptmin,ptmax,110,0,1.1);
4755  // fhTCardCorrECellMaxRat[i][tm]->SetXTitle("#it{E} (GeV)");
4756  // fhTCardCorrECellMaxRat[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}^{max}_{cell}");
4757  // outputContainer->Add(fhTCardCorrECellMaxRat[i][tm]);
4758  //
4759  // fhTCardCorrEClusterRat[i][tm] = new TH2F
4760  // (Form("hTCardCorrEClusterRat_Case%d%s",i,add[tm].Data()),
4761  // Form("#it{E}_{cell}/#it{E}_{cluster} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
4762  // nptbins,ptmin,ptmax,110,0,1.1);
4763  // fhTCardCorrEClusterRat[i][tm]->SetXTitle("#it{E} (GeV)");
4764  // fhTCardCorrEClusterRat[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
4765  // outputContainer->Add(fhTCardCorrEClusterRat[i][tm]);
4766 
4767  fhTCardCorrTCellMaxDiff[i][tm] = new TH2F
4768  (Form("hTCardCorrTCellMaxDiff_Case%d%s",i,add[tm].Data()),
4769  Form("#it{t}_{cell}^{max}-#it{t}_{cell} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
4770  nptbins,ptmin,ptmax,1000,-100,100);
4771  fhTCardCorrTCellMaxDiff[i][tm]->SetXTitle("#it{E} (GeV)");
4772  fhTCardCorrTCellMaxDiff[i][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell} (ns)");
4773  outputContainer->Add(fhTCardCorrTCellMaxDiff[i][tm]);
4774 
4775  if(fStudyExotic)
4776  {
4777  fhTCardCorrECellMaxDiffExo[i][tm] = new TH2F
4778  (Form("hTCardCorrECellMaxDiffExo_Case%d%s",i,add[tm].Data()),
4779  Form("#it{E}_{cell}^{max}-#it{E}_{cell} vs #it{E}_{cluster}, for (un)correlated cells in TCard, exoticity > 0.97, case %d %s",i,add[tm].Data()),
4780  nptbins,ptmin,ptmax,210,-1,20);
4781  fhTCardCorrECellMaxDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
4782  fhTCardCorrECellMaxDiffExo[i][tm]->SetYTitle("#it{E}_{cell}^{max}-#it{E}_{cell} (GeV)");
4783  outputContainer->Add(fhTCardCorrECellMaxDiffExo[i][tm]);
4784 
4785  fhTCardCorrEClusterDiffExo[i][tm] = new TH2F
4786  (Form("hTCardCorrEClusterDiffExo_Case%d%s",i,add[tm].Data()),
4787  Form("#it{E}_{cluster}-#it{E}_{cell} vs #it{E}_{cluster}, for (un)correlated cells in TCard, exoticity > 0.97, case %d %s",i,add[tm].Data()),
4788  nptbins,ptmin,ptmax,210,-1,20);
4789  fhTCardCorrEClusterDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
4790  fhTCardCorrEClusterDiffExo[i][tm]->SetYTitle("#it{E}_{cluster}-#it{E}_{cell} (GeV)");
4791  outputContainer->Add(fhTCardCorrEClusterDiffExo[i][tm]);
4792 
4793  // fhTCardCorrECellMaxRatExo[i][tm] = new TH2F
4794  // (Form("hTCardCorrECellMaxRatExo_Case%d%s",i,add[tm].Data()),
4795  // Form("#it{E}_{cell}/#it{E}_{cell}^{max} vs #it{E}_{cluster}, for (un)correlated cells in TCard, exoticity > 0.97, case %d %s",i,add[tm].Data()),
4796  // nptbins,ptmin,ptmax,110,0,1.1);
4797  // fhTCardCorrECellMaxRatExo[i][tm]->SetXTitle("#it{E} (GeV)");
4798  // fhTCardCorrECellMaxRatExo[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}^{max}_{cell}");
4799  // outputContainer->Add(fhTCardCorrECellMaxRatExo[i][tm]);
4800  //
4801  // fhTCardCorrEClusterRatExo[i][tm] = new TH2F
4802  // (Form("hTCardCorrEClusterRatExo_Case%d%s",i,add[tm].Data()),
4803  // Form("#it{E}_{cell}/#it{E}_{cluster} vs #it{E}_{cluster}, for (un)correlated cells in TCard, exoticity > 0.97, case %d %s",i,add[tm].Data()),
4804  // nptbins,ptmin,ptmax,110,0,1.1);
4805  // fhTCardCorrEClusterRatExo[i][tm]->SetXTitle("#it{E} (GeV)");
4806  // fhTCardCorrEClusterRatExo[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
4807  // outputContainer->Add(fhTCardCorrEClusterRatExo[i][tm]);
4808 
4809  fhTCardCorrTCellMaxDiffExo[i][tm] = new TH2F
4810  (Form("hTCardCorrTCellMaxDiffExo_Case%d%s",i,add[tm].Data()),
4811  Form("#it{t}_{cell}^{max}-#it{t}_{cell} vs #it{E}_{cluster}, for (un)correlated cells in TCard, exoticity > 0.97, case %d %s",i,add[tm].Data()),
4812  nptbins,ptmin,ptmax,1000,-100,100);
4813  fhTCardCorrTCellMaxDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
4814  fhTCardCorrTCellMaxDiffExo[i][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell} (ns)");
4815  outputContainer->Add(fhTCardCorrTCellMaxDiffExo[i][tm]);
4816  }
4817  }
4818  } // neutral or charged
4819 
4820  if(fStudyExotic)
4821  {
4822  fhEnergyTMEtaResidual1Cell = new TH2F("hEnergyTMEtaResidual1Cell","#Delta #eta_{cluster-track} vs #it{E}, n cell = 1",
4823  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
4824  fhEnergyTMEtaResidual1Cell->SetXTitle("#it{E} (GeV)");
4825  fhEnergyTMEtaResidual1Cell->SetYTitle("#Delta #eta_{cluster-track}");
4826  outputContainer->Add(fhEnergyTMEtaResidual1Cell);
4827 
4828  fhEnergyTMPhiResidual1Cell = new TH2F("hEnergyTMPhiResidual1Cell","#Delta #varphi_{cluster-track} vs #it{E}, n cell = 1",
4829  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
4830  fhEnergyTMPhiResidual1Cell->SetXTitle("#it{E} (GeV)");
4831  fhEnergyTMPhiResidual1Cell->SetYTitle("#Delta #varphi_{cluster-track}");
4832  outputContainer->Add(fhEnergyTMPhiResidual1Cell);
4833 
4834  fhEnergyTMEtaResidualExotic = new TH2F("hEnergyTMEtaResidualExotic","#Delta #eta_{cluster-track} vs #it{E}, exo > 0.97",
4835  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
4836  fhEnergyTMEtaResidualExotic->SetXTitle("#it{E} (GeV)");
4837  fhEnergyTMEtaResidualExotic->SetYTitle("#Delta #eta_{cluster-track}");
4838  outputContainer->Add(fhEnergyTMEtaResidualExotic);
4839 
4840  fhEnergyTMPhiResidualExotic = new TH2F("hEnergyTMPhiResidualExotic","#Delta #varphi_{cluster-track} vs #it{E}, exo > 0.97",
4841  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
4842  fhEnergyTMPhiResidualExotic->SetXTitle("#it{E} (GeV)");
4843  fhEnergyTMPhiResidualExotic->SetYTitle("#Delta #varphi_{cluster-track}");
4844  outputContainer->Add(fhEnergyTMPhiResidualExotic);
4845 
4846  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell = new TH2F("hEnergyTMEtaResidualTCardCorrNoSelection1Cell","#Delta #eta_{cluster-track} vs #it{E}, n cell = 1",
4847  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
4848  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell->SetXTitle("#it{E} (GeV)");
4849  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell->SetYTitle("#Delta #eta_{cluster-track}");
4850  outputContainer->Add(fhEnergyTMEtaResidualTCardCorrNoSelection1Cell);
4851 
4852  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell = new TH2F("hEnergyTMPhiResidualTCardCorrNoSelection1Cell","#Delta #varphi_{cluster-track} vs #it{E}, n cell = 1",
4853  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
4854  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell->SetXTitle("#it{E} (GeV)");
4855  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell->SetYTitle("#Delta #varphi_{cluster-track}");
4856  outputContainer->Add(fhEnergyTMPhiResidualTCardCorrNoSelection1Cell);
4857 
4858  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic = new TH2F("hEnergyTMEtaResidualTCardCorrNoSelectionExotic","#Delta #eta_{cluster-track} vs #it{E}, exo > 0.97",
4859  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
4860  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic->SetXTitle("#it{E} (GeV)");
4861  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic->SetYTitle("#Delta #eta_{cluster-track}");
4862  outputContainer->Add(fhEnergyTMEtaResidualTCardCorrNoSelectionExotic);
4863 
4864  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic = new TH2F("hEnergyTMPhiResidualTCardCorrNoSelectionExotic","#Delta #varphi_{cluster-track} vs #it{E}, exo > 0.97",
4865  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
4866  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic->SetXTitle("#it{E} (GeV)");
4867  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic->SetYTitle("#Delta #varphi_{cluster-track}");
4868  outputContainer->Add(fhEnergyTMPhiResidualTCardCorrNoSelectionExotic);
4869 
4870  for(Int_t i = 0; i < fNEBinCuts; i++)
4871  {
4872  fhTMPhiResidualExoticity[i] = new TH2F
4873  (Form("hTMPhiResidual_EBin%d",i),
4874  Form("#Delta #varphi_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
4875  200,-1,1,nresphibins,resphimin,resphimax);
4876  fhTMPhiResidualExoticity[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4877  fhTMPhiResidualExoticity[i]->SetYTitle("#Delta #varphi_{cluster-track}");
4878  outputContainer->Add(fhTMPhiResidualExoticity[i]);
4879 
4880  fhTMEtaResidualExoticity[i] = new TH2F
4881  (Form("hTMEtaResidual_EBin%d",i),
4882  Form("#Delta #eta_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
4883  200,-1,1,nresetabins,resetamin,resetamax);
4884  fhTMEtaResidualExoticity[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4885  fhTMEtaResidualExoticity[i]->SetYTitle("#Delta #eta_{cluster-track}");
4886  outputContainer->Add(fhTMEtaResidualExoticity[i]);