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