AliPhysics  45fd833 (45fd833)
AliAnaClusterShapeCorrelStudies.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 <TH3F.h>
19 #include <TObjString.h>
20 
21 //---- AliRoot system ----
23 #include "AliCaloTrackReader.h"
24 #include "AliVCaloCells.h"
25 #include "AliFiducialCut.h"
26 #include "AliVCluster.h"
27 #include "AliVTrack.h"
28 #include "AliVEvent.h"
29 
30 // --- Detectors ---
31 #include "AliEMCALGeometry.h"
32 
36 
37 //__________________________________________
40 //__________________________________________
43 
44 // Switches
45 fStudyShape(kFALSE), fStudyShapeParam(kFALSE),
46 fStudyWeight(kFALSE),
47 fStudyTCardCorrelation(kFALSE), fStudyExotic(kFALSE),
48 fStudyColRowFromCellMax(kFALSE), fStudyInvMass(kFALSE),
49 fStudyTimeCellHisto(kFALSE), fStudyModuleCells(kTRUE),
50 fFillNLocMaxHistos(kTRUE),
51 
52 // Parameters and cuts
53 fM02Min(0), fNCellMin(0),
54 fMinDistToBad(0), fNEBinCuts(0),
55 fEMinShape(0), fEMaxShape(100),
56 fNCellMinShape(-1), fNCellsBins(3),
57 
58 fNMatchPIDCases(1),
59 fdEdXMinEle(0), fdEdXMaxEle(0),
60 fdEdXMinHad(0), fdEdXMaxHad(0),
61 
62 // Invariant mass
63 fInvMassMinECut(0), fInvMassMaxECut(0),
64 fInvMassMinM02Cut(0), fInvMassMaxM02Cut(0),
65 fInvMassMaxOpenAngle(0), fInvMassMaxTimeDifference(0),
66 
67 fConstantTimeShift(0),
68 
69 fClusterMomentum(), fClusterMomentum2(),
70 fCaloCellList(NULL), fCaloClusList(NULL),
71 
72 // Histograms
73 
74 // TCard correl and shape and exoticity
75 fhEnergyTMEtaResidual1Cell(0), fhEnergyTMPhiResidual1Cell(0),
76 fhColRowExoticHighE1CellPosTime(0), fhColRowExoticHighE1CellNegTime(0), fhColRowExoticHighE1CellNulTime(0),
77 fhEnergyTMEtaResidualExotic(0), fhEnergyTMPhiResidualExotic(0),
78 fhColRowExoticHighEPosTime(0), fhColRowExoticHighENegTime(0), fhColRowExoticHighENulTime(0),
79 fhColRowHighEPosTime(0), fhColRowHighENegTime(0), fhColRowHighENulTime(0),
80 fhEnergyTMEtaResidualTCardCorrNoSelection1Cell(0), fhEnergyTMPhiResidualTCardCorrNoSelection1Cell(0),
81 fhEnergyTMEtaResidualTCardCorrNoSelectionExotic(0), fhEnergyTMPhiResidualTCardCorrNoSelectionExotic(0),
82 
83 // Shape studies
84 //fhCellTimeSpreadRespectToCellMaxM02(0),
85 //fhClusterMaxCellCloseCellDiffM02(0),
86 fhClusterMaxCellCloseCellRatioM02(0), fhClusterMaxCellECrossM02(0),
87 fhInvMassNCellSM(0), fhInvMassNCellSMSame(0),
88 fhColRowM02(0), fhColRowM02NCellCut(0),
89 fhEMaxCellTimeM02SM(0), fhEMaxCellTimeNCellSM(0), fhESecCellTimeNCellSM(0),
90 // Module
91 fhSMNCellModuleMax(0), fhSMNCellModuleOut(0),
92 fhSMNCellModuleOutModSame(0), fhSMNCellModuleOutModDiff(0),
93 fhSMECellModuleMax(0), fhSMECellModuleMaxTot(0),
94 fhSMECellModuleOut(0), fhSMECellModuleOutModSame(0), fhSMECellModuleOutModDiff(0),
95 fhSMNCellModuleMaxOutRat(0), fhSMNCellModuleMaxOutModSameRat(0), fhSMNCellModuleMaxOutModDiffRat(0),
96 fhSMECellModuleMaxRat(0), fhSMECellModuleMaxTotRat(0), fhSMECellModuleMaxTotRatClus(0),
97 fhSMECellModuleMaxOutRat(0), fhSMECellModuleMaxOutModSameRat(0), fhSMECellModuleMaxOutModDiffRat(0),
98 
99 fhSMNCellModuleMaxLowM02(0), fhSMNCellModuleOutLowM02(0),
100 fhSMNCellModuleOutModSameLowM02(0), fhSMNCellModuleOutModDiffLowM02(0),
101 fhSMECellModuleMaxLowM02(0), fhSMECellModuleMaxTotLowM02(0),
102 fhSMECellModuleOutLowM02(0), fhSMECellModuleOutModSameLowM02(0), fhSMECellModuleOutModDiffLowM02(0),
103 fhSMNCellModuleMaxOutRatLowM02(0), fhSMNCellModuleMaxOutModSameRatLowM02(0),fhSMNCellModuleMaxOutModDiffRatLowM02(0),
104 fhSMECellModuleMaxRatLowM02(0), fhSMECellModuleMaxTotRatLowM02(0), fhSMECellModuleMaxTotRatClusLowM02(0),
105 fhSMECellModuleMaxOutRatLowM02(0), fhSMECellModuleMaxOutModSameRatLowM02(0),fhSMECellModuleMaxOutModDiffRatLowM02(0),
106 
107 fhSMNCellModuleMaxHighM02(0), fhSMNCellModuleOutHighM02(0),
108 fhSMNCellModuleOutModSameHighM02(0), fhSMNCellModuleOutModDiffHighM02(0),
109 fhSMECellModuleMaxHighM02(0), fhSMECellModuleMaxTotHighM02(0),
110 fhSMECellModuleOutHighM02(0), fhSMECellModuleOutModSameHighM02(0), fhSMECellModuleOutModDiffHighM02(0),
111 fhSMNCellModuleMaxOutRatHighM02(0), fhSMNCellModuleMaxOutModSameRatHighM02(0),fhSMNCellModuleMaxOutModDiffRatHighM02(0),
112 fhSMECellModuleMaxRatHighM02(0), fhSMECellModuleMaxTotRatHighM02(0), fhSMECellModuleMaxTotRatClusHighM02(0),
113 fhSMECellModuleMaxOutRatHighM02(0), fhSMECellModuleMaxOutModSameRatHighM02(0),fhSMECellModuleMaxOutModDiffRatHighM02(0),
114 
115 fhSMEMaxEClusterRat(0),
116 fhSMEMaxEClusterRatLowM02(0), fhSMEMaxEClusterRatHighM02(0),
117 
118 fhTCardChannelM02(0), fhTCardChannelM02NoCut(0),
119 fhTCardChannelNCellModMax(0), fhTCardChannelNCell(0),
120 
121 // Weight studies
122 fhECellClusterRatio(0), fhECellClusterLogRatio(0),
123 fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
124 fhECellTotalRatio(0), fhECellTotalLogRatio(0),
125 fhECellTotalRatioMod(0), fhECellTotalLogRatioMod(0)
126 {
127  for(Int_t i=0; i < 3; i++)
128  {
129  // Shower shape dependence
130  fhClusterTimeEnergyM02 [i] = 0;
132  fhNCellsPerClusterM02 [i] = 0;
133  fhNCellsPerClusterM20 [i] = 0;
134  fhNCellsPerClusterNLM [i] = 0;
135 
136  fhNCellsPerClusterMEta [i] = 0;
137  fhNCellsPerClusterMPhi [i] = 0;
140 
141  fhSMNLocMax [i] = 0;
142  fhSMNCell [i] = 0;
143  fhSMNCellLowM02 [i] = 0;
144  fhSMNCellHighM02 [i] = 0;
145  fhSMNCellM02 [i] = 0;
146  fhSMM02 [i] = 0;
147  fhSMM02NoCut [i] = 0;
148 
149  fhSMMEta [i] = 0;
150  fhSMMEtaNoCut [i] = 0;
151  fhSMMPhi [i] = 0;
152  fhSMMPhiNoCut [i] = 0;
153  fhSMMEtaPhi [i] = 0;
154  fhSMMEtaPhiNoCut [i] = 0;
155  fhSMMEtaPhiA [i] = 0;
156  fhSMMEtaPhiANoCut [i] = 0;
157 
158  fhSMM20LowM02 [i] = 0;
159  fhSMM20LowM02NoCut [i] = 0;
160  fhSMM20HighM02 [i] = 0;
161  fhSMM20HighM02NoCut [i] = 0;
162 
163  fhColM02 [i] = 0;
164  fhRowM02 [i] = 0;
165 
166  fhOriginE [i] = 0;
167  fhOriginM02 [i] = 0;
168  fhOriginENoCut [i] = 0;
169  fhOriginM02NoCut [i] = 0;
170  fhOriginEOverlap [i] = 0;
171  fhOriginM02Overlap [i] = 0;
172  fhOriginENoCutOverlap [i] = 0;
174 
175  // Cluster asymmetry
176  fhDeltaIEtaDeltaIPhi [i] = 0;
177  fhDeltaIA [i] = 0;
178  fhDeltaIAM02 [i] = 0;
179  fhDeltaIAM20 [i] = 0;
180  fhDeltaIANCells [i] = 0;
181  fhDeltaIAOrigin [i] = 0;
182 
184  fhDeltaIATot [i] = 0;
185  fhDeltaIATotM02 [i] = 0;
186  fhDeltaIATotM20 [i] = 0;
187  fhDeltaIATotNCells [i] = 0;
188  fhDeltaIATotOrigin [i] = 0;
189  }
190 
191  // Weight studies
192  for(Int_t i =0; i < 12; i++)
193  {
194  for(Int_t j = 0; j < 4; j++)
195  {
196  for(Int_t k = 0; k < 3; k++)
197  {
198  fhLambda0ForW0AndCellCuts [i][j][k] = 0;
199 // fhLambda1ForW0AndCellCuts [i][j][k] = 0;
200  fhLambda0ForW0AndCellCutsEta0[i][j][k] = 0;
201  }
202  }
203  for(Int_t j = 0; j < 5; j++)
204  {
205  fhLambda0ForW0MC[i][j] = 0;
206 // fhLambda1ForW0MC[i][j] = 0;
207  }
208  }
209 
210  // TCard correl studies
211  for(Int_t tm = 0; tm < 2; tm++)
212  {
213  fhEnergyTime1Cell [tm] = 0;
214  fhColRowExoticLowE1Cell [tm] = 0;
215  fhColRowExoticHighE1Cell[tm] = 0;
216 
217  fhEnergyTimeExotic [tm] = 0;
218  fhColRowExoticLowE [tm] = 0 ;
219  fhColRowExoticHighE[tm] = 0 ;
224 
227 
230 
235 
240 
243 
252 
262 
269 
279 
289 
290 
291  fhNCellsTCardCorrNoSelection [tm] = 0 ;
294  fhExoticTCardCorrNoSelection [tm] = 0 ;
297 
306 
307  for(Int_t i = 0; i < 6; i++)
308  {
309  for(Int_t j = 0; j < 6; j++)
310  {
311  fhLambda0TCardCorrelNCell[i][j][tm] = 0 ;
312  fhLambda1TCardCorrelNCell[i][j][tm] = 0 ;
313  fhLambda0NLM1TCardCorrelNCell[i][j][tm] = 0 ;
314  fhLambda1NLM1TCardCorrelNCell[i][j][tm] = 0 ;
315  fhLambda0NLM2TCardCorrelNCell[i][j][tm] = 0 ;
316  fhLambda1NLM2TCardCorrelNCell[i][j][tm] = 0 ;
317 // fhLambdaRTCardCorrelNCell[i][j][tm] = 0 ;
318  fhNLocMaxTCardCorrelNCell[i][j][tm] = 0 ;
319 
320  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm] = 0 ;
321  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm] = 0 ;
322  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm] = 0 ;
323  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm] = 0 ;
324  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm] = 0 ;
325  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm] = 0 ;
326  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm] = 0 ;
327  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm] = 0 ;
328  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm] = 0 ;
329 
330  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm] = 0 ;
331  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm] = 0 ;
332  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm] = 0 ;
333  fhLogECellNLM1TCardCorrelNCell[i][j][tm] = 0 ;
334  fhLogECellNLM2TCardCorrelNCell[i][j][tm] = 0 ;
335  fhLogECellNLM3TCardCorrelNCell[i][j][tm] = 0 ;
336  fhECellWeightNLM1TCardCorrelNCell [i][j][tm] = 0 ;
337  fhECellWeightNLM2TCardCorrelNCell [i][j][tm] = 0 ;
338  fhECellWeightNLM3TCardCorrelNCell [i][j][tm] = 0 ;
339 
340  fhMassEClusTCardCorrelNCell[i][j][tm] = 0 ;
341 // fhMassEPairTCardCorrelNCell[i][j][tm] = 0 ;
342  fhExoticTCardCorrelNCell [i][j][tm] = 0 ;
343  fhTimeDiffTCardCorrelNCell [i][j][tm] = 0 ;
344  fhTimeDiffExoTCardCorrelNCell[i][j][tm] = 0 ;
345  fhColRowTCardCorrelNCellLowE [i][j][tm] = 0 ;
346  fhColRowTCardCorrelNCellHighE[i][j][tm] = 0 ;
347  }
348 
349 // fhLambda0TCardCorrelN[i][tm] = 0 ;
350 // fhNCellsTCardCorrelN [i][tm] = 0 ;
351 // fhExoticTCardCorrelN [i][tm] = 0 ;
352 // fhColRowTCardCorrelNLowE [i][tm] = 0 ;
353 // fhColRowTCardCorrelNHighE[i][tm] = 0 ;
354 //
355 // fhLambda0TCardCorrelNAllSameTCard[i][tm] = 0 ;
356 // fhNCellsTCardCorrelNAllSameTCard [i][tm] = 0 ;
357 // fhExoticTCardCorrelNAllSameTCard [i][tm] = 0 ;
358 // fhColRowTCardCorrelNAllSameTCardLowE [i][tm] = 0 ;
359 // fhColRowTCardCorrelNAllSameTCardHighE[i][tm] = 0 ;
360 //
361 // fhLambda0TCardCorrelNExotic[i][tm] = 0 ;
362 // fhNCellsTCardCorrelNExotic [i][tm] = 0 ;
363 // fhColRowTCardCorrelNLowEExotic [i][tm] = 0 ;
364 // fhColRowTCardCorrelNHighEExotic[i][tm] = 0 ;
365 //
366 // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm] = 0 ;
367 // fhNCellsTCardCorrelNAllSameTCardExotic [i][tm] = 0 ;
368 // fhColRowTCardCorrelNAllSameTCardLowEExotic [i][tm] = 0 ;
369 // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm] = 0 ;
370 // fhLambda0TCardCorrelNearRow[i][tm] = 0 ;
371 // fhNCellsTCardCorrelNearRow [i][tm] = 0 ;
372  }
373 
374 // for(Int_t i = 0; i < 4; i++)
375 // {
376 // fhLambda0TCardCorrel2ndMax[i][tm] = 0 ;
377 // fhNCellsTCardCorrel2ndMax [i][tm] = 0 ;
378 // fhLambda0TCardCorrelExotic[i][tm] = 0 ;
379 // fhNCellsTCardCorrelExotic [i][tm] = 0 ;
380 // }
381 
382  for(Int_t i = 0; i < 14; i++)
383  {
384  fhLambda0Exoticity[i][tm] = 0;
385  fhLambda1Exoticity[i][tm] = 0;
386 // fhLambdaRExoticity[i][tm] = 0;
387  fhNCellsExoticity [i][tm] = 0;
388  fhTimeExoticity [i][tm] = 0;
389  fhLambda0Lambda1 [i][tm] = 0;
390 
391 // fhLambda0ExoticityAllSameTCard[i][tm] = 0;
392 // fhLambda1ExoticityAllSameTCard[i][tm] = 0;
393 // fhLambdaRExoticityAllSameTCard[i][tm] = 0;
394 // fhNCellsExoticityAllSameTCard [i][tm] = 0;
395 // fhLambda0Lambda1AllSameTCard [i][tm] = 0;
396 
397  fhNCellsTCardSameAndDiff [i][tm] = 0;
399  }
400 
401  for(Int_t j = 0; j < 6; j++)
402  {
403  for(Int_t k = 0; k < 6; k++)
404  {
405  fhLambda0ExoticityPerNCell[j][k][tm] = 0;
406  fhLambda1ExoticityPerNCell[j][k][tm] = 0;
407 // fhLambdaRExoticityPerNCell[j][k][tm] = 0;
408  }
409  }
410 
411 // for(Int_t i = 0; i < 7; i++)
412 // {
413 // fhLambda0TCardCorrel[i][tm] = 0 ;
414 // fhNCellsTCardCorrel [i][tm] = 0 ;
415 // fhExoticTCardCorrel [i][tm] = 0 ;
416 //
417 // fhLambda0TCardCorrelOtherTCard[i][tm] = 0 ;
418 // fhNCellsTCardCorrelOtherTCard [i][tm] = 0 ;
419 // fhExoticTCardCorrelOtherTCard [i][tm] = 0 ;
420 // fhColRowTCardCorrelOtherTCardLowE [i][tm] = 0 ;
421 // fhColRowTCardCorrelOtherTCardHighE[i][tm] = 0 ;
422 // }
423 
424  for(Int_t i = 0; i < 12; i++)
425  {
426  fhTCardCorrECellMaxDiff[i][tm]=0;
427  fhTCardCorrEClusterDiff[i][tm]=0;
428 // fhTCardCorrECellMaxRat [i][tm]=0;
429 // fhTCardCorrEClusterRat [i][tm]=0;
430  fhTCardCorrTCellMaxDiff[i][tm]=0;
431 
432  fhTCardCorrECellMaxDiffExo[i][tm]=0;
433  fhTCardCorrEClusterDiffExo[i][tm]=0;
434 // fhTCardCorrECellMaxRatExo [i][tm]=0;
435 // fhTCardCorrEClusterRatExo [i][tm]=0;
436  fhTCardCorrTCellMaxDiffExo[i][tm]=0;
437  }
438  }
439 
440  for(Int_t i = 0; i < fNEBinCuts; i++)
441  {
446 // fhTMPhiResidualExoticityAllSameTCard[i] = 0;
447 // fhTMEtaResidualExoticityAllSameTCard[i] = 0;
448  }
449 
450  for(Int_t i = 0; i < 20; i++)
451  {
456  //fhESecCellLogM02NCellPerSM [i] = 0;
457 
459  //fhEMaxCellLogM02NCellPerSM [i] = 0;
460 
465 
468 
471 
478 
479  for(Int_t j = 0; j < 4; j++)
480  {
485 
490 
495  }
496  }
497 
500 
503 
504  InitParameters();
505 }
506 
507 
508 //___________________________________________________
517 //___________________________________________________
519 (AliVCluster* clus, Bool_t matched,Int_t absIdMax, Float_t exoticity)
520 {
521  // Get the col and row of the leading cluster cell
522 
523  Int_t icol = -1, irow = -1, iRCU = -1, icolAbs = -1, irowAbs = -1;
524  GetModuleNumberCellIndexesAbsCaloMap(absIdMax,GetCalorimeter(), icol, irow, iRCU, icolAbs, irowAbs);
525 
526  Float_t energy = clus->E();
527  Int_t ebin = -1;
528  for(Int_t ie = 0; ie < fNEBinCuts; ie++)
529  {
530  if( energy >= fEBinCuts[ie] && energy < fEBinCuts[ie+1] ) ebin = ie;
531  }
532 
533  Int_t ncells = clus->GetNCells();
534  Double_t time = clus->GetTOF()*1.e9;
535  if(time>400) time-=fConstantTimeShift;
536 
537  Float_t deta = clus->GetTrackDz();
538  Float_t dphi = clus->GetTrackDx();
539 
540  //if(clus->GetNCells()==1 && clus->E() > 4)printf("TCard E %f, NCells %d\n",energy,clus->GetNCells());
541 
542  if(fStudyExotic)
543  {
544  if ( ncells == 1 )
545  {
546  if(energy >= 5 && energy < 8)
547  fhColRowExoticLowE1Cell [matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
548  else if(energy >= 8)
549  {
550  fhColRowExoticHighE1Cell[matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
551 
552  if ( time > 5) fhColRowExoticHighE1CellPosTime->Fill(icolAbs,irowAbs,GetEventWeight());
553  else if( time < -5) fhColRowExoticHighE1CellNegTime->Fill(icolAbs,irowAbs,GetEventWeight());
554  else fhColRowExoticHighE1CellNulTime->Fill(icolAbs,irowAbs,GetEventWeight());
555  }
556 
557  fhEnergyTime1Cell[matched]->Fill(energy,time,GetEventWeight());
558  fhEnergyTMEtaResidual1Cell->Fill(energy,deta,GetEventWeight());
559  fhEnergyTMPhiResidual1Cell->Fill(energy,dphi,GetEventWeight());
560  }
561  else if(exoticity > 0.97)
562  {
563  if(energy >= 5 && energy < 8)
564  fhColRowExoticLowE [matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
565  else if(energy >= 8)
566  {
567  fhColRowExoticHighE[matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
568 
569  if ( time > 5) fhColRowExoticHighEPosTime->Fill(icolAbs,irowAbs,GetEventWeight());
570  else if( time < -5) fhColRowExoticHighENegTime->Fill(icolAbs,irowAbs,GetEventWeight());
571  else fhColRowExoticHighENulTime->Fill(icolAbs,irowAbs,GetEventWeight());
572  }
573 
574  fhEnergyTimeExotic[matched]->Fill(energy,time,GetEventWeight());
575  fhEnergyTMEtaResidualExotic->Fill(energy,deta,GetEventWeight());
576  fhEnergyTMPhiResidualExotic->Fill(energy,dphi,GetEventWeight());
577 
578  for (Int_t ipos = 0; ipos < ncells; ipos++)
579  {
580  Int_t absId = clus->GetCellsAbsId()[ipos];
581 
582  Float_t eCell = fCaloCellList->GetCellAmplitude(absId);
584 
585  // consider cells with enough energy weight and not the reference one
586  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
587 
588  if( absId == absIdMax || weight < 0.01 ) continue;
589 
590  Int_t rowDiff = -100, colDiff = -100;
591  Bool_t sameTCard = GetCaloUtils()->IsAbsIDsFromTCard(absIdMax,absId,rowDiff,colDiff);
592 
593  // Get the col and row of the secondary cluster cell
594  Int_t icol2 = -1, irow2 = -1, iRCU2 = -1, icolAbs2 = -1, irowAbs2 = -1;
595  GetModuleNumberCellIndexesAbsCaloMap(absId,GetCalorimeter(), icol2, irow2, iRCU2, icolAbs2, irowAbs2);
596 
597  if ( !sameTCard )
598  {
599  if(energy >= 5 && energy < 8)
600  fhColRowExotic2ndCellDiffLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
601  else if(energy >= 8)
602  fhColRowExotic2ndCellDiffHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
603  }
604  else
605  {
606  if(energy >= 5 && energy < 8)
607  fhColRowExotic2ndCellSameLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
608  else if(energy >= 8)
609  fhColRowExotic2ndCellSameHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
610  }
611  }
612 
613  }
614  else if ( energy > 8 )
615  {
616  if ( time > 5) fhColRowHighEPosTime->Fill(icolAbs,irowAbs,GetEventWeight());
617  else if( time < -5) fhColRowHighENegTime->Fill(icolAbs,irowAbs,GetEventWeight());
618  else fhColRowHighENulTime->Fill(icolAbs,irowAbs,GetEventWeight());
619  }
620 
621  if(ebin > -1)
622  {
623  fhTMPhiResidualExoticityLooseCut[ebin]->Fill(exoticity,dphi);
624  fhTMEtaResidualExoticityLooseCut[ebin]->Fill(exoticity,deta);
625  }
626  }
627  else if ( energy > 8 && ncells > 1 && exoticity < 0.97)
628  {
629  if ( time > 5) fhColRowHighEPosTime->Fill(icolAbs,irowAbs,GetEventWeight());
630  else if( time < -5) fhColRowHighENegTime->Fill(icolAbs,irowAbs,GetEventWeight());
631  else fhColRowHighENulTime->Fill(icolAbs,irowAbs,GetEventWeight());
632  }
633 
634  // Clean the sample
635 
636  // in center of SM
637  Int_t etaRegion = -1, phiRegion = -1;
638  GetCaloUtils()->GetEMCALSubregion(clus,fCaloCellList,etaRegion,phiRegion);
639  // Region 0: center of SM ~0.18<|eta|<0.55
640  if ( etaRegion !=0 ) return ;
641 
642  if(fStudyExotic)
643  {
644  if ( ncells == 1 )
645  {
646  fhEnergyTimeTCardCorrNoSelection1Cell[matched]->Fill(energy,time,GetEventWeight());
649  }
650  else if(exoticity > 0.97)
651  {
652  fhEnergyTimeTCardCorrNoSelectionExotic[matched]->Fill(energy,time,GetEventWeight());
655  }
656  }
657 
658  Float_t m02 = clus->GetM02();
659  Float_t m20 = clus->GetM20();
660  Float_t lamR = 0;
661  if ( m02 > 0.001 ) lamR = m20/m02;
662 
663  Int_t absIdList[ncells];
664  Float_t maxEList [ncells];
665  Int_t nlm = GetCaloUtils()->GetNumberOfLocalMaxima(clus, fCaloCellList, absIdList, maxEList) ;
666 //Int_t nlm = GetCaloUtils()->GetNumberOfLocalMaxima(clus,fCaloCellList);
667 
668  //
669  // Correlation to max
670  //
671  Int_t nCellWithWeight = 1;
672  Bool_t nearRow = kFALSE;
673  Bool_t nearCol = kFALSE;
674  Int_t nCorr = 0;
675  Int_t nCorrNo = 0;
676  Int_t sameCol = 0;
677  Int_t other = 0;
678  Int_t sameRow = 0;
679  Float_t eCellMax = fCaloCellList->GetCellAmplitude(absIdMax);
680  //printf("Org E %2.2f, t %2.2f\n",eCellMax,tCellMax*1e9);
681  GetCaloUtils()->RecalibrateCellAmplitude(eCellMax, GetCalorimeter(), absIdMax);
682  //printf("New E %2.2f, t %2.2f\n",eCellMax,tCellMax*1e9);
683 
684  Double_t tCellMax = -1000;
685  if( fStudyTimeCellHisto )
686  {
687  tCellMax = fCaloCellList->GetCellTime(absIdMax);
688 
689  GetCaloUtils()->RecalibrateCellTime(tCellMax, GetCalorimeter(), absIdMax, GetReader()->GetInputEvent()->GetBunchCrossNumber());
690  tCellMax *= 1.0e9;
691  if(tCellMax>400) tCellMax-=fConstantTimeShift;
692  }
693 
694  // correlation not max cells
695 // Int_t nCorr2 = 0;
696 // Int_t sameCol2 = 0;
697 // Int_t other2 = 0;
698 // Int_t sameRow2 = 0;
699 
700  // Get second highest energy cell
701 // Int_t absId2ndMax = -1;
702  Float_t emax2nd = 0;
703  Bool_t sameTCard2ndMax = kFALSE;
704 //Int_t rowDiff2 = -100;
705 //Int_t colDiff2 = -100;
706 
707  Float_t eCellSameRowSameTCardNearCol = 0.;
708  Float_t eCellSameRowDiffTCardNearCol = 0.;
709  Double_t tCellSameRowSameTCardNearCol = 0.;
710  Double_t tCellSameRowDiffTCardNearCol = 0.;
711 
712  //printf("Cluster E %2.2f, ncells %d, absIdMax %d, eCell Max %2.2f\n", energy, ncells, absIdMax, fCaloCellList->GetCellAmplitude(absIdMax));
713 
714  //
715  // Loop on the cluster cells, define correlations
716  //
717  for (Int_t ipos = 0; ipos < ncells; ipos++)
718  {
719  Int_t absId = clus->GetCellsAbsId()[ipos];
720 
721  Float_t eCell = fCaloCellList->GetCellAmplitude(absId);
723 
724  Double_t tCell = 0;
726  {
727  tCell = fCaloCellList->GetCellTime(absId);
728  GetCaloUtils()->RecalibrateCellTime(tCell, GetCalorimeter(), absId, GetReader()->GetInputEvent()->GetBunchCrossNumber());
729  tCell *= 1.0e9;
730  if(tCell>400) tCell-=fConstantTimeShift;
731  }
732 
733  // consider cells with enough energy weight and not the reference one
734  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
735 
736  if( absId == absIdMax || weight < 0.01 ) continue;
737 
739  {
740  if (nlm==1)
741  {
742  fhECellClusRatNLM1TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
743  fhLogECellNLM1TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
744  fhECellWeightNLM1TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
745  }
746  else if(nlm==2)
747  {
748  fhECellClusRatNLM2TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
749  fhLogECellNLM2TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
750  fhECellWeightNLM2TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
751  }
752  else
753  {
754  fhECellClusRatNLM3TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
755  fhLogECellNLM3TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
756  fhECellWeightNLM3TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
757  }
758  }
759 
760  Int_t rowDiff = -100, colDiff = -100;
761  Bool_t sameTCard = GetCaloUtils()->IsAbsIDsFromTCard(absIdMax,absId,rowDiff,colDiff);
762 
763  if ( sameTCard && fFillNLocMaxHistos )
764  {
765  if (nlm==1)
766  {
767  fhECellSameClusRatNLM1TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
768  fhLogECellSameNLM1TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
769  fhECellSameWeightNLM1TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
770  }
771  else if(nlm==2)
772  {
773  fhECellSameClusRatNLM2TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
774  fhLogECellSameNLM2TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
775  fhECellSameWeightNLM2TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
776  }
777  else
778  {
779  fhECellSameClusRatNLM3TCardCorrNoSelection[matched]->Fill(energy, eCell/energy, GetEventWeight());
780  fhLogECellSameNLM3TCardCorrNoSelection [matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
781  fhECellSameWeightNLM3TCardCorrNoSelection [matched]->Fill(energy, weight, GetEventWeight());
782  }
783  }
784 
785  //if(eCellMax < eCell) printf("Check: E max %f (id %d), E sec %f (id %d)\n",eCellMax,absIdMax, eCell,absId);
786 
787  nCellWithWeight++;
788 
789  //printf("\t cell %d, absId %d, E %2.2f, w %2.2f, tcard %d\n", ipos, absId, eCell, weight, sameTCard);
790 
791  Int_t indexType = -1;
792  if ( sameTCard )
793  {
794  nCorr++;
795 
796  if(TMath::Abs(rowDiff) == 1) nearRow = kTRUE;
797  if(TMath::Abs(colDiff) == 1) nearCol = kTRUE;
798 
799  if ( rowDiff == 0 && colDiff != 0 )
800  {
801  if ( nearCol ) indexType = 6;
802  else indexType = 7;
803 
804  sameRow++;
805  /*printf("\t \t E %2.2f, Same row, diff row %d, col %d\n",eCell,rowDiff,colDiff);*/
806  }
807  else if ( rowDiff != 0 && colDiff == 0 )
808  {
809  if ( nearRow ) indexType = 8;
810  else indexType = 9;
811 
812  sameCol++;
813  /*printf("\t \t E %2.2f, Same col, diff row %d, col %d\n",eCell,rowDiff,colDiff);*/
814  }
815  else
816  {
817  if ( nearRow && nearCol) indexType = 10;
818  else indexType = 11;
819 
820  other++;
821  /*printf("\t \t E %2.2f, Diff row/col, diff row %d, col %d\n",eCell,rowDiff,colDiff);*/
822  }
823  }
824  else
825  {
826  nCorrNo++;
827 
828  if ( rowDiff == 0 && colDiff != 0 )
829  {
830  if ( nearCol ) indexType = 0;
831  else indexType = 1;
832 
833  }
834  else if ( rowDiff != 0 && colDiff == 0 )
835  {
836  if ( nearRow ) indexType = 2;
837  else indexType = 3;
838  }
839  else
840  {
841  if ( nearCol && nearRow ) indexType = 4;
842  else indexType = 5;
843  }
844  }
845 
846  if ( rowDiff == 0 && TMath::Abs(colDiff) == 1 )
847  {
848  if(sameTCard)
849  {
850  eCellSameRowSameTCardNearCol = eCell;
851  tCellSameRowSameTCardNearCol = tCell;
852  }
853  else
854  {
855  eCellSameRowDiffTCardNearCol = eCell;
856  tCellSameRowDiffTCardNearCol = tCell;
857  }
858  }
859 
860  if( indexType >=0 )
861  {
862  Float_t eCellDiff = eCellMax - eCell;
863  Float_t eClusDiff = energy - eCell;
864 // Float_t eCellRat = eCell / eCellMax;
865 // Float_t eClusRat = eCell / energy ;
866  Float_t tCellDiff = tCellMax - tCell;
867 
868  fhTCardCorrECellMaxDiff[indexType][matched]->Fill(energy, eCellDiff, GetEventWeight());
869  fhTCardCorrEClusterDiff[indexType][matched]->Fill(energy, eClusDiff, GetEventWeight());
870 // fhTCardCorrECellMaxRat [indexType][matched]->Fill(energy, eCellRat , GetEventWeight());
871 // fhTCardCorrEClusterRat [indexType][matched]->Fill(energy, eClusRat , GetEventWeight());
872  fhTCardCorrTCellMaxDiff[indexType][matched]->Fill(energy, tCellDiff, GetEventWeight());
873 
874  if ( fStudyExotic && exoticity > 0.97 )
875  {
876  fhTCardCorrECellMaxDiffExo[indexType][matched]->Fill(energy, eCellDiff, GetEventWeight());
877  fhTCardCorrEClusterDiffExo[indexType][matched]->Fill(energy, eClusDiff, GetEventWeight());
878 // fhTCardCorrECellMaxRatExo [indexType][matched]->Fill(energy, eCellRat , GetEventWeight());
879 // fhTCardCorrEClusterRatExo [indexType][matched]->Fill(energy, eClusRat , GetEventWeight());
880  fhTCardCorrTCellMaxDiffExo[indexType][matched]->Fill(energy, tCellDiff, GetEventWeight());
881  }
882  }
883 
884  if ( fStudyExotic && exoticity > 0.97 )
885  {
886  // Get the col and row of the secondary cluster cell
887  Int_t icol2 = -1, irow2 = -1, iRCU2 = -1, icolAbs2 = -1, irowAbs2 = -1;
888  GetModuleNumberCellIndexesAbsCaloMap(absId,GetCalorimeter(), icol2, irow2, iRCU2, icolAbs2, irowAbs2);
889 
890  if ( !sameTCard )
891  {
892  if(energy >= 5 && energy < 8)
893  fhColRowTCardCorrNoSelectionExotic2ndCellDiffLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
894  else if(energy >= 8)
895  fhColRowTCardCorrNoSelectionExotic2ndCellDiffHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
896  }
897  else
898  {
899  if(energy >= 5 && energy < 8)
900  fhColRowTCardCorrNoSelectionExotic2ndCellSameLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
901  else if(energy >= 8)
902  fhColRowTCardCorrNoSelectionExotic2ndCellSameHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
903  }
904  }
905 
906  if ( eCell > emax2nd )
907  {
908  emax2nd = eCell;
909 // absId2ndMax = absId;
910  if(sameTCard)
911  {
912  sameTCard2ndMax = kTRUE;
913 // rowDiff2 = rowDiff;
914 // colDiff2 = colDiff;
915  }
916  else
917  {
918  sameTCard2ndMax = kFALSE;
919 // rowDiff2 = -100;
920 // colDiff2 = -100;
921  }
922  }
923 
924 // //
925 // // Other TCard correlations
926 // //
927 // if ( sameTCard ) continue;
928 //
929 // for (Int_t ipos2 = 0; ipos2 < ncells; ipos2++)
930 // {
931 // Int_t absId2 = clus->GetCellsAbsId()[ipos2];
932 //
933 // eCell = fCaloCellList->GetCellAmplitude(absId2);
934 // // consider cells with enough energy weight and not the reference one
935 // weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
936 //
937 // if( absId2 == absIdMax || absId2 == absId || weight < 0.01 ) continue;
938 //
939 // rowDiff = -100, colDiff = -100;
940 // Bool_t sameTCard2 = GetCaloUtils()->IsAbsIDsFromTCard(absId,absId2,rowDiff,colDiff);
941 //
942 // if(sameTCard2)
943 // {
944 // nCorr2++;
945 // if ( rowDiff == 0 && colDiff != 0 ) sameRow2++;
946 // else if ( rowDiff != 0 && colDiff == 0 ) sameCol2++;
947 // else other2++;
948 // }
949 // //printf("\t cell %d, absId %d, E %2.2f, w %2.2f, tcard %d\n", ipos, absId, eCell, weight, sameTCard);
950 // } // second cluster cell lopp for secondary TCard correlations
951  } // cluster cell loop
952 
953  Float_t ratioNcells = nCellWithWeight/(ncells*1.);
954  fhNCellsTCardCorrRatioWithWeightNoSelection[matched]->Fill(energy, ratioNcells, GetEventWeight());
955  //printf("E %2.2f, ncells %d, nCellWithWeight %d, ratio %2.2f\n",energy,ncells,nCellWithWeight,ratioNcells);
956 
957  // If only one relevant cell, it makes no sense to continue
958  if ( nCellWithWeight <= 1 ) return;
959 
960  // It should not happen, unless very exotic clusters
961  if ( m02 < 0.001 )
962  {
963  printf("AliAnaClusterShapeCorrelStudies: M02 %f, M20 %f, E %2.3f, ncell %d, n with weight %d; max cell E %2.3f\n",
964  m02,m20,energy,ncells,nCellWithWeight,eCellMax);
965  }
966 
967  //printf("\t Same col %d, same row %d, diff other %d\n",sameCol,sameRow,other);
968  //printf("\t Second cell: E %2.2f, absId %d, correl %d, rowDiff %d, rowCol %d\n",emax,absId2ndMax,sameTCard2,rowDiff2, colDiff2);
969 
970  //
971  // Fill histograms for different cell correlation criteria
972  //
973  if(energy >= 5 && energy < 8)
974  fhColRowTCardCorrNoSelectionLowE [matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
975  else if(energy >= 8)
976  fhColRowTCardCorrNoSelectionHighE[matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
977 
978  if ( fStudyExotic && exoticity > 0.97 )
979  {
980  if(energy >= 5 && energy < 8)
981  fhColRowTCardCorrNoSelectionExoticLowE [matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
982  else if(energy >= 8)
983  fhColRowTCardCorrNoSelectionExoticHighE[matched]->Fill(icolAbs,irowAbs,GetEventWeight()) ;
984  }
985 
986  fhTimeTCardCorrNoSelection [matched]->Fill(energy,time, GetEventWeight());
987  fhLambda0TCardCorrNoSelection[matched]->Fill(energy, m02, GetEventWeight());
988  fhLambda1TCardCorrNoSelection[matched]->Fill(energy, m20, GetEventWeight());
989 
990  fhLambdaRTCardCorrNoSelection[matched]->Fill(energy,lamR, GetEventWeight());
991  fhExoticTCardCorrNoSelection [matched]->Fill(energy, exoticity, GetEventWeight());
992 
993  if ( fFillNLocMaxHistos )
994  {
995  fhNLocMaxTCardCorrNoSelection[matched]->Fill(energy, nlm, GetEventWeight());
996 
997  if ( nlm == 1 )
998  {
999  fhLambda0NLM1TCardCorrNoSelection[matched]->Fill(energy, m02, GetEventWeight());
1000  fhLambda1NLM1TCardCorrNoSelection[matched]->Fill(energy, m20, GetEventWeight());
1001 
1002  fhEMaxRatNLM1TCardCorrNoSelection [matched]->Fill(energy, eCellMax/energy , GetEventWeight());
1003  fhE2ndRatNLM1TCardCorrNoSelection [matched]->Fill(energy, emax2nd/energy , GetEventWeight());
1004  fhE2ndEMaxRatNLM1TCardCorrNoSelection[matched]->Fill(energy, emax2nd/eCellMax, GetEventWeight());
1005  }
1006  else if ( nlm==2 )
1007  {
1008  fhLambda0NLM2TCardCorrNoSelection[matched]->Fill(energy, m02, GetEventWeight());
1009  fhLambda1NLM2TCardCorrNoSelection[matched]->Fill(energy, m20, GetEventWeight());
1010 
1011  fhEMaxRatNLM2TCardCorrNoSelection [matched]->Fill(energy, eCellMax/energy , GetEventWeight());
1012  fhE2ndRatNLM2TCardCorrNoSelection [matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1013  fhE2ndEMaxRatNLM2TCardCorrNoSelection[matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1014  }
1015  else
1016  {
1017  fhEMaxRatNLM3TCardCorrNoSelection [matched]->Fill(energy, eCellMax/energy , GetEventWeight());
1018  fhE2ndRatNLM3TCardCorrNoSelection [matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1019  fhE2ndEMaxRatNLM3TCardCorrNoSelection[matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1020  }
1021 
1022  if ( sameTCard2ndMax )
1023  {
1024  if (nlm==1)
1025  {
1026  fhE2ndSameRatNLM1TCardCorrNoSelection [matched]->Fill(energy, emax2nd/energy , GetEventWeight());
1027  fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[matched]->Fill(energy, emax2nd/eCellMax, GetEventWeight());
1028  }
1029  else if(nlm==2)
1030  {
1031  fhE2ndSameRatNLM2TCardCorrNoSelection [matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1032  fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1033  }
1034  else
1035  {
1036  fhE2ndSameRatNLM3TCardCorrNoSelection [matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1037  fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1038  }
1039  } // sameTCard2ndMax
1040  } // NLM histos
1041 
1042  fhNCellsTCardCorrNoSelection [matched]->Fill(energy, ncells, GetEventWeight());
1043  fhNCellsTCardCorrWithWeightNoSelection[matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1044 
1045  if(eCellSameRowSameTCardNearCol > 0 && eCellSameRowDiffTCardNearCol > 0)
1046  {
1047  Float_t eDiff = eCellSameRowSameTCardNearCol - eCellSameRowDiffTCardNearCol ;
1048  Float_t tDiff = tCellSameRowSameTCardNearCol - tCellSameRowDiffTCardNearCol ;
1049 
1050  fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[matched]->Fill(energy , eDiff, GetEventWeight());
1051  fhSameRowDiffColAndTCardCellsTimeDiffClusterE [matched]->Fill(energy , tDiff, GetEventWeight());
1052  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[matched]->Fill(eCellMax, eDiff, GetEventWeight());
1053  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE [matched]->Fill(eCellMax, tDiff, GetEventWeight());
1054 
1055  if ( fStudyExotic && exoticity > 0.97 )
1056  {
1057  fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[matched]->Fill(energy , eDiff, GetEventWeight());
1058  fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo [matched]->Fill(energy , tDiff, GetEventWeight());
1059  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[matched]->Fill(eCellMax, eDiff, GetEventWeight());
1060  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo [matched]->Fill(eCellMax, tDiff, GetEventWeight());
1061  }
1062  }
1063 
1065  Int_t nCorrInd = nCorr;
1066  if(nCorr > 4) nCorrInd = 5;
1067 
1068  Int_t nCorrNoInd = nCorrNo;
1069  if(nCorrNoInd > 4) nCorrNoInd = 5;
1070 
1071 // fhLambda0TCardCorrelN[nCorrInd][matched]->Fill(energy, m02, GetEventWeight());
1072 // fhNCellsTCardCorrelN [nCorrInd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1073 // fhExoticTCardCorrelN [nCorrInd][matched]->Fill(energy, exoticity, GetEventWeight());
1074 //
1075 // if ( energy >= 2 && energy < 8 )
1076 // fhColRowTCardCorrelNLowE [nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1077 // if ( energy >= 8 )
1078 // fhColRowTCardCorrelNHighE[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1079 
1080  if ( fFillNLocMaxHistos)
1081  {
1082  if ( nlm == 1 )
1083  {
1084  fhLambda0NLM1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m02, GetEventWeight());
1085  fhLambda1NLM1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m20, GetEventWeight());
1086 
1087  fhEMaxRatNLM1TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, eCellMax/energy , GetEventWeight());
1088  fhE2ndRatNLM1TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, emax2nd/energy , GetEventWeight());
1089  fhE2ndEMaxRatNLM1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, emax2nd/eCellMax, GetEventWeight());
1090  }
1091  else if( nlm == 2 )
1092  {
1093  fhLambda0NLM2TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m02, GetEventWeight());
1094  fhLambda1NLM2TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m20, GetEventWeight());
1095 
1096  fhEMaxRatNLM2TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, eCellMax/energy, GetEventWeight());
1097  fhE2ndRatNLM2TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1098  fhE2ndEMaxRatNLM2TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1099  }
1100  else
1101  {
1102  fhEMaxRatNLM3TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, eCellMax/energy, GetEventWeight());
1103  fhE2ndRatNLM3TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, maxEList[1]/energy , GetEventWeight());
1104  fhE2ndEMaxRatNLM3TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, maxEList[1]/eCellMax, GetEventWeight());
1105  }
1106 
1107  fhNLocMaxTCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, nlm, GetEventWeight());
1108  } // NLM histos
1109 
1110  fhLambda0TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m02, GetEventWeight());
1111  fhLambda1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, m20, GetEventWeight());
1112 //fhLambdaRTCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy,lamR, GetEventWeight());
1113 
1114  if(fStudyExotic)
1115  fhExoticTCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, exoticity, GetEventWeight());
1116 
1117  // Time diff in cluster, depending nCells
1118  for (Int_t ipos = 0; ipos < ncells; ipos++)
1119  {
1120  Int_t absId = clus->GetCellsAbsId()[ipos];
1121 
1122  Float_t eCell = fCaloCellList->GetCellAmplitude(absId);
1124 
1125  Double_t tCell = 0;
1126 
1127  if ( fStudyTimeCellHisto )
1128  {
1129  tCell = fCaloCellList->GetCellTime(absId);
1130 
1131  GetCaloUtils()->RecalibrateCellTime(tCell, GetCalorimeter(), absId, GetReader()->GetInputEvent()->GetBunchCrossNumber());
1132  tCell *= 1.0e9;
1133  if(tCell>400) tCell-=fConstantTimeShift;
1134  }
1135 
1136  // consider cells with enough energy weight and not the reference one
1137  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
1138 
1139  if( absId == absIdMax || weight < 0.01 ) continue;
1140 
1141  Float_t tDiffMaxSecondary = tCellMax - tCell;
1142  //printf("Time max %f, second %f, diff %f\n",tCellMax,tCell,tDiffMaxSecondary);
1143  fhTimeDiffTCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, tDiffMaxSecondary, GetEventWeight());
1144  if ( fStudyExotic && exoticity > 0.97 )
1145  {
1146  fhTimeDiffExoTCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, tDiffMaxSecondary, GetEventWeight());
1147  // Get the col and row of the secondary cluster cell
1148  Int_t icol2 = -1, irow2 = -1, iRCU2 = -1, icolAbs2 = -1, irowAbs2 = -1;
1149  GetModuleNumberCellIndexesAbsCaloMap(absId,GetCalorimeter(), icol2, irow2, iRCU2, icolAbs2, irowAbs2);
1150 
1151  Int_t rowDiff = -100, colDiff = -100;
1152  Bool_t sameTCard = GetCaloUtils()->IsAbsIDsFromTCard(absIdMax,absId,rowDiff,colDiff);
1153 
1154  if ( !sameTCard )
1155  {
1156  if ( energy >= 5 && energy < 8 && nCorr == 0 )
1157  fhColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1158  else if ( energy >= 8 && nCorr == 0 )
1159  fhColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1160  }
1161  else
1162  {
1163  if ( energy >= 5 && energy < 8 && nCorrNo == 0 )
1164  fhColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffLowE [matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1165  else if ( energy >= 8 && nCorrNo == 0 )
1166  fhColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffHighE[matched]->Fill(icolAbs2,irowAbs2,GetEventWeight()) ;
1167  }
1168  } // exotic
1169 
1170  if ( fFillNLocMaxHistos )
1171  {
1172  if (nlm==1)
1173  {
1174  fhECellClusRatNLM1TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, eCell/energy, GetEventWeight());
1175  fhLogECellNLM1TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1176  fhECellWeightNLM1TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, weight, GetEventWeight());
1177  }
1178  else if(nlm==2)
1179  {
1180  fhECellClusRatNLM2TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, eCell/energy, GetEventWeight());
1181  fhLogECellNLM2TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1182  fhECellWeightNLM2TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, weight, GetEventWeight());
1183  }
1184  else
1185  {
1186  fhECellClusRatNLM3TCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, eCell/energy, GetEventWeight());
1187  fhLogECellNLM3TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, TMath::Log(eCell), GetEventWeight());
1188  fhECellWeightNLM3TCardCorrelNCell [nCorrInd][nCorrNoInd][matched]->Fill(energy, weight, GetEventWeight());
1189  }
1190  } // NLM histos
1191 
1192  } //cell loop
1193 
1194  // Invariant mass for clusters looking like photons, depending number of cells
1195  if ( fStudyInvMass && m02 > fInvMassMinM02Cut && m02 < fInvMassMaxM02Cut )
1196  {
1197  for(Int_t jclus = 0 ; jclus < fCaloClusList->GetEntriesFast() ; jclus++)
1198  {
1199  AliVCluster* clus2 = (AliVCluster*) fCaloClusList->At(jclus);
1200 
1201  Float_t maxCellFraction = 0.;
1202  Int_t absIdMax2 = GetCaloUtils()->GetMaxEnergyCell(fCaloCellList, clus2, maxCellFraction);
1203 
1204  Double_t tof2 = clus2->GetTOF()*1.e9;
1205  if(tof2>400) tof2-=fConstantTimeShift;
1206 
1207  Double_t diffTof = tCellMax-tof2;
1208 
1209  // Try to reduce background with a mild shower shape cut and no more
1210  // than 1 local maximum in cluster and remove low energy clusters
1211 
1212  if( absIdMax == absIdMax2
1213  || !IsGoodCluster(absIdMax2, clus2->GetM02(), clus2->GetNCells())
1215  || clus2->GetM02() > fInvMassMaxM02Cut
1216  || clus2->GetM02() < fInvMassMinM02Cut
1217  || clus2->E() < fInvMassMinECut
1218  || clus2->E() > fInvMassMaxECut
1219  || TMath::Abs(diffTof) > fInvMassMaxTimeDifference
1220  ) continue;
1221 
1222  // Get cluster kinematics
1223  Double_t v[3] = {0,0,0}; //vertex ;
1224  clus2->GetMomentum(fClusterMomentum2,v);
1225 
1226  // Check only certain regions
1227  Bool_t in2 = kTRUE;
1229  if(!in2) continue;
1230 
1231  //Float_t pairE = (fClusterMomentum+fClusterMomentum2).E();
1232 
1233  // Opening angle cut, avoid combination of DCal and EMCal clusters
1234  Double_t angle = fClusterMomentum.Angle(fClusterMomentum2.Vect());
1235 
1236  if( angle > fInvMassMaxOpenAngle ) continue;
1237 
1238  // Fill histograms
1240  fhMassEClusTCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(energy, mass, GetEventWeight());
1241  //fhMassEPairTCardCorrelNCell[nCorrInd][nCorrNoInd][matched]->Fill(pairE , mass, GetEventWeight());
1242  }
1243  }
1244 
1245  if ( energy >= 5 && energy < 8)
1246  fhColRowTCardCorrelNCellLowE [nCorrInd][nCorrNoInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1247  else if ( energy >= 8 )
1248  fhColRowTCardCorrelNCellHighE[nCorrInd][nCorrNoInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1249 
1250 // if(nCorrNo == 0)
1251 // {
1252 // fhLambda0TCardCorrelNAllSameTCard[nCorrInd][matched]->Fill(energy, m02, GetEventWeight());
1253 // fhNCellsTCardCorrelNAllSameTCard [nCorrInd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1254 // fhExoticTCardCorrelNAllSameTCard [nCorrInd][matched]->Fill(energy, exoticity, GetEventWeight());
1255 // if ( energy >= 2 && energy < 8 )
1256 // fhColRowTCardCorrelNAllSameTCardLowE[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1257 // else if ( energy >= 8 )
1258 // fhColRowTCardCorrelNAllSameTCardHighE[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1259 // }
1260 
1262 
1263  if ( fStudyExotic && exoticity > 0.97 )
1264  {
1265  if ( energy >= 5 && energy < 8)
1266  fhColRowTCardCorrelNCellExoticLowE [nCorrInd][nCorrNoInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1267  else if ( energy >= 8 )
1268  fhColRowTCardCorrelNCellExoticHighE[nCorrInd][nCorrNoInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1269 
1270 // fhLambda0TCardCorrelNExotic[nCorrInd][matched]->Fill(energy, m02, GetEventWeight());
1271 // fhNCellsTCardCorrelNExotic [nCorrInd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1272 //
1273 // if ( energy > 5 && energy <= 8 )
1274 // fhColRowTCardCorrelNLowEExotic [nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1275 // if ( energy > 8 )
1276 // fhColRowTCardCorrelNHighEExotic[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1277 //
1278 // if(nCorrNo == 0)
1279 // {
1280 // fhLambda0TCardCorrelNAllSameTCardExotic[nCorrInd][matched]->Fill(energy, m02, GetEventWeight());
1281 // fhNCellsTCardCorrelNAllSameTCardExotic [nCorrInd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1282 //
1283 // if ( energy > 2 && energy <=8 )
1284 // fhColRowTCardCorrelNAllSameTCardLowEExotic [nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1285 // if ( energy > 8 )
1286 // fhColRowTCardCorrelNAllSameTCardHighEExotic[nCorrInd][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1287 // }
1288 //
1289 // Int_t indexExo = -1;
1290 // if (!nearRow && nearCol ) indexExo = 0;
1291 // else if (!nearRow && !nearCol ) indexExo = 1;
1292 // else if ( nearRow && nearCol ) indexExo = 2;
1293 // else if ( nearRow && !nearCol ) indexExo = 3;
1294 //
1295 // if(indexExo >= 0)
1296 // {
1297 // fhLambda0TCardCorrelExotic[indexExo][matched]->Fill(energy, m02, GetEventWeight());
1298 // fhNCellsTCardCorrelExotic [indexExo][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1299 // }
1300  }
1301 
1302 
1303  if( ebin > -1 )
1304  {
1305  fhLambda0Lambda1 [ebin][matched]->Fill(m20, m02, GetEventWeight());
1306  fhNCellsTCardSameAndDiff[ebin][matched]->Fill(nCorrNo, nCorr, GetEventWeight());
1307  // if(nCorrNo == 0)
1308  // fhLambda0Lambda1AllSameTCard [ebin][matched]->Fill(m20, m02, GetEventWeight());
1309 
1310  if(fStudyExotic)
1311  {
1312  fhLambda0Exoticity[ebin][matched]->Fill(exoticity, m02, GetEventWeight());
1313  fhLambda1Exoticity[ebin][matched]->Fill(exoticity, m20, GetEventWeight());
1314  //fhLambdaRExoticity[ebin][matched]->Fill(exoticity,lamR, GetEventWeight());
1315  fhNCellsExoticity [ebin][matched]->Fill(exoticity, nCellWithWeight, GetEventWeight());
1316  fhTimeExoticity [ebin][matched]->Fill(exoticity, tCellMax, GetEventWeight());
1317 
1318  if(energy > 8)
1319  {
1320  fhLambda0ExoticityPerNCell[nCorrInd][nCorrNoInd][matched]->Fill(exoticity, m02, GetEventWeight());
1321  fhLambda1ExoticityPerNCell[nCorrInd][nCorrNoInd][matched]->Fill(exoticity, m20, GetEventWeight());
1322  //fhLambdaRExoticityPerNCell[nCorrInd][nCorrNoInd][matched]->Fill(exoticity,lamR, GetEventWeight());
1323  }
1324 
1325  // if(nCorrNo == 0)
1326  // {
1327  // fhLambda0ExoticityAllSameTCard[ebin][matched]->Fill(exoticity, m02, GetEventWeight());
1328  // fhLambda1ExoticityAllSameTCard[ebin][matched]->Fill(exoticity, m20, GetEventWeight());
1329  // fhLambdaRExoticityAllSameTCard[ebin][matched]->Fill(exoticity,lamR, GetEventWeight());
1330  // fhNCellsExoticityAllSameTCard [ebin][matched]->Fill(exoticity, nCellWithWeight, GetEventWeight());
1331  // }
1332 
1333  if ( exoticity > 0.97 )
1334  fhNCellsTCardSameAndDiffExotic[ebin][matched]->Fill(nCorrNo, nCorr, GetEventWeight());
1335 
1336  // Track matching residuals
1337  fhTMPhiResidualExoticity[ebin]->Fill(exoticity,dphi);
1338  fhTMEtaResidualExoticity[ebin]->Fill(exoticity,deta);
1339 
1340  // if(nCorrNo==0)
1341  // {
1342  // fhTMPhiResidualExoticityAllSameTCard[ebin]->Fill(exoticity,dphi);
1343  // fhTMEtaResidualExoticityAllSameTCard[ebin]->Fill(exoticity,deta);
1344  // }
1345  }
1346  }
1347 
1348  Float_t nCellRat = nCorr*1. / ((nCorr+nCorrNo)*1.);
1349  fhNCellsTCardSameAndDiffFraction[matched]->Fill(energy, nCellRat, GetEventWeight());
1350  if ( fStudyExotic && exoticity > 0.97 )
1351  fhNCellsTCardSameAndDiffFractionExotic[matched]->Fill(energy, nCellRat, GetEventWeight());
1352 
1353 // if(nCorr > 0)
1354 // {
1355 // Int_t index = -1;
1356 // if (!sameRow && sameCol && !other ) index = 0;
1357 // else if (!sameRow && !sameCol && other ) index = 1;
1358 // else if (!sameRow && sameCol && other ) index = 2;
1359 // else if ( sameRow && sameCol && !other ) index = 3;
1360 // else if ( sameRow && !sameCol && other ) index = 4;
1361 // else if ( sameRow && sameCol && other ) index = 5;
1362 // else if ( sameRow && !sameCol && !other ) index = 6;
1363 // else printf("case not considered: sameRow %d, sameCol %d, other %d, nearRow %d\n",sameRow,sameCol,other,nearRow);
1364 //
1365 // if(index >= 0)
1366 // {
1367 // fhLambda0TCardCorrel[index][matched]->Fill(energy, m02, GetEventWeight());
1368 // fhNCellsTCardCorrel [index][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1369 // fhExoticTCardCorrel [index][matched]->Fill(energy, exoticity, GetEventWeight());
1370 // }
1371 //
1372 // // Comment out, no special effect observed
1373 // Int_t indexNR = -1;
1374 // if ( nearRow )
1375 // {
1376 // if (!sameRow && sameCol && !other ) indexNR = 0;
1377 // else if (!sameRow && !sameCol && other ) indexNR = 1;
1378 // else if (!sameRow && sameCol && other ) indexNR = 2;
1379 // else if ( sameRow && sameCol && !other ) indexNR = 3;
1380 // else if ( sameRow && !sameCol && other ) indexNR = 4;
1381 // else if ( sameRow && sameCol && other ) indexNR = 5;
1382 // else printf("\t near row case not considered!: sameRow %d, sameCol %d, other %d\n",sameRow,sameCol,other);
1383 // }
1384 //
1385 // if ( indexNR >= 0 )
1386 // {
1387 // fhLambda0TCardCorrelNearRow[indexNR][matched]->Fill(energy, m02, GetEventWeight());
1388 // fhNCellsTCardCorrelNearRow [indexNR][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1389 // }
1390 //
1391 // if ( sameTCard2ndMax )
1392 // {
1393 // Int_t index2nd = -1;
1394 // if ( TMath::Abs(rowDiff2) == 1 && TMath::Abs(colDiff2) != 1 ) index2nd = 0;
1395 // else if( TMath::Abs(rowDiff2) != 1 && TMath::Abs(colDiff2) == 1 ) index2nd = 1;
1396 // else if( TMath::Abs(rowDiff2) == 1 && TMath::Abs(colDiff2) == 1 ) index2nd = 2;
1397 // else index2nd = 3;
1398 //
1399 // fhLambda0TCardCorrel2ndMax[index2nd][matched]->Fill(energy, m02, GetEventWeight());
1400 // fhNCellsTCardCorrel2ndMax [index2nd][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1401 // }
1402 // }
1403 //
1404 // Int_t indexOtherTCard = -1;
1405 // if ( nCorr == 0 && nCorr2 == 0 ) indexOtherTCard = 6;
1406 // else if ( nCorr == 0 && nCorr2 > 0 )
1407 // {
1408 // if ( sameRow2 && !sameCol2 && !other2) indexOtherTCard = 0;
1409 // else if ( !sameRow2 && sameCol2 && !other2) indexOtherTCard = 1;
1410 // else indexOtherTCard = 2;
1411 // }
1412 // else if ( nCorr > 0 && nCorr2 > 0 )
1413 // {
1414 // if ( sameRow2 && !sameCol2 && !other2) indexOtherTCard = 3;
1415 // else if ( !sameRow2 && sameCol2 && !other2) indexOtherTCard = 4;
1416 // else indexOtherTCard = 5;
1417 // }
1418 //
1419 // if ( indexOtherTCard >= 0 )
1420 // {
1421 // fhLambda0TCardCorrelOtherTCard[indexOtherTCard][matched]->Fill(energy, m02, GetEventWeight());
1422 // fhNCellsTCardCorrelOtherTCard [indexOtherTCard][matched]->Fill(energy, nCellWithWeight, GetEventWeight());
1423 // fhExoticTCardCorrelOtherTCard [indexOtherTCard][matched]->Fill(energy, exoticity, GetEventWeight());
1424 // if ( energy >= 2 && energy < 8 )
1425 // fhColRowTCardCorrelOtherTCardLowE[indexOtherTCard][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1426 // else if ( energy >= 8 )
1427 // fhColRowTCardCorrelOtherTCardHighE[indexOtherTCard][matched]->Fill(icolAbs, irowAbs, GetEventWeight());
1428 // }
1429 }
1430 
1431 //__________________________________________________________________________________________________________________
1441 //__________________________________________________________________________________________________________________
1443 (AliVCluster* clus , Int_t absIdMax, Double_t maxFrac ,
1444  Float_t eCrossFrac, Float_t eCellMax, Double_t tmax ,
1445  Int_t matchedPID, Int_t mcIndex, Int_t noverlaps )
1446 {
1447  // By definition a cluster has at least 1 cell,
1448  // and shape only makes sense with at least 2
1449  // in case fNCellMin was open, check again the size
1450  Int_t nCaloCellsPerCluster = clus->GetNCells();
1451  if ( nCaloCellsPerCluster < 2 ) return;
1452 
1453  Float_t energy = clus->E();
1454  Float_t m02 = clus->GetM02();
1455  Float_t m20 = clus->GetM20();
1457 
1458  Int_t nCell = 0;
1459 
1460  Int_t dIeta = 0;
1461  Int_t dIphi = 0;
1462  Int_t dIetaNeg = 0;
1463  Int_t dIphiNeg = 0;
1464  Int_t dIetaPos = 0;
1465  Int_t dIphiPos = 0;
1466 
1467  // Loop on cells in cluster to get number of cells with significant energy
1468  for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++)
1469  {
1470  Int_t absId = clus ->GetCellsAbsId()[ipos];
1471  Float_t eCell = fCaloCellList->GetCellAmplitude(absId) ;
1472 
1474 
1475  if( absId == absIdMax || eCell < 0.01 ) continue;
1476 
1477  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
1478 
1479  if( weight < 0.01 ) continue;
1480 
1481  nCell++;
1482  }
1483 
1484  if ( nCell < 1 ) return;
1485 
1486  // For histograms classified in bins depending number of cells
1487  Int_t nCellBin = -1;
1488  for(Int_t ic = 0; ic < fNCellsBins; ic++)
1489  {
1490  if ( nCell >= fNCellsBinsLimits[ic] && nCell < fNCellsBinsLimits[ic+1] )
1491  {
1492  nCellBin = ic;
1493  break;
1494  }
1495  }
1496 
1497  //printf("nCell %d, bin %d\n",nCell,nCellBin);
1498 
1499  //
1500  // Cluster location
1501  //
1502  Int_t ietaMax=-1, iphiMax = 0, rcuMax = 0, icolAbs = -1, irowAbs = -1;
1504  ietaMax, iphiMax, rcuMax, icolAbs, irowAbs);
1505 
1506  Int_t iTowerMax = -1, iIphiMax = -1, iIetaMax = -1;
1507  if ( fStudyModuleCells && GetCalorimeter() == kEMCAL )
1508  GetEMCALGeometry()->GetCellIndex(absIdMax,smMax,iTowerMax,iIphiMax,iIetaMax);
1509 
1510  if ( matchedPID == 0 && energy > fEMinShape && energy < fEMaxShape )
1511  {
1512  fhColRowM02->Fill(icolAbs,irowAbs,m02,GetEventWeight()) ;
1513 
1514  if ( nCell > fNCellMinShape )
1515  fhColRowM02NCellCut->Fill(icolAbs,irowAbs,m02,GetEventWeight()) ;
1516  }
1517  //
1518 
1519  //
1520  // Clean the sample with very strict cut on acceptance, select only
1521  // in center of SM
1522  //
1523  Int_t etaRegion = -1, phiRegion = -1;
1524  GetCaloUtils()->GetEMCALSubregion(clus,fCaloCellList,etaRegion,phiRegion);
1525  // Region 0: center of SM ~0.18<|eta|<0.55
1526  if ( etaRegion !=0 ) return ;
1527 
1528  // Loop on cells in cluster to get cell cluster asymmetry and
1529  // other correlation parameters
1530  Int_t nPerModule = 0;
1531  Int_t nPerModuleOut = 0;
1532  Int_t nPerModuleOutD = 0;
1533  Int_t nPerModuleOutS = 0;
1534  Float_t ePerModule = 0.;
1535  Float_t ePerModuleOut = 0.;
1536  Float_t ePerModuleOutD = 0.;
1537  Float_t ePerModuleOutS = 0.;
1538  for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++)
1539  {
1540  Int_t absId = clus ->GetCellsAbsId()[ipos];
1541  Float_t eCell = fCaloCellList->GetCellAmplitude(absId) ;
1542 
1544 
1545  if( absId == absIdMax || eCell < 0.01 ) continue;
1546 
1547  Int_t ieta=-1; Int_t iphi = 0; Int_t rcu = 0;
1548  Int_t sm = GetModuleNumberCellIndexes(absId,GetCalorimeter(), ieta, iphi, rcu);
1549 
1550  // Module vs cell max
1551  //
1552  if ( fStudyModuleCells && GetCalorimeter() == kEMCAL )
1553  {
1554  Int_t iTower = -1, iIphi = -1, iIeta = -1;
1555  GetEMCALGeometry()->GetCellIndex(absId,sm,iTower,iIphi,iIeta);
1556 
1557  //printf("Max: SM %d Tower %d, absId %d, amp %2.2f\n",smMax,iTowerMax,absIdMax,eCellMax);
1558 
1559  if ( iTowerMax == iTower )
1560  {
1561  //printf("Secondary: Tower %d, absId %d, amp %2.2f\n",iTower,absId,eCell);
1562  nPerModule++;
1563  ePerModule+=eCell;
1564  }
1565  else
1566  {
1567  //printf("Secondary: Tower %d, absId %d, amp %2.2f\n",iTower,absId,eCell);
1568  nPerModuleOut++;
1569  ePerModuleOut+=eCell;
1570 
1571  if(TMath::Abs(iphiMax-iphi) == 1 || TMath::Abs(ietaMax-ieta) == 1)
1572  {
1573  Int_t rowDiff = -100, colDiff = -100;
1574  Bool_t sameTCard = GetCaloUtils()->IsAbsIDsFromTCard(absIdMax,absId,rowDiff,colDiff);
1575  if(sameTCard)
1576  {
1577  nPerModuleOutS++;
1578  ePerModuleOutS+=eCell;
1579  }
1580  else
1581  {
1582  nPerModuleOutD++;
1583  ePerModuleOutD+=eCell;
1584  }
1585  }
1586  }
1587  }
1588 
1589  // Select only cells with weight
1590  //
1591  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(eCell, energy);
1592 
1593  if ( weight < 0.01 ) continue;
1594 
1595  Float_t fracCell = eCell/eCellMax;
1596  fhClusterMaxCellCloseCellRatioM02->Fill(energy, fracCell, m02, GetEventWeight());
1597 
1598  Float_t fracClus = (energy-eCell)/energy;
1599 
1600  //Float_t logECell = TMath::Log(eCell);
1601 
1602  //Float_t ampDiff = fCaloCellList->GetCellAmplitude(absIdMax)-fCaloCellList->GetCellAmplitude(absId);
1603  //fhClusterMaxCellCloseCellDiffM02 ->Fill(energy,ampDiff, m02,GetEventWeight());
1604 
1605  //Double_t time = fCaloCellList->GetCellTime(absId);
1606  //GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
1607  //
1608  //Float_t tdiff = (tmax-(time*1.0e9-fConstantTimeShift));
1609  //fhCellTimeSpreadRespectToCellMaxM02->Fill(energy, tdiff, m02, GetEventWeight());
1610 
1611  if ( energy > fEMinShape && energy < fEMaxShape && matchedPID == 0 )
1612  {
1613  fhESecCellEMaxCellM02NCellPerSM[smMax]->Fill(fracCell, nCell, m02, GetEventWeight());
1614  fhESecCellEClusterM02NCellPerSM[smMax]->Fill(fracClus, nCell, m02, GetEventWeight());
1615  //fhESecCellLogM02NCellPerSM [smMax]->Fill(logECell, nCell, m02, GetEventWeight());
1616 
1617  if ( m02 > fM02LowBin[0] && m02 <= fM02LowBin[1] )
1618  {
1619  fhEMaxESecCellNCellLowM02PerSM [smMax]->Fill(eCellMax, eCell , nCell, GetEventWeight());
1620  fhEMaxECrossNCellLowM02PerSM [smMax]->Fill(eCellMax, eCrossFrac, nCell, GetEventWeight());
1621 
1622  if ( fStudyTimeCellHisto )
1623  {
1624  Double_t time = fCaloCellList->GetCellTime(absId);
1625  GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
1626  time*=1.e9;
1627  if(time>400) time-=fConstantTimeShift;
1628 
1629  fhESecCellTimeNCellSM->Fill(time, smMax, nCell, GetEventWeight());
1630  }
1631  }
1632  else if ( m02 > fM02HighBin[0] && m02 <= fM02HighBin[1] )
1633  {
1634  fhEMaxESecCellNCellHighM02PerSM[smMax]->Fill(eCellMax, eCell , nCell, GetEventWeight());
1635  fhEMaxECrossNCellHighM02PerSM [smMax]->Fill(eCellMax, eCrossFrac, nCell, GetEventWeight());
1636  }
1637  }
1638 
1640  // Cluster asymmetry in cell units
1642  if(fStudyShapeParam)
1643  {
1644  if(dIphi < TMath::Abs(iphi-iphiMax)) dIphi = TMath::Abs(iphi-iphiMax);
1645  if(iphi-iphiMax < 0 && dIphiNeg > iphi-iphiMax) dIphiNeg = iphi-iphiMax;
1646  if(iphi-iphiMax > 0 && dIphiPos < iphi-iphiMax) dIphiPos = iphi-iphiMax;
1647 
1648  if(dIeta < TMath::Abs(ieta-ietaMax)) dIeta = TMath::Abs(ieta-ietaMax);
1649  if(ieta-ietaMax < 0 && dIetaNeg > ieta-ietaMax) dIetaNeg = ieta-ietaMax;
1650  if(ieta-ietaMax > 0 && dIetaPos < ieta-ietaMax) dIetaPos = ieta-ietaMax;
1651 
1652  if ( smMax !=sm )
1653  {
1654  Int_t ietaShift = ieta;
1655  Int_t ietaMaxShift = ietaMax;
1656 
1657  if (ieta > ietaMax) ietaMaxShift+=48;
1658  else ietaShift +=48;
1659 
1660  if(dIeta < TMath::Abs(ietaShift-ietaMaxShift)) dIeta = TMath::Abs(ietaShift-ietaMaxShift);
1661  if(ietaShift-ietaMaxShift < 0 && dIetaNeg > ietaShift-ietaMaxShift) dIetaNeg = ietaShift-ietaMaxShift;
1662  if(ietaShift-ietaMaxShift > 0 && dIetaPos < ietaShift-ietaMaxShift) dIetaPos = ietaShift-ietaMaxShift;
1663  }
1664  } // if(fStudyShapeParam)
1665 
1666  // cells in same SM as cell max and within an E range and neutral
1667  if ( fStudyColRowFromCellMax && smMax == sm &&
1668  energy > fEMinShape && energy < fEMaxShape && matchedPID == 0 )
1669  {
1670  if ( m02 > fM02LowBin[0] && m02 <= fM02LowBin[1] )
1671  {
1672  fhColRowFromCellMaxLowM02PerSM[smMax][ietaMax%2]->Fill(ietaMax-ieta, iphiMax-iphi, nCell, GetEventWeight());
1673  fhColRowFromCellMaxLowM02 [ietaMax%2]->Fill(ietaMax-ieta, iphiMax-iphi, GetEventWeight());
1674 
1675  if ( nCellBin >= 0 && nCellBin < fNCellsBins )
1676  {
1677  fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[smMax][ietaMax%2][nCellBin]->Fill(ietaMax-ieta, iphiMax-iphi,(eCellMax-eCell)/eCellMax, GetEventWeight());
1678  fhColRowFromCellMaxEMaxSecDiffLowM02PerSM [smMax][ietaMax%2][nCellBin]->Fill(ietaMax-ieta, iphiMax-iphi, eCellMax-eCell, GetEventWeight());
1679  fhColRowFromCellMaxECellClusterRatLowM02PerSM[smMax][ietaMax%2][nCellBin]->Fill(ietaMax-ieta, iphiMax-iphi, eCell/energy , GetEventWeight());
1680  }
1681  }
1682  else if ( m02 > fM02HighBin[0] && m02 <= fM02HighBin[1] )
1683  {
1684  fhColRowFromCellMaxHighM02PerSM[smMax][ietaMax%2]->Fill(ietaMax-ieta, iphiMax-iphi, nCell, GetEventWeight());
1685  fhColRowFromCellMaxHighM02 [ietaMax%2]->Fill(ietaMax-ieta, iphiMax-iphi, GetEventWeight());
1686 
1687  if ( nCellBin >= 0 && nCellBin < fNCellsBins )
1688  {
1689  fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[smMax][ietaMax%2][nCellBin]->Fill(ietaMax-ieta, iphiMax-iphi,(eCellMax-eCell)/eCellMax, GetEventWeight());
1690  fhColRowFromCellMaxEMaxSecDiffHighM02PerSM [smMax][ietaMax%2][nCellBin]->Fill(ietaMax-ieta, iphiMax-iphi, eCellMax-eCell, GetEventWeight());
1691  fhColRowFromCellMaxECellClusterRatHighM02PerSM[smMax][ietaMax%2][nCellBin]->Fill(ietaMax-ieta, iphiMax-iphi, eCell/energy , GetEventWeight());
1692  }
1693  }
1694 
1695  } // cells in sm SM as cell max and within an E range and neutral
1696 
1697  } // Fill cell-cluster histogram loop
1698 
1699  if ( fStudyModuleCells && GetCalorimeter() == kEMCAL )
1700  {
1701 
1702  Int_t rowTCard = Int_t(iphiMax%8);
1703  Int_t colTCard = Int_t(ietaMax%2);
1704  Int_t iTCard = rowTCard+8*colTCard;
1705  //printf("row TCard %d, col TCard %d, iTCard %d\n",rowTCard,colTCard,iTCard);
1706 
1707  fhTCardChannelNCellModMax->Fill(energy, iTCard, nPerModule, GetEventWeight());
1708  fhTCardChannelNCell ->Fill(energy, iTCard, nCell , GetEventWeight());
1709  fhTCardChannelM02NoCut ->Fill(energy, iTCard, m02 , GetEventWeight());
1710  if( nCell > 4) fhTCardChannelM02->Fill(energy, iTCard, m02, GetEventWeight());
1711 
1712  Float_t ePerModuleTot = ePerModule+eCellMax;
1713 
1714  fhSMNCellModuleMax->Fill(energy, smMax, nPerModule , GetEventWeight());
1715  fhSMNCellModuleOut->Fill(energy, smMax, nPerModuleOut, GetEventWeight());
1716  fhSMECellModuleMax->Fill(energy, smMax, ePerModule , GetEventWeight());
1717  fhSMECellModuleOut->Fill(energy, smMax, ePerModuleOut, GetEventWeight());
1718 
1719  fhSMNCellModuleMaxOutRat->Fill(energy, smMax, nPerModuleOut/(nPerModule+1.), GetEventWeight());
1720  fhSMECellModuleMaxRat ->Fill(energy, smMax, ePerModule /eCellMax , GetEventWeight());
1721  fhSMECellModuleMaxOutRat->Fill(energy, smMax, ePerModuleOut/eCellMax , GetEventWeight());
1722 
1723  fhSMECellModuleMaxTot ->Fill(energy, smMax, ePerModuleTot , GetEventWeight());
1724  fhSMECellModuleMaxTotRat->Fill(energy, smMax, ePerModuleTot/eCellMax , GetEventWeight());
1725  fhSMECellModuleMaxTotRatClus->Fill(energy, smMax, ePerModuleTot/energy, GetEventWeight());
1726 
1727  fhSMNCellModuleOutModSame ->Fill(energy, smMax, nPerModuleOutS, GetEventWeight());
1728  fhSMNCellModuleOutModDiff ->Fill(energy, smMax, nPerModuleOutD, GetEventWeight());
1729  fhSMECellModuleOutModSame ->Fill(energy, smMax, ePerModuleOutS, GetEventWeight());
1730  fhSMECellModuleOutModDiff ->Fill(energy, smMax, ePerModuleOutD, GetEventWeight());
1731 
1732  fhSMNCellModuleMaxOutModSameRat->Fill(energy, smMax, nPerModuleOutS/(nPerModule+1.), GetEventWeight());
1733  fhSMNCellModuleMaxOutModDiffRat->Fill(energy, smMax, nPerModuleOutD/(nPerModule+1.), GetEventWeight());
1734  fhSMECellModuleMaxOutModSameRat->Fill(energy, smMax, ePerModuleOutS/eCellMax , GetEventWeight());
1735  fhSMECellModuleMaxOutModDiffRat->Fill(energy, smMax, ePerModuleOutD/eCellMax , GetEventWeight());
1736 
1737  if ( m02 > fM02LowBin[0] && m02 <= fM02LowBin[1] )
1738  {
1739  fhSMNCellModuleMaxLowM02->Fill(energy, smMax, nPerModule , GetEventWeight());
1740  fhSMNCellModuleOutLowM02->Fill(energy, smMax, nPerModuleOut, GetEventWeight());
1741  fhSMECellModuleMaxLowM02->Fill(energy, smMax, ePerModule , GetEventWeight());
1742  fhSMECellModuleOutLowM02->Fill(energy, smMax, ePerModuleOut, GetEventWeight());
1743 
1744  fhSMNCellModuleMaxOutRatLowM02->Fill(energy, smMax, nPerModuleOut/(nPerModule+1.), GetEventWeight());
1745  fhSMECellModuleMaxRatLowM02 ->Fill(energy, smMax, ePerModule /eCellMax , GetEventWeight());
1746  fhSMECellModuleMaxOutRatLowM02->Fill(energy, smMax, ePerModuleOut/eCellMax , GetEventWeight());
1747 
1748  fhSMECellModuleMaxTotLowM02 ->Fill(energy, smMax, ePerModuleTot , GetEventWeight());
1749  fhSMECellModuleMaxTotRatLowM02->Fill(energy, smMax, ePerModuleTot/eCellMax , GetEventWeight());
1750  fhSMECellModuleMaxTotRatClusLowM02->Fill(energy, smMax, ePerModuleTot/energy, GetEventWeight());
1751 
1752  fhSMNCellModuleOutModSameLowM02 ->Fill(energy, smMax, nPerModuleOutS, GetEventWeight());
1753  fhSMNCellModuleOutModDiffLowM02 ->Fill(energy, smMax, nPerModuleOutD, GetEventWeight());
1754  fhSMECellModuleOutModSameLowM02 ->Fill(energy, smMax, ePerModuleOutS, GetEventWeight());
1755  fhSMECellModuleOutModDiffLowM02 ->Fill(energy, smMax, ePerModuleOutD, GetEventWeight());
1756 
1757  fhSMNCellModuleMaxOutModSameRatLowM02->Fill(energy, smMax, nPerModuleOutS/(nPerModule+1.), GetEventWeight());
1758  fhSMNCellModuleMaxOutModDiffRatLowM02->Fill(energy, smMax, nPerModuleOutD/(nPerModule+1.), GetEventWeight());
1759  fhSMECellModuleMaxOutModSameRatLowM02->Fill(energy, smMax, ePerModuleOutS/eCellMax , GetEventWeight());
1760  fhSMECellModuleMaxOutModDiffRatLowM02->Fill(energy, smMax, ePerModuleOutD/eCellMax , GetEventWeight());
1761 
1762 // if(energy > 8) printf("SM %d, E %2.2f, E max %2.2f;\n"
1763 // " \t nMod %d, nModOut %d, nMod/nModOut %2.2f;\n"
1764 // " \t eMod %2.2f, eModOut %2.2f, eMod/eMax %2.2f, eModOut/eMax %2.2f\n",
1765 // smMax,energy,eCellMax,
1766 // nPerModule,nPerModuleOut,nPerModuleOut/(nPerModule+1.),
1767 // ePerModule,ePerModuleOut,ePerModule/eCellMax,ePerModuleOut/eCellMax);
1768  }
1769  else if ( m02 > fM02HighBin[0] && m02 <= fM02HighBin[1] )
1770  {
1771  fhSMNCellModuleMaxHighM02->Fill(energy, smMax, nPerModule , GetEventWeight());
1772  fhSMNCellModuleOutHighM02->Fill(energy, smMax, nPerModuleOut, GetEventWeight());
1773  fhSMECellModuleMaxHighM02->Fill(energy, smMax, ePerModule , GetEventWeight());
1774  fhSMECellModuleOutHighM02->Fill(energy, smMax, ePerModuleOut, GetEventWeight());
1775 
1776  fhSMNCellModuleMaxOutRatHighM02->Fill(energy, smMax, nPerModuleOut/(nPerModule+1.), GetEventWeight());
1777  fhSMECellModuleMaxRatHighM02 ->Fill(energy, smMax, ePerModule /eCellMax , GetEventWeight());
1778  fhSMECellModuleMaxOutRatHighM02->Fill(energy, smMax, ePerModuleOut/eCellMax , GetEventWeight());
1779 
1780  fhSMECellModuleMaxTotHighM02 ->Fill(energy, smMax, ePerModuleTot , GetEventWeight());
1781  fhSMECellModuleMaxTotRatHighM02->Fill(energy, smMax, ePerModuleTot/eCellMax , GetEventWeight());
1782  fhSMECellModuleMaxTotRatClusHighM02->Fill(energy, smMax, ePerModuleTot/energy, GetEventWeight());
1783 
1784  fhSMNCellModuleOutModSameHighM02 ->Fill(energy, smMax, nPerModuleOutS, GetEventWeight());
1785  fhSMNCellModuleOutModDiffHighM02 ->Fill(energy, smMax, nPerModuleOutD, GetEventWeight());
1786  fhSMECellModuleOutModSameHighM02 ->Fill(energy, smMax, ePerModuleOutS, GetEventWeight());
1787  fhSMECellModuleOutModDiffHighM02 ->Fill(energy, smMax, ePerModuleOutD, GetEventWeight());
1788 
1789  fhSMNCellModuleMaxOutModSameRatHighM02->Fill(energy, smMax, nPerModuleOutS/(nPerModule+1.), GetEventWeight());
1790  fhSMNCellModuleMaxOutModDiffRatHighM02->Fill(energy, smMax, nPerModuleOutD/(nPerModule+1.), GetEventWeight());
1791  fhSMECellModuleMaxOutModSameRatHighM02->Fill(energy, smMax, ePerModuleOutS/eCellMax , GetEventWeight());
1792  fhSMECellModuleMaxOutModDiffRatHighM02->Fill(energy, smMax, ePerModuleOutD/eCellMax , GetEventWeight());
1793  }
1794 
1795  }
1796 
1797  if ( energy > fEMinShape && energy < fEMaxShape && matchedPID == 0 )
1798  {
1799  fhNCellsPerClusterM02M20PerSM[smMax]->Fill(m20, nCell, m02, GetEventWeight());
1800  if ( fFillNLocMaxHistos )
1801  fhNCellsPerClusterM02NLMPerSM[smMax]->Fill(nlm, nCell, m02, GetEventWeight());
1802 
1803  // Col-Row histogram, fill emax/ecluster ratio for highest energy cell.
1804  if ( fStudyColRowFromCellMax && fNCellsBins > 0)
1805  {
1806  if ( m02 > fM02LowBin[0] && m02 <= fM02LowBin[1] )
1807  fhColRowFromCellMaxECellClusterRatLowM02PerSM [smMax][ietaMax%2][nCellBin]->Fill(0., 0., eCellMax/energy, GetEventWeight());
1808  else if ( m02 > fM02HighBin[0] && m02 <= fM02HighBin[1] )
1809  fhColRowFromCellMaxECellClusterRatHighM02PerSM[smMax][ietaMax%2][nCellBin]->Fill(0., 0., eCellMax/energy, GetEventWeight());
1810  }
1811  }
1812 
1813  if(fStudyExotic)
1814  fhClusterMaxCellECrossM02->Fill(energy, eCrossFrac, m02, GetEventWeight());
1815 
1816  //
1817  // Fill histograms only for PID
1818  //
1819  fhClusterMaxCellDiffM02[matchedPID]->Fill(energy, maxFrac, m02, GetEventWeight());
1820  fhClusterTimeEnergyM02 [matchedPID]->Fill(energy, tmax , m02, GetEventWeight());
1821  fhNCellsPerClusterM02 [matchedPID]->Fill(energy, nCell , m02, GetEventWeight());
1822  fhNCellsPerClusterM20 [matchedPID]->Fill(energy, nCell , m20, GetEventWeight());
1823  if ( fFillNLocMaxHistos )
1824  fhNCellsPerClusterNLM [matchedPID]->Fill(energy, nCell , nlm, GetEventWeight());
1825 
1826  if ( matchedPID == 0 && fStudyColRowFromCellMax )
1827  {
1828  fhNCellsPerClusterM02PerSMPerCol[smMax][ietaMax%2]->Fill(energy, nCell, m02, GetEventWeight());
1829  fhNCellsPerClusterM20PerSMPerCol[smMax][ietaMax%2]->Fill(energy, nCell, m20, GetEventWeight());
1830  if ( fFillNLocMaxHistos )
1831  fhNCellsPerClusterNLMPerSMPerCol[smMax][ietaMax%2]->Fill(energy, nCell, nlm, GetEventWeight());
1832  }
1833 
1834  if ( fFillNLocMaxHistos )
1835  fhSMNLocMax [matchedPID]->Fill(energy, smMax , nlm , GetEventWeight());
1836  fhSMNCell [matchedPID]->Fill(energy, smMax , nCell, GetEventWeight());
1837  fhSMM02NoCut [matchedPID]->Fill(energy, smMax , m02 , GetEventWeight());
1838  fhSMEMaxEClusterRat ->Fill(energy, smMax , eCellMax/energy , GetEventWeight());
1839 
1840  if ( m02 > fM02LowBin[0] && m02 <= fM02LowBin[1] )
1841  {
1842  fhSMNCellLowM02 [matchedPID]->Fill(energy, smMax , nCell, GetEventWeight());
1843  fhSMM20LowM02NoCut [matchedPID]->Fill(energy, smMax , m20 , GetEventWeight());
1844  fhSMEMaxEClusterRatLowM02 ->Fill(energy, smMax , eCellMax/energy , GetEventWeight());
1845  }
1846  else if ( m02 > fM02HighBin[0] && m02 <= fM02HighBin[1] )
1847  {
1848  fhSMNCellHighM02 [matchedPID]->Fill(energy, smMax , nCell, GetEventWeight());
1849  fhSMM20HighM02NoCut[matchedPID]->Fill(energy, smMax , m20 , GetEventWeight());
1850  fhSMEMaxEClusterRatHighM02 ->Fill(energy, smMax , eCellMax/energy , GetEventWeight());
1851  }
1852 
1853  if ( energy > fEMinShape && energy < fEMaxShape )
1854  {
1855  fhSMNCellM02[matchedPID]->Fill(smMax , nCell, m02, GetEventWeight());
1856 
1857  if ( matchedPID == 0 )
1858  {
1859  if ( fStudyTimeCellHisto )
1860  {
1861  if ( m02 > fM02LowBin[0] && m02 <= fM02LowBin[1] )
1862  fhEMaxCellTimeNCellSM->Fill(tmax, smMax, nCell, GetEventWeight());
1863 
1864  fhEMaxCellTimeM02SM->Fill(tmax, smMax, m02, GetEventWeight());
1865  }
1866 
1867  fhEMaxCellEClusterM02NCellPerSM[smMax]->Fill(maxFrac, nCell, m02, GetEventWeight());
1868  // fhEMaxCellLogM02NCellPerSM [smMax]->Fill(TMath::Log(eCellMax), nCell, m02, GetEventWeight());
1869  }
1870  } // energy bin
1871 
1872  // Select clusters with significant size
1873  if ( nCell > fNCellMinShape )
1874  {
1875  if ( m02 > fM02LowBin[0] && m02 <= fM02LowBin[1] )
1876  fhSMM20LowM02 [matchedPID]->Fill(energy, smMax , m20 , GetEventWeight());
1877  else if ( m02 > fM02HighBin[0] && m02 <= fM02HighBin[1] )
1878  fhSMM20HighM02[matchedPID]->Fill(energy, smMax , m20 , GetEventWeight());
1879 
1880  fhSMM02 [matchedPID]->Fill(energy, smMax , m02, GetEventWeight());
1881  fhColM02[matchedPID]->Fill(energy, ietaMax, m02, GetEventWeight());
1882  fhRowM02[matchedPID]->Fill(energy, iphiMax, m02, GetEventWeight());
1883  }
1884 
1885  //
1886  // Different shower shape parameters
1887  //
1888  if ( fStudyShapeParam )
1889  {
1890  // cluster asymmetry
1891  Float_t dIA = 1.*(dIphi-dIeta)/(dIeta+dIphi);
1892  Float_t dIATot = 1.*((dIphiPos-dIphiNeg)-(dIetaPos-dIetaNeg))/((dIetaPos-dIetaNeg)+(dIphiPos-dIphiNeg));
1893 
1894  // Int_t dIphiMin = TMath::Abs(dIphiNeg);
1895  // Int_t dIetaMin = TMath::Abs(dIetaNeg);
1896  // if(dIphiMin > dIphiPos) dIphiMin = dIphiPos ;
1897  // if(dIetaMin > dIetaPos) dIetaMin = dIetaPos ;
1898  // Float_t dIAMin = 0;
1899  // if(dIphiMin > 0 && dIetaMin > 0) dIAMin = 1.*(dIphiMin-dIetaMin)/(dIetaMin+dIphiMin);
1900 
1901  AliDebug(1,Form("E %2.2f, nCell %d, dPhi %d, dEta %d, dIA %2.2f, match %d",energy,nCell, dIphi,dIeta,dIA,matchedPID));
1902 
1903  // if(nCell > 5)
1904  // {
1905  // printf("E %2.2f, nCell %d, dPhi %d, dEta %d, dIA %2.2f, match %d\n",
1906  // energy,nCell, dIphi,dIeta,dIA,matchedPID);
1907  // printf("\t dPhiNeg %d, dPhiPos %d, dEtaNeg %d, dEtaPos %d, dIATot %2.2f, dIAMin %2.2f\n",
1908  // dIphiNeg,dIphiPos,dIetaNeg,dIetaPos,dIATot,dIAMin);
1909  // }
1910 
1911  fhDeltaIANCells [matchedPID]->Fill(energy, nCell , dIA , GetEventWeight());
1912  fhDeltaIATotNCells [matchedPID]->Fill(energy, nCell , dIATot, GetEventWeight());
1913 
1914  if ( nCell > fNCellMinShape ) // it makes sense only for significant size histograms
1915  {
1916  fhDeltaIEtaDeltaIPhi[matchedPID]->Fill(energy, dIeta, dIphi, GetEventWeight());
1917  fhDeltaIA [matchedPID]->Fill(energy, dIA , GetEventWeight());
1918  fhDeltaIAM02 [matchedPID]->Fill(energy, m02 , dIA , GetEventWeight());
1919  fhDeltaIAM20 [matchedPID]->Fill(energy, m20 , dIA , GetEventWeight());
1920 
1921  fhDeltaIEtaDeltaIPhiTot[matchedPID]->Fill(energy,dIetaPos-dIetaNeg, dIphiPos-dIphiNeg, GetEventWeight());
1922  fhDeltaIATot [matchedPID]->Fill(energy, dIATot , GetEventWeight());
1923  fhDeltaIATotM02 [matchedPID]->Fill(energy, m02 , dIATot, GetEventWeight());
1924  fhDeltaIATotM20 [matchedPID]->Fill(energy, m20 , dIATot, GetEventWeight());
1925  }
1926 
1927  if ( IsDataMC() && mcIndex > -1 && mcIndex < 10 && nCell > fNCellMinShape )
1928  {
1929  fhDeltaIAOrigin [matchedPID]->Fill(energy, mcIndex, dIA , GetEventWeight());
1930  fhDeltaIATotOrigin[matchedPID]->Fill(energy, mcIndex, dIATot, GetEventWeight());
1931  }
1932 
1933  Float_t l0 = 0., l1 = 0.;
1934  Float_t dispp= 0., dEta = 0., dPhi = 0.;
1935  Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
1936  if ( GetCalorimeter() == kEMCAL )
1937  {
1939  l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi);
1940 
1941  Float_t sEtaPhiA = -1000.;
1942  if(sEta+sPhi>0.0001) sEtaPhiA = (sPhi-sEta)/(sEta+sPhi);
1943 
1944  AliDebug(2,Form("Recalculate shower shape org: m02 %2.2f, m20 %2.2f, disp %2.2f;"
1945  " new: m02 %2.2f, m20 %2.2f, disp %2.2f; "
1946  "mEta %2.2f, mPhi %2.2f, mEtaPhi %2.2f, A_EtaPhi %2.2f; dEta %2.2f dPhi %2.2f",
1947  m02,m20,clus->GetDispersion(),l0,l1,dispp,sEta,sPhi,sEtaPhi,sEtaPhiA,dEta,dPhi));
1948 
1949  fhNCellsPerClusterMEta [matchedPID]->Fill(energy, nCell, sEta , GetEventWeight());
1950  fhNCellsPerClusterMPhi [matchedPID]->Fill(energy, nCell, sPhi , GetEventWeight());
1951  fhNCellsPerClusterMEtaPhi [matchedPID]->Fill(energy, nCell, sEtaPhi , GetEventWeight());
1952  fhNCellsPerClusterMEtaPhiA[matchedPID]->Fill(energy, nCell, sEtaPhiA, GetEventWeight());
1953 
1954  fhSMMEtaNoCut [matchedPID]->Fill(energy, smMax, sEta , GetEventWeight());
1955  fhSMMPhiNoCut [matchedPID]->Fill(energy, smMax, sPhi , GetEventWeight());
1956  fhSMMEtaPhiNoCut [matchedPID]->Fill(energy, smMax, sEtaPhi , GetEventWeight());
1957  fhSMMEtaPhiANoCut[matchedPID]->Fill(energy, smMax, sEtaPhiA, GetEventWeight());
1958 
1959  // Select clusters with significant size
1960  if ( nCell > fNCellMinShape )
1961  {
1962  fhSMMEta [matchedPID]->Fill(energy, smMax, sEta , GetEventWeight());
1963  fhSMMPhi [matchedPID]->Fill(energy, smMax, sPhi , GetEventWeight());
1964  fhSMMEtaPhi [matchedPID]->Fill(energy, smMax, sEtaPhi , GetEventWeight());
1965  fhSMMEtaPhiA[matchedPID]->Fill(energy, smMax, sEtaPhiA, GetEventWeight());
1966  }
1967  } // EMCal
1968  } // fStudyShapeParam
1969 
1970  //
1971  // Invariant mass for clusters looking like photons, depending number of cells
1972  //
1973  if ( fStudyInvMass &&
1974  matchedPID == 0 && energy > fEMinShape && energy < fEMaxShape &&
1975  m02 > fInvMassMinM02Cut && m02 < fInvMassMaxM02Cut )
1976  {
1977  for(Int_t jclus = 0 ; jclus < fCaloClusList->GetEntriesFast() ; jclus++)
1978  {
1979  AliVCluster* clus2 = (AliVCluster*) fCaloClusList->At(jclus);
1980 
1981  Float_t maxCellFraction = 0.;
1982  Int_t absIdMax2 = GetCaloUtils()->GetMaxEnergyCell(fCaloCellList, clus2, maxCellFraction);
1983 
1984  Double_t tof2 = clus2->GetTOF()*1.e9;
1985  if(tof2>400) tof2-=fConstantTimeShift;
1986 
1987  Double_t diffTof = tmax-tof2;
1988 
1989  // Try to reduce background with a mild shower shape cut and no more
1990  // than 1 local maximum in cluster and remove low energy clusters
1991 
1992  if( absIdMax == absIdMax2
1993  || !IsGoodCluster(absIdMax2, clus2->GetM02(), clus2->GetNCells())
1995  || clus2->GetM02() > fInvMassMaxM02Cut
1996  || clus2->GetM02() < fInvMassMinM02Cut
1997  || clus2->E() < fInvMassMinECut
1998  || clus2->E() > fInvMassMaxECut
1999  || TMath::Abs(diffTof) > fInvMassMaxTimeDifference
2000  ) continue;
2001 
2002  // Get cluster kinematics
2003  Double_t v[3] = {0,0,0}; //vertex ;
2004  clus2->GetMomentum(fClusterMomentum2,v);
2005 
2006  // Check only certain regions
2007  Bool_t in2 = kTRUE;
2009  if(!in2) continue;
2010 
2011  //Float_t pairE = (fClusterMomentum+fClusterMomentum2).E();
2012 
2013  // Opening angle cut, avoid combination of DCal and EMCal clusters
2014  Double_t angle = fClusterMomentum.Angle(fClusterMomentum2.Vect());
2015 
2016  if( angle > fInvMassMaxOpenAngle ) continue;
2017 
2018  // Fill histograms
2020  fhInvMassNCellSM->Fill(mass, nCell, smMax, GetEventWeight());
2021 
2022  Int_t smMax2 = GetModuleNumber(clus2);
2023  if(smMax == smMax2) fhInvMassNCellSMSame->Fill(mass, nCell, smMax, GetEventWeight());
2024  }
2025  }
2026 
2027  //
2028  // Check the origin.
2029  //
2030  if ( IsDataMC() && mcIndex > -1 && mcIndex < 10)
2031  {
2032  fhOriginENoCut [matchedPID]->Fill(energy, mcIndex, GetEventWeight());
2033  fhOriginM02NoCut[matchedPID]->Fill(energy, mcIndex, m02, GetEventWeight());
2034 
2035  if(nCell > fNCellMinShape)
2036  {
2037  fhOriginE [matchedPID]->Fill(energy, mcIndex, GetEventWeight());
2038  fhOriginM02[matchedPID]->Fill(energy, mcIndex, m02, GetEventWeight());
2039  }
2040 
2041  if(noverlaps > 0)
2042  {
2043  fhOriginENoCutOverlap [matchedPID]->Fill(energy, mcIndex, GetEventWeight());
2044  fhOriginM02NoCutOverlap[matchedPID]->Fill(energy, mcIndex, m02, GetEventWeight());
2045 
2046  if(nCell > fNCellMinShape)
2047  {
2048  fhOriginEOverlap [matchedPID]->Fill(energy, mcIndex, GetEventWeight());
2049  fhOriginM02Overlap[matchedPID]->Fill(energy, mcIndex, m02, GetEventWeight());
2050  }
2051  }
2052  } // MC
2053 }
2054 
2055 //____________________________________________________________________________
2062 //____________________________________________________________________________
2064 (AliVCluster *clus, Int_t & matchedPID)
2065 {
2066 
2067  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(clus, GetReader()->GetInputEvent());
2068 
2069  if(!track)
2070  {
2071  matchedPID = -1;
2072  AliDebug(1,Form("No track found with matches %d",clus->GetNTracksMatched()));
2073  return ;
2074  }
2075 
2076 // Double_t tpt = track->Pt();
2077 // Double_t tmom = track->P();
2078  Double_t dedx = track->GetTPCsignal();
2079 // Int_t nITS = track->GetNcls(0);
2080 // Int_t nTPC = track->GetNcls(1);
2081 // Bool_t positive = kFALSE;
2082 // if(track) positive = (track->Charge()>0);
2083 
2084  // Residuals
2085 // Float_t deta = clus->GetTrackDz();
2086 // Float_t dphi = clus->GetTrackDx();
2087 // Double_t dR = TMath::Sqrt(dphi*dphi + deta*deta);
2088 // Int_t nModule = GetModuleNumber(clus);
2089 
2090  // Electron or else?
2091 
2092  // Init at least once
2093  if(fdEdXMinEle == 0 || fdEdXMaxEle == 0 || fdEdXMinHad == 0 || fdEdXMaxHad == 0)
2095 
2096  if ( dedx >= fdEdXMinEle && dedx < fdEdXMaxEle ) matchedPID = 1;
2097  else if ( dedx >= fdEdXMinHad && dedx < fdEdXMaxHad ) matchedPID = 2;
2098  else matchedPID =-1;
2099 
2100  AliDebug(1,Form("matches %d; dEdX %2.2f; matched PID %d",clus->GetNTracksMatched(),dedx,matchedPID));
2101 }
2102 
2103 //____________________________________________________________________________
2112 //____________________________________________________________________________
2114 {
2115  Int_t nCaloClusters = fCaloClusList->GetEntriesFast() ;
2116  Int_t nCaloCellsPerCluster = 0 ;
2117  Bool_t matched = kFALSE;
2118  Int_t nModule =-1 ;
2119 
2120  // Get vertex for photon momentum calculation and event selection
2121  Double_t v[3] = {0,0,0}; //vertex ;
2122  //GetReader()->GetVertex(v);
2123 
2124  AliDebug(1,Form("In %s there are %d clusters", GetCalorimeterString().Data(), nCaloClusters));
2125 
2126  // Loop over CaloClusters
2127  for(Int_t iclus = 0; iclus < nCaloClusters; iclus++)
2128  {
2129  AliDebug(1,Form("Cluster: %d/%d, data %d",iclus+1,nCaloClusters,GetReader()->GetDataType()));
2130 
2131  AliVCluster* clus = (AliVCluster*) fCaloClusList->At(iclus);
2132 
2133  // away from dead region
2134  if ( clus->GetDistanceToBadChannel() > -1 && // in case it was not calculated
2135  clus->GetDistanceToBadChannel() < fMinDistToBad )
2136  {
2137  AliDebug(1,Form("Small distance to bad channel %2.2f < %2.2f",clus->GetDistanceToBadChannel(),fMinDistToBad));
2138  continue ;
2139  }
2140 
2141  // SuperModule number of cluster
2142  nModule = GetModuleNumber(clus);
2143  if ( nModule < fFirstModule || nModule > fLastModule )
2144  {
2145  AliDebug(1,Form("Cluster module out of range %d",nModule));
2146  continue ;
2147  }
2148 
2149  // Get the fraction of the cluster energy that carries the cell with highest energy and its absId
2150  //
2151  Float_t maxCellFraction = 0.;
2152  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(fCaloCellList, clus, maxCellFraction);
2153 
2154  // Cut on time of clusters
2155  Double_t tof = clus->GetTOF()*1.e9;
2156  if(tof>400) tof-=fConstantTimeShift;
2157 
2158  // Get cluster kinematics
2159  clus->GetMomentum(fClusterMomentum,v);
2160 
2161  Float_t e = fClusterMomentum.E();
2162  Float_t pt = fClusterMomentum.Pt();
2163  Float_t eta = fClusterMomentum.Eta();
2164  Float_t phi = GetPhi(fClusterMomentum.Phi());
2165 
2166  // Check only certain regions
2167  Bool_t in = kTRUE;
2168  if(IsFiducialCutOn())
2170 
2171  if(!in)
2172  {
2173  AliDebug(1,Form("Remove cluster with phi %2.2f and eta %2.2f", phi*TMath::RadToDeg(), eta));
2174  continue;
2175  }
2176 
2177  AliDebug(1,Form("cluster: E %2.3f, pT %2.3f, eta %2.3f, phi %2.3f",e,pt,eta,phi*TMath::RadToDeg()));
2178 
2179  // Select the cluster
2180  //
2181  nCaloCellsPerCluster = clus->GetNCells();
2182 
2183  Bool_t goodCluster = IsGoodCluster(absIdMax, clus->GetM02(), nCaloCellsPerCluster);
2184 
2185  AliDebug(1,Form("Accept cluster? %d",goodCluster));
2186 
2187  if(!goodCluster) continue;
2188 
2189  // MC origin finding
2190  //
2191  Int_t mcTag = 0;
2192  Int_t mcIndex = -1;
2193  Int_t noverlaps =0;
2194  if ( IsDataMC() && fStudyShape )
2195  {
2196  mcTag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(), clus->GetNLabels(), GetMC(),
2198 
2200  GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCEta ) ) mcIndex = 0;
2204  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCPhoton ) ) mcIndex = 2;
2205  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCElectron ) ) mcIndex = 3;
2206  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCPion ) ) mcIndex = 4;
2207  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCKaon ) ) mcIndex = 5;
2208  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCProton ) ) mcIndex = 6;
2209  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCAntiProton ) ) mcIndex = 7;
2210  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCNeutron ) ) mcIndex = 8;
2211  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCAntiNeutron) ) mcIndex = 9;
2212 
2213  const UInt_t nlabels = clus->GetNLabels();
2214  Int_t overpdg[nlabels];
2215  Int_t overlab[nlabels];
2216  noverlaps = GetMCAnalysisUtils()->GetNOverlaps(clus->GetLabels(), nlabels, mcTag, -1,
2217  GetMC(), overpdg, overlab);
2218  }
2219 
2220  // Cluster mathed with track? and what kind?
2221  //
2222  matched = GetCaloPID()->IsTrackMatched(clus,GetCaloUtils(), GetReader()->GetInputEvent());
2223 
2224  Int_t matchedPID = -1;
2225  if ( !matched )
2226  {
2227  matchedPID = 0;
2228  }
2229  else if ( fStudyShape && fNMatchPIDCases > 1 )
2230  {
2231  ClusterMatchedToTrackPID(clus, matchedPID);
2232  }
2233 
2234  // Get amp and time of max cell, recalibrate and calculate things
2235  //
2236  Int_t bc = (GetReader()->GetInputEvent())->GetBunchCrossNumber();
2237  Double_t tmax = fCaloCellList->GetCellTime(absIdMax);
2238  Float_t ampMax = fCaloCellList->GetCellAmplitude(absIdMax);
2239 
2240  GetCaloUtils()->RecalibrateCellTime(tmax, GetCalorimeter(), absIdMax, bc);
2241  tmax*=1.e9;
2242  if(tmax>400) tmax-=fConstantTimeShift;
2243 
2244  GetCaloUtils()->RecalibrateCellAmplitude(ampMax, GetCalorimeter(), absIdMax);
2245 
2246  Float_t eCrossFrac = 0;
2247  if ( ampMax > 0.01 )
2248  eCrossFrac = 1-GetCaloUtils()->GetECross(absIdMax,fCaloCellList,bc)/ampMax;
2249 
2250 
2251  // Call analysis method filling histograms
2252  //
2253 
2254  //
2255  if ( fStudyShape && matchedPID >= 0 && matchedPID < 3 )
2256  ClusterShapeHistograms(clus, absIdMax, maxCellFraction, eCrossFrac, ampMax, tmax, matchedPID, mcIndex, noverlaps);
2257 
2258  //
2259  if ( fStudyTCardCorrelation )
2260  ChannelCorrelationInTCard(clus, matched, absIdMax, eCrossFrac);
2261 
2262  //
2263  if ( fStudyWeight )
2264  WeightHistograms(clus, mcTag);
2265 
2266  } // Cluster loop
2267 
2268 }
2269 
2270 //_________________________________________________
2272 //_________________________________________________
2274 {
2275  TString parList ; //this will be list of parameters used for this analysis.
2276  const Int_t buffersize = 255;
2277  char onePar[buffersize] ;
2278 
2279  snprintf(onePar,buffersize,"--- AliAnaClusterShapeCorrelStudies ---:") ;
2280  parList+=onePar ;
2281  snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
2282  parList+=onePar ;
2283  snprintf(onePar,buffersize,"Cluster M02: > %2.2f ; n cells > %d; dist to bad>%2.1f;",fM02Min, fNCellMin, fMinDistToBad) ;
2284  parList+=onePar ;
2285  snprintf(onePar,buffersize,"Inv. Mass %2.1f < E_cl < %2.1f GeV;",fInvMassMinECut, fInvMassMaxECut) ;
2286  parList+=onePar ;
2287  snprintf(onePar,buffersize,"Inv. Mass %2.1f < M02 < %2.1f GeV;",fInvMassMinM02Cut, fInvMassMaxM02Cut) ;
2288  parList+=onePar ;
2289  snprintf(onePar,buffersize,"Cluster pair opening angle < %2.1f rad;",fInvMassMaxOpenAngle) ;
2290  parList+=onePar ;
2291  snprintf(onePar,buffersize,"Cluster pair time difference < %2.1f rad;",fInvMassMaxTimeDifference) ;
2292  parList+=onePar ;
2293 
2294  //Get parameters set in base class.
2295  //parList += GetBaseParametersList() ;
2296 
2297  //Get parameters set in FiducialCut class (not available yet)
2298  //parlist += GetFidCut()->GetFidCutParametersList()
2299 
2300  return new TObjString(parList) ;
2301 }
2302 
2303 //___________________________________________________
2306 //___________________________________________________
2308 {
2309  TList * outputContainer = new TList() ;
2310  outputContainer->SetName("ClusterShapeStudies") ;
2311 
2312  // Init the number of modules, set in the class AliCalorimeterUtils
2313  //
2314  InitCaloParameters(); // See AliCaloTrackCorrBaseClass
2315 
2316  //Int_t totalSM = fLastModule-fFirstModule+1;
2317  //printf("N SM %d, first SM %d, last SM %d, total %d\n",fNModules,fFirstModule,fLastModule, totalSM);
2318 
2319 
2320  // MC origin
2321  TString mcParticleStringLabel[] = {"Merged #gamma#gamma","Decay #gamma","Direct #gamma","e^{#pm}","#pi^{#pm}","k^{#pm}","p","#bar{p}","n","#bar{n}"};
2322  //TString mcParticleStringTitle[] = {"MergedPhoton","DecayPhoton","DirectPhoton","Electron","Pion","Kaon","Proton","AntiProton","Neutron","AntiNeutron"};
2323 
2324  // track-match PID matching
2325  TString matchCase[] = {"Neutral","Electron","Hadron"};
2326 
2327  // Histogram binning and ranges
2328  //
2331 
2334 
2337 
2338  // TM residuals
2345 
2346  // Cell column-row histograms, see base class for data members setting
2347  //fNMaxColsFull+2,-1.5,fNMaxColsFull+0.5, fNMaxRowsFull+2,-1.5,fNMaxRowsFull+0.5
2348  Int_t ncolcell = fNMaxColsFull+2;
2349  Float_t colcellmin = -1.5;
2350  Float_t colcellmax = fNMaxColsFull+0.5;
2351 
2353  Float_t rowcellmin = fNMaxRowsFullMin-1.5;
2354  Float_t rowcellmax = fNMaxRowsFullMax+0.5;
2355 
2356  // E bins in TH3
2357  Int_t nEbins = 48;//16 ;
2358  Float_t minE = 2.5;
2359  Float_t maxE = 50.5;//18.5;
2360 
2361  // shower shape bins in TH3
2362  Int_t nShShBins = 200;
2363  Float_t minShSh = 0.;
2364  Float_t maxShSh = 2.;
2365 
2366  // Asymmetry bins
2367  Int_t asyBins = 21;
2368  Float_t asyMax = 1.05;
2369  Float_t asyMin = -1*asyMax;
2370 
2371  // n cell bins for TH3
2372  Int_t cellBins = 15;
2373  Float_t cellMax = 15;
2374  Float_t cellMin = 0;
2375 
2376  //
2377  // Init histograms
2378  //
2380  {
2382  ("hColRowHighEPosTime",
2383  "column vs row, exo < 0.97, E > 8 GeV, t > 5 ns",
2384  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2385  fhColRowHighEPosTime->SetYTitle("row");
2386  fhColRowHighEPosTime->SetXTitle("column");
2387  outputContainer->Add(fhColRowHighEPosTime) ;
2388 
2390  ("hColRowHighENegTime",
2391  "column vs row, exo < 0.97, E > 8 GeV, t < -5 ns",
2392  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2393  fhColRowHighENegTime->SetYTitle("row");
2394  fhColRowHighENegTime->SetXTitle("column");
2395  outputContainer->Add(fhColRowHighENegTime) ;
2396 
2398  ("hColRowHighENulTime",
2399  "column vs row, exo < 0.97, E > 8 GeV, -5 < t < 5 ns",
2400  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2401  fhColRowHighENulTime->SetYTitle("row");
2402  fhColRowHighENulTime->SetXTitle("column");
2403  outputContainer->Add(fhColRowHighENulTime) ;
2404 
2405  if(fStudyExotic)
2406  {
2408  ("hColRowExoticHighE1CellPosTime",
2409  "column vs row, 1 cell, E > 8 GeV, t > 5 ns",
2410  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2411  fhColRowExoticHighE1CellPosTime->SetYTitle("row");
2412  fhColRowExoticHighE1CellPosTime->SetXTitle("column");
2413  outputContainer->Add(fhColRowExoticHighE1CellPosTime) ;
2414 
2416  ("hColRowExoticHighEPosTime",
2417  "column vs row, exo > 0.97, E > 8 GeV, t > 5 ns",
2418  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2419  fhColRowExoticHighEPosTime->SetYTitle("row");
2420  fhColRowExoticHighEPosTime->SetXTitle("column");
2421  outputContainer->Add(fhColRowExoticHighEPosTime) ;
2422 
2424  ("hColRowExoticHighE1CellNegTime",
2425  "column vs row, 1 cell, E > 8 GeV, t < -5 ns",
2426  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2427  fhColRowExoticHighE1CellNegTime->SetYTitle("row");
2428  fhColRowExoticHighE1CellNegTime->SetXTitle("column");
2429  outputContainer->Add(fhColRowExoticHighE1CellNegTime) ;
2430 
2432  ("hColRowExoticHighENegTime",
2433  "column vs row, exo > 0.97, E > 8 GeV, t < -5 ns",
2434  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2435  fhColRowExoticHighENegTime->SetYTitle("row");
2436  fhColRowExoticHighENegTime->SetXTitle("column");
2437  outputContainer->Add(fhColRowExoticHighENegTime) ;
2438 
2440  ("hColRowExoticHighE1CellNulTime",
2441  "column vs row, 1 cell, E > 8 GeV, -5 < t < 5 ns",
2442  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2443  fhColRowExoticHighE1CellNulTime->SetYTitle("row");
2444  fhColRowExoticHighE1CellNulTime->SetXTitle("column");
2445  outputContainer->Add(fhColRowExoticHighE1CellNulTime) ;
2446 
2448  ("hColRowExoticHighENulTime",
2449  "column vs row, exo > 0.97, E > 8 GeV, -5 < t < 5 ns",
2450  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2451  fhColRowExoticHighENulTime->SetYTitle("row");
2452  fhColRowExoticHighENulTime->SetXTitle("column");
2453  outputContainer->Add(fhColRowExoticHighENulTime) ;
2454  }
2455 
2456  TString add[] = {"","TrackMatched"};
2457  for(Int_t tm = 0; tm < 2; tm++)
2458  {
2460  (Form("hColRowTCardCorrNoSelectionLowE%s",add[tm].Data()),
2461  Form("column vs row, max E cell for TCard correlation selected clusters, 5 < E < 8 GeV %s",add[tm].Data()),
2462  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2463  fhColRowTCardCorrNoSelectionLowE[tm]->SetYTitle("row");
2464  fhColRowTCardCorrNoSelectionLowE[tm]->SetXTitle("column");
2465  outputContainer->Add(fhColRowTCardCorrNoSelectionLowE[tm]) ;
2466 
2468  (Form("hColRowTCardCorrNoSelectionHighE%s",add[tm].Data()),
2469  Form("column vs row, max E cell for TCard correlation selected clusters, E > 8 GeV %s",add[tm].Data()),
2470  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2471  fhColRowTCardCorrNoSelectionHighE[tm]->SetYTitle("row");
2472  fhColRowTCardCorrNoSelectionHighE[tm]->SetXTitle("column");
2473  outputContainer->Add(fhColRowTCardCorrNoSelectionHighE[tm]) ;
2474 
2475  //
2476 
2478  (Form("hNCellsTCardCorrNoSelection%s",add[tm].Data()),
2479  Form("# custer # cells vs #it{E} %s",add[tm].Data()),
2480  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
2481  fhNCellsTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2482  fhNCellsTCardCorrNoSelection[tm]->SetYTitle("#it{n}_{cells}");
2483  outputContainer->Add(fhNCellsTCardCorrNoSelection[tm]);
2484 
2486  (Form("hNCellsTCardCorrWithWeightNoSelection%s",add[tm].Data()),
2487  Form("custer # cells vs #it{E}, w > 0.01 %s",add[tm].Data()),
2488  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
2489  fhNCellsTCardCorrWithWeightNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2490  fhNCellsTCardCorrWithWeightNoSelection[tm]->SetYTitle("#it{n}_{cells}");
2491  outputContainer->Add(fhNCellsTCardCorrWithWeightNoSelection[tm]);
2492 
2494  (Form("hNCellsTCardCorrRatioWithWeightNoSelection%s",add[tm].Data()),
2495  Form("custer # cells vs #it{E}, w > 0.01 %s",add[tm].Data()),
2496  nptbins,ptmin,ptmax, 100,0,1);
2497  fhNCellsTCardCorrRatioWithWeightNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2498  fhNCellsTCardCorrRatioWithWeightNoSelection[tm]->SetYTitle("#it{n}^{w>0.01}_{cells} / #it{n}_{cells}");
2499  outputContainer->Add(fhNCellsTCardCorrRatioWithWeightNoSelection[tm]);
2500 
2501  fhTimeTCardCorrNoSelection[tm] = new TH2F
2502  (Form("hTimeTCardCorrNoSelection%s",add[tm].Data()),
2503  Form("#it{time} vs #it{E} %s",add[tm].Data()),
2504  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2505  fhTimeTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2506  fhTimeTCardCorrNoSelection[tm]->SetYTitle("#it{time} (ns)");
2507  outputContainer->Add(fhTimeTCardCorrNoSelection[tm]);
2508 
2510  (Form("hLambda0TCardCorrNoSelection%s",add[tm].Data()),
2511  Form("#sigma^{2}_{long} vs #it{E} %s",add[tm].Data()),
2512  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2513  fhLambda0TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2514  fhLambda0TCardCorrNoSelection[tm]->SetYTitle("#sigma^{2}_{long}");
2515  outputContainer->Add(fhLambda0TCardCorrNoSelection[tm]);
2516 
2518  (Form("hLambda1TCardCorrNoSelection%s",add[tm].Data()),
2519  Form("#sigma^{2}_{short} vs #it{E} %s",add[tm].Data()),
2520  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2521  fhLambda1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2522  fhLambda1TCardCorrNoSelection[tm]->SetYTitle("#sigma^{2}_{short}");
2523  outputContainer->Add(fhLambda1TCardCorrNoSelection[tm]);
2524 
2525  if ( fFillNLocMaxHistos )
2526  {
2528  (Form("hLambda0NLM1TCardCorrNoSelection%s",add[tm].Data()),
2529  Form("#sigma^{2}_{long} vs #it{E}, nlm=1 %s",add[tm].Data()),
2530  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2531  fhLambda0NLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2532  fhLambda0NLM1TCardCorrNoSelection[tm]->SetYTitle("#sigma^{2}_{long}");
2533  outputContainer->Add(fhLambda0NLM1TCardCorrNoSelection[tm]);
2534 
2536  (Form("hLambda1NLM1TCardCorrNoSelection%s",add[tm].Data()),
2537  Form("#sigma^{2}_{short} vs #it{E}, nlm=1 %s",add[tm].Data()),
2538  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2539  fhLambda1NLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2540  fhLambda1NLM1TCardCorrNoSelection[tm]->SetYTitle("#sigma^{2}_{short}");
2541  outputContainer->Add(fhLambda1NLM1TCardCorrNoSelection[tm]);
2542 
2544  (Form("hLambda0NLM2TCardCorrNoSelection%s",add[tm].Data()),
2545  Form("#sigma^{2}_{long} vs #it{E}, nlm=2 %s",add[tm].Data()),
2546  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2547  fhLambda0NLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2548  fhLambda0NLM2TCardCorrNoSelection[tm]->SetYTitle("#sigma^{2}_{long}");
2549  outputContainer->Add(fhLambda0NLM2TCardCorrNoSelection[tm]);
2550 
2552  (Form("hLambda1NLM2TCardCorrNoSelection%s",add[tm].Data()),
2553  Form("#sigma^{2}_{short} vs #it{E}, nlm=2 %s",add[tm].Data()),
2554  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2555  fhLambda1NLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2556  fhLambda1NLM2TCardCorrNoSelection[tm]->SetYTitle("#sigma^{2}_{short}");
2557  outputContainer->Add(fhLambda1NLM2TCardCorrNoSelection[tm]);
2558  }
2559 
2561  (Form("hLambdaRTCardCorrNoSelection%s",add[tm].Data()),
2562  Form("#sigma^{2}_{short}/#sigma^{2}_{long} vs #it{E} %s",add[tm].Data()),
2563  nptbins,ptmin,ptmax,110,0,1.1);
2564  fhLambdaRTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2565  fhLambdaRTCardCorrNoSelection[tm]->SetYTitle("#sigma^{2}_{short}/#sigma^{2}_{long}");
2566  outputContainer->Add(fhLambdaRTCardCorrNoSelection[tm]);
2567 
2569  (Form("hNLocMaxTCardCorrNoSelection%s",add[tm].Data()),
2570  Form("#it{n}_{LM} vs E %s",add[tm].Data()),
2571  nptbins,ptmin,ptmax,10,0,10);
2572  fhNLocMaxTCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2573  fhNLocMaxTCardCorrNoSelection[tm]->SetYTitle("#it{n}_{LM}");
2574  outputContainer->Add(fhNLocMaxTCardCorrNoSelection[tm]);
2575 
2576  if ( fFillNLocMaxHistos )
2577  {
2579  (Form("hEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2580  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
2581  nptbins,ptmin,ptmax,100,0,1);
2582  fhEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2583  fhEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2584  outputContainer->Add(fhEMaxRatNLM1TCardCorrNoSelection[tm]);
2585 
2587  (Form("hEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2588  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2589  nptbins,ptmin,ptmax,100,0,1);
2590  fhEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2591  fhEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2592  outputContainer->Add(fhEMaxRatNLM2TCardCorrNoSelection[tm]);
2593 
2595  (Form("hEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2596  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2597  nptbins,ptmin,ptmax,100,0,1);
2598  fhEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2599  fhEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2600  outputContainer->Add(fhEMaxRatNLM3TCardCorrNoSelection[tm]);
2601 
2603  (Form("hE2ndRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2604  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cluster} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
2605  nptbins,ptmin,ptmax,100,0,1);
2606  fhE2ndRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2607  fhE2ndRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
2608  outputContainer->Add(fhE2ndRatNLM1TCardCorrNoSelection[tm]);
2609 
2611  (Form("hE2ndRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2612  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2613  nptbins,ptmin,ptmax,100,0,1);
2614  fhE2ndRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2615  fhE2ndRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2616  outputContainer->Add(fhE2ndRatNLM2TCardCorrNoSelection[tm]);
2617 
2619  (Form("hE2ndRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2620  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2621  nptbins,ptmin,ptmax,100,0,1);
2622  fhE2ndRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2623  fhE2ndRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2624  outputContainer->Add(fhE2ndRatNLM3TCardCorrNoSelection[tm]);
2625 
2626 
2628  (Form("hE2ndEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2629  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
2630  nptbins,ptmin,ptmax,100,0,1);
2631  fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2632  fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
2633  outputContainer->Add(fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]);
2634 
2636  (Form("hE2ndEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2637  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2638  nptbins,ptmin,ptmax,100,0,1);
2639  fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2640  fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2641  outputContainer->Add(fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]);
2642 
2644  (Form("hE2ndEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2645  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2646  nptbins,ptmin,ptmax,100,0,1);
2647  fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2648  fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2649  outputContainer->Add(fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]);
2650 
2652 
2654  (Form("hE2ndSameRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2655  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()),
2656  nptbins,ptmin,ptmax,100,0,1);
2657  fhE2ndSameRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2658  fhE2ndSameRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
2659  outputContainer->Add(fhE2ndSameRatNLM1TCardCorrNoSelection[tm]);
2660 
2662  (Form("hE2ndSameRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2663  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()),
2664  nptbins,ptmin,ptmax,100,0,1);
2665  fhE2ndSameRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2666  fhE2ndSameRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2667  outputContainer->Add(fhE2ndSameRatNLM2TCardCorrNoSelection[tm]);
2668 
2670  (Form("hE2ndSameRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2671  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()),
2672  nptbins,ptmin,ptmax,100,0,1);
2673  fhE2ndSameRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2674  fhE2ndSameRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2675  outputContainer->Add(fhE2ndSameRatNLM3TCardCorrNoSelection[tm]);
2676 
2677 
2679  (Form("hE2ndSameEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2680  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()),
2681  nptbins,ptmin,ptmax,100,0,1);
2682  fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2683  fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
2684  outputContainer->Add(fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]);
2685 
2687  (Form("hE2ndSameEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2688  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()),
2689  nptbins,ptmin,ptmax,100,0,1);
2690  fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2691  fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2692  outputContainer->Add(fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]);
2693 
2695  (Form("hE2ndSameEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2696  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()),
2697  nptbins,ptmin,ptmax,100,0,1);
2698  fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2699  fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2700  outputContainer->Add(fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]);
2701 
2703 
2705  (Form("hECellClusRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2706  Form("#it{E}_{cell}/#it{E}_{cluster} vs E_{cluster}, #it{n}_{LM}=1 %s",add[tm].Data()),
2707  nptbins,ptmin,ptmax,100,0,1);
2708  fhECellClusRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2709  fhECellClusRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2710  outputContainer->Add(fhECellClusRatNLM1TCardCorrNoSelection[tm]);
2711 
2713  (Form("hECellClusRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2714  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2715  nptbins,ptmin,ptmax,100,0,1);
2716  fhECellClusRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2717  fhECellClusRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2718  outputContainer->Add(fhECellClusRatNLM2TCardCorrNoSelection[tm]);
2719 
2721  (Form("hECellClusRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2722  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2723  nptbins,ptmin,ptmax,100,0,1);
2724  fhECellClusRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2725  fhECellClusRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2726  outputContainer->Add(fhECellClusRatNLM3TCardCorrNoSelection[tm]);
2727 
2729  (Form("hLogECellNLM1TCardCorrNoSelection%s",add[tm].Data()),
2730  Form("log(#it{E}_{cell}) vs E_{cluster}, #it{n}_{LM}=1, w > 0.01 %s",add[tm].Data()),
2731  nptbins,ptmin,ptmax,150,-3,3);
2732  fhLogECellNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2733  fhLogECellNLM1TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2734  outputContainer->Add(fhLogECellNLM1TCardCorrNoSelection[tm]);
2735 
2737  (Form("hLogECellNLM2TCardCorrNoSelection%s",add[tm].Data()),
2738  Form("log(#it{E}_{cell}) vs E, #it{n}_{LM}=2, w > 0.01 %s",add[tm].Data()),
2739  nptbins,ptmin,ptmax,150,-3,3);
2740  fhLogECellNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2741  fhLogECellNLM2TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2742  outputContainer->Add(fhLogECellNLM2TCardCorrNoSelection[tm]);
2743 
2745  (Form("hLogECellNLM3TCardCorrNoSelection%s",add[tm].Data()),
2746  Form("log(#it{E}_{cell}) vs E, #it{n}_{LM}>2, w > 0.01 %s",add[tm].Data()),
2747  nptbins,ptmin,ptmax,150,-3,3);
2748  fhLogECellNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2749  fhLogECellNLM3TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2750  outputContainer->Add(fhLogECellNLM3TCardCorrNoSelection[tm]);
2751 
2752 
2754  (Form("hECellWeightNLM1TCardCorrNoSelection%s",add[tm].Data()),
2755  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs E_{cluster}, #it{n}_{LM}=1 %s",add[tm].Data()),
2756  nptbins,ptmin,ptmax,90,0,4.5);
2757  fhECellWeightNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2758  fhECellWeightNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2759  outputContainer->Add(fhECellWeightNLM1TCardCorrNoSelection[tm]);
2760 
2762  (Form("hECellWeightNLM2TCardCorrNoSelection%s",add[tm].Data()),
2763  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2764  nptbins,ptmin,ptmax,90,0,4.5);
2765  fhECellWeightNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2766  fhECellWeightNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2767  outputContainer->Add(fhECellWeightNLM2TCardCorrNoSelection[tm]);
2768 
2770  (Form("hECellWeightNLM3TCardCorrNoSelection%s",add[tm].Data()),
2771  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2772  nptbins,ptmin,ptmax,90,0,4.5);
2773  fhECellWeightNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2774  fhECellWeightNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2775  outputContainer->Add(fhECellWeightNLM3TCardCorrNoSelection[tm]);
2776 
2777 
2779  (Form("hECellSameClusRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2780  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()),
2781  nptbins,ptmin,ptmax,100,0,1);
2782  fhECellSameClusRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2783  fhECellSameClusRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2784  outputContainer->Add(fhECellSameClusRatNLM1TCardCorrNoSelection[tm]);
2785 
2787  (Form("hECellSameClusRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2788  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, cell from same T-Card as leading, #it{n}_{LM}=2 %s",add[tm].Data()),
2789  nptbins,ptmin,ptmax,100,0,1);
2790  fhECellSameClusRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2791  fhECellSameClusRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2792  outputContainer->Add(fhECellSameClusRatNLM2TCardCorrNoSelection[tm]);
2793 
2795  (Form("hECellSameClusRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2796  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, cell from same T-Card as leading, #it{n}_{LM}>2 %s",add[tm].Data()),
2797  nptbins,ptmin,ptmax,100,0,1);
2798  fhECellSameClusRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2799  fhECellSameClusRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2800  outputContainer->Add(fhECellSameClusRatNLM3TCardCorrNoSelection[tm]);
2801 
2803  (Form("hLogECellSameNLM1TCardCorrNoSelection%s",add[tm].Data()),
2804  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()),
2805  nptbins,ptmin,ptmax,150,-3,3);
2806  fhLogECellSameNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2807  fhLogECellSameNLM1TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2808  outputContainer->Add(fhLogECellSameNLM1TCardCorrNoSelection[tm]);
2809 
2811  (Form("hLogECellSameNLM2TCardCorrNoSelection%s",add[tm].Data()),
2812  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()),
2813  nptbins,ptmin,ptmax,150,-3,3);
2814  fhLogECellSameNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2815  fhLogECellSameNLM2TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2816  outputContainer->Add(fhLogECellSameNLM2TCardCorrNoSelection[tm]);
2817 
2819  (Form("hLogECellSameNLM3TCardCorrNoSelection%s",add[tm].Data()),
2820  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()),
2821  nptbins,ptmin,ptmax,150,-3,3);
2822  fhLogECellSameNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2823  fhLogECellSameNLM3TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2824  outputContainer->Add(fhLogECellSameNLM3TCardCorrNoSelection[tm]);
2825 
2826 
2828  (Form("hECellSameWeightNLM1TCardCorrNoSelection%s",add[tm].Data()),
2829  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()),
2830  nptbins,ptmin,ptmax,90,0,4.5);
2831  fhECellSameWeightNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2832  fhECellSameWeightNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2833  outputContainer->Add(fhECellSameWeightNLM1TCardCorrNoSelection[tm]);
2834 
2836  (Form("hECellSameWeightNLM2TCardCorrNoSelection%s",add[tm].Data()),
2837  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()),
2838  nptbins,ptmin,ptmax,90,0,4.5);
2839  fhECellSameWeightNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2840  fhECellSameWeightNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2841  outputContainer->Add(fhECellSameWeightNLM2TCardCorrNoSelection[tm]);
2842 
2844  (Form("hECellSameWeightNLM3TCardCorrNoSelection%s",add[tm].Data()),
2845  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()),
2846  nptbins,ptmin,ptmax,90,0,4.5);
2847  fhECellSameWeightNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2848  fhECellSameWeightNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2849  outputContainer->Add(fhECellSameWeightNLM3TCardCorrNoSelection[tm]);
2850  } // NLM histos
2851 
2853  (Form("hExoticTCardCorrNoSelection%s",add[tm].Data()),
2854  Form("exoticity vs #it{E} %s",add[tm].Data()),
2855  nptbins,ptmin,ptmax,200,-1,1);
2856  fhExoticTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2857  fhExoticTCardCorrNoSelection[tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
2858  outputContainer->Add(fhExoticTCardCorrNoSelection[tm]);
2859 
2861  (Form("hNCellsTCardSameAndDiffFraction%s",add[tm].Data()),
2862  Form("#it{n}_{cells} same TCard vs diff TCard fraction, w > 0.01, %s",add[tm].Data()),
2863  nptbins,ptmin,ptmax,100,0,1);
2864  fhNCellsTCardSameAndDiffFraction[tm]->SetXTitle("#it{E} (GeV)");
2865  fhNCellsTCardSameAndDiffFraction[tm]->SetYTitle("#it{n}_{cells} - same TCard / #it{n}_{cells} - total");
2866  outputContainer->Add(fhNCellsTCardSameAndDiffFraction[tm]);
2867 
2869  (Form("hSameRowDiffColAndTCardCellsEnergyDiffClusterE%s",add[tm].Data()),
2870  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()),
2871  nptbins,ptmin,ptmax,200,-10,10);
2872  fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2873  fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
2874  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]);
2875 
2877  (Form("hSameRowDiffColAndTCardCellsTimeDiffClusterE%s",add[tm].Data()),
2878  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()),
2879  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
2880  fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2881  fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
2882  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]);
2883 
2885  (Form("hSameRowDiffColAndTCardCellsEnergyDiffCellMaxE%s",add[tm].Data()),
2886  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()),
2887  nptbins,ptmin,ptmax,200,-10,10);
2888  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
2889  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
2890  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]);
2891 
2893  (Form("hSameRowDiffColAndTCardCellsTimeDiffCellMaxE%s",add[tm].Data()),
2894  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()),
2895  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
2896  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
2897  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
2898  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]);
2899 
2900  if(fStudyExotic)
2901  {
2902  fhEnergyTime1Cell[tm] = new TH2F
2903  (Form("hEnergyTime1Cell%s",add[tm].Data()),
2904  Form("#it{t} vs #it{E}, 1 cells cluster %s",add[tm].Data()),
2905  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2906  fhEnergyTime1Cell[tm]->SetXTitle("#it{E} (GeV)");
2907  fhEnergyTime1Cell[tm]->SetYTitle("#it{t} (ns)");
2908  outputContainer->Add(fhEnergyTime1Cell[tm]);
2909 
2910  fhEnergyTimeExotic[tm] = new TH2F
2911  (Form("hEnergyTimeExotic%s",add[tm].Data()),
2912  Form("#it{t} vs #it{E}, exo > 0.97, %s",add[tm].Data()),
2913  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2914  fhEnergyTimeExotic[tm]->SetXTitle("#it{E} (GeV)");
2915  fhEnergyTimeExotic[tm]->SetYTitle("#it{t} (ns)");
2916  outputContainer->Add(fhEnergyTimeExotic[tm]);
2917 
2919  (Form("hEnergyTimeTCardCorrNoSelection1Cell%s",add[tm].Data()),
2920  Form("#it{t} vs #it{E}, 1 cells cluster %s",add[tm].Data()),
2921  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2922  fhEnergyTimeTCardCorrNoSelection1Cell[tm]->SetXTitle("#it{E} (GeV)");
2923  fhEnergyTimeTCardCorrNoSelection1Cell[tm]->SetYTitle("#it{t} (ns)");
2924  outputContainer->Add(fhEnergyTimeTCardCorrNoSelection1Cell[tm]);
2925 
2927  (Form("hEnergyTimeTCardCorrNoSelectionExotic%s",add[tm].Data()),
2928  Form("#it{t} vs #it{E}, exo > 0.97, %s",add[tm].Data()),
2929  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2930  fhEnergyTimeTCardCorrNoSelectionExotic[tm]->SetXTitle("#it{E} (GeV)");
2931  fhEnergyTimeTCardCorrNoSelectionExotic[tm]->SetYTitle("#it{t} (ns)");
2932  outputContainer->Add(fhEnergyTimeTCardCorrNoSelectionExotic[tm]);
2933 
2934  fhColRowExoticLowE1Cell[tm] = new TH2F
2935  (Form("hColRowExoticLowE1Cell%s",add[tm].Data()),
2936  Form("column vs row, 1 cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2937  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2938  fhColRowExoticLowE1Cell[tm]->SetYTitle("row");
2939  fhColRowExoticLowE1Cell[tm]->SetXTitle("column");
2940  outputContainer->Add(fhColRowExoticLowE1Cell[tm]) ;
2941 
2942  fhColRowExoticHighE1Cell[tm] = new TH2F
2943  (Form("hColRowExoticHighE1Cell%s",add[tm].Data()),
2944  Form("column vs row, 1 cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2945  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2946  fhColRowExoticHighE1Cell[tm]->SetYTitle("row");
2947  fhColRowExoticHighE1Cell[tm]->SetXTitle("column");
2948  outputContainer->Add(fhColRowExoticHighE1Cell[tm]) ;
2949 
2950  fhColRowExoticLowE[tm] = new TH2F
2951  (Form("hColRowExoticLowE%s",add[tm].Data()),
2952  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2953  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2954  fhColRowExoticLowE[tm]->SetYTitle("row");
2955  fhColRowExoticLowE[tm]->SetXTitle("column");
2956  outputContainer->Add(fhColRowExoticLowE[tm]) ;
2957 
2958  fhColRowExoticHighE[tm] = new TH2F
2959  (Form("hColRowExoticHighE%s",add[tm].Data()),
2960  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2961  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2962  fhColRowExoticHighE[tm]->SetYTitle("row");
2963  fhColRowExoticHighE[tm]->SetXTitle("column");
2964  outputContainer->Add(fhColRowExoticHighE[tm]) ;
2965 
2967  (Form("hColRowExotic2ndCellDiffLowE%s",add[tm].Data()),
2968  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2969  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2970  fhColRowExotic2ndCellDiffLowE[tm]->SetYTitle("row");
2971  fhColRowExotic2ndCellDiffLowE[tm]->SetXTitle("column");
2972  outputContainer->Add(fhColRowExotic2ndCellDiffLowE[tm]) ;
2973 
2975  (Form("hColRowExotic2ndCellDiffHighE%s",add[tm].Data()),
2976  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2977  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2978  fhColRowExotic2ndCellDiffHighE[tm]->SetYTitle("row");
2979  fhColRowExotic2ndCellDiffHighE[tm]->SetXTitle("column");
2980  outputContainer->Add(fhColRowExotic2ndCellDiffHighE[tm]) ;
2981 
2983  (Form("hColRowExotic2ndCellSameLowE%s",add[tm].Data()),
2984  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2985  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2986  fhColRowExotic2ndCellSameLowE[tm]->SetYTitle("row");
2987  fhColRowExotic2ndCellSameLowE[tm]->SetXTitle("column");
2988  outputContainer->Add(fhColRowExotic2ndCellSameLowE[tm]) ;
2989 
2991  (Form("hColRowExotic2ndCellSameHighE%s",add[tm].Data()),
2992  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2993  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2994  fhColRowExotic2ndCellSameHighE[tm]->SetYTitle("row");
2995  fhColRowExotic2ndCellSameHighE[tm]->SetXTitle("column");
2996  outputContainer->Add(fhColRowExotic2ndCellSameHighE[tm]) ;
2997 
2999  (Form("hColRowTCardCorrNoSelectionExoticLowE%s",add[tm].Data()),
3000  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3001  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3002  fhColRowTCardCorrNoSelectionExoticLowE[tm]->SetYTitle("row");
3003  fhColRowTCardCorrNoSelectionExoticLowE[tm]->SetXTitle("column");
3004  outputContainer->Add(fhColRowTCardCorrNoSelectionExoticLowE[tm]) ;
3005 
3007  (Form("hColRowTCardCorrNoSelectionExoticHighE%s",add[tm].Data()),
3008  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3009  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3010  fhColRowTCardCorrNoSelectionExoticHighE[tm]->SetYTitle("row");
3011  fhColRowTCardCorrNoSelectionExoticHighE[tm]->SetXTitle("column");
3012  outputContainer->Add(fhColRowTCardCorrNoSelectionExoticHighE[tm]) ;
3013 
3015  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffLowE%s",add[tm].Data()),
3016  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3017  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3019  fhColRowTCardCorrNoSelectionExotic2ndCellDiffLowE[tm]->SetXTitle("column");
3020  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellDiffLowE[tm]) ;
3021 
3023  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffHighE%s",add[tm].Data()),
3024  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3025  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3027  fhColRowTCardCorrNoSelectionExotic2ndCellDiffHighE[tm]->SetXTitle("column");
3028  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellDiffHighE[tm]) ;
3029 
3031  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameLowE%s",add[tm].Data()),
3032  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3033  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3035  fhColRowTCardCorrNoSelectionExotic2ndCellSameLowE[tm]->SetXTitle("column");
3036  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellSameLowE[tm]) ;
3037 
3039  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameHighE%s",add[tm].Data()),
3040  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3041  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3043  fhColRowTCardCorrNoSelectionExotic2ndCellSameHighE[tm]->SetXTitle("column");
3044  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellSameHighE[tm]) ;
3045 
3047  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameLowE%s",add[tm].Data()),
3048  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3049  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3053 
3055  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameHighE%s",add[tm].Data()),
3056  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3057  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3061 
3063  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffLowE%s",add[tm].Data()),
3064  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
3065  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3069 
3071  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffHighE%s",add[tm].Data()),
3072  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
3073  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3077 
3079  (Form("hNCellsTCardSameAndDiffFraction_Exotic%s",add[tm].Data()),
3080  Form("#it{n}_{cells} same TCard vs diff TCard fraction, w > 0.01, exo > 0.97 %s",add[tm].Data()),
3081  nptbins,ptmin,ptmax,100,0,1);
3082  fhNCellsTCardSameAndDiffFractionExotic[tm]->SetXTitle("#it{E} (GeV)");
3083  fhNCellsTCardSameAndDiffFractionExotic[tm]->SetYTitle("#it{n}_{cells} - same TCard / #it{n}_{cells} - total");
3084  outputContainer->Add(fhNCellsTCardSameAndDiffFractionExotic[tm]);
3085 
3087  (Form("hSameRowDiffColAndTCardCellsEnergyDiffClusterEExo%s",add[tm].Data()),
3088  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()),
3089  nptbins,ptmin,ptmax,200,-10,10);
3090  fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3091  fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
3092  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]);
3093 
3095  (Form("hSameRowDiffColAndTCardCellsTimeDiffClusterEExo%s",add[tm].Data()),
3096  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()),
3097  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
3098  fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3099  fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
3100  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]);
3101 
3103  (Form("hSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo%s",add[tm].Data()),
3104  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()),
3105  nptbins,ptmin,ptmax,200,-10,10);
3106  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
3107  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
3108  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]);
3109 
3111  (Form("hSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo%s",add[tm].Data()),
3112  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()),
3113  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
3114  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
3115  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
3116  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]);
3117  }
3118 
3119  for(Int_t i = 0; i < 6; i++)
3120  {
3121  for(Int_t j = 0; j < 6; j++)
3122  {
3123  fhLambda0TCardCorrelNCell[i][j][tm] = new TH2F
3124  (Form("hLambda0TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3125  Form("#sigma^{2}_{long} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3126  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3127  fhLambda0TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3128  fhLambda0TCardCorrelNCell[i][j][tm]->SetYTitle("#sigma^{2}_{long}");
3129  outputContainer->Add(fhLambda0TCardCorrelNCell[i][j][tm]);
3130 
3131  fhLambda1TCardCorrelNCell[i][j][tm] = new TH2F
3132  (Form("hLambda1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3133  Form("#sigma^{2}_{short} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3134  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3135  fhLambda1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3136  fhLambda1TCardCorrelNCell[i][j][tm]->SetYTitle("#sigma^{2}_{short}");
3137  outputContainer->Add(fhLambda1TCardCorrelNCell[i][j][tm]);
3138 
3139  // fhLambdaRTCardCorrelNCell[i][j][tm] = new TH2F
3140  // (Form("hLambdaRTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3141  // Form("#sigma^{2}_{short}/#sigma^{2}_{long} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3142  // nptbins,ptmin,ptmax,110,0,1.1);
3143  // fhLambdaRTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3144  // fhLambdaRTCardCorrelNCell[i][j][tm]->SetYTitle("#sigma^{2}_{short}/#sigma^{2}_{long}");
3145  // outputContainer->Add(fhLambdaRTCardCorrelNCell[i][j][tm]);
3146 
3147  if ( fFillNLocMaxHistos )
3148  {
3149  fhLambda0NLM1TCardCorrelNCell[i][j][tm] = new TH2F
3150  (Form("hLambda0NLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3151  Form("#sigma^{2}_{long} vs #it{E}, nlm=1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3152  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3153  fhLambda0NLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3154  fhLambda0NLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#sigma^{2}_{long}");
3155  outputContainer->Add(fhLambda0NLM1TCardCorrelNCell[i][j][tm]);
3156 
3157  fhLambda1NLM1TCardCorrelNCell[i][j][tm] = new TH2F
3158  (Form("hLambda1NLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3159  Form("#sigma^{2}_{short} vs #it{E}, nlm=1, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3160  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3161  fhLambda1NLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3162  fhLambda1NLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#sigma^{2}_{short}");
3163  outputContainer->Add(fhLambda1NLM1TCardCorrelNCell[i][j][tm]);
3164 
3165  fhLambda0NLM2TCardCorrelNCell[i][j][tm] = new TH2F
3166  (Form("hLambda0NLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3167  Form("#sigma^{2}_{long} vs #it{E}, nlm=2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3168  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3169  fhLambda0NLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3170  fhLambda0NLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#sigma^{2}_{long}");
3171  outputContainer->Add(fhLambda0NLM2TCardCorrelNCell[i][j][tm]);
3172 
3173  fhLambda1NLM2TCardCorrelNCell[i][j][tm] = new TH2F
3174  (Form("hLambda1NLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3175  Form("#sigma^{2}_{short} vs #it{E}, nlm=2, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3176  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3177  fhLambda1NLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3178  fhLambda1NLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#sigma^{2}_{short}");
3179  outputContainer->Add(fhLambda1NLM2TCardCorrelNCell[i][j][tm]);
3180 
3181  fhNLocMaxTCardCorrelNCell[i][j][tm] = new TH2F
3182  (Form("hNLocMaxTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3183  Form("#it{n}_{LM} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3184  nptbins,ptmin,ptmax,10,0,10);
3185  fhNLocMaxTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3186  fhNLocMaxTCardCorrelNCell[i][j][tm]->SetYTitle("#it{n}_{LM}");
3187  outputContainer->Add(fhNLocMaxTCardCorrelNCell[i][j][tm]);
3188 
3189  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
3190  (Form("hEMaxRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3191  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()),
3192  nptbins,ptmin,ptmax,100,0,1);
3193  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3194  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
3195  outputContainer->Add(fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]);
3196 
3197  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
3198  (Form("hEMaxRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3199  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()),
3200  nptbins,ptmin,ptmax,100,0,1);
3201  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3202  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
3203  outputContainer->Add(fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]);
3204 
3205  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
3206  (Form("hEMaxRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3207  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()),
3208  nptbins,ptmin,ptmax,100,0,1);
3209  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3210  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
3211  outputContainer->Add(fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]);
3212 
3213  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
3214  (Form("hE2ndRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3215  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()),
3216  nptbins,ptmin,ptmax,100,0,1);
3217  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3218  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
3219  outputContainer->Add(fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]);
3220 
3221  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
3222  (Form("hE2ndRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3223  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()),
3224  nptbins,ptmin,ptmax,100,0,1);
3225  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3226  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
3227  outputContainer->Add(fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]);
3228 
3229  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
3230  (Form("hE2ndRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3231  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()),
3232  nptbins,ptmin,ptmax,100,0,1);
3233  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3234  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
3235  outputContainer->Add(fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]);
3236 
3237  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
3238  (Form("hE2ndEMaxRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3239  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()),
3240  nptbins,ptmin,ptmax,100,0,1);
3241  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3242  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
3243  outputContainer->Add(fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]);
3244 
3245  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
3246  (Form("hE2ndEMaxRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3247  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()),
3248  nptbins,ptmin,ptmax,100,0,1);
3249  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3250  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
3251  outputContainer->Add(fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]);
3252 
3253  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
3254  (Form("hE2ndEMaxRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3255  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()),
3256  nptbins,ptmin,ptmax,100,0,1);
3257  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3258  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
3259  outputContainer->Add(fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]);
3260 
3261 
3262  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
3263  (Form("hECellClusRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3264  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()),
3265  nptbins,ptmin,ptmax,100,0,1);
3266  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3267  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3268  outputContainer->Add(fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]);
3269 
3270  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
3271  (Form("hECellClusRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3272  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()),
3273  nptbins,ptmin,ptmax,100,0,1);
3274  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3275  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3276  outputContainer->Add(fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]);
3277 
3278  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
3279  (Form("hECellClusRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3280  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()),
3281  nptbins,ptmin,ptmax,100,0,1);
3282  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3283  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3284  outputContainer->Add(fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]);
3285 
3286  fhLogECellNLM1TCardCorrelNCell[i][j][tm] = new TH2F
3287  (Form("hLogECellNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3288  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()),
3289  nptbins,ptmin,ptmax,150,-3,3);
3290  fhLogECellNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3291  fhLogECellNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
3292  outputContainer->Add(fhLogECellNLM1TCardCorrelNCell[i][j][tm]);
3293 
3294  fhLogECellNLM2TCardCorrelNCell[i][j][tm] = new TH2F
3295  (Form("hLogECellNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3296  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()),
3297  nptbins,ptmin,ptmax,150,-3,3);
3298  fhLogECellNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3299  fhLogECellNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
3300  outputContainer->Add(fhLogECellNLM2TCardCorrelNCell[i][j][tm]);
3301 
3302  fhLogECellNLM3TCardCorrelNCell[i][j][tm] = new TH2F
3303  (Form("hLogECellNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3304  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()),
3305  nptbins,ptmin,ptmax,150,-3,3);
3306  fhLogECellNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3307  fhLogECellNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
3308  outputContainer->Add(fhLogECellNLM3TCardCorrelNCell[i][j][tm]);
3309 
3310  fhECellWeightNLM1TCardCorrelNCell[i][j][tm] = new TH2F
3311  (Form("hECellWeightNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3312  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()),
3313  nptbins,ptmin,ptmax,90,0,4.5);
3314  fhECellWeightNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3315  fhECellWeightNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3316  outputContainer->Add(fhECellWeightNLM1TCardCorrelNCell[i][j][tm]);
3317 
3318  fhECellWeightNLM2TCardCorrelNCell[i][j][tm] = new TH2F
3319  (Form("hECellWeightNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3320  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()),
3321  nptbins,ptmin,ptmax,90,0,4.5);
3322  fhECellWeightNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3323  fhECellWeightNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3324  outputContainer->Add(fhECellWeightNLM2TCardCorrelNCell[i][j][tm]);
3325 
3326  fhECellWeightNLM3TCardCorrelNCell[i][j][tm] = new TH2F
3327  (Form("hECellWeightNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3328  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()),
3329  nptbins,ptmin,ptmax,90,0,4.5);
3330  fhECellWeightNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3331  fhECellWeightNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("Log. weight");
3332  outputContainer->Add(fhECellWeightNLM3TCardCorrelNCell[i][j][tm]);
3333  } // NLM histos
3334 
3335  if ( fStudyInvMass )
3336  {
3337  fhMassEClusTCardCorrelNCell[i][j][tm] = new TH2F
3338  (Form("hMassEClusTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3339  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()),
3340  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
3341  fhMassEClusTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3342  fhMassEClusTCardCorrelNCell[i][j][tm]->SetYTitle("#it{M}_{#gamma #gamma}");
3343  outputContainer->Add(fhMassEClusTCardCorrelNCell[i][j][tm]);
3344 
3345  // fhMassEPairTCardCorrelNCell[i][j][tm] = new TH2F
3346  // (Form("hMassEPairTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3347  // 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()),
3348  // nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
3349  // fhMassEPairTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{pair} (GeV)");
3350  // fhMassEPairTCardCorrelNCell[i][j][tm]->SetYTitle("#it{M}_{#gamma #gamma}");
3351  // outputContainer->Add(fhMassEPairTCardCorrelNCell[i][j][tm]);
3352  }
3353 
3354  fhTimeDiffTCardCorrelNCell[i][j][tm] = new TH2F
3355  (Form("hTimeDiffTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3356  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()),
3357  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
3358  fhTimeDiffTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3359  fhTimeDiffTCardCorrelNCell[i][j][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell}^{other}");
3360  outputContainer->Add(fhTimeDiffTCardCorrelNCell[i][j][tm]);
3361 
3362  fhColRowTCardCorrelNCellLowE[i][j][tm] = new TH2F
3363  (Form("hColRowTCardCorrelNCellLowE_Same%d_Diff%d%s",i,j,add[tm].Data()),
3364  Form("column vs row, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3365  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3366  fhColRowTCardCorrelNCellLowE[i][j][tm]->SetYTitle("row");
3367  fhColRowTCardCorrelNCellLowE[i][j][tm]->SetXTitle("column");
3368  outputContainer->Add(fhColRowTCardCorrelNCellLowE[i][j][tm]) ;
3369 
3370  fhColRowTCardCorrelNCellHighE[i][j][tm] = new TH2F
3371  (Form("hColRowTCardCorrelNCellHighE_Same%d_Diff%d%s",i,j,add[tm].Data()),
3372  Form("column vs row,N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3373  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3374  fhColRowTCardCorrelNCellHighE[i][j][tm]->SetYTitle("row");
3375  fhColRowTCardCorrelNCellHighE[i][j][tm]->SetXTitle("column");
3376  outputContainer->Add(fhColRowTCardCorrelNCellHighE[i][j][tm]) ;
3377 
3378  if(fStudyExotic)
3379  {
3380  fhExoticTCardCorrelNCell[i][j][tm] = new TH2F
3381  (Form("hExoticTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3382  Form("exoticity vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3383  nptbins,ptmin,ptmax,200,-1,1);
3384  fhExoticTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3385  fhExoticTCardCorrelNCell[i][j][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3386  outputContainer->Add(fhExoticTCardCorrelNCell[i][j][tm]);
3387 
3388  fhTimeDiffExoTCardCorrelNCell[i][j][tm] = new TH2F
3389  (Form("hTimeDiffExoTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3390  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()),
3391  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
3392  fhTimeDiffExoTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3393  fhTimeDiffExoTCardCorrelNCell[i][j][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell}^{other}");
3394  outputContainer->Add(fhTimeDiffExoTCardCorrelNCell[i][j][tm]);
3395 
3397  (Form("hColRowTCardCorrelNCellExoticLowE_Same%d_Diff%d%s",i,j,add[tm].Data()),
3398  Form("column vs row, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3399  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3400  fhColRowTCardCorrelNCellExoticLowE[i][j][tm]->SetYTitle("row");
3401  fhColRowTCardCorrelNCellExoticLowE[i][j][tm]->SetXTitle("column");
3402  outputContainer->Add(fhColRowTCardCorrelNCellExoticLowE[i][j][tm]) ;
3403 
3405  (Form("hColRowTCardCorrelNCellExoticHighE_Same%d_Diff%d%s",i,j,add[tm].Data()),
3406  Form("column vs row,N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3407  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3408  fhColRowTCardCorrelNCellExoticHighE[i][j][tm]->SetYTitle("row");
3409  fhColRowTCardCorrelNCellExoticHighE[i][j][tm]->SetXTitle("column");
3410  outputContainer->Add(fhColRowTCardCorrelNCellExoticHighE[i][j][tm]) ;
3411  }
3412  }
3413 
3416 
3417  // fhLambda0TCardCorrelN[i][tm] = new TH2F
3418  // (Form("hLambda0TCardCorrelN_Case%d%s",i,add[tm].Data()),
3419  // Form("#sigma^{2}_{long} vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
3420  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3421  // fhLambda0TCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
3422  // fhLambda0TCardCorrelN[i][tm]->SetYTitle("#sigma^{2}_{long}");
3423  // outputContainer->Add(fhLambda0TCardCorrelN[i][tm]);
3424  //
3425  // fhNCellsTCardCorrelN[i][tm] = new TH2F
3426  // (Form("hNCellsTCardCorrelN_Case%d%s",i,add[tm].Data()),
3427  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
3428  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3429  // fhNCellsTCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
3430  // fhNCellsTCardCorrelN[i][tm]->SetYTitle("#it{n}_{cells}");
3431  // outputContainer->Add(fhNCellsTCardCorrelN[i][tm]);
3432  //
3433  // fhExoticTCardCorrelN[i][tm] = new TH2F
3434  // (Form("hExoticTCardCorrelN_Case%d%s",i,add[tm].Data()),
3435  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
3436  // nptbins,ptmin,ptmax,200,-1,1);
3437  // fhExoticTCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
3438  // fhExoticTCardCorrelN[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3439  // outputContainer->Add(fhExoticTCardCorrelN[i][tm]);
3440  //
3441  // fhColRowTCardCorrelNLowE[i][tm] = new TH2F
3442  // (Form("hColRowTCardCorrelNLowE_Case%d%s",i,add[tm].Data()),
3443  // Form("column vs row, max E cell correl with TCard cell, E > 2 GeV, N corr = %d %s",i,add[tm].Data()),
3444  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3445  // fhColRowTCardCorrelNLowE[i][tm]->SetYTitle("row");
3446  // fhColRowTCardCorrelNLowE[i][tm]->SetXTitle("column");
3447  // outputContainer->Add(fhColRowTCardCorrelNLowE[i][tm]) ;
3448  //
3449  // fhColRowTCardCorrelNHighE[i][tm] = new TH2F
3450  // (Form("hColRowTCardCorrelNHighE_Case%d%s",i,add[tm].Data()),
3451  // Form("column vs row, max E cell correl with TCard cell, E > 8 GeV, N corr = %d %s",i,add[tm].Data()),
3452  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3453  // fhColRowTCardCorrelNHighE[i][tm]->SetYTitle("row");
3454  // fhColRowTCardCorrelNHighE[i][tm]->SetXTitle("column");
3455  // outputContainer->Add(fhColRowTCardCorrelNHighE[i][tm]) ;
3456  //
3457  // ////////
3458  // ////////
3459  //
3460  // fhLambda0TCardCorrelNExotic[i][tm] = new TH2F
3461  // (Form("hLambda0TCardCorrelN_Exotic_Case%d%s",i,add[tm].Data()),
3462  // Form("#sigma^{2}_{long} vs #it{E}, max E cell correl with TCard cell, exo > 0.97, N corr = %d %s",i,add[tm].Data()),
3463  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3464  // fhLambda0TCardCorrelNExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3465  // fhLambda0TCardCorrelNExotic[i][tm]->SetYTitle("#sigma^{2}_{long}");
3466  // outputContainer->Add(fhLambda0TCardCorrelNExotic[i][tm]);
3467  //
3468  // fhNCellsTCardCorrelNExotic[i][tm] = new TH2F
3469  // (Form("hNCellsTCardCorrelN_Exotic_Case%d%s",i,add[tm].Data()),
3470  // 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()),
3471  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3472  // fhNCellsTCardCorrelNExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3473  // fhNCellsTCardCorrelNExotic[i][tm]->SetYTitle("#it{n}_{cells}");
3474  // outputContainer->Add(fhNCellsTCardCorrelNExotic[i][tm]);
3475  //
3476  // fhColRowTCardCorrelNLowEExotic[i][tm] = new TH2F
3477  // (Form("hColRowTCardCorrelNLowEExotic_Case%d%s",i,add[tm].Data()),
3478  // 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()),
3479  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3480  // fhColRowTCardCorrelNLowEExotic[i][tm]->SetYTitle("row");
3481  // fhColRowTCardCorrelNLowEExotic[i][tm]->SetXTitle("column");
3482  // outputContainer->Add(fhColRowTCardCorrelNLowEExotic[i][tm]) ;
3483  //
3484  // fhColRowTCardCorrelNHighEExotic[i][tm] = new TH2F
3485  // (Form("hColRowTCardCorrelNHighEExotic_Case%d%s",i,add[tm].Data()),
3486  // 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()),
3487  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3488  // fhColRowTCardCorrelNHighEExotic[i][tm]->SetYTitle("row");
3489  // fhColRowTCardCorrelNHighEExotic[i][tm]->SetXTitle("column");
3490  // outputContainer->Add(fhColRowTCardCorrelNHighEExotic[i][tm]) ;
3491  //
3492  // ///////////
3493  // ///////////
3494  //
3495  // fhLambda0TCardCorrelNAllSameTCard[i][tm] = new TH2F
3496  // (Form("hLambda0TCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
3497  // Form("#sigma^{2}_{long} vs #it{E}, max E cell correl with TCard cell, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
3498  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3499  // fhLambda0TCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3500  // fhLambda0TCardCorrelNAllSameTCard[i][tm]->SetYTitle("#sigma^{2}_{long}");
3501  // outputContainer->Add(fhLambda0TCardCorrelNAllSameTCard[i][tm]);
3502  //
3503  // fhNCellsTCardCorrelNAllSameTCard[i][tm] = new TH2F
3504  // (Form("hNCellsTCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
3505  // 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()),
3506  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3507  // fhNCellsTCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3508  // fhNCellsTCardCorrelNAllSameTCard[i][tm]->SetYTitle("#it{n}_{cells}");
3509  // outputContainer->Add(fhNCellsTCardCorrelNAllSameTCard[i][tm]);
3510  //
3511  // fhExoticTCardCorrelNAllSameTCard[i][tm] = new TH2F
3512  // (Form("hExoticTCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
3513  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
3514  // nptbins,ptmin,ptmax,200,-1,1);
3515  // fhExoticTCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3516  // fhExoticTCardCorrelNAllSameTCard[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3517  // outputContainer->Add(fhExoticTCardCorrelNAllSameTCard[i][tm]);
3518  //
3519  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm] = new TH2F
3520  // (Form("hColRowTCardCorrelNAllSameTCardLowE_Case%d%s",i,add[tm].Data()),
3521  // 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()),
3522  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3523  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm]->SetYTitle("row");
3524  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm]->SetXTitle("column");
3525  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardLowE[i][tm]) ;
3526  //
3527  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm] = new TH2F
3528  // (Form("hColRowTCardCorrelNAllSameTCardHighE_Case%d%s",i,add[tm].Data()),
3529  // 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()),
3530  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3531  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm]->SetYTitle("row");
3532  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm]->SetXTitle("column");
3533  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardHighE[i][tm]) ;
3534  //
3535  // ////////
3536  //
3537  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm] = new TH2F
3538  // (Form("hLambda0TCardCorrelNAllSameTCard_Exotic_Case%d%s",i,add[tm].Data()),
3539  // Form("#sigma^{2}_{long} 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()),
3540  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3541  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3542  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]->SetYTitle("#sigma^{2}_{long}");
3543  // outputContainer->Add(fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]);
3544  //
3545  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm] = new TH2F
3546  // (Form("hNCellsTCardCorrelNAllSameTCard_Exotic_Case%d%s",i,add[tm].Data()),
3547  // 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()),
3548  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3549  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3550  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]->SetYTitle("#it{n}_{cells}");
3551  // outputContainer->Add(fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]);
3552  //
3553  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm] = new TH2F
3554  // (Form("hColRowTCardCorrelNAllSameTCardLowEExotic_Case%d%s",i,add[tm].Data()),
3555  // 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()),
3556  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3557  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]->SetYTitle("row");
3558  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]->SetXTitle("column");
3559  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]) ;
3560  //
3561  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm] = new TH2F
3562  // (Form("hColRowTCardCorrelNAllSameTCardHighEExotic_Case%d%s",i,add[tm].Data()),
3563  // 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()),
3564  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3565  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]->SetYTitle("row");
3566  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]->SetXTitle("column");
3567  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]) ;
3568  }
3569 
3570  // for(Int_t i = 0; i < 7; i++)
3571  // {
3572  // fhLambda0TCardCorrel[i][tm] = new TH2F
3573  // (Form("hLambda0TCardCorrel_Case%d%s",i,add[tm].Data()),
3574  // Form("#sigma^{2}_{long} vs #it{E}, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
3575  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3576  // fhLambda0TCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
3577  // fhLambda0TCardCorrel[i][tm]->SetYTitle("#sigma^{2}_{long}");
3578  // outputContainer->Add(fhLambda0TCardCorrel[i][tm]);
3579  //
3580  // fhNCellsTCardCorrel[i][tm] = new TH2F
3581  // (Form("hNCellsTCardCorrel_Case%d%s",i,add[tm].Data()),
3582  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
3583  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3584  // fhNCellsTCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
3585  // fhNCellsTCardCorrel[i][tm]->SetYTitle("#it{n}_{cells}");
3586  // outputContainer->Add(fhNCellsTCardCorrel[i][tm]);
3587  //
3588  // fhExoticTCardCorrel[i][tm] = new TH2F
3589  // (Form("hExoticTCardCorrel_Case%d%s",i,add[tm].Data()),
3590  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
3591  // nptbins,ptmin,ptmax,200,-1,1);
3592  // fhExoticTCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
3593  // fhExoticTCardCorrel[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3594  // outputContainer->Add(fhExoticTCardCorrel[i][tm]);
3595  // }
3596  //
3597  // for(Int_t i = 0; i < 4; i++)
3598  // {
3599  // fhLambda0TCardCorrelExotic[i][tm] = new TH2F
3600  // (Form("hLambda0TCardCorrel_Exotic_Case%d%s",i,add[tm].Data()),
3601  // Form("#sigma^{2}_{long} vs #it{E}, max E cell correl with TCard cell, exo>0.97, case %d %s",i,add[tm].Data()),
3602  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3603  // fhLambda0TCardCorrelExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3604  // fhLambda0TCardCorrelExotic[i][tm]->SetYTitle("#sigma^{2}_{long}");
3605  // outputContainer->Add(fhLambda0TCardCorrelExotic[i][tm]);
3606  //
3607  // fhNCellsTCardCorrelExotic[i][tm] = new TH2F
3608  // (Form("hNCellsTCardCorrel_Exotic_Case%d%s",i,add[tm].Data()),
3609  // 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()),
3610  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3611  // fhNCellsTCardCorrelExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3612  // fhNCellsTCardCorrelExotic[i][tm]->SetYTitle("#it{n}_{cells}");
3613  // outputContainer->Add(fhNCellsTCardCorrelExotic[i][tm]);
3614  // }
3615 
3616 
3617  for(Int_t i = 0; i < fNEBinCuts; i++)
3618  {
3619  if(fStudyExotic)
3620  {
3621  fhLambda0Exoticity[i][tm] = new TH2F
3622  (Form("hLambda0Exoticity_EBin%d%s",i,add[tm].Data()),
3623  Form("#sigma^{2}_{long} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3624  200,-1,1,ssbins,ssmin,ssmax);
3625  fhLambda0Exoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3626  fhLambda0Exoticity[i][tm]->SetYTitle("#sigma^{2}_{long}");
3627  outputContainer->Add(fhLambda0Exoticity[i][tm]);
3628 
3629  fhLambda1Exoticity[i][tm] = new TH2F
3630  (Form("hLambda1Exoticity_EBin%d%s",i,add[tm].Data()),
3631  Form("#sigma^{2}_{short} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3632  200,-1,1,ssbins,ssmin,ssmax);
3633  fhLambda1Exoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3634  fhLambda1Exoticity[i][tm]->SetYTitle("#sigma^{2}_{short}");
3635  outputContainer->Add(fhLambda1Exoticity[i][tm]);
3636 
3637  // fhLambdaRExoticity[i][tm] = new TH2F
3638  // (Form("hLambdaRExoticity_EBin%d%s",i,add[tm].Data()),
3639  // Form("#sigma^{2}_{short}/#sigma^{2}_{long} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3640  // 200,-1,1,110,0,1.1);
3641  // fhLambdaRExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3642  // fhLambdaRExoticity[i][tm]->SetYTitle("#sigma^{2}_{short}/#sigma^{2}_{long}");
3643  // outputContainer->Add(fhLambdaRExoticity[i][tm]);
3644 
3645  fhNCellsExoticity[i][tm] = new TH2F
3646  (Form("hNCellsExoticity_EBin%d%s",i,add[tm].Data()),
3647  Form("#it{n}_{cells} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3648  200,-1,1,nceclbins,nceclmin,nceclmax);
3649  fhNCellsExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3650  fhNCellsExoticity[i][tm]->SetYTitle("#it{n}_{cells}");
3651  outputContainer->Add(fhNCellsExoticity[i][tm]);
3652 
3653  fhTimeExoticity[i][tm] = new TH2F
3654  (Form("hTimeExoticity_EBin%d%s",i,add[tm].Data()),
3655  Form("#it{t} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3656  200,-1,1,100,-25,25);
3657  fhTimeExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3658  fhTimeExoticity[i][tm]->SetYTitle("#it{t} (ns)");
3659  outputContainer->Add(fhTimeExoticity[i][tm]);
3660 
3661  fhNCellsTCardSameAndDiffExotic[i][tm] = new TH2F
3662  (Form("hNCellsTCardSameAndDiff_Exotic_EBin%d%s",i,add[tm].Data()),
3663  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()),
3664  nceclbins,nceclmin,nceclmax,nceclbins,nceclmin,nceclmax);
3665  fhNCellsTCardSameAndDiffExotic[i][tm]->SetXTitle("#it{n}_{cells} - diff TCard");
3666  fhNCellsTCardSameAndDiffExotic[i][tm]->SetYTitle("#it{n}_{cells} - same TCard");
3667  outputContainer->Add(fhNCellsTCardSameAndDiffExotic[i][tm]);
3668 
3669  // fhLambda0ExoticityAllSameTCard[i][tm] = new TH2F
3670  // (Form("hLambda0ExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
3671  // Form("#sigma^{2}_{long} 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()),
3672  // 200,-1,1,ssbins,ssmin,ssmax);
3673  // fhLambda0ExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3674  // fhLambda0ExoticityAllSameTCard[i][tm]->SetYTitle("#sigma^{2}_{long}");
3675  // outputContainer->Add(fhLambda0ExoticityAllSameTCard[i][tm]);
3676  //
3677  // fhLambda1ExoticityAllSameTCard[i][tm] = new TH2F
3678  // (Form("hLambda1ExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
3679  // Form("#sigma^{2}_{short} 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()),
3680  // 200,-1,1,ssbins,ssmin,ssmax);
3681  // fhLambda1ExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3682  // fhLambda1ExoticityAllSameTCard[i][tm]->SetYTitle("#sigma^{2}_{short}");
3683  // outputContainer->Add(fhLambda1ExoticityAllSameTCard[i][tm]);
3684  //
3685  // fhLambdaRExoticityAllSameTCard[i][tm] = new TH2F
3686  // (Form("hLambdaRExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
3687  // Form("#sigma^{2}_{short}/#sigma^{2}_{long} 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()),
3688  // 200,-1,1,110,0,1.1);
3689  // fhLambdaRExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3690  // fhLambdaRExoticityAllSameTCard[i][tm]->SetYTitle("#sigma^{2}_{short}/#sigma^{2}_{long}");
3691  // outputContainer->Add(fhLambdaRExoticityAllSameTCard[i][tm]);
3692  //
3693  // fhNCellsExoticityAllSameTCard[i][tm] = new TH2F
3694  // (Form("hNCellsExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
3695  // 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()),
3696  // 200,-1,1,nceclbins,nceclmin,nceclmax);
3697  // fhNCellsExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3698  // fhNCellsExoticityAllSameTCard[i][tm]->SetYTitle("#it{n}_{cells}");
3699  // outputContainer->Add(fhNCellsExoticityAllSameTCard[i][tm]);
3700  //
3701  }
3702 
3703  fhNCellsTCardSameAndDiff[i][tm] = new TH2F
3704  (Form("hNCellsTCardSameAndDiff_EBin%d%s",i,add[tm].Data()),
3705  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()),
3706  nceclbins,nceclmin,nceclmax,nceclbins,nceclmin,nceclmax);
3707  fhNCellsTCardSameAndDiff[i][tm]->SetXTitle("#it{n}_{cells} - diff TCard");
3708  fhNCellsTCardSameAndDiff[i][tm]->SetYTitle("#it{n}_{cells} - same TCard");
3709  outputContainer->Add(fhNCellsTCardSameAndDiff[i][tm]);
3710 
3711  fhLambda0Lambda1[i][tm] = new TH2F
3712  (Form("hLambda0Lambda1_EBin%d%s",i,add[tm].Data()),
3713  Form("#sigma^{2}_{long} vs #sigma^{2}_{short}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3714  ssbins,ssmin,ssmax,ssbins,ssmin,ssmax);
3715  fhLambda0Lambda1[i][tm]->SetXTitle("#sigma^{2}_{short}");
3716  fhLambda0Lambda1[i][tm]->SetYTitle("#sigma^{2}_{long}");
3717  outputContainer->Add(fhLambda0Lambda1[i][tm]);
3718 
3719  // fhLambda0Lambda1AllSameTCard[i][tm] = new TH2F
3720  // (Form("hLambda0Lambda1AllSameTCard_EBin%d%s",i,add[tm].Data()),
3721  // Form("#sigma^{2}_{long} vs #sigma^{2}_{short}, , all cells same TCard as leading, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3722  // ssbins,ssmin,ssmax,ssbins,ssmin,ssmax);
3723  // fhLambda0Lambda1AllSameTCard[i][tm]->SetXTitle("#sigma^{2}_{short}");
3724  // fhLambda0Lambda1AllSameTCard[i][tm]->SetYTitle("#sigma^{2}_{long}");
3725  // outputContainer->Add(fhLambda0Lambda1AllSameTCard[i][tm]);
3726  }
3727 
3728  if(fStudyExotic)
3729  {
3730  for(Int_t j = 0; j < 6; j++)
3731  {
3732  for(Int_t k = 0; k < 6; k++)
3733  {
3734  fhLambda0ExoticityPerNCell[j][k][tm] = new TH2F
3735  (Form("hLambda0Exoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
3736  Form("#sigma^{2}_{long} vs #it{exoticity}, #it{n}_{cell} TCard same = %d, diff =%d, #it{E}>8 GeV %s",j,k,add[tm].Data()),
3737  200,-1,1,ssbins,ssmin,ssmax);
3738  fhLambda0ExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3739  fhLambda0ExoticityPerNCell[j][k][tm]->SetYTitle("#sigma^{2}_{long}");
3740  outputContainer->Add(fhLambda0ExoticityPerNCell[j][k][tm]);
3741 
3742  fhLambda1ExoticityPerNCell[j][k][tm] = new TH2F
3743  (Form("hLambda1Exoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
3744  Form("#sigma^{2}_{short} vs #it{exoticity}, #it{n}_{cell} TCard same = %d, diff =%d, #it{E}>8 GeV %s",j,k,add[tm].Data()),
3745  200,-1,1,ssbins,ssmin,ssmax);
3746  fhLambda1ExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3747  fhLambda1ExoticityPerNCell[j][k][tm]->SetYTitle("#sigma^{2}_{short}");
3748  outputContainer->Add(fhLambda1ExoticityPerNCell[j][k][tm]);
3749 
3750  // fhLambdaRExoticityPerNCell[j][k][tm] = new TH2F
3751  // (Form("hLambdaRExoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
3752  // Form("#sigma^{2}_{short}/#sigma^{2}_{long} vs #it{exoticity}, #it{n}_{cell} TCard same = %d, diff =%d, #it{E}>8 GeV %s",j,k,add[tm].Data()),
3753  // 200,-1,1,110,0,1.1);
3754  // fhLambdaRExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3755  // fhLambdaRExoticityPerNCell[j][k][tm]->SetYTitle("#sigma^{2}_{short}/#sigma^{2}_{long}");
3756  // outputContainer->Add(fhLambdaRExoticityPerNCell[j][k][tm]);
3757  }
3758  }
3759  }
3760 
3761  // for(Int_t i = 0; i < 6; i++)
3762  // {
3763  // fhLambda0TCardCorrelNearRow[i][tm] = new TH2F
3764  // (Form("hLambda0TCardCorrelNearRow_Case%d%s",i,add[tm].Data()),
3765  // Form("#sigma^{2}_{long} vs #it{E}, max E cell correl with TCard cell, one TCard cell is 1 row away, case %d %s",i,add[tm].Data()),
3766  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3767  // fhLambda0TCardCorrelNearRow[i][tm]->SetXTitle("#it{E} (GeV)");
3768  // fhLambda0TCardCorrelNearRow[i][tm]->SetYTitle("#sigma^{2}_{long}");
3769  // outputContainer->Add(fhLambda0TCardCorrelNearRow[i][tm]);
3770  //
3771  // fhNCellsTCardCorrelNearRow[i][tm] = new TH2F
3772  // (Form("hNCellsTCardCorrelNearRow_Case%d%s",i,add[tm].Data()),
3773  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
3774  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3775  // fhNCellsTCardCorrelNearRow[i][tm]->SetXTitle("#it{E} (GeV)");
3776  // fhNCellsTCardCorrelNearRow[i][tm]->SetYTitle("#it{n}_{cells}");
3777  // outputContainer->Add(fhNCellsTCardCorrelNearRow[i][tm]);
3778  // }
3779  //
3780  // for(Int_t i = 0; i < 4; i++)
3781  // {
3782  // fhLambda0TCardCorrel2ndMax[i][tm] = new TH2F
3783  // (Form("hLambda0TCardCorrel2ndMax_Case%d%s",i,add[tm].Data()),
3784  // Form("#sigma^{2}_{long} vs #it{E}, max E cell correl with 2nd max TCard cell, case %d %s",i,add[tm].Data()),
3785  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3786  // fhLambda0TCardCorrel2ndMax[i][tm]->SetXTitle("#it{E} (GeV)");
3787  // fhLambda0TCardCorrel2ndMax[i][tm]->SetYTitle("#sigma^{2}_{long}");
3788  // outputContainer->Add(fhLambda0TCardCorrel2ndMax[i][tm]);
3789  //
3790  // fhNCellsTCardCorrel2ndMax[i][tm] = new TH2F
3791  // (Form("hNCellsTCardCorrel2ndMax_Case%d%s",i,add[tm].Data()),
3792  // 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()),
3793  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3794  // fhNCellsTCardCorrel2ndMax[i][tm]->SetXTitle("#it{E} (GeV)");
3795  // fhNCellsTCardCorrel2ndMax[i][tm]->SetYTitle("#it{n}_{cells}");
3796  // outputContainer->Add(fhNCellsTCardCorrel2ndMax[i][tm]);
3797  // }
3798  //
3799  // for(Int_t i = 0; i < 7; i++)
3800  // {
3801  // fhLambda0TCardCorrelOtherTCard[i][tm] = new TH2F
3802  // (Form("hLambda0TCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
3803  // Form("#sigma^{2}_{long} vs #it{E}, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
3804  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3805  // fhLambda0TCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3806  // fhLambda0TCardCorrelOtherTCard[i][tm]->SetYTitle("#sigma^{2}_{long}");
3807  // outputContainer->Add(fhLambda0TCardCorrelOtherTCard[i][tm]);
3808  //
3809  // fhNCellsTCardCorrelOtherTCard[i][tm] = new TH2F
3810  // (Form("hNCellsTCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
3811  // Form("custer # cells vs #it{E}, w > 0.01, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
3812  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3813  // fhNCellsTCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3814  // fhNCellsTCardCorrelOtherTCard[i][tm]->SetYTitle("#it{n}_{cells}");
3815  // outputContainer->Add(fhNCellsTCardCorrelOtherTCard[i][tm]);
3816  //
3817  // fhExoticTCardCorrelOtherTCard[i][tm] = new TH2F
3818  // (Form("hExoticTCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
3819  // Form("exoticity vs #it{E}, w > 0.01, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
3820  // nptbins,ptmin,ptmax,200,-1,1);
3821  // fhExoticTCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3822  // fhExoticTCardCorrelOtherTCard[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3823  // outputContainer->Add(fhExoticTCardCorrelOtherTCard[i][tm]);
3824  //
3825  // fhColRowTCardCorrelOtherTCardLowE[i][tm] = new TH2F
3826  // (Form("hColRowTCardCorrelOtherTCardLowE_Case%d%s",i,add[tm].Data()),
3827  // Form("column vs row for different 2 TCard correlation cases, E > 2 GeV, case %d %s",i,add[tm].Data()),
3828  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3829  // fhColRowTCardCorrelOtherTCardLowE[i][tm]->SetYTitle("row");
3830  // fhColRowTCardCorrelOtherTCardLowE[i][tm]->SetXTitle("column");
3831  // outputContainer->Add(fhColRowTCardCorrelOtherTCardLowE[i][tm]) ;
3832  //
3833  // fhColRowTCardCorrelOtherTCardHighE[i][tm] = new TH2F
3834  // (Form("hColRowTCardCorrelOtherTCardHighE_Case%d%s",i,add[tm].Data()),
3835  // Form("column vs row for different 2 TCard correlation cases, E > 8 GeV, case %d %s",i,add[tm].Data()),
3836  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3837  // fhColRowTCardCorrelOtherTCardHighE[i][tm]->SetYTitle("row");
3838  // fhColRowTCardCorrelOtherTCardHighE[i][tm]->SetXTitle("column");
3839  // outputContainer->Add(fhColRowTCardCorrelOtherTCardHighE[i][tm]) ;
3840  // }
3841 
3842  for(Int_t i = 0; i < 12; i++)
3843  {
3844  fhTCardCorrECellMaxDiff[i][tm] = new TH2F
3845  (Form("hTCardCorrECellMaxDiff_Case%d%s",i,add[tm].Data()),
3846  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()),
3847  nptbins,ptmin,ptmax,210,-1,20);
3848  fhTCardCorrECellMaxDiff[i][tm]->SetXTitle("#it{E} (GeV)");
3849  fhTCardCorrECellMaxDiff[i][tm]->SetYTitle("#it{E}_{cell}^{max}-#it{E}_{cell} (GeV)");
3850  outputContainer->Add(fhTCardCorrECellMaxDiff[i][tm]);
3851 
3852  fhTCardCorrEClusterDiff[i][tm] = new TH2F
3853  (Form("hTCardCorrEClusterDiff_Case%d%s",i,add[tm].Data()),
3854  Form("#it{E}_{cluster}-#it{E}_{cell} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
3855  nptbins,ptmin,ptmax,210,-1,20);
3856  fhTCardCorrEClusterDiff[i][tm]->SetXTitle("#it{E} (GeV)");
3857  fhTCardCorrEClusterDiff[i][tm]->SetYTitle("#it{E}_{cluster}-#it{E}_{cell} (GeV)");
3858  outputContainer->Add(fhTCardCorrEClusterDiff[i][tm]);
3859 
3860  // fhTCardCorrECellMaxRat[i][tm] = new TH2F
3861  // (Form("hTCardCorrECellMaxRat_Case%d%s",i,add[tm].Data()),
3862  // 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()),
3863  // nptbins,ptmin,ptmax,110,0,1.1);
3864  // fhTCardCorrECellMaxRat[i][tm]->SetXTitle("#it{E} (GeV)");
3865  // fhTCardCorrECellMaxRat[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}^{max}_{cell}");
3866  // outputContainer->Add(fhTCardCorrECellMaxRat[i][tm]);
3867  //
3868  // fhTCardCorrEClusterRat[i][tm] = new TH2F
3869  // (Form("hTCardCorrEClusterRat_Case%d%s",i,add[tm].Data()),
3870  // Form("#it{E}_{cell}/#it{E}_{cluster} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
3871  // nptbins,ptmin,ptmax,110,0,1.1);
3872  // fhTCardCorrEClusterRat[i][tm]->SetXTitle("#it{E} (GeV)");
3873  // fhTCardCorrEClusterRat[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3874  // outputContainer->Add(fhTCardCorrEClusterRat[i][tm]);
3875 
3876  fhTCardCorrTCellMaxDiff[i][tm] = new TH2F
3877  (Form("hTCardCorrTCellMaxDiff_Case%d%s",i,add[tm].Data()),
3878  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()),
3879  nptbins,ptmin,ptmax,1000,-100,100);
3880  fhTCardCorrTCellMaxDiff[i][tm]->SetXTitle("#it{E} (GeV)");
3881  fhTCardCorrTCellMaxDiff[i][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell} (ns)");
3882  outputContainer->Add(fhTCardCorrTCellMaxDiff[i][tm]);
3883 
3884  if(fStudyExotic)
3885  {
3886  fhTCardCorrECellMaxDiffExo[i][tm] = new TH2F
3887  (Form("hTCardCorrECellMaxDiffExo_Case%d%s",i,add[tm].Data()),
3888  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()),
3889  nptbins,ptmin,ptmax,210,-1,20);
3890  fhTCardCorrECellMaxDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
3891  fhTCardCorrECellMaxDiffExo[i][tm]->SetYTitle("#it{E}_{cell}^{max}-#it{E}_{cell} (GeV)");
3892  outputContainer->Add(fhTCardCorrECellMaxDiffExo[i][tm]);
3893 
3894  fhTCardCorrEClusterDiffExo[i][tm] = new TH2F
3895  (Form("hTCardCorrEClusterDiffExo_Case%d%s",i,add[tm].Data()),
3896  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()),
3897  nptbins,ptmin,ptmax,210,-1,20);
3898  fhTCardCorrEClusterDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
3899  fhTCardCorrEClusterDiffExo[i][tm]->SetYTitle("#it{E}_{cluster}-#it{E}_{cell} (GeV)");
3900  outputContainer->Add(fhTCardCorrEClusterDiffExo[i][tm]);
3901 
3902  // fhTCardCorrECellMaxRatExo[i][tm] = new TH2F
3903  // (Form("hTCardCorrECellMaxRatExo_Case%d%s",i,add[tm].Data()),
3904  // 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()),
3905  // nptbins,ptmin,ptmax,110,0,1.1);
3906  // fhTCardCorrECellMaxRatExo[i][tm]->SetXTitle("#it{E} (GeV)");
3907  // fhTCardCorrECellMaxRatExo[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}^{max}_{cell}");
3908  // outputContainer->Add(fhTCardCorrECellMaxRatExo[i][tm]);
3909  //
3910  // fhTCardCorrEClusterRatExo[i][tm] = new TH2F
3911  // (Form("hTCardCorrEClusterRatExo_Case%d%s",i,add[tm].Data()),
3912  // 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()),
3913  // nptbins,ptmin,ptmax,110,0,1.1);
3914  // fhTCardCorrEClusterRatExo[i][tm]->SetXTitle("#it{E} (GeV)");
3915  // fhTCardCorrEClusterRatExo[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3916  // outputContainer->Add(fhTCardCorrEClusterRatExo[i][tm]);
3917 
3918  fhTCardCorrTCellMaxDiffExo[i][tm] = new TH2F
3919  (Form("hTCardCorrTCellMaxDiffExo_Case%d%s",i,add[tm].Data()),
3920  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()),
3921  nptbins,ptmin,ptmax,1000,-100,100);
3922  fhTCardCorrTCellMaxDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
3923  fhTCardCorrTCellMaxDiffExo[i][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell} (ns)");
3924  outputContainer->Add(fhTCardCorrTCellMaxDiffExo[i][tm]);
3925  }
3926  }
3927  } // neutral or charged
3928 
3929  if(fStudyExotic)
3930  {
3931  fhEnergyTMEtaResidual1Cell = new TH2F("hEnergyTMEtaResidual1Cell","#Delta #eta_{cluster-track} vs #it{E}, n cell = 1",
3932  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3933  fhEnergyTMEtaResidual1Cell->SetXTitle("#it{E} (GeV)");
3934  fhEnergyTMEtaResidual1Cell->SetYTitle("#Delta #eta_{cluster-track}");
3935  outputContainer->Add(fhEnergyTMEtaResidual1Cell);
3936 
3937  fhEnergyTMPhiResidual1Cell = new TH2F("hEnergyTMPhiResidual1Cell","#Delta #varphi_{cluster-track} vs #it{E}, n cell = 1",
3938  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3939  fhEnergyTMPhiResidual1Cell->SetXTitle("#it{E} (GeV)");
3940  fhEnergyTMPhiResidual1Cell->SetYTitle("#Delta #varphi_{cluster-track}");
3941  outputContainer->Add(fhEnergyTMPhiResidual1Cell);
3942 
3943  fhEnergyTMEtaResidualExotic = new TH2F("hEnergyTMEtaResidualExotic","#Delta #eta_{cluster-track} vs #it{E}, exo > 0.97",
3944  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3945  fhEnergyTMEtaResidualExotic->SetXTitle("#it{E} (GeV)");
3946  fhEnergyTMEtaResidualExotic->SetYTitle("#Delta #eta_{cluster-track}");
3947  outputContainer->Add(fhEnergyTMEtaResidualExotic);
3948 
3949  fhEnergyTMPhiResidualExotic = new TH2F("hEnergyTMPhiResidualExotic","#Delta #varphi_{cluster-track} vs #it{E}, exo > 0.97",
3950  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3951  fhEnergyTMPhiResidualExotic->SetXTitle("#it{E} (GeV)");
3952  fhEnergyTMPhiResidualExotic->SetYTitle("#Delta #varphi_{cluster-track}");
3953  outputContainer->Add(fhEnergyTMPhiResidualExotic);
3954 
3955  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell = new TH2F("hEnergyTMEtaResidualTCardCorrNoSelection1Cell","#Delta #eta_{cluster-track} vs #it{E}, n cell = 1",
3956  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3957  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell->SetXTitle("#it{E} (GeV)");
3958  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell->SetYTitle("#Delta #eta_{cluster-track}");
3959  outputContainer->Add(fhEnergyTMEtaResidualTCardCorrNoSelection1Cell);
3960 
3961  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell = new TH2F("hEnergyTMPhiResidualTCardCorrNoSelection1Cell","#Delta #varphi_{cluster-track} vs #it{E}, n cell = 1",
3962  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3963  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell->SetXTitle("#it{E} (GeV)");
3964  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell->SetYTitle("#Delta #varphi_{cluster-track}");
3965  outputContainer->Add(fhEnergyTMPhiResidualTCardCorrNoSelection1Cell);
3966 
3967  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic = new TH2F("hEnergyTMEtaResidualTCardCorrNoSelectionExotic","#Delta #eta_{cluster-track} vs #it{E}, exo > 0.97",
3968  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3969  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic->SetXTitle("#it{E} (GeV)");
3970  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic->SetYTitle("#Delta #eta_{cluster-track}");
3971  outputContainer->Add(fhEnergyTMEtaResidualTCardCorrNoSelectionExotic);
3972 
3973  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic = new TH2F("hEnergyTMPhiResidualTCardCorrNoSelectionExotic","#Delta #varphi_{cluster-track} vs #it{E}, exo > 0.97",
3974  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3975  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic->SetXTitle("#it{E} (GeV)");
3976  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic->SetYTitle("#Delta #varphi_{cluster-track}");
3977  outputContainer->Add(fhEnergyTMPhiResidualTCardCorrNoSelectionExotic);
3978 
3979  for(Int_t i = 0; i < fNEBinCuts; i++)
3980  {
3981  fhTMPhiResidualExoticity[i] = new TH2F
3982  (Form("hTMPhiResidual_EBin%d",i),
3983  Form("#Delta #varphi_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
3984  200,-1,1,nresphibins,resphimin,resphimax);
3985  fhTMPhiResidualExoticity[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3986  fhTMPhiResidualExoticity[i]->SetYTitle("#Delta #varphi_{cluster-track}");
3987  outputContainer->Add(fhTMPhiResidualExoticity[i]);
3988 
3989  fhTMEtaResidualExoticity[i] = new TH2F
3990  (Form("hTMEtaResidual_EBin%d",i),
3991  Form("#Delta #eta_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
3992  200,-1,1,nresetabins,resetamin,resetamax);
3993  fhTMEtaResidualExoticity[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3994  fhTMEtaResidualExoticity[i]->SetYTitle("#Delta #eta_{cluster-track}");
3995  outputContainer->Add(fhTMEtaResidualExoticity[i]);
3996 
3998  (Form("hTMPhiResidual_LooseCut_EBin%d",i),
3999  Form("#Delta #varphi_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
4000  200,-1,1,nresphibins,resphimin,resphimax);
4001  fhTMPhiResidualExoticityLooseCut[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4002  fhTMPhiResidualExoticityLooseCut[i]->SetYTitle("#Delta #varphi_{cluster-track}");
4003  outputContainer->Add(fhTMPhiResidualExoticityLooseCut[i]);
4004 
4006  (Form("hTMEtaResidual_LooseCut_EBin%d",i),
4007  Form("#Delta #eta_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
4008  200,-1,1,nresetabins,resetamin,resetamax);
4009  fhTMEtaResidualExoticityLooseCut[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4010  fhTMEtaResidualExoticityLooseCut[i]->SetYTitle("#Delta #eta_{cluster-track}");
4011  outputContainer->Add(fhTMEtaResidualExoticityLooseCut[i]);
4012 
4013  // fhTMPhiResidualExoticityAllSameTCard[i] = new TH2F
4014  // (Form("hTMPhiResidualAllSameTCard_EBin%d",i),
4015  // Form("#Delta #varphi_{cluster-track} vs #it{exoticity}, all cells same TCard as leading, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
4016  // 200,-1,1,nresphibins,resphimin,resphimax);
4017  // fhTMPhiResidualExoticityAllSameTCard[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4018  // fhTMPhiResidualExoticityAllSameTCard[i]->SetYTitle("#Delta #varphi_{cluster-track}");
4019  // outputContainer->Add(fhTMPhiResidualExoticityAllSameTCard[i]);
4020  //
4021  // fhTMEtaResidualExoticityAllSameTCard[i] = new TH2F
4022  // (Form("hTMEtaResidualAllSameTCard_EBin%d",i),
4023  // Form("#Delta #eta_{cluster-track} vs #it{exoticity}, all cells same TCard as leading, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
4024  // 200,-1,1,nresetabins,resetamin,resetamax);
4025  // fhTMEtaResidualExoticityAllSameTCard[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
4026  // fhTMEtaResidualExoticityAllSameTCard[i]->SetYTitle("#Delta #eta_{cluster-track}");
4027  // outputContainer->Add(fhTMEtaResidualExoticityAllSameTCard[i]);
4028  }
4029  }
4030  } // TCard correlation studies
4031 
4032  // Cluster size in terms of cells and shape TH3
4033  if(fStudyShape)
4034  {
4035  fhColRowM02 = new TH3F
4036  (Form("hColRowM02"),
4037  Form("column vs row vs M02, %2.2f < #it{E} < %2.2f GeV for Neutral",fEMinShape,fEMaxShape),
4038  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax,40,0.,2.);
4039  fhColRowM02->SetYTitle("row");
4040  fhColRowM02->SetXTitle("column");
4041  fhColRowM02->SetZTitle("#sigma^{2}_{long}");
4042  outputContainer->Add(fhColRowM02) ;
4043 
4045  (Form("hColRowM02NCellCut"),
4046  Form("column vs row vs M02, %2.2f<#it{E}<%2.2f GeV #it{n}_{cells}^{w>0.01} > %d for Neutral",
4048  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax,40,0.,2.);
4049  fhColRowM02NCellCut->SetYTitle("row");
4050  fhColRowM02NCellCut->SetXTitle("column");
4051  fhColRowM02NCellCut->SetZTitle("#sigma^{2}_{long}");
4052  outputContainer->Add(fhColRowM02NCellCut) ;
4053 
4054  if ( fStudyInvMass )
4055  {
4056  fhInvMassNCellSM = new TH3F
4057  ("hInvMassNCellSM",
4058  Form("%2.2f<#it{E}_{1}<%2.2f GeV, %2.2f<#it{E}_{2}<%2.2f GeV, %2.2f<#sigma^{2}_{long}<%2.2f"
4059  "#it{M}_{#gamma #gamma} vs #it{n}_{1, cells}^{w>0.01} vs SM number trig cluster",
4061  nmassbins,massmin,massmax,cellBins,cellMin,cellMax,fNModules,-0.5,fNModules-0.5);
4062  fhInvMassNCellSM->SetZTitle("SM number");
4063  fhInvMassNCellSM->SetYTitle("#it{n}_{cells}^{w>0.01}");
4064  fhInvMassNCellSM->SetXTitle("#it{M}_{#gamma #gamma}");
4065  outputContainer->Add(fhInvMassNCellSM);
4066 
4067  fhInvMassNCellSMSame = new TH3F
4068  ("hInvMassNCellSMSame",
4069  Form("%2.2f<#it{E}_{1}<%2.2f GeV, %2.2f<#it{E}_{2}<%2.2f GeV, %2.2f<#sigma^{2}_{long}<%2.2f"
4070  "#it{M}_{#gamma #gamma} vs #it{n}_{1, cells}^{w>0.01} vs SM number both cluster",
4072  nmassbins,massmin,massmax,cellBins,cellMin,cellMax,fNModules,-0.5,fNModules-0.5);
4073  fhInvMassNCellSMSame->SetZTitle("SM number");
4074  fhInvMassNCellSMSame->SetYTitle("#it{n}_{cells}^{w>0.01}");
4075  fhInvMassNCellSMSame->SetXTitle("#it{M}_{#gamma #gamma}");
4076  outputContainer->Add(fhInvMassNCellSMSame);
4077  }
4078 
4079  //
4080 
4081  if ( fStudyTimeCellHisto )
4082  {
4083  fhEMaxCellTimeM02SM = new TH3F
4084  ("hEMaxCellTimeM02SM",
4085  Form("time vs #sigma^{2}_{long} vs SM number, "
4086  "%2.2f<#it{E}<%2.2f GeV, #it{n}_{cells}^{w>0.01}>%d",fEMinShape,fEMaxShape,fNCellMinShape),
4087  45,-25.5,20.5, fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4088  fhEMaxCellTimeM02SM->SetZTitle("#sigma^{2}_{long}");
4089  fhEMaxCellTimeM02SM->SetYTitle("SM number");
4090  fhEMaxCellTimeM02SM->SetXTitle("time (ns)");
4091  outputContainer->Add(fhEMaxCellTimeM02SM);
4092 
4094  ("hEMaxCellTimeNCellSM",
4095  Form("time vs #it{n}_{cells}^{w>0.01} vs SM number, "
4096  "%2.2f<#it{E}<%2.2f GeV, %2.2f<#it{sigma}_{long}<%2.2f",fEMinShape,fEMaxShape,fM02LowBin[0],fM02LowBin[1]),
4097  45,-25.5,20.5, fNModules,-0.5,fNModules-0.5,cellBins,cellMin,cellMax);
4098  fhEMaxCellTimeNCellSM->SetZTitle("#it{n}_{cells}^{w>0.01}");
4099  fhEMaxCellTimeNCellSM->SetYTitle("SM number");
4100  fhEMaxCellTimeNCellSM->SetXTitle("time (ns)");
4101  outputContainer->Add(fhEMaxCellTimeNCellSM);
4102 
4104  ("hESecCellTimeNCellSM",
4105  Form("secondary cell time vs #it{n}_{cells}^{w>0.01} vs SM number, "
4106  "%2.2f<#it{E}<%2.2f GeV, %2.2f<#it{sigma}_{long}<%2.2f",fEMinShape,fEMaxShape,fM02LowBin[0],fM02LowBin[1]),
4107  50,-100,100, fNModules,-0.5,fNModules-0.5,cellBins,cellMin,cellMax);
4108  fhESecCellTimeNCellSM->SetZTitle("#it{n}_{cells}^{w>0.01}");
4109  fhESecCellTimeNCellSM->SetYTitle("SM number");
4110  fhESecCellTimeNCellSM->SetXTitle("time (ns)");
4111  outputContainer->Add(fhESecCellTimeNCellSM);
4112  }
4113 
4114  //
4115 
4116  Int_t nbinsdeltacells = 19 ;
4117  Float_t mindeltacells =-9.5;
4118  Float_t maxdeltacells = 9.5;
4119 
4121  {
4122  for(Int_t col = 0; col < 2; col++)
4123  {
4124  fhColRowFromCellMaxLowM02[col] = new TH2F
4125  (Form("hColRowFromCellMaxLowM02_Col%d",col),
4126  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #it{n}_{cells}^{w>0.01} for %2.2f < #sigma^{2}_{long} < %2.2f, "
4127  "%2.2f<#it{E}<%2.2f GeV, colum %d",fM02LowBin[0],fM02LowBin[1],fEMinShape,fEMaxShape,col),
4128  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells);
4129  fhColRowFromCellMaxLowM02[col]->SetXTitle("#Delta column_{max-secondary}");
4130  fhColRowFromCellMaxLowM02[col]->SetYTitle("#Delta row_{max-secondary}");
4131  outputContainer->Add(fhColRowFromCellMaxLowM02[col]);
4132 
4133  fhColRowFromCellMaxHighM02[col] = new TH2F
4134  (Form("hColRowFromCellMaxHighM02_Col%d",col),
4135  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #it{n}_{cells}^{w>0.01} for %2.2f < #sigma^{2}_{long} < %2.2f, "
4136  "%2.2f<#it{E}<%2.2f GeV, colum %d",fM02HighBin[0],fM02HighBin[1],fEMinShape,fEMaxShape,col),
4137  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells);
4138  fhColRowFromCellMaxHighM02[col]->SetXTitle("#Delta column_{max-secondary}");
4139  fhColRowFromCellMaxHighM02[col]->SetYTitle("#Delta row_{max-secondary}");
4140  outputContainer->Add(fhColRowFromCellMaxHighM02[col]);
4141  }//odd/pair col
4142  }
4143  //
4144 
4145  for(Int_t i = 0; i < fNModules; i++)
4146  {
4148  (Form("hNCellsPerClusterM02M20_SM%d",i),
4149  Form(" vs #sigma^{2}_{long} vs #it{n}_{cells}^{w>0.01} vs #sigma^{2}_{short}, "
4150  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
4151  (Int_t)nShShBins/1.5,0,maxShSh/1.5, cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4152  fhNCellsPerClusterM02M20PerSM[i]->SetZTitle("#sigma^{2}_{long}");
4153  fhNCellsPerClusterM02M20PerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4154  fhNCellsPerClusterM02M20PerSM[i]->SetXTitle("#sigma^{2}_{short}");
4155  outputContainer->Add(fhNCellsPerClusterM02M20PerSM[i]);
4156 
4157  if ( fFillNLocMaxHistos )
4158  {
4160  (Form("hNCellsPerClusterM02NLM_SM%d",i),
4161  Form(" vs #sigma^{2}_{long} vs #it{n}_{cells}^{w>0.01} vs N_{lm}, "
4162  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
4163  10,0,10, cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4164  fhNCellsPerClusterM02NLMPerSM[i]->SetZTitle("#sigma^{2}_{long}");
4165  fhNCellsPerClusterM02NLMPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4166  fhNCellsPerClusterM02NLMPerSM[i]->SetXTitle("n_{lm}");
4167  outputContainer->Add(fhNCellsPerClusterM02NLMPerSM[i]);
4168  }
4169 
4171  (Form("hEMaxCellEClusterM02NCell_SM%d",i),
4172  Form("(#it{E}_{cluster} - #it{E}_{max cell})/#it{E}_{cluster} vs #sigma^{2}_{long} vs #it{n}_{cells}^{w>0.01}, "
4173  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
4174  50,0,1., cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4175  fhEMaxCellEClusterM02NCellPerSM[i]->SetZTitle("#sigma^{2}_{long}");
4176  fhEMaxCellEClusterM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4177  fhEMaxCellEClusterM02NCellPerSM[i]->SetXTitle("(#it{E}_{cluster} - #it{E}_{max cell})/ #it{E}_{cluster}");
4178  outputContainer->Add(fhEMaxCellEClusterM02NCellPerSM[i]);
4179 
4180 // fhEMaxCellLogM02NCellPerSM[i] = new TH3F
4181 // (Form("hEMaxCellLogM02NCell_SM%d",i),
4182 // Form("log(#it{E}_{max cell}) vs #sigma^{2}_{long} vs SM number, "
4183 // "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
4184 // 150,-3,3, cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4185 // fhEMaxCellLogM02NCellPerSM[i]->SetZTitle("#sigma^{2}_{long}");
4186 // fhEMaxCellLogM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4187 // fhEMaxCellLogM02NCellPerSM[i]->SetXTitle("log(#it{E}_{max cell})");
4188 // outputContainer->Add(fhEMaxCellLogM02NCellPerSM[i]);
4189 
4191  (Form("hESecCellEMaxCellM02NCell_SM%d",i),
4192  Form("#it{E}_{cell}/#it{E}_{cell max} vs #sigma^{2}_{long} vs #it{n}_{cells}^{w>0.01}, "
4193  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
4194  50,0,1., cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4195  fhESecCellEMaxCellM02NCellPerSM[i]->SetZTitle("#sigma^{2}_{long}");
4196  fhESecCellEMaxCellM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4197  fhESecCellEMaxCellM02NCellPerSM[i]->SetXTitle("#it{E}_{cell}/#it{E}_{cell max}");
4198  outputContainer->Add(fhESecCellEMaxCellM02NCellPerSM[i]);
4199 
4201  (Form("hESecCellEClusterM02NCell_SM%d",i),
4202  Form("(#it{E}_{cluster} - #it{E}_{cell})/#it{E}_{cluster} vs #sigma^{2}_{long} vs #it{n}_{cells}^{w>0.01}, "
4203  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
4204  50,0,1., cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4205  fhESecCellEClusterM02NCellPerSM[i]->SetZTitle("#sigma^{2}_{long}");
4206  fhESecCellEClusterM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4207  fhESecCellEClusterM02NCellPerSM[i]->SetXTitle("(#it{E}_{cluster} - #it{E}_{cell})/ #it{E}_{cluster}");
4208  outputContainer->Add(fhESecCellEClusterM02NCellPerSM[i]);
4209 
4210 // fhESecCellLogM02NCellPerSM[i] = new TH3F
4211 // (Form("hESecCellLogM02NCell_SM%d",i),
4212 // Form("log(#it{E}_{cell}) vs #sigma^{2}_{long} vs #it{n}_{cells}^{w>0.01}, "
4213 // "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,fNCellMinShape),
4214 // 150,-3,3, cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4215 // fhESecCellLogM02NCellPerSM[i]->SetZTitle("#sigma^{2}_{long}");
4216 // fhESecCellLogM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4217 // fhESecCellLogM02NCellPerSM[i]->SetXTitle("log(#it{E}_{cell})");
4218 // outputContainer->Add(fhESecCellLogM02NCellPerSM[i]);
4219 
4221  (Form("hEMaxESecCellNCellLowM02_SM%d",i),
4222  Form("#it{E}_{cell}^{max} vs #it{E}_{cell}^{secondary} vs #it{n}_{cells}^{w>0.01} vs %2.2f < #sigma^{2}_{long} < %2.2f, "
4223  "%2.2f<#it{E}<%2.2f GeV, SM=%d", fM02LowBin[0],fM02LowBin[1], fEMinShape,fEMaxShape,i),
4224  24,0,12, 48,0,12,cellBins,cellMin,cellMax);
4225  fhEMaxESecCellNCellLowM02PerSM[i]->SetZTitle("#it{n}_{cells}^{w>0.01}");
4226  fhEMaxESecCellNCellLowM02PerSM[i]->SetYTitle("#it{E}_{cell}^{secondary} (GeV)");
4227  fhEMaxESecCellNCellLowM02PerSM[i]->SetXTitle("#it{E}_{cell}^{max} (GeV)");
4228  outputContainer->Add(fhEMaxESecCellNCellLowM02PerSM[i]);
4229 
4231  (Form("hEMaxECrossNCellLowM02_SM%d",i),
4232  Form("#it{E}_{cell}^{max} vs exoticity vs #it{n}_{cells}^{w>0.01} vs %2.2f < #sigma^{2}_{long} < %2.2f, "
4233  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fM02LowBin[0],fM02LowBin[1],fEMinShape,fEMaxShape,i),
4234  24,0,12, 40,0.6,1.,cellBins,cellMin,cellMax);
4235  fhEMaxECrossNCellLowM02PerSM[i]->SetZTitle("#it{n}_{cells}^{w>0.01}");
4236  fhEMaxECrossNCellLowM02PerSM[i]->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell}^{max}");
4237  fhEMaxECrossNCellLowM02PerSM[i]->SetXTitle("#it{E}_{cell}^{max} (GeV)");
4238  outputContainer->Add(fhEMaxECrossNCellLowM02PerSM[i]);
4239 
4241  (Form("hEMaxESecCellNCellHighM02_SM%d",i),
4242  Form("#it{E}_{cell}^{max} vs #it{E}_{cell}^{secondary} vs #it{n}_{cells}^{w>0.01} vs "
4243  "%2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d",
4245  24,0,12, 48,0,12,cellBins,cellMin,cellMax);
4246  fhEMaxESecCellNCellHighM02PerSM[i]->SetZTitle("#it{n}_{cells}^{w>0.01}");
4247  fhEMaxESecCellNCellHighM02PerSM[i]->SetYTitle("#it{E}_{cell}^{secondary} (GeV)");
4248  fhEMaxESecCellNCellHighM02PerSM[i]->SetXTitle("#it{E}_{cell}^{max} (GeV)");
4249  outputContainer->Add(fhEMaxESecCellNCellHighM02PerSM[i]);
4250 
4252  (Form("hEMaxECrossNCellHighM02_SM%d",i),
4253  Form("#it{E}_{cell}^{max} vs exoticity vs #it{n}_{cells}^{w>0.01} "
4254  "for %2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d",
4256  24,0,12, 40,0.6,1.,cellBins,cellMin,cellMax);
4257  fhEMaxECrossNCellHighM02PerSM[i]->SetZTitle("#it{n}_{cells}^{w>0.01}");
4258  fhEMaxECrossNCellHighM02PerSM[i]->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell}^{max}");
4259  fhEMaxECrossNCellHighM02PerSM[i]->SetXTitle("#it{E}_{cell}^{max} (GeV)");
4260  outputContainer->Add(fhEMaxECrossNCellHighM02PerSM[i]);
4261 
4263  {
4264  Int_t nbinsdeltacells = 19 ;
4265  Float_t mindeltacells =-9.5;
4266  Float_t maxdeltacells = 9.5;
4267  for(Int_t col = 0; col < 2; col++)
4268  {
4269  fhNCellsPerClusterM02PerSMPerCol[i][col] = new TH3F
4270  (Form("hNCellsPerClusterM02_SM%d_Col%d",i,col),
4271  Form("#it{E} vs #it{n}_{cells} vs #sigma^{2}_{long}, SM=%d, colum %d",i,col),
4272  nEbins,minE,maxE,cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4273  fhNCellsPerClusterM02PerSMPerCol[i][col]->SetXTitle("#it{E} (GeV)");
4274  fhNCellsPerClusterM02PerSMPerCol[i][col]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4275  fhNCellsPerClusterM02PerSMPerCol[i][col]->SetZTitle("#sigma^{2}_{long}");
4276  outputContainer->Add(fhNCellsPerClusterM02PerSMPerCol[i][col]);
4277 
4278  fhNCellsPerClusterM20PerSMPerCol[i][col] = new TH3F
4279  (Form("hNCellsPerClusterM20_SM%d_Col%d",i,col),
4280  Form("#it{E} vs #it{n}_{cells} vs #sigma^{2}_{short}, SM=%d, colum %d",i,col),
4281  nEbins,minE,maxE,cellBins,cellMin,cellMax,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4282  fhNCellsPerClusterM20PerSMPerCol[i][col]->SetXTitle("#it{E} (GeV)");
4283  fhNCellsPerClusterM20PerSMPerCol[i][col]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4284  fhNCellsPerClusterM20PerSMPerCol[i][col]->SetZTitle("#sigma^{2}_{short}");
4285  outputContainer->Add(fhNCellsPerClusterM20PerSMPerCol[i][col]);
4286 
4287  if ( fFillNLocMaxHistos )
4288  {
4289  fhNCellsPerClusterNLMPerSMPerCol[i][col] = new TH3F
4290  (Form("hNCellsPerClusterNLM_SM%d_Col%d",i,col),
4291  Form("#it{E} vs #it{n}_{cells} vs n_{lm}, SM=%d, colum %d",i,col),
4292  nEbins,minE,maxE,cellBins,cellMin,cellMax,10,0,10);
4293  fhNCellsPerClusterNLMPerSMPerCol[i][col]->SetXTitle("#it{E} (GeV)");
4294  fhNCellsPerClusterNLMPerSMPerCol[i][col]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4295  fhNCellsPerClusterNLMPerSMPerCol[i][col]->SetZTitle("n_{lm}");
4296  outputContainer->Add(fhNCellsPerClusterNLMPerSMPerCol[i][col]);
4297  }
4298 
4299  fhColRowFromCellMaxLowM02PerSM[i][col] = new TH3F
4300  (Form("hColRowFromCellMaxLowM02_SM%d_Col%d",i,col),
4301  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #it{n}_{cells}^{w>0.01} for %2.2f < #sigma^{2}_{long} < %2.2f, "
4302  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d",
4304  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,cellBins,cellMin,cellMax);
4305  fhColRowFromCellMaxLowM02PerSM[i][col]->SetZTitle("#it{n}_{cells}^{w>0.01}");
4306  fhColRowFromCellMaxLowM02PerSM[i][col]->SetXTitle("#Delta column_{max-secondary}");
4307  fhColRowFromCellMaxLowM02PerSM[i][col]->SetYTitle("#Delta row_{max-secondary}");
4308  outputContainer->Add(fhColRowFromCellMaxLowM02PerSM[i][col]);
4309 
4310  fhColRowFromCellMaxHighM02PerSM[i][col] = new TH3F
4311  (Form("hColRowFromCellMaxHighM02_SM%d_Col%d",i,col),
4312  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #it{n}_{cells}^{w>0.01} "
4313  "for %2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d",
4315  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,cellBins,cellMin,cellMax);
4316  fhColRowFromCellMaxHighM02PerSM[i][col]->SetZTitle("#it{n}_{cells}^{w>0.01}");
4317  fhColRowFromCellMaxHighM02PerSM[i][col]->SetXTitle("#Delta column_{max-secondary}");
4318  fhColRowFromCellMaxHighM02PerSM[i][col]->SetYTitle("#Delta row_{max-secondary}");
4319  outputContainer->Add(fhColRowFromCellMaxHighM02PerSM[i][col]);
4320 
4321  for(Int_t j = 0; j < fNCellsBins; j++)
4322  {
4324  (Form("hColRowFromCellMaxEMaxSecDiffLowM02_SM%d_Col%d_NCellBin%d",i,col,j),
4325  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #Delta #it{E}_{max-secondary} "
4326  "for %2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d,%d <= #it{n}_{cells}^{w>0.01} < %d",
4328  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,120,0,12);
4329  fhColRowFromCellMaxEMaxSecDiffLowM02PerSM[i][col][j]->SetZTitle("#Delta #it{E}_{max-secondary} (GeV)");
4330  fhColRowFromCellMaxEMaxSecDiffLowM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4331  fhColRowFromCellMaxEMaxSecDiffLowM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4332  outputContainer->Add(fhColRowFromCellMaxEMaxSecDiffLowM02PerSM[i][col][j]);
4333 
4335  (Form("hColRowFromCellMaxEMaxSecDiffHighM02_SM%d_Col%d_NCellBin%d",i,col,j),
4336  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #Delta #it{E}_{max-secondary} "
4337  "for %2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, %d <= #it{n}_{cells}^{w>0.01} < %d",
4339  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,120,0,12);
4340  fhColRowFromCellMaxEMaxSecDiffHighM02PerSM[i][col][j]->SetZTitle("#Delta #it{E}_{max-secondary} (GeV)");
4341  fhColRowFromCellMaxEMaxSecDiffHighM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4342  fhColRowFromCellMaxEMaxSecDiffHighM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4343  outputContainer->Add(fhColRowFromCellMaxEMaxSecDiffHighM02PerSM[i][col][j]);
4344 
4346  (Form("hColRowFromCellMaxEMaxSecDiffFracLowM02_SM%d_Col%d_NCellBin%d",i,col,j),
4347  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #Delta #it{E}_{max-secondary}/#it{E}_{max} "
4348  "for %2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d,%d <= #it{n}_{cells}^{w>0.01} < %d",
4350  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,40,0,1);
4351  fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[i][col][j]->SetZTitle("#Delta #it{E}_{max-secondary}/#it{E}_{max}");
4352  fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4353  fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4354  outputContainer->Add(fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[i][col][j]);
4355 
4357  (Form("hColRowFromCellMaxEMaxSecDiffFracHighM02_SM%d_Col%d_NCellBin%d",i,col,j),
4358  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #Delta #it{E}_{max-secondary}/#it{E}_{max}"
4359  " for %2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, %d <= #it{n}_{cells}^{w>0.01} < %d",
4361  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,40,0,1);
4362  fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[i][col][j]->SetZTitle("#Delta #it{E}_{max-secondary}/#it{E}_{max}");
4363  fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4364  fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4365  outputContainer->Add(fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[i][col][j]);
4366 
4368  (Form("hColRowFromCellMaxECellClusterRatLowM02_SM%d_Col%d_NCellBin%d",i,col,j),
4369  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #it{E}_{cell}/#it{E}_{cluster} "
4370  "for %2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, %d <= #it{n}_{cells}^{w>0.01} < %d",
4372  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,50,0,1);
4373  fhColRowFromCellMaxECellClusterRatLowM02PerSM[i][col][j]->SetZTitle("#it{E}_{cell}/#it{E}_{cluster}");
4374  fhColRowFromCellMaxECellClusterRatLowM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4375  fhColRowFromCellMaxECellClusterRatLowM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4376  outputContainer->Add(fhColRowFromCellMaxECellClusterRatLowM02PerSM[i][col][j]);
4377 
4379  (Form("hColRowFromCellMaxECellClusterRatHighM02_SM%d_Col%d_NCellBin%d",i,col,j),
4380  Form("cell col_{max}-#col_{secondary} vs cell #row_{max}-#row_{secondary} vs #it{E}_{cell}/#it{E}_{cluster} "
4381  "for %2.2f < #sigma^{2}_{long} < %2.2f, %2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, %d <= #it{n}_{cells}^{w>0.01} < %d",
4383  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,50,0,1);
4384  fhColRowFromCellMaxECellClusterRatHighM02PerSM[i][col][j]->SetZTitle("#it{E}_{cell}/#it{E}_{cluster}");
4385  fhColRowFromCellMaxECellClusterRatHighM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4386  fhColRowFromCellMaxECellClusterRatHighM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4387  outputContainer->Add(fhColRowFromCellMaxECellClusterRatHighM02PerSM[i][col][j]);
4388 
4389  } // 3 n cell bins
4390  } // odd/pair col
4391  } // if ( fStudyColRowFromCellMax )
4392 
4393  } // SM
4394 
4395  for(Int_t imatch = 0; imatch < fNMatchPIDCases; imatch++)
4396  {
4397  if ( fStudyShapeParam )
4398  {
4399  fhDeltaIEtaDeltaIPhi[imatch] = new TH3F
4400  (Form("hDeltaIEtaDeltaIPhi_%s",matchCase[imatch].Data()),
4401  Form("Cluster max size with respect main cell in columns vs rows vs E for %s, #it{n}_{cells}^{w>0.01}>%d",matchCase[imatch].Data(),fNCellMinShape),
4402  nEbins,minE,maxE,cellBins,cellMin,cellMax,cellBins,cellMin,cellMax);
4403  fhDeltaIEtaDeltaIPhi[imatch]->SetXTitle("#it{E}_{cluster}");
4404  fhDeltaIEtaDeltaIPhi[imatch]->SetYTitle("#Delta Column");
4405  fhDeltaIEtaDeltaIPhi[imatch]->SetZTitle("#Delta Row");
4406  outputContainer->Add(fhDeltaIEtaDeltaIPhi[imatch]);
4407 
4408  fhDeltaIEtaDeltaIPhiTot[imatch] = new TH3F
4409  (Form("hDeltaIEtaDeltaIPhiTot_%s",matchCase[imatch].Data()),
4410  Form("Cluster size in columns vs rows, minus main cell, vs E for %s, #it{n}_{cells}^{w>0.01}>%d",matchCase[imatch].Data(),fNCellMinShape),
4411  nEbins,minE,maxE,cellBins,cellMin,cellMax,cellBins,cellMin,cellMax);
4412  fhDeltaIEtaDeltaIPhiTot[imatch]->SetXTitle("#it{E}_{cluster}");
4413  fhDeltaIEtaDeltaIPhiTot[imatch]->SetYTitle("#Delta Column");
4414  fhDeltaIEtaDeltaIPhiTot[imatch]->SetZTitle("#Delta Row");
4415  outputContainer->Add(fhDeltaIEtaDeltaIPhiTot[imatch]);
4416 
4417  fhDeltaIA[imatch] = new TH2F
4418  (Form("hDeltaIA_%s",matchCase[imatch].Data()),
4419  Form("Cluster *asymmetry* in cell units vs E for %s",matchCase[imatch].Data()),
4420  nptbins,ptmin,ptmax,asyBins,asyMin,asyMax);
4421  fhDeltaIA[imatch]->SetXTitle("#it{E}_{cluster}");
4422  fhDeltaIA[imatch]->SetYTitle("#it{A}_{cell in cluster}");
4423  outputContainer->Add(fhDeltaIA[imatch]);
4424 
4425  fhDeltaIATot[imatch] = new TH2F
4426  (Form("hDeltaIATot_%s",matchCase[imatch].Data()),
4427  Form("Cluster *total asymmetry* in cell units vs E for %s",matchCase[imatch].Data()),
4428  nptbins,ptmin,ptmax,asyBins,asyMin,asyMax);
4429  fhDeltaIATot[imatch]->SetXTitle("#it{E}_{cluster}");
4430  fhDeltaIATot[imatch]->SetYTitle("#it{A}_{cell in cluster}^{total}");
4431  outputContainer->Add(fhDeltaIATot[imatch]);
4432 
4433  fhDeltaIAM02[imatch] = new TH3F
4434  (Form("hDeltaIAM02_%s",matchCase[imatch].Data()),
4435  Form("Cluster *asymmetry* in cell units vs #sigma^{2}_{long} for %s",matchCase[imatch].Data()),
4436  nEbins,minE,maxE,nShShBins,minShSh,maxShSh,asyBins,asyMin,asyMax);
4437  fhDeltaIAM02[imatch]->SetXTitle("#it{E}_{cluster}");
4438  fhDeltaIAM02[imatch]->SetYTitle("#sigma^{2}_{long}");
4439  fhDeltaIAM02[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4440  outputContainer->Add(fhDeltaIAM02[imatch]);
4441 
4442  fhDeltaIATotM02[imatch] = new TH3F
4443  (Form("hDeltaIATotM02_%s",matchCase[imatch].Data()),
4444  Form("Cluster *total asymmetry* in cell units vs #sigma^{2}_{long} for %s",matchCase[imatch].Data()),
4445  nEbins,minE,maxE,nShShBins,minShSh,maxShSh,asyBins,asyMin,asyMax);
4446  fhDeltaIATotM02[imatch]->SetXTitle("#it{E}_{cluster}");
4447  fhDeltaIATotM02[imatch]->SetYTitle("#sigma^{2}_{long}");
4448  fhDeltaIATotM02[imatch]->SetZTitle("#it{A}_{cell in cluster}^{total}");
4449  outputContainer->Add(fhDeltaIATotM02[imatch]);
4450 
4451  fhDeltaIAM20[imatch] = new TH3F
4452  (Form("hDeltaIAM20_%s",matchCase[imatch].Data()),
4453  Form("Cluster *asymmetry* in cell units vs #sigma^{2}_{short} for %s",matchCase[imatch].Data()),
4454  nEbins,minE,maxE,(Int_t)nShShBins/1.5,0,maxShSh/1.5,asyBins,asyMin,asyMax);
4455  fhDeltaIAM20[imatch]->SetXTitle("#it{E}_{cluster}");
4456  fhDeltaIAM20[imatch]->SetYTitle("#sigma^{2}_{short}");
4457  fhDeltaIAM20[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4458  outputContainer->Add(fhDeltaIAM20[imatch]);
4459 
4460  fhDeltaIATotM20[imatch] = new TH3F
4461  (Form("hDeltaIATotM20_%s",matchCase[imatch].Data()),
4462  Form("Cluster *total asymmetry* in cell units vs #sigma^{2}_{short} for %s",matchCase[imatch].Data()),
4463  nEbins,minE,maxE,(Int_t)nShShBins/1.5,0,maxShSh/1.5,asyBins,asyMin,asyMax);
4464  fhDeltaIATotM20[imatch]->SetXTitle("#it{E}_{cluster}");
4465  fhDeltaIATotM20[imatch]->SetYTitle("#sigma^{2}_{short}");
4466  fhDeltaIATotM20[imatch]->SetZTitle("#it{A}_{cell in cluster}^{total}");
4467  outputContainer->Add(fhDeltaIATotM20[imatch]);
4468 
4469  fhDeltaIANCells[imatch] = new TH3F
4470  (Form("hDeltaIANCells_%s",matchCase[imatch].Data()),
4471  Form("Cluster *asymmetry* in cell units vs N cells in cluster for %s",matchCase[imatch].Data()),
4472  nEbins,minE,maxE,cellBins,cellMin,cellMax,asyBins,asyMin,asyMax);
4473  fhDeltaIANCells[imatch]->SetXTitle("#it{E}_{cluster}");
4474  fhDeltaIANCells[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4475  fhDeltaIANCells[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4476  outputContainer->Add(fhDeltaIANCells[imatch]);
4477 
4478  fhDeltaIATotNCells[imatch] = new TH3F
4479  (Form("hDeltaIATotNCells_%s",matchCase[imatch].Data()),
4480  Form("Cluster *total asymmetry* in cell units vs N cells in cluster for %s",matchCase[imatch].Data()),
4481  nEbins,minE,maxE,cellBins,cellMin,cellMax,asyBins,asyMin,asyMax);
4482  fhDeltaIATotNCells[imatch]->SetXTitle("#it{E}_{cluster}");
4483  fhDeltaIATotNCells[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4484  fhDeltaIATotNCells[imatch]->SetZTitle("#it{A}_{cell in cluster}^{total}");
4485  outputContainer->Add(fhDeltaIATotNCells[imatch]);
4486 
4487  if ( IsDataMC() )
4488  {
4489  fhDeltaIAOrigin[imatch] = new TH3F
4490  (Form("hDeltaIAOrigin_%s",matchCase[imatch].Data()),
4491  Form("Cluster *asymmetry* in cell units vs E vs primary ID, for ID %s",matchCase[imatch].Data()),
4492  nEbins,minE,maxE,10,-0.5,9.5,asyBins,asyMin,asyMax);
4493  fhDeltaIAOrigin[imatch]->SetXTitle("#it{E}_{cluster}");
4494  fhDeltaIAOrigin[imatch]->SetYTitle("particle");
4495  fhDeltaIAOrigin[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4496  for(Int_t ilabel = 1; ilabel <=10; ilabel++)
4497  fhDeltaIAOrigin[imatch]->GetYaxis()->SetBinLabel(ilabel,mcParticleStringLabel[ilabel-1]);
4498  outputContainer->Add(fhDeltaIAOrigin[imatch]);
4499 
4500  fhDeltaIATotOrigin[imatch] = new TH3F
4501  (Form("hDeltaIATotOrigin_%s",matchCase[imatch].Data()),
4502  Form("Cluster *total asymmetry* in cell units vs E vs primary ID, for ID %s",matchCase[imatch].Data()),
4503  nEbins,minE,maxE,10,-0.5,9.5,asyBins,asyMin,asyMax);
4504  fhDeltaIATotOrigin[imatch]->SetXTitle("#it{E}_{cluster}");
4505  fhDeltaIATotOrigin[imatch]->SetYTitle("particle");
4506  fhDeltaIATotOrigin[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4507  for(Int_t ilabel = 1; ilabel <=10; ilabel++)
4508  fhDeltaIATotOrigin[imatch]->GetYaxis()->SetBinLabel(ilabel,mcParticleStringLabel[ilabel-1]);
4509  outputContainer->Add(fhDeltaIATotOrigin[imatch]);
4510  }
4511  } // Cluster asymmetry
4512 
4513  fhClusterMaxCellDiffM02[imatch] = new TH3F
4514  (Form("hClusterMaxCellDiffM02_%s",matchCase[imatch].Data()),
4515  Form("#it{E}_{cluster} vs (#it{E}_{cluster} - #it{E}_{cell max})/#it{E}_{cluster} vs #sigma^{2}_{long} for ID %s",matchCase[imatch].Data()),
4516  nEbins,minE,maxE, 20,0,1.,nShShBins,minShSh,maxShSh);
4517  fhClusterMaxCellDiffM02[imatch]->SetXTitle("#it{E}_{cluster} (GeV) ");
4518  fhClusterMaxCellDiffM02[imatch]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
4519  fhClusterMaxCellDiffM02[imatch]->SetZTitle("#sigma^{2}_{long}");
4520  outputContainer->Add(fhClusterMaxCellDiffM02[imatch]);
4521 
4522  fhClusterTimeEnergyM02[imatch] = new TH3F
4523  (Form("hClusterTimeEnergyM02_%s",matchCase[imatch].Data()),
4524  Form("#it{E} vs TOF vs #sigma^{2}_{long} for ID %s",matchCase[imatch].Data()),
4525  nEbins,minE,maxE,45,-25.5,20.5,nShShBins,minShSh,maxShSh);
4526  fhClusterTimeEnergyM02[imatch]->SetXTitle("#it{E} (GeV) ");
4527  fhClusterTimeEnergyM02[imatch]->SetYTitle("TOF (ns)");
4528  fhClusterTimeEnergyM02[imatch]->SetZTitle("#sigma^{2}_{long}");
4529  outputContainer->Add(fhClusterTimeEnergyM02[imatch]);
4530 
4531  fhNCellsPerClusterM02[imatch] = new TH3F
4532  (Form("hNCellsPerClusterM02_%s",matchCase[imatch].Data()),
4533  Form("#it{E} vs #it{n}_{cells} vs #sigma^{2}_{long} for ID %s",matchCase[imatch].Data()),
4534  nEbins,minE,maxE,cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4535  fhNCellsPerClusterM02[imatch]->SetXTitle("#it{E} (GeV)");
4536  fhNCellsPerClusterM02[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4537  fhNCellsPerClusterM02[imatch]->SetZTitle("#sigma^{2}_{long}");
4538  outputContainer->Add(fhNCellsPerClusterM02[imatch]);
4539 
4540  fhNCellsPerClusterM20[imatch] = new TH3F
4541  (Form("hNCellsPerClusterM20_%s",matchCase[imatch].Data()),
4542  Form("#it{E} vs #it{n}_{cells} vs #sigma^{2}_{short} for ID %s",matchCase[imatch].Data()),
4543  nEbins,minE,maxE,cellBins,cellMin,cellMax,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4544  fhNCellsPerClusterM20[imatch]->SetXTitle("#it{E} (GeV)");
4545  fhNCellsPerClusterM20[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4546  fhNCellsPerClusterM20[imatch]->SetZTitle("#sigma^{2}_{short}");
4547  outputContainer->Add(fhNCellsPerClusterM20[imatch]);
4548 
4549  if ( fFillNLocMaxHistos )
4550  {
4551  fhNCellsPerClusterNLM[imatch] = new TH3F
4552  (Form("hNCellsPerClusterNLM_%s",matchCase[imatch].Data()),
4553  Form("#it{E} vs #it{n}_{cells} vs n_{lm} for ID %s",matchCase[imatch].Data()),
4554  nEbins,minE,maxE,cellBins,cellMin,cellMax,10,0,10);
4555  fhNCellsPerClusterNLM[imatch]->SetXTitle("#it{E} (GeV)");
4556  fhNCellsPerClusterNLM[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4557  fhNCellsPerClusterNLM[imatch]->SetZTitle("n_{lm}");
4558  outputContainer->Add(fhNCellsPerClusterNLM[imatch]);
4559  }
4560 
4561  fhSMM02[imatch] = new TH3F
4562  (Form("hSMM02_%s",matchCase[imatch].Data()),
4563  Form("#it{E} vs SM number vs #sigma^{2}_{long}, #it{n}_{cells}^{w>0.01}>%d, for ID %s",fNCellMinShape,matchCase[imatch].Data()),
4564  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4565  fhSMM02[imatch]->SetXTitle("#it{E} (GeV)");
4566  fhSMM02[imatch]->SetYTitle("SM number");
4567  fhSMM02[imatch]->SetZTitle("#sigma^{2}_{long}");
4568  outputContainer->Add(fhSMM02[imatch]);
4569 
4570  fhSMM02NoCut[imatch] = new TH3F
4571  (Form("hSMM02NoCut_%s",matchCase[imatch].Data()),
4572  Form("#it{E} vs SM number vs #sigma^{2}_{long} for ID %s",matchCase[imatch].Data()),
4573  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4574  fhSMM02NoCut[imatch]->SetXTitle("#it{E} (GeV)");
4575  fhSMM02NoCut[imatch]->SetYTitle("SM number");
4576  fhSMM02NoCut[imatch]->SetZTitle("#sigma^{2}_{long}");
4577  outputContainer->Add(fhSMM02NoCut[imatch]);
4578 
4579  fhSMM20LowM02[imatch] = new TH3F
4580  (Form("hSMM20LowM02_%s",matchCase[imatch].Data()),
4581  Form("#it{E} vs SM number vs #sigma^{2}_{short}, #it{n}_{cells}^{w>0.01}>%d, for %2.2f<#sigma^{2}_{long}<%2.2f, for ID %s",
4582  fNCellMinShape, fM02LowBin[0], fM02LowBin[1], matchCase[imatch].Data()),
4583  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4584  fhSMM20LowM02[imatch]->SetXTitle("#it{E} (GeV)");
4585  fhSMM20LowM02[imatch]->SetYTitle("SM number");
4586  fhSMM20LowM02[imatch]->SetZTitle("#sigma^{2}_{short}");
4587  outputContainer->Add(fhSMM20LowM02[imatch]);
4588 
4589  fhSMM20LowM02NoCut[imatch] = new TH3F
4590  (Form("hSMM20LowM02NoCut_%s",matchCase[imatch].Data()),
4591  Form("#it{E} vs SM number vs #sigma^{2}_{short}, for %2.2f<#sigma^{2}_{long}<%2.2f, for ID %s",
4592  fM02LowBin[0], fM02LowBin[1], matchCase[imatch].Data()),
4593  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4594  fhSMM20LowM02NoCut[imatch]->SetXTitle("#it{E} (GeV)");
4595  fhSMM20LowM02NoCut[imatch]->SetYTitle("SM number");
4596  fhSMM20LowM02NoCut[imatch]->SetZTitle("#sigma^{2}_{short}");
4597  outputContainer->Add(fhSMM20LowM02NoCut[imatch]);
4598 
4599  fhSMM20HighM02[imatch] = new TH3F
4600  (Form("hSMM20HighM02_%s",matchCase[imatch].Data()),
4601  Form("#it{E} vs SM number vs #sigma^{2}_{short}, #it{n}_{cells}^{w>0.01}>%d, for %2.2f<#sigma^{2}_{long}<%2.2f, for ID %s",
4602  fNCellMinShape, fM02HighBin[0], fM02HighBin[1], matchCase[imatch].Data()),
4603  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4604  fhSMM20HighM02[imatch]->SetXTitle("#it{E} (GeV)");
4605  fhSMM20HighM02[imatch]->SetYTitle("SM number");
4606  fhSMM20HighM02[imatch]->SetZTitle("#sigma^{2}_{short}");
4607  outputContainer->Add(fhSMM20HighM02[imatch]);
4608 
4609  fhSMM20HighM02NoCut[imatch] = new TH3F
4610  (Form("hSMM20HighM02NoCut_%s",matchCase[imatch].Data()),
4611  Form("#it{E} vs SM number vs #sigma^{2}_{short}, for %2.2f<#sigma^{2}_{long}<%2.2f, for ID %s",
4612  fM02HighBin[0], fM02HighBin[1], matchCase[imatch].Data()),
4613  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4614  fhSMM20HighM02NoCut[imatch]->SetXTitle("#it{E} (GeV)");
4615  fhSMM20HighM02NoCut[imatch]->SetYTitle("SM number");
4616  fhSMM20HighM02NoCut[imatch]->SetZTitle("#sigma^{2}_{short}");
4617  outputContainer->Add(fhSMM20HighM02NoCut[imatch]);
4618 
4619  if( fFillNLocMaxHistos )
4620  {
4621  fhSMNLocMax[imatch] = new TH3F