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