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