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