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++)
106 for(
Int_t i = 0; i < 4 ; i++)
120 , fGeom(0), fGeomName(
"")
121 , fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
122 , fOCDBpath(
""), fAccessOCDB(kFALSE)
123 , fDigitsArr(0), fClusterArr(0)
124 , fCaloClusterArr(0), fCaloCells(0)
125 , fRecParam(0), fClusterizer(0)
126 , fUnfolder(0), fJustUnfold(kFALSE)
127 , fOutputAODBranch(0), fOutputAODBranchName(
""), fOutputAODBranchSet(0)
128 , fFillAODFile(kFALSE), fFillAODHeader(0)
129 , fFillAODCaloCells(0), fRun(-1)
130 , fRecoUtils(0), fConfigName(
"")
131 , fOrgClusterCellId()
132 , fCellLabels(), fCellSecondLabels(), fCellTime()
133 , fCellMatchdEta(), fCellMatchdPhi()
134 , fRecalibrateWithClusterTime(0)
135 , fMaxEvent(0), fDoTrackMatching(kFALSE), fUpdateCell(0)
136 , fSelectCell(kFALSE), fSelectCellMinE(0), fSelectCellMinFrac(0)
137 , fRejectBelowThreshold(kFALSE)
138 , fRemoveLEDEvents(kTRUE), fRemoveExoticEvents(kFALSE)
139 , fImportGeometryFromFile(kTRUE), fImportGeometryFilePath(
"")
140 , fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath(
"")
141 , fConstantTimeShift(0)
142 , fCentralityClass(
""), fUseAliCentrality(0), fSelectEMCALEvent(0)
143 , fEMCALEnergyCut(0.), fEMCALNcellsCut (0)
144 , fSetCellMCLabelFromCluster(0)
145 , fSetCellMCLabelFromEdepFrac(0)
146 , fRemapMCLabelForAODs(0)
147 , fInputFromFilter(0)
148 , fTCardCorrEmulation(0), fTCardCorrClusEnerConserv(0)
151 for(
Int_t i = 0; i < 22; i++)
161 for(
Int_t i = 0; i < 4 ; i++)
208 if ( absID < 0 || absID >= 24*48*
fGeom->GetNumberOfSuperModules() )
211 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
212 if (!
fGeom->GetCellIndex(absID,imod,iTower,iIphi,iIeta))
215 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
218 if (
fRecoUtils->IsBadChannelsRemovalSwitchedOn() &&
219 fRecoUtils->GetEMCALChannelStatus(imod, ieta, iphi) )
236 Int_t nCluster =
fEvent -> GetNumberOfCaloClusters();
239 for(
Int_t icalo = 0; icalo < nCluster; icalo++)
241 AliVCluster *clus = (AliVCluster*) (
fEvent->GetCaloCluster(icalo));
247 AliDebug(1, Form(
"Accept : E %2.2f > %2.2f, nCells %d > %d",
255 AliDebug(1,
"Reject");
269 Int_t runnumber = InputEvent()->GetRunNumber() ;
272 AliInfo(Form(
"Get AODB parameters from EMCAL in %s for run %d, and <%s>",
fOADBFilePath.Data(),runnumber,pass.Data()));
277 if(
fRecoUtils->IsBadChannelsRemovalSwitchedOn())
279 AliOADBContainer *contBC=
new AliOADBContainer(
"");
280 contBC->InitFromFile(Form(
"%s/EMCALBadChannels.root",
fOADBFilePath.Data()),
"AliEMCALBadChannels");
286 fRecoUtils->SwitchOnDistToBadChannelRecalculation();
287 AliInfo(
"Remove EMCAL bad cells");
289 for (
Int_t i=0; i < nSM; ++i)
291 TH2I *hbm =
fRecoUtils->GetEMCALChannelStatusMap(i);
296 hbm=(TH2I*)arrayBC->FindObject(Form(
"EMCALBadChannelMap_Mod%d",i));
300 AliError(Form(
"Can not get EMCALBadChannelMap_Mod%d",i));
304 hbm->SetDirectory(0);
308 }
else AliInfo(
"Do NOT remove EMCAL bad channels");
316 AliOADBContainer *contRF=
new AliOADBContainer(
"");
318 contRF->InitFromFile(Form(
"%s/EMCALRecalib.root",
fOADBFilePath.Data()),
"AliEMCALRecalib");
332 AliInfo(
"Recalibrate EMCAL");
333 for (
Int_t i=0; i<nSM; ++i)
340 h = (
TH2F*)recalib->FindObject(Form(
"EMCALRecalFactors_SM%d",i));
344 AliError(Form(
"Could not load EMCALRecalFactors_SM%d",i));
350 fRecoUtils->SetEMCALChannelRecalibrationFactors(i,h);
352 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params object array");
353 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params for pass");
354 }
else AliInfo(
"Do NOT recalibrate EMCAL, no params for run");
362 AliOADBContainer *contRFTD=
new AliOADBContainer(
"");
364 contRFTD->InitFromFile(Form(
"%s/EMCALTemperatureCorrCalib.root",
fOADBFilePath.Data()),
"AliEMCALRunDepTempCalibCorrections");
366 TH1S *htd=(TH1S*)contRFTD->GetObject(runnumber);
371 AliWarning(Form(
"No TemperatureCorrCalib Objects for run: %d",runnumber));
375 Int_t maxEntry = contRFTD->GetNumberOfEntries();
377 while ( (ic < maxEntry) && (contRFTD->UpperLimit(ic) < runnumber) ) {
382 Int_t closest = lower;
383 if ( (ic<maxEntry) &&
384 (contRFTD->LowerLimit(ic)-runnumber) < (runnumber - contRFTD->UpperLimit(lower)) ) {
388 AliWarning(Form(
"TemperatureCorrCalib Objects found closest id %d from run: %d", closest, contRFTD->LowerLimit(closest)));
389 htd = (TH1S*) contRFTD->GetObjectByIndex(closest);
394 AliInfo(
"Recalibrate (Temperature) EMCAL");
396 for (
Int_t ism=0; ism<nSM; ++ism)
398 for (
Int_t icol=0; icol<48; ++icol)
400 for (
Int_t irow=0; irow<24; ++irow)
404 Int_t absID =
fGeom->GetAbsCellIdFromCellIndexes(ism, irow, icol);
405 factor *= htd->GetBinContent(absID) / 10000. ;
408 fRecoUtils->SetEMCALChannelRecalibrationFactor(ism,icol,irow,factor);
412 }
else AliInfo(
"Do NOT recalibrate EMCAL with T variations, no params TH1");
420 AliOADBContainer *contTRF=
new AliOADBContainer(
"");
422 contTRF->InitFromFile(Form(
"%s/EMCALTimeCalib.root",
fOADBFilePath.Data()),
"AliEMCALTimeCalib");
430 if ( pass==
"spc_calo" ) passM =
"pass3";
431 if ( runnumber > 209121 ) passM =
"pass1";
432 if ( pass ==
"muon_calo_pass1" && runnumber > 209121 && runnumber < 244284 )
439 AliInfo(
"Time Recalibrate EMCAL");
440 for (
Int_t ibc = 0; ibc < 4; ++ibc)
442 TH1F *h =
fRecoUtils->GetEMCALChannelTimeRecalibrationFactors(ibc);
447 h = (TH1F*)trecalpass->FindObject(Form(
"hAllTimeAvBC%d",ibc));
451 AliError(Form(
"Could not load hAllTimeAvBC%d",ibc));
457 fRecoUtils->SetEMCALChannelTimeRecalibrationFactors(ibc,h);
459 }
else AliInfo(
"Do NOT recalibrate time EMCAL, no params for pass");
460 }
else AliInfo(
"Do NOT recalibrate time EMCAL, no params for run");
466 if(
fRecoUtils->IsL1PhaseInTimeRecalibrationOn() )
469 if (!
fRecoUtils->GetEMCALL1PhaseInTimeRecalibrationArray())
470 fRecoUtils->InitEMCALL1PhaseInTimeRecalibration() ;
472 AliOADBContainer *contBC =
new AliOADBContainer(
"");
474 TFile *timeFile=
new TFile(Form(
"%s/EMCALTimeL1PhaseCalib.root",
fOADBFilePath.Data()),
"read");
475 if (!timeFile || timeFile->IsZombie())
477 AliFatal(Form(
"EMCALTimeL1PhaseCalib.root was not found in the path provided: %s",
fOADBFilePath.Data()));
481 if (timeFile)
delete timeFile;
483 contBC->InitFromFile(Form(
"%s/EMCALTimeL1PhaseCalib.root",
fOADBFilePath.Data()),
"AliEMCALTimeL1PhaseCalib");
488 AliError(Form(
"No external L1 phase in time calibration set for run number: %d", runnumber));
489 fRecoUtils->SwitchOffL1PhaseInTimeRecalibration();
496 if ( pass==
"muon_calo_pass1" && runnumber > 209121 && runnumber < 244284 )
502 AliError(Form(
"No external L1 phase in time calibration set for: %d -%s", runnumber,pass2.Data()));
503 fRecoUtils->SwitchOffL1PhaseInTimeRecalibration();
505 else AliInfo(
"Recalibrate L1 Phase time");
509 if ( DebugLevel()>0 ) arrayBCpass->Print();
511 TH1C *h =
fRecoUtils->GetEMCALL1PhaseInTimeRecalibrationForAllSM();
514 h = (TH1C*)arrayBCpass->FindObject(Form(
"h%d",runnumber));
518 AliFatal(Form(
"There is no calibration histogram h%d for this run",runnumber));
523 fRecoUtils->SetEMCALL1PhaseInTimeRecalibrationForAllSM(h);
543 Warning(
"AccessOCDB",
"Event not available!!!");
553 AliCDBManager *cdb = AliCDBManager::Instance();
558 cdb->SetDefaultStorage(
fOCDBpath.Data());
559 AliInfo(Form(
"Default storage %s",
fOCDBpath.Data()));
562 cdb->SetRun(
fEvent->GetRunNumber());
568 cdb->SetSpecificStorage(
"EMCAL/Calib/Data",
"raw://");
569 cdb->SetSpecificStorage(
"EMCAL/Calib/Time",
"raw://");
570 cdb->SetSpecificStorage(
"EMCAL/Calib/Pedestals",
"raw://");
573 TString path = cdb->GetDefaultStorage()->GetBaseFolder();
608 new((*fDigitsArr)[idigit]) AliEMCALDigit( -2, -2, j,
fTCardCorrCellsEner[j], fixTime,AliEMCALDigit::kHG,idigit, 0, 0, 0);
627 AliAODInputHandler* aodIH =
dynamic_cast<AliAODInputHandler*
>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
628 Int_t eventN = Entry();
629 if(aodIH) eventN = aodIH->GetReadEntry();
638 if (aodIH && aodIH->GetMergeEvents())
642 if(!aodIH->GetMergeEMCALCells())
643 AliFatal(
"Events merged but not EMCAL cells, check analysis settings!");
645 AliDebug(1,
"Use embedded events");
647 AliDebug(1,Form(
"\t InputEvent N Clusters %d, N Cells %d",
648 InputEvent()->GetNumberOfCaloClusters(),InputEvent()->GetEMCALCells()->GetNumberOfCells()));
650 AliDebug(1,Form(
"\t MergedEvent N Clusters %d, N Cells %d",
651 aodIH->GetEventToMerge()->GetNumberOfCaloClusters(), aodIH->GetEventToMerge()->GetEMCALCells()->GetNumberOfCells()));
662 AliDebug(1,Form(
"\t OutputEvent N Clusters %d, N Cells %d",
663 AODEvent()->GetNumberOfCaloClusters(), AODEvent()->GetEMCALCells()->GetNumberOfCells()));
679 AliError(
"Event not available");
705 AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kTRUE);
724 Int_t nClusters =
fEvent->GetNumberOfCaloClusters();
725 Int_t nClustersOrg = 0;
727 AliAODInputHandler* aodIH =
dynamic_cast<AliAODInputHandler*
>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
728 if(aodIH && aodIH->GetEventToMerge())
729 nClusters = aodIH->GetEventToMerge()->GetNumberOfCaloClusters();
737 for (
Int_t i = 0; i < nClusters; i++)
739 AliVCluster *clus = 0;
740 if(aodIH && aodIH->GetEventToMerge())
741 clus = aodIH->GetEventToMerge()->GetCaloCluster(i);
743 clus =
fEvent->GetCaloCluster(i);
749 if(!clus->IsEMCAL())
continue;
751 Int_t label = clus->GetLabel();
753 if (clus->GetNLabels() >=2 ) label2 = clus->GetLabelAt(1) ;
763 UShort_t * index = clus->GetCellsAbsId() ;
764 for(
Int_t icell=0; icell < clus->GetNCells(); icell++ )
767 fCellTime[index[icell]] = clus->GetTOF();
791 Int_t bc = InputEvent()->GetBunchCrossNumber();
801 if( amp < fRecParam->GetMinECut() ||
803 time <
fRecParam->GetTimeMin() ) accept = kFALSE;
820 AliDebug(2,Form(
"Remove channel absId %d, index %d of %d, amp %f, time %f",
821 id,icell,
fCaloCells->GetNumberOfCells(), amp, time*1.e9));
859 if (mcLabel > 0 && efrac < 1.e-6) efrac = 1;
874 AliVCluster *clus = 0;
879 AliInfo(
"Negative original cluster index, skip \n");
883 if(aodIH && aodIH->GetEventToMerge())
884 clus = aodIH->GetEventToMerge()->GetCaloCluster(iclus);
886 clus =
fEvent->GetCaloCluster(iclus);
888 fRecoUtils->RecalculateCellLabelsRemoveAddedGenerator(
id, clus, MCEvent(), amp, labeArr, eDepArr);
889 nLabels = labeArr.GetSize();
904 if(amp <= 0.01) continue ;
908 AliEMCALDigit* digit =
new((*fDigitsArr)[idigit]) AliEMCALDigit( mcLabel, mcLabel,
id, amp, time,AliEMCALDigit::kHG,idigit, 0, 0, eDep);
911 digit->SetListOfParents(nLabels,labeArr.GetArray(),eDepArr.GetArray());
937 AliWarning(Form(
"No array with CaloClusters, input RecPoints entries %d",
fClusterArr->GetEntriesFast()));
941 AliDebug(1,Form(
"N clusters: before recluster %d, after recluster %d, recpoints %d",
961 Int_t cellMCLabel = 0;
963 Int_t nClustersOrg = 0;
966 for (
Int_t i = 0; i <
fEvent->GetNumberOfCaloClusters(); i++)
968 AliVCluster *clus =
fEvent->GetCaloCluster(i);
972 if(
fRecoUtils->ClusterContainsBadChannel(
fGeom,clus->GetCellsAbsId(), clus->GetNCells()))
985 if (
fCaloCells->GetCell(icell, cellNumber, cellAmplitude, cellTime, cellMCLabel, cellEFrac) != kTRUE)
988 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
989 fGeom->GetCellIndex(cellNumber,imod,iTower,iIphi,iIeta);
990 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
993 if(
fRecoUtils->IsBadChannelsRemovalSwitchedOn() &&
994 fRecoUtils->GetEMCALChannelStatus(imod, ieta, iphi))
997 fCaloCells->SetCell(icell, cellNumber, cellAmplitude*
fRecoUtils->GetEMCALChannelRecalibrationFactor(imod,ieta,iphi),cellTime);
1003 AliESDCaloCluster * esdCluster =
dynamic_cast<AliESDCaloCluster*
> (clus);
1004 AliAODCaloCluster * aodCluster =
dynamic_cast<AliAODCaloCluster*
> (clus);
1015 AliWarning(
"Wrong CaloCluster type?");
1033 AliVCaloCells &eventEMcells = *(
fEvent->GetEMCALCells());
1034 Int_t nEMcell = eventEMcells.GetNumberOfCells() ;
1036 AliAODCaloCells &aodEMcells = *(AODEvent()->GetEMCALCells());
1037 aodEMcells.CreateContainer(nEMcell);
1038 aodEMcells.SetType(AliVCaloCells::kEMCALCell);
1040 for (
Int_t iCell = 0; iCell < nEMcell; iCell++)
1042 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1043 fGeom->GetCellIndex(eventEMcells.GetCellNumber(iCell),imod,iTower,iIphi,iIeta);
1044 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
1048 calibFactor =
fRecoUtils->GetEMCALChannelRecalibrationFactor(imod,ieta,iphi);
1051 if(!
fRecoUtils->GetEMCALChannelStatus(imod, ieta, iphi))
1053 aodEMcells.SetCell(iCell,eventEMcells.GetCellNumber(iCell),eventEMcells.GetAmplitude(iCell)*calibFactor,
1054 eventEMcells.GetTime(iCell),eventEMcells.GetMCLabel(iCell),eventEMcells.GetEFraction(iCell));
1058 aodEMcells.SetCell(iCell,eventEMcells.GetCellNumber(iCell),0,-1,-1,0);
1075 for (
Int_t i = 0; i < 6; i++) covVtx[i] = 0.;
1077 AliAODHeader* header =
dynamic_cast<AliAODHeader*
>(AODEvent()->GetHeader());
1078 if(!header) AliFatal(
"Not a standard AOD");
1079 header->SetRunNumber(
fEvent->GetRunNumber());
1083 TTree* tree = fInputHandler->GetTree();
1086 TFile*
file = tree->GetCurrentFile();
1087 if (file) header->SetESDFileName(file->GetName());
1090 else if (aodevent) {
1091 AliAODHeader * aodheader =
dynamic_cast<AliAODHeader*
>(aodevent->GetHeader());
1092 if(!aodheader) AliFatal(
"Not a standard AOD");
1093 header->SetESDFileName(aodheader->GetESDFileName());
1096 header->SetBunchCrossNumber(
fEvent->GetBunchCrossNumber());
1097 header->SetOrbitNumber(
fEvent->GetOrbitNumber());
1098 header->SetPeriodNumber(
fEvent->GetPeriodNumber());
1099 header->SetEventType(
fEvent->GetEventType());
1104 if(
fEvent->GetCentrality())
1105 header->SetCentrality(
new AliCentrality(*(
fEvent->GetCentrality())));
1107 header->SetCentrality(0);
1111 header->SetOfflineTrigger(fInputHandler->IsEventSelected());
1113 header->SetFiredTriggerClasses(
fEvent->GetFiredTriggerClasses());
1115 header->SetTriggerMask(
fEvent->GetTriggerMask());
1116 header->SetTriggerCluster(
fEvent->GetTriggerCluster());
1120 header->SetL0TriggerInputs(esdevent->GetHeader()->GetL0TriggerInputs());
1121 header->SetL1TriggerInputs(esdevent->GetHeader()->GetL1TriggerInputs());
1122 header->SetL2TriggerInputs(esdevent->GetHeader()->GetL2TriggerInputs());
1126 header->SetL0TriggerInputs(aodevent->GetHeader()->GetL0TriggerInputs());
1127 header->SetL1TriggerInputs(aodevent->GetHeader()->GetL1TriggerInputs());
1128 header->SetL2TriggerInputs(aodevent->GetHeader()->GetL2TriggerInputs());
1131 header->SetMagneticField(
fEvent->GetMagneticField());
1134 header->SetZDCN1Energy(
fEvent->GetZDCN1Energy());
1135 header->SetZDCP1Energy(
fEvent->GetZDCP1Energy());
1136 header->SetZDCN2Energy(
fEvent->GetZDCN2Energy());
1137 header->SetZDCP2Energy(
fEvent->GetZDCP2Energy());
1138 header->SetZDCEMEnergy(
fEvent->GetZDCEMEnergy(0),
fEvent->GetZDCEMEnergy(1));
1142 fEvent->GetDiamondCovXY(diamcov);
1143 header->SetDiamond(diamxy,diamcov);
1144 if (esdevent) header->SetDiamondZ(esdevent->GetDiamondZ(),esdevent->GetSigma2DiamondZ());
1145 else if (aodevent) header->SetDiamondZ(aodevent->GetDiamondZ(),aodevent->GetSigma2DiamondZ());
1148 Int_t nVertices = 1 ;;
1149 Int_t nCaloClus =
fEvent->GetNumberOfCaloClusters();
1151 AODEvent()->ResetStd(0, nVertices, 0, 0, 0, nCaloClus, 0, 0);
1154 TClonesArray &vertices = *(AODEvent()->GetVertices());
1159 fEvent->GetPrimaryVertex()->GetXYZ(pos);
1163 esdevent->GetPrimaryVertex()->GetCovMatrix(covVtx);
1164 chi = esdevent->GetPrimaryVertex()->GetChi2toNDF();
1168 aodevent->GetPrimaryVertex()->GetCovMatrix(covVtx);
1169 chi = aodevent->GetPrimaryVertex()->GetChi2perNDF();
1172 AliAODVertex * primary =
new(vertices[jVertices++])
1173 AliAODVertex(pos, covVtx, chi, NULL, -1, AliAODVertex::kPrimary);
1174 primary->SetName(
fEvent->GetPrimaryVertex()->GetName());
1175 primary->SetTitle(
fEvent->GetPrimaryVertex()->GetTitle());
1195 for(
Int_t i = 0; i < kNumberOfCaloClusters; i++)
1197 AliAODCaloCluster *newCluster = (AliAODCaloCluster *)
fCaloClusterArr->At(i);
1199 newCluster->SetID(i);
1202 newCluster->SetE(
fRecoUtils->CorrectClusterEnergyLinearity(newCluster));
1210 newCluster->AddTrackMatched(
fEvent->GetTrack(trackIndex));
1211 AliDebug(2,Form(
"Matched Track index %d to new cluster %d",trackIndex,i));
1215 fRecoUtils->GetMatchedResiduals(newCluster->GetID(),dZ,dR);
1216 newCluster->SetTrackDistance(dR,dZ);
1220 Int_t absId0 = newCluster->GetCellsAbsId()[0];
1239 new((*fOutputAODBranch)[i]) AliAODCaloCluster(*newCluster);
1241 AliDebug(2,Form(
"New cluster %d of %d, energy %f, mc label %d",
1242 newCluster->GetID(), kNumberOfCaloClusters, newCluster->E(), newCluster->GetLabel()));
1274 if (!AliAnalysisManager::GetAnalysisManager()->GetTree())
1276 AliError(
"AliAnalysisTaskEMCALClusterize::GetPass() - Pointer to tree = 0, returning null");
1280 if (!AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile())
1282 AliError(
"AliAnalysisTaskEMCALClusterize::GetPass() - Null pointer input file, returning null");
1286 TString pass(AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile()->GetName());
1287 if (pass.Contains(
"ass1"))
return TString(
"pass1");
1288 else if (pass.Contains(
"ass2"))
return TString(
"pass2");
1289 else if (pass.Contains(
"ass3"))
return TString(
"pass3");
1290 else if (pass.Contains(
"ass4"))
return TString(
"pass4");
1291 else if (pass.Contains(
"ass5"))
return TString(
"pass5");
1292 else if (pass.Contains(
"LHC11c") && pass.Contains(
"spc_calo") )
return TString(
"spc_calo");
1293 else if (pass.Contains(
"calo") || pass.Contains(
"high_lumi"))
1295 AliInfo(
"Path contains <calo> or <high-lumi>, set as <pass1>");
1298 else if (pass.Contains(
"LHC14a1a"))
1300 AliInfo(
"Enable EMCal energy calibration for this MC production!!");
1308 AliInfo(
"Pass number string not found");
1319 if(fDebug >=0) (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(this->ClassName(),fDebug);
1324 fBranchNames =
"ESD:AliESDHeader.,EMCALCells.";
1342 AliInfo(Form(
"Configure analysis with %s",
fConfigName.Data()));
1381 if (
fRecParam->GetClusterizerFlag() == AliEMCALRecParam::kClusterizerv1)
1383 else if(
fRecParam->GetClusterizerFlag() == AliEMCALRecParam::kClusterizerv2)
1385 else if(
fRecParam->GetClusterizerFlag() == AliEMCALRecParam::kClusterizerNxN)
1393 AliFatal(Form(
"Clusterizer < %d > not available",
fRecParam->GetClusterizerFlag()));
1418 for (i = 0; i < 8; i++)
1423 for (i = 0; i < 3; i++)
1443 Int_t runnumber = InputEvent()->GetRunNumber() ;
1448 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(runnumber);
1449 AliInfo(Form(
"Get EMCAL geometry name <%s> for run %d",
fGeom->GetName(),runnumber));
1454 AliInfo(Form(
"Set EMCAL geometry name to <%s>",
fGeomName.Data()));
1474 AliDebug(1,Form(
"Init for run=%d",runnumber));
1475 if (!gGeoManager) AliDebug(1,
"Careful!, gGeoManager not loaded, load misalign matrices");
1480 AliInfo(
"Load user defined EMCAL geometry matrices");
1483 AliOADBContainer emcGeoMat(
"AliEMCALgeo");
1484 emcGeoMat.InitFromFile(Form(
"%s/EMCALlocal2master.root",
fOADBFilePath.Data()),
"AliEMCALgeo");
1487 for(
Int_t mod=0; mod < (
fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
1492 AliDebug(2,Form(
"EMCAL matrices SM %d, %p",mod,((TGeoHMatrix*) matEMCAL->At(mod))));
1495 fGeomMatrix[mod] = (TGeoHMatrix*) matEMCAL->At(mod) ;
1500 if(DebugLevel() > 1)
1505 else if(gGeoManager)
1507 AliWarning(Form(
"Set matrix for SM %d from gGeoManager",mod));
1508 fGeom->SetMisalMatrix(
fGeom->GetMatrixForSuperModuleFromGeoManager(mod),mod) ;
1512 AliError(Form(
"Alignment atrix for SM %d is not available",mod));
1519 else if(!gGeoManager)
1521 AliInfo(
"AliAnalysisTaksEMCALClusterize::InitGeometry() - Get geo matrices from data");
1523 if(!strcmp(
fEvent->GetName(),
"AliAODEvent"))
1525 AliWarning(
"Use ideal geometry, values geometry matrix not kept in AODs");
1529 AliDebug(1,
"Load Misaligned matrices");
1535 AliError(
"This event does not contain ESDs?");
1536 if(
fFillAODFile) AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kFALSE);
1540 for(
Int_t mod=0; mod < (
fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
1542 if(DebugLevel() > 1)
1543 esd->GetEMCALMatrix(mod)->Print();
1545 if(esd->GetEMCALMatrix(mod))
fGeom->SetMisalMatrix(esd->GetEMCALMatrix(mod),mod) ;
1568 Int_t bc = InputEvent()->GetBunchCrossNumber();
1589 if(totCellE < 1)
return kTRUE;
1602 if(run < 146858 || run > 146860)
return kFALSE ;
1605 Int_t ncellsSM3 = 0;
1608 if (
fCaloCells->GetAmplitude (icell) > 0.1 &&
1609 fCaloCells->GetCellNumber(icell)/(24*48)==3 ) ncellsSM3++;
1614 Int_t ncellcut = 21;
1615 if(triggerclasses.Contains(
"EMC")) ncellcut = 35;
1617 if( ncellsSM3 >= ncellcut)
1619 AliInfo(Form(
"Reject event %d with ncells in SM3 %d",(
Int_t)Entry(),ncellsSM3));
1620 if(
fFillAODFile) AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kFALSE);;
1638 for (
Int_t icell = 0; icell <
fCaloCells->GetNumberOfCells(); icell++)
1645 Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
1646 fGeom->GetCellIndex(
id,imod,iTower,iIphi,iIeta);
1647 fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
1664 Int_t absIDuplr = -1;
1665 Int_t absIDdolr = -1;
1667 Int_t absIDup2 = -1;
1668 Int_t absIDup2lr = -1;
1669 Int_t absIDdo2 = -1;
1670 Int_t absIDdo2lr = -1;
1674 if ( (ieta%2) && ieta <= AliEMCALGeoParams::fgkEMCALCols-1 ) colShift = -1;
1675 if ( !(ieta%2) && ieta >= 0 ) colShift = +1;
1677 absIDlr =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+colShift);
1680 if ( iphi < AliEMCALGeoParams::fgkEMCALRows-1 )
1682 absIDup =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
1683 absIDuplr =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta+colShift);
1688 absIDdo =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
1689 absIDdolr =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta+colShift);
1693 if ( iphi < AliEMCALGeoParams::fgkEMCALRows-2 )
1695 absIDup2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+2, ieta);
1696 absIDup2lr =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+2, ieta+colShift);
1701 absIDdo2 =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-2, ieta);
1702 absIDdo2lr =
fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-2, ieta+colShift);
1706 if ( TMath::FloorNint(iphi/8) != TMath::FloorNint((iphi+1)/8) ) { absIDup = -1 ; absIDuplr = -1 ; }
1707 if ( TMath::FloorNint(iphi/8) != TMath::FloorNint((iphi-1)/8) ) { absIDdo = -1 ; absIDdolr = -1 ; }
1708 if ( TMath::FloorNint(iphi/8) != TMath::FloorNint((iphi+2)/8) ) { absIDup2 = -1 ; absIDup2lr = -1 ; }
1709 if ( TMath::FloorNint(iphi/8) != TMath::FloorNint((iphi-2)/8) ) { absIDdo2 = -1 ; absIDdo2lr = -1 ; }
1860 AliEMCALRecPoint *recPoint = (AliEMCALRecPoint*)
fClusterArr->At(i);
1862 const Int_t ncells = recPoint->GetMultiplicity();
1863 Int_t ncellsTrue = 0;
1865 if(recPoint->GetEnergy() <
fRecParam->GetClusteringThreshold())
continue;
1869 Double32_t ratios[ncells];
1872 AliAODInputHandler* aodIH =
dynamic_cast<AliAODInputHandler*
>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
1877 AliEMCALDigit *digit = (AliEMCALDigit*)
fDigitsArr->At(recPoint->GetDigitsList()[
c]);
1879 absIds[ncellsTrue] = digit->GetId();
1880 ratios[ncellsTrue] = recPoint->GetEnergiesList()[
c]/digit->GetAmplitude();
1882 if ( !
fRecParam->GetUnfold() && (ratios[ncellsTrue] > 1 || ratios[ncellsTrue] < 1) )
1883 AliWarning(Form(
"recpoint cell E %2.3f but digit E %2.3f and no unfolding", recPoint->GetEnergiesList()[
c], digit->GetAmplitude()));
1891 AliDebug(2,Form(
"Too small energy in cell of cluster: cluster cell %f, digit %f",
1892 recPoint->GetEnergiesList()[
c],digit->GetAmplitude()));
1898 clusterE +=recPoint->GetEnergiesList()[
c];
1901 if (aodIH && aodIH->GetMergeEvents())
1904 AliVCaloCells* meEMCALCells = aodIH->GetEventToMerge()->GetEMCALCells();
1905 AliVCaloCells* ouEMCALCells = AODEvent()->GetEMCALCells();
1907 Float_t sigAmplitude = meEMCALCells->GetCellAmplitude(absIds[ncellsTrue]);
1909 Float_t sumAmplitude = ouEMCALCells->GetCellAmplitude(absIds[ncellsTrue]);
1912 if(sumAmplitude > 0) ratios[ncellsTrue] = sigAmplitude/sumAmplitude;
1923 AliDebug(2,Form(
"Skipping cluster with no cells avobe threshold E = %f, ncells %d",
1924 recPoint->GetEnergy(), ncells));
1930 if(clusterE < fRecParam->GetClusteringThreshold())
1932 AliDebug(2,Form(
"Remove cluster with energy below seed threshold %f",clusterE));
1942 recPoint->GetGlobalPosition(gpos);
1947 (*fCaloClusterArr)[j] =
new AliAODCaloCluster() ;
1948 AliAODCaloCluster *clus =
dynamic_cast<AliAODCaloCluster *
>(
fCaloClusterArr->At(j) ) ;
1950 clus->SetType(AliVCluster::kEMCALClusterv1);
1951 clus->SetE(clusterE);
1952 clus->SetPosition(g);
1953 clus->SetNCells(ncellsTrue);
1954 clus->SetCellsAbsId(absIds);
1955 clus->SetCellsAmplitudeFraction(ratios);
1957 clus->SetTOF(recPoint->GetTime()) ;
1958 clus->SetNExMax(recPoint->GetNExMax());
1959 clus->SetDistanceToBadChannel(recPoint->GetDistanceToBadTower());
1961 if(ncells == ncellsTrue)
1964 recPoint->GetElipsAxis(elipAxis);
1965 clus->SetM02(elipAxis[0]*elipAxis[0]) ;
1966 clus->SetM20(elipAxis[1]*elipAxis[1]) ;
1967 clus->SetDispersion(recPoint->GetDispersion());
1973 AliDebug(2,Form(
"Cells removed from cluster (ncells %d, ncellsTrue %d), recalculate Shower Shape",ncells,ncellsTrue));
1975 AliVCaloCells* cells = 0x0;
1976 if (aodIH && aodIH->GetMergeEvents()) cells = AODEvent() ->GetEMCALCells();
1977 else cells = InputEvent()->GetEMCALCells();
1979 fRecoUtils->RecalculateClusterShowerShapeParameters(
fGeom,cells,clus);
1993 Int_t parentMult = 0;
1994 Int_t *parentList = recPoint->GetParents(parentMult);
1995 Float_t *parentListDE = recPoint->GetParentsDE();
1997 clus->SetLabel(parentList, parentMult);
1999 clus->SetClusterMCEdepFractionFromEdepArray(parentListDE);
2013 for(
Int_t icell = 0; icell < ncellsTrue ; icell++)
2017 const AliEMCALDigit * dig = (
const AliEMCALDigit*)
fDigitsArr->At(idigit);
2022 mcEdepFracPerCell[icell] = 0;
2024 Int_t nparents = dig->GetNiparent();
2027 Int_t digLabel =-1 ;
2030 Float_t mcEDepFrac[4] = {0,0,0,0};
2033 for (
Int_t jndex = 0 ; jndex < nparents ; jndex++ )
2035 digLabel = dig->GetIparent (jndex+1);
2036 edep = dig->GetDEParent(jndex+1);
2039 if ( digLabel == parentList[0] ) mcEDepFrac[0] = edep;
2040 else if ( digLabel == parentList[1] ) mcEDepFrac[1] = edep;
2041 else if ( digLabel == parentList[2] ) mcEDepFrac[2] = edep;
2042 else if ( digLabel == parentList[3] ) mcEDepFrac[3] = edep;
2049 mcEdepFracPerCell[icell] = clus->PackMCEdepFraction(mcEDepFrac);
2054 clus->SetCellsMCEdepFractionMap(mcEdepFracPerCell);
2056 delete [] mcEdepFracPerCell;
2069 if(label < 0) return ;
2074 TClonesArray * arr =
dynamic_cast<TClonesArray*
>(evt->FindListObject(
"mcparticles")) ;
2077 if(label < arr->GetEntriesFast())
2079 AliAODMCParticle * particle =
dynamic_cast<AliAODMCParticle *
>(arr->At(label));
2080 if(!particle) return ;
2082 if(label == particle->Label())
return ;
2088 for(
Int_t ind = 0; ind < arr->GetEntriesFast(); ind++ )
2090 AliAODMCParticle * particle =
dynamic_cast<AliAODMCParticle *
>(arr->At(ind));
2091 if(!particle) continue ;
2093 if(label == particle->Label())
2131 AliAODCaloCluster * clus)
2133 Int_t parentMult = 0;
2134 Int_t *parentList = recPoint->GetParents(parentMult);
2135 clus->SetLabel(parentList, parentMult);
2139 for (
Int_t iLoopCell = 0 ; iLoopCell < clus->GetNCells() ; iLoopCell++ )
2142 Int_t idCell = clus->GetCellAbsId(iLoopCell) ;
2146 for (
UInt_t iLoopLabels = 0 ; iLoopLabels < clus->GetNLabels() ; iLoopLabels++ )
2149 if (
fCellSecondLabels[idCell] == clus->GetLabelAt(iLoopLabels) ) iNewLabel = 0;
2153 Int_t * newLabelArray =
new Int_t[clus->GetNLabels()+1] ;
2154 for (
UInt_t iLoopNewLabels = 0 ; iLoopNewLabels < clus->GetNLabels() ; iLoopNewLabels++ )
2156 newLabelArray[iLoopNewLabels] = clus->GetLabelAt(iLoopNewLabels) ;
2160 clus->SetLabel(newLabelArray,clus->GetNLabels()+1) ;
2161 delete [] newLabelArray;
2177 Int_t nLabTotOrg = 0;
2181 AliVEvent *
event =
fEvent;
2184 AliAODInputHandler* aodIH =
dynamic_cast<AliAODInputHandler*
>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
2185 if(aodIH && aodIH->GetEventToMerge())
2186 event = aodIH->GetEventToMerge();
2190 for (
Int_t iLoopCell = 0 ; iLoopCell < clus->GetNCells() ; iLoopCell++ )
2192 Int_t idCell = clus->GetCellAbsId(iLoopCell) ;
2199 for(
Int_t icl =0; icl < nClu; icl++)
2201 if(((
Int_t)clArray.GetAt(icl))==-1 )
continue;
2202 if( idCluster == ((
Int_t)clArray.GetAt(icl)) ) set = kFALSE;
2206 if( set && idCluster >= 0)
2208 clArray.SetAt(idCluster,nClu++);
2210 nLabTotOrg+=(
event->GetCaloCluster(idCluster))->GetNLabels();
2215 AliVCluster * clOrg =
event->GetCaloCluster(idCluster);
2217 if(emax < clOrg->E())
2226 if(nClu==0 || nLabTotOrg == 0)
2234 if(idMax != ((
Int_t)clArray.GetAt(0)))
2236 Int_t maxIndex = -1;
2237 Int_t firstCluster = ((
Int_t)clArray.GetAt(0));
2238 for (
Int_t iLoopCluster = 0 ; iLoopCluster < nClu ; iLoopCluster++ )
2240 if(idMax == ((
Int_t)clArray.GetAt(iLoopCluster))) maxIndex = iLoopCluster;
2243 if(firstCluster >=0 && idMax >=0)
2245 clArray.SetAt(idMax,0);
2246 clArray.SetAt(firstCluster,maxIndex);
2251 TArrayI clMCArray(nLabTotOrg) ;
2255 for (
Int_t iLoopCluster = 0 ; iLoopCluster < nClu ; iLoopCluster++ )
2257 Int_t idCluster = (
Int_t) clArray.GetAt(iLoopCluster);
2259 AliVCluster * clOrg =
event->GetCaloCluster(idCluster);
2260 Int_t nLab = clOrg->GetNLabels();
2262 for (
Int_t iLab = 0 ; iLab < nLab ; iLab++ )
2264 Int_t lab = clOrg->GetLabelAt(iLab) ;
2269 for(
Int_t iLabTot =0; iLabTot < nLabTot; iLabTot++)
2271 if( lab == ((
Int_t)clMCArray.GetAt(iLabTot)) ) set = kFALSE;
2275 if( set ) clMCArray.SetAt(lab,nLabTot++);
2282 clus->SetLabel(clMCArray.GetArray(), nLabTot);
2306 AliInfo(
"Cluster branch name not set, set it to newEMCALClustersArray");
2331 if(!
fRecoUtils->IsBadChannelsRemovalSwitchedOn() &&
2335 !
fRecoUtils->IsL1PhaseInTimeRecalibrationOn() &&
2340 if ( ncells != ndigis )
2346 for (
Int_t idigit = 0; idigit < ndigis; ++idigit)
2348 AliEMCALDigit *digit =
static_cast<AliEMCALDigit*
>(
fDigitsArr->At(idigit));
2350 Double_t cellAmplitude = digit->GetAmplitude();
2351 Short_t cellNumber = digit->GetId();
2352 Double_t cellTime = digit->GetTime();
2354 Bool_t highGain = kFALSE;
2355 if( digit->GetType() == AliEMCALDigit::kHG ) highGain = kTRUE;
2360 Int_t nparents = digit->GetNiparent();
2361 Int_t cellMcEDepFrac =-1 ;
2365 for (
Int_t jndex = 0 ; jndex < nparents ; jndex++ )
2367 if(cellMcEDepFrac >= digit->GetDEParent(jndex+1))
continue ;
2369 cellMcLabel = digit->GetIparent (jndex+1);
2370 cellMcEDepFrac= digit->GetDEParent(jndex+1);
2374 if ( cellMcEDepFrac < 0 ) cellMcEDepFrac = 0.;
2376 fCaloCells->SetCell(idigit, cellNumber, cellAmplitude, cellTime, cellMcLabel, cellMcEDepFrac, highGain);
2422 AliDebug(1,Form(
"Skip Event %d", (
Int_t) Entry()));
void FillAODCaloCells()
Put calo cells in standard branch.
Float_t fTCardCorrInduceEnerFracWidth[4]
Induced energy loss gauss witdth on 0-same row, diff col, 1-up/down cells left/right col 2-left/righ ...
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.
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.
TString fOutputAODBranchName
New of output AOD branch.
AliEMCALGeometry * fGeom
EMCAL geometry.
Float_t fTCardCorrInduceEnerFrac[4]
Induced energy loss gauss mean on 0-same row, diff col, 1-up/down cells left/right col 2-left/righ co...
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 fTCardCorrInduceEnerFracP1[4]
Induced energy loss gauss mean on 0-same row, diff col, 1-up/down cells left/right col 2-left/righ co...
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
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.
Bool_t AcceptCell(Int_t absID)