AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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);
540  GetCaloUtils()->RecalibrateCellAmplitude(eCell, GetCalorimeter(), 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());
604  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell->Fill(energy,deta,GetEventWeight());
605  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell->Fill(energy,dphi,GetEventWeight());
606  }
607  else if(exoticity > 0.97)
608  {
609  fhEnergyTimeTCardCorrNoSelectionExotic[matched]->Fill(energy,time,GetEventWeight());
610  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic->Fill(energy,deta,GetEventWeight());
611  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic->Fill(energy,dphi,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 
676  GetCaloUtils()->RecalibrateCellAmplitude(eCell, GetCalorimeter(), absId);
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 
1072  GetCaloUtils()->RecalibrateCellAmplitude(eCell, GetCalorimeter(), absId);
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())
1151  || GetCaloUtils()->GetNumberOfLocalMaxima(clus2,fCaloCellList) > 1
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;
1165  if(IsFiducialCutOn()) in2 = GetFiducialCut()->IsInFiducialCut(fClusterMomentum2.Eta(),fClusterMomentum2.Phi(),GetCalorimeter()) ;
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
1176  Float_t mass = (fClusterMomentum+fClusterMomentum2).M ();
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();
1393  Int_t nlm = GetCaloUtils()->GetNumberOfLocalMaxima(clus, fCaloCellList) ;
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 
1410  GetCaloUtils()->RecalibrateCellAmplitude(eCell, GetCalorimeter(), absId);
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;
1427  Int_t smMax = GetModuleNumberCellIndexesAbsCaloMap(absIdMax, GetCalorimeter(),
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 
1455  GetCaloUtils()->RecalibrateCellAmplitude(eCell, GetCalorimeter(), absId);
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())
1743  || GetCaloUtils()->GetNumberOfLocalMaxima(clus2,fCaloCellList) > 1
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;
1757  if(IsFiducialCutOn()) in2 = GetFiducialCut()->IsInFiducialCut(fClusterMomentum2.Eta(),fClusterMomentum2.Phi(),GetCalorimeter()) ;
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
1768  Float_t mass = (fClusterMomentum+fClusterMomentum2).M ();
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)
1825  InitdEdXParameters();
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() < fMinDistToBad )
1866  {
1867  AliDebug(1,Form("Small distance to bad channel %2.2f < %2.2f",clus->GetDistanceToBadChannel(),fMinDistToBad));
1868  continue ;
1869  }
1870 
1871  // SuperModule number of cluster
1872  nModule = GetModuleNumber(clus);
1873  if ( nModule < fFirstModule || nModule > fLastModule )
1874  {
1875  AliDebug(1,Form("Cluster module out of range %d",nModule));
1876  continue ;
1877  }
1878 
1879  // Get the fraction of the cluster energy that carries the cell with highest energy and its absId
1880  //
1881  Float_t maxCellFraction = 0.;
1882  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(fCaloCellList, clus, maxCellFraction);
1883 
1884  // Cut on time of clusters
1885  Double_t tof = clus->GetTOF()*1.e9;
1886  if(tof>400) tof-=fConstantTimeShift;
1887 
1888  // Get cluster kinematics
1889  clus->GetMomentum(fClusterMomentum,v);
1890 
1891  Float_t e = fClusterMomentum.E();
1892  Float_t pt = fClusterMomentum.Pt();
1893  Float_t eta = fClusterMomentum.Eta();
1894  Float_t phi = GetPhi(fClusterMomentum.Phi());
1895 
1896  // Check only certain regions
1897  Bool_t in = kTRUE;
1898  if(IsFiducialCutOn())
1900 
1901  if(!in)
1902  {
1903  AliDebug(1,Form("Remove cluster with phi %2.2f and eta %2.2f", phi*TMath::RadToDeg(), eta));
1904  continue;
1905  }
1906 
1907  AliDebug(1,Form("cluster: E %2.3f, pT %2.3f, eta %2.3f, phi %2.3f",e,pt,eta,phi*TMath::RadToDeg()));
1908 
1909  // Select the cluster
1910  //
1911  nCaloCellsPerCluster = clus->GetNCells();
1912 
1913  Bool_t goodCluster = IsGoodCluster(absIdMax, clus->GetM02(), nCaloCellsPerCluster);
1914 
1915  AliDebug(1,Form("Accept cluster? %d",goodCluster));
1916 
1917  if(!goodCluster) continue;
1918 
1919  // MC origin finding
1920  //
1921  Int_t mcTag = 0;
1922  Int_t mcIndex = -1;
1923  if ( IsDataMC() && fStudyShape )
1924  {
1925  mcTag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(), clus->GetNLabels(), GetMC());
1926 
1928  GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCEta ) ) mcIndex = 0;
1932  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCPhoton ) ) mcIndex = 2;
1933  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCElectron ) ) mcIndex = 3;
1934  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCPion ) ) mcIndex = 4;
1935  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCKaon ) ) mcIndex = 5;
1936  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCProton ) ) mcIndex = 6;
1937  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCAntiProton ) ) mcIndex = 7;
1938  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCNeutron ) ) mcIndex = 8;
1939  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag, AliMCAnalysisUtils::kMCAntiNeutron) ) mcIndex = 9;
1940  }
1941 
1942  // Cluster mathed with track? and what kind?
1943  //
1944  matched = GetCaloPID()->IsTrackMatched(clus,GetCaloUtils(), GetReader()->GetInputEvent());
1945 
1946  Int_t matchedPID = 0;
1947  if ( matched && fStudyShape )
1948  ClusterMatchedToTrackPID(clus, matchedPID);
1949 
1950  // Get amp and time of max cell, recalibrate and calculate things
1951  //
1952  Int_t bc = (GetReader()->GetInputEvent())->GetBunchCrossNumber();
1953  Double_t tmax = fCaloCellList->GetCellTime(absIdMax);
1954  Float_t ampMax = fCaloCellList->GetCellAmplitude(absIdMax);
1955 
1956  GetCaloUtils()->RecalibrateCellTime(tmax, GetCalorimeter(), absIdMax, bc);
1957  tmax*=1.e9;
1958  if(tmax>400) tmax-=fConstantTimeShift;
1959 
1960  GetCaloUtils()->RecalibrateCellAmplitude(ampMax, GetCalorimeter(), absIdMax);
1961 
1962  Float_t eCrossFrac = 0;
1963  if ( ampMax > 0.01 )
1964  eCrossFrac = 1-GetCaloUtils()->GetECross(absIdMax,fCaloCellList,bc)/ampMax;
1965 
1966 
1967  // Call analysis method filling histograms
1968  //
1969 
1970  //
1971  if ( fStudyShape && matchedPID >= 0 && matchedPID < 3 )
1972  ClusterShapeHistograms(clus, absIdMax, maxCellFraction, eCrossFrac, ampMax, tmax, matchedPID, mcIndex);
1973 
1974  //
1975  if ( fStudyTCardCorrelation )
1976  ChannelCorrelationInTCard(clus, matched, absIdMax, eCrossFrac);
1977 
1978  //
1979  if ( fStudyWeight )
1980  WeightHistograms(clus, mcTag);
1981 
1982  } // Cluster loop
1983 
1984 }
1985 
1986 //_________________________________________________
1988 //_________________________________________________
1990 {
1991  TString parList ; //this will be list of parameters used for this analysis.
1992  const Int_t buffersize = 255;
1993  char onePar[buffersize] ;
1994 
1995  snprintf(onePar,buffersize,"--- AliAnaClusterShapeCorrelStudies ---:") ;
1996  parList+=onePar ;
1997  snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
1998  parList+=onePar ;
1999  snprintf(onePar,buffersize,"Cluster M02: > %2.2f ; n cells > %d; dist to bad>%2.1f;",fM02Min, fNCellMin, fMinDistToBad) ;
2000  parList+=onePar ;
2001  snprintf(onePar,buffersize,"Inv. Mass %2.1f < E_cl < %2.1f GeV;",fInvMassMinECut, fInvMassMaxECut) ;
2002  parList+=onePar ;
2003  snprintf(onePar,buffersize,"Inv. Mass %2.1f < M02 < %2.1f GeV;",fInvMassMinM02Cut, fInvMassMaxM02Cut) ;
2004  parList+=onePar ;
2005  snprintf(onePar,buffersize,"Cluster pair opening angle < %2.1f rad;",fInvMassMaxOpenAngle) ;
2006  parList+=onePar ;
2007  snprintf(onePar,buffersize,"Cluster pair time difference < %2.1f rad;",fInvMassMaxTimeDifference) ;
2008  parList+=onePar ;
2009 
2010  //Get parameters set in base class.
2011  //parList += GetBaseParametersList() ;
2012 
2013  //Get parameters set in FiducialCut class (not available yet)
2014  //parlist += GetFidCut()->GetFidCutParametersList()
2015 
2016  return new TObjString(parList) ;
2017 }
2018 
2019 //___________________________________________________
2022 //___________________________________________________
2024 {
2025  TList * outputContainer = new TList() ;
2026  outputContainer->SetName("ClusterShapeStudies") ;
2027 
2028  // Init the number of modules, set in the class AliCalorimeterUtils
2029  //
2030  InitCaloParameters(); // See AliCaloTrackCorrBaseClass
2031 
2032  //Int_t totalSM = fLastModule-fFirstModule+1;
2033  //printf("N SM %d, first SM %d, last SM %d, total %d\n",fNModules,fFirstModule,fLastModule, totalSM);
2034 
2035 
2036  // MC origin
2037  TString mcParticleStringLabel[] = {"Merged #gamma#gamma","Decay #gamma","Direct #gamma","e^{#pm}","#pi^{#pm}","k^{#pm}","p","#bar{p}","n","#bar{n}"};
2038  //TString mcParticleStringTitle[] = {"MergedPhoton","DecayPhoton","DirectPhoton","Electron","Pion","Kaon","Proton","AntiProton","Neutron","AntiNeutron"};
2039 
2040  // track-match PID matching
2041  TString matchCase[] = {"Neutral","Electron","Hadron"};
2042 
2043  // Histogram binning and ranges
2044  //
2047 
2050 
2053 
2054  // TM residuals
2061 
2062  // Cell column-row histograms, see base class for data members setting
2063  //fNMaxColsFull+2,-1.5,fNMaxColsFull+0.5, fNMaxRowsFull+2,-1.5,fNMaxRowsFull+0.5
2064  Int_t ncolcell = fNMaxColsFull+2;
2065  Float_t colcellmin = -1.5;
2066  Float_t colcellmax = fNMaxColsFull+0.5;
2067 
2069  Float_t rowcellmin = fNMaxRowsFullMin-1.5;
2070  Float_t rowcellmax = fNMaxRowsFullMax+0.5;
2071 
2072  // E bins in TH3
2073  Int_t nEbins = 48;//16 ;
2074  Float_t minE = 2.5;
2075  Float_t maxE = 50.5;//18.5;
2076 
2077  // shower shape bins in TH3
2078  Int_t nShShBins = 200;
2079  Float_t minShSh = 0.;
2080  Float_t maxShSh = 2.;
2081 
2082  // Asymmetry bins
2083  Int_t asyBins = 21;
2084  Float_t asyMax = 1.05;
2085  Float_t asyMin = -1*asyMax;
2086 
2087  // n cell bins for TH3
2088  Int_t cellBins = 15;
2089  Float_t cellMax = 15;
2090  Float_t cellMin = 0;
2091 
2092  //
2093  // Init histograms
2094  //
2096  {
2098  ("hColRowHighEPosTime",
2099  "column vs row, exo < 0.97, E > 8 GeV, t > 5 ns",
2100  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2101  fhColRowHighEPosTime->SetYTitle("row");
2102  fhColRowHighEPosTime->SetXTitle("column");
2103  outputContainer->Add(fhColRowHighEPosTime) ;
2104 
2106  ("hColRowHighENegTime",
2107  "column vs row, exo < 0.97, E > 8 GeV, t < -5 ns",
2108  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2109  fhColRowHighENegTime->SetYTitle("row");
2110  fhColRowHighENegTime->SetXTitle("column");
2111  outputContainer->Add(fhColRowHighENegTime) ;
2112 
2114  ("hColRowHighENulTime",
2115  "column vs row, exo < 0.97, E > 8 GeV, -5 < t < 5 ns",
2116  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2117  fhColRowHighENulTime->SetYTitle("row");
2118  fhColRowHighENulTime->SetXTitle("column");
2119  outputContainer->Add(fhColRowHighENulTime) ;
2120 
2121  if(fStudyExotic)
2122  {
2124  ("hColRowExoticHighE1CellPosTime",
2125  "column vs row, 1 cell, E > 8 GeV, t > 5 ns",
2126  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2127  fhColRowExoticHighE1CellPosTime->SetYTitle("row");
2128  fhColRowExoticHighE1CellPosTime->SetXTitle("column");
2129  outputContainer->Add(fhColRowExoticHighE1CellPosTime) ;
2130 
2132  ("hColRowExoticHighEPosTime",
2133  "column vs row, exo > 0.97, E > 8 GeV, t > 5 ns",
2134  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2135  fhColRowExoticHighEPosTime->SetYTitle("row");
2136  fhColRowExoticHighEPosTime->SetXTitle("column");
2137  outputContainer->Add(fhColRowExoticHighEPosTime) ;
2138 
2140  ("hColRowExoticHighE1CellNegTime",
2141  "column vs row, 1 cell, E > 8 GeV, t < -5 ns",
2142  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2143  fhColRowExoticHighE1CellNegTime->SetYTitle("row");
2144  fhColRowExoticHighE1CellNegTime->SetXTitle("column");
2145  outputContainer->Add(fhColRowExoticHighE1CellNegTime) ;
2146 
2148  ("hColRowExoticHighENegTime",
2149  "column vs row, exo > 0.97, E > 8 GeV, t < -5 ns",
2150  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2151  fhColRowExoticHighENegTime->SetYTitle("row");
2152  fhColRowExoticHighENegTime->SetXTitle("column");
2153  outputContainer->Add(fhColRowExoticHighENegTime) ;
2154 
2156  ("hColRowExoticHighE1CellNulTime",
2157  "column vs row, 1 cell, E > 8 GeV, -5 < t < 5 ns",
2158  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2159  fhColRowExoticHighE1CellNulTime->SetYTitle("row");
2160  fhColRowExoticHighE1CellNulTime->SetXTitle("column");
2161  outputContainer->Add(fhColRowExoticHighE1CellNulTime) ;
2162 
2164  ("hColRowExoticHighENulTime",
2165  "column vs row, exo > 0.97, E > 8 GeV, -5 < t < 5 ns",
2166  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2167  fhColRowExoticHighENulTime->SetYTitle("row");
2168  fhColRowExoticHighENulTime->SetXTitle("column");
2169  outputContainer->Add(fhColRowExoticHighENulTime) ;
2170  }
2171 
2172  TString add[] = {"","TrackMatched"};
2173  for(Int_t tm = 0; tm < 2; tm++)
2174  {
2176  (Form("hColRowTCardCorrNoSelectionLowE%s",add[tm].Data()),
2177  Form("column vs row, max E cell for TCard correlation selected clusters, 5 < E < 8 GeV %s",add[tm].Data()),
2178  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2179  fhColRowTCardCorrNoSelectionLowE[tm]->SetYTitle("row");
2180  fhColRowTCardCorrNoSelectionLowE[tm]->SetXTitle("column");
2181  outputContainer->Add(fhColRowTCardCorrNoSelectionLowE[tm]) ;
2182 
2184  (Form("hColRowTCardCorrNoSelectionHighE%s",add[tm].Data()),
2185  Form("column vs row, max E cell for TCard correlation selected clusters, E > 8 GeV %s",add[tm].Data()),
2186  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2187  fhColRowTCardCorrNoSelectionHighE[tm]->SetYTitle("row");
2188  fhColRowTCardCorrNoSelectionHighE[tm]->SetXTitle("column");
2189  outputContainer->Add(fhColRowTCardCorrNoSelectionHighE[tm]) ;
2190 
2191  //
2192 
2194  (Form("hNCellsTCardCorrNoSelection%s",add[tm].Data()),
2195  Form("# custer # cells vs #it{E} %s",add[tm].Data()),
2196  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
2197  fhNCellsTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2198  fhNCellsTCardCorrNoSelection[tm]->SetYTitle("#it{n}_{cells}");
2199  outputContainer->Add(fhNCellsTCardCorrNoSelection[tm]);
2200 
2202  (Form("hNCellsTCardCorrWithWeightNoSelection%s",add[tm].Data()),
2203  Form("custer # cells vs #it{E}, w > 0.01 %s",add[tm].Data()),
2204  nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
2205  fhNCellsTCardCorrWithWeightNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2206  fhNCellsTCardCorrWithWeightNoSelection[tm]->SetYTitle("#it{n}_{cells}");
2207  outputContainer->Add(fhNCellsTCardCorrWithWeightNoSelection[tm]);
2208 
2210  (Form("hNCellsTCardCorrRatioWithWeightNoSelection%s",add[tm].Data()),
2211  Form("custer # cells vs #it{E}, w > 0.01 %s",add[tm].Data()),
2212  nptbins,ptmin,ptmax, 100,0,1);
2213  fhNCellsTCardCorrRatioWithWeightNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2214  fhNCellsTCardCorrRatioWithWeightNoSelection[tm]->SetYTitle("#it{n}^{w>0.01}_{cells} / #it{n}_{cells}");
2215  outputContainer->Add(fhNCellsTCardCorrRatioWithWeightNoSelection[tm]);
2216 
2217  fhTimeTCardCorrNoSelection[tm] = new TH2F
2218  (Form("hTimeTCardCorrNoSelection%s",add[tm].Data()),
2219  Form("#it{time} vs #it{E} %s",add[tm].Data()),
2220  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2221  fhTimeTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2222  fhTimeTCardCorrNoSelection[tm]->SetYTitle("#it{time} (ns)");
2223  outputContainer->Add(fhTimeTCardCorrNoSelection[tm]);
2224 
2226  (Form("hLambda0TCardCorrNoSelection%s",add[tm].Data()),
2227  Form("#lambda^{2}_{0} vs #it{E} %s",add[tm].Data()),
2228  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2229  fhLambda0TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2230  fhLambda0TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{0}");
2231  outputContainer->Add(fhLambda0TCardCorrNoSelection[tm]);
2232 
2234  (Form("hLambda1TCardCorrNoSelection%s",add[tm].Data()),
2235  Form("#lambda^{2}_{1} vs #it{E} %s",add[tm].Data()),
2236  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2237  fhLambda1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2238  fhLambda1TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{1}");
2239  outputContainer->Add(fhLambda1TCardCorrNoSelection[tm]);
2240 
2242  (Form("hLambda0NLM1TCardCorrNoSelection%s",add[tm].Data()),
2243  Form("#lambda^{2}_{0} vs #it{E}, nlm=1 %s",add[tm].Data()),
2244  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2245  fhLambda0NLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2246  fhLambda0NLM1TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{0}");
2247  outputContainer->Add(fhLambda0NLM1TCardCorrNoSelection[tm]);
2248 
2250  (Form("hLambda1NLM1TCardCorrNoSelection%s",add[tm].Data()),
2251  Form("#lambda^{2}_{1} vs #it{E}, nlm=1 %s",add[tm].Data()),
2252  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2253  fhLambda1NLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2254  fhLambda1NLM1TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{1}");
2255  outputContainer->Add(fhLambda1NLM1TCardCorrNoSelection[tm]);
2256 
2258  (Form("hLambda0NLM2TCardCorrNoSelection%s",add[tm].Data()),
2259  Form("#lambda^{2}_{0} vs #it{E}, nlm=2 %s",add[tm].Data()),
2260  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2261  fhLambda0NLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2262  fhLambda0NLM2TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{0}");
2263  outputContainer->Add(fhLambda0NLM2TCardCorrNoSelection[tm]);
2264 
2266  (Form("hLambda1NLM2TCardCorrNoSelection%s",add[tm].Data()),
2267  Form("#lambda^{2}_{1} vs #it{E}, nlm=2 %s",add[tm].Data()),
2268  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2269  fhLambda1NLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2270  fhLambda1NLM2TCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{1}");
2271  outputContainer->Add(fhLambda1NLM2TCardCorrNoSelection[tm]);
2272 
2273 
2275  (Form("hLambdaRTCardCorrNoSelection%s",add[tm].Data()),
2276  Form("#lambda^{1}_{0}/#lambda^{2}_{0} vs #it{E} %s",add[tm].Data()),
2277  nptbins,ptmin,ptmax,110,0,1.1);
2278  fhLambdaRTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2279  fhLambdaRTCardCorrNoSelection[tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
2280  outputContainer->Add(fhLambdaRTCardCorrNoSelection[tm]);
2281 
2283  (Form("hNLocMaxTCardCorrNoSelection%s",add[tm].Data()),
2284  Form("#it{n}_{LM} vs E %s",add[tm].Data()),
2285  nptbins,ptmin,ptmax,10,0,10);
2286  fhNLocMaxTCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2287  fhNLocMaxTCardCorrNoSelection[tm]->SetYTitle("#it{n}_{LM}");
2288  outputContainer->Add(fhNLocMaxTCardCorrNoSelection[tm]);
2289 
2291  (Form("hEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2292  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
2293  nptbins,ptmin,ptmax,100,0,1);
2294  fhEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2295  fhEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2296  outputContainer->Add(fhEMaxRatNLM1TCardCorrNoSelection[tm]);
2297 
2299  (Form("hEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2300  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2301  nptbins,ptmin,ptmax,100,0,1);
2302  fhEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2303  fhEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2304  outputContainer->Add(fhEMaxRatNLM2TCardCorrNoSelection[tm]);
2305 
2307  (Form("hEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2308  Form("#it{E}_{cell}^{max}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2309  nptbins,ptmin,ptmax,100,0,1);
2310  fhEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2311  fhEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2312  outputContainer->Add(fhEMaxRatNLM3TCardCorrNoSelection[tm]);
2313 
2315  (Form("hE2ndRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2316  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cluster} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
2317  nptbins,ptmin,ptmax,100,0,1);
2318  fhE2ndRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2319  fhE2ndRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
2320  outputContainer->Add(fhE2ndRatNLM1TCardCorrNoSelection[tm]);
2321 
2323  (Form("hE2ndRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2324  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2325  nptbins,ptmin,ptmax,100,0,1);
2326  fhE2ndRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2327  fhE2ndRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2328  outputContainer->Add(fhE2ndRatNLM2TCardCorrNoSelection[tm]);
2329 
2331  (Form("hE2ndRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2332  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2333  nptbins,ptmin,ptmax,100,0,1);
2334  fhE2ndRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2335  fhE2ndRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2336  outputContainer->Add(fhE2ndRatNLM3TCardCorrNoSelection[tm]);
2337 
2338 
2340  (Form("hE2ndEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2341  Form("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}=1 %s",add[tm].Data()),
2342  nptbins,ptmin,ptmax,100,0,1);
2343  fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2344  fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
2345  outputContainer->Add(fhE2ndEMaxRatNLM1TCardCorrNoSelection[tm]);
2346 
2348  (Form("hE2ndEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2349  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2350  nptbins,ptmin,ptmax,100,0,1);
2351  fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2352  fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2353  outputContainer->Add(fhE2ndEMaxRatNLM2TCardCorrNoSelection[tm]);
2354 
2356  (Form("hE2ndEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2357  Form("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2358  nptbins,ptmin,ptmax,100,0,1);
2359  fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2360  fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2361  outputContainer->Add(fhE2ndEMaxRatNLM3TCardCorrNoSelection[tm]);
2362 
2364 
2366  (Form("hE2ndSameRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2367  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()),
2368  nptbins,ptmin,ptmax,100,0,1);
2369  fhE2ndSameRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2370  fhE2ndSameRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
2371  outputContainer->Add(fhE2ndSameRatNLM1TCardCorrNoSelection[tm]);
2372 
2374  (Form("hE2ndSameRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2375  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()),
2376  nptbins,ptmin,ptmax,100,0,1);
2377  fhE2ndSameRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2378  fhE2ndSameRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2379  outputContainer->Add(fhE2ndSameRatNLM2TCardCorrNoSelection[tm]);
2380 
2382  (Form("hE2ndSameRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2383  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()),
2384  nptbins,ptmin,ptmax,100,0,1);
2385  fhE2ndSameRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2386  fhE2ndSameRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2387  outputContainer->Add(fhE2ndSameRatNLM3TCardCorrNoSelection[tm]);
2388 
2389 
2391  (Form("hE2ndSameEMaxRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2392  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()),
2393  nptbins,ptmin,ptmax,100,0,1);
2394  fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2395  fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
2396  outputContainer->Add(fhE2ndSameEMaxRatNLM1TCardCorrNoSelection[tm]);
2397 
2399  (Form("hE2ndSameEMaxRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2400  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()),
2401  nptbins,ptmin,ptmax,100,0,1);
2402  fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2403  fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2404  outputContainer->Add(fhE2ndSameEMaxRatNLM2TCardCorrNoSelection[tm]);
2405 
2407  (Form("hE2ndSameEMaxRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2408  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()),
2409  nptbins,ptmin,ptmax,100,0,1);
2410  fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2411  fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2412  outputContainer->Add(fhE2ndSameEMaxRatNLM3TCardCorrNoSelection[tm]);
2413 
2415 
2417  (Form("hECellClusRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2418  Form("#it{E}_{cell}/#it{E}_{cluster} vs E_{cluster}, #it{n}_{LM}=1 %s",add[tm].Data()),
2419  nptbins,ptmin,ptmax,100,0,1);
2420  fhECellClusRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2421  fhECellClusRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2422  outputContainer->Add(fhECellClusRatNLM1TCardCorrNoSelection[tm]);
2423 
2425  (Form("hECellClusRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2426  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2427  nptbins,ptmin,ptmax,100,0,1);
2428  fhECellClusRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2429  fhECellClusRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2430  outputContainer->Add(fhECellClusRatNLM2TCardCorrNoSelection[tm]);
2431 
2433  (Form("hECellClusRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2434  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2435  nptbins,ptmin,ptmax,100,0,1);
2436  fhECellClusRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2437  fhECellClusRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2438  outputContainer->Add(fhECellClusRatNLM3TCardCorrNoSelection[tm]);
2439 
2441  (Form("hLogECellNLM1TCardCorrNoSelection%s",add[tm].Data()),
2442  Form("log(#it{E}_{cell}) vs E_{cluster}, #it{n}_{LM}=1, w > 0.01 %s",add[tm].Data()),
2443  nptbins,ptmin,ptmax,150,-3,3);
2444  fhLogECellNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2445  fhLogECellNLM1TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2446  outputContainer->Add(fhLogECellNLM1TCardCorrNoSelection[tm]);
2447 
2449  (Form("hLogECellNLM2TCardCorrNoSelection%s",add[tm].Data()),
2450  Form("log(#it{E}_{cell}) vs E, #it{n}_{LM}=2, w > 0.01 %s",add[tm].Data()),
2451  nptbins,ptmin,ptmax,150,-3,3);
2452  fhLogECellNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2453  fhLogECellNLM2TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2454  outputContainer->Add(fhLogECellNLM2TCardCorrNoSelection[tm]);
2455 
2457  (Form("hLogECellNLM3TCardCorrNoSelection%s",add[tm].Data()),
2458  Form("log(#it{E}_{cell}) vs E, #it{n}_{LM}>2, w > 0.01 %s",add[tm].Data()),
2459  nptbins,ptmin,ptmax,150,-3,3);
2460  fhLogECellNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2461  fhLogECellNLM3TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2462  outputContainer->Add(fhLogECellNLM3TCardCorrNoSelection[tm]);
2463 
2464 
2466  (Form("hECellWeightNLM1TCardCorrNoSelection%s",add[tm].Data()),
2467  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs E_{cluster}, #it{n}_{LM}=1 %s",add[tm].Data()),
2468  nptbins,ptmin,ptmax,90,0,4.5);
2469  fhECellWeightNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2470  fhECellWeightNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2471  outputContainer->Add(fhECellWeightNLM1TCardCorrNoSelection[tm]);
2472 
2474  (Form("hECellWeightNLM2TCardCorrNoSelection%s",add[tm].Data()),
2475  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster})) vs E, #it{n}_{LM}=2 %s",add[tm].Data()),
2476  nptbins,ptmin,ptmax,90,0,4.5);
2477  fhECellWeightNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2478  fhECellWeightNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2479  outputContainer->Add(fhECellWeightNLM2TCardCorrNoSelection[tm]);
2480 
2482  (Form("hECellWeightNLM3TCardCorrNoSelection%s",add[tm].Data()),
2483  Form("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))vs E, #it{n}_{LM}>2 %s",add[tm].Data()),
2484  nptbins,ptmin,ptmax,90,0,4.5);
2485  fhECellWeightNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2486  fhECellWeightNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2487  outputContainer->Add(fhECellWeightNLM3TCardCorrNoSelection[tm]);
2488 
2489 
2491  (Form("hECellSameClusRatNLM1TCardCorrNoSelection%s",add[tm].Data()),
2492  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()),
2493  nptbins,ptmin,ptmax,100,0,1);
2494  fhECellSameClusRatNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2495  fhECellSameClusRatNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2496  outputContainer->Add(fhECellSameClusRatNLM1TCardCorrNoSelection[tm]);
2497 
2499  (Form("hECellSameClusRatNLM2TCardCorrNoSelection%s",add[tm].Data()),
2500  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, cell from same T-Card as leading, #it{n}_{LM}=2 %s",add[tm].Data()),
2501  nptbins,ptmin,ptmax,100,0,1);
2502  fhECellSameClusRatNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2503  fhECellSameClusRatNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2504  outputContainer->Add(fhECellSameClusRatNLM2TCardCorrNoSelection[tm]);
2505 
2507  (Form("hECellSameClusRatNLM3TCardCorrNoSelection%s",add[tm].Data()),
2508  Form("#it{E}_{cell}/#it{E}_{cluster} vs E, cell from same T-Card as leading, #it{n}_{LM}>2 %s",add[tm].Data()),
2509  nptbins,ptmin,ptmax,100,0,1);
2510  fhECellSameClusRatNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2511  fhECellSameClusRatNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2512  outputContainer->Add(fhECellSameClusRatNLM3TCardCorrNoSelection[tm]);
2513 
2515  (Form("hLogECellSameNLM1TCardCorrNoSelection%s",add[tm].Data()),
2516  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()),
2517  nptbins,ptmin,ptmax,150,-3,3);
2518  fhLogECellSameNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2519  fhLogECellSameNLM1TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2520  outputContainer->Add(fhLogECellSameNLM1TCardCorrNoSelection[tm]);
2521 
2523  (Form("hLogECellSameNLM2TCardCorrNoSelection%s",add[tm].Data()),
2524  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()),
2525  nptbins,ptmin,ptmax,150,-3,3);
2526  fhLogECellSameNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2527  fhLogECellSameNLM2TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2528  outputContainer->Add(fhLogECellSameNLM2TCardCorrNoSelection[tm]);
2529 
2531  (Form("hLogECellSameNLM3TCardCorrNoSelection%s",add[tm].Data()),
2532  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()),
2533  nptbins,ptmin,ptmax,150,-3,3);
2534  fhLogECellSameNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2535  fhLogECellSameNLM3TCardCorrNoSelection[tm]->SetYTitle("log(#it{E}_{cell})");
2536  outputContainer->Add(fhLogECellSameNLM3TCardCorrNoSelection[tm]);
2537 
2538 
2540  (Form("hECellSameWeightNLM1TCardCorrNoSelection%s",add[tm].Data()),
2541  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()),
2542  nptbins,ptmin,ptmax,90,0,4.5);
2543  fhECellSameWeightNLM1TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2544  fhECellSameWeightNLM1TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2545  outputContainer->Add(fhECellSameWeightNLM1TCardCorrNoSelection[tm]);
2546 
2548  (Form("hECellSameWeightNLM2TCardCorrNoSelection%s",add[tm].Data()),
2549  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()),
2550  nptbins,ptmin,ptmax,90,0,4.5);
2551  fhECellSameWeightNLM2TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2552  fhECellSameWeightNLM2TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2553  outputContainer->Add(fhECellSameWeightNLM2TCardCorrNoSelection[tm]);
2554 
2556  (Form("hECellSameWeightNLM3TCardCorrNoSelection%s",add[tm].Data()),
2557  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()),
2558  nptbins,ptmin,ptmax,90,0,4.5);
2559  fhECellSameWeightNLM3TCardCorrNoSelection[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2560  fhECellSameWeightNLM3TCardCorrNoSelection[tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
2561  outputContainer->Add(fhECellSameWeightNLM3TCardCorrNoSelection[tm]);
2562 
2564  (Form("hExoticTCardCorrNoSelection%s",add[tm].Data()),
2565  Form("exoticity vs #it{E} %s",add[tm].Data()),
2566  nptbins,ptmin,ptmax,200,-1,1);
2567  fhExoticTCardCorrNoSelection[tm]->SetXTitle("#it{E} (GeV)");
2568  fhExoticTCardCorrNoSelection[tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
2569  outputContainer->Add(fhExoticTCardCorrNoSelection[tm]);
2570 
2572  (Form("hNCellsTCardSameAndDiffFraction%s",add[tm].Data()),
2573  Form("#it{n}_{cells} same TCard vs diff TCard fraction, w > 0.01, %s",add[tm].Data()),
2574  nptbins,ptmin,ptmax,100,0,1);
2575  fhNCellsTCardSameAndDiffFraction[tm]->SetXTitle("#it{E} (GeV)");
2576  fhNCellsTCardSameAndDiffFraction[tm]->SetYTitle("#it{n}_{cells} - same TCard / #it{n}_{cells} - total");
2577  outputContainer->Add(fhNCellsTCardSameAndDiffFraction[tm]);
2578 
2580  (Form("hSameRowDiffColAndTCardCellsEnergyDiffClusterE%s",add[tm].Data()),
2581  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()),
2582  nptbins,ptmin,ptmax,200,-10,10);
2583  fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2584  fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
2585  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffClusterE[tm]);
2586 
2588  (Form("hSameRowDiffColAndTCardCellsTimeDiffClusterE%s",add[tm].Data()),
2589  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()),
2590  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
2591  fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2592  fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
2593  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffClusterE[tm]);
2594 
2596  (Form("hSameRowDiffColAndTCardCellsEnergyDiffCellMaxE%s",add[tm].Data()),
2597  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()),
2598  nptbins,ptmin,ptmax,200,-10,10);
2599  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
2600  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
2601  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxE[tm]);
2602 
2604  (Form("hSameRowDiffColAndTCardCellsTimeDiffCellMaxE%s",add[tm].Data()),
2605  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()),
2606  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
2607  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
2608  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
2609  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffCellMaxE[tm]);
2610 
2611  if(fStudyExotic)
2612  {
2613  fhEnergyTime1Cell[tm] = new TH2F
2614  (Form("hEnergyTime1Cell%s",add[tm].Data()),
2615  Form("#it{t} vs #it{E}, 1 cells cluster %s",add[tm].Data()),
2616  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2617  fhEnergyTime1Cell[tm]->SetXTitle("#it{E} (GeV)");
2618  fhEnergyTime1Cell[tm]->SetYTitle("#it{t} (ns)");
2619  outputContainer->Add(fhEnergyTime1Cell[tm]);
2620 
2621  fhEnergyTimeExotic[tm] = new TH2F
2622  (Form("hEnergyTimeExotic%s",add[tm].Data()),
2623  Form("#it{t} vs #it{E}, exo > 0.97, %s",add[tm].Data()),
2624  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2625  fhEnergyTimeExotic[tm]->SetXTitle("#it{E} (GeV)");
2626  fhEnergyTimeExotic[tm]->SetYTitle("#it{t} (ns)");
2627  outputContainer->Add(fhEnergyTimeExotic[tm]);
2628 
2630  (Form("hEnergyTimeTCardCorrNoSelection1Cell%s",add[tm].Data()),
2631  Form("#it{t} vs #it{E}, 1 cells cluster %s",add[tm].Data()),
2632  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2633  fhEnergyTimeTCardCorrNoSelection1Cell[tm]->SetXTitle("#it{E} (GeV)");
2634  fhEnergyTimeTCardCorrNoSelection1Cell[tm]->SetYTitle("#it{t} (ns)");
2635  outputContainer->Add(fhEnergyTimeTCardCorrNoSelection1Cell[tm]);
2636 
2638  (Form("hEnergyTimeTCardCorrNoSelectionExotic%s",add[tm].Data()),
2639  Form("#it{t} vs #it{E}, exo > 0.97, %s",add[tm].Data()),
2640  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2641  fhEnergyTimeTCardCorrNoSelectionExotic[tm]->SetXTitle("#it{E} (GeV)");
2642  fhEnergyTimeTCardCorrNoSelectionExotic[tm]->SetYTitle("#it{t} (ns)");
2643  outputContainer->Add(fhEnergyTimeTCardCorrNoSelectionExotic[tm]);
2644 
2645  fhColRowExoticLowE1Cell[tm] = new TH2F
2646  (Form("hColRowExoticLowE1Cell%s",add[tm].Data()),
2647  Form("column vs row, 1 cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2648  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2649  fhColRowExoticLowE1Cell[tm]->SetYTitle("row");
2650  fhColRowExoticLowE1Cell[tm]->SetXTitle("column");
2651  outputContainer->Add(fhColRowExoticLowE1Cell[tm]) ;
2652 
2653  fhColRowExoticHighE1Cell[tm] = new TH2F
2654  (Form("hColRowExoticHighE1Cell%s",add[tm].Data()),
2655  Form("column vs row, 1 cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2656  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2657  fhColRowExoticHighE1Cell[tm]->SetYTitle("row");
2658  fhColRowExoticHighE1Cell[tm]->SetXTitle("column");
2659  outputContainer->Add(fhColRowExoticHighE1Cell[tm]) ;
2660 
2661  fhColRowExoticLowE[tm] = new TH2F
2662  (Form("hColRowExoticLowE%s",add[tm].Data()),
2663  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2664  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2665  fhColRowExoticLowE[tm]->SetYTitle("row");
2666  fhColRowExoticLowE[tm]->SetXTitle("column");
2667  outputContainer->Add(fhColRowExoticLowE[tm]) ;
2668 
2669  fhColRowExoticHighE[tm] = new TH2F
2670  (Form("hColRowExoticHighE%s",add[tm].Data()),
2671  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2672  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2673  fhColRowExoticHighE[tm]->SetYTitle("row");
2674  fhColRowExoticHighE[tm]->SetXTitle("column");
2675  outputContainer->Add(fhColRowExoticHighE[tm]) ;
2676 
2678  (Form("hColRowExotic2ndCellDiffLowE%s",add[tm].Data()),
2679  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2680  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2681  fhColRowExotic2ndCellDiffLowE[tm]->SetYTitle("row");
2682  fhColRowExotic2ndCellDiffLowE[tm]->SetXTitle("column");
2683  outputContainer->Add(fhColRowExotic2ndCellDiffLowE[tm]) ;
2684 
2686  (Form("hColRowExotic2ndCellDiffHighE%s",add[tm].Data()),
2687  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2688  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2689  fhColRowExotic2ndCellDiffHighE[tm]->SetYTitle("row");
2690  fhColRowExotic2ndCellDiffHighE[tm]->SetXTitle("column");
2691  outputContainer->Add(fhColRowExotic2ndCellDiffHighE[tm]) ;
2692 
2694  (Form("hColRowExotic2ndCellSameLowE%s",add[tm].Data()),
2695  Form("column vs row, max E cell, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2696  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2697  fhColRowExotic2ndCellSameLowE[tm]->SetYTitle("row");
2698  fhColRowExotic2ndCellSameLowE[tm]->SetXTitle("column");
2699  outputContainer->Add(fhColRowExotic2ndCellSameLowE[tm]) ;
2700 
2702  (Form("hColRowExotic2ndCellSameHighE%s",add[tm].Data()),
2703  Form("column vs row, max E cell, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2704  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2705  fhColRowExotic2ndCellSameHighE[tm]->SetYTitle("row");
2706  fhColRowExotic2ndCellSameHighE[tm]->SetXTitle("column");
2707  outputContainer->Add(fhColRowExotic2ndCellSameHighE[tm]) ;
2708 
2710  (Form("hColRowTCardCorrNoSelectionExoticLowE%s",add[tm].Data()),
2711  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2712  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2713  fhColRowTCardCorrNoSelectionExoticLowE[tm]->SetYTitle("row");
2714  fhColRowTCardCorrNoSelectionExoticLowE[tm]->SetXTitle("column");
2715  outputContainer->Add(fhColRowTCardCorrNoSelectionExoticLowE[tm]) ;
2716 
2718  (Form("hColRowTCardCorrNoSelectionExoticHighE%s",add[tm].Data()),
2719  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2720  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2721  fhColRowTCardCorrNoSelectionExoticHighE[tm]->SetYTitle("row");
2722  fhColRowTCardCorrNoSelectionExoticHighE[tm]->SetXTitle("column");
2723  outputContainer->Add(fhColRowTCardCorrNoSelectionExoticHighE[tm]) ;
2724 
2726  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffLowE%s",add[tm].Data()),
2727  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2728  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2730  fhColRowTCardCorrNoSelectionExotic2ndCellDiffLowE[tm]->SetXTitle("column");
2731  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellDiffLowE[tm]) ;
2732 
2734  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffHighE%s",add[tm].Data()),
2735  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2736  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2738  fhColRowTCardCorrNoSelectionExotic2ndCellDiffHighE[tm]->SetXTitle("column");
2739  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellDiffHighE[tm]) ;
2740 
2742  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameLowE%s",add[tm].Data()),
2743  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2744  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2746  fhColRowTCardCorrNoSelectionExotic2ndCellSameLowE[tm]->SetXTitle("column");
2747  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellSameLowE[tm]) ;
2748 
2750  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameHighE%s",add[tm].Data()),
2751  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2752  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2754  fhColRowTCardCorrNoSelectionExotic2ndCellSameHighE[tm]->SetXTitle("column");
2755  outputContainer->Add(fhColRowTCardCorrNoSelectionExotic2ndCellSameHighE[tm]) ;
2756 
2758  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameLowE%s",add[tm].Data()),
2759  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2760  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2764 
2766  (Form("hColRowTCardCorrNoSelectionExotic2ndCellDiffNoSameHighE%s",add[tm].Data()),
2767  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2768  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2772 
2774  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffLowE%s",add[tm].Data()),
2775  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, 5 < E < 8 GeV %s",add[tm].Data()),
2776  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2780 
2782  (Form("hColRowTCardCorrNoSelectionExotic2ndCellSameNoDiffHighE%s",add[tm].Data()),
2783  Form("column vs row, max E cell for TCard correlation selected clusters, exo > 0.97, E > 8 GeV %s",add[tm].Data()),
2784  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
2788 
2790  (Form("hNCellsTCardSameAndDiffFraction_Exotic%s",add[tm].Data()),
2791  Form("#it{n}_{cells} same TCard vs diff TCard fraction, w > 0.01, exo > 0.97 %s",add[tm].Data()),
2792  nptbins,ptmin,ptmax,100,0,1);
2793  fhNCellsTCardSameAndDiffFractionExotic[tm]->SetXTitle("#it{E} (GeV)");
2794  fhNCellsTCardSameAndDiffFractionExotic[tm]->SetYTitle("#it{n}_{cells} - same TCard / #it{n}_{cells} - total");
2795  outputContainer->Add(fhNCellsTCardSameAndDiffFractionExotic[tm]);
2796 
2798  (Form("hSameRowDiffColAndTCardCellsEnergyDiffClusterEExo%s",add[tm].Data()),
2799  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()),
2800  nptbins,ptmin,ptmax,200,-10,10);
2801  fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2802  fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
2803  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffClusterEExo[tm]);
2804 
2806  (Form("hSameRowDiffColAndTCardCellsTimeDiffClusterEExo%s",add[tm].Data()),
2807  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()),
2808  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
2809  fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2810  fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
2811  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffClusterEExo[tm]);
2812 
2814  (Form("hSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo%s",add[tm].Data()),
2815  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()),
2816  nptbins,ptmin,ptmax,200,-10,10);
2817  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
2818  fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]->SetYTitle("#it{E}_{cell}^{same TCard}-#it{E}_{cell}^{diff TCard} (GeV)");
2819  outputContainer->Add(fhSameRowDiffColAndTCardCellsEnergyDiffCellMaxEExo[tm]);
2820 
2822  (Form("hSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo%s",add[tm].Data()),
2823  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()),
2824  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
2825  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]->SetXTitle("#it{E}_{cell max} (GeV)");
2826  fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]->SetYTitle("#it{t}_{cell}^{same TCard}-#it{t}_{cell}^{diff TCard} (ns)");
2827  outputContainer->Add(fhSameRowDiffColAndTCardCellsTimeDiffCellMaxEExo[tm]);
2828  }
2829 
2830  for(Int_t i = 0; i < 6; i++)
2831  {
2832  for(Int_t j = 0; j < 6; j++)
2833  {
2834  fhLambda0TCardCorrelNCell[i][j][tm] = new TH2F
2835  (Form("hLambda0TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2836  Form("#lambda^{2}_{0} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
2837  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2838  fhLambda0TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
2839  fhLambda0TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{0}");
2840  outputContainer->Add(fhLambda0TCardCorrelNCell[i][j][tm]);
2841 
2842  fhLambda1TCardCorrelNCell[i][j][tm] = new TH2F
2843  (Form("hLambda1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2844  Form("#lambda^{2}_{1} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
2845  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2846  fhLambda1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
2847  fhLambda1TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{1}");
2848  outputContainer->Add(fhLambda1TCardCorrelNCell[i][j][tm]);
2849 
2850  fhLambda0NLM1TCardCorrelNCell[i][j][tm] = new TH2F
2851  (Form("hLambda0NLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2852  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()),
2853  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2854  fhLambda0NLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
2855  fhLambda0NLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{0}");
2856  outputContainer->Add(fhLambda0NLM1TCardCorrelNCell[i][j][tm]);
2857 
2858  fhLambda1NLM1TCardCorrelNCell[i][j][tm] = new TH2F
2859  (Form("hLambda1NLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2860  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()),
2861  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2862  fhLambda1NLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
2863  fhLambda1NLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{1}");
2864  outputContainer->Add(fhLambda1NLM1TCardCorrelNCell[i][j][tm]);
2865 
2866  fhLambda0NLM2TCardCorrelNCell[i][j][tm] = new TH2F
2867  (Form("hLambda0NLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2868  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()),
2869  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2870  fhLambda0NLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
2871  fhLambda0NLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{0}");
2872  outputContainer->Add(fhLambda0NLM2TCardCorrelNCell[i][j][tm]);
2873 
2874  fhLambda1NLM2TCardCorrelNCell[i][j][tm] = new TH2F
2875  (Form("hLambda1NLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2876  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()),
2877  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2878  fhLambda1NLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
2879  fhLambda1NLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{1}");
2880  outputContainer->Add(fhLambda1NLM2TCardCorrelNCell[i][j][tm]);
2881 
2882 
2883  // fhLambdaRTCardCorrelNCell[i][j][tm] = new TH2F
2884  // (Form("hLambdaRTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2885  // 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()),
2886  // nptbins,ptmin,ptmax,110,0,1.1);
2887  // fhLambdaRTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
2888  // fhLambdaRTCardCorrelNCell[i][j][tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
2889  // outputContainer->Add(fhLambdaRTCardCorrelNCell[i][j][tm]);
2890 
2891  fhNLocMaxTCardCorrelNCell[i][j][tm] = new TH2F
2892  (Form("hNLocMaxTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2893  Form("#it{n}_{LM} vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
2894  nptbins,ptmin,ptmax,10,0,10);
2895  fhNLocMaxTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
2896  fhNLocMaxTCardCorrelNCell[i][j][tm]->SetYTitle("#it{n}_{LM}");
2897  outputContainer->Add(fhNLocMaxTCardCorrelNCell[i][j][tm]);
2898 
2899  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
2900  (Form("hEMaxRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2901  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()),
2902  nptbins,ptmin,ptmax,100,0,1);
2903  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2904  fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2905  outputContainer->Add(fhEMaxRatNLM1TCardCorrelNCell[i][j][tm]);
2906 
2907  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
2908  (Form("hEMaxRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2909  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()),
2910  nptbins,ptmin,ptmax,100,0,1);
2911  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2912  fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2913  outputContainer->Add(fhEMaxRatNLM2TCardCorrelNCell[i][j][tm]);
2914 
2915  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
2916  (Form("hEMaxRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2917  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()),
2918  nptbins,ptmin,ptmax,100,0,1);
2919  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2920  fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{max}/#it{E}_{cluster}");
2921  outputContainer->Add(fhEMaxRatNLM3TCardCorrelNCell[i][j][tm]);
2922 
2923  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
2924  (Form("hE2ndRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2925  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()),
2926  nptbins,ptmin,ptmax,100,0,1);
2927  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2928  fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cluster}");
2929  outputContainer->Add(fhE2ndRatNLM1TCardCorrelNCell[i][j][tm]);
2930 
2931  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
2932  (Form("hE2ndRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2933  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()),
2934  nptbins,ptmin,ptmax,100,0,1);
2935  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2936  fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2937  outputContainer->Add(fhE2ndRatNLM2TCardCorrelNCell[i][j][tm]);
2938 
2939  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
2940  (Form("hE2ndRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2941  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()),
2942  nptbins,ptmin,ptmax,100,0,1);
2943  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2944  fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cluster}");
2945  outputContainer->Add(fhE2ndRatNLM3TCardCorrelNCell[i][j][tm]);
2946 
2947  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
2948  (Form("hE2ndEMaxRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2949  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()),
2950  nptbins,ptmin,ptmax,100,0,1);
2951  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2952  fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd max}/#it{E}_{cell}^{max}");
2953  outputContainer->Add(fhE2ndEMaxRatNLM1TCardCorrelNCell[i][j][tm]);
2954 
2955  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
2956  (Form("hE2ndEMaxRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2957  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()),
2958  nptbins,ptmin,ptmax,100,0,1);
2959  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2960  fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2961  outputContainer->Add(fhE2ndEMaxRatNLM2TCardCorrelNCell[i][j][tm]);
2962 
2963  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
2964  (Form("hE2ndEMaxRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2965  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()),
2966  nptbins,ptmin,ptmax,100,0,1);
2967  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2968  fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}^{2nd loc max}/#it{E}_{cell}^{max}");
2969  outputContainer->Add(fhE2ndEMaxRatNLM3TCardCorrelNCell[i][j][tm]);
2970 
2971 
2972  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm] = new TH2F
2973  (Form("hECellClusRatNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2974  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()),
2975  nptbins,ptmin,ptmax,100,0,1);
2976  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2977  fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2978  outputContainer->Add(fhECellClusRatNLM1TCardCorrelNCell[i][j][tm]);
2979 
2980  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm] = new TH2F
2981  (Form("hECellClusRatNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2982  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()),
2983  nptbins,ptmin,ptmax,100,0,1);
2984  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2985  fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2986  outputContainer->Add(fhECellClusRatNLM2TCardCorrelNCell[i][j][tm]);
2987 
2988  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm] = new TH2F
2989  (Form("hECellClusRatNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2990  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()),
2991  nptbins,ptmin,ptmax,100,0,1);
2992  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
2993  fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
2994  outputContainer->Add(fhECellClusRatNLM3TCardCorrelNCell[i][j][tm]);
2995 
2996  fhLogECellNLM1TCardCorrelNCell[i][j][tm] = new TH2F
2997  (Form("hLogECellNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
2998  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()),
2999  nptbins,ptmin,ptmax,150,-3,3);
3000  fhLogECellNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3001  fhLogECellNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
3002  outputContainer->Add(fhLogECellNLM1TCardCorrelNCell[i][j][tm]);
3003 
3004  fhLogECellNLM2TCardCorrelNCell[i][j][tm] = new TH2F
3005  (Form("hLogECellNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3006  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()),
3007  nptbins,ptmin,ptmax,150,-3,3);
3008  fhLogECellNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3009  fhLogECellNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
3010  outputContainer->Add(fhLogECellNLM2TCardCorrelNCell[i][j][tm]);
3011 
3012  fhLogECellNLM3TCardCorrelNCell[i][j][tm] = new TH2F
3013  (Form("hLogECellNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3014  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()),
3015  nptbins,ptmin,ptmax,150,-3,3);
3016  fhLogECellNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3017  fhLogECellNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("log(#it{E}_{cell})");
3018  outputContainer->Add(fhLogECellNLM3TCardCorrelNCell[i][j][tm]);
3019 
3020  fhECellWeightNLM1TCardCorrelNCell[i][j][tm] = new TH2F
3021  (Form("hECellWeightNLM1TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3022  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()),
3023  nptbins,ptmin,ptmax,90,0,4.5);
3024  fhECellWeightNLM1TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3025  fhECellWeightNLM1TCardCorrelNCell[i][j][tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3026  outputContainer->Add(fhECellWeightNLM1TCardCorrelNCell[i][j][tm]);
3027 
3028  fhECellWeightNLM2TCardCorrelNCell[i][j][tm] = new TH2F
3029  (Form("hECellWeightNLM2TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3030  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()),
3031  nptbins,ptmin,ptmax,90,0,4.5);
3032  fhECellWeightNLM2TCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3033  fhECellWeightNLM2TCardCorrelNCell[i][j][tm]->SetYTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3034  outputContainer->Add(fhECellWeightNLM2TCardCorrelNCell[i][j][tm]);
3035 
3036  fhECellWeightNLM3TCardCorrelNCell[i][j][tm] = new TH2F
3037  (Form("hECellWeightNLM3TCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3038  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()),
3039  nptbins,ptmin,ptmax,90,0,4.5);
3040  fhECellWeightNLM3TCardCorrelNCell[i][j][tm]->SetXTitle("#it{w}=Max(4,5+log(#it{E}_{cell}/#it{E}_{cluster}))");
3041  fhECellWeightNLM3TCardCorrelNCell[i][j][tm]->SetYTitle("Log. weight");
3042  outputContainer->Add(fhECellWeightNLM3TCardCorrelNCell[i][j][tm]);
3043 
3044  fhMassEClusTCardCorrelNCell[i][j][tm] = new TH2F
3045  (Form("hMassEClusTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3046  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()),
3047  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
3048  fhMassEClusTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{cluster} (GeV)");
3049  fhMassEClusTCardCorrelNCell[i][j][tm]->SetYTitle("#it{M}_{#gamma #gamma}");
3050  outputContainer->Add(fhMassEClusTCardCorrelNCell[i][j][tm]);
3051 
3052  // fhMassEPairTCardCorrelNCell[i][j][tm] = new TH2F
3053  // (Form("hMassEPairTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3054  // 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()),
3055  // nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
3056  // fhMassEPairTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E}_{pair} (GeV)");
3057  // fhMassEPairTCardCorrelNCell[i][j][tm]->SetYTitle("#it{M}_{#gamma #gamma}");
3058  // outputContainer->Add(fhMassEPairTCardCorrelNCell[i][j][tm]);
3059 
3060  fhTimeDiffTCardCorrelNCell[i][j][tm] = new TH2F
3061  (Form("hTimeDiffTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3062  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()),
3063  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
3064  fhTimeDiffTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3065  fhTimeDiffTCardCorrelNCell[i][j][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell}^{other}");
3066  outputContainer->Add(fhTimeDiffTCardCorrelNCell[i][j][tm]);
3067 
3068  fhColRowTCardCorrelNCellLowE[i][j][tm] = new TH2F
3069  (Form("hColRowTCardCorrelNCellLowE_Same%d_Diff%d%s",i,j,add[tm].Data()),
3070  Form("column vs row, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3071  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3072  fhColRowTCardCorrelNCellLowE[i][j][tm]->SetYTitle("row");
3073  fhColRowTCardCorrelNCellLowE[i][j][tm]->SetXTitle("column");
3074  outputContainer->Add(fhColRowTCardCorrelNCellLowE[i][j][tm]) ;
3075 
3076  fhColRowTCardCorrelNCellHighE[i][j][tm] = new TH2F
3077  (Form("hColRowTCardCorrelNCellHighE_Same%d_Diff%d%s",i,j,add[tm].Data()),
3078  Form("column vs row,N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3079  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3080  fhColRowTCardCorrelNCellHighE[i][j][tm]->SetYTitle("row");
3081  fhColRowTCardCorrelNCellHighE[i][j][tm]->SetXTitle("column");
3082  outputContainer->Add(fhColRowTCardCorrelNCellHighE[i][j][tm]) ;
3083 
3084  if(fStudyExotic)
3085  {
3086  fhExoticTCardCorrelNCell[i][j][tm] = new TH2F
3087  (Form("hExoticTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3088  Form("exoticity vs #it{E}, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3089  nptbins,ptmin,ptmax,200,-1,1);
3090  fhExoticTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3091  fhExoticTCardCorrelNCell[i][j][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3092  outputContainer->Add(fhExoticTCardCorrelNCell[i][j][tm]);
3093 
3094  fhTimeDiffExoTCardCorrelNCell[i][j][tm] = new TH2F
3095  (Form("hTimeDiffExoTCardCorrelNCell_Same%d_Diff%d%s",i,j,add[tm].Data()),
3096  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()),
3097  nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
3098  fhTimeDiffExoTCardCorrelNCell[i][j][tm]->SetXTitle("#it{E} (GeV)");
3099  fhTimeDiffExoTCardCorrelNCell[i][j][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell}^{other}");
3100  outputContainer->Add(fhTimeDiffExoTCardCorrelNCell[i][j][tm]);
3101 
3103  (Form("hColRowTCardCorrelNCellExoticLowE_Same%d_Diff%d%s",i,j,add[tm].Data()),
3104  Form("column vs row, N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3105  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3106  fhColRowTCardCorrelNCellExoticLowE[i][j][tm]->SetYTitle("row");
3107  fhColRowTCardCorrelNCellExoticLowE[i][j][tm]->SetXTitle("column");
3108  outputContainer->Add(fhColRowTCardCorrelNCellExoticLowE[i][j][tm]) ;
3109 
3111  (Form("hColRowTCardCorrelNCellExoticHighE_Same%d_Diff%d%s",i,j,add[tm].Data()),
3112  Form("column vs row,N cells with w > 0.01, TCard same = %d, diff =%d %s",i,j,add[tm].Data()),
3113  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3114  fhColRowTCardCorrelNCellExoticHighE[i][j][tm]->SetYTitle("row");
3115  fhColRowTCardCorrelNCellExoticHighE[i][j][tm]->SetXTitle("column");
3116  outputContainer->Add(fhColRowTCardCorrelNCellExoticHighE[i][j][tm]) ;
3117  }
3118  }
3119 
3122 
3123  // fhLambda0TCardCorrelN[i][tm] = new TH2F
3124  // (Form("hLambda0TCardCorrelN_Case%d%s",i,add[tm].Data()),
3125  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
3126  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3127  // fhLambda0TCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
3128  // fhLambda0TCardCorrelN[i][tm]->SetYTitle("#lambda^{2}_{0}");
3129  // outputContainer->Add(fhLambda0TCardCorrelN[i][tm]);
3130  //
3131  // fhNCellsTCardCorrelN[i][tm] = new TH2F
3132  // (Form("hNCellsTCardCorrelN_Case%d%s",i,add[tm].Data()),
3133  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
3134  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3135  // fhNCellsTCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
3136  // fhNCellsTCardCorrelN[i][tm]->SetYTitle("#it{n}_{cells}");
3137  // outputContainer->Add(fhNCellsTCardCorrelN[i][tm]);
3138  //
3139  // fhExoticTCardCorrelN[i][tm] = new TH2F
3140  // (Form("hExoticTCardCorrelN_Case%d%s",i,add[tm].Data()),
3141  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
3142  // nptbins,ptmin,ptmax,200,-1,1);
3143  // fhExoticTCardCorrelN[i][tm]->SetXTitle("#it{E} (GeV)");
3144  // fhExoticTCardCorrelN[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3145  // outputContainer->Add(fhExoticTCardCorrelN[i][tm]);
3146  //
3147  // fhColRowTCardCorrelNLowE[i][tm] = new TH2F
3148  // (Form("hColRowTCardCorrelNLowE_Case%d%s",i,add[tm].Data()),
3149  // Form("column vs row, max E cell correl with TCard cell, E > 2 GeV, N corr = %d %s",i,add[tm].Data()),
3150  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3151  // fhColRowTCardCorrelNLowE[i][tm]->SetYTitle("row");
3152  // fhColRowTCardCorrelNLowE[i][tm]->SetXTitle("column");
3153  // outputContainer->Add(fhColRowTCardCorrelNLowE[i][tm]) ;
3154  //
3155  // fhColRowTCardCorrelNHighE[i][tm] = new TH2F
3156  // (Form("hColRowTCardCorrelNHighE_Case%d%s",i,add[tm].Data()),
3157  // Form("column vs row, max E cell correl with TCard cell, E > 8 GeV, N corr = %d %s",i,add[tm].Data()),
3158  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3159  // fhColRowTCardCorrelNHighE[i][tm]->SetYTitle("row");
3160  // fhColRowTCardCorrelNHighE[i][tm]->SetXTitle("column");
3161  // outputContainer->Add(fhColRowTCardCorrelNHighE[i][tm]) ;
3162  //
3163  // ////////
3164  // ////////
3165  //
3166  // fhLambda0TCardCorrelNExotic[i][tm] = new TH2F
3167  // (Form("hLambda0TCardCorrelN_Exotic_Case%d%s",i,add[tm].Data()),
3168  // 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()),
3169  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3170  // fhLambda0TCardCorrelNExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3171  // fhLambda0TCardCorrelNExotic[i][tm]->SetYTitle("#lambda^{2}_{0}");
3172  // outputContainer->Add(fhLambda0TCardCorrelNExotic[i][tm]);
3173  //
3174  // fhNCellsTCardCorrelNExotic[i][tm] = new TH2F
3175  // (Form("hNCellsTCardCorrelN_Exotic_Case%d%s",i,add[tm].Data()),
3176  // 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()),
3177  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3178  // fhNCellsTCardCorrelNExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3179  // fhNCellsTCardCorrelNExotic[i][tm]->SetYTitle("#it{n}_{cells}");
3180  // outputContainer->Add(fhNCellsTCardCorrelNExotic[i][tm]);
3181  //
3182  // fhColRowTCardCorrelNLowEExotic[i][tm] = new TH2F
3183  // (Form("hColRowTCardCorrelNLowEExotic_Case%d%s",i,add[tm].Data()),
3184  // 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()),
3185  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3186  // fhColRowTCardCorrelNLowEExotic[i][tm]->SetYTitle("row");
3187  // fhColRowTCardCorrelNLowEExotic[i][tm]->SetXTitle("column");
3188  // outputContainer->Add(fhColRowTCardCorrelNLowEExotic[i][tm]) ;
3189  //
3190  // fhColRowTCardCorrelNHighEExotic[i][tm] = new TH2F
3191  // (Form("hColRowTCardCorrelNHighEExotic_Case%d%s",i,add[tm].Data()),
3192  // 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()),
3193  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3194  // fhColRowTCardCorrelNHighEExotic[i][tm]->SetYTitle("row");
3195  // fhColRowTCardCorrelNHighEExotic[i][tm]->SetXTitle("column");
3196  // outputContainer->Add(fhColRowTCardCorrelNHighEExotic[i][tm]) ;
3197  //
3198  // ///////////
3199  // ///////////
3200  //
3201  // fhLambda0TCardCorrelNAllSameTCard[i][tm] = new TH2F
3202  // (Form("hLambda0TCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
3203  // 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()),
3204  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3205  // fhLambda0TCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3206  // fhLambda0TCardCorrelNAllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{0}");
3207  // outputContainer->Add(fhLambda0TCardCorrelNAllSameTCard[i][tm]);
3208  //
3209  // fhNCellsTCardCorrelNAllSameTCard[i][tm] = new TH2F
3210  // (Form("hNCellsTCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
3211  // 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()),
3212  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3213  // fhNCellsTCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3214  // fhNCellsTCardCorrelNAllSameTCard[i][tm]->SetYTitle("#it{n}_{cells}");
3215  // outputContainer->Add(fhNCellsTCardCorrelNAllSameTCard[i][tm]);
3216  //
3217  // fhExoticTCardCorrelNAllSameTCard[i][tm] = new TH2F
3218  // (Form("hExoticTCardCorrelNAllSameTCard_Case%d%s",i,add[tm].Data()),
3219  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d, no other TCard cells %s",i,add[tm].Data()),
3220  // nptbins,ptmin,ptmax,200,-1,1);
3221  // fhExoticTCardCorrelNAllSameTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3222  // fhExoticTCardCorrelNAllSameTCard[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3223  // outputContainer->Add(fhExoticTCardCorrelNAllSameTCard[i][tm]);
3224  //
3225  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm] = new TH2F
3226  // (Form("hColRowTCardCorrelNAllSameTCardLowE_Case%d%s",i,add[tm].Data()),
3227  // 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()),
3228  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3229  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm]->SetYTitle("row");
3230  // fhColRowTCardCorrelNAllSameTCardLowE[i][tm]->SetXTitle("column");
3231  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardLowE[i][tm]) ;
3232  //
3233  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm] = new TH2F
3234  // (Form("hColRowTCardCorrelNAllSameTCardHighE_Case%d%s",i,add[tm].Data()),
3235  // 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()),
3236  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3237  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm]->SetYTitle("row");
3238  // fhColRowTCardCorrelNAllSameTCardHighE[i][tm]->SetXTitle("column");
3239  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardHighE[i][tm]) ;
3240  //
3241  // ////////
3242  //
3243  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm] = new TH2F
3244  // (Form("hLambda0TCardCorrelNAllSameTCard_Exotic_Case%d%s",i,add[tm].Data()),
3245  // 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()),
3246  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3247  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3248  // fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]->SetYTitle("#lambda^{2}_{0}");
3249  // outputContainer->Add(fhLambda0TCardCorrelNAllSameTCardExotic[i][tm]);
3250  //
3251  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm] = new TH2F
3252  // (Form("hNCellsTCardCorrelNAllSameTCard_Exotic_Case%d%s",i,add[tm].Data()),
3253  // 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()),
3254  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3255  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3256  // fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]->SetYTitle("#it{n}_{cells}");
3257  // outputContainer->Add(fhNCellsTCardCorrelNAllSameTCardExotic[i][tm]);
3258  //
3259  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm] = new TH2F
3260  // (Form("hColRowTCardCorrelNAllSameTCardLowEExotic_Case%d%s",i,add[tm].Data()),
3261  // 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()),
3262  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3263  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]->SetYTitle("row");
3264  // fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]->SetXTitle("column");
3265  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardLowEExotic[i][tm]) ;
3266  //
3267  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm] = new TH2F
3268  // (Form("hColRowTCardCorrelNAllSameTCardHighEExotic_Case%d%s",i,add[tm].Data()),
3269  // 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()),
3270  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3271  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]->SetYTitle("row");
3272  // fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]->SetXTitle("column");
3273  // outputContainer->Add(fhColRowTCardCorrelNAllSameTCardHighEExotic[i][tm]) ;
3274  }
3275 
3276  // for(Int_t i = 0; i < 7; i++)
3277  // {
3278  // fhLambda0TCardCorrel[i][tm] = new TH2F
3279  // (Form("hLambda0TCardCorrel_Case%d%s",i,add[tm].Data()),
3280  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
3281  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3282  // fhLambda0TCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
3283  // fhLambda0TCardCorrel[i][tm]->SetYTitle("#lambda^{2}_{0}");
3284  // outputContainer->Add(fhLambda0TCardCorrel[i][tm]);
3285  //
3286  // fhNCellsTCardCorrel[i][tm] = new TH2F
3287  // (Form("hNCellsTCardCorrel_Case%d%s",i,add[tm].Data()),
3288  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
3289  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3290  // fhNCellsTCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
3291  // fhNCellsTCardCorrel[i][tm]->SetYTitle("#it{n}_{cells}");
3292  // outputContainer->Add(fhNCellsTCardCorrel[i][tm]);
3293  //
3294  // fhExoticTCardCorrel[i][tm] = new TH2F
3295  // (Form("hExoticTCardCorrel_Case%d%s",i,add[tm].Data()),
3296  // Form("exoticity vs #it{E}, max E cell correl with TCard cell, N corr = %d %s",i,add[tm].Data()),
3297  // nptbins,ptmin,ptmax,200,-1,1);
3298  // fhExoticTCardCorrel[i][tm]->SetXTitle("#it{E} (GeV)");
3299  // fhExoticTCardCorrel[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3300  // outputContainer->Add(fhExoticTCardCorrel[i][tm]);
3301  // }
3302  //
3303  // for(Int_t i = 0; i < 4; i++)
3304  // {
3305  // fhLambda0TCardCorrelExotic[i][tm] = new TH2F
3306  // (Form("hLambda0TCardCorrel_Exotic_Case%d%s",i,add[tm].Data()),
3307  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with TCard cell, exo>0.97, case %d %s",i,add[tm].Data()),
3308  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3309  // fhLambda0TCardCorrelExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3310  // fhLambda0TCardCorrelExotic[i][tm]->SetYTitle("#lambda^{2}_{0}");
3311  // outputContainer->Add(fhLambda0TCardCorrelExotic[i][tm]);
3312  //
3313  // fhNCellsTCardCorrelExotic[i][tm] = new TH2F
3314  // (Form("hNCellsTCardCorrel_Exotic_Case%d%s",i,add[tm].Data()),
3315  // 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()),
3316  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3317  // fhNCellsTCardCorrelExotic[i][tm]->SetXTitle("#it{E} (GeV)");
3318  // fhNCellsTCardCorrelExotic[i][tm]->SetYTitle("#it{n}_{cells}");
3319  // outputContainer->Add(fhNCellsTCardCorrelExotic[i][tm]);
3320  // }
3321 
3322 
3323  for(Int_t i = 0; i < fNEBinCuts; i++)
3324  {
3325  if(fStudyExotic)
3326  {
3327  fhLambda0Exoticity[i][tm] = new TH2F
3328  (Form("hLambda0Exoticity_EBin%d%s",i,add[tm].Data()),
3329  Form("#lambda^{2}_{0} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3330  200,-1,1,ssbins,ssmin,ssmax);
3331  fhLambda0Exoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3332  fhLambda0Exoticity[i][tm]->SetYTitle("#lambda^{2}_{0}");
3333  outputContainer->Add(fhLambda0Exoticity[i][tm]);
3334 
3335  fhLambda1Exoticity[i][tm] = new TH2F
3336  (Form("hLambda1Exoticity_EBin%d%s",i,add[tm].Data()),
3337  Form("#lambda^{2}_{1} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3338  200,-1,1,ssbins,ssmin,ssmax);
3339  fhLambda1Exoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3340  fhLambda1Exoticity[i][tm]->SetYTitle("#lambda^{2}_{1}");
3341  outputContainer->Add(fhLambda1Exoticity[i][tm]);
3342 
3343  // fhLambdaRExoticity[i][tm] = new TH2F
3344  // (Form("hLambdaRExoticity_EBin%d%s",i,add[tm].Data()),
3345  // 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()),
3346  // 200,-1,1,110,0,1.1);
3347  // fhLambdaRExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3348  // fhLambdaRExoticity[i][tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
3349  // outputContainer->Add(fhLambdaRExoticity[i][tm]);
3350 
3351  fhNCellsExoticity[i][tm] = new TH2F
3352  (Form("hNCellsExoticity_EBin%d%s",i,add[tm].Data()),
3353  Form("#it{n}_{cells} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3354  200,-1,1,nceclbins,nceclmin,nceclmax);
3355  fhNCellsExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3356  fhNCellsExoticity[i][tm]->SetYTitle("#it{n}_{cells}");
3357  outputContainer->Add(fhNCellsExoticity[i][tm]);
3358 
3359  fhTimeExoticity[i][tm] = new TH2F
3360  (Form("hTimeExoticity_EBin%d%s",i,add[tm].Data()),
3361  Form("#it{t} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3362  200,-1,1,100,-25,25);
3363  fhTimeExoticity[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3364  fhTimeExoticity[i][tm]->SetYTitle("#it{t} (ns)");
3365  outputContainer->Add(fhTimeExoticity[i][tm]);
3366 
3367  fhNCellsTCardSameAndDiffExotic[i][tm] = new TH2F
3368  (Form("hNCellsTCardSameAndDiff_Exotic_EBin%d%s",i,add[tm].Data()),
3369  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()),
3370  nceclbins,nceclmin,nceclmax,nceclbins,nceclmin,nceclmax);
3371  fhNCellsTCardSameAndDiffExotic[i][tm]->SetXTitle("#it{n}_{cells} - diff TCard");
3372  fhNCellsTCardSameAndDiffExotic[i][tm]->SetYTitle("#it{n}_{cells} - same TCard");
3373  outputContainer->Add(fhNCellsTCardSameAndDiffExotic[i][tm]);
3374 
3375  // fhLambda0ExoticityAllSameTCard[i][tm] = new TH2F
3376  // (Form("hLambda0ExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
3377  // 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()),
3378  // 200,-1,1,ssbins,ssmin,ssmax);
3379  // fhLambda0ExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3380  // fhLambda0ExoticityAllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{0}");
3381  // outputContainer->Add(fhLambda0ExoticityAllSameTCard[i][tm]);
3382  //
3383  // fhLambda1ExoticityAllSameTCard[i][tm] = new TH2F
3384  // (Form("hLambda1ExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
3385  // 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()),
3386  // 200,-1,1,ssbins,ssmin,ssmax);
3387  // fhLambda1ExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3388  // fhLambda1ExoticityAllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{1}");
3389  // outputContainer->Add(fhLambda1ExoticityAllSameTCard[i][tm]);
3390  //
3391  // fhLambdaRExoticityAllSameTCard[i][tm] = new TH2F
3392  // (Form("hLambdaRExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
3393  // 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()),
3394  // 200,-1,1,110,0,1.1);
3395  // fhLambdaRExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3396  // fhLambdaRExoticityAllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
3397  // outputContainer->Add(fhLambdaRExoticityAllSameTCard[i][tm]);
3398  //
3399  // fhNCellsExoticityAllSameTCard[i][tm] = new TH2F
3400  // (Form("hNCellsExoticityAllSameTCard_EBin%d%s",i,add[tm].Data()),
3401  // 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()),
3402  // 200,-1,1,nceclbins,nceclmin,nceclmax);
3403  // fhNCellsExoticityAllSameTCard[i][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3404  // fhNCellsExoticityAllSameTCard[i][tm]->SetYTitle("#it{n}_{cells}");
3405  // outputContainer->Add(fhNCellsExoticityAllSameTCard[i][tm]);
3406  //
3407  }
3408 
3409  fhNCellsTCardSameAndDiff[i][tm] = new TH2F
3410  (Form("hNCellsTCardSameAndDiff_EBin%d%s",i,add[tm].Data()),
3411  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()),
3412  nceclbins,nceclmin,nceclmax,nceclbins,nceclmin,nceclmax);
3413  fhNCellsTCardSameAndDiff[i][tm]->SetXTitle("#it{n}_{cells} - diff TCard");
3414  fhNCellsTCardSameAndDiff[i][tm]->SetYTitle("#it{n}_{cells} - same TCard");
3415  outputContainer->Add(fhNCellsTCardSameAndDiff[i][tm]);
3416 
3417  fhLambda0Lambda1[i][tm] = new TH2F
3418  (Form("hLambda0Lambda1_EBin%d%s",i,add[tm].Data()),
3419  Form("#lambda^{2}_{0} vs #lambda^{2}_{1}, %2.2f<#it{E}<%2.2f GeV %s",fEBinCuts[i],fEBinCuts[i+1],add[tm].Data()),
3420  ssbins,ssmin,ssmax,ssbins,ssmin,ssmax);
3421  fhLambda0Lambda1[i][tm]->SetXTitle("#lambda^{2}_{1}");
3422  fhLambda0Lambda1[i][tm]->SetYTitle("#lambda^{2}_{0}");
3423  outputContainer->Add(fhLambda0Lambda1[i][tm]);
3424 
3425  // fhLambda0Lambda1AllSameTCard[i][tm] = new TH2F
3426  // (Form("hLambda0Lambda1AllSameTCard_EBin%d%s",i,add[tm].Data()),
3427  // 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()),
3428  // ssbins,ssmin,ssmax,ssbins,ssmin,ssmax);
3429  // fhLambda0Lambda1AllSameTCard[i][tm]->SetXTitle("#lambda^{2}_{1}");
3430  // fhLambda0Lambda1AllSameTCard[i][tm]->SetYTitle("#lambda^{2}_{0}");
3431  // outputContainer->Add(fhLambda0Lambda1AllSameTCard[i][tm]);
3432  }
3433 
3434  if(fStudyExotic)
3435  {
3436  for(Int_t j = 0; j < 6; j++)
3437  {
3438  for(Int_t k = 0; k < 6; k++)
3439  {
3440  fhLambda0ExoticityPerNCell[j][k][tm] = new TH2F
3441  (Form("hLambda0Exoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
3442  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()),
3443  200,-1,1,ssbins,ssmin,ssmax);
3444  fhLambda0ExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3445  fhLambda0ExoticityPerNCell[j][k][tm]->SetYTitle("#lambda^{2}_{0}");
3446  outputContainer->Add(fhLambda0ExoticityPerNCell[j][k][tm]);
3447 
3448  fhLambda1ExoticityPerNCell[j][k][tm] = new TH2F
3449  (Form("hLambda1Exoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
3450  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()),
3451  200,-1,1,ssbins,ssmin,ssmax);
3452  fhLambda1ExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3453  fhLambda1ExoticityPerNCell[j][k][tm]->SetYTitle("#lambda^{2}_{1}");
3454  outputContainer->Add(fhLambda1ExoticityPerNCell[j][k][tm]);
3455 
3456  // fhLambdaRExoticityPerNCell[j][k][tm] = new TH2F
3457  // (Form("hLambdaRExoticity_NCell_Same%d_Diff%d%s",j,k,add[tm].Data()),
3458  // 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()),
3459  // 200,-1,1,110,0,1.1);
3460  // fhLambdaRExoticityPerNCell[j][k][tm]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3461  // fhLambdaRExoticityPerNCell[j][k][tm]->SetYTitle("#lambda^{2}_{1}/#lambda^{2}_{0}");
3462  // outputContainer->Add(fhLambdaRExoticityPerNCell[j][k][tm]);
3463  }
3464  }
3465  }
3466 
3467  // for(Int_t i = 0; i < 6; i++)
3468  // {
3469  // fhLambda0TCardCorrelNearRow[i][tm] = new TH2F
3470  // (Form("hLambda0TCardCorrelNearRow_Case%d%s",i,add[tm].Data()),
3471  // 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()),
3472  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3473  // fhLambda0TCardCorrelNearRow[i][tm]->SetXTitle("#it{E} (GeV)");
3474  // fhLambda0TCardCorrelNearRow[i][tm]->SetYTitle("#lambda^{2}_{0}");
3475  // outputContainer->Add(fhLambda0TCardCorrelNearRow[i][tm]);
3476  //
3477  // fhNCellsTCardCorrelNearRow[i][tm] = new TH2F
3478  // (Form("hNCellsTCardCorrelNearRow_Case%d%s",i,add[tm].Data()),
3479  // Form("custer # cells vs #it{E}, w > 0.01, max E cell correl with TCard cell, case %d %s",i,add[tm].Data()),
3480  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3481  // fhNCellsTCardCorrelNearRow[i][tm]->SetXTitle("#it{E} (GeV)");
3482  // fhNCellsTCardCorrelNearRow[i][tm]->SetYTitle("#it{n}_{cells}");
3483  // outputContainer->Add(fhNCellsTCardCorrelNearRow[i][tm]);
3484  // }
3485  //
3486  // for(Int_t i = 0; i < 4; i++)
3487  // {
3488  // fhLambda0TCardCorrel2ndMax[i][tm] = new TH2F
3489  // (Form("hLambda0TCardCorrel2ndMax_Case%d%s",i,add[tm].Data()),
3490  // Form("#lambda^{2}_{0} vs #it{E}, max E cell correl with 2nd max TCard cell, case %d %s",i,add[tm].Data()),
3491  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3492  // fhLambda0TCardCorrel2ndMax[i][tm]->SetXTitle("#it{E} (GeV)");
3493  // fhLambda0TCardCorrel2ndMax[i][tm]->SetYTitle("#lambda^{2}_{0}");
3494  // outputContainer->Add(fhLambda0TCardCorrel2ndMax[i][tm]);
3495  //
3496  // fhNCellsTCardCorrel2ndMax[i][tm] = new TH2F
3497  // (Form("hNCellsTCardCorrel2ndMax_Case%d%s",i,add[tm].Data()),
3498  // 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()),
3499  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3500  // fhNCellsTCardCorrel2ndMax[i][tm]->SetXTitle("#it{E} (GeV)");
3501  // fhNCellsTCardCorrel2ndMax[i][tm]->SetYTitle("#it{n}_{cells}");
3502  // outputContainer->Add(fhNCellsTCardCorrel2ndMax[i][tm]);
3503  // }
3504  //
3505  // for(Int_t i = 0; i < 7; i++)
3506  // {
3507  // fhLambda0TCardCorrelOtherTCard[i][tm] = new TH2F
3508  // (Form("hLambda0TCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
3509  // Form("#lambda^{2}_{0} vs #it{E}, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
3510  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3511  // fhLambda0TCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3512  // fhLambda0TCardCorrelOtherTCard[i][tm]->SetYTitle("#lambda^{2}_{0}");
3513  // outputContainer->Add(fhLambda0TCardCorrelOtherTCard[i][tm]);
3514  //
3515  // fhNCellsTCardCorrelOtherTCard[i][tm] = new TH2F
3516  // (Form("hNCellsTCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
3517  // Form("custer # cells vs #it{E}, w > 0.01, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
3518  // nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
3519  // fhNCellsTCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3520  // fhNCellsTCardCorrelOtherTCard[i][tm]->SetYTitle("#it{n}_{cells}");
3521  // outputContainer->Add(fhNCellsTCardCorrelOtherTCard[i][tm]);
3522  //
3523  // fhExoticTCardCorrelOtherTCard[i][tm] = new TH2F
3524  // (Form("hExoticTCardCorrelOtherTCard_Case%d%s",i,add[tm].Data()),
3525  // Form("exoticity vs #it{E}, w > 0.01, correlation of cells in different TCards, case %d %s",i,add[tm].Data()),
3526  // nptbins,ptmin,ptmax,200,-1,1);
3527  // fhExoticTCardCorrelOtherTCard[i][tm]->SetXTitle("#it{E} (GeV)");
3528  // fhExoticTCardCorrelOtherTCard[i][tm]->SetYTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3529  // outputContainer->Add(fhExoticTCardCorrelOtherTCard[i][tm]);
3530  //
3531  // fhColRowTCardCorrelOtherTCardLowE[i][tm] = new TH2F
3532  // (Form("hColRowTCardCorrelOtherTCardLowE_Case%d%s",i,add[tm].Data()),
3533  // Form("column vs row for different 2 TCard correlation cases, E > 2 GeV, case %d %s",i,add[tm].Data()),
3534  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3535  // fhColRowTCardCorrelOtherTCardLowE[i][tm]->SetYTitle("row");
3536  // fhColRowTCardCorrelOtherTCardLowE[i][tm]->SetXTitle("column");
3537  // outputContainer->Add(fhColRowTCardCorrelOtherTCardLowE[i][tm]) ;
3538  //
3539  // fhColRowTCardCorrelOtherTCardHighE[i][tm] = new TH2F
3540  // (Form("hColRowTCardCorrelOtherTCardHighE_Case%d%s",i,add[tm].Data()),
3541  // Form("column vs row for different 2 TCard correlation cases, E > 8 GeV, case %d %s",i,add[tm].Data()),
3542  // ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax);
3543  // fhColRowTCardCorrelOtherTCardHighE[i][tm]->SetYTitle("row");
3544  // fhColRowTCardCorrelOtherTCardHighE[i][tm]->SetXTitle("column");
3545  // outputContainer->Add(fhColRowTCardCorrelOtherTCardHighE[i][tm]) ;
3546  // }
3547 
3548  for(Int_t i = 0; i < 12; i++)
3549  {
3550  fhTCardCorrECellMaxDiff[i][tm] = new TH2F
3551  (Form("hTCardCorrECellMaxDiff_Case%d%s",i,add[tm].Data()),
3552  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()),
3553  nptbins,ptmin,ptmax,210,-1,20);
3554  fhTCardCorrECellMaxDiff[i][tm]->SetXTitle("#it{E} (GeV)");
3555  fhTCardCorrECellMaxDiff[i][tm]->SetYTitle("#it{E}_{cell}^{max}-#it{E}_{cell} (GeV)");
3556  outputContainer->Add(fhTCardCorrECellMaxDiff[i][tm]);
3557 
3558  fhTCardCorrEClusterDiff[i][tm] = new TH2F
3559  (Form("hTCardCorrEClusterDiff_Case%d%s",i,add[tm].Data()),
3560  Form("#it{E}_{cluster}-#it{E}_{cell} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
3561  nptbins,ptmin,ptmax,210,-1,20);
3562  fhTCardCorrEClusterDiff[i][tm]->SetXTitle("#it{E} (GeV)");
3563  fhTCardCorrEClusterDiff[i][tm]->SetYTitle("#it{E}_{cluster}-#it{E}_{cell} (GeV)");
3564  outputContainer->Add(fhTCardCorrEClusterDiff[i][tm]);
3565 
3566  // fhTCardCorrECellMaxRat[i][tm] = new TH2F
3567  // (Form("hTCardCorrECellMaxRat_Case%d%s",i,add[tm].Data()),
3568  // 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()),
3569  // nptbins,ptmin,ptmax,110,0,1.1);
3570  // fhTCardCorrECellMaxRat[i][tm]->SetXTitle("#it{E} (GeV)");
3571  // fhTCardCorrECellMaxRat[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}^{max}_{cell}");
3572  // outputContainer->Add(fhTCardCorrECellMaxRat[i][tm]);
3573  //
3574  // fhTCardCorrEClusterRat[i][tm] = new TH2F
3575  // (Form("hTCardCorrEClusterRat_Case%d%s",i,add[tm].Data()),
3576  // Form("#it{E}_{cell}/#it{E}_{cluster} vs #it{E}_{cluster}, for (un)correlated cells in TCard, case %d %s",i,add[tm].Data()),
3577  // nptbins,ptmin,ptmax,110,0,1.1);
3578  // fhTCardCorrEClusterRat[i][tm]->SetXTitle("#it{E} (GeV)");
3579  // fhTCardCorrEClusterRat[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3580  // outputContainer->Add(fhTCardCorrEClusterRat[i][tm]);
3581 
3582  fhTCardCorrTCellMaxDiff[i][tm] = new TH2F
3583  (Form("hTCardCorrTCellMaxDiff_Case%d%s",i,add[tm].Data()),
3584  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()),
3585  nptbins,ptmin,ptmax,1000,-100,100);
3586  fhTCardCorrTCellMaxDiff[i][tm]->SetXTitle("#it{E} (GeV)");
3587  fhTCardCorrTCellMaxDiff[i][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell} (ns)");
3588  outputContainer->Add(fhTCardCorrTCellMaxDiff[i][tm]);
3589 
3590  if(fStudyExotic)
3591  {
3592  fhTCardCorrECellMaxDiffExo[i][tm] = new TH2F
3593  (Form("hTCardCorrECellMaxDiffExo_Case%d%s",i,add[tm].Data()),
3594  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()),
3595  nptbins,ptmin,ptmax,210,-1,20);
3596  fhTCardCorrECellMaxDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
3597  fhTCardCorrECellMaxDiffExo[i][tm]->SetYTitle("#it{E}_{cell}^{max}-#it{E}_{cell} (GeV)");
3598  outputContainer->Add(fhTCardCorrECellMaxDiffExo[i][tm]);
3599 
3600  fhTCardCorrEClusterDiffExo[i][tm] = new TH2F
3601  (Form("hTCardCorrEClusterDiffExo_Case%d%s",i,add[tm].Data()),
3602  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()),
3603  nptbins,ptmin,ptmax,210,-1,20);
3604  fhTCardCorrEClusterDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
3605  fhTCardCorrEClusterDiffExo[i][tm]->SetYTitle("#it{E}_{cluster}-#it{E}_{cell} (GeV)");
3606  outputContainer->Add(fhTCardCorrEClusterDiffExo[i][tm]);
3607 
3608  // fhTCardCorrECellMaxRatExo[i][tm] = new TH2F
3609  // (Form("hTCardCorrECellMaxRatExo_Case%d%s",i,add[tm].Data()),
3610  // 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()),
3611  // nptbins,ptmin,ptmax,110,0,1.1);
3612  // fhTCardCorrECellMaxRatExo[i][tm]->SetXTitle("#it{E} (GeV)");
3613  // fhTCardCorrECellMaxRatExo[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}^{max}_{cell}");
3614  // outputContainer->Add(fhTCardCorrECellMaxRatExo[i][tm]);
3615  //
3616  // fhTCardCorrEClusterRatExo[i][tm] = new TH2F
3617  // (Form("hTCardCorrEClusterRatExo_Case%d%s",i,add[tm].Data()),
3618  // 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()),
3619  // nptbins,ptmin,ptmax,110,0,1.1);
3620  // fhTCardCorrEClusterRatExo[i][tm]->SetXTitle("#it{E} (GeV)");
3621  // fhTCardCorrEClusterRatExo[i][tm]->SetYTitle("#it{E}_{cell}/#it{E}_{cluster}");
3622  // outputContainer->Add(fhTCardCorrEClusterRatExo[i][tm]);
3623 
3624  fhTCardCorrTCellMaxDiffExo[i][tm] = new TH2F
3625  (Form("hTCardCorrTCellMaxDiffExo_Case%d%s",i,add[tm].Data()),
3626  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()),
3627  nptbins,ptmin,ptmax,1000,-100,100);
3628  fhTCardCorrTCellMaxDiffExo[i][tm]->SetXTitle("#it{E} (GeV)");
3629  fhTCardCorrTCellMaxDiffExo[i][tm]->SetYTitle("#it{t}_{cell}^{max}-#it{t}_{cell} (ns)");
3630  outputContainer->Add(fhTCardCorrTCellMaxDiffExo[i][tm]);
3631  }
3632  }
3633  } // neutral or charged
3634 
3635  if(fStudyExotic)
3636  {
3637  fhEnergyTMEtaResidual1Cell = new TH2F("hEnergyTMEtaResidual1Cell","#Delta #eta_{cluster-track} vs #it{E}, n cell = 1",
3638  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3639  fhEnergyTMEtaResidual1Cell->SetXTitle("#it{E} (GeV)");
3640  fhEnergyTMEtaResidual1Cell->SetYTitle("#Delta #eta_{cluster-track}");
3641  outputContainer->Add(fhEnergyTMEtaResidual1Cell);
3642 
3643  fhEnergyTMPhiResidual1Cell = new TH2F("hEnergyTMPhiResidual1Cell","#Delta #varphi_{cluster-track} vs #it{E}, n cell = 1",
3644  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3645  fhEnergyTMPhiResidual1Cell->SetXTitle("#it{E} (GeV)");
3646  fhEnergyTMPhiResidual1Cell->SetYTitle("#Delta #varphi_{cluster-track}");
3647  outputContainer->Add(fhEnergyTMPhiResidual1Cell);
3648 
3649  fhEnergyTMEtaResidualExotic = new TH2F("hEnergyTMEtaResidualExotic","#Delta #eta_{cluster-track} vs #it{E}, exo > 0.97",
3650  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3651  fhEnergyTMEtaResidualExotic->SetXTitle("#it{E} (GeV)");
3652  fhEnergyTMEtaResidualExotic->SetYTitle("#Delta #eta_{cluster-track}");
3653  outputContainer->Add(fhEnergyTMEtaResidualExotic);
3654 
3655  fhEnergyTMPhiResidualExotic = new TH2F("hEnergyTMPhiResidualExotic","#Delta #varphi_{cluster-track} vs #it{E}, exo > 0.97",
3656  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3657  fhEnergyTMPhiResidualExotic->SetXTitle("#it{E} (GeV)");
3658  fhEnergyTMPhiResidualExotic->SetYTitle("#Delta #varphi_{cluster-track}");
3659  outputContainer->Add(fhEnergyTMPhiResidualExotic);
3660 
3661  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell = new TH2F("hEnergyTMEtaResidualTCardCorrNoSelection1Cell","#Delta #eta_{cluster-track} vs #it{E}, n cell = 1",
3662  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3663  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell->SetXTitle("#it{E} (GeV)");
3664  fhEnergyTMEtaResidualTCardCorrNoSelection1Cell->SetYTitle("#Delta #eta_{cluster-track}");
3665  outputContainer->Add(fhEnergyTMEtaResidualTCardCorrNoSelection1Cell);
3666 
3667  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell = new TH2F("hEnergyTMPhiResidualTCardCorrNoSelection1Cell","#Delta #varphi_{cluster-track} vs #it{E}, n cell = 1",
3668  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3669  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell->SetXTitle("#it{E} (GeV)");
3670  fhEnergyTMPhiResidualTCardCorrNoSelection1Cell->SetYTitle("#Delta #varphi_{cluster-track}");
3671  outputContainer->Add(fhEnergyTMPhiResidualTCardCorrNoSelection1Cell);
3672 
3673  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic = new TH2F("hEnergyTMEtaResidualTCardCorrNoSelectionExotic","#Delta #eta_{cluster-track} vs #it{E}, exo > 0.97",
3674  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3675  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic->SetXTitle("#it{E} (GeV)");
3676  fhEnergyTMEtaResidualTCardCorrNoSelectionExotic->SetYTitle("#Delta #eta_{cluster-track}");
3677  outputContainer->Add(fhEnergyTMEtaResidualTCardCorrNoSelectionExotic);
3678 
3679  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic = new TH2F("hEnergyTMPhiResidualTCardCorrNoSelectionExotic","#Delta #varphi_{cluster-track} vs #it{E}, exo > 0.97",
3680  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3681  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic->SetXTitle("#it{E} (GeV)");
3682  fhEnergyTMPhiResidualTCardCorrNoSelectionExotic->SetYTitle("#Delta #varphi_{cluster-track}");
3683  outputContainer->Add(fhEnergyTMPhiResidualTCardCorrNoSelectionExotic);
3684 
3685  for(Int_t i = 0; i < fNEBinCuts; i++)
3686  {
3687  fhTMPhiResidualExoticity[i] = new TH2F
3688  (Form("hTMPhiResidual_EBin%d",i),
3689  Form("#Delta #varphi_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
3690  200,-1,1,nresphibins,resphimin,resphimax);
3691  fhTMPhiResidualExoticity[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3692  fhTMPhiResidualExoticity[i]->SetYTitle("#Delta #varphi_{cluster-track}");
3693  outputContainer->Add(fhTMPhiResidualExoticity[i]);
3694 
3695  fhTMEtaResidualExoticity[i] = new TH2F
3696  (Form("hTMEtaResidual_EBin%d",i),
3697  Form("#Delta #eta_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
3698  200,-1,1,nresetabins,resetamin,resetamax);
3699  fhTMEtaResidualExoticity[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3700  fhTMEtaResidualExoticity[i]->SetYTitle("#Delta #eta_{cluster-track}");
3701  outputContainer->Add(fhTMEtaResidualExoticity[i]);
3702 
3704  (Form("hTMPhiResidual_LooseCut_EBin%d",i),
3705  Form("#Delta #varphi_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
3706  200,-1,1,nresphibins,resphimin,resphimax);
3707  fhTMPhiResidualExoticityLooseCut[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3708  fhTMPhiResidualExoticityLooseCut[i]->SetYTitle("#Delta #varphi_{cluster-track}");
3709  outputContainer->Add(fhTMPhiResidualExoticityLooseCut[i]);
3710 
3712  (Form("hTMEtaResidual_LooseCut_EBin%d",i),
3713  Form("#Delta #eta_{cluster-track} vs #it{exoticity}, %2.2f<#it{E}<%2.2f GeV",fEBinCuts[i],fEBinCuts[i+1]),
3714  200,-1,1,nresetabins,resetamin,resetamax);
3715  fhTMEtaResidualExoticityLooseCut[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3716  fhTMEtaResidualExoticityLooseCut[i]->SetYTitle("#Delta #eta_{cluster-track}");
3717  outputContainer->Add(fhTMEtaResidualExoticityLooseCut[i]);
3718 
3719  // fhTMPhiResidualExoticityAllSameTCard[i] = new TH2F
3720  // (Form("hTMPhiResidualAllSameTCard_EBin%d",i),
3721  // 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]),
3722  // 200,-1,1,nresphibins,resphimin,resphimax);
3723  // fhTMPhiResidualExoticityAllSameTCard[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3724  // fhTMPhiResidualExoticityAllSameTCard[i]->SetYTitle("#Delta #varphi_{cluster-track}");
3725  // outputContainer->Add(fhTMPhiResidualExoticityAllSameTCard[i]);
3726  //
3727  // fhTMEtaResidualExoticityAllSameTCard[i] = new TH2F
3728  // (Form("hTMEtaResidualAllSameTCard_EBin%d",i),
3729  // 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]),
3730  // 200,-1,1,nresetabins,resetamin,resetamax);
3731  // fhTMEtaResidualExoticityAllSameTCard[i]->SetXTitle("#it{F}_{+}=1-#it{E}_{+}/#it{E}_{lead cell}");
3732  // fhTMEtaResidualExoticityAllSameTCard[i]->SetYTitle("#Delta #eta_{cluster-track}");
3733  // outputContainer->Add(fhTMEtaResidualExoticityAllSameTCard[i]);
3734  }
3735  }
3736  } // TCard correlation studies
3737 
3738  // Cluster size in terms of cells and shape TH3
3739  if(fStudyShape)
3740  {
3741  fhColRowM02 = new TH3F
3742  (Form("hColRowM02"),
3743  Form("column vs row vs M02, %2.2f < #it{E} < %2.2f GeV for Neutral",fEMinShape,fEMaxShape),
3744  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax,40,0.,2.);
3745  fhColRowM02->SetYTitle("row");
3746  fhColRowM02->SetXTitle("column");
3747  fhColRowM02->SetZTitle("#lambda_{0}^{2}");
3748  outputContainer->Add(fhColRowM02) ;
3749 
3751  (Form("hColRowM02NCellCut"),
3752  Form("column vs row vs M02, %2.2f<#it{E}<%2.2f GeV #it{n}_{cells}^{w>0.01} > %d for Neutral",
3754  ncolcell,colcellmin,colcellmax,nrowcell,rowcellmin,rowcellmax,40,0.,2.);
3755  fhColRowM02NCellCut->SetYTitle("row");
3756  fhColRowM02NCellCut->SetXTitle("column");
3757  fhColRowM02NCellCut->SetZTitle("#lambda_{0}^{2}");
3758  outputContainer->Add(fhColRowM02NCellCut) ;
3759 
3760  fhInvMassNCellSM = new TH3F
3761  ("hInvMassNCellSM",
3762  Form("%2.2f<#it{E}_{1}<%2.2f GeV, %2.2f<#it{E}_{2}<%2.2f GeV, %2.2f<#lambda^{2}_{0}<%2.2f"
3763  "#it{M}_{#gamma #gamma} vs #it{n}_{1, cells}^{w>0.01} vs SM number trig cluster",
3765  nmassbins,massmin,massmax,cellBins,cellMin,cellMax,fNModules,-0.5,fNModules-0.5);
3766  fhInvMassNCellSM->SetZTitle("SM number");
3767  fhInvMassNCellSM->SetYTitle("#it{n}_{cells}^{w>0.01}");
3768  fhInvMassNCellSM->SetXTitle("#it{M}_{#gamma #gamma}");
3769  outputContainer->Add(fhInvMassNCellSM);
3770 
3771  fhInvMassNCellSMSame = new TH3F
3772  ("hInvMassNCellSMSame",
3773  Form("%2.2f<#it{E}_{1}<%2.2f GeV, %2.2f<#it{E}_{2}<%2.2f GeV, %2.2f<#lambda^{2}_{0}<%2.2f"
3774  "#it{M}_{#gamma #gamma} vs #it{n}_{1, cells}^{w>0.01} vs SM number both cluster",
3776  nmassbins,massmin,massmax,cellBins,cellMin,cellMax,fNModules,-0.5,fNModules-0.5);
3777  fhInvMassNCellSMSame->SetZTitle("SM number");
3778  fhInvMassNCellSMSame->SetYTitle("#it{n}_{cells}^{w>0.01}");
3779  fhInvMassNCellSMSame->SetXTitle("#it{M}_{#gamma #gamma}");
3780  outputContainer->Add(fhInvMassNCellSMSame);
3781 
3782  //
3783 
3784  fhEMaxCellTimeM02SM = new TH3F
3785  ("hEMaxCellTimeM02SM",
3786  Form("time vs #lambda_{0}^{2} vs SM number, "
3787  "%2.2f<#it{E}<%2.2f GeV, #it{n}_{cells}^{w>0.01}>%d",fEMinShape,fEMaxShape,fNCellMinShape),
3788  45,-25.5,20.5, fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
3789  fhEMaxCellTimeM02SM->SetZTitle("#lambda_{0}^{2}");
3790  fhEMaxCellTimeM02SM->SetYTitle("SM number");
3791  fhEMaxCellTimeM02SM->SetXTitle("time (ns)");
3792  outputContainer->Add(fhEMaxCellTimeM02SM);
3793 
3795  ("hEMaxCellTimeNCellSM",
3796  Form("time vs #it{n}_{cells}^{w>0.01} vs SM number, "
3797  "%2.2f<#it{E}<%2.2f GeV, 0.1<#it{sigma}_{long}<0.3",fEMinShape,fEMaxShape),
3798  45,-25.5,20.5, fNModules,-0.5,fNModules-0.5,cellBins,cellMin,cellMax);
3799  fhEMaxCellTimeNCellSM->SetZTitle("#it{n}_{cells}^{w>0.01}");
3800  fhEMaxCellTimeNCellSM->SetYTitle("SM number");
3801  fhEMaxCellTimeNCellSM->SetXTitle("time (ns)");
3802  outputContainer->Add(fhEMaxCellTimeNCellSM);
3803 
3805  ("hESecCellTimeNCellSM",
3806  Form("secondary cell time vs #it{n}_{cells}^{w>0.01} vs SM number, "
3807  "%2.2f<#it{E}<%2.2f GeV, 0.1<#it{sigma}_{long}<0.3",fEMinShape,fEMaxShape),
3808  50,-100,100, fNModules,-0.5,fNModules-0.5,cellBins,cellMin,cellMax);
3809  fhESecCellTimeNCellSM->SetZTitle("#it{n}_{cells}^{w>0.01}");
3810  fhESecCellTimeNCellSM->SetYTitle("SM number");
3811  fhESecCellTimeNCellSM->SetXTitle("time (ns)");
3812  outputContainer->Add(fhESecCellTimeNCellSM);
3813 
3814  //
3815 
3816  Int_t nbinsdeltacells = 19 ;
3817  Float_t mindeltacells =-9.5;
3818  Float_t maxdeltacells = 9.5;
3819  for(Int_t col = 0; col < 2; col++)
3820  {
3821  fhColRowFromCellMaxLowM02[col] = new TH2F
3822  (Form("hColRowFromCellMaxLowM02_Col%d",col),
3823  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, "
3824  "%2.2f<#it{E}<%2.2f GeV, colum %d",fEMinShape,fEMaxShape,col),
3825  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells);
3826  fhColRowFromCellMaxLowM02[col]->SetXTitle("#Delta column_{max-secondary}");
3827  fhColRowFromCellMaxLowM02[col]->SetYTitle("#Delta row_{max-secondary}");
3828  outputContainer->Add(fhColRowFromCellMaxLowM02[col]);
3829 
3830  fhColRowFromCellMaxHighM02[col] = new TH2F
3831  (Form("hColRowFromCellMaxHighM02_Col%d",col),
3832  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, "
3833  "%2.2f<#it{E}<%2.2f GeV, colum %d",fEMinShape,fEMaxShape,col),
3834  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells);
3835  fhColRowFromCellMaxHighM02[col]->SetXTitle("#Delta column_{max-secondary}");
3836  fhColRowFromCellMaxHighM02[col]->SetYTitle("#Delta row_{max-secondary}");
3837  outputContainer->Add(fhColRowFromCellMaxHighM02[col]);
3838  }//odd/pair col
3839 
3840  //
3841 
3842  for(Int_t i = 0; i < fNModules; i++)
3843  {
3845  (Form("hNCellsPerClusterM02M20_SM%d",i),
3846  Form(" vs #lambda_{0}^{2} vs #it{n}_{cells}^{w>0.01} vs #lambda_{1}^{2}, "
3847  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3848  (Int_t)nShShBins/1.5,0,maxShSh/1.5, cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
3849  fhNCellsPerClusterM02M20PerSM[i]->SetZTitle("#lambda_{0}^{2}");
3850  fhNCellsPerClusterM02M20PerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3851  fhNCellsPerClusterM02M20PerSM[i]->SetXTitle("#lambda_{1}^{2}");
3852  outputContainer->Add(fhNCellsPerClusterM02M20PerSM[i]);
3853 
3855  (Form("hNCellsPerClusterM02NLM_SM%d",i),
3856  Form(" vs #lambda_{0}^{2} vs #it{n}_{cells}^{w>0.01} vs N_{lm}, "
3857  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3858  10,0,10, cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
3859  fhNCellsPerClusterM02NLMPerSM[i]->SetZTitle("#lambda_{0}^{2}");
3860  fhNCellsPerClusterM02NLMPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3861  fhNCellsPerClusterM02NLMPerSM[i]->SetXTitle("n_{lm}");
3862  outputContainer->Add(fhNCellsPerClusterM02NLMPerSM[i]);
3863 
3865  (Form("hEMaxCellEClusterM02NCell_SM%d",i),
3866  Form("(#it{E}_{cluster} - #it{E}_{max cell})/#it{E}_{cluster} vs #lambda_{0}^{2} vs #it{n}_{cells}^{w>0.01}, "
3867  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3868  50,0,1., cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
3869  fhEMaxCellEClusterM02NCellPerSM[i]->SetZTitle("#lambda_{0}^{2}");
3870  fhEMaxCellEClusterM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3871  fhEMaxCellEClusterM02NCellPerSM[i]->SetXTitle("(#it{E}_{cluster} - #it{E}_{max cell})/ #it{E}_{cluster}");
3872  outputContainer->Add(fhEMaxCellEClusterM02NCellPerSM[i]);
3873 
3875  (Form("hEMaxCellLogM02NCell_SM%d",i),
3876  Form("log(#it{E}_{max cell}) vs #lambda_{0}^{2} vs SM number, "
3877  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3878  150,-3,3, cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
3879  fhEMaxCellLogM02NCellPerSM[i]->SetZTitle("#lambda_{0}^{2}");
3880  fhEMaxCellLogM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3881  fhEMaxCellLogM02NCellPerSM[i]->SetXTitle("log(#it{E}_{max cell})");
3882  outputContainer->Add(fhEMaxCellLogM02NCellPerSM[i]);
3883 
3885  (Form("hESecCellEMaxCellM02NCell_SM%d",i),
3886  Form("#it{E}_{cell}/#it{E}_{cell max} vs #lambda_{0}^{2} vs #it{n}_{cells}^{w>0.01}, "
3887  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3888  50,0,1., cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
3889  fhESecCellEMaxCellM02NCellPerSM[i]->SetZTitle("#lambda_{0}^{2}");
3890  fhESecCellEMaxCellM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3891  fhESecCellEMaxCellM02NCellPerSM[i]->SetXTitle("#it{E}_{cell}/#it{E}_{cell max}");
3892  outputContainer->Add(fhESecCellEMaxCellM02NCellPerSM[i]);
3893 
3895  (Form("hESecCellEClusterM02NCell_SM%d",i),
3896  Form("(#it{E}_{cluster} - #it{E}_{cell})/#it{E}_{cluster} vs #lambda_{0}^{2} vs #it{n}_{cells}^{w>0.01}, "
3897  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3898  50,0,1., cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
3899  fhESecCellEClusterM02NCellPerSM[i]->SetZTitle("#lambda_{0}^{2}");
3900  fhESecCellEClusterM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3901  fhESecCellEClusterM02NCellPerSM[i]->SetXTitle("(#it{E}_{cluster} - #it{E}_{cell})/ #it{E}_{cluster}");
3902  outputContainer->Add(fhESecCellEClusterM02NCellPerSM[i]);
3903 
3905  (Form("hESecCellLogM02NCell_SM%d",i),
3906  Form("log(#it{E}_{cell}) vs #lambda_{0}^{2} vs #it{n}_{cells}^{w>0.01}, "
3907  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,fNCellMinShape),
3908  150,-3,3, cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
3909  fhESecCellLogM02NCellPerSM[i]->SetZTitle("#lambda_{0}^{2}");
3910  fhESecCellLogM02NCellPerSM[i]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3911  fhESecCellLogM02NCellPerSM[i]->SetXTitle("log(#it{E}_{cell})");
3912  outputContainer->Add(fhESecCellLogM02NCellPerSM[i]);
3913 
3915  (Form("hEMaxESecCellNCellLowM02_SM%d",i),
3916  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, "
3917  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3918  24,0,12, 48,0,12,cellBins,cellMin,cellMax);
3919  fhEMaxESecCellNCellLowM02PerSM[i]->SetZTitle("#it{n}_{cells}^{w>0.01}");
3920  fhEMaxESecCellNCellLowM02PerSM[i]->SetYTitle("#it{E}_{cell}^{secondary} (GeV)");
3921  fhEMaxESecCellNCellLowM02PerSM[i]->SetXTitle("#it{E}_{cell}^{max} (GeV)");
3922  outputContainer->Add(fhEMaxESecCellNCellLowM02PerSM[i]);
3923 
3925  (Form("hEMaxECrossNCellLowM02_SM%d",i),
3926  Form("#it{E}_{cell}^{max} vs exoticity vs #it{n}_{cells}^{w>0.01} vs 0.1 < #lambda_{0}^{2} < 0.3, "
3927  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3928  24,0,12, 40,0.6,1.,cellBins,cellMin,cellMax);
3929  fhEMaxECrossNCellLowM02PerSM[i]->SetZTitle("#it{n}_{cells}^{w>0.01}");
3930  fhEMaxECrossNCellLowM02PerSM[i]->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell}^{max}");
3931  fhEMaxECrossNCellLowM02PerSM[i]->SetXTitle("#it{E}_{cell}^{max} (GeV)");
3932  outputContainer->Add(fhEMaxECrossNCellLowM02PerSM[i]);
3933 
3935  (Form("hEMaxESecCellNCellHighM02_SM%d",i),
3936  Form("#it{E}_{cell}^{max} vs #it{E}_{cell}^{secondary} vs #it{n}_{cells}^{w>0.01} vs 0.5 < #lambda_{0}^{2} < 2, "
3937  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3938  24,0,12, 48,0,12,cellBins,cellMin,cellMax);
3939  fhEMaxESecCellNCellHighM02PerSM[i]->SetZTitle("#it{n}_{cells}^{w>0.01}");
3940  fhEMaxESecCellNCellHighM02PerSM[i]->SetYTitle("#it{E}_{cell}^{secondary} (GeV)");
3941  fhEMaxESecCellNCellHighM02PerSM[i]->SetXTitle("#it{E}_{cell}^{max} (GeV)");
3942  outputContainer->Add(fhEMaxESecCellNCellHighM02PerSM[i]);
3943 
3945  (Form("hEMaxECrossNCellHighM02_SM%d",i),
3946  Form("#it{E}_{cell}^{max} vs exoticity vs #it{n}_{cells}^{w>0.01} for 0.5 < #lambda_{0}^{2} < 2, "
3947  "%2.2f<#it{E}<%2.2f GeV, SM=%d",fEMinShape,fEMaxShape,i),
3948  24,0,12, 40,0.6,1.,cellBins,cellMin,cellMax);
3949  fhEMaxECrossNCellHighM02PerSM[i]->SetZTitle("#it{n}_{cells}^{w>0.01}");
3950  fhEMaxECrossNCellHighM02PerSM[i]->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell}^{max}");
3951  fhEMaxECrossNCellHighM02PerSM[i]->SetXTitle("#it{E}_{cell}^{max} (GeV)");
3952  outputContainer->Add(fhEMaxECrossNCellHighM02PerSM[i]);
3953 
3954  Int_t nbinsdeltacells = 19 ;
3955  Float_t mindeltacells =-9.5;
3956  Float_t maxdeltacells = 9.5;
3957  for(Int_t col = 0; col < 2; col++)
3958  {
3959  fhNCellsPerClusterM02PerSMPerCol[i][col] = new TH3F
3960  (Form("hNCellsPerClusterM02_SM%d_Col%d",i,col),
3961  Form("#it{E} vs #it{n}_{cells} vs #lambda_{0}^{2}, SM=%d, colum %d",i,col),
3962  nEbins,minE,maxE,cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
3963  fhNCellsPerClusterM02PerSMPerCol[i][col]->SetXTitle("#it{E} (GeV)");
3964  fhNCellsPerClusterM02PerSMPerCol[i][col]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3965  fhNCellsPerClusterM02PerSMPerCol[i][col]->SetZTitle("#lambda_{0}^{2}");
3966  outputContainer->Add(fhNCellsPerClusterM02PerSMPerCol[i][col]);
3967 
3968  fhNCellsPerClusterM20PerSMPerCol[i][col] = new TH3F
3969  (Form("hNCellsPerClusterM20_SM%d_Col%d",i,col),
3970  Form("#it{E} vs #it{n}_{cells} vs #lambda_{1}^{2}, SM=%d, colum %d",i,col),
3971  nEbins,minE,maxE,cellBins,cellMin,cellMax,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
3972  fhNCellsPerClusterM20PerSMPerCol[i][col]->SetXTitle("#it{E} (GeV)");
3973  fhNCellsPerClusterM20PerSMPerCol[i][col]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3974  fhNCellsPerClusterM20PerSMPerCol[i][col]->SetZTitle("#lambda_{1}^{2}");
3975  outputContainer->Add(fhNCellsPerClusterM20PerSMPerCol[i][col]);
3976 
3977  fhNCellsPerClusterNLMPerSMPerCol[i][col] = new TH3F
3978  (Form("hNCellsPerClusterNLM_SM%d_Col%d",i,col),
3979  Form("#it{E} vs #it{n}_{cells} vs n_{lm}, SM=%d, colum %d",i,col),
3980  nEbins,minE,maxE,cellBins,cellMin,cellMax,10,0,10);
3981  fhNCellsPerClusterNLMPerSMPerCol[i][col]->SetXTitle("#it{E} (GeV)");
3982  fhNCellsPerClusterNLMPerSMPerCol[i][col]->SetYTitle("#it{n}_{cells}^{w>0.01}");
3983  fhNCellsPerClusterNLMPerSMPerCol[i][col]->SetZTitle("n_{lm}");
3984  outputContainer->Add(fhNCellsPerClusterNLMPerSMPerCol[i][col]);
3985 
3986  fhColRowFromCellMaxLowM02PerSM[i][col] = new TH3F
3987  (Form("hColRowFromCellMaxLowM02_SM%d_Col%d",i,col),
3988  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, "
3989  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d",fEMinShape,fEMaxShape,i,col),
3990  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,cellBins,cellMin,cellMax);
3991  fhColRowFromCellMaxLowM02PerSM[i][col]->SetZTitle("#it{n}_{cells}^{w>0.01}");
3992  fhColRowFromCellMaxLowM02PerSM[i][col]->SetXTitle("#Delta column_{max-secondary}");
3993  fhColRowFromCellMaxLowM02PerSM[i][col]->SetYTitle("#Delta row_{max-secondary}");
3994  outputContainer->Add(fhColRowFromCellMaxLowM02PerSM[i][col]);
3995 
3996  fhColRowFromCellMaxHighM02PerSM[i][col] = new TH3F
3997  (Form("hColRowFromCellMaxHighM02_SM%d_Col%d",i,col),
3998  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, "
3999  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d",fEMinShape,fEMaxShape,i,col),
4000  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,cellBins,cellMin,cellMax);
4001  fhColRowFromCellMaxHighM02PerSM[i][col]->SetZTitle("#it{n}_{cells}^{w>0.01}");
4002  fhColRowFromCellMaxHighM02PerSM[i][col]->SetXTitle("#Delta column_{max-secondary}");
4003  fhColRowFromCellMaxHighM02PerSM[i][col]->SetYTitle("#Delta row_{max-secondary}");
4004  outputContainer->Add(fhColRowFromCellMaxHighM02PerSM[i][col]);
4005 
4006  for(Int_t j = 0; j < 3; j++)
4007  {
4009  (Form("hColRowFromCellMaxEMaxSecDiffLowM02_SM%d_Col%d_NCellBin%d",i,col,j),
4010  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, "
4011  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, #it{n}_{cells}^{w>0.01} bin %d",fEMinShape,fEMaxShape,i,col,j),
4012  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,120,0,12);
4013  fhColRowFromCellMaxEMaxSecDiffLowM02PerSM[i][col][j]->SetZTitle("#Delta #it{E}_{max-secondary} (GeV)");
4014  fhColRowFromCellMaxEMaxSecDiffLowM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4015  fhColRowFromCellMaxEMaxSecDiffLowM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4016  outputContainer->Add(fhColRowFromCellMaxEMaxSecDiffLowM02PerSM[i][col][j]);
4017 
4019  (Form("hColRowFromCellMaxEMaxSecDiffHighM02_SM%d_Col%d_NCellBin%d",i,col,j),
4020  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, "
4021  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, #it{n}_{cells}^{w>0.01} bin %d",fEMinShape,fEMaxShape,i,col,j),
4022  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,120,0,12);
4023  fhColRowFromCellMaxEMaxSecDiffHighM02PerSM[i][col][j]->SetZTitle("#Delta #it{E}_{max-secondary} (GeV)");
4024  fhColRowFromCellMaxEMaxSecDiffHighM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4025  fhColRowFromCellMaxEMaxSecDiffHighM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4026  outputContainer->Add(fhColRowFromCellMaxEMaxSecDiffHighM02PerSM[i][col][j]);
4027 
4029  (Form("hColRowFromCellMaxEMaxSecDiffFracLowM02_SM%d_Col%d_NCellBin%d",i,col,j),
4030  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, "
4031  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, #it{n}_{cells}^{w>0.01} bin %d",fEMinShape,fEMaxShape,i,col,j),
4032  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,40,0,1);
4033  fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[i][col][j]->SetZTitle("#Delta #it{E}_{max-secondary}/#it{E}_{max}");
4034  fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4035  fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4036  outputContainer->Add(fhColRowFromCellMaxEMaxSecDiffFracLowM02PerSM[i][col][j]);
4037 
4039  (Form("hColRowFromCellMaxEMaxSecDiffFracHighM02_SM%d_Col%d_NCellBin%d",i,col,j),
4040  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, "
4041  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, #it{n}_{cells}^{w>0.01} bin %d",fEMinShape,fEMaxShape,i,col,j),
4042  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,40,0,1);
4043  fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[i][col][j]->SetZTitle("#Delta #it{E}_{max-secondary}/#it{E}_{max}");
4044  fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4045  fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4046  outputContainer->Add(fhColRowFromCellMaxEMaxSecDiffFracHighM02PerSM[i][col][j]);
4047 
4049  (Form("hColRowFromCellMaxECellClusterRatLowM02_SM%d_Col%d_NCellBin%d",i,col,j),
4050  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, "
4051  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, #it{n}_{cells}^{w>0.01} bin %d",fEMinShape,fEMaxShape,i,col,j),
4052  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,50,0,1);
4053  fhColRowFromCellMaxECellClusterRatLowM02PerSM[i][col][j]->SetZTitle("#it{E}_{cell}/#it{E}_{cluster}");
4054  fhColRowFromCellMaxECellClusterRatLowM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4055  fhColRowFromCellMaxECellClusterRatLowM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4056  outputContainer->Add(fhColRowFromCellMaxECellClusterRatLowM02PerSM[i][col][j]);
4057 
4059  (Form("hColRowFromCellMaxECellClusterRatHighM02_SM%d_Col%d_NCellBin%d",i,col,j),
4060  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, "
4061  "%2.2f<#it{E}<%2.2f GeV, SM=%d, colum %d, #it{n}_{cells}^{w>0.01} bin %d",fEMinShape,fEMaxShape,i,col,j),
4062  nbinsdeltacells,mindeltacells,maxdeltacells,nbinsdeltacells,mindeltacells,maxdeltacells,50,0,1);
4063  fhColRowFromCellMaxECellClusterRatHighM02PerSM[i][col][j]->SetZTitle("#it{E}_{cell}/#it{E}_{cluster}");
4064  fhColRowFromCellMaxECellClusterRatHighM02PerSM[i][col][j]->SetXTitle("#Delta column_{max-secondary}");
4065  fhColRowFromCellMaxECellClusterRatHighM02PerSM[i][col][j]->SetYTitle("#Delta row_{max-secondary}");
4066  outputContainer->Add(fhColRowFromCellMaxECellClusterRatHighM02PerSM[i][col][j]);
4067 
4068  } // 3 n cell bins
4069  }//odd/pair col
4070 
4071  } // SM
4072 
4073  for(Int_t imatch = 0; imatch < 3; imatch++)
4074  {
4075  if ( fStudyShapeParam )
4076  {
4077  fhDeltaIEtaDeltaIPhi[imatch] = new TH3F
4078  (Form("hDeltaIEtaDeltaIPhi_%s",matchCase[imatch].Data()),
4079  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),
4080  nEbins,minE,maxE,cellBins,cellMin,cellMax,cellBins,cellMin,cellMax);
4081  fhDeltaIEtaDeltaIPhi[imatch]->SetXTitle("#it{E}_{cluster}");
4082  fhDeltaIEtaDeltaIPhi[imatch]->SetYTitle("#Delta Column");
4083  fhDeltaIEtaDeltaIPhi[imatch]->SetZTitle("#Delta Row");
4084  outputContainer->Add(fhDeltaIEtaDeltaIPhi[imatch]);
4085 
4086  fhDeltaIEtaDeltaIPhiTot[imatch] = new TH3F
4087  (Form("hDeltaIEtaDeltaIPhiTot_%s",matchCase[imatch].Data()),
4088  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),
4089  nEbins,minE,maxE,cellBins,cellMin,cellMax,cellBins,cellMin,cellMax);
4090  fhDeltaIEtaDeltaIPhiTot[imatch]->SetXTitle("#it{E}_{cluster}");
4091  fhDeltaIEtaDeltaIPhiTot[imatch]->SetYTitle("#Delta Column");
4092  fhDeltaIEtaDeltaIPhiTot[imatch]->SetZTitle("#Delta Row");
4093  outputContainer->Add(fhDeltaIEtaDeltaIPhiTot[imatch]);
4094 
4095  fhDeltaIA[imatch] = new TH2F
4096  (Form("hDeltaIA_%s",matchCase[imatch].Data()),
4097  Form("Cluster *asymmetry* in cell units vs E for %s",matchCase[imatch].Data()),
4098  nptbins,ptmin,ptmax,asyBins,asyMin,asyMax);
4099  fhDeltaIA[imatch]->SetXTitle("#it{E}_{cluster}");
4100  fhDeltaIA[imatch]->SetYTitle("#it{A}_{cell in cluster}");
4101  outputContainer->Add(fhDeltaIA[imatch]);
4102 
4103  fhDeltaIATot[imatch] = new TH2F
4104  (Form("hDeltaIATot_%s",matchCase[imatch].Data()),
4105  Form("Cluster *total asymmetry* in cell units vs E for %s",matchCase[imatch].Data()),
4106  nptbins,ptmin,ptmax,asyBins,asyMin,asyMax);
4107  fhDeltaIATot[imatch]->SetXTitle("#it{E}_{cluster}");
4108  fhDeltaIATot[imatch]->SetYTitle("#it{A}_{cell in cluster}^{total}");
4109  outputContainer->Add(fhDeltaIATot[imatch]);
4110 
4111  fhDeltaIAM02[imatch] = new TH3F
4112  (Form("hDeltaIAM02_%s",matchCase[imatch].Data()),
4113  Form("Cluster *asymmetry* in cell units vs #lambda^{2}_{0} for %s",matchCase[imatch].Data()),
4114  nEbins,minE,maxE,nShShBins,minShSh,maxShSh,asyBins,asyMin,asyMax);
4115  fhDeltaIAM02[imatch]->SetXTitle("#it{E}_{cluster}");
4116  fhDeltaIAM02[imatch]->SetYTitle("#lambda^{2}_{0}");
4117  fhDeltaIAM02[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4118  outputContainer->Add(fhDeltaIAM02[imatch]);
4119 
4120  fhDeltaIATotM02[imatch] = new TH3F
4121  (Form("hDeltaIATotM02_%s",matchCase[imatch].Data()),
4122  Form("Cluster *total asymmetry* in cell units vs #lambda^{2}_{0} for %s",matchCase[imatch].Data()),
4123  nEbins,minE,maxE,nShShBins,minShSh,maxShSh,asyBins,asyMin,asyMax);
4124  fhDeltaIATotM02[imatch]->SetXTitle("#it{E}_{cluster}");
4125  fhDeltaIATotM02[imatch]->SetYTitle("#lambda^{2}_{0}");
4126  fhDeltaIATotM02[imatch]->SetZTitle("#it{A}_{cell in cluster}^{total}");
4127  outputContainer->Add(fhDeltaIATotM02[imatch]);
4128 
4129  fhDeltaIAM20[imatch] = new TH3F
4130  (Form("hDeltaIAM20_%s",matchCase[imatch].Data()),
4131  Form("Cluster *asymmetry* in cell units vs #lambda^{2}_{1} for %s",matchCase[imatch].Data()),
4132  nEbins,minE,maxE,(Int_t)nShShBins/1.5,0,maxShSh/1.5,asyBins,asyMin,asyMax);
4133  fhDeltaIAM20[imatch]->SetXTitle("#it{E}_{cluster}");
4134  fhDeltaIAM20[imatch]->SetYTitle("#lambda^{2}_{1}");
4135  fhDeltaIAM20[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4136  outputContainer->Add(fhDeltaIAM20[imatch]);
4137 
4138  fhDeltaIATotM20[imatch] = new TH3F
4139  (Form("hDeltaIATotM20_%s",matchCase[imatch].Data()),
4140  Form("Cluster *total asymmetry* in cell units vs #lambda^{2}_{1} for %s",matchCase[imatch].Data()),
4141  nEbins,minE,maxE,(Int_t)nShShBins/1.5,0,maxShSh/1.5,asyBins,asyMin,asyMax);
4142  fhDeltaIATotM20[imatch]->SetXTitle("#it{E}_{cluster}");
4143  fhDeltaIATotM20[imatch]->SetYTitle("#lambda^{2}_{1}");
4144  fhDeltaIATotM20[imatch]->SetZTitle("#it{A}_{cell in cluster}^{total}");
4145  outputContainer->Add(fhDeltaIATotM20[imatch]);
4146 
4147  fhDeltaIANCells[imatch] = new TH3F
4148  (Form("hDeltaIANCells_%s",matchCase[imatch].Data()),
4149  Form("Cluster *asymmetry* in cell units vs N cells in cluster for %s",matchCase[imatch].Data()),
4150  nEbins,minE,maxE,cellBins,cellMin,cellMax,asyBins,asyMin,asyMax);
4151  fhDeltaIANCells[imatch]->SetXTitle("#it{E}_{cluster}");
4152  fhDeltaIANCells[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4153  fhDeltaIANCells[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4154  outputContainer->Add(fhDeltaIANCells[imatch]);
4155 
4156  fhDeltaIATotNCells[imatch] = new TH3F
4157  (Form("hDeltaIATotNCells_%s",matchCase[imatch].Data()),
4158  Form("Cluster *total asymmetry* in cell units vs N cells in cluster for %s",matchCase[imatch].Data()),
4159  nEbins,minE,maxE,cellBins,cellMin,cellMax,asyBins,asyMin,asyMax);
4160  fhDeltaIATotNCells[imatch]->SetXTitle("#it{E}_{cluster}");
4161  fhDeltaIATotNCells[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4162  fhDeltaIATotNCells[imatch]->SetZTitle("#it{A}_{cell in cluster}^{total}");
4163  outputContainer->Add(fhDeltaIATotNCells[imatch]);
4164 
4165  if ( IsDataMC() )
4166  {
4167  fhDeltaIAOrigin[imatch] = new TH3F
4168  (Form("hDeltaIAOrigin_%s",matchCase[imatch].Data()),
4169  Form("Cluster *asymmetry* in cell units vs E vs primary ID, for ID %s",matchCase[imatch].Data()),
4170  nEbins,minE,maxE,10,-0.5,9.5,asyBins,asyMin,asyMax);
4171  fhDeltaIAOrigin[imatch]->SetXTitle("#it{E}_{cluster}");
4172  fhDeltaIAOrigin[imatch]->SetYTitle("particle");
4173  fhDeltaIAOrigin[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4174  for(Int_t ilabel = 1; ilabel <=10; ilabel++)
4175  fhDeltaIAOrigin[imatch]->GetYaxis()->SetBinLabel(ilabel,mcParticleStringLabel[ilabel-1]);
4176  outputContainer->Add(fhDeltaIAOrigin[imatch]);
4177 
4178  fhDeltaIATotOrigin[imatch] = new TH3F
4179  (Form("hDeltaIATotOrigin_%s",matchCase[imatch].Data()),
4180  Form("Cluster *total asymmetry* in cell units vs E vs primary ID, for ID %s",matchCase[imatch].Data()),
4181  nEbins,minE,maxE,10,-0.5,9.5,asyBins,asyMin,asyMax);
4182  fhDeltaIATotOrigin[imatch]->SetXTitle("#it{E}_{cluster}");
4183  fhDeltaIATotOrigin[imatch]->SetYTitle("particle");
4184  fhDeltaIATotOrigin[imatch]->SetZTitle("#it{A}_{cell in cluster}");
4185  for(Int_t ilabel = 1; ilabel <=10; ilabel++)
4186  fhDeltaIATotOrigin[imatch]->GetYaxis()->SetBinLabel(ilabel,mcParticleStringLabel[ilabel-1]);
4187  outputContainer->Add(fhDeltaIATotOrigin[imatch]);
4188  }
4189  } // Cluster asymmetry
4190 
4191  fhClusterMaxCellDiffM02[imatch] = new TH3F
4192  (Form("hClusterMaxCellDiffM02_%s",matchCase[imatch].Data()),
4193  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()),
4194  nEbins,minE,maxE, 20,0,1.,nShShBins,minShSh,maxShSh);
4195  fhClusterMaxCellDiffM02[imatch]->SetXTitle("#it{E}_{cluster} (GeV) ");
4196  fhClusterMaxCellDiffM02[imatch]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
4197  fhClusterMaxCellDiffM02[imatch]->SetZTitle("#lambda_{0}^{2}");
4198  outputContainer->Add(fhClusterMaxCellDiffM02[imatch]);
4199 
4200  fhClusterTimeEnergyM02[imatch] = new TH3F
4201  (Form("hClusterTimeEnergyM02_%s",matchCase[imatch].Data()),
4202  Form("#it{E} vs TOF vs #lambda_{0}^{2} for ID %s",matchCase[imatch].Data()),
4203  nEbins,minE,maxE,45,-25.5,20.5,nShShBins,minShSh,maxShSh);
4204  fhClusterTimeEnergyM02[imatch]->SetXTitle("#it{E} (GeV) ");
4205  fhClusterTimeEnergyM02[imatch]->SetYTitle("TOF (ns)");
4206  fhClusterTimeEnergyM02[imatch]->SetZTitle("#lambda_{0}^{2}");
4207  outputContainer->Add(fhClusterTimeEnergyM02[imatch]);
4208 
4209  fhNCellsPerClusterM02[imatch] = new TH3F
4210  (Form("hNCellsPerClusterM02_%s",matchCase[imatch].Data()),
4211  Form("#it{E} vs #it{n}_{cells} vs #lambda_{0}^{2} for ID %s",matchCase[imatch].Data()),
4212  nEbins,minE,maxE,cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4213  fhNCellsPerClusterM02[imatch]->SetXTitle("#it{E} (GeV)");
4214  fhNCellsPerClusterM02[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4215  fhNCellsPerClusterM02[imatch]->SetZTitle("#lambda_{0}^{2}");
4216  outputContainer->Add(fhNCellsPerClusterM02[imatch]);
4217 
4218  fhNCellsPerClusterM20[imatch] = new TH3F
4219  (Form("hNCellsPerClusterM20_%s",matchCase[imatch].Data()),
4220  Form("#it{E} vs #it{n}_{cells} vs #lambda_{1}^{2} for ID %s",matchCase[imatch].Data()),
4221  nEbins,minE,maxE,cellBins,cellMin,cellMax,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4222  fhNCellsPerClusterM20[imatch]->SetXTitle("#it{E} (GeV)");
4223  fhNCellsPerClusterM20[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4224  fhNCellsPerClusterM20[imatch]->SetZTitle("#lambda_{1}^{2}");
4225  outputContainer->Add(fhNCellsPerClusterM20[imatch]);
4226 
4227  fhNCellsPerClusterNLM[imatch] = new TH3F
4228  (Form("hNCellsPerClusterNLM_%s",matchCase[imatch].Data()),
4229  Form("#it{E} vs #it{n}_{cells} vs n_{lm} for ID %s",matchCase[imatch].Data()),
4230  nEbins,minE,maxE,cellBins,cellMin,cellMax,10,0,10);
4231  fhNCellsPerClusterNLM[imatch]->SetXTitle("#it{E} (GeV)");
4232  fhNCellsPerClusterNLM[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4233  fhNCellsPerClusterNLM[imatch]->SetZTitle("n_{lm}");
4234  outputContainer->Add(fhNCellsPerClusterNLM[imatch]);
4235 
4236  fhSMM02[imatch] = new TH3F
4237  (Form("hSMM02_%s",matchCase[imatch].Data()),
4238  Form("#it{E} vs SM number vs #lambda_{0}^{2}, #it{n}_{cells}^{w>0.01}>%d, for ID %s",fNCellMinShape,matchCase[imatch].Data()),
4239  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4240  fhSMM02[imatch]->SetXTitle("#it{E} (GeV)");
4241  fhSMM02[imatch]->SetYTitle("SM number");
4242  fhSMM02[imatch]->SetZTitle("#lambda_{0}^{2}");
4243  outputContainer->Add(fhSMM02[imatch]);
4244 
4245  fhSMM02NoCut[imatch] = new TH3F
4246  (Form("hSMM02NoCut_%s",matchCase[imatch].Data()),
4247  Form("#it{E} vs SM number vs #lambda_{0}^{2} for ID %s",matchCase[imatch].Data()),
4248  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4249  fhSMM02NoCut[imatch]->SetXTitle("#it{E} (GeV)");
4250  fhSMM02NoCut[imatch]->SetYTitle("SM number");
4251  fhSMM02NoCut[imatch]->SetZTitle("#lambda_{0}^{2}");
4252  outputContainer->Add(fhSMM02NoCut[imatch]);
4253 
4254  fhSMM20LowM02[imatch] = new TH3F
4255  (Form("hSMM20LowM02_%s",matchCase[imatch].Data()),
4256  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",
4257  fNCellMinShape,matchCase[imatch].Data()),
4258  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4259  fhSMM20LowM02[imatch]->SetXTitle("#it{E} (GeV)");
4260  fhSMM20LowM02[imatch]->SetYTitle("SM number");
4261  fhSMM20LowM02[imatch]->SetZTitle("#lambda_{1}^{2}");
4262  outputContainer->Add(fhSMM20LowM02[imatch]);
4263 
4264  fhSMM20LowM02NoCut[imatch] = new TH3F
4265  (Form("hSMM20LowM02NoCut_%s",matchCase[imatch].Data()),
4266  Form("#it{E} vs SM number vs #lambda_{1}^{2}, for 0.1<#lambda_{0}^{2}<0.3, for ID %s",matchCase[imatch].Data()),
4267  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4268  fhSMM20LowM02NoCut[imatch]->SetXTitle("#it{E} (GeV)");
4269  fhSMM20LowM02NoCut[imatch]->SetYTitle("SM number");
4270  fhSMM20LowM02NoCut[imatch]->SetZTitle("#lambda_{1}^{2}");
4271  outputContainer->Add(fhSMM20LowM02NoCut[imatch]);
4272 
4273  fhSMM20HighM02[imatch] = new TH3F
4274  (Form("hSMM20HighM02_%s",matchCase[imatch].Data()),
4275  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",
4276  fNCellMinShape,matchCase[imatch].Data()),
4277  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4278  fhSMM20HighM02[imatch]->SetXTitle("#it{E} (GeV)");
4279  fhSMM20HighM02[imatch]->SetYTitle("SM number");
4280  fhSMM20HighM02[imatch]->SetZTitle("#lambda_{1}^{2}");
4281  outputContainer->Add(fhSMM20HighM02[imatch]);
4282 
4283  fhSMM20HighM02NoCut[imatch] = new TH3F
4284  (Form("hSMM20HighM02NoCut_%s",matchCase[imatch].Data()),
4285  Form("#it{E} vs SM number vs #lambda_{1}^{2}, for 0.5<#lambda_{0}^{2}<2, for ID %s",matchCase[imatch].Data()),
4286  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,(Int_t)nShShBins/1.5,0,maxShSh/1.5);
4287  fhSMM20HighM02NoCut[imatch]->SetXTitle("#it{E} (GeV)");
4288  fhSMM20HighM02NoCut[imatch]->SetYTitle("SM number");
4289  fhSMM20HighM02NoCut[imatch]->SetZTitle("#lambda_{1}^{2}");
4290  outputContainer->Add(fhSMM20HighM02NoCut[imatch]);
4291 
4292  fhSMNCell[imatch] = new TH3F
4293  (Form("hSMNCell_%s",matchCase[imatch].Data()),
4294  Form("#it{E} vs SM number vs #it{n}_{cells}^{w>0.01} for ID %s",matchCase[imatch].Data()),
4295  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,cellBins,cellMin,cellMax);
4296  fhSMNCell[imatch]->SetXTitle("#it{E} (GeV)");
4297  fhSMNCell[imatch]->SetYTitle("SM number");
4298  fhSMNCell[imatch]->SetZTitle("#it{n}_{cells}^{w>0.01}");
4299  outputContainer->Add(fhSMNCell[imatch]);
4300 
4301  fhSMNCellM02[imatch] = new TH3F
4302  (Form("hSMNCellM02_%s",matchCase[imatch].Data()),
4303  Form("SM number vs #it{n}_{cells}^{w>0.01} vs #lambda_{0}^{2}, "
4304  "%2.2f<#it{E}<%2.2f GeV, for ID %s",fEMinShape,fEMaxShape,matchCase[imatch].Data()),
4305  fNModules,-0.5,fNModules-0.5,cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4306  fhSMNCellM02[imatch]->SetZTitle("#lambda_{0}^{2}");
4307  fhSMNCellM02[imatch]->SetXTitle("SM number");
4308  fhSMNCellM02[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4309  outputContainer->Add(fhSMNCellM02[imatch]);
4310 
4311  fhColM02[imatch] = new TH3F
4312  (Form("hColM02_%s",matchCase[imatch].Data()),
4313  Form("#it{E} vs column number vs #lambda_{0}^{2}, #it{n}_{cells}^{w>0.01}>%d, for ID %s",fNCellMinShape,matchCase[imatch].Data()),
4314  nEbins,minE,maxE,48,-0.5,47.5,nShShBins,minShSh,maxShSh);
4315  fhColM02[imatch]->SetXTitle("#it{E} (GeV)");
4316  fhColM02[imatch]->SetYTitle("column number");
4317  fhColM02[imatch]->SetZTitle("#lambda_{0}^{2}");
4318  outputContainer->Add(fhColM02[imatch]);
4319 
4320  fhRowM02[imatch] = new TH3F
4321  (Form("hRowM02_%s",matchCase[imatch].Data()),
4322  Form("#it{E} vs row number vs #lambda_{0}^{2}, #it{n}_{cells}^{w>0.01}>%d, for ID %s",fNCellMinShape,matchCase[imatch].Data()),
4323  nEbins,minE,maxE,24,-0.5,23.5,nShShBins,minShSh,maxShSh);
4324  fhRowM02[imatch]->SetXTitle("#it{E} (GeV)");
4325  fhRowM02[imatch]->SetYTitle("row number");
4326  fhRowM02[imatch]->SetZTitle("#lambda_{0}^{2}");
4327  outputContainer->Add(fhRowM02[imatch]);
4328 
4329  if ( fStudyShapeParam && GetCalorimeter() == kEMCAL )
4330  {
4331  fhNCellsPerClusterMEta[imatch] = new TH3F
4332  (Form("hNCellsPerClusterMEta_%s",matchCase[imatch].Data()),
4333  Form("#it{E} vs #it{n}_{cells} vs #sigma_{#eta}^{2} for ID %s",matchCase[imatch].Data()),
4334  nEbins,minE,maxE,cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4335  fhNCellsPerClusterMEta[imatch]->SetXTitle("#it{E} (GeV)");
4336  fhNCellsPerClusterMEta[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4337  fhNCellsPerClusterMEta[imatch]->SetZTitle("#sigma_{#eta}^{2}");
4338  outputContainer->Add(fhNCellsPerClusterMEta[imatch]);
4339 
4340  fhNCellsPerClusterMPhi[imatch] = new TH3F
4341  (Form("hNCellsPerClusterMPhi_%s",matchCase[imatch].Data()),
4342  Form("#it{E} vs #it{n}_{cells} vs #sigma_{#varphi}^{2} for ID %s",matchCase[imatch].Data()),
4343  nEbins,minE,maxE,cellBins,cellMin,cellMax,nShShBins,minShSh,maxShSh);
4344  fhNCellsPerClusterMPhi[imatch]->SetXTitle("#it{E} (GeV)");
4345  fhNCellsPerClusterMPhi[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4346  fhNCellsPerClusterMPhi[imatch]->SetZTitle("#sigma_{#varphi}^{2}");
4347  outputContainer->Add(fhNCellsPerClusterMPhi[imatch]);
4348 
4349  fhNCellsPerClusterMEtaPhi[imatch] = new TH3F
4350  (Form("hNCellsPerClusterMEtaPhi_%s",matchCase[imatch].Data()),
4351  Form("#it{E} vs #it{n}_{cells} vs #sigma_{#eta#varphi}^{2} for ID %s",matchCase[imatch].Data()),
4352  nEbins,minE,maxE,cellBins,cellMin,cellMax,nShShBins,-1*maxShSh,maxShSh);
4353  fhNCellsPerClusterMEtaPhi[imatch]->SetXTitle("#it{E} (GeV)");
4354  fhNCellsPerClusterMEtaPhi[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4355  fhNCellsPerClusterMEtaPhi[imatch]->SetZTitle("#sigma_{#eta#varphi}^{2}");
4356  outputContainer->Add(fhNCellsPerClusterMEtaPhi[imatch]);
4357 
4358  fhNCellsPerClusterMEtaPhiA[imatch] = new TH3F
4359  (Form("hNCellsPerClusterMEtaPhiA_%s",matchCase[imatch].Data()),
4360  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()),
4361  nEbins,minE,maxE,cellBins,cellMin,cellMax,nShShBins,-1*maxShSh,maxShSh);
4362  fhNCellsPerClusterMEtaPhiA[imatch]->SetXTitle("#it{E} (GeV)");
4363  fhNCellsPerClusterMEtaPhiA[imatch]->SetYTitle("#it{n}_{cells}^{w>0.01}");
4364  fhNCellsPerClusterMEtaPhiA[imatch]->SetZTitle("(#sigma_{#varphi}^{2}-#sigma_{#eta}^{2})/(#sigma_{#varphi}^{2}+#sigma_{#eta}^{2})");
4365  outputContainer->Add(fhNCellsPerClusterMEtaPhiA[imatch]);
4366 
4367  fhSMMEta[imatch] = new TH3F
4368  (Form("hSMMEta_%s",matchCase[imatch].Data()),
4369  Form("#it{E} vs SM number vs #sigma_{#eta}^{2}, #it{n}_{cells}^{w>0.01}>%d, for ID %s",fNCellMinShape,matchCase[imatch].Data()),
4370  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4371  fhSMMEta[imatch]->SetXTitle("#it{E} (GeV)");
4372  fhSMMEta[imatch]->SetYTitle("SM number");
4373  fhSMMEta[imatch]->SetZTitle("#sigma_{#eta}^{2}");
4374  outputContainer->Add(fhSMMEta[imatch]);
4375 
4376  fhSMMEtaNoCut[imatch] = new TH3F
4377  (Form("hSMMEtaNoCut_%s",matchCase[imatch].Data()),
4378  Form("#it{E} vs SM number vs #sigma_{#eta}^{2} for ID %s",matchCase[imatch].Data()),
4379  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4380  fhSMMEtaNoCut[imatch]->SetXTitle("#it{E} (GeV)");
4381  fhSMMEtaNoCut[imatch]->SetYTitle("SM number");
4382  fhSMMEtaNoCut[imatch]->SetZTitle("#sigma_{#eta}^{2}");
4383  outputContainer->Add(fhSMMEtaNoCut[imatch]);
4384 
4385  fhSMMPhi[imatch] = new TH3F
4386  (Form("hSMMPhi_%s",matchCase[imatch].Data()),
4387  Form("#it{E} vs SM number vs #sigma_{#varphi}^{2}, #it{n}_{cells}^{w>0.01}>%d, for ID %s",fNCellMinShape,matchCase[imatch].Data()),
4388  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4389  fhSMMPhi[imatch]->SetXTitle("#it{E} (GeV)");
4390  fhSMMPhi[imatch]->SetYTitle("SM number");
4391  fhSMMPhi[imatch]->SetZTitle("#sigma_{#varphi}^{2}");
4392  outputContainer->Add(fhSMMPhi[imatch]);
4393 
4394  fhSMMPhiNoCut[imatch] = new TH3F
4395  (Form("hSMMPhiNoCut_%s",matchCase[imatch].Data()),
4396  Form("#it{E} vs SM number vs #sigma_{#varphi}^{2} for ID %s",matchCase[imatch].Data()),
4397  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4398  fhSMMPhiNoCut[imatch]->SetXTitle("#it{E} (GeV)");
4399  fhSMMPhiNoCut[imatch]->SetYTitle("SM number");
4400  fhSMMPhiNoCut[imatch]->SetZTitle("#sigma_{#varphi}^{2}");
4401  outputContainer->Add(fhSMMPhiNoCut[imatch]);
4402 
4403  fhSMMEtaPhi[imatch] = new TH3F
4404  (Form("hSMMEtaPhi_%s",matchCase[imatch].Data()),
4405  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()),
4406  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4407  fhSMMEtaPhi[imatch]->SetXTitle("#it{E} (GeV)");
4408  fhSMMEtaPhi[imatch]->SetYTitle("SM number");
4409  fhSMMEtaPhi[imatch]->SetZTitle("#sigma_{#eta#varphi}^{2}");
4410  outputContainer->Add(fhSMMEtaPhi[imatch]);
4411 
4412  fhSMMEtaPhiNoCut[imatch] = new TH3F
4413  (Form("hSMMEtaPhiNoCut_%s",matchCase[imatch].Data()),
4414  Form("#it{E} vs SM number vs #sigma_{#eta#varphi}^{2} for ID %s",matchCase[imatch].Data()),
4415  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,minShSh,maxShSh);
4416  fhSMMEtaPhiNoCut[imatch]->SetXTitle("#it{E} (GeV)");
4417  fhSMMEtaPhiNoCut[imatch]->SetYTitle("SM number");
4418  fhSMMEtaPhiNoCut[imatch]->SetZTitle("#sigma_{#eta#varphi}^{2}");
4419  outputContainer->Add(fhSMMEtaPhiNoCut[imatch]);
4420 
4421  fhSMMEtaPhiA[imatch] = new TH3F
4422  (Form("hSMMEtaPhiA_%s",matchCase[imatch].Data()),
4423  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()),
4424  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,-1*maxShSh,maxShSh);
4425  fhSMMEtaPhiA[imatch]->SetXTitle("#it{E} (GeV)");
4426  fhSMMEtaPhiA[imatch]->SetYTitle("SM number");
4427  fhSMMEtaPhiA[imatch]->SetZTitle("(#sigma_{#varphi}^{2}-#sigma_{#eta}^{2})/(#sigma_{#varphi}^{2}+#sigma_{#eta}^{2})");
4428  outputContainer->Add(fhSMMEtaPhiA[imatch]);
4429 
4430  fhSMMEtaPhiANoCut[imatch] = new TH3F
4431  (Form("hSMMEtaPhiANoCut_%s",matchCase[imatch].Data()),
4432  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()),
4433  nEbins,minE,maxE,fNModules,-0.5,fNModules-0.5,nShShBins,-1*maxShSh,maxShSh);
4434  fhSMMEtaPhiANoCut[imatch]->SetXTitle("#it{E} (GeV)");
4435  fhSMMEtaPhiANoCut[imatch]->SetYTitle("SM number");
4436  fhSMMEtaPhiANoCut[imatch]->SetZTitle("(#sigma_{#varphi}^{2}-#sigma_{#eta}^{2})/(#sigma_{#varphi}^{2}+#sigma_{#eta}^{2})");
4437  outputContainer->Add(fhSMMEtaPhiANoCut[imatch]);
4438  }
4439 
4440  if ( IsDataMC() )
4441  {
4442  fhOriginE[imatch] = new TH2F
4443  (Form("hOrigin_%s",matchCase[imatch].Data()),
4444  Form("#it{E} vs origin for ID %s",matchCase[imatch].Data()),
4445  nEbins,minE,maxE, 10,-0.5,9.5);
4446  fhOriginE[imatch]->SetXTitle("#it{E} (GeV)");
4447  fhOriginE[imatch]->SetYTitle("particle");
4448  for(Int_t ilabel = 1; ilabel <=10; ilabel++)
4449  fhOriginE[imatch]->GetYaxis()->SetBinLabel(ilabel ,mcParticleStringLabel[ilabel-1]);
4450  outputContainer->Add(fhOriginE[imatch]);
4451 
4452  fhOriginM02[imatch] = new TH3F
4453  (Form("hOriginM02_%s",matchCase[imatch].Data()),
4454  Form("#it{E} vs origin vs #lambda_{0}^{2} for ID %s",matchCase[imatch].Data()),
4455  nEbins,minE,maxE,10,-0.5,9.5,nShShBins,minShSh,maxShSh);
4456  fhOriginM02[imatch]->SetXTitle("#it{E} (GeV)");
4457  fhOriginM02[imatch]->SetYTitle("particle");
4458  fhOriginM02[imatch]->SetZTitle("#lambda_{0}^{2}");
4459  for(Int_t ilabel = 1; ilabel <=10; ilabel++)
4460  fhOriginM02[imatch]->GetYaxis()->SetBinLabel(ilabel,mcParticleStringLabel[ilabel-1]);
4461  outputContainer->Add(fhOriginM02[imatch]);
4462  } // MC
4463  } // match loop
4464 
4465  // fhCellTimeSpreadRespectToCellMaxM02 = new TH3F
4466  // ("hCellTimeSpreadRespectToCellMaxM02",
4467  // "#it{E} vs t_{cell max}-t_{cell i} vs #lambda_{0}^{2}",
4468  // nEbins,minE,maxE,100,-100,100,nShShBins,minShSh,maxShSh);
4469  // fhCellTimeSpreadRespectToCellMaxM02->SetXTitle("#it{E} (GeV)");
4470  // fhCellTimeSpreadRespectToCellMaxM02->SetYTitle("#Delta #it{t}_{cell max-i} (ns)");
4471  // fhCellTimeSpreadRespectToCellMaxM02->SetZTitle("#lambda_{0}^{2}");
4472  // outputContainer->Add(fhCellTimeSpreadRespectToCellMaxM02);
4473 
4475  ("hClusterMaxCellCloseCellRatioM02","#it{E} vs #it{E}_{cell-i}/#it{E}_{cell max} vs #lambda_{0}^{2}",
4476  nEbins,minE,maxE, 20,0,1.,nShShBins,minShSh,maxShSh);
4477  fhClusterMaxCellCloseCellRatioM02->SetXTitle("#it{E}_{cluster} (GeV) ");
4478  fhClusterMaxCellCloseCellRatioM02->SetYTitle("#it{E}_{cell i}/#it{E}_{cell max}");
4479  fhClusterMaxCellCloseCellRatioM02->SetZTitle("#lambda_{0}^{2}");
4480  outputContainer->Add(fhClusterMaxCellCloseCellRatioM02);
4481 
4482  // fhClusterMaxCellCloseCellDiffM02 = new TH3F
4483  // ("hClusterMaxCellCloseCellDiffM02",
4484  // "#it{E} vs #it{E}_{cell max}-#it{E}_{cell i} vs #lambda_{0}^{2}",
4485  // nEbins,minE,maxE, 40,0,20,nShShBins,minShSh,maxShSh);
4486  // fhClusterMaxCellCloseCellDiffM02->SetXTitle("#it{E}_{cluster} (GeV) ");
4487  // fhClusterMaxCellCloseCellDiffM02->SetYTitle("#it{E}_{cell max}-#it{E}_{cell i} (GeV)");
4488  // fhClusterMaxCellCloseCellDiffM02->SetZTitle("#lambda_{0}^{2}");
4489  // outputContainer->Add(fhClusterMaxCellCloseCellDiffM02);
4490 
4491  if(fStudyExotic)
4492  {
4494  ("hClusterMaxCellECrossM02",
4495  "#it{E} vs exoticity vs #lambda_{0}^{2}",
4496  nEbins,minE,maxE, 40,0.6,1.,nShShBins,minShSh,maxShSh);
4497  fhClusterMaxCellECrossM02->SetXTitle("#it{E}_{cluster} (GeV) ");
4498  fhClusterMaxCellECrossM02->SetYTitle("1- #it{E}_{cross}/#it{E}_{cell max}");
4499  fhClusterMaxCellECrossM02->SetZTitle("#lambda_{0}^{2}");
4500  outputContainer->Add(fhClusterMaxCellECrossM02);
4501  }
4502  }
4503 
4504  if(fStudyWeight)
4505  {
4506  fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy",
4507  nptbins,ptmin,ptmax, 100,0,1.);
4508  fhECellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
4509  fhECellClusterRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{cluster}");
4510  outputContainer->Add(fhECellClusterRatio);
4511 
4512  fhECellClusterLogRatio = new TH2F ("hECellClusterLogRatio"," Log(cell energy / cluster energy) vs cluster energy",
4513  nptbins,ptmin,ptmax, 100,-10,0);
4514  fhECellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
4515  fhECellClusterLogRatio->SetYTitle("Log(#it{E}_{cell i}/#it{E}_{cluster})");
4516  outputContainer->Add(fhECellClusterLogRatio);
4517 
4518  fhEMaxCellClusterRatio = new TH2F ("hEMaxCellClusterRatio"," max cell energy / cluster energy vs cluster energy",
4519  nptbins,ptmin,ptmax, 100,0,1.);
4520  fhEMaxCellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
4521  fhEMaxCellClusterRatio->SetYTitle("#it{E}_{max cell}/#it{E}_{cluster}");
4522  outputContainer->Add(fhEMaxCellClusterRatio);
4523 
4524  fhEMaxCellClusterLogRatio = new TH2F ("hEMaxCellClusterLogRatio"," Log(max cell energy / cluster energy) vs cluster energy",
4525  nptbins,ptmin,ptmax, 100,-10,0);
4526  fhEMaxCellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
4527  fhEMaxCellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
4528  outputContainer->Add(fhEMaxCellClusterLogRatio);
4529 
4530  fhECellTotalRatio = new TH2F ("hECellTotalRatio"," cell energy / sum all energy vs all energy",
4531  nptbins*2,ptmin,ptmax*2, 100,0,1.);
4532  fhECellTotalRatio->SetXTitle("#it{E}_{total} (GeV) ");
4533  fhECellTotalRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{total}");
4534  outputContainer->Add(fhECellTotalRatio);
4535 
4536  fhECellTotalLogRatio = new TH2F ("hECellTotalLogRatio"," Log(cell energy / sum all energy) vs all energy",
4537  nptbins*2,ptmin,ptmax*2, 100,-10,0);
4538  fhECellTotalLogRatio->SetXTitle("#it{E}_{total} (GeV) ");
4539  fhECellTotalLogRatio->SetYTitle("Log(#it{E}_{cell i}/#it{E}_{total})");
4540  outputContainer->Add(fhECellTotalLogRatio);
4541 
4544 
4545  for(Int_t imod = 0; imod < fNModules; imod++)
4546  {
4547  if(imod < fFirstModule || imod > fLastModule) continue;
4548 
4549  fhECellTotalRatioMod[imod] = new TH2F (Form("hECellTotalRatio_Mod%d",imod),
4550  Form("#cell energy / sum all energy vs all energy in Module %d",imod),
4551  nptbins*2,ptmin,ptmax*2, 100,0,1.);
4552  fhECellTotalRatioMod[imod]->SetXTitle("#it{E} (GeV)");
4553  fhECellTotalRatioMod[imod]->SetYTitle("#it{n}_{cells}");
4554  outputContainer->Add(fhECellTotalRatioMod[imod]);
4555 
4556  fhECellTotalLogRatioMod[imod] = new TH2F (Form("hECellTotalLogRatio_Mod%d",imod),
4557  Form("Log(cell energy / sum all energy) vs all energy in Module %d",imod),
4558  nptbins*2,ptmin,ptmax*2, 100,-10,0);
4559  fhECellTotalLogRatioMod[imod]->SetXTitle("#it{E} (GeV)");
4560  fhECellTotalLogRatioMod[imod]->SetYTitle("#it{n}_{cells}");
4561  outputContainer->Add(fhECellTotalLogRatioMod[imod]);
4562  }
4563 
4564  // To be done properly with setters and data members ...
4565  Float_t cellEmin [] = {0.05,0.1,0.15,0.2};
4566  Float_t cellTmin [] = {50.,100.,1000000.};
4567 
4568  for(Int_t iw = 0; iw < 12; iw++)
4569  {
4570  Float_t w0 = 4+0.05*iw; // 3+0.25*iw;
4571  for(Int_t iEmin = 0; iEmin < 4; iEmin++)
4572  {
4573  for(Int_t iTmin = 0; iTmin < 3; iTmin++)
4574  {
4575  fhLambda0ForW0AndCellCuts[iw][iEmin][iTmin] = new TH2F (Form("hLambda0ForW0%d_CellEMin%d_TimeMax%d",iw,iEmin,iTmin),
4576  Form("#lambda^{2}_{0} vs E, w0=%1.2f, cell E>%2.2f MeV, |t|<%2.0f ns",
4577  w0, cellEmin[iEmin], cellTmin[iTmin]),
4578  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4579  fhLambda0ForW0AndCellCuts[iw][iEmin][iTmin]->SetXTitle("#it{E}_{cluster}");
4580  fhLambda0ForW0AndCellCuts[iw][iEmin][iTmin]->SetYTitle("#lambda^{2}_{0}");
4581  outputContainer->Add(fhLambda0ForW0AndCellCuts[iw][iEmin][iTmin]);
4582 
4583 
4584  // fhLambda1ForW0AndCellCuts[iw][iEmin][iTmin] = new TH2F (Form("hLambda1ForW0%d_CellEMin%d_TimeMax%d",iw,iEmin,iTmin),
4585  // Form("#lambda^{2}_{1} vs E, w0=%1.2f, cell E>%2.2f MeV, |t|<%2.0f ns"",
4586  // w0, cellEmin[iEmin], cellTmin[iTmin]),
4587  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4588  // fhLambda1ForW0AndCellCuts[iw][iEmin][iTmin]->SetXTitle("#it{E}_{cluster}");
4589  // fhLambda1ForW0AndCellCuts[iw][iEmin][iTmin]->SetYTitle("#lambda^{2}_{1}");
4590  // outputContainer->Add(fhLambda1ForW0AndCellCuts[iw][iEmin][iTmin]);
4591 
4592  fhLambda0ForW0AndCellCutsEta0[iw][iEmin][iTmin] = new TH2F (Form("hLambda0ForW0%d_CellEMin%d_TimeMax%d_Eta0",iw,iEmin,iTmin),
4593  Form("#lambda^{2}_{0} vs E, w0=%1.2f, cell E>%2.2f MeV, |t|<%2.0f ns, |#eta| < 0.15",
4594  w0, cellEmin[iEmin], cellTmin[iTmin]),
4595  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4596  fhLambda0ForW0AndCellCutsEta0[iw][iEmin][iTmin]->SetXTitle("#it{E}_{cluster}");
4597  fhLambda0ForW0AndCellCutsEta0[iw][iEmin][iTmin]->SetYTitle("#lambda^{2}_{0}");
4598  outputContainer->Add(fhLambda0ForW0AndCellCutsEta0[iw][iEmin][iTmin]);
4599  }
4600  }
4601 
4602  if(IsDataMC())
4603  {
4604  TString mcnames[] = {"Photon", "Electron","Conversion","Pi0","Hadron"};
4605  for(Int_t imc = 0; imc < 5; imc++)
4606  {
4607  fhLambda0ForW0MC[iw][imc] = new TH2F (Form("hLambda0ForW0%d_MC%s",iw,mcnames[imc].Data()),
4608  Form("shower shape, #lambda^{2}_{0} vs E, w0 = %1.1f, for MC %s",w0,mcnames[imc].Data()),
4609  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4610  fhLambda0ForW0MC[iw][imc]->SetXTitle("#it{E}_{cluster}");
4611  fhLambda0ForW0MC[iw][imc]->SetYTitle("#lambda^{2}_{0}");
4612  outputContainer->Add(fhLambda0ForW0MC[iw][imc]);
4613 
4614  // fhLambda1ForW0MC[iw][imc] = new TH2F (Form("hLambda1ForW0%d_MC%s",iw,mcnames[imc].Data()),
4615  // Form("shower shape, #lambda^{2}_{1} vs E, w0 = %1.1f, for MC %s",w0,mcnames[imc].Data()),
4616  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
4617  // fhLambda1ForW0MC[iw][imc]->SetXTitle("#it{E}_{cluster}");
4618  // fhLambda1ForW0MC[iw][imc]->SetYTitle("#lambda^{2}_{1}");
4619  // outputContainer->Add(fhLambda1ForW0MC[iw][imc]);
4620  }
4621  }
4622  }
4623  }
4624 
4625  // for(Int_t i = 0; i < outputContainer->GetEntries() ; i++)
4626  // printf("i=%d, name= %s\n",i,outputContainer->At(i)->GetName());
4627 
4628  return outputContainer;
4629 }
4630 
4631 //______________________________
4633 //______________________________
4635 {
4636  if(GetCalorimeter() != kPHOS && GetCalorimeter() !=kEMCAL)
4637  AliFatal(Form("Wrong calorimeter name <%s>", GetCalorimeterString().Data()));
4638 
4639  //if(GetReader()->GetDataType()== AliCaloTrackReader::kMC)
4640  // AliFatal("Analysis of reconstructed data, MC reader not aplicable");
4641 }
4642 
4643 //________________________________________
4645 //________________________________________
4647 {
4648  AddToHistogramsName("AnaClusShapeCorr_");
4649 
4650  fM02Min = 0.05;
4651 
4652  fNCellMin = 3; // at least 3
4653 
4654  fMinDistToBad = 5;
4655 
4656  fInvMassMinECut = 0.5; // 500 MeV
4657  fInvMassMaxECut = 12;
4658 
4659  fInvMassMinM02Cut = 0.1;
4660  fInvMassMaxM02Cut = 0.4;
4661 
4662  fInvMassMaxTimeDifference = 70; // ns
4663 
4664  fInvMassMaxOpenAngle = 100*TMath::DegToRad(); // 100 degrees
4665 
4666  fNEBinCuts = 7;
4667  fEBinCuts[0] = 2. ; fEBinCuts[1] = 4. ; fEBinCuts[2] = 6. ;
4668  fEBinCuts[3] = 8. ; fEBinCuts[4] = 10.; fEBinCuts[5] = 12.;
4669  fEBinCuts[6] = 16.; fEBinCuts[7] = 20.;
4670  for(Int_t i = fNEBinCuts+1; i < 15; i++) fEBinCuts[i] = 1000.;
4671 
4672  fEMinShape = 8;
4673  fEMaxShape = 12;
4674  fNCellMinShape = 4;
4675 }
4676 
4677 //________________________________________
4679 //________________________________________
4681 {
4682  if(IsDataMC())
4683  {
4684  fdEdXMinEle = 80;
4685  fdEdXMaxEle =100;
4686  fdEdXMinHad = 45;
4687  fdEdXMaxHad = 78;
4688 
4689  AliInfo(Form("dEdX cuts init for MC: %d<dedx_ele<%d; %d<dedx_had<%d",
4691  } // MC
4692  else
4693  {
4694  Int_t runNumber = GetReader()->GetInputEvent()->GetRunNumber();
4695 
4696  // data
4697  if ( runNumber < 146861 ) // LHC11a, LHC10 check for both
4698  {
4699  fdEdXMinEle = 72;
4700  fdEdXMaxEle = 90;
4701  fdEdXMinHad = 40;
4702  fdEdXMaxHad = 70;
4703  }
4704  else if ( runNumber < 156000 ) // LHC11c, LHC11b, check for b
4705  {
4706  fdEdXMinEle = 60;
4707  fdEdXMaxEle = 72;
4708  fdEdXMinHad = 35;
4709  fdEdXMaxHad = 56;
4710  }
4711  else if ( runNumber < 165000 ) // LHC11d and other, check for other
4712  {
4713  fdEdXMinEle = 74;
4714  fdEdXMaxEle = 90;
4715  fdEdXMinHad = 40;
4716  fdEdXMaxHad = 70;
4717  }
4718  else // LHC12cdfhi and beyond, check for >=LHC13!
4719  {
4720  fdEdXMinEle = 78;
4721  fdEdXMaxEle = 95;
4722  fdEdXMinHad = 40;
4723  fdEdXMaxHad = 74;
4724  }
4725 
4726  AliInfo(Form("dEdX cuts init for run %d: %d<dedx_ele<%d; %d<dedx_had<%d",
4728  } // data
4729 }
4730 
4731 //_____________________________________________________________________________
4738 //_____________________________________________________________________________
4740  Int_t nCellsPerCluster)
4741 {
4742  if( m02 < fM02Min || nCellsPerCluster < fNCellMin ) return kFALSE ; // mild shower shape cut for exotics
4743 
4744  Int_t bc = (GetReader()->GetInputEvent())->GetBunchCrossNumber();
4745 
4746  if(GetCalorimeter() == kEMCAL)
4747  {
4748  if(!GetCaloUtils()->GetEMCALRecoUtils()->IsRejectExoticCluster())
4749  return !(GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(absIdMax,fCaloCellList,bc));
4750  else
4751  return kTRUE;
4752  }
4753  else // PHOS
4754  {
4755  Float_t ampMax = fCaloCellList->GetCellAmplitude(absIdMax);
4756  GetCaloUtils()->RecalibrateCellAmplitude(ampMax, GetCalorimeter(), absIdMax);
4757 
4758  if(ampMax < 0.01) return kFALSE;
4759  if(1-GetCaloUtils()->GetECross(absIdMax,fCaloCellList,bc)/ampMax > 0.95)
4760  return kFALSE;
4761  else
4762  return kTRUE;
4763  }
4764 }
4765 
4766 //_________________________________________________________
4768 //_________________________________________________________
4770 {
4771  if(! opt)
4772  return;
4773 
4774  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
4776 
4777  printf("Select Calorimeter %s \n",GetCalorimeterString().Data());
4778  printf("Min n cells : %d\n" , fNCellMin) ;
4779  printf("Min dist to bad: %2.1f\n", fMinDistToBad) ;
4780  printf("Min M02 : %1.2f\n", fM02Min) ;
4781 
4782  printf("Inv. Mass %2.1f < E_clus < %2.1f GeV/c\n" , fInvMassMinECut , fInvMassMaxECut ) ;
4783  printf("Inv. Mass %2.1f < M02_clus < %2.1f GeV/c\n", fInvMassMinM02Cut, fInvMassMaxM02Cut) ;
4784  printf("Inv. Mass open angle : %2.1f deg\n" , fInvMassMaxOpenAngle*TMath::RadToDeg()) ;
4785  printf("Inv. Mass time difference: %2.1f ns\n" , fInvMassMaxTimeDifference) ;
4786 }
4787 
4788 //_____________________________________________________
4793 //_____________________________________________________
4795 {
4796  AliDebug(1,"Start");
4797 
4798  //Print("");
4799 
4800  // Get List with CaloClusters , calo Cells, init min amplitude
4801  if (GetCalorimeter() == kPHOS)
4802  {
4805  }
4806  else if (GetCalorimeter() == kEMCAL)
4807  {
4810  }
4811  else
4812  AliFatal(Form("AliAnaClusterShapeCorrelStudies::MakeAnalysisFillHistograms() - Wrong calorimeter name <%s>, END", GetCalorimeterString().Data()));
4813 
4814  if( !fCaloClusList || !fCaloCellList )
4815  {
4816  AliFatal(Form("AliAnaClusterShapeCorrelStudies::MakeAnalysisFillHistograms() - No CaloClusters or CaloCells available"));
4817  return; // trick coverity
4818  }
4819 
4820  if(fCaloClusList->GetEntriesFast() == 0) return ;
4821 
4822  AliDebug(1,Form("N cells %d, N clusters %d \n",fCaloCellList->GetNumberOfCells(),fCaloClusList->GetEntriesFast()));
4823 
4824  // Clusters
4826 
4827  AliDebug(1,"End");
4828 }
4829 
4830 //_________________________________________________________________________________
4836 //_________________________________________________________________________________
4838 {
4839  // First recalculate energy in case non linearity was applied
4840  Float_t energy = 0;
4841  Float_t ampMax = 0;
4842  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
4843  Float_t enOrg = clus->E();
4844 
4845  // Do study when there are enough cells in cluster
4846  if(clus->GetNCells() < 3) return ;
4847 
4848  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
4849  {
4850  Int_t id = clus->GetCellsAbsId()[ipos];
4851 
4852  //Recalibrate cell energy if needed
4853  Float_t amp = fCaloCellList->GetCellAmplitude(id);
4855 
4856  energy += amp;
4857 
4858  if ( amp > ampMax )
4859  ampMax = amp;
4860 
4861  } // energy loop
4862 
4863  if ( energy <=0 )
4864  {
4865  AliWarning(Form("Wrong calculated energy %f",energy));
4866  return;
4867  }
4868 
4869  // Remove non linearity correction
4870  clus->SetE(energy);
4871 
4872  fhEMaxCellClusterRatio ->Fill(energy, ampMax/energy , GetEventWeight());
4873  fhEMaxCellClusterLogRatio->Fill(energy, TMath::Log(ampMax/energy), GetEventWeight());
4874 
4875  // Get the ratio and log ratio to all cells in cluster
4876  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
4877  {
4878  Int_t id = clus->GetCellsAbsId()[ipos];
4879 
4880  // Recalibrate cell energy if needed
4881  Float_t amp = fCaloCellList->GetCellAmplitude(id);
4883 
4884  fhECellClusterRatio ->Fill(energy, amp/energy , GetEventWeight());
4885  fhECellClusterLogRatio->Fill(energy, TMath::Log(amp/energy), GetEventWeight());
4886  }
4887 
4888  //
4889  // Recalculate shower shape for different W0 and cell cuts
4890  //
4891  if ( GetCalorimeter() == kEMCAL )
4892  {
4893  Float_t l0org = clus->GetM02();
4894  Float_t l1org = clus->GetM20();
4895  Float_t dorg = clus->GetDispersion();
4896  Float_t w0org = GetCaloUtils()->GetEMCALRecoUtils()->GetW0();
4897 
4898  Int_t mcIndex = -1;
4899  if(IsDataMC() && clus->GetNLabels() > 0)
4900  {
4905  mcIndex = 0;
4906  } // Pure Photon
4909  mcIndex = 1;
4910  } // Electron
4912  mcIndex = 2;
4913  } // Conversion
4915  mcIndex = 3;
4916  }// Pi0
4919  mcIndex = 4;
4920  } // Hadron
4921  } // Is MC
4922 
4923  // To be done properly with setters and data members ...
4924  Float_t cellEmin [] = {0.05,0.1,0.15,0.2};
4925  Float_t cellTmin [] = {50.,100.,1000000.};
4926 
4927  for(Int_t iw = 0; iw < 12; iw++)
4928  {
4929  for(Int_t iEmin = 0; iEmin < 4; iEmin++)
4930  {
4931  for(Int_t iTmin = 0; iTmin < 3; iTmin++)
4932  {
4933  GetCaloUtils()->GetEMCALRecoUtils()->SetW0(4+iw*0.05);
4934