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