18 #include <TRefArray.h>
19 #include <TClonesArray.h>
21 #include <TGeoManager.h>
23 #include <TInterpreter.h>
27 #include "AliAnalysisTask.h"
28 #include "AliAnalysisManager.h"
29 #include "AliESDEvent.h"
30 #include "AliGeomManager.h"
31 #include "AliVCaloCells.h"
32 #include "AliAODCaloCluster.h"
33 #include "AliCDBManager.h"
34 #include "AliCDBStorage.h"
35 #include "AliCDBEntry.h"
37 #include "AliVEventHandler.h"
38 #include "AliAODInputHandler.h"
39 #include "AliOADBContainer.h"
40 #include "AliAODMCParticle.h"
41 #include "AliCentrality.h"
42 #include "AliMultSelection.h"
45 #include "AliEMCALAfterBurnerUF.h"
46 #include "AliEMCALGeometry.h"
47 #include "AliEMCALClusterizerNxN.h"
48 #include "AliEMCALClusterizerv1.h"
49 #include "AliEMCALClusterizerv2.h"
50 #include "AliEMCALRecPoint.h"
51 #include "AliEMCALDigit.h"
65 , fGeom(0), fGeomName(
"")
66 , fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
67 , fOCDBpath(
""), fAccessOCDB(kFALSE)
68 , fDigitsArr(0), fClusterArr(0)
69 , fCaloClusterArr(0), fCaloCells(0)
70 , fRecParam(0), fClusterizer(0)
71 , fUnfolder(0), fJustUnfold(kFALSE)
72 , fOutputAODBranch(0), fOutputAODBranchName(
""), fOutputAODBranchSet(0)
73 , fFillAODFile(kFALSE), fFillAODHeader(0)
74 , fFillAODCaloCells(0), fRun(-1)
75 , fRecoUtils(0), fConfigName(
"")
77 , fCellLabels(), fCellSecondLabels(), fCellTime()
78 , fCellMatchdEta(), fCellMatchdPhi()
79 , fRecalibrateWithClusterTime(0)
80 , fMaxEvent(0), fDoTrackMatching(kFALSE), fUpdateCell(0)
81 , fSelectCell(kFALSE), fSelectCellMinE(0), fSelectCellMinFrac(0)
82 , fRejectBelowThreshold(kFALSE)
83 , fRemoveLEDEvents(kTRUE),fRemoveExoticEvents(kFALSE)
84 , fImportGeometryFromFile(kTRUE), fImportGeometryFilePath(
"")
85 , fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath(
"")
86 , fConstantTimeShift(0)
87 , fCentralityClass(
""), fUseAliCentrality(0), fSelectEMCALEvent(0)
88 , fEMCALEnergyCut(0.), fEMCALNcellsCut (0)
89 , fSetCellMCLabelFromCluster(0)
90 , fSetCellMCLabelFromEdepFrac(0)
91 , fRemapMCLabelForAODs(0)
93 , fTCardCorrEmulation(0), fTCardCorrClusEnerConserv(0)
96 for(
Int_t i = 0; i < 22; i++)
116 , fGeom(0), fGeomName(
"")
117 , fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
118 , fOCDBpath(
""), fAccessOCDB(kFALSE)
119 , fDigitsArr(0), fClusterArr(0)
120 , fCaloClusterArr(0), fCaloCells(0)
121 , fRecParam(0), fClusterizer(0)
122 , fUnfolder(0), fJustUnfold(kFALSE)
123 , fOutputAODBranch(0), fOutputAODBranchName(
""), fOutputAODBranchSet(0)
124 , fFillAODFile(kFALSE), fFillAODHeader(0)
125 , fFillAODCaloCells(0), fRun(-1)
126 , fRecoUtils(0), fConfigName(
"")
127 , fOrgClusterCellId()
128 , fCellLabels(), fCellSecondLabels(), fCellTime()
129 , fCellMatchdEta(), fCellMatchdPhi()
130 , fRecalibrateWithClusterTime(0)
131 , fMaxEvent(0), fDoTrackMatching(kFALSE), fUpdateCell(0)
132 , fSelectCell(kFALSE), fSelectCellMinE(0), fSelectCellMinFrac(0)
133 , fRejectBelowThreshold(kFALSE)
134 , fRemoveLEDEvents(kTRUE), fRemoveExoticEvents(kFALSE)
135 , fImportGeometryFromFile(kTRUE), fImportGeometryFilePath(
"")
136 , fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath(
"")
137 , fConstantTimeShift(0)
138 , fCentralityClass(
""), fUseAliCentrality(0), fSelectEMCALEvent(0)
139 , fEMCALEnergyCut(0.), fEMCALNcellsCut (0)
140 , fSetCellMCLabelFromCluster(0)
141 , fSetCellMCLabelFromEdepFrac(0)
142 , fRemapMCLabelForAODs(0)
143 , fInputFromFilter(0)
144 , fTCardCorrEmulation(0), fTCardCorrClusEnerConserv(0)
147 for(
Int_t i = 0; i < 22; i++)
200 Int_t nCluster =
fEvent -> GetNumberOfCaloClusters();
203 for(
Int_t icalo = 0; icalo < nCluster; icalo++)
205 AliVCluster *clus = (AliVCluster*) (
fEvent->GetCaloCluster(icalo));
211 AliDebug(1, Form(
"Accept : E %2.2f > %2.2f, nCells %d > %d",
219 AliDebug(1,
"Reject");
233 Int_t runnumber = InputEvent()->GetRunNumber() ;
236 AliInfo(Form(
"Get AODB parameters from EMCAL in %s for run %d, and <%s>",
fOADBFilePath.Data(),runnumber,pass.Data()));
241 if(
fRecoUtils->IsBadChannelsRemovalSwitchedOn())
243 AliOADBContainer *contBC=
new AliOADBContainer(
"");
244 contBC->InitFromFile(Form(
"%s/EMCALBadChannels.root",
fOADBFilePath.Data()),
"AliEMCALBadChannels");
250 fRecoUtils->SwitchOnDistToBadChannelRecalculation();
251 AliInfo(
"Remove EMCAL bad cells");
253 for (
Int_t i=0; i < nSM; ++i)
255 TH2I *hbm =
fRecoUtils->GetEMCALChannelStatusMap(i);
260 hbm=(TH2I*)arrayBC->FindObject(Form(
"EMCALBadChannelMap_Mod%d",i));
264 AliError(Form(
"Can not get EMCALBadChannelMap_Mod%d",i));
268 hbm->SetDirectory(0);
272 }
else AliInfo(
"Do NOT remove EMCAL bad channels");
280 AliOADBContainer *contRF=
new AliOADBContainer(
"");
282 contRF->InitFromFile(Form(
"%s/EMCALRecalib.root",
fOADBFilePath.Data()),
"AliEMCALRecalib");
296 AliInfo(
"Recalibrate EMCAL");
297 for (
Int_t i=0; i<nSM; ++i)
304 h = (
TH2F*)recalib->FindObject(Form(
"EMCALRecalFactors_SM%d",i));
308 AliError(Form(
"Could not load EMCALRecalFactors_SM%d",i));
314 fRecoUtils->SetEMCALChannelRecalibrationFactors(i,h);
316 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params object array");
317 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params for pass");
318 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params for run");
326 AliOADBContainer *contRFTD=
new AliOADBContainer(
"");
328 contRFTD->InitFromFile(Form(
"%s/EMCALTemperatureCorrCalib.root",
fOADBFilePath.Data()),
"AliEMCALRunDepTempCalibCorrections");
330 TH1S *htd=(TH1S*)contRFTD->GetObject(runnumber);
335 AliWarning(Form(
"No TemperatureCorrCalib Objects for run: %d",runnumber));
339 Int_t maxEntry = contRFTD->GetNumberOfEntries();
341 while ( (ic < maxEntry) && (contRFTD->UpperLimit(ic) < runnumber) ) {
346 Int_t closest = lower;
347 if ( (ic<maxEntry) &&
348 (contRFTD->LowerLimit(ic)-runnumber) < (runnumber - contRFTD->UpperLimit(lower)) ) {
352 AliWarning(Form(
"TemperatureCorrCalib Objects found closest id %d from run: %d", closest, contRFTD->LowerLimit(closest)));
353 htd = (TH1S*) contRFTD->GetObjectByIndex(closest);
358 AliInfo(
"Recalibrate (Temperature) EMCAL");
360 for (
Int_t ism=0; ism<nSM; ++ism)
362 for (
Int_t icol=0; icol<48; ++icol)
364 for (
Int_t irow=0; irow<24; ++irow)
368 Int_t absID =
fGeom->GetAbsCellIdFromCellIndexes(ism, irow, icol);
369 factor *= htd->GetBinContent(absID) / 10000. ;
372 fRecoUtils->SetEMCALChannelRecalibrationFactor(ism,icol,irow,factor);
376 }
else AliInfo(
"Do NOT recalibrate EMCAL with T variations, no params TH1");
384 AliOADBContainer *contTRF=
new AliOADBContainer(
"");
386 contTRF->InitFromFile(Form(
"%s/EMCALTimeCalib.root",
fOADBFilePath.Data()),
"AliEMCALTimeCalib");
394 if ( pass==
"spc_calo" ) passM =
"pass3";
395 if ( runnumber > 209121 ) passM =
"pass1";
396 if ( pass ==
"muon_calo_pass1" && runnumber > 209121 && runnumber < 244284 )
403 AliInfo(
"Time Recalibrate EMCAL");
404 for (
Int_t ibc = 0; ibc < 4; ++ibc)
406 TH1F *h =
fRecoUtils->GetEMCALChannelTimeRecalibrationFactors(ibc);
411 h = (TH1F*)trecalpass->FindObject(Form(
"hAllTimeAvBC%d",ibc));
415 AliError(Form(
"Could not load hAllTimeAvBC%d",ibc));
421 fRecoUtils->SetEMCALChannelTimeRecalibrationFactors(ibc,h);
423 }
else AliInfo(
"Do NOT recalibrate time EMCAL, no params for pass");
424 }
else AliInfo(
"Do NOT recalibrate time EMCAL, no params for run");
430 if(
fRecoUtils->IsL1PhaseInTimeRecalibrationOn() )
433 if (!
fRecoUtils->GetEMCALL1PhaseInTimeRecalibrationArray())
434 fRecoUtils->InitEMCALL1PhaseInTimeRecalibration() ;
436 AliOADBContainer *contBC =
new AliOADBContainer(
"");
438 TFile *timeFile=
new TFile(Form(
"%s/EMCALTimeL1PhaseCalib.root",
fOADBFilePath.Data()),
"read");
439 if (!timeFile || timeFile->IsZombie())
441 AliFatal(Form(
"EMCALTimeL1PhaseCalib.root was not found in the path provided: %s",
fOADBFilePath.Data()));
445 if (timeFile)
delete timeFile;
447 contBC->InitFromFile(Form(
"%s/EMCALTimeL1PhaseCalib.root",
fOADBFilePath.Data()),
"AliEMCALTimeL1PhaseCalib");
452 AliError(Form(
"No external L1 phase in time calibration set for run number: %d", runnumber));
453 fRecoUtils->SwitchOffL1PhaseInTimeRecalibration();
460 if ( pass==
"muon_calo_pass1" && runnumber > 209121 && runnumber < 244284 )
466 AliError(Form(
"No external L1 phase in time calibration set for: %d -%s", runnumber,pass2.Data()));
467 fRecoUtils->SwitchOffL1PhaseInTimeRecalibration();
469 else AliInfo(
"Recalibrate L1 Phase time");
473 if ( DebugLevel()>0 ) arrayBCpass->Print();
475 TH1C *h =
fRecoUtils->GetEMCALL1PhaseInTimeRecalibrationForAllSM();
478 h = (TH1C*)arrayBCpass->FindObject(Form(
"h%d",runnumber));
482 AliFatal(Form(
"There is no calibration histogram h%d for this run",runnumber));
487 fRecoUtils->SetEMCALL1PhaseInTimeRecalibrationForAllSM(h);
507 Warning(
"AccessOCDB",
"Event not available!!!");
517 AliCDBManager *cdb = AliCDBManager::Instance();
522 cdb->SetDefaultStorage(
fOCDBpath.Data());
523 AliInfo(Form(
"Default storage %s",
fOCDBpath.Data()));
526 cdb->SetRun(
fEvent->GetRunNumber());
532 cdb->SetSpecificStorage(
"EMCAL/Calib/Data",
"raw://");
533 cdb->SetSpecificStorage(
"EMCAL/Calib/Time",
"raw://");
534 cdb->SetSpecificStorage(
"EMCAL/Calib/Pedestals",
"raw://");
537 TString path = cdb->GetDefaultStorage()->GetBaseFolder();
572 new((*fDigitsArr)[idigit]) AliEMCALDigit( -2, -2, j,
fTCardCorrCellsEner[j], fixTime,AliEMCALDigit::kHG,idigit, 0, 0, 0);
591 AliAODInputHandler* aodIH =
dynamic_cast<AliAODInputHandler*
>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
592 Int_t eventN = Entry();
593 if(aodIH) eventN = aodIH->GetReadEntry();
602 if (aodIH && aodIH->GetMergeEvents())
606 if(!aodIH->GetMergeEMCALCells())
607 AliFatal(
"Events merged but not EMCAL cells, check analysis settings!");
609 AliDebug(1,
"Use embedded events");
611 AliDebug(1,Form(
"\t InputEvent N Clusters %d, N Cells %d",
612 InputEvent()->GetNumberOfCaloClusters(),InputEvent()->GetEMCALCells()->GetNumberOfCells()));
614 AliDebug(1,Form(
"\t MergedEvent N Clusters %d, N Cells %d",
615 aodIH->GetEventToMerge()->GetNumberOfCaloClusters(), aodIH->GetEventToMerge()->GetEMCALCells()->GetNumberOfCells()));
626 AliDebug(1,Form(
"\t OutputEvent N Clusters %d, N Cells %d",
627 AODEvent()->GetNumberOfCaloClusters(), AODEvent()->GetEMCALCells()->GetNumberOfCells()));
643 AliError(
"Event not available");
669 AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kTRUE);
688 Int_t nClusters =
fEvent->GetNumberOfCaloClusters();
689 Int_t nClustersOrg = 0;
691 AliAODInputHandler* aodIH =
dynamic_cast<AliAODInputHandler*
>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
692 if(aodIH && aodIH->GetEventToMerge())
693 nClusters = aodIH->GetEventToMerge()->GetNumberOfCaloClusters();
701 for (
Int_t i = 0; i < nClusters; i++)
703 AliVCluster *clus = 0;
704 if(aodIH && aodIH->GetEventToMerge())
705 clus = aodIH->GetEventToMerge()->GetCaloCluster(i);
707 clus =
fEvent->GetCaloCluster(i);
713 if(!clus->IsEMCAL())
continue;
715 Int_t label = clus->GetLabel();
717 if (clus->GetNLabels() >=2 ) label2 = clus->GetLabelAt(1) ;
727 UShort_t * index = clus->GetCellsAbsId() ;
728 for(
Int_t icell=0; icell < clus->GetNCells(); icell++ )
731 fCellTime[index[icell]] = clus->GetTOF();
755 Int_t bc = InputEvent()->GetBunchCrossNumber();
765 if( amp < fRecParam->GetMinECut() ||
767 time <
fRecParam->GetTimeMin() ) accept = kFALSE;
784 AliDebug(2,Form(
"Remove channel absId %d, index %d of %d, amp %f, time %f",
785 id,icell,
fCaloCells->GetNumberOfCells(), amp, time*1.e9));
823 if (mcLabel > 0 && efrac < 1.e-6) efrac = 1;
838 AliVCluster *clus = 0;
843 AliInfo(
"Negative original cluster index, skip \n");
847 if(aodIH && aodIH->GetEventToMerge())
848 clus = aodIH->GetEventToMerge()->GetCaloCluster(iclus);
850 clus =
fEvent->GetCaloCluster(iclus);
852 fRecoUtils->RecalculateCellLabelsRemoveAddedGenerator(
id, clus, MCEvent(), amp, labeArr, eDepArr);
853 nLabels = labeArr.GetSize();
868 if(amp <= 0.01) continue ;
872 AliEMCALDigit* digit =
new((*fDigitsArr)[idigit]) AliEMCALDigit( mcLabel, mcLabel,
id, amp, time,AliEMCALDigit::kHG,idigit, 0, 0, eDep);
875 digit->SetListOfParents(nLabels,labeArr.GetArray(),eDepArr.GetArray());
901 AliWarning(Form(
"No array with CaloClusters, input RecPoints entries %d",
fClusterArr->GetEntriesFast()));
905 AliDebug(1,Form(
"N clusters: before recluster %d, after recluster %d, recpoints %d",
925 Int_t cellMCLabel = 0;
927 Int_t nClustersOrg = 0;
930 for (
Int_t i = 0; i <
fEvent->GetNumberOfCaloClusters(); i++)
932 AliVCluster *clus =
fEvent->GetCaloCluster(i);
936 if(
fRecoUtils->ClusterContainsBadChannel(
fGeom,clus->GetCellsAbsId(), clus->GetNCells()))
949 if (
fCaloCells->GetCell(icell, cellNumber, cellAmplitude, cellTime, cellMCLabel, cellEFrac) != kTRUE)
952 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
953 fGeom->GetCellIndex(cellNumber,imod,iTower,iIphi,iIeta);
954 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
957 if(
fRecoUtils->IsBadChannelsRemovalSwitchedOn() &&
958 fRecoUtils->GetEMCALChannelStatus(imod, ieta, iphi))
961 fCaloCells->SetCell(icell, cellNumber, cellAmplitude*
fRecoUtils->GetEMCALChannelRecalibrationFactor(imod,ieta,iphi),cellTime);
967 AliESDCaloCluster * esdCluster =
dynamic_cast<AliESDCaloCluster*
> (clus);
968 AliAODCaloCluster * aodCluster =
dynamic_cast<AliAODCaloCluster*
> (clus);
979 AliWarning(
"Wrong CaloCluster type?");
997 AliVCaloCells &eventEMcells = *(
fEvent->GetEMCALCells());
998 Int_t nEMcell = eventEMcells.GetNumberOfCells() ;
1000 AliAODCaloCells &aodEMcells = *(AODEvent()->GetEMCALCells());
1001 aodEMcells.CreateContainer(nEMcell);
1002 aodEMcells.SetType(AliVCaloCells::kEMCALCell);
1004 for (
Int_t iCell = 0; iCell < nEMcell; iCell++)
1006 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1007 fGeom->GetCellIndex(eventEMcells.GetCellNumber(iCell),imod,iTower,iIphi,iIeta);
1008 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
1012 calibFactor =
fRecoUtils->GetEMCALChannelRecalibrationFactor(imod,ieta,iphi);
1015 if(!
fRecoUtils->GetEMCALChannelStatus(imod, ieta, iphi))
1017 aodEMcells.SetCell(iCell,eventEMcells.GetCellNumber(iCell),eventEMcells.GetAmplitude(iCell)*calibFactor,
1018 eventEMcells.GetTime(iCell),eventEMcells.GetMCLabel(iCell),eventEMcells.GetEFraction(iCell));
1022 aodEMcells.SetCell(iCell,eventEMcells.GetCellNumber(iCell),0,-1,-1,0);
1039 for (
Int_t i = 0; i < 6; i++) covVtx[i] = 0.;
1041 AliAODHeader* header =
dynamic_cast<AliAODHeader*
>(AODEvent()->GetHeader());
1042 if(!header) AliFatal(
"Not a standard AOD");
1043 header->SetRunNumber(
fEvent->GetRunNumber());
1047 TTree* tree = fInputHandler->GetTree();
1050 TFile*
file = tree->GetCurrentFile();
1051 if (file) header->SetESDFileName(file->GetName());
1054 else if (aodevent) {
1055 AliAODHeader * aodheader =
dynamic_cast<AliAODHeader*
>(aodevent->GetHeader());
1056 if(!aodheader) AliFatal(
"Not a standard AOD");
1057 header->SetESDFileName(aodheader->GetESDFileName());
1060 header->SetBunchCrossNumber(
fEvent->GetBunchCrossNumber());
1061 header->SetOrbitNumber(
fEvent->GetOrbitNumber());
1062 header->SetPeriodNumber(
fEvent->GetPeriodNumber());
1063 header->SetEventType(
fEvent->GetEventType());
1068 if(
fEvent->GetCentrality())
1069 header->SetCentrality(
new AliCentrality(*(
fEvent->GetCentrality())));
1071 header->SetCentrality(0);
1075 header->SetOfflineTrigger(fInputHandler->IsEventSelected());
1077 header->SetFiredTriggerClasses(
fEvent->GetFiredTriggerClasses());
1079 header->SetTriggerMask(
fEvent->GetTriggerMask());
1080 header->SetTriggerCluster(
fEvent->GetTriggerCluster());
1084 header->SetL0TriggerInputs(esdevent->GetHeader()->GetL0TriggerInputs());
1085 header->SetL1TriggerInputs(esdevent->GetHeader()->GetL1TriggerInputs());
1086 header->SetL2TriggerInputs(esdevent->GetHeader()->GetL2TriggerInputs());
1090 header->SetL0TriggerInputs(aodevent->GetHeader()->GetL0TriggerInputs());
1091 header->SetL1TriggerInputs(aodevent->GetHeader()->GetL1TriggerInputs());
1092 header->SetL2TriggerInputs(aodevent->GetHeader()->GetL2TriggerInputs());
1095 header->SetMagneticField(
fEvent->GetMagneticField());
1098 header->SetZDCN1Energy(
fEvent->GetZDCN1Energy());
1099 header->SetZDCP1Energy(
fEvent->GetZDCP1Energy());
1100 header->SetZDCN2Energy(
fEvent->GetZDCN2Energy());
1101 header->SetZDCP2Energy(
fEvent->GetZDCP2Energy());
1102 header->SetZDCEMEnergy(
fEvent->GetZDCEMEnergy(0),
fEvent->GetZDCEMEnergy(1));
1106 fEvent->GetDiamondCovXY(diamcov);
1107 header->SetDiamond(diamxy,diamcov);
1108 if (esdevent) header->SetDiamondZ(esdevent->GetDiamondZ(),esdevent->GetSigma2DiamondZ());
1109 else if (aodevent) header->SetDiamondZ(aodevent->GetDiamondZ(),aodevent->GetSigma2DiamondZ());
1112 Int_t nVertices = 1 ;;
1113 Int_t nCaloClus =
fEvent->GetNumberOfCaloClusters();
1115 AODEvent()->ResetStd(0, nVertices, 0, 0, 0, nCaloClus, 0, 0);
1118 TClonesArray &vertices = *(AODEvent()->GetVertices());
1123 fEvent->GetPrimaryVertex()->GetXYZ(pos);
1127 esdevent->GetPrimaryVertex()->GetCovMatrix(covVtx);
1128 chi = esdevent->GetPrimaryVertex()->GetChi2toNDF();
1132 aodevent->GetPrimaryVertex()->GetCovMatrix(covVtx);
1133 chi = aodevent->GetPrimaryVertex()->GetChi2perNDF();
1136 AliAODVertex * primary =
new(vertices[jVertices++])
1137 AliAODVertex(pos, covVtx, chi, NULL, -1, AliAODVertex::kPrimary);
1138 primary->SetName(
fEvent->GetPrimaryVertex()->GetName());
1139 primary->SetTitle(
fEvent->GetPrimaryVertex()->GetTitle());
1159 for(
Int_t i = 0; i < kNumberOfCaloClusters; i++)
1161 AliAODCaloCluster *newCluster = (AliAODCaloCluster *)
fCaloClusterArr->At(i);
1163 newCluster->SetID(i);
1166 newCluster->SetE(
fRecoUtils->CorrectClusterEnergyLinearity(newCluster));
1174 newCluster->AddTrackMatched(
fEvent->GetTrack(trackIndex));
1175 AliDebug(2,Form(
"Matched Track index %d to new cluster %d",trackIndex,i));
1179 fRecoUtils->GetMatchedResiduals(newCluster->GetID(),dZ,dR);
1180 newCluster->SetTrackDistance(dR,dZ);
1184 Int_t absId0 = newCluster->GetCellsAbsId()[0];
1203 new((*fOutputAODBranch)[i]) AliAODCaloCluster(*newCluster);
1205 AliDebug(2,Form(
"New cluster %d of %d, energy %f, mc label %d",
1206 newCluster->GetID(), kNumberOfCaloClusters, newCluster->E(), newCluster->GetLabel()));
1238 if (!AliAnalysisManager::GetAnalysisManager()->GetTree())
1240 AliError(
"AliAnalysisTaskEMCALClusterize::GetPass() - Pointer to tree = 0, returning null");
1244 if (!AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile())
1246 AliError(
"AliAnalysisTaskEMCALClusterize::GetPass() - Null pointer input file, returning null");
1250 TString pass(AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile()->GetName());
1251 if (pass.Contains(
"ass1"))
return TString(
"pass1");
1252 else if (pass.Contains(
"ass2"))
return TString(
"pass2");
1253 else if (pass.Contains(
"ass3"))
return TString(
"pass3");
1254 else if (pass.Contains(
"ass4"))
return TString(
"pass4");
1255 else if (pass.Contains(
"ass5"))
return TString(
"pass5");
1256 else if (pass.Contains(
"LHC11c") && pass.Contains(
"spc_calo") )
return TString(
"spc_calo");
1257 else if (pass.Contains(
"calo") || pass.Contains(
"high_lumi"))
1259 AliInfo(
"Path contains <calo> or <high-lumi>, set as <pass1>");
1262 else if (pass.Contains(
"LHC14a1a"))
1264 AliInfo(
"Enable EMCal energy calibration for this MC production!!");
1272 AliInfo(
"Pass number string not found");
1283 if(fDebug >=0) (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(this->ClassName(),fDebug);
1288 fBranchNames =
"ESD:AliESDHeader.,EMCALCells.";
1306 AliInfo(Form(
"Configure analysis with %s",
fConfigName.Data()));
1345 if (
fRecParam->GetClusterizerFlag() == AliEMCALRecParam::kClusterizerv1)
1347 else if(
fRecParam->GetClusterizerFlag() == AliEMCALRecParam::kClusterizerv2)
1349 else if(
fRecParam->GetClusterizerFlag() == AliEMCALRecParam::kClusterizerNxN)
1357 AliFatal(Form(
"Clusterizer < %d > not available",
fRecParam->GetClusterizerFlag()));
1382 for (i = 0; i < 8; i++)
1387 for (i = 0; i < 3; i++)
1407 Int_t runnumber = InputEvent()->GetRunNumber() ;
1412 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(runnumber);
1413 AliInfo(Form(
"Get EMCAL geometry name <%s> for run %d",
fGeom->GetName(),runnumber));
1418 AliInfo(Form(
"Set EMCAL geometry name to <%s>",
fGeomName.Data()));
1438 AliDebug(1,Form(
"Init for run=%d",runnumber));
1439 if (!gGeoManager) AliDebug(1,
"Careful!, gGeoManager not loaded, load misalign matrices");
1444 AliInfo(
"Load user defined EMCAL geometry matrices");
1447 AliOADBContainer emcGeoMat(
"AliEMCALgeo");
1448 emcGeoMat.InitFromFile(Form(
"%s/EMCALlocal2master.root",
fOADBFilePath.Data()),
"AliEMCALgeo");
1451 for(
Int_t mod=0; mod < (
fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
1456 AliDebug(2,Form(
"EMCAL matrices SM %d, %p",mod,((TGeoHMatrix*) matEMCAL->At(mod))));
1459 fGeomMatrix[mod] = (TGeoHMatrix*) matEMCAL->At(mod) ;
1464 if(DebugLevel() > 1)
1469 else if(gGeoManager)
1471 AliWarning(Form(
"Set matrix for SM %d from gGeoManager",mod));
1472 fGeom->SetMisalMatrix(
fGeom->GetMatrixForSuperModuleFromGeoManager(mod),mod) ;
1476 AliError(Form(
"Alignment atrix for SM %d is not available",mod));
1483 else if(!gGeoManager)
1485 AliInfo(
"AliAnalysisTaksEMCALClusterize::InitGeometry() - Get geo matrices from data");
1487 if(!strcmp(
fEvent->GetName(),
"AliAODEvent"))
1489 AliWarning(
"Use ideal geometry, values geometry matrix not kept in AODs");
1493 AliDebug(1,
"Load Misaligned matrices");
1499 AliError(
"This event does not contain ESDs?");
1500 if(
fFillAODFile) AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kFALSE);
1504 for(
Int_t mod=0; mod < (
fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
1506 if(DebugLevel() > 1)
1507 esd->GetEMCALMatrix(mod)->Print();
1509 if(esd->GetEMCALMatrix(mod))
fGeom->SetMisalMatrix(esd->GetEMCALMatrix(mod),mod) ;
1532 Int_t bc = InputEvent()->GetBunchCrossNumber();
1553 if(totCellE < 1)
return kTRUE;
1566 if(run < 146858 || run > 146860)
return kFALSE ;
1569 Int_t ncellsSM3 = 0;
1572 if (
fCaloCells->GetAmplitude (icell) > 0.1 &&
1573 fCaloCells->GetCellNumber(icell)/(24*48)==3 ) ncellsSM3++;
1578 Int_t ncellcut = 21;
1579 if(triggerclasses.Contains(
"EMC")) ncellcut = 35;
1581 if( ncellsSM3 >= ncellcut)
1583 AliInfo(Form(
"Reject event %d with ncells in SM3 %d",(
Int_t)Entry(),ncellsSM3));
1584 if(
fFillAODFile) AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kFALSE);;
1602 for (
Int_t icell = 0; icell <
fCaloCells->GetNumberOfCells(); icell++)
1609 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1610 fGeom->GetCellIndex(
id,imod,iTower,iIphi,iIeta);
1611 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
1631 if ( iphi < AliEMCALGeoParams::fgkEMCALRows-1 ) absIDr1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1632 if ( iphi > 0 ) absIDr2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1635 if ( TMath::FloorNint(iphi/8) != TMath::FloorNint((iphi+1)/8) ) absIDr1 = -1;
1636 if ( TMath::FloorNint(iphi/8) != TMath::FloorNint((iphi-1)/8) ) absIDr2 = -1;
1640 if ( (ieta%2) && ieta <= AliEMCALGeoParams::fgkEMCALCols-1 ) colShift = -1;
1641 if ( !(ieta%2) && ieta >= 0 ) colShift = +1;
1643 absIDc1 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta+colShift);
1644 absIDc2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta+colShift);
1645 absIDc =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi , ieta+colShift);
1762 AliEMCALRecPoint *recPoint = (AliEMCALRecPoint*)
fClusterArr->At(i);
1764 const Int_t ncells = recPoint->GetMultiplicity();
1765 Int_t ncellsTrue = 0;
1767 if(recPoint->GetEnergy() <
fRecParam->GetClusteringThreshold())
continue;
1771 Double32_t ratios[ncells];
1774 AliAODInputHandler* aodIH =
dynamic_cast<AliAODInputHandler*
>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
1779 AliEMCALDigit *digit = (AliEMCALDigit*)
fDigitsArr->At(recPoint->GetDigitsList()[
c]);
1781 absIds[ncellsTrue] = digit->GetId();
1782 ratios[ncellsTrue] = recPoint->GetEnergiesList()[
c]/digit->GetAmplitude();
1784 if ( !
fRecParam->GetUnfold() && (ratios[ncellsTrue] > 1 || ratios[ncellsTrue] < 1) )
1785 AliWarning(Form(
"recpoint cell E %2.3f but digit E %2.3f and no unfolding", recPoint->GetEnergiesList()[
c], digit->GetAmplitude()));
1793 AliDebug(2,Form(
"Too small energy in cell of cluster: cluster cell %f, digit %f",
1794 recPoint->GetEnergiesList()[
c],digit->GetAmplitude()));
1800 clusterE +=recPoint->GetEnergiesList()[
c];
1803 if (aodIH && aodIH->GetMergeEvents())
1806 AliVCaloCells* meEMCALCells = aodIH->GetEventToMerge()->GetEMCALCells();
1807 AliVCaloCells* ouEMCALCells = AODEvent()->GetEMCALCells();
1809 Float_t sigAmplitude = meEMCALCells->GetCellAmplitude(absIds[ncellsTrue]);
1811 Float_t sumAmplitude = ouEMCALCells->GetCellAmplitude(absIds[ncellsTrue]);
1814 if(sumAmplitude > 0) ratios[ncellsTrue] = sigAmplitude/sumAmplitude;
1825 AliDebug(2,Form(
"Skipping cluster with no cells avobe threshold E = %f, ncells %d",
1826 recPoint->GetEnergy(), ncells));
1832 if(clusterE < fRecParam->GetClusteringThreshold())
1834 AliDebug(2,Form(
"Remove cluster with energy below seed threshold %f",clusterE));
1844 recPoint->GetGlobalPosition(gpos);
1849 (*fCaloClusterArr)[j] =
new AliAODCaloCluster() ;
1850 AliAODCaloCluster *clus =
dynamic_cast<AliAODCaloCluster *
>(
fCaloClusterArr->At(j) ) ;
1852 clus->SetType(AliVCluster::kEMCALClusterv1);
1853 clus->SetE(clusterE);
1854 clus->SetPosition(g);
1855 clus->SetNCells(ncellsTrue);
1856 clus->SetCellsAbsId(absIds);
1857 clus->SetCellsAmplitudeFraction(ratios);
1859 clus->SetTOF(recPoint->GetTime()) ;
1860 clus->SetNExMax(recPoint->GetNExMax());
1861 clus->SetDistanceToBadChannel(recPoint->GetDistanceToBadTower());
1863 if(ncells == ncellsTrue)
1866 recPoint->GetElipsAxis(elipAxis);
1867 clus->SetM02(elipAxis[0]*elipAxis[0]) ;
1868 clus->SetM20(elipAxis[1]*elipAxis[1]) ;
1869 clus->SetDispersion(recPoint->GetDispersion());
1875 AliDebug(2,Form(
"Cells removed from cluster (ncells %d, ncellsTrue %d), recalculate Shower Shape",ncells,ncellsTrue));
1877 AliVCaloCells* cells = 0x0;
1878 if (aodIH && aodIH->GetMergeEvents()) cells = AODEvent() ->GetEMCALCells();
1879 else cells = InputEvent()->GetEMCALCells();
1881 fRecoUtils->RecalculateClusterShowerShapeParameters(
fGeom,cells,clus);
1895 Int_t parentMult = 0;
1896 Int_t *parentList = recPoint->GetParents(parentMult);
1897 Float_t *parentListDE = recPoint->GetParentsDE();
1899 clus->SetLabel(parentList, parentMult);
1901 clus->SetClusterMCEdepFractionFromEdepArray(parentListDE);
1915 for(
Int_t icell = 0; icell < ncellsTrue ; icell++)
1919 const AliEMCALDigit * dig = (
const AliEMCALDigit*)
fDigitsArr->At(idigit);
1924 mcEdepFracPerCell[icell] = 0;
1926 Int_t nparents = dig->GetNiparent();
1929 Int_t digLabel =-1 ;
1932 Float_t mcEDepFrac[4] = {0,0,0,0};
1935 for (
Int_t jndex = 0 ; jndex < nparents ; jndex++ )
1937 digLabel = dig->GetIparent (jndex+1);
1938 edep = dig->GetDEParent(jndex+1);
1941 if ( digLabel == parentList[0] ) mcEDepFrac[0] = edep;
1942 else if ( digLabel == parentList[1] ) mcEDepFrac[1] = edep;
1943 else if ( digLabel == parentList[2] ) mcEDepFrac[2] = edep;
1944 else if ( digLabel == parentList[3] ) mcEDepFrac[3] = edep;
1951 mcEdepFracPerCell[icell] = clus->PackMCEdepFraction(mcEDepFrac);
1956 clus->SetCellsMCEdepFractionMap(mcEdepFracPerCell);
1958 delete [] mcEdepFracPerCell;
1971 if(label < 0) return ;
1976 TClonesArray * arr =
dynamic_cast<TClonesArray*
>(evt->FindListObject(
"mcparticles")) ;
1979 if(label < arr->GetEntriesFast())
1981 AliAODMCParticle * particle =
dynamic_cast<AliAODMCParticle *
>(arr->At(label));
1982 if(!particle) return ;
1984 if(label == particle->Label())
return ;
1990 for(
Int_t ind = 0; ind < arr->GetEntriesFast(); ind++ )
1992 AliAODMCParticle * particle =
dynamic_cast<AliAODMCParticle *
>(arr->At(ind));
1993 if(!particle) continue ;
1995 if(label == particle->Label())
2033 AliAODCaloCluster * clus)
2035 Int_t parentMult = 0;
2036 Int_t *parentList = recPoint->GetParents(parentMult);
2037 clus->SetLabel(parentList, parentMult);
2041 for (
Int_t iLoopCell = 0 ; iLoopCell < clus->GetNCells() ; iLoopCell++ )
2044 Int_t idCell = clus->GetCellAbsId(iLoopCell) ;
2048 for (
UInt_t iLoopLabels = 0 ; iLoopLabels < clus->GetNLabels() ; iLoopLabels++ )
2051 if (
fCellSecondLabels[idCell] == clus->GetLabelAt(iLoopLabels) ) iNewLabel = 0;
2055 Int_t * newLabelArray =
new Int_t[clus->GetNLabels()+1] ;
2056 for (
UInt_t iLoopNewLabels = 0 ; iLoopNewLabels < clus->GetNLabels() ; iLoopNewLabels++ )
2058 newLabelArray[iLoopNewLabels] = clus->GetLabelAt(iLoopNewLabels) ;
2062 clus->SetLabel(newLabelArray,clus->GetNLabels()+1) ;
2063 delete [] newLabelArray;
2079 Int_t nLabTotOrg = 0;
2083 AliVEvent *
event =
fEvent;
2086 AliAODInputHandler* aodIH =
dynamic_cast<AliAODInputHandler*
>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
2087 if(aodIH && aodIH->GetEventToMerge())
2088 event = aodIH->GetEventToMerge();
2092 for (
Int_t iLoopCell = 0 ; iLoopCell < clus->GetNCells() ; iLoopCell++ )
2094 Int_t idCell = clus->GetCellAbsId(iLoopCell) ;
2101 for(
Int_t icl =0; icl < nClu; icl++)
2103 if(((
Int_t)clArray.GetAt(icl))==-1 )
continue;
2104 if( idCluster == ((
Int_t)clArray.GetAt(icl)) ) set = kFALSE;
2108 if( set && idCluster >= 0)
2110 clArray.SetAt(idCluster,nClu++);
2112 nLabTotOrg+=(
event->GetCaloCluster(idCluster))->GetNLabels();
2117 AliVCluster * clOrg =
event->GetCaloCluster(idCluster);
2119 if(emax < clOrg->E())
2128 if(nClu==0 || nLabTotOrg == 0)
2136 if(idMax != ((
Int_t)clArray.GetAt(0)))
2138 Int_t maxIndex = -1;
2139 Int_t firstCluster = ((
Int_t)clArray.GetAt(0));
2140 for (
Int_t iLoopCluster = 0 ; iLoopCluster < nClu ; iLoopCluster++ )
2142 if(idMax == ((
Int_t)clArray.GetAt(iLoopCluster))) maxIndex = iLoopCluster;
2145 if(firstCluster >=0 && idMax >=0)
2147 clArray.SetAt(idMax,0);
2148 clArray.SetAt(firstCluster,maxIndex);
2153 TArrayI clMCArray(nLabTotOrg) ;
2157 for (
Int_t iLoopCluster = 0 ; iLoopCluster < nClu ; iLoopCluster++ )
2159 Int_t idCluster = (
Int_t) clArray.GetAt(iLoopCluster);
2161 AliVCluster * clOrg =
event->GetCaloCluster(idCluster);
2162 Int_t nLab = clOrg->GetNLabels();
2164 for (
Int_t iLab = 0 ; iLab < nLab ; iLab++ )
2166 Int_t lab = clOrg->GetLabelAt(iLab) ;
2171 for(
Int_t iLabTot =0; iLabTot < nLabTot; iLabTot++)
2173 if( lab == ((
Int_t)clMCArray.GetAt(iLabTot)) ) set = kFALSE;
2177 if( set ) clMCArray.SetAt(lab,nLabTot++);
2184 clus->SetLabel(clMCArray.GetArray(), nLabTot);
2208 AliInfo(
"Cluster branch name not set, set it to newEMCALClustersArray");
2233 if(!
fRecoUtils->IsBadChannelsRemovalSwitchedOn() &&
2237 !
fRecoUtils->IsL1PhaseInTimeRecalibrationOn() &&
2242 if ( ncells != ndigis )
2248 for (
Int_t idigit = 0; idigit < ndigis; ++idigit)
2250 AliEMCALDigit *digit =
static_cast<AliEMCALDigit*
>(
fDigitsArr->At(idigit));
2252 Double_t cellAmplitude = digit->GetAmplitude();
2253 Short_t cellNumber = digit->GetId();
2254 Double_t cellTime = digit->GetTime();
2256 Bool_t highGain = kFALSE;
2257 if( digit->GetType() == AliEMCALDigit::kHG ) highGain = kTRUE;
2262 Int_t nparents = digit->GetNiparent();
2263 Int_t cellMcEDepFrac =-1 ;
2267 for (
Int_t jndex = 0 ; jndex < nparents ; jndex++ )
2269 if(cellMcEDepFrac >= digit->GetDEParent(jndex+1))
continue ;
2271 cellMcLabel = digit->GetIparent (jndex+1);
2272 cellMcEDepFrac= digit->GetDEParent(jndex+1);
2276 if ( cellMcEDepFrac < 0 ) cellMcEDepFrac = 0.;
2278 fCaloCells->SetCell(idigit, cellNumber, cellAmplitude, cellTime, cellMcLabel, cellMcEDepFrac, highGain);
2324 AliDebug(1,Form(
"Skip Event %d", (
Int_t) Entry()));
void FillAODCaloCells()
Put calo cells in standard branch.
AliVCaloCells * fCaloCells
! CaloCells container
Bool_t fTCardCorrEmulation
Activate T-Card cells energy correlation.
virtual void ResetArrays()
Reset arrays containing information for all possible cells.
TString GetPass()
Get or guess pass number/string from path of filename.
Bool_t fSetCellMCLabelFromEdepFrac
Bool_t fFillAODHeader
Copy header to standard branch.
TClonesArray * fDigitsArr
! Digits array
Bool_t fTCardCorrClusEnerConserv
When making correlation, subtract from the reference cell the induced energy on the neighbour cells...
AliEMCALClusterizer * fClusterizer
! EMCAL clusterizer
AliAnalysisTaskEMCALClusterize()
Constructor.
Bool_t fJustUnfold
Just unfold, do not recluster.
Bool_t fImportGeometryFromFile
Import geometry settings in geometry.root file.
Bool_t fSelectCell
Reject cells from cluster if energy is too low and recalculate position/energy and other...
TString fConfigName
Name of analysis configuration file.
Int_t fCellSecondLabels[fgkNEMCalCells]
Array with Second MC label to be passed to digit.
TRandom3 fRandom
Random generator.
void MakeCellTCardCorrelation()
void SetClustersMCLabelFrom2SelectedLabels(AliEMCALRecPoint *recPoint, AliAODCaloCluster *clus)
Int_t fSetCellMCLabelFromCluster
Float_t fCellMatchdEta[fgkNEMCalCells]
Array with cluster-track dPhi.
TClonesArray * fOutputAODBranch
! AOD Branch with output clusters
TString fOADBFilePath
Default path $ALICE_PHYSICS/OADB/EMCAL, if needed change.
Float_t fTCardCorrCellsEner[fgkNEMCalCells]
Array with induced cell energy in T-Card neighbour cells.
virtual ~AliAnalysisTaskEMCALClusterize()
Destructor.
Float_t fTCardCorrInduceEnerFrac[3]
Induced energy loss gauss mean on 0-same row, diff col, 1-up/down cells left/right col 2-left/righ co...
TString fImportGeometryFilePath
path fo geometry.root file
Bool_t fSelectEMCALEvent
Process the event if there is some high energy cluster.
Bool_t AcceptEventEMCAL()
Float_t GetEventCentrality() const
Get centrality/multiplicity percentile.
Bool_t fInputFromFilter
Get the input from AODs from the filter.
Float_t fTCardCorrInduceEnerFracWidth[3]
Induced energy loss gauss witdth on 0-same row, diff col, 1-up/down cells left/right col 2-left/righ ...
TString fOutputAODBranchName
New of output AOD branch.
AliEMCALGeometry * fGeom
EMCAL geometry.
void ClusterUnfolding()
Take the event clusters and unfold them.
Bool_t fAccessOADB
Get calibration from OADB for EMCAL.
Bool_t fRemoveLEDEvents
Remove LED events, use only for LHC11a.
AliEMCALRecoUtils * fRecoUtils
Access to factorized reconstruction algorithms.
Bool_t fRejectBelowThreshold
split (false-default) or reject (true) cell energy below threshold after UF
Float_t fConstantTimeShift
Apply a 600 ns time shift in case of simulation, shift in ns.
void SetClustersMCLabelFromOriginalClusters(AliAODCaloCluster *clus)
Bool_t fUpdateCell
On/Off the upate of the CaloCells container.
Float_t fSelectCellMinE
Min energy cell threshold, after unfolding.
Bool_t fOADBSet
AODB parameters already set.
virtual void UserCreateOutputObjects()
virtual void FillCaloClusterInEvent()
Int_t fCellLabels[fgkNEMCalCells]
Array with MC label to be passed to digit.
Bool_t fRemoveExoticEvents
Remove exotic events.
void AddNewTCardInducedCellsToDigit()
Bool_t fDoTrackMatching
On/Off the matching recalculation to speed up analysis in PbPb.
virtual void UserExec(Option_t *option)
Float_t fCellMatchdPhi[fgkNEMCalCells]
Array with cluster-track dEta.
Float_t fTCardCorrInduceEnerProb[22]
Probability to induce energy loss per SM.
AliMultSelection * GetMultSelCen() const
TGeoHMatrix * fGeomMatrix[22]
Geometry matrices with alignments.
Bool_t IsLEDEvent(const Int_t run)
Check if event is LED, is so remove it. Affected LHC11a runs.
AliEMCALRecParam * fRecParam
Reconstruction parameters container.
TString fGeomName
Name of geometry to use.
Bool_t fOutputAODBranchSet
Set the AOD clusters branch in the input event once.
void RemapMCLabelForAODs(Int_t &label)
TString fOCDBpath
Path with OCDB location.
AliEMCALAfterBurnerUF * fUnfolder
! Unfolding procedure
Float_t fTCardCorrInduceEnerFracP1[3]
Induced energy loss gauss mean on 0-same row, diff col, 1-up/down cells left/right col 2-left/righ co...
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
Bool_t fGeomMatrixSet
Set geometry matrices only once, for the first event.
Float_t fCentralityBin[2]
Minimum and maximum value of the centrality for the analysis.
Int_t fMaxEvent
Set a maximum event.
Bool_t fFillAODCaloCells
Copy calocells to standard branch.
TObjArray * fCaloClusterArr
! CaloClusters array
Double_t fCellTime[fgkNEMCalCells]
Array with cluster time to be passed to digit in case of AODs.
AliCentrality * GetCentrality() const
TString fCentralityClass
Name of selected centrality class.
TFile * file
TList with histograms for a given trigger.
Bool_t fAccessOCDB
Need to access info from OCDB (not really)
TObjArray * fClusterArr
! Recpoints array
Bool_t fRecalibrateWithClusterTime
Use fCellTime to store time of cells in cluster.
Int_t GetRunNumber(TString)
void InitClusterization()
void FillAODHeader()
Put event header information in standard AOD branch.
static const Int_t fgkNEMCalCells
Total number of cells in the calorimeter, 10*48*24 (EMCal) + 4*48*8 (EMCal/DCal 1/3) + 6*32*24 (DCal)...
virtual void RecPoints2Clusters()
Int_t fEMCALNcellsCut
At least an EMCAL cluster with fNCellsCut cells over fEnergyCut.
Reclusterize EMCal clusters, put them in a new branch for other following analysis.
Bool_t fTCardCorrCellsNew[fgkNEMCalCells]
Array with induced cell energy in T-Card neighbour cells, that before had no signal.
Bool_t fLoadGeomMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
Float_t fEMCALEnergyCut
At least an EMCAL cluster with this energy in the event.
Bool_t fUseAliCentrality
Use the centrality estimator from AliCentrality or AliMultSelection.
Int_t fOrgClusterCellId[fgkNEMCalCells]
Array ID of cluster to wich the cell belongs in unmodified clusters.
Float_t fSelectCellMinFrac
Min fraction of cell energy after unfolding cut.
Bool_t fRemapMCLabelForAODs
Remap AOD cells MC label. Needed in old AOD productions.