13 #include "CaloGeoHelpers/CaloSampling.h"
23 #include "GaudiKernel/ThreadLocalContext.h"
24 #endif // XAOD_ANALYSIS
45 #if defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS)
59 declareInterface<ICaloCellIsolationTool>(
this);
60 declareInterface<ICaloTopoClusterIsolationTool>(
this);
61 declareInterface<INeutralEFlowIsolationTool>(
this);
62 #endif // XAOD_ANALYSIS
89 return StatusCode::FAILURE;
95 return StatusCode::FAILURE;
103 return StatusCode::FAILURE;
110 #endif // XAOD_ANALYSIS
126 return StatusCode::FAILURE ;
129 std::unique_ptr<TFile>
f(TFile::Open(
filename.c_str(),
"READ"));
139 return StatusCode::FAILURE ;
142 std::unique_ptr<TFile>
g(TFile::Open(
filename.c_str(),
"READ"));
151 return StatusCode::SUCCESS;
156 return StatusCode::SUCCESS;
162 const std::vector<Iso::IsolationType>& cones,
172 #else // XAOD_ANALYSIS
194 ATH_MSG_WARNING(
"CaloCellIsolation only supported for Muons and Egamma");
197 #endif // not XAOD_ANALYSIS
202 const std::vector<Iso::IsolationType>& cones,
206 if ( cones.empty() ) {
232 ATH_MSG_WARNING(
"CaloTopoClusterIsolation only supported for TrackParticles and Egamma");
240 const std::vector<Iso::IsolationType>& cones,
265 ATH_MSG_WARNING(
"FlowElementIsolation only supported for Egamma and TrackParticle");
273 #ifndef XAOD_ANALYSIS
276 const std::vector<Iso::IsolationType>& isoTypes,
const CaloCorrection& corrlist
277 #ifndef XAOD_ANALYSIS
278 ,
double coneCoreSize
282 if( isoTypes.empty() ) {
287 unsigned int typesize = isoTypes.size();
294 #ifndef XAOD_ANALYSIS
300 ATH_MSG_WARNING(
"Unsupported isolation flavour passed, cannot calculate isolation " <<
301 static_cast<int>(theFlavour));
308 const std::vector<Iso::IsolationType>& isoTypes,
310 #ifndef XAOD_ANALYSIS
314 if( isoTypes.empty() ) {
319 unsigned int typesize = isoTypes.size();
322 std::vector<float> coneSizes;
323 coneSizes.resize(isoTypes.size());
324 for (
unsigned int is = 0; is < isoTypes.size(); is++)
331 #ifndef XAOD_ANALYSIS
337 ATH_MSG_WARNING(
"Unsupported isolation flavour passed, cannot calculate isolation " <<
static_cast<int>(theFlavour));
345 ATH_MSG_WARNING(
"Could not compute core cell energy for egamma in etcone");
360 const std::vector<Iso::IsolationType>& isoTypes,
363 double coneCoreSize)
const
366 if( isoTypes.empty() ) {
371 unsigned int typesize = isoTypes.size();
374 std::vector<float> coneSizes;
375 coneSizes.reserve(isoTypes.size());
377 for(
auto isoType : isoTypes ){
381 float phi =
eg.caloCluster()->phi();
382 float eta =
eg.caloCluster()->eta();
395 ATH_MSG_WARNING(
"Could not compute core cell energy for egamma in topoetcone");
402 ATH_MSG_WARNING(
"Could not apply pt correction to topoetcone isolation");
417 const std::vector<Iso::IsolationType>& isoTypes,
419 double coneCoreSize)
const
422 if( isoTypes.empty() ) {
427 ATH_MSG_WARNING(
"Only EM scale is supported by neutralEflowIsolation");
431 unsigned int typesize = isoTypes.size();
434 std::vector<float> coneSizes;
435 coneSizes.reserve(isoTypes.size());
437 for(
auto isoType : isoTypes ){
444 float phi =
eg.phi();
445 float eta =
eg.eta();
448 <<
" cluster eta, phi = " <<
eg.caloCluster()->eta() <<
" " <<
eg.caloCluster()->phi());
458 ATH_MSG_WARNING(
"Could not compute core cell energy for egamma in neflowisol");
469 std::string
type =
"PFlow";
482 const std::vector<Iso::IsolationType>& isoTypes,
488 if( isoTypes.empty() ) {
493 unsigned int typesize = isoTypes.size();
496 std::vector<float> coneSizes;
497 coneSizes.reserve(isoTypes.size());
499 for(
auto isoType : isoTypes ){
503 float phi =
tp.phi();
504 float eta =
tp.eta();
506 ATH_MSG_WARNING(
"TrackParticle eta = " <<
tp.eta() <<
", phi = " <<
tp.phi() <<
" not updated from extraplation!");
508 ATH_MSG_DEBUG(
"TrackParticle eta = " <<
tp.eta() <<
", phi = " <<
tp.phi() <<
", extrap eta = " <<
eta <<
", phi = " <<
phi);
519 ATH_MSG_WARNING(
"Could not compute muon core energy (cells) from neflowisol");
524 std::string
type =
"PFlow";
526 ATH_MSG_WARNING(
"Could not apply ED correction to eflow isolation for muon");
546 const Muon*
mu =
dynamic_cast<const Muon*
>(derefMap[
tp]);
548 const auto *cluster =
mu->cluster();
550 float etaT = 0, phiT = 0, dphiT = 0.;
555 if(!cluster->hasSampling(
s))
continue;
556 ATH_MSG_DEBUG(
"Sampling: " <<
i <<
"eta-phi (" << cluster->etaSample(
s) <<
", " << cluster->phiSample(
s) <<
")");
557 etaT += cluster->etaSample(
s);
559 phiT = cluster->phiSample(
s);
568 phi = phiT + dphiT/nSample;
578 #ifndef XAOD_ANALYSIS
583 std::unique_ptr<Trk::CaloExtension> caloExtensionUPtr;
589 caloExtension = caloExtensionUPtr.get();
594 if (!cache.isValid())
607 if(!intersections.empty()){
609 for (
unsigned int i = 0;
i < intersections.size(); ++
i){
612 <<
" eta-phi (" << point.eta() <<
", " << point.phi() <<
")");
615 avePoint = (1./intersections.size())*avePoint;
616 eta = avePoint.eta();
617 phi = avePoint.phi();
631 const std::vector<Iso::IsolationType>& isoTypes,
636 if( isoTypes.empty() ) {
641 unsigned int typesize = isoTypes.size();
643 std::vector<float> coneSizes;
644 coneSizes.reserve(isoTypes.size());
646 for(
auto isoType : isoTypes ){
650 float phi =
tp.phi();
651 float eta =
tp.eta();
653 ATH_MSG_DEBUG(
"TrackParticle eta = " <<
tp.eta() <<
", phi = " <<
tp.phi() <<
", extrap eta = " <<
eta <<
", phi = " <<
phi);
664 ATH_MSG_WARNING(
"Could not compute muon core energy (cells) from topoetcone");
675 #ifndef XAOD_ANALYSIS
678 const std::vector<Iso::IsolationType>& isoTypes,
690 std::vector<double> conesf;
691 double maxConeSize = -1;
692 for(
auto isoType : isoTypes ){
694 ATH_MSG_WARNING(
"Unsupported isolation type passed, cannot calculate isolation " <<
static_cast<int>(isoType));
698 conesf.push_back(cone);
699 if(cone>maxConeSize) maxConeSize = cone;
703 const double coreConeDR = coneCoreSize;
705 if(doCoreCone && maxConeSize<coreConeDR) maxConeSize = coreConeDR;
708 ATH_MSG_DEBUG(
"calculating etcone for # " << conesf.size() <<
" cones");
709 std::unique_ptr<const Rec::ParticleCellAssociation>
association=
m_assoTool->particleCellAssociation(
tp,maxConeSize,container);
711 ATH_MSG_DEBUG(
"failed to obtain the ParticleCellAssociation");
718 for(
unsigned int i=0;
i<conesf.size();
i++){
722 if( !
selector.select(*aCell) )
continue;
737 if( !
selector.select(*aCell) )
continue;
741 std::map<Iso::IsolationCorrectionParameter,float> corecorr;
750 ATH_MSG_DEBUG(
"Applying coreCone correction for trackParticle etcone isolation.");
751 for(
unsigned int i=0;
i<
result.etcones.size();++
i ) {
768 #ifndef XAOD_ANALYSIS
771 const std::vector<Iso::IsolationType>& isoTypes,
775 std::vector<double> conesf;
776 double maxConeSize = -1;
777 for(
auto isoType : isoTypes ){
779 ATH_MSG_WARNING(
"Unsupported isolation type passed, cannot calculate isolation " <<
static_cast<int>(isoType));
783 conesf.push_back(cone);
784 if(cone>maxConeSize) maxConeSize = cone;
787 const double coreConeDR = coneCoreSize;
789 if(doCoreCone && maxConeSize<coreConeDR) maxConeSize = coreConeDR;
791 if(!
muon.clusterLink().isValid()){
794 for(
unsigned int i=0;
i<conesf.size();
i++)
result.etcones[
i] = 0;
798 std::map<Iso::IsolationCorrectionParameter,float> corecorr;
806 ATH_MSG_DEBUG(
"Applying coreCone correction for trackParticle etcone isolation.");
807 for(
unsigned int i=0;
i<
result.etcones.size();++
i ) {
817 ATH_MSG_DEBUG(
"calculating etcone for # " << conesf.size() <<
" cones");
819 selector.preSelectAction(*muonCluster);
821 for(
unsigned int i=0;
i<conesf.size();
i++){
825 for(; cell_itr!=muonCluster->
end(); ++cell_itr){
826 if( !
selector.select(**cell_itr) )
continue;
828 totE += (*cell_itr)->
et();
840 for(; cell_itr!=muonCluster->
end(); ++cell_itr){
841 if( !
selector.select(**cell_itr) )
continue;
843 totE += (*cell_itr)->
et();
845 std::map<Iso::IsolationCorrectionParameter,float> corecorr;
854 ATH_MSG_DEBUG(
"Applying coreCone correction for trackParticle etcone isolation.");
855 for(
unsigned int i=0;
i<
result.etcones.size();++
i ) {
866 if(
muon.primaryTrackParticleLink().isValid() &&
muon.author()!=2)
tp = *
muon.primaryTrackParticleLink();
867 if( !
tp)
tp = *
muon.inDetTrackParticleLink();
875 #ifndef XAOD_ANALYSIS
878 const std::vector<Iso::IsolationType>& isoTypes,
880 if( isoTypes.empty() ) {
888 std::vector<float> coneSizes; coneSizes.resize(3);
889 std::vector<float> coneSizesSquared; coneSizesSquared.resize(3);
890 for (
unsigned int i = 0;
i < isoTypes.size();
i++) {
893 coneSizesSquared[
i] = dR*dR;
896 float phi =
eg.caloCluster()->phi();
897 float eta =
eg.caloCluster()->eta();
900 std::vector<CaloCell_ID::SUBCALO> Vec_EMCaloEnums;
904 CaloCellList EMccl(caloDDMgr,container, Vec_EMCaloEnums);
906 std::vector<CaloCell_ID::SUBCALO> Vec_HadCaloEnums;
910 CaloCellList HADccl(caloDDMgr,container, Vec_HadCaloEnums);
915 for (
unsigned int n=0;
n< coneSizes.size();
n++)
916 if (coneSizes[
n] > Rmax) Rmax = coneSizes[
n];
921 for (
const auto *
it: EMccl) {
922 double etacel=
it->eta();
923 double phicel=
it->phi();
925 double deleta =
eta-etacel;
927 double drcel2 = (deleta*deleta) + (delphi*delphi);
929 for (
unsigned int i = 0;
i < coneSizes.size();
i++) {
930 if (drcel2 < coneSizesSquared[
i])
939 for (
const auto *
it: HADccl) {
947 double etacel =
it->eta();
948 double phicel =
it->phi();
950 double deleta =
eta-etacel;
952 double drcel2 = (deleta*deleta) + (delphi*delphi);
954 for (
unsigned int i = 0;
i < coneSizes.size();
i++) {
955 if (drcel2 < coneSizesSquared[
i])
965 std::vector<float>& coneSizes,
970 double coneCoreSize)
const
974 auto max_cone_iter=std::max_element(coneSizes.begin(), coneSizes.end());
975 float max_cone= (*max_cone_iter);
976 std::vector<const CaloCluster*> clusts;
978 #ifndef XAOD_ANALYSIS
985 if(!particlesInCone(
eta,
phi,max_cone,clusts))
989 auto clItr = container->
begin();
990 auto clItrE = container->
end();
991 for(; clItr != clItrE; ++clItr){
992 clusts.push_back (*clItr);
1015 std::vector<float>& coneSizes,
1018 double coneCoreSize,
1019 const Egamma *egObj)
const
1023 auto max_cone_iter=std::max_element(coneSizes.begin(), coneSizes.end());
1024 float max_cone = (*max_cone_iter);
1025 std::vector<const FlowElement*> clusts;
1027 #ifndef XAOD_ANALYSIS
1037 auto clItr = container->
begin();
1038 auto clItrE = container->
end();
1039 for(; clItr != clItrE; ++clItr){
1040 clusts.push_back (*clItr);
1064 std::vector<float>& coneSizes,
1065 const std::vector<const CaloCluster*>& clusts)
const
1071 float et = (
m_useEMScale ?
cl->p4(CaloCluster::State::UNCALIBRATED).Et() :
cl->pt() );
1072 if(
et <= 0 || fabs(
cl->eta()) > 7.0)
continue;
1074 float st = 1./cosh(
cl->p4(CaloCluster::State::UNCALIBRATED).Eta());
1082 for (
unsigned int i = 0;
i < coneSizes.size();
i++) {
1083 if (
dr < coneSizes[
i]) {
1085 <<
" (calibrated " <<
cl->pt() <<
", tilegap et = " << tilegap3_et <<
")");
1098 std::vector<float>& coneSizes,
1099 const std::vector<const FlowElement*>& clusts)
const
1105 float et =
cl->pt();
1106 if (
et <= 0 || fabs(
cl->eta()) > 7.0)
continue;
1112 for (
unsigned int i = 0;
i < coneSizes.size();
i++) {
1113 if (dR < coneSizes[
i]) {
1124 const std::vector<Iso::IsolationType>& isoTypes,
1134 if ((gotIso && fabs(coreV) < 1
e-3) || !gotIso) {
1135 #ifndef XAOD_ANALYSIS
1138 float eraw57=0.,
eta=0.;
1141 double seedEta = cleg->
eta0(), seedPhi = cleg->
phi0();
1147 egcCloneFor57.get()).isSuccess())
1151 if(egcCloneFor57->size()==0){
1156 eraw57 = egcCloneFor57->
e();
1158 coreV = eraw57/cosh(
eta);
1159 ATH_MSG_DEBUG(
"Number of cells in 5x7 " << egcCloneFor57->size()
1160 <<
" seed eta,phi " << cleg->
eta0() <<
" " << cleg->
phi0()
1161 <<
" eraw = " << eraw57 <<
" etraw = " << coreV
1166 #endif // XAOD_ANALYSIS
1169 std::map<Iso::IsolationCorrectionParameter,float> corecorr;
1174 for (
unsigned int i = 0;
i < isoTypes.size();
i++){
1184 float dEtaMax_core,
float dPhiMax_core,
float dR2Max_core,
1185 const std::vector<const CaloCluster*>& clusts,
bool onlyEM,
1187 const Egamma* egObj)
const
1189 ATH_MSG_DEBUG(
"In CaloIsolationTool::correctIsolationEnergy_TopoCore");
1194 float areacore = -999.;
1195 if (fwdClus ==
nullptr) {
1196 if (dEtaMax_core>0 && dPhiMax_core>0) areacore = 4*dEtaMax_core*dPhiMax_core;
1197 else if (dR2Max_core>0) areacore =
M_PI*dR2Max_core;
1201 double topoCore(0.);
1203 topoCore = fwdClus->
p4(CaloCluster::State::UNCALIBRATED).Et();
1204 ATH_MSG_DEBUG(
"Including " << topoCore <<
" in the core transverse energy of the fwd electron");
1208 <<
" E " <<
cl->p4(CaloCluster::State::UNCALIBRATED).E()
1209 <<
" pt " <<
cl->p4(CaloCluster::State::UNCALIBRATED).Et()
1210 <<
" cal E " <<
cl->e());
1213 if(dEtaMax_core>0 && fabs(
dPhi) > dPhiMax_core)
continue;
1215 if(dPhiMax_core>0 && fabs(
dEta) > dEtaMax_core)
continue;
1220 float et = (
m_useEMScale ?
cl->p4(CaloCluster::State::UNCALIBRATED).Et() :
cl->pt() );
1221 if(
et <= 0 || fabs(
cl->eta()) > 7.0)
continue;
1226 if (fabs(ettg3) > 1)
1232 double eEM =
cl->energyBE(0)+
cl->energyBE(1)+
cl->energyBE(2)+
cl->energyBE(3);
1233 emfrac =
std::min(1., eEM /
cl->p4(CaloCluster::State::UNCALIBRATED).E());
1243 double topoCoreSC(0.);
1245 double topoCoreSCem = 0;
1248 for (
unsigned int ic = 0;
ic < assocClus.size();
ic++) {
1251 topoCoreSC +=
cl->p4(CaloCluster::State::UNCALIBRATED).Et();
1253 <<
" uncal pt = " <<
cl->p4(CaloCluster::State::UNCALIBRATED).Et()
1254 <<
" eta,phi = " <<
cl->eta() <<
" " <<
cl->phi()
1255 <<
" uncal eta,phi = " <<
cl->p4(CaloCluster::State::UNCALIBRATED).Eta()
1256 <<
" " <<
cl->p4(CaloCluster::State::UNCALIBRATED).Phi()
1257 <<
" nCells = " << cluster_size(
cl)
1262 topoCoreSCem -= ettg3;
1267 double eEM =
cl->energyBE(0)+
cl->energyBE(1)+
cl->energyBE(2)+
cl->energyBE(3);
1268 emfrac =
std::min(1., eEM /
cl->p4(CaloCluster::State::UNCALIBRATED).E());
1270 topoCoreSCem += emfrac*
cl->p4(CaloCluster::State::UNCALIBRATED).Et();
1276 ATH_MSG_DEBUG(
"Including " << topoCore <<
" only em, no tg3 " << topoCoreSCem <<
" calibrated " <<
test <<
" in the core transverse energy of the super cluster egamma object made of "
1277 << assocClus.size() <<
" clusters with corresponding pT = " << egObj->
pt()
1278 <<
" cluster pT = " << egObj->
caloCluster()->
pt() <<
" cluster un cal pT = "
1279 << egObj->
caloCluster()->
p4(CaloCluster::State::UNCALIBRATED).Et()
1280 <<
" nCells = " << cluster_size(egObj->
caloCluster())
1286 std::map<Iso::IsolationCorrectionParameter,float> corecorrSC;
1293 ATH_MSG_DEBUG(
"core energy, std = " << topoCore <<
" topo-assoc (full) = " << topoCoreSC <<
" topo-assoc (only em, no tg3) = " << topoCoreSCem);
1295 std::map<Iso::IsolationCorrectionParameter,float> corecorr;
1310 toSub = topoCoreSCem;
1318 for (
unsigned int i = 0;
i <
result.etcones.size();
i++){
1329 float detaMax,
float dphiMax,
1331 const std::vector<const FlowElement*>& clusts,
1332 bool onlyEM,
const Egamma* egObj)
const
1335 float pflowCore(0.);
1337 ATH_MSG_DEBUG(
"pflo: eta " <<
cl->eta() <<
" phi " <<
cl->phi() <<
" pt " <<
cl->pt() <<
" charge " <<
cl->charge());
1339 if (detaMax > 0 && fabs(dphi) > dphiMax)
continue;
1340 float deta =
cl->eta()-
eta;
1341 if (dphiMax > 0 && fabs(deta) > detaMax)
continue;
1342 if (dR2Max > 0 && dphi*dphi+deta*deta > dR2Max)
continue;
1345 float et =
cl->pt();
1346 if (
et <= 0 || fabs(
cl->eta()) > 7.0)
continue;
1360 ATH_MSG_DEBUG(
"pflow to be added to core: et = " <<
et <<
" (em frac = " << emfrac <<
"), total = " << pflowCore);
1364 float pflowCoreSC(0.);
1368 ATH_MSG_DEBUG(
"Number of associated neutral FE = " << fes.size());
1370 if (fe ==
nullptr) {
1374 ATH_MSG_DEBUG(
"asso pflo: eta " << fe->eta() <<
" phi " << fe->phi() <<
" pt " << fe->pt() <<
" charge " << fe->charge() <<
" index = " << fe->index());
1377 if (fe->index() ==
cl->index()) {
1384 ATH_MSG_DEBUG(
"asso pflo after vertex correction : eta " << afe->
eta() <<
" phi " << afe->
phi() <<
" pt " << afe->
pt());
1386 float et = afe->
pt();
1387 if (
et <= 0 || fabs(afe->
eta()) > 7.0)
continue;
1394 et -= allEne.at(17)/cosh(afe->
eta());
1398 for (
int i = 0;
i <= 7;
i++) eEM += allEne.at(
i);
1399 double eAll = fe->e();
1401 eAll -= allEne.at(17);
1408 ATH_MSG_DEBUG(
"asso pflow to be added to core " << fe <<
" et = " <<
et <<
" (em frac = " << emfrac <<
"), total = " << pflowCoreSC);
1410 std::map<Iso::IsolationCorrectionParameter,float> corecorrSC;
1417 float areacore = -999.;
1418 if (detaMax > 0 && dphiMax > 0) areacore = 4*detaMax*dphiMax;
1419 else if (dR2Max > 0) areacore =
M_PI*dR2Max;
1421 std::map<Iso::IsolationCorrectionParameter,float> corecorr;
1427 for (
unsigned int i = 0;
i <
result.etcones.size();
i++) {
1429 result.etcones[
i] -= pflowCore;
1442 ATH_MSG_DEBUG(
"in CaloIsolationTool::correctIsolationEnergy_MuonCore ");
1446 auto muI = derefMap.find(&
tp);
1448 if(muI!=derefMap.end()){
1451 ATH_MSG_WARNING(
"ET_Core of muon not found! coreMuon isolation correction will not be applied!!!");
1455 std::map<Iso::IsolationCorrectionParameter,float> corecorr;
1461 for(
unsigned int i=0;
i<
result.etcones.size();++
i ) {
1472 const std::vector<Iso::IsolationType>& isoTypes)
const
1478 std::vector<float> corrvec;
1479 corrvec.resize(isoTypes.size(),0.);
1480 for (
unsigned int i = 0;
i < isoTypes.size();
i++) {
1489 ATH_MSG_DEBUG(
"eta = " <<
eg.eta() <<
", phi = " <<
eg.phi() <<
", pt = " <<
eg.pt() <<
", isoType = " << Iso::toCString(isoTypes[
i])
1490 <<
", ptcorr = " << corrvec[
i] <<
", isol pt corrected = " <<
result.etcones[
i] );
1501 const std::vector<Iso::IsolationType>& isoTypes,
1503 const std::string&
type,
1507 std::vector<float> corrvec;
1508 corrvec.resize(isoTypes.size(),0.);
1512 if (
type ==
"PFlow") {
1514 }
else if (fwdClus !=
nullptr) {
1515 ATH_MSG_DEBUG(
"No pileup correction for forward electron isolation yet");
1530 ATH_MSG_WARNING(
"Cannot retrieve density " << esKey->
key() <<
" for isolation correction. No ED correction");
1536 std::map<xAOD::Iso::IsolationCorrectionParameter,float>
ecore;
1546 if (iter !=
ecore.end())
1549 for (
unsigned int i = 0;
i < isoTypes.size();
i++) {
1551 float toSub =
rho*(dR*dR*
M_PI - areacore);
1554 double areaCorr = 0;
1557 areaCorr = puZeta->second->Eval(std::abs(
eta));
1559 ATH_MSG_WARNING(
"Requested refined eta dependent pileup correction but no zeta correction provided " << Iso::toCString(isoTypes.at(
i)));
1564 areaCorr -= puZetaMC->second->Eval(std::abs(
eta));
1566 ATH_MSG_WARNING(
"Requested refined eta dependent pileup correction for mc but no zeta correction provided " << Iso::toCString(isoTypes.at(
i)));
1575 ATH_MSG_DEBUG(
"ED correction ("<<
type <<
")for size " << dR <<
" = " << toSub <<
" (areacore=" << areacore <<
")");
1584 unsigned int typesize) {
1586 result.corrlist = corrlist;
1587 result.coreCorrections.clear();
1588 result.noncoreCorrections.clear();
1589 result.etcones.resize(typesize,0.);
1601 if(
muon->primaryTrackParticleLink().isValid() &&
muon->author()!=2)
tp = *
muon->primaryTrackParticleLink();
1602 if( !
tp)
tp = *
muon->inDetTrackParticleLink();
1613 #ifdef XAOD_ANALYSIS // particlesInCone tool will not be avaible. Write our own...
1614 bool CaloIsolationTool::particlesInCone(
float eta,
float phi,
float dr, std::vector<const CaloCluster*>&
output )
const {
1617 std::string m_caloClusterLocation =
"CaloCalTopoClusters";
1618 if(
evtStore()->
retrieve(caloClusters, m_caloClusterLocation).isFailure()) {
1619 ATH_MSG_FATAL(
"Unable to retrieve " << m_caloClusterLocation );
1623 const float m_minPt = 1
e-3;
1626 for(
auto trk: *caloClusters){
1627 if(trk->pt()<m_minPt)
continue;
1637 bool CaloIsolationTool::particlesInCone(
float eta,
float phi,
float dr, std::vector<const FlowElement*>&
output )
const{
1640 std::string m_ClusterLocation =
"JetETMissNeutralParticleFlowObjects";
1646 const float m_minPt = 1
e-3;
1649 for(
auto trk: *Clusters){
1650 if(trk->pt()<m_minPt)
continue;
1659 #endif // XAOD_ANALYSIS