17 #include <TGeoManager.h>
23 #include <TParticle.h>
27 #include "AliESDEvent.h"
28 #include "AliMCEvent.h"
30 #include "AliAODPWG4Particle.h"
31 #include "AliVCluster.h"
32 #include "AliVCaloCells.h"
33 #include "AliAODCaloCluster.h"
34 #include "AliOADBContainer.h"
35 #include "AliAnalysisManager.h"
36 #include "AliAODMCParticle.h"
40 #include "AliEMCALGeometry.h"
41 #include "AliPHOSGeoUtils.h"
55 fEMCALGeo(0x0), fPHOSGeo(0x0),
56 fEMCALGeoMatrixSet(kFALSE), fPHOSGeoMatrixSet(kFALSE),
57 fLoadEMCALMatrices(kFALSE), fLoadPHOSMatrices(kFALSE),
58 fRemoveBadChannels(kFALSE), fPHOSBadChannelMap(0x0),
59 fNCellsFromPHOSBorder(0),
60 fNMaskCellColumns(0), fMaskCellColumns(0x0),
61 fRecalibration(kFALSE), fRunDependentCorrection(kFALSE),
62 fPHOSRecalibrationFactors(), fEMCALRecoUtils(new AliEMCALRecoUtils),
63 fRecalculatePosition(kFALSE), fCorrectELinearity(kFALSE),
64 fRecalculateMatching(kFALSE),
66 fCutEta(20), fCutPhi(20),
67 fLocMaxCutE(0), fLocMaxCutEDiff(0),
68 fPlotCluster(0), fOADBSet(kFALSE),
69 fOADBForEMCAL(kFALSE), fOADBForPHOS(kFALSE),
70 fOADBFilePathEMCAL(
""), fOADBFilePathPHOS(
""),
71 fImportGeometryFromFile(0), fImportGeometryFilePath(
""),
72 fNSuperModulesUsed(0), fRunNumber(0),
73 fMCECellClusFracCorrOn(0), fMCECellClusFracCorrParam()
121 Int_t nSM =
fEMCALGeo->GetNumberOfSuperModules();
126 AliOADBContainer *contBC=
new AliOADBContainer(
"");
127 contBC->InitFromFile(Form(
"%s/EMCALBadChannels.root",
fOADBFilePathEMCAL.Data()),
"AliEMCALBadChannels");
129 TObjArray *arrayBC=(TObjArray*)contBC->GetObject(
fRunNumber);
134 AliInfo(
"Remove EMCAL bad cells");
136 for (Int_t i=0; i<nSM; ++i)
143 hbm=(TH2I*)arrayBC->FindObject(Form(
"EMCALBadChannelMap_Mod%d",i));
147 AliError(Form(
"Can not get EMCALBadChannelMap_Mod%d",i));
151 hbm->SetDirectory(0);
155 }
else AliInfo(
"Do NOT remove EMCAL bad channels\n");
163 AliOADBContainer *contRF=
new AliOADBContainer(
"");
165 contRF->InitFromFile(Form(
"%s/EMCALRecalib.root",
fOADBFilePathEMCAL.Data()),
"AliEMCALRecalib");
167 TObjArray *recal=(TObjArray*)contRF->GetObject(
fRunNumber);
171 TObjArray *recalpass=(TObjArray*)recal->FindObject(pass);
175 TObjArray *recalib=(TObjArray*)recalpass->FindObject(
"Recalib");
179 AliInfo(
"Recalibrate EMCAL");
180 for (Int_t i=0; i < nSM; ++i)
187 h = (TH2F*)recalib->FindObject(Form(
"EMCALRecalFactors_SM%d",i));
191 AliError(Form(
"Could not load EMCALRecalFactors_SM%d",i));
199 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params object array");
200 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params for pass");
201 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params for run");
212 AliOADBContainer *contRFTD=
new AliOADBContainer(
"");
214 contRFTD->InitFromFile(Form(
"%s/EMCALTemperatureCorrCalib.root",
fOADBFilePathEMCAL.Data()),
"AliEMCALRunDepTempCalibCorrections");
216 TH1S *htd=(TH1S*)contRFTD->GetObject(
fRunNumber);
221 AliWarning(Form(
"No TemperatureCorrCalib Objects for run: %d",
fRunNumber));
225 Int_t maxEntry = contRFTD->GetNumberOfEntries();
227 while ( (ic < maxEntry) && (contRFTD->UpperLimit(ic) <
fRunNumber) )
233 Int_t closest = lower;
234 if ( (ic<maxEntry) &&
240 AliWarning(Form(
"TemperatureCorrCalib Objects found closest id %d from run: %d", closest, contRFTD->LowerLimit(closest)));
241 htd = (TH1S*) contRFTD->GetObjectByIndex(closest);
246 AliInfo(
"Recalibrate (Temperature) EMCAL");
248 for (Int_t ism=0; ism<nSM; ++ism)
250 for (Int_t icol=0; icol<48; ++icol)
252 for (Int_t irow=0; irow<24; ++irow)
256 Int_t absID =
fEMCALGeo->GetAbsCellIdFromCellIndexes(ism, irow, icol);
257 factor *= htd->GetBinContent(absID) / 10000. ;
266 }
else AliInfo(
"Do NOT recalibrate EMCAL with T variations, no params TH1");
274 AliOADBContainer *contTRF=
new AliOADBContainer(
"");
276 contTRF->InitFromFile(Form(
"%s/EMCALTimeCalib.root",
fOADBFilePathEMCAL.Data()),
"AliEMCALTimeCalib");
278 TObjArray *trecal=(TObjArray*)contTRF->GetObject(
fRunNumber);
282 TString passM = pass;
283 if(pass==
"spc_calo") passM =
"pass3";
284 TObjArray *trecalpass=(TObjArray*)trecal->FindObject(passM);
288 AliInfo(
"Time Recalibrate EMCAL");
289 for (Int_t ibc = 0; ibc < 4; ++ibc)
296 h = (TH1F*)trecalpass->FindObject(Form(
"hAllTimeAvBC%d",ibc));
300 AliError(Form(
"Could not load hAllTimeAvBC%d",ibc));
308 }
else AliInfo(
"Do NOT recalibrate time EMCAL, no params for pass");
309 }
else AliInfo(
"Do NOT recalibrate time EMCAL, no params for run");
316 Bool_t useDefault=kFALSE;
317 AliOADBContainer *contTRF=
new AliOADBContainer(
"");
318 contTRF->InitFromFile(Form(
"%s/EMCALTimeL1PhaseCalib.root",
fOADBFilePathEMCAL.Data()),
"AliEMCALTimeL1PhaseCalib");
319 TObjArray *trecal=(TObjArray*)contTRF->GetObject(
fRunNumber);
321 AliError(Form(
"Do NOT recalibrate time EMCAL. No params for run %d. Default used.",
fRunNumber));
322 trecal=(TObjArray*)contTRF->GetObject(0);
324 AliFatal(Form(
"No params for run %d. No default params.",
fRunNumber));
330 TString passM = pass;
331 if(useDefault) passM =
"pass1";
332 else if(pass==
"muon_calo_pass1") passM =
"muon_calo_pass1";
333 else if(pass==
"muon_calo_pass2") passM =
"muon_calo_pass2";
335 TObjArray *trecalpass=(TObjArray*)trecal->FindObject(passM);
338 AliFatal(
"No defaults params pass1.");
341 AliInfo(
"Do NOT recalibrate time EMCAL, no params for pass");
344 trecal=(TObjArray*)contTRF->GetObject(0);
346 AliFatal(Form(
"No params for run %d. No default params.",
fRunNumber));
350 trecalpass=(TObjArray*)trecal->FindObject(
"pass1");
352 AliFatal(
"No defaults params pass1.");
357 AliInfo(
"Time L1 phase Recalibrate EMCAL");
360 h = (TH1C*)trecalpass->FindObject(Form(
"h%d",
fRunNumber));
361 if (!h) AliError(Form(
"Could not load h%d",
fRunNumber));
378 AliOADBContainer badmapContainer(Form(
"phosBadMap"));
379 TString
fileName=
"$ALICE_PHYSICS/OADB/PHOS/PHOSBadMaps.root";
380 badmapContainer.InitFromFile(Form(
"%s/PHOSBadMaps.root",
fOADBFilePathPHOS.Data()),
"phosBadMap");
383 TObjArray *maps = (TObjArray*)badmapContainer.GetObject(139000,
"phosBadMap");
386 AliInfo(Form(
"Can not read PHOS bad map for run %d",
fRunNumber)) ;
390 AliInfo(Form(
"Setting PHOS bad map with name %s",maps->GetName())) ;
392 for(Int_t mod = 1; mod < 5; mod++)
399 hbmPH = (TH2I*)maps->At(mod);
401 if(hbmPH) hbmPH->SetDirectory(0);
431 AliInfo(
"Load user defined EMCAL geometry matrices");
434 AliOADBContainer emcGeoMat(
"AliEMCALgeo");
435 emcGeoMat.InitFromFile(Form(
"%s/EMCALlocal2master.root",
fOADBFilePathEMCAL.Data()),
"AliEMCALgeo");
436 TObjArray *matEMCAL=(TObjArray*)emcGeoMat.GetObject(
fRunNumber,
"EmcalMatrices");
438 for(Int_t mod=0; mod < (
fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
442 AliDebug(1,Form(
"EMCAL matrices SM %d, %p", mod,((TGeoHMatrix*) matEMCAL->At(mod))));
457 AliWarning(Form(
"Set matrix for SM %d from gGeoManager",mod));
458 fEMCALGeo->SetMisalMatrix(
fEMCALGeo->GetMatrixForSuperModuleFromGeoManager(mod),mod) ;
462 AliError(Form(
"Alignment atrix for SM %d is not available",mod));
469 else if (!gGeoManager)
471 AliDebug(1,
"Load EMCAL misalignment matrices");
472 if(!strcmp(inputEvent->GetName(),
"AliESDEvent"))
474 for(Int_t mod = 0; mod < (
fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
477 if(((AliESDEvent*)inputEvent)->GetEMCALMatrix(mod))
479 fEMCALGeo->SetMisalMatrix(((AliESDEvent*)inputEvent)->GetEMCALMatrix(mod),mod) ;
488 AliDebug(1,
"Setting of EMCAL transformation matrixes for AODs not implemented yet. \n Import geometry.root file");
502 AliInfo(
"Load user defined PHOS geometry matrices");
505 AliOADBContainer geomContainer(
"phosGeo");
506 geomContainer.InitFromFile(Form(
"%s/PHOSGeometry.root",
fOADBFilePathPHOS.Data()),
"PHOSRotationMatrixes");
507 TObjArray *matPHOS = (TObjArray*)geomContainer.GetObject(139000,
"PHOSRotationMatrixes");
509 for(Int_t mod = 0 ; mod < 5 ; mod++)
513 AliDebug(1,Form(
"PHOS matrices module %d, %p",mod,((TGeoHMatrix*) matPHOS->At(mod))));
516 fPHOSMatrix[mod] = (TGeoHMatrix*) matPHOS->At(mod) ;
532 else if (!gGeoManager)
534 AliDebug(1,
"Load PHOS misalignment matrices.");
535 if(!strcmp(inputEvent->GetName(),
"AliESDEvent"))
537 for(Int_t mod = 0; mod < 5; mod++)
539 if( ((AliESDEvent*)inputEvent)->GetPHOSMatrix(mod))
542 fPHOSGeo->SetMisalMatrix( ((AliESDEvent*)inputEvent)->GetPHOSMatrix(mod),mod) ;
550 AliDebug(1,
"Setting of EMCAL transformation matrixes for AODs not implemented yet. \n Import geometry.root file");
566 Bool_t areNeighbours = kFALSE ;
568 Int_t iRCU1 = -1, irow1 = -1, icol1 = -1;
569 Int_t iRCU2 = -1, irow2 = -1, icol2 = -1;
571 Int_t rowdiff = 0, coldiff = 0;
576 if(calo==
kEMCAL && nSupMod1!=nSupMod2)
580 if(nSupMod1%2) icol1+=AliEMCALGeoParams::fgkEMCALCols;
581 else icol2+=AliEMCALGeoParams::fgkEMCALCols;
584 rowdiff = TMath::Abs( irow1 - irow2 ) ;
585 coldiff = TMath::Abs( icol1 - icol2 ) ;
588 if ((coldiff + rowdiff == 1 ))
589 areNeighbours = kTRUE ;
591 return areNeighbours;
599 AliVCluster* cluster)
609 for(Int_t iDigit = 0; iDigit < cluster->GetNCells(); iDigit++)
612 geom->GetCellIndex(cluster->GetCellAbsId(iDigit),iSupMod,iTower,iIphi,iIeta);
613 geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi,iIeta, iphi,ieta);
616 if (iDigit == 0 ) iSM0 = iSupMod;
617 else if(iSupMod != iSM0)
619 if(iSupMod > 11 && iSupMod < 18)
620 AliWarning(Form(
"Cluster shared in 2 DCal: SM%d, SM%d??",iSupMod,iSM0));
634 AliVCaloCells* cells)
const
638 if ( cells->GetType()==AliVCaloCells::kEMCALCell &&
fEMCALRecoUtils->GetNumberOfCellsFromEMCALBorder() <= 0 )
return kTRUE;
645 for(Int_t i = 0; i < cluster->GetNCells() ; i++)
647 Int_t absId = cluster->GetCellAbsId(i) ;
648 Float_t amp = cells->GetCellAmplitude(absId);
657 AliDebug(1,Form(
"Cluster Max AbsId %d, Cell Energy %2.2f, Cluster Energy %2.2f",
658 absIdMax, ampMax, cluster->E()));
660 if ( absIdMax == -1 )
return kFALSE;
663 Bool_t okrow = kFALSE;
664 Bool_t okcol = kFALSE;
666 if ( cells->GetType() == AliVCaloCells::kEMCALCell )
671 Int_t iTower = -1, iIphi = -1, iIeta = -1, iphi = -1, ieta = -1, iSM = -1;
673 fEMCALGeo->GetCellIndex(absIdMax,iSM,iTower,iIphi,iIeta);
675 fEMCALGeo->GetCellPhiEtaIndexInSModule(iSM,iTower,iIphi, iIeta,iphi,ieta);
677 if(iSM < 0 || iphi < 0 || ieta < 0 )
679 AliFatal(Form(
"Negative value for super module: %d, or cell ieta: %d, or cell iphi: %d, check EMCAL geometry name",iSM,ieta,iphi));
685 if ( iSM < 10 || (iSM > 11 && iSM < 18) )
687 if(iphi >= nborder && iphi < 24-nborder) okrow = kTRUE;
691 if(iphi >= nborder && iphi < 8-nborder) okrow = kTRUE;
697 if(!
fEMCALRecoUtils->IsEMCALNoBorderAtEta0() || (iSM > 11 && iSM < 18))
699 if(ieta > nborder && ieta < 48-nborder) okcol =kTRUE;
705 if(ieta >= nborder) okcol = kTRUE;
709 if(ieta < 48-nborder) okcol = kTRUE;
713 AliDebug(1,Form(
"EMCAL Cluster in %d cells fiducial volume: ieta %d, iphi %d, SM %d ? ok row %d, ok column %d",
714 nborder, ieta, iphi, iSM,okrow,okcol));
717 else if ( cells->GetType() == AliVCaloCells::kPHOSCell )
720 Int_t irow = -1, icol = -1;
721 fPHOSGeo->AbsToRelNumbering(absIdMax,relId);
723 if (relId[1] != 0 )
return kFALSE;
729 if(irow >= fNCellsFromPHOSBorder && irow < 64-fNCellsFromPHOSBorder) okrow =kTRUE;
730 if(icol >= fNCellsFromPHOSBorder && icol < 56-fNCellsFromPHOSBorder) okcol =kTRUE;
732 AliDebug(1,Form(
"PHOS Cluster in %d cells fiducial volume: ieta %d, iphi %d, SM %d ? ok row %d, ok column %d",
733 fNCellsFromPHOSBorder, icol, irow, relId[0]-1,okrow,okcol));
736 if (okcol && okrow)
return kTRUE;
755 for(Int_t iCell = 0; iCell<nCells; iCell++)
758 if ( calorimeter ==
kEMCAL )
762 else if ( calorimeter ==
kPHOS )
765 fPHOSGeo->AbsToRelNumbering(cellList[iCell],relId);
767 if (relId[1] != 0 )
return kTRUE;
802 Int_t & regEta, Int_t & regPhi)
const
804 regEta = regPhi = -1 ;
806 if(!clus->IsEMCAL())
return ;
808 Int_t icol = -1, irow = -1, iRCU = -1;
809 Float_t clusterFraction = 0;
816 if( sm%2 == 1) icol+=AliEMCALGeoParams::fgkEMCALCols;
819 if(icol < 2 || icol > 93 || irow < 2 || irow > 21)
return;
826 if ( icol > 9 && icol < 34 ) regEta = 0;
827 else if ( icol > 62 && icol < 87 ) regEta = 0;
831 else if ( icol <= 9 && icol >= 5 ) regEta = 3;
832 else if ( icol <= 38 && icol >= 34 ) regEta = 3;
833 else if ( icol <= 62 && icol >= 58 ) regEta = 3;
834 else if ( icol <= 91 && icol >= 87 ) regEta = 3;
838 else if ( icol < 58 && icol > 38 ) regEta = 1 ;
848 if ( irow >= 2 && irow <= 5 ) regPhi = 0;
849 else if ( irow >= 18 && irow <= 21 ) regPhi = 0;
850 else if ( irow >= 6 && irow <= 9 ) regPhi = 1;
851 else if ( irow >= 14 && irow <= 17 ) regPhi = 1;
861 Float_t & clusterFraction)
const
865 AliInfo(
"Cluster or cells pointer is null!");
872 Float_t fraction = 1.;
873 Float_t recalFactor = 1.;
874 Int_t cellAbsId =-1 , absId =-1 ;
875 Int_t iSupMod =-1 , ieta =-1 , iphi = -1, iRCU = -1;
878 if(clu->IsPHOS()) calo =
kPHOS ;
880 for (Int_t iDig=0; iDig< clu->GetNCells(); iDig++)
882 cellAbsId = clu->GetCellAbsId(iDig);
884 fraction = clu->GetCellAmplitudeFraction(iDig);
885 if(fraction < 1e-4) fraction = 1.;
895 eCell = cells->GetCellAmplitude(cellAbsId)*fraction*recalFactor;
908 clusterFraction = (eTot-eMax)/eTot;
921 AliVEvent* event, Int_t index)
const
923 AliVTrack *track = 0x0;
930 Int_t trackIndex =
fEMCALRecoUtils->GetMatchedTrackIndex(cluster->GetID());
934 AliInfo(Form(
"Wrong track index %d, from recalculation", trackIndex));
936 track =
dynamic_cast<AliVTrack*
> (
event->GetTrack(trackIndex));
946 if( cluster->GetNTracksMatched() < 1 )
return 0x0;
952 if(!strcmp(
"AliESDCaloCluster",Form(
"%s",cluster->ClassName())))
954 if( index >= 0 ) iTrack = index;
955 else iTrack = ((AliESDCaloCluster*)cluster)->GetTracksMatched()->At(0);
957 track =
dynamic_cast<AliVTrack*
> (
event->GetTrack(iTrack) );
961 if( index > 0 ) iTrack = index;
963 track =
dynamic_cast<AliVTrack*
>( cluster->GetTrackMatched(iTrack) );
975 if( eCluster <= 0 || eCluster < eCell )
977 AliWarning(Form(
"Bad values eCell=%f, eCluster %f",eCell,eCluster));
981 Float_t frac = eCell / eCluster;
1001 if(particle->GetDetectorTag()==
kEMCAL)
1003 fEMCALGeo->GetAbsCellIdFromEtaPhi(particle->Eta(),particle->Phi(), absId);
1005 AliDebug(2,Form(
"EMCAL: cluster eta %f, phi %f, absid %d, SuperModule %d",
1006 particle->Eta(), particle->Phi()*TMath::RadToDeg(),absId,
fEMCALGeo->GetSuperModuleNumber(absId)));
1008 return fEMCALGeo->GetSuperModuleNumber(absId) ;
1010 else if ( particle->GetDetectorTag() ==
kPHOS )
1014 if(strcmp(inputEvent->ClassName(),
"AliMCEvent") == 0 )
1017 Double_t z = 0., x=0.;
1018 TParticle* primary = 0x0;
1019 AliStack * stack = ((AliMCEvent*)inputEvent)->Stack();
1023 primary = stack->Particle(particle->GetCaloLabel(0));
1027 AliFatal(
"Stack not available, stop!");
1032 fPHOSGeo->ImpactOnEmc(primary,mod,z,x) ;
1036 AliFatal(
"Primary not available, stop!");
1061 AliDebug(1,
"AliCalorimeterUtils::GetModuleNumber() - NUL Cluster, please check!!!");
1066 if ( cluster->GetNCells() <= 0 )
return -1;
1068 Int_t absId = cluster->GetCellAbsId(0);
1070 if ( absId < 0 )
return -1;
1072 if( cluster->IsEMCAL() )
1074 AliDebug(2,Form(
"EMCAL absid %d, SuperModule %d",absId,
fEMCALGeo->GetSuperModuleNumber(absId)));
1076 return fEMCALGeo->GetSuperModuleNumber(absId) ;
1078 else if ( cluster->IsPHOS() )
1081 fPHOSGeo->AbsToRelNumbering(absId,relId);
1083 if (relId[1] != 0 )
return -1;
1085 AliDebug(2,Form(
"PHOS absid %d Module %d",absId, relId[0]-1));
1097 Int_t & icol, Int_t & irow, Int_t & iRCU)
const
1101 if ( absId < 0 )
return -1 ;
1105 Int_t iTower = -1, iIphi = -1, iIeta = -1;
1106 fEMCALGeo->GetCellIndex(absId,imod,iTower,iIphi,iIeta);
1107 fEMCALGeo->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,irow,icol);
1109 if(imod < 0 || irow < 0 || icol < 0 )
1111 AliFatal(Form(
"Negative value for super module: %d, or cell icol: %d, or cell irow: %d, check EMCAL geometry name",imod,icol,irow));
1118 if ( imod == 13 || imod == 15 || imod == 17 ) ico2 += 16;
1121 if(imod < 10 || (imod > 11 && imod < 18))
1124 if ( 0 <= irow && irow < 8 ) iRCU = 0;
1125 else if ( 8 <= irow && irow < 16 &&
1126 0 <= ico2 && ico2 < 24 ) iRCU = 0;
1130 else if ( 8 <= irow && irow < 16 &&
1131 24 <= ico2 && ico2 < 48 ) iRCU = 1;
1133 else if ( 16 <= irow && irow < 24 ) iRCU = 1;
1135 if ( imod%2 == 1 ) iRCU = 1 - iRCU;
1144 AliFatal(Form(
"Wrong EMCAL RCU number = %d", iRCU));
1151 fPHOSGeo->AbsToRelNumbering(absId,relId);
1153 if (relId[1] != 0 )
return -1;
1158 iRCU= (Int_t)(relId[2]-1)/16 ;
1163 AliFatal(Form(
"Wrong PHOS RCU number = %d", iRCU));
1176 Int_t & icol , Int_t & irow , Int_t & iRCU,
1177 Int_t & icolAbs, Int_t & irowAbs)
const
1189 irowAbs = irow + 64 * imod;
1200 Int_t shiftEta = 48;
1203 if ( imod > 11 && imod < 18) shiftEta+=48/3;
1205 icolAbs = (imod % 2) ? icol + shiftEta : icol;
1209 irowAbs = irow + 24 * Int_t(imod / 2);
1212 if ( imod > 11 && imod < 20) irowAbs -= (2*24 / 3);
1224 const Int_t nc = cluster->GetNCells();
1226 Int_t absIdList[nc];
1227 Float_t maxEList[nc];
1238 Int_t *absIdList, Float_t *maxEList)
1244 const Int_t nCells = cluster->GetNCells();
1248 Float_t simuTotWeight = 0;
1252 simuTotWeight/= eCluster;
1256 if(!cluster->IsEMCAL()) calorimeter =
kPHOS;
1262 for(iDigit = 0; iDigit < nCells ; iDigit++)
1264 absIdList[iDigit] = cluster->GetCellsAbsId()[iDigit] ;
1265 Float_t en = cells->GetCellAmplitude(absIdList[iDigit]);
1274 idmax = absIdList[iDigit] ;
1281 for(iDigit = 0 ; iDigit < nCells; iDigit++)
1283 if( absIdList[iDigit] >= 0 )
1285 absId1 = cluster->GetCellsAbsId()[iDigit];
1287 Float_t en1 = cells->GetCellAmplitude(absId1);
1295 for(iDigitN = 0; iDigitN < nCells; iDigitN++)
1297 absId2 = cluster->GetCellsAbsId()[iDigitN] ;
1299 if(absId2==-1 || absId2==absId1)
continue;
1303 Float_t en2 = cells->GetCellAmplitude(absId2);
1316 absIdList[iDigitN] = -1 ;
1321 absIdList[iDigit] = -1 ;
1326 absIdList[iDigit] = -1 ;
1331 absIdList[iDigitN] = -1 ;
1342 for(iDigit = 0; iDigit < nCells; iDigit++)
1344 if( absIdList[iDigit] >= 0 )
1346 absIdList[iDigitN] = absIdList[iDigit] ;
1348 Float_t en = cells->GetCellAmplitude(absIdList[iDigit]);
1356 maxEList[iDigitN] = en ;
1365 AliDebug(1,Form(
"No local maxima found, assign highest energy cell as maxima, id %d, en cell %2.2f, en cluster %2.2f",
1366 idmax,emax,cluster->E()));
1368 maxEList[0] = emax ;
1369 absIdList[0] = idmax ;
1373 AliDebug(1,Form(
"In cluster E %2.2f (wth non lin. %2.2f), M02 %2.2f, M20 %2.2f, N maxima %d",
1374 cluster->E(),eCluster, cluster->GetM02(),cluster->GetM20(), iDigitN));
1389 if (!AliAnalysisManager::GetAnalysisManager()->GetTree())
1391 AliError(
"AliCalorimeterUtils::GetPass() - Pointer to tree = 0, returning null");
1395 if (!AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile())
1397 AliError(
"AliCalorimeterUtils::GetPass() - Null pointer input file, returning null");
1401 TString pass(AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile()->GetName());
1402 if (pass.Contains(
"ass1"))
return TString(
"pass1");
1403 else if (pass.Contains(
"ass2"))
return TString(
"pass2");
1404 else if (pass.Contains(
"ass3"))
return TString(
"pass3");
1405 else if (pass.Contains(
"ass4"))
return TString(
"pass4");
1406 else if (pass.Contains(
"ass5"))
return TString(
"pass5");
1407 else if (pass.Contains(
"LHC11c") && pass.Contains(
"spc_calo") )
return TString(
"spc_calo");
1408 else if (pass.Contains(
"calo") || pass.Contains(
"high_lumi"))
1410 AliInfo(
"Path contains <calo> or <high-lumi>, set as <pass1>");
1411 return TString(
"pass1");
1415 AliInfo(
"Pass number string not found");
1467 AliDebug(1,
"Init bad channel map");
1470 Bool_t oldStatus = TH1::AddDirectoryStatus();
1471 TH1::AddDirectory(kFALSE);
1474 for (
int i = 0; i < 5; i++)
fPHOSBadChannelMap->Add(
new TH2I(Form(
"PHOS_BadMap_mod%d",i),
1475 Form(
"PHOS_BadMap_mod%d",i),
1476 64, 0, 64, 56, 0, 56));
1482 TH1::AddDirectory(oldStatus);
1490 AliDebug(1,
"Init recalibration map");
1493 Bool_t oldStatus = TH1::AddDirectoryStatus();
1494 TH1::AddDirectory(kFALSE);
1497 for (
int i = 0; i < 5; i++)
1500 Form(
"PHOSRecalFactors_Mod%d",i),
1501 64, 0, 64, 56, 0, 56));
1505 for (Int_t m = 0; m < 5; m++)
1507 for (Int_t i = 0; i < 56; i++)
1509 for (Int_t j = 0; j < 64; j++)
1520 TH1::AddDirectory(oldStatus);
1535 AliInfo(Form(
"Get EMCAL geometry name to <%s> for run %d",
fEMCALGeo->GetName(),
fRunNumber));
1540 AliInfo(Form(
"Set EMCAL geometry name to <%s>",
fEMCALGeoName.Data()));
1559 else if (!gGeoManager) AliInfo(
"Careful!, gGeoManager not loaded, load misalign matrices");
1583 if(!particle || (calo!=
kEMCAL && calo!=
kPHOS))
return kFALSE ;
1588 AliFatal(Form(
"Careful Geo Matrix for calo <%d> is not set, use AliFidutialCut instead",calo));
1595 Double_t x = 0, z = 0 ;
1601 Bool_t ok =
GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(particle->Eta(),particle->Phi(),absID);
1604 Int_t icol = -1, irow = -1, iRCU = -1;
1607 if(status > 0) ok = kFALSE;
1621 if(!particle || (calo!=
kEMCAL && calo!=
kPHOS))
return kFALSE ;
1626 AliFatal(Form(
"Careful Geo Matrix for calo <%d> is not set, use AliFidutialCut instead",calo));
1630 Float_t phi = particle->Phi();
1631 if(phi < 0) phi+=TMath::TwoPi();
1636 Double_t x = 0, z = 0 ;
1637 Double_t vtx[]={ particle->Xv(), particle->Yv(), particle->Zv() } ;
1638 return GetPHOSGeometry()->ImpactOnEmc(vtx, particle->Theta(), phi, mod, z, x) ;
1643 Bool_t ok =
GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(particle->Eta(),phi,absID);
1646 Int_t icol = -1, irow = -1, iRCU = -1;
1649 if(status > 0) ok = kFALSE;
1662 Float_t phiOrg, Int_t & absID)
1669 AliFatal(Form(
"Careful Geo Matrix for calo <%d> is not set, use AliFidutialCut instead",calo));
1673 Float_t phi = phiOrg;
1674 if(phi < 0) phi+=TMath::TwoPi();
1679 Double_t x = 0, z = 0 ;
1680 Double_t vtx[]={0,0,0} ;
1688 Int_t icol = -1, irow = -1, iRCU = -1;
1691 if(status > 0) ok = kFALSE;
1707 if ( iSM%2 ) icol+=48;
1728 printf(
"***** Print: %s %s ******\n", GetName(), GetTitle() ) ;
1730 printf(
"Remove Clusters with max cell at less than %d cells from EMCAL border and %d cells from PHOS border\n",
1732 if(
fEMCALRecoUtils->IsEMCALNoBorderAtEta0()) printf(
"Do not remove EMCAL clusters at Eta = 0\n");
1736 printf(
"Matching criteria: dR < %2.2f[cm], dZ < %2.2f[cm]\n",
fCutR,
fCutZ);
1751 Int_t icol = -1; Int_t irow = -1; Int_t iRCU = -1;
1795 AliVCaloCells * cells)
1798 Float_t frac = 0.,
energy = 0.;
1804 UShort_t * index = cluster->GetCellsAbsId() ;
1805 Double_t * fraction = cluster->GetCellsAmplitudeFraction() ;
1807 Int_t ncells = cluster->GetNCells();
1810 if(cluster->IsPHOS()) calo =
kPHOS ;
1813 for(Int_t icell = 0; icell < ncells; icell++)
1815 Int_t absId = index[icell];
1817 frac = fraction[icell];
1818 if(frac < 1e-3) frac = 1;
1820 Float_t amp = cells->GetCellAmplitude(absId);
1823 AliDebug(2,Form(
"Recalibrate cell: calo <%d>, cell fraction %f, cell energy: before cal %f; after cal %f",
1824 calo,frac,cells->GetCellAmplitude(absId),amp));
1829 AliDebug(1,Form(
"Energy before %f, after %f",cluster->E(),
energy));
1834 AliFatal(
"Cells pointer does not exist!");
1845 AliVCaloCells * cells, Float_t energyOrg)
1848 Float_t frac = 0.,
energy = 0.;
1854 UShort_t * index = cluster->GetCellsAbsId() ;
1855 Double_t * fraction = cluster->GetCellsAmplitudeFraction() ;
1857 Int_t ncells = cluster->GetNCells();
1860 if(cluster->IsPHOS()) calo =
kPHOS ;
1863 for(Int_t icell = 0; icell < ncells; icell++)
1865 Int_t absId = index[icell];
1867 frac = fraction[icell];
1868 if(frac < 1e-3) frac = 1;
1870 Float_t amp = cells->GetCellAmplitude(absId);
1875 AliDebug(2,Form(
"Recalibrate cell: calo <%d>, cell fraction %f, cell energy %f",
1876 calo,frac,cells->GetCellAmplitude(absId)));
1881 AliDebug(1,Form(
"Energy before %f, after %f",cluster->E(),
energy));
1885 AliFatal(
"Cells pointer does not exist!");
1908 TObjArray* clusterArray)
1917 Int_t nClusters =
event->GetNumberOfCaloClusters();
1918 if(clusterArray) nClusters = clusterArray->GetEntriesFast();
1920 AliVCluster * clus = 0;
1922 for (Int_t iclus = 0; iclus < nClusters ; iclus++)
1924 if ( clusterArray ) clus = (AliVCluster*) clusterArray->At(iclus) ;
1925 else clus =
event->GetCaloCluster(iclus) ;
1927 if (!clus->IsEMCAL())
continue ;
1934 if ( TMath::Abs(clus->GetTrackDx()) < 500 )
1935 AliDebug(2,Form(
"Residuals (Old, New): z (%2.4f,%2.4f), x (%2.4f,%2.4f)\n",
1936 clus->GetTrackDz(),dZ,clus->GetTrackDx(),dR));
1938 clus->SetTrackDistance(dR,dZ);
1943 if(clus->GetNTracksMatched() > 0)
1945 if(!strcmp(
"AliESDCaloCluster",Form(
"%s",clus->ClassName())))
1947 TArrayI arrayTrackMatched(0);
1948 ((AliESDCaloCluster*)clus)->AddTracksMatched(arrayTrackMatched);
1952 for(Int_t iTrack = 0; iTrack < clus->GetNTracksMatched(); iTrack++)
1954 ((AliAODCaloCluster*)clus)->RemoveTrackMatched((TObject*)((AliAODCaloCluster*)clus)->GetTrackMatched(iTrack));
1963 if ( trackIndex >= 0 )
1965 if(!strcmp(
"AliESDCaloCluster",Form(
"%s",clus->ClassName())))
1967 TArrayI arrayTrackMatched(1);
1968 arrayTrackMatched[0] = trackIndex;
1969 ((AliESDCaloCluster*)clus)->AddTracksMatched(arrayTrackMatched);
1973 ((AliAODCaloCluster*)clus)->AddTrackMatched((TObject*)event->GetTrack(trackIndex));
1995 AliVCluster* cluster,
1996 AliVCaloCells* cells,
1998 AliAODCaloCluster* cluster1,
1999 AliAODCaloCluster* cluster2,
2000 Int_t nMax, Int_t eventNumber)
2002 TH2F* hClusterMap = 0 ;
2003 TH2F* hClusterLocMax = 0 ;
2004 TH2F* hCluster1 = 0 ;
2005 TH2F* hCluster2 = 0 ;
2009 hClusterMap =
new TH2F(
"hClusterMap",
"Cluster Map",48,0,48,24,0,24);
2010 hClusterLocMax =
new TH2F(
"hClusterLocMax",
"Cluster 2 highest local maxima",48,0,48,24,0,24);
2011 hCluster1 =
new TH2F(
"hCluster1",
"Cluster 1",48,0,48,24,0,24);
2012 hCluster2 =
new TH2F(
"hCluster2",
"Cluster 2",48,0,48,24,0,24);
2013 hClusterMap ->SetXTitle(
"column");
2014 hClusterMap ->SetYTitle(
"row");
2015 hClusterLocMax ->SetXTitle(
"column");
2016 hClusterLocMax ->SetYTitle(
"row");
2017 hCluster1 ->SetXTitle(
"column");
2018 hCluster1 ->SetYTitle(
"row");
2019 hCluster2 ->SetXTitle(
"column");
2020 hCluster2 ->SetYTitle(
"row");
2024 if(cluster->IsPHOS())
2027 AliWarning(
"Not supported for PHOS yet");
2031 const Int_t ncells = cluster->GetNCells();
2032 Int_t absIdList[ncells];
2034 Float_t e1 = 0, e2 = 0 ;
2035 Int_t icol = -1, irow = -1, iRCU = -1, sm = -1;
2036 Float_t eCluster = 0;
2037 Float_t minCol = 100, minRow = 100, maxCol = -1, maxRow = -1;
2038 for(Int_t iDigit = 0; iDigit < ncells; iDigit++ )
2040 absIdList[iDigit] = cluster->GetCellsAbsId()[iDigit];
2042 Float_t ec = cells->GetCellAmplitude(absIdList[iDigit]);
2050 if(sm > -1 && sm < 12)
2052 if(icol > maxCol) maxCol = icol;
2053 if(icol < minCol) minCol = icol;
2054 if(irow > maxRow) maxRow = irow;
2055 if(irow < minRow) minRow = irow;
2056 hClusterMap->Fill(icol,irow,ec);
2063 UShort_t absIdList1[9] ;
2064 Double_t fracList1 [9] ;
2065 absIdList1[0] = absId1 ;
2066 fracList1 [0] = 1. ;
2068 Float_t ecell1 = cells->GetCellAmplitude(absId1);
2073 UShort_t absIdList2[9] ;
2074 Double_t fracList2 [9] ;
2075 absIdList2[0] = absId2 ;
2076 fracList2 [0] = 1. ;
2078 Float_t ecell2 = cells->GetCellAmplitude(absId2);
2084 Int_t icol1 = -1, irow1 = -1, icol2 = -1, irow2 = -1;
2086 hClusterLocMax->Fill(icol1,irow1,ecell1);
2088 hClusterLocMax->Fill(icol2,irow2,ecell2);
2092 Float_t eRemain = (eCluster-ecell1-ecell2)/2;
2093 Float_t shareFraction1 = ecell1/eCluster+eRemain/eCluster;
2094 Float_t shareFraction2 = ecell2/eCluster+eRemain/eCluster;
2096 for(Int_t iDigit = 0; iDigit < ncells; iDigit++)
2098 Int_t absId = absIdList[iDigit];
2100 if ( absId==absId1 || absId==absId2 || absId < 0 )
continue;
2102 Float_t ecell = cells->GetCellAmplitude(absId);
2107 absIdList1[ncells1]= absId;
2111 fracList1[ncells1] = shareFraction1;
2112 e1 += ecell*shareFraction1;
2116 fracList1[ncells1] = 1.;
2126 absIdList2[ncells2]= absId;
2130 fracList2[ncells2] = shareFraction2;
2131 e2 += ecell*shareFraction2;
2135 fracList2[ncells2] = 1.;
2144 AliDebug(1,Form(
"N Local Max %d, Cluster energy = %f, Ecell1 = %f, Ecell2 = %f, Enew1 = %f, Enew2 = %f, Remain %f, \n ncells %d, ncells1 %d, ncells2 %d, f1 %f, f2 %f, sum f12 = %f",
2145 nMax, eCluster,ecell1,ecell2,e1,e2,eCluster-e1-e2,ncells,ncells1,ncells2,shareFraction1,shareFraction2,shareFraction1+shareFraction2));
2150 cluster1->SetNCells(ncells1);
2151 cluster2->SetNCells(ncells2);
2153 cluster1->SetCellsAbsId(absIdList1);
2154 cluster2->SetCellsAbsId(absIdList2);
2156 cluster1->SetCellsAmplitudeFraction(fracList1);
2157 cluster2->SetCellsAmplitudeFraction(fracList2);
2172 for(Int_t iDigit = 0; iDigit < ncells1; iDigit++ )
2178 Float_t ecell = cells->GetCellAmplitude(absIdList1[iDigit]);
2181 if(
AreNeighbours(calorimeter, absId2,absIdList1[iDigit]) && absId1!=absIdList1[iDigit])
2182 hCluster1->Fill(icol,irow,ecell*shareFraction1);
2184 hCluster1->Fill(icol,irow,ecell);
2190 for(Int_t iDigit = 0; iDigit < ncells2; iDigit++ )
2196 Float_t ecell = cells->GetCellAmplitude(absIdList2[iDigit]);
2199 if(
AreNeighbours(calorimeter, absId1,absIdList2[iDigit]) && absId2!=absIdList2[iDigit])
2200 hCluster2->Fill(icol,irow,ecell*shareFraction2);
2202 hCluster2->Fill(icol,irow,ecell);
2206 gStyle->SetPadRightMargin(0.1);
2207 gStyle->SetPadLeftMargin(0.1);
2208 gStyle->SetOptStat(0);
2209 gStyle->SetOptFit(000000);
2211 if(maxCol-minCol > maxRow-minRow)
2213 maxRow+= maxCol-minCol;
2217 maxCol+= maxRow-minRow;
2220 TCanvas * c=
new TCanvas(
"canvas",
"canvas", 4000, 4000) ;
2226 hClusterMap ->SetAxisRange(minCol, maxCol,
"X");
2227 hClusterMap ->SetAxisRange(minRow, maxRow,
"Y");
2228 hClusterMap ->Draw(
"colz TEXT");
2233 hClusterLocMax ->SetAxisRange(minCol, maxCol,
"X");
2234 hClusterLocMax ->SetAxisRange(minRow, maxRow,
"Y");
2235 hClusterLocMax ->Draw(
"colz TEXT");
2240 hCluster1 ->SetAxisRange(minCol, maxCol,
"X");
2241 hCluster1 ->SetAxisRange(minRow, maxRow,
"Y");
2242 hCluster1 ->Draw(
"colz TEXT");
2247 hCluster2 ->SetAxisRange(minCol, maxCol,
"X");
2248 hCluster2 ->SetAxisRange(minRow, maxRow,
"Y");
2249 hCluster2 ->Draw(
"colz TEXT");
2251 if(eCluster > 6 )c->Print(Form(
"clusterFigures/Event%d_E%1.0f_nMax%d_NCell1_%d_NCell2_%d.eps",
2252 eventNumber,cluster->E(),nMax,ncells1,ncells2));
2256 delete hClusterLocMax;
Bool_t fRecalculatePosition
Recalculate cluster position.
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
AliEMCALGeometry * fEMCALGeo
! EMCAL geometry pointer.
void InitPHOSRecalibrationFactors()
Init PHOS recalibration factors.
Bool_t IsRecalculationOfClusterTrackMatchingOn() const
TGeoHMatrix * fEMCALMatrix[22]
Geometry matrices with alignments.
Int_t GetPHOSChannelStatus(Int_t imod, Int_t iCol, Int_t iRow) const
Float_t fLocMaxCutEDiff
Local maxima cut, when aggregating cells, next can be a bit higher.
TGeoHMatrix * fPHOSMatrix[5]
Geometry matrices with alignments.
Bool_t ClusterContainsBadChannel(Int_t calo, UShort_t *cellList, Int_t nCells)
AliPHOSGeoUtils * fPHOSGeo
! PHOS geometry pointer.
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void SetEMCALL1PhaseInTimeRecalibrationForAllSM(TObjArray *map)
void SwitchOnDistToBadChannelRecalculation()
AliPHOSGeoUtils * GetPHOSGeometry() const
Bool_t fOADBForEMCAL
Get calibration from OADB for EMCAL.
Float_t GetPHOSChannelRecalibrationFactor(Int_t imod, Int_t iCol, Int_t iRow) const
void RecalculateClusterTrackMatching(AliVEvent *event, TObjArray *clusterArray=0x0)
Float_t fLocMaxCutE
Local maxima cut must have more than this energy.
Float_t GetMCECellClusFracCorrection(Float_t eCell, Float_t eCluster) const
void SetEMCALChannelStatusMap(Int_t iSM, TH2I *h)
Bool_t fRunDependentCorrection
Switch on or off the recalibration dependent on T.
TObjArray * fPHOSRecalibrationFactors
Array of histograms with map of recalibration factors, PHOS.
TString fEMCALGeoName
Name of geometry to use for EMCAL.
TH2F * GetEMCALChannelRecalibrationFactors(Int_t iSM) const
Bool_t fRecalibration
Switch on or off the recalibration.
Float_t GetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow) const
TH1F * GetEMCALChannelTimeRecalibrationFactors(Int_t bc) const
const TString calorimeter
Int_t fDebug
Debugging level.
TH1C * GetEMCALL1PhaseInTimeRecalibrationForAllSM() const
Bool_t IsRecalibrationOn() const
Bool_t IsMCParticleInCalorimeterAcceptance(Int_t calo, TParticle *particle)
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Int_t GetModuleNumber(AliAODPWG4Particle *particle, AliVEvent *inputEvent) const
Get the EMCAL/PHOS module number that corresponds to this particle.
Bool_t fLoadEMCALMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
AliEMCALGeometry * GetEMCALGeometry() const
Bool_t IsL1PhaseInTimeRecalibrationOn() const
Bool_t fRecalculateMatching
Recalculate cluster position.
Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const
Bool_t fOADBForPHOS
Get calibration from OADB for PHOS.
Int_t * fMaskCellColumns
List of masked cells collumn index.
Bool_t fRemoveBadChannels
Check the channel status provided and remove clusters with bad channels.
void InitPHOSBadChannelStatusMap()
Init PHOS bad channels map.
virtual ~AliCalorimeterUtils()
AliCalorimeterUtils()
Constructor. Initialize parameters.
virtual void InitParameters()
Initialize the parameters of the analysis.
Int_t fNMaskCellColumns
Number of masked columns.
Bool_t IsClusterSharedByTwoSuperModules(const AliEMCALGeometry *geom, AliVCluster *cluster)
Int_t GetNumberOfLocalMaxima(AliVCluster *cluster, AliVCaloCells *cells)
Find the number of local maxima in cluster.
Float_t fMCECellClusFracCorrParam[4]
Parameters for the function correcting the weight of the cells in the cluster.
Bool_t fEMCALGeoMatrixSet
Check if the transformation matrix is set for EMCAL.
TH2I * GetPHOSChannelStatusMap(Int_t imod) const
void SetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c=1)
TString GetPass()
Get passx from filename.
void RecalculateClusterPosition(AliVCaloCells *cells, AliVCluster *clu)
Bool_t fImportGeometryFromFile
Import geometry settings in geometry.root file.
Bool_t fCorrectELinearity
Correct cluster energy linearity.
Bool_t fPHOSGeoMatrixSet
Check if the transformation matrix is set for PHOS.
TString fOADBFilePathPHOS
Default path $ALICE_PHYSICS/OADB/PHOS, if needed change.
void CorrectClusterEnergy(AliVCluster *cl)
Correct cluster energy non linearity.
Float_t fCutZ
dZ cut on matching (EMCAL/PHOS).
Bool_t fLoadPHOSMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
void SetPHOSChannelStatusMap(Int_t imod, TH2I *h)
Int_t fNCellsFromPHOSBorder
Number of cells from PHOS border the cell with maximum amplitude has to be.
AliVTrack * GetMatchedTrack(AliVCluster *cluster, AliVEvent *event, Int_t index=-1) const
void RecalibrateCellTimeL1Phase(Double_t &time, Int_t calo, Int_t iSM, Int_t bunchCrossNumber) const
Recalculate time L1 phase shift if time recalibration available for EMCAL.
Bool_t fMCECellClusFracCorrOn
Correct or not the weight of cells in cluster.
Int_t fNSuperModulesUsed
Number of supermodules to be used in analysis, can be different than the real geo, to be used at initialization of histograms.
TString fImportGeometryFilePath
Path fo geometry.root file.
Bool_t fPlotCluster
Plot cluster in splitting method.
Int_t fRunNumber
Run number of the data, take it from data itself unless set by user.
void RecalibrateCellAmplitude(Float_t &, Int_t calo, Int_t absId) const
Recalculate cell energy if recalibration factor.
void SetEMCALChannelTimeRecalibrationFactors(TObjArray *map)
Bool_t IsPHOSGeoMatrixSet() const
Bool_t IsTimeRecalibrationOn() const
Bool_t fOADBSet
AODB parameters already set.
TObjArray * fPHOSBadChannelMap
Array of histograms with map of bad channels, PHOS.
TString fPHOSGeoName
Name of geometry to use for PHOS.
Bool_t AreNeighbours(Int_t calo, Int_t absId1, Int_t absId2) const
Int_t GetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow) const
Bool_t IsEMCALGeoMatrixSet() const
Class with utils specific to calorimeter clusters/cells.
void AccessGeometry(AliVEvent *inputEvent)
AliEMCALRecoUtils * fEMCALRecoUtils
EMCAL utils for cluster rereconstruction.
void SetEMCALChannelRecalibrationFactors(Int_t iSM, TH2F *h)
void AccessOADB(AliVEvent *event)
TString fOADBFilePathEMCAL
Default path $ALICE_PHYSICS/OADB/EMCAL, if needed change.
void RecalibrateCellTime(Double_t &time, Int_t calo, Int_t absId, Int_t bunchCrossNumber) const
Recalculate time if time recalibration available for EMCAL not ready for PHOS.
Int_t GetMaxEnergyCell(AliVCaloCells *cells, AliVCluster *clu, Float_t &fraction) const
For a given CaloCluster, it gets the absId of the cell with maximum energy deposit.
Float_t fCutR
dR cut on matching (PHOS).
Float_t RecalibrateClusterEnergyWeightCell(AliVCluster *cluster, AliVCaloCells *cells, Float_t energyOrg)
void SplitEnergy(Int_t absId1, Int_t absId2, AliVCluster *cluster, AliVCaloCells *cells, AliAODCaloCluster *cluster1, AliAODCaloCluster *cluster2, Int_t nMax, Int_t eventNumber=0)
Int_t GetModuleNumberCellIndexes(Int_t absId, Int_t calo, Int_t &icol, Int_t &irow, Int_t &iRCU) const
Get the EMCAL/PHOS module, columns, row and RCU/DDL number that corresponds to this absId...
TH2I * GetEMCALChannelStatusMap(Int_t iSM) const
void SetPHOSChannelRecalibrationFactor(Int_t imod, Int_t iCol, Int_t iRow, Double_t c=1)
Float_t RecalibrateClusterEnergy(AliVCluster *cluster, AliVCaloCells *cells)
Recalibrate the cluster energy, considering the recalibration map and the energy of the cells that co...
void GetEMCALSubregion(AliVCluster *clus, AliVCaloCells *cells, Int_t ®Eta, Int_t ®Phi) const
Bool_t CheckCellFiducialRegion(AliVCluster *cluster, AliVCaloCells *cells) const
Int_t GetModuleNumberCellIndexesAbsCaloMap(Int_t absId, Int_t calo, Int_t &icol, Int_t &irow, Int_t &iRCU, Int_t &icolAbs, Int_t &irowAbs) const