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