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