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