ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CP::IsolationCloseByCorrectionTool Class Reference

#include <IsolationCloseByCorrectionTool.h>

Inheritance diagram for CP::IsolationCloseByCorrectionTool:
Collaboration diagram for CP::IsolationCloseByCorrectionTool:

Classes

struct  ObjectCache
 

Public Types

enum  TopoConeCorrectionModel { SubtractObjectsDirectly = -1, UseAveragedDecorators = 0 }
 
using caloDecorNames = std::array< std::string, 4 >
 
using IsoHelperMap = std::map< IsoType, std::unique_ptr< IsoVariableHelper > >
 
using PrimaryCollection = std::set< const xAOD::IParticle * >
 Helper struct to collect all relevant objects for the procedure. More...
 

Public Member Functions

 IsolationCloseByCorrectionTool (const std::string &name)
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual CorrectionCode getCloseByCorrection (std::vector< float > &corrections, const xAOD::IParticle &par, const std::vector< xAOD::Iso::IsolationType > &types, const xAOD::IParticleContainer &closePar) const override
 
virtual asg::AcceptData acceptCorrected (const xAOD::IParticle &x, const xAOD::IParticleContainer &closePar) const override
 
virtual CorrectionCode getCloseByIsoCorrection (const EventContext &ctx, const xAOD::ElectronContainer *Electrons, const xAOD::MuonContainer *Muons, const xAOD::PhotonContainer *Photons) const override
 
virtual float getOriginalIsolation (const xAOD::IParticle &P, IsoType type) const override
 
virtual float getOriginalIsolation (const xAOD::IParticle *particle, IsoType type) const override
 
TrackSet getTrackCandidates (const EventContext &ctx, const xAOD::IParticle *particle) const override
 Load all TrackParticles associated with the particles in the Container. The particles have to pass the selection decoration flag. More...
 
const xAOD::IParticleisoRefParticle (const xAOD::IParticle *particle) const override
 Retrieve the reference particle to define the cone axis in which the track particles contributing to the isolation have to be. More...
 
void associateCluster (const xAOD::IParticle *particle, float &eta, float &phi, float &energy) const override
 Retrieve the associated clusters from the Particle and calculate the average eta/phi/energy. More...
 
void associateFlowElement (const EventContext &ctx, const xAOD::IParticle *particle, float &eta, float &phi, float &energy) const override
 
void getExtrapEtaPhi (const xAOD::IParticle *particlear, float &eta, float &phi) const
 
void loadPrimaryParticles (const xAOD::IParticleContainer *container, ObjectCache &cache) const
 Filter all electrons/muons/photons from the collection which pass the selection decoration. More...
 
void loadAssociatedObjects (const EventContext &ctx, ObjectCache &cache) const
 Load all associated tracks / clusters / flow elements into the cache. More...
 
bool isSame (const xAOD::IParticle *particle, const xAOD::IParticle *particle1) const
 
bool overlap (const xAOD::IParticle *particle, const xAOD::IParticle *particle1, float dR) const
 
float deltaR2 (const xAOD::IParticle *particle, const xAOD::IParticle *particle1, bool AvgCalo=false) const
 
const xAOD::VertexretrieveIDBestPrimaryVertex (const EventContext &ctx) const
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const caloDecorNamescaloDecors ()
 Returns an array with the calo cluster decoration names [0]-> eta, [1]->phi, [2]->energy. [3]->isDecorated. More...
 
static const caloDecorNamespflowDecors ()
 
static bool isFixedTrackIso (xAOD::Iso::IsolationType type)
 
static bool isVarTrackIso (xAOD::Iso::IsolationType type)
 
static bool isFixedTrackIsoTTVA (xAOD::Iso::IsolationType type)
 
static bool isVarTrackIsoTTVA (xAOD::Iso::IsolationType Iso)
 
static bool isTrackIso (xAOD::Iso::IsolationType type)
 
static bool isTrackIsoTTVA (xAOD::Iso::IsolationType type)
 
static float trackPtCut (xAOD::Iso::IsolationType type)
 
static bool isTopoEtIso (xAOD::Iso::IsolationType type)
 
static bool isPFlowIso (xAOD::Iso::IsolationType type)
 
static bool isEgamma (const xAOD::IParticle *particle)
 
static float clusterEtMinusTile (const xAOD::CaloCluster *C)
 
static std::string particleName (const xAOD::IParticle *C)
 
static std::string particleName (xAOD::Type::ObjectType T)
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void isoTypesFromWP (const std::vector< std::unique_ptr< IsolationWP >> &WP, IsoVector &types)
 Helper function to load all Isolation types from the iso working points. More...
 
TrackSet getAssociatedTracks (const xAOD::IParticle *P) const
 Retrieve all Inner detector tracks associated with the primary particle. More...
 
TrackSet getAssociatedTracks (const xAOD::IParticle *P, const xAOD::Vertex *vtx) const
 Retrieve the subset of tracks passing the isolation selection. More...
 
void getAssocFlowElements (const EventContext &ctx, ObjectCache &cache) const
 Retrieve all Flow elements associated with the particles in the cache. More...
 
CorrectionCode performCloseByCorrection (const EventContext &ctx, ObjectCache &cache) const
 
void lockDecorations (const xAOD::IParticleContainer *parts) const
 
const IsoVectorgetIsolationTypes (const xAOD::IParticle *particle) const
 
CorrectionCode subtractCloseByContribution (const EventContext &ctx, const xAOD::IParticle *P, ObjectCache &cache) const
 
CorrectionCode getCloseByCorrectionTrackIso (const xAOD::IParticle *primary, const IsoType type, const ObjectCache &cache, float &isoValue) const
 
CorrectionCode getCloseByCorrectionTopoIso (const EventContext &ctx, const xAOD::IParticle *primary, const IsoType type, ObjectCache &cache, float &isoValue) const
 
CorrectionCode getCloseByCorrectionPflowIso (const EventContext &ctx, const xAOD::IParticle *primary, const IsoType type, const ObjectCache &cache, float &isoValue) const
 
CorrectionCode copyIsoValuesForPartsNotSelected (const xAOD::IParticle *part) const
 
ClusterSet getAssociatedClusters (const EventContext &ctx, const xAOD::IParticle *particle, ObjectCache &cache) const
 Loads the topo clusters associated with the primary IParticle. More...
 
PflowSet getAssocFlowElements (const EventContext &ctx, const xAOD::IParticle *particle) const
 Loads the pflow elements associated with the primary IParticle. More...
 
bool getExtrapEtaPhi (const EventContext &ctx, const xAOD::TrackParticle *tp, float &eta, float &phi) const
 helper to get eta,phi of muon extrap More...
 
float coneSize (const xAOD::IParticle *particle, IsoType Cone) const
 
float unCalibPt (const xAOD::IParticle *particle) const
 
bool passSelectionQuality (const xAOD::IParticle *particle) const
 
bool passFirstStage (const xAOD::TrackParticle *trk, const xAOD::Vertex *vtx) const
 The Track particle has to pass the Track selection tool and the TTVA selection. More...
 
void printIsolationCones (const IsoVector &types, xAOD::Type::ObjectType T) const
 
void declareDependency (const std::vector< std::string > &containers, const IsoVector &types)
 Helper function to declare the data dependencies. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ToolHandle< InDet::IInDetTrackSelectionToolm_trkselTool
 
ToolHandle< CP::ITrackVertexAssociationToolm_ttvaTool
 
ToolHandle< CP::IIsolationSelectionToolm_selectorTool
 
Gaudi::Property< std::string > m_quality_name
 
Gaudi::Property< std::string > m_passOR_name
 
Gaudi::Property< std::string > m_isoSelection_name {this, "IsolationSelectionDecorator", "", "Name of the final isolation decorator."}
 
Gaudi::Property< std::string > m_backup_prefix
 
Gaudi::Property< std::string > m_isoDecSuffix
 
Gaudi::Property< std::string > m_caloDecSuffix
 
Gaudi::Property< int > m_caloModel {this, "CaloCorrectionModel", TopoConeCorrectionModel::SubtractObjectsDirectly}
 EXPERT PROPERTIES. More...
 
Gaudi::Property< float > m_coreConeEl
 
Gaudi::Property< float > m_coreConeMu {this, "CoreConeMuons", 0.05, "This is the size of the core cone for the topoetcone variables."}
 
Gaudi::Property< float > m_ptvarconeRadius {this, "PtvarconeRadius", 1.e4, "This is the kT parameter for the ptvarcone variables."}
 
Gaudi::Property< float > m_maxTopoPolution
 
Gaudi::Property< float > m_ConeSizeVariation
 
Gaudi::Property< bool > m_declareCaloDecors {this, "declareCaloDecors", false, "If set to true, the data dependency on the calo/pflow decors will be declared"}
 
Gaudi::Property< std::vector< std::string > > m_elecKeys
 Declare the data dependencies of the Input containers. More...
 
Gaudi::Property< std::vector< std::string > > m_muonKeys
 
Gaudi::Property< std::vector< std::string > > m_photKeys
 
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainerm_isoVarKeys
 
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainerm_isoWriteDecVarKeys
 
ToolHandle< Trk::IParticleCaloExtensionToolm_caloExtTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"}
 calo extension tool for muon track particle extrapolation to calo More...
 
SG::ReadHandleKey< xAOD::VertexContainerm_VtxKey
 
SG::ReadHandleKey< xAOD::CaloClusterContainerm_CaloClusterKey
 
SG::ReadHandleKey< xAOD::FlowElementContainerm_PflowKey
 
IsoVector m_muon_isoTypes {}
 Isolation variables used by the muon working point. More...
 
IsoVector m_electron_isoTypes {}
 Isolation variables used by the electron working point. More...
 
IsoVector m_photon_isoTypes {}
 Isolation variables used by the photon working point. More...
 
bool m_has_nonTTVA {false}
 Switch whether a pile-up non robust TTVA working point is defined. More...
 
bool m_hasPflowIso {false}
 Switch whether a pflow isolation working point is defined. More...
 
bool m_hasEtConeIso {false}
 Switch whether a topoetcone isolation working point is defined. More...
 
bool m_isInitialised {false}
 
SelectionAccessor m_acc_quality {nullptr}
 
SelectionAccessor m_acc_passOR {nullptr}
 
SelectionDecorator m_dec_isoselection {nullptr}
 
IsoHelperMap m_isohelpers ATLAS_THREAD_SAFE
 
std::mutex m_isoHelpersMutex ATLAS_THREAD_SAFE
 Mutex to protect the map if the method with signature getCloseByCorrection(std::vector<float>& corrections, const xAOD::IParticle& par, const std::vector<xAOD::Iso::IsolationType>& types, const xAOD::IParticleContainer& closePar) is called. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 37 of file IsolationCloseByCorrectionTool.h.

Member Typedef Documentation

◆ caloDecorNames

using CP::IsolationCloseByCorrectionTool::caloDecorNames = std::array<std::string, 4>

Definition at line 45 of file IsolationCloseByCorrectionTool.h.

◆ IsoHelperMap

Definition at line 50 of file IsolationCloseByCorrectionTool.h.

◆ PrimaryCollection

Helper struct to collect all relevant objects for the procedure.

Definition at line 84 of file IsolationCloseByCorrectionTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TopoConeCorrectionModel

Enumerator
SubtractObjectsDirectly 
UseAveragedDecorators 

Definition at line 39 of file IsolationCloseByCorrectionTool.h.

39  {
42 
43  };

Constructor & Destructor Documentation

◆ IsolationCloseByCorrectionTool()

CP::IsolationCloseByCorrectionTool::IsolationCloseByCorrectionTool ( const std::string &  name)

Definition at line 40 of file IsolationCloseByCorrectionTool.cxx.

40 : asg::AsgTool(toolName) {}

Member Function Documentation

◆ acceptCorrected()

asg::AcceptData CP::IsolationCloseByCorrectionTool::acceptCorrected ( const xAOD::IParticle x,
const xAOD::IParticleContainer closePar 
) const
overridevirtual

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 922 of file IsolationCloseByCorrectionTool.cxx.

923  {
924  if (!m_isInitialised) { ATH_MSG_WARNING("The IsolationCloseByCorrectionTool was not initialised!!!"); }
925  assert(!m_selectorTool.empty());
926  const IsoVector& iso_types = getIsolationTypes(&x);
927  if (iso_types.empty()) {
928  // TODO: figure out if this is actually a valid situation
929  // or if we should just fail at this point.
930  ATH_MSG_WARNING("Could not cast particle for acceptCorrected. Will return false.");
931  static const asg::AcceptInfo dummyAcceptInfo = []() {
933  info.addCut("castCut", "whether we managed to cast to a known type");
934  return info;
935  }();
936  if (m_dec_isoselection) (*m_dec_isoselection)(x) = false;
937  return asg::AcceptData(&dummyAcceptInfo);
938  }
939 
940  if (closePar.empty()) return m_selectorTool->accept(x);
941  strObj strPar;
942  strPar.isolationValues.resize(numIsolationTypes);
943  strPar.pt = x.pt();
944  strPar.eta = x.eta();
945  strPar.type = x.type();
946  std::vector<float> corrections;
947  if (getCloseByCorrection(corrections, x, iso_types, closePar) == CorrectionCode::Error) {
948  ATH_MSG_WARNING("Could not calculate the corrections. acceptCorrected(x) is done without the corrections.");
949  if (m_dec_isoselection) (*m_dec_isoselection)(x) = bool(m_selectorTool->accept(x));
950  return m_selectorTool->accept(x);
951  }
952  for (unsigned int i = 0; i < iso_types.size(); ++i) {
953  strPar.isolationValues[iso_types[i]] = corrections[i];
955  float old = (*acc)(x);
956  ATH_MSG_DEBUG("Correcting " << toString(iso_types.at(i)) << " from " << old << " to " << corrections[i]);
957  }
958  auto accept = m_selectorTool->accept(strPar);
959  if (m_dec_isoselection) (*m_dec_isoselection)(x) = bool(accept);
960  return accept;
961  }

◆ associateCluster()

void CP::IsolationCloseByCorrectionTool::associateCluster ( const xAOD::IParticle particle,
float &  eta,
float &  phi,
float &  energy 
) const
overridevirtual

Retrieve the associated clusters from the Particle and calculate the average eta/phi/energy.

Remove super low energy clusters

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 854 of file IsolationCloseByCorrectionTool.cxx.

854  {
855  phi = particle->phi();
856  eta = particle->eta();
857  energy = -1.;
858  if (particle->type() == xAOD::Type::ObjectType::Muon) {
859  const xAOD::Muon* mu = static_cast<const xAOD::Muon*>(particle);
860  const xAOD::CaloCluster* cluster = mu->cluster();
861  if (!cluster) return;
862  energy = cluster->e();
863  // At the moment no cluster associated with muons is in the derivations
864  int nSample{0};
865  float etaT{0.f}, phiT{0.f}, dphiT{0.f};
866 
867  for (unsigned int i = 0; i < CaloSampling::Unknown; ++i) {
869  if (cluster->hasSampling(s)) {
870  ATH_MSG_VERBOSE("Sampling: " << i << "eta-phi (" << cluster->etaSample(s) << ", " << cluster->phiSample(s) << ")");
871  etaT += cluster->etaSample(s);
872  if (!nSample)
873  phiT = cluster->phiSample(s);
874  else
875  dphiT += xAOD::P4Helpers::deltaPhi(cluster->phiSample(s), phiT);
876  ++nSample;
877  }
878  }
879  if (!nSample) return;
880  ATH_MSG_DEBUG("Eta, phi before sampling: " << eta << ", " << phi << " and after sampling: " << etaT / nSample << ", "
881  << phiT / nSample);
882  phi = xAOD::P4Helpers::deltaPhi(phiT + dphiT / nSample, 0);
883  eta = etaT / nSample;
884  ATH_MSG_VERBOSE("associateCluster: mu with pt: " << mu->pt() * MeVtoGeV << " GeV, eta: "
885  << mu->eta() << ", phi: " << mu->phi() << " energy, eta, phi " << energy << ", " << eta << ", " << phi
886  << ", et " << energy * mu->pt() / mu->e());
887  }
888  if (!isEgamma(particle)) return;
889  const xAOD::Egamma* egamm = static_cast<const xAOD::Egamma*>(particle);
890  eta = phi = energy = 0.;
891  for (unsigned int cl = 0; cl < egamm->nCaloClusters(); ++cl) {
892  const xAOD::CaloCluster* prim_cluster = egamm->caloCluster(cl);
893  if (!prim_cluster) {
894  ATH_MSG_DEBUG("Cluster " << cl << " is not defined " << egamm);
895  continue;
896  }
897  std::vector<const xAOD::CaloCluster*> constituents = xAOD::EgammaHelpers::getAssociatedTopoClusters(prim_cluster);
898  for (const xAOD::CaloCluster* cluster : constituents) {
899  if (!cluster) continue;
900  const float clus_e = clusterEtMinusTile(cluster);
902  if (clus_e < MinClusterEnergy) continue;
903  eta += cluster->eta() * clus_e;
904  phi += cluster->phi() * clus_e;
905  energy += clus_e;
906  ATH_MSG_VERBOSE("associateCluster: eg add in clus with e: " << clus_e * MeVtoGeV << " clus et " << cluster->pt() * MeVtoGeV << " GeV, eta: "
907  << cluster->eta() << ", phi: " << cluster->phi());
908  }
909  }
910  if (energy >= MinClusterEnergy) {
911  phi = xAOD::P4Helpers::deltaPhi(phi / energy, 0.);
912  eta /= energy;
913  ATH_MSG_VERBOSE("associateCluster: eg with pt: " << egamm->pt() * MeVtoGeV << " GeV, eta: "
914  << egamm->eta() << ", phi: " << egamm->phi() << " energy, eta, phi " << energy << ", " << eta << ", " << phi );
915  } else {
916  ATH_MSG_DEBUG("Average energy from the clusters is too low " << energy << " copy particle properties");
917  eta = egamm->eta();
918  phi = egamm->phi();
919  energy = egamm->e();
920  }
921  }

◆ associateFlowElement()

void CP::IsolationCloseByCorrectionTool::associateFlowElement ( const EventContext &  ctx,
const xAOD::IParticle particle,
float &  eta,
float &  phi,
float &  energy 
) const
overridevirtual

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 830 of file IsolationCloseByCorrectionTool.cxx.

831  {
832  phi = eta = energy = 0.;
833  PflowSet flowCollection = getAssocFlowElements(ctx, particle);
834  if (flowCollection.empty()) {
835  phi = particle->phi();
836  eta = particle->eta();
837  return;
838  }
839  for (const FlowElementPtr& ele : flowCollection) {
840  const float flow_energy = ele->e() * ele.weight;
841  if (flow_energy < MinClusterEnergy) continue;
842  phi += ele->phi() * flow_energy;
843  eta += ele->eta() * flow_energy;
844  energy += flow_energy;
845  }
846  if (energy < MinClusterEnergy) {
847  phi = particle->phi();
848  eta = particle->eta();
849  return;
850  }
851  phi = xAOD::P4Helpers::deltaPhi(phi / energy, 0.);
852  eta /= energy;
853  }

◆ caloDecors()

const caloDecorNames & CP::IsolationCloseByCorrectionTool::caloDecors ( )
static

Returns an array with the calo cluster decoration names [0]-> eta, [1]->phi, [2]->energy. [3]->isDecorated.

Definition at line 25 of file IsolationCloseByCorrectionTool.cxx.

25  {
26  static const caloDecorNames names =
27  {"IsoCloseByCorr_assocClustEta", "IsoCloseByCorr_assocClustPhi", "IsoCloseByCorr_assocClustEnergy",
28  "IsoCloseByCorr_assocClustDecor"};
29  return names;
30  }

◆ clusterEtMinusTile()

float CP::IsolationCloseByCorrectionTool::clusterEtMinusTile ( const xAOD::CaloCluster C)
static

Definition at line 1052 of file IsolationCloseByCorrectionTool.cxx.

1052  {
1053  float Et{0.f};
1054  if (cluster) {
1055  try {
1056  Et = cluster->p4(xAOD::CaloCluster::State::UNCALIBRATED).Et();
1057  Et = Et - cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap3) /
1058  std::cosh(cluster->p4(xAOD::CaloCluster::State::UNCALIBRATED).Eta());
1059  } catch (...) { Et = cluster->p4().Et(); }
1060  }
1061  return std::max(Et, 0.f);
1062  }

◆ coneSize()

float CP::IsolationCloseByCorrectionTool::coneSize ( const xAOD::IParticle particle,
IsoType  Cone 
) const
private

Definition at line 978 of file IsolationCloseByCorrectionTool.cxx.

978  {
979  using xAOD::Iso::coneSize;
980  float ConeDR = coneSize(Cone);
981  if (isVarTrackIso(Cone) || isVarTrackIsoTTVA(Cone)) {
982  const xAOD::IParticle* Reference = isoRefParticle(P);
983  float MiniIso = m_ptvarconeRadius / unCalibPt(Reference);
984  if (MiniIso < ConeDR) return MiniIso;
985  }
986  return ConeDR;
987  }

◆ copyIsoValuesForPartsNotSelected()

CorrectionCode CP::IsolationCloseByCorrectionTool::copyIsoValuesForPartsNotSelected ( const xAOD::IParticle part) const
private

Definition at line 409 of file IsolationCloseByCorrectionTool.cxx.

409  {
411 
412  ATH_MSG_DEBUG("copyIsoValuesForPartsNotSelected " << part->type() << " " << part->pt() * MeVtoGeV << " GeV" << " eta: " << part->eta() << " phi: " << part->phi());
413 
414  if (types.empty()) {
415  ATH_MSG_WARNING("No isolation types are defiend for " << particleName(part));
417  }
418  for (const IsolationType iso_type : types) {
419  float iso_variable{0.f};
420  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
421  if (m_isohelpers.at(iso_type)->getIsolation(part, iso_variable) == CorrectionCode::Error) {
422  ATH_MSG_ERROR("Cannot get value for " << toString(iso_type));
423  return CorrectionCode::Error;
424  }
425  ATH_MSG_DEBUG("copyIsoValuesForPartsNotSelected: Set pt, eta " << part->pt() << ", " << part->eta() << ", " << part->phi() << " for " << toString(iso_type) << " to " << iso_variable);
426  if (m_isohelpers.at(iso_type)->setIsolation(part, iso_variable) == CorrectionCode::Error) {
427  ATH_MSG_ERROR("Cannot set " << toString(iso_type) << " to " << iso_variable);
428  return CorrectionCode::Error;
429  }
430  }
431  return CorrectionCode::Ok;
432  }

◆ declareDependency()

void CP::IsolationCloseByCorrectionTool::declareDependency ( const std::vector< std::string > &  containers,
const IsoVector types 
)
private

Helper function to declare the data dependencies.

Definition at line 123 of file IsolationCloseByCorrectionTool.cxx.

123  {
124  for (const std::string& cont : containers) {
125  for (const IsoType iso : types) {
126  // define read accessor iso variable keys
127  m_isoVarKeys.emplace_back(cont + "." + std::string(toString(iso)));
128  // define write decorator iso variable keys - needed for MT, but we do not use handles for writing the decorators in isoHelpers
129  m_isoWriteDecVarKeys.emplace_back(cont + "." + std::string(toString(iso) + (m_isoDecSuffix.empty() ? "" : "_") + m_isoDecSuffix));
130  }
131  if (!m_declareCaloDecors && m_caloModel == TopoConeCorrectionModel::SubtractObjectsDirectly) continue;
133  for (const std::string& decor : pflowDecors()) m_isoVarKeys.emplace_back(cont + "." + decor);
134  }
136  for (const std::string& decor : caloDecors()) m_isoVarKeys.emplace_back(cont + "." + decor + m_caloDecSuffix);
137  }
138  }
139  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ deltaR2()

float CP::IsolationCloseByCorrectionTool::deltaR2 ( const xAOD::IParticle particle,
const xAOD::IParticle particle1,
bool  AvgCalo = false 
) const

Definition at line 1022 of file IsolationCloseByCorrectionTool.cxx.

1022  {
1023  if (isSame(P, P1)) return 0.;
1024  // Check if one of the objects is a CaloCluster or the Averaging over the clusters is requested.
1025  if (AvgCalo || (P->type() != P1->type() &&
1027  float phi1{0.f}, eta1{0.f}, eta2{0.f}, phi2{0.f};
1028  getExtrapEtaPhi(P, eta1, phi1);
1029  getExtrapEtaPhi(P1, eta2, phi2);
1030  return xAOD::P4Helpers::deltaR2(eta1, phi1, eta2, phi2);
1031  }
1032  float dPhi = xAOD::P4Helpers::deltaPhi(P, P1);
1033  float dEta = P->eta() - P1->eta();
1034  return dEta * dEta + dPhi * dPhi;
1035  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getAssocFlowElements() [1/2]

PflowSet CP::IsolationCloseByCorrectionTool::getAssocFlowElements ( const EventContext &  ctx,
const xAOD::IParticle particle 
) const
private

Loads the pflow elements associated with the primary IParticle.

Definition at line 184 of file IsolationCloseByCorrectionTool.cxx.

184  {
185  ObjectCache cache{};
186  cache.prim_parts = {particle};
187  loadAssociatedObjects(ctx, cache);
188  return cache.flows;
189  }

◆ getAssocFlowElements() [2/2]

void CP::IsolationCloseByCorrectionTool::getAssocFlowElements ( const EventContext &  ctx,
ObjectCache cache 
) const
private

Retrieve all Flow elements associated with the particles in the cache.

Definition at line 191 of file IsolationCloseByCorrectionTool.cxx.

191  {
192  if (m_PflowKey.empty()) return;
194  if (!readHandle.isValid()) return;
195  std::set<const xAOD::IParticle*> tombola{};
196  for (const xAOD::IParticle* p : cache.prim_parts) tombola.insert(p);
197  for (const TrackPtr& p : cache.tracks) tombola.insert(p);
198  for (const CaloClusterPtr& p : cache.clusters) tombola.insert(p);
199 
200  for (const xAOD::FlowElement* flow : *readHandle) {
201  if (!flow) continue;
202  for (size_t ch = 0; ch < flow->nChargedObjects(); ++ch) {
203  const xAOD::IParticle* obj = flow->chargedObject(ch);
204  if (tombola.count(obj)) {
205  const std::vector<float>& weights = flow->chargedObjectWeights();
206  cache.flows.emplace(flow, ch < weights.size() ? weights[ch] : 1.f);
207  }
208  }
209  for (size_t ne = 0; ne < flow->nOtherObjects(); ++ne) {
210  const xAOD::IParticle* obj = flow->otherObject(ne);
211  if (tombola.count(obj)) {
212  const std::vector<float>& weights = flow->otherObjectWeights();
213  cache.flows.emplace(flow, ne < weights.size() ? weights[ne] : 1.f);
214  ATH_MSG_VERBOSE("getAssocFlowElements: neflow " << ne << ", " << obj->type() << ", " << obj->pt() << ", " << obj->eta() << ", " << obj->phi() << ", " << flow->pt() << ", " << flow->eta() << ", " << flow->phi());
215  }
216  }
217  }
218  }

◆ getAssociatedClusters()

ClusterSet CP::IsolationCloseByCorrectionTool::getAssociatedClusters ( const EventContext &  ctx,
const xAOD::IParticle particle,
ObjectCache cache 
) const
private

Loads the topo clusters associated with the primary IParticle.

Definition at line 533 of file IsolationCloseByCorrectionTool.cxx.

534  {
535  // Remember topoclusters which are associated to an egamma object, electron or photon
536  // This will be used to avoid associating the same object to a muon
538  if (isEgamma(P)) {
539  const xAOD::Egamma* egamm = static_cast<const xAOD::Egamma*>(P);
540  for (size_t calo = 0; calo < egamm->nCaloClusters(); ++calo) {
541  const xAOD::CaloCluster* clust = egamm->caloCluster(calo);
542  if (!clust) continue;
543  std::vector<const xAOD::CaloCluster*> constituents = xAOD::EgammaHelpers::getAssociatedTopoClusters(clust);
544  for (const xAOD::CaloCluster* cluster : constituents) {
545  if (cluster && std::abs(cluster->eta()) < 7. && cluster->e() > MinClusterEnergy) {
546  clusters.emplace(cluster);
547  cache.eg_associated_clusters.insert(cluster); // set flag that this cluster is associated to an electron or photon
548  ATH_MSG_VERBOSE("getAssociatedClusters: " << P->type() << " has topo cluster with pt: " << cluster->pt() * MeVtoGeV << " GeV, eta: "
549  << cluster->eta() << ", phi: " << cluster->phi());
550  }
551  }
552  }
553  if (clusters.size()) return clusters;
554  }
555  if (m_CaloClusterKey.empty()) return clusters;
557  if (!topoClusters.isValid()) return clusters;
558 
559  if (P->type() == xAOD::Type::ObjectType::Muon) {
560  const xAOD::Muon* mu = static_cast<const xAOD::Muon*>(P);
561  const xAOD::CaloCluster* cl = mu->cluster();
562  bool foundMuonTopo = false;
563  if (cl) {
564  ATH_MSG_VERBOSE("getAssociatedClusters: muon has cluster with pt: " << cl->pt() * MeVtoGeV << " GeV, eta: "
565  << cl->eta() << ", phi: " << cl->phi());
566  std::vector<const xAOD::CaloCluster*> constituents = xAOD::EgammaHelpers::getAssociatedTopoClusters(cl);
567  for (const xAOD::CaloCluster* cluster : constituents) {
568  if (cluster && std::abs(cluster->eta()) < 7. && cluster->e() > MinClusterEnergy) {
569  // skip association if this cluster is already associated with an electron or photon - priority is given to egamma reco
570  if (!cache.eg_associated_clusters.contains(cluster)) {
571  clusters.emplace(cluster);
572  foundMuonTopo = true;
573  ATH_MSG_VERBOSE("getAssociatedClusters: muon has topo cluster with pt: " << cluster->pt() * MeVtoGeV << " GeV, eta: "
574  << cluster->eta() << ", phi: " << cluster->phi());
575  }
576  else {
577  ATH_MSG_VERBOSE("getAssociatedClusters: muon topo cluster already associated with an EG objet - cluster with pt: "
578  << cluster->pt() * MeVtoGeV << " GeV, eta: " << cluster->eta() << ", phi: " << cluster->phi());
579  }
580  }
581  }
582  }
583  if (!foundMuonTopo) {
584 #ifndef XAOD_ANALYSIS
585  // extraploate muon to calo and look for matching topo cluster
586  const xAOD::TrackParticle* tp = mu->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
587  if (tp) {
588  ATH_MSG_VERBOSE("getAssociatedClusters: found mu tp " << " with pt: " << tp->pt() * MeVtoGeV << " GeV, eta: " << tp->eta() << ", phi: " << tp->phi());
589  float tpEtaAtCalo;
590  float tpPhiAtCalo;
591  if (getExtrapEtaPhi(ctx, tp, tpEtaAtCalo, tpPhiAtCalo)) {
592  ATH_MSG_VERBOSE("getAssociatedClusters: tp extrapolated - tpEtaAtCalo " << tpEtaAtCalo << ", tpPhiAtCalo " << tpPhiAtCalo);
593  for (const xAOD::CaloCluster* cluster : *topoClusters) {
594  if (cluster && std::abs(cluster->eta()) < 7. && cluster->e() > MinClusterEnergy &&
595  xAOD::P4Helpers::deltaR(tpEtaAtCalo, tpPhiAtCalo, cluster->eta(), cluster->phi()) < m_coreConeMu) {
596  clusters.emplace(cluster);
597  ATH_MSG_VERBOSE("getAssociatedClusters: for mu trkPart save clus " << " with pt: " << cluster->pt() * MeVtoGeV << " GeV, eta: " << cluster->eta() << ", phi: " << cluster->phi() << ", tpEtaAtCalo " << tpEtaAtCalo << ", tpPhiAtCalo " << tpPhiAtCalo);
598  }
599  }
600  }
601  }
602 #endif
603  }
604  }
605 
606  return clusters;
607  }

◆ getAssociatedTracks() [1/2]

TrackSet CP::IsolationCloseByCorrectionTool::getAssociatedTracks ( const xAOD::IParticle P) const
private

Retrieve all Inner detector tracks associated with the primary particle.

Definition at line 494 of file IsolationCloseByCorrectionTool.cxx.

494  {
495  TrackSet to_return{};
496  if (P->type() == xAOD::Type::Muon) {
497  const xAOD::Muon* mu = static_cast<const xAOD::Muon*>(P);
498  if (mu->muonType() != xAOD::Muon::SiliconAssociatedForwardMuon)
499  to_return.emplace(mu->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle));
500  } else if (P->type() == xAOD::Type::TrackParticle) {
501  const xAOD::TrackParticle* trk = static_cast<const xAOD::TrackParticle*>(P);
502  to_return.emplace(trk);
503  } else if (isEgamma(P)) {
504  const xAOD::Egamma* EG = static_cast<const xAOD::Egamma*>(P);
505  std::set<const xAOD::TrackParticle*> trk_vec = xAOD::EgammaHelpers::getTrackParticles(EG, true, true);
506  for (const xAOD::TrackParticle* trk : trk_vec) {
507  ATH_MSG_VERBOSE("Adding egamma track with "
508  << trk->pt() * MeVtoGeV << " GeV, eta: " << trk->eta() << ", phi: " << trk->phi());
509  to_return.emplace(trk);
510  }
511  }
512  return to_return;
513  }

◆ getAssociatedTracks() [2/2]

TrackSet CP::IsolationCloseByCorrectionTool::getAssociatedTracks ( const xAOD::IParticle P,
const xAOD::Vertex vtx 
) const
private

Retrieve the subset of tracks passing the isolation selection.

Definition at line 514 of file IsolationCloseByCorrectionTool.cxx.

514  {
515  const TrackSet assoc_tracks = getAssociatedTracks(P);
516  TrackSet to_ret{};
517  for (const TrackPtr trk : assoc_tracks) {
518  if (passFirstStage(trk, vtx)) to_ret.insert(trk);
519  }
520  return to_ret;
521  }

◆ getCloseByCorrection()

CorrectionCode CP::IsolationCloseByCorrectionTool::getCloseByCorrection ( std::vector< float > &  corrections,
const xAOD::IParticle par,
const std::vector< xAOD::Iso::IsolationType > &  types,
const xAOD::IParticleContainer closePar 
) const
overridevirtual

Check first if all isolation types are known to the tool

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 435 of file IsolationCloseByCorrectionTool.cxx.

437  {
438 
439  if (!m_isInitialised) {
440  ATH_MSG_ERROR("The IsolationCloseByCorrectionTool was not initialised!!!");
441  return CorrectionCode::Error;
442  }
444  {
445  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
446  for (const IsolationType& t : types) {
447  IsoHelperMap::const_iterator Itr = m_isohelpers.find(t);
448  if (Itr != m_isohelpers.end()) { continue; }
449  Itr = m_isohelpers.insert(std::make_pair(t, std::make_unique<IsoVariableHelper>(t, m_backup_prefix, m_isoDecSuffix))).first;
450  }
451  }
452  corrections.assign(types.size(), 0);
453  ObjectCache cache{};
454  loadPrimaryParticles(&closePar, cache);
455  const EventContext& ctx = Gaudi::Hive::currentContext();
456  loadAssociatedObjects(ctx, cache);
457  std::vector<float>::iterator Cone = corrections.begin();
458  for (const IsolationType& iso_type : types) {
459  {
460  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
461  IsoHelperMap::const_iterator Itr = m_isohelpers.find(iso_type);
462  if (Itr->second->backupIsolation(&par) == CP::CorrectionCode::Error) {
463  ATH_MSG_ERROR("Failed to backup isolation");
464  return CorrectionCode::Error;
465  }
466  }
467  if (isTrackIso(iso_type)) {
468  if (getCloseByCorrectionTrackIso(&par, iso_type, cache, (*Cone)) == CorrectionCode::Error) {
469  ATH_MSG_ERROR("Failed to apply track correction");
470  return CorrectionCode::Error;
471 
472  }
473  }
474  else if (isTopoEtIso(iso_type)) {
475  if (getCloseByCorrectionTopoIso(ctx, &par, iso_type, cache, (*Cone)) == CorrectionCode::Error) {
476  ATH_MSG_ERROR("Failed to apply topo cluster correction");
477  return CorrectionCode::Error;
478  }
479  }
480  else if (isPFlowIso(iso_type)) {
481  if (getCloseByCorrectionPflowIso(ctx, &par, iso_type, cache, (*Cone)) == CorrectionCode::Error) {
482  ATH_MSG_ERROR("Failed to apply pflow correction");
483  return CorrectionCode::Error;
484  }
485  }
486  ++Cone;
487  }
488  return CorrectionCode::Ok;
489  }

◆ getCloseByCorrectionPflowIso()

CorrectionCode CP::IsolationCloseByCorrectionTool::getCloseByCorrectionPflowIso ( const EventContext &  ctx,
const xAOD::IParticle primary,
const IsoType  type,
const ObjectCache cache,
float &  isoValue 
) const
private

Disable the correction of already isolated objects

Find the pflow elements associated with this primary

Definition at line 657 of file IsolationCloseByCorrectionTool.cxx.

659  {
660  if (!isPFlowIso(type)) {
661  ATH_MSG_ERROR("getCloseByCorrectionPflowIso() -- The isolation type is not a Pflow variable " << toString(type));
662  return CorrectionCode::Error;
663  }
664  if (m_isohelpers.at(type)->getOriginalIsolation(primary, isoValue) == CorrectionCode::Error) {
665  ATH_MSG_ERROR("getCloseByCorrectionPflowIso() -- Could not retrieve the isolation variable.");
666  return CorrectionCode::Error;
667  }
669  if (isoValue <= 0.) {
670  ATH_MSG_DEBUG("Pflow varible is already sufficiently isolated ");
671  return CorrectionCode::Ok;
672  }
673  const float coneDR = coneSize(primary, type);
674  float ref_eta{0.f}, ref_phi{0.f};
675  getExtrapEtaPhi(primary, ref_eta, ref_phi);
676  if (m_caloModel == TopoConeCorrectionModel::SubtractObjectsDirectly) {
678  ATH_MSG_VERBOSE("getCloseByCorrectionPflowIso: " << toString(type) << " of " << particleName(primary) << " with pt: "
679  << primary->pt() * MeVtoGeV << " GeV, eta: " << primary->eta()
680  << ", phi: " << primary->phi() << " before correction: " << isoValue * MeVtoGeV << " GeV. ");
681  PflowSet assoc_coll = getAssocFlowElements(ctx, primary);
682  for (const FlowElementPtr& flow : cache.flows) {
683  ATH_MSG_VERBOSE("Loop over pflow element: " << flow->pt() << " GeV, eta: " << flow->eta() << " phi: " << flow->phi());
684 
685  const float dR = xAOD::P4Helpers::deltaR(ref_eta,ref_phi, flow->eta(),flow->phi());
687  ATH_MSG_VERBOSE("Flow element is in core cone");
688  continue;
689  }
690  if (assoc_coll.count(flow)) {
691  ATH_MSG_VERBOSE("Flow element is directly associated with the object");
692  continue;
693  }
694  if (dR < coneDR) {
695  ATH_MSG_VERBOSE("Found overlapping pflow element: " << flow->pt() << " GeV, eta: " << flow->eta()
696  << " phi: " << flow->phi() << " dR: " << dR);
697  isoValue -= flow->pt() * flow.weight;
698  }
699  }
700  ATH_MSG_VERBOSE("getCloseByCorrectionPflowIso: " << toString(type) << " of " << particleName(primary) << " with pt: "
701  << primary->pt() * MeVtoGeV << " GeV, eta: " << primary->eta()
702  << ", phi: " << primary->phi() << " after correction: " << isoValue * MeVtoGeV << " GeV. ");
703  } else if (m_caloModel == TopoConeCorrectionModel::UseAveragedDecorators) {
704  static const FloatAccessor acc_eta{pflowDecors()[0]};
705  static const FloatAccessor acc_phi{pflowDecors()[1]};
706  static const FloatAccessor acc_ene{pflowDecors()[2]};
707  static const CharAccessor acc_isDecor{pflowDecors()[3]};
708  for (const xAOD::IParticle* others : cache.prim_parts) {
709  if (others == primary) continue;
710  if (!acc_isDecor.isAvailable(*others) || !acc_isDecor(*others)) {
711  ATH_MSG_ERROR("The variable energy averaged pflow decorations are not available for "<<particleName(others)<<". Please check");
712  return CorrectionCode::Error;
713  }
714  const float other_eta = acc_eta(*others);
715  const float other_phi = acc_phi(*others);
716  const float dR = xAOD::P4Helpers::deltaR(ref_eta,ref_phi,other_eta,other_phi);
717  if (dR > coneDR) continue;
718  if (dR< (primary->type() == xAOD::Type::ObjectType::Muon ? m_coreConeMu : m_coreConeEl)) continue;
719  isoValue -= acc_ene(*others);
720  }
721  } else {
722  ATH_MSG_ERROR("Unknown calo correction model "<<m_caloModel);
723  return CorrectionCode::Error;
724  }
725  isoValue = std::max(0.f, isoValue);
726  return CorrectionCode::Ok;
727  }

◆ getCloseByCorrectionTopoIso()

CorrectionCode CP::IsolationCloseByCorrectionTool::getCloseByCorrectionTopoIso ( const EventContext &  ctx,
const xAOD::IParticle primary,
const IsoType  type,
ObjectCache cache,
float &  isoValue 
) const
private

Disable the correction of already isolated objects

Definition at line 729 of file IsolationCloseByCorrectionTool.cxx.

731  {
732  // check if the isolation can be loaded
733  if (!isTopoEtIso(type)) {
734  ATH_MSG_ERROR("getCloseByCorrectionTopoIso() -- The isolation type is not an et cone variable " << toString(type));
735  return CorrectionCode::Error;
736  }
737  {
738  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
739  if (m_isohelpers.at(type)->getOriginalIsolation(primary, isoValue) == CorrectionCode::Error) {
740  ATH_MSG_WARNING("Could not retrieve the isolation variable.");
741  return CorrectionCode::Error;
742  }
743  }
745  if (isoValue <= 0.) {
746  ATH_MSG_DEBUG("Topo et cone variable is already sufficiently isolated");
747  return CorrectionCode::Ok;
748  }
749  float ref_eta{0.f}, ref_phi{0.f};
750  getExtrapEtaPhi(primary, ref_eta, ref_phi);
751  ATH_MSG_VERBOSE("getCloseByCorrectionTopoIso: " << toString(type) << " of " << particleName(primary) << " with ref eta: " << ref_eta << ", ref phi " << ref_phi);
752 
753  float MaxDR = coneSize(primary, type) * (primary->type() != xAOD::Type::ObjectType::Muon ? 1. : m_ConeSizeVariation.value());
754  if (m_caloModel == TopoConeCorrectionModel::SubtractObjectsDirectly) {
755  ATH_MSG_VERBOSE("getCloseByCorrectionTopoIso: " << toString(type) << " of " << particleName(primary) << " with pt: "
756  << primary->pt() * MeVtoGeV << " GeV, eta: " << primary->eta()
757  << ", phi: " << primary->phi() << " before correction: " << isoValue * MeVtoGeV << " GeV. ");
758  ClusterSet assoc = getAssociatedClusters(ctx, primary, cache);
759  for (const CaloClusterPtr& calo : cache.clusters) {
760  const float dR = xAOD::P4Helpers::deltaR(ref_eta, ref_phi, calo->eta(), calo->phi());
761  ATH_MSG_VERBOSE("getCloseByCorrectionTopoIso: Loop over cluster: " << calo->pt() * MeVtoGeV << " GeV, eta: " << calo->eta() << " phi: " << calo->phi() << " dR: " << dR);
762  if (dR > MaxDR) continue;
763  // REMOVED CORE CUT SINCE TOPOCLUSTERS SHOULD BE ASSOCIATED TO THE ELECTRONS AND MUONS AND WILL BE CUT BY ASSOC CUT BELOW
764  if (assoc.count(calo)) {
765  ATH_MSG_VERBOSE("getCloseByCorrectionTopoIso: skip due to assoc " << assoc.count(calo));
766  continue;
767  }
768  float Polution = clusterEtMinusTile(calo) / (isoValue != 0 ? isoValue : 1.);
769  if (Polution < 0. || Polution > m_maxTopoPolution) {
770  ATH_MSG_VERBOSE("getCloseByCorrectionTopoIso: skip due to polution " << Polution << ", clus noTile " << clusterEtMinusTile(calo) * MeVtoGeV << " GeV");
771  continue;
772  }
773  ATH_MSG_VERBOSE("getCloseByCorrectionTopoIso: Found overlapping topocluster: " << calo->pt() * MeVtoGeV << " GeV, lessTile " << clusterEtMinusTile(calo) * MeVtoGeV << " GeV, eta: " << calo->eta()
774  << " phi: " << calo->phi() << " dR: " << dR);
775  isoValue -= clusterEtMinusTile(calo);
776  }
777  ATH_MSG_VERBOSE("getCloseByCorrectionTopoIso: " << toString(type) << " of " << particleName(primary) << " with pt: "
778  << primary->pt() * MeVtoGeV << " GeV, eta: " << primary->eta()
779  << ", phi: " << primary->phi() << " after correction: " << isoValue * MeVtoGeV << " GeV. ");
780  } else if (m_caloModel == TopoConeCorrectionModel::UseAveragedDecorators) {
781  const FloatAccessor acc_eta{caloDecors()[0] + m_caloDecSuffix};
782  const FloatAccessor acc_phi{caloDecors()[1] + m_caloDecSuffix};
783  const FloatAccessor acc_ene{caloDecors()[2] + m_caloDecSuffix};
784  const CharAccessor acc_isDecor{caloDecors()[3] + m_caloDecSuffix};
785  for (const xAOD::IParticle* others : cache.prim_parts) {
786  if (others == primary) continue;
787  if (!acc_isDecor.isAvailable(*others) || !acc_isDecor(*others)) {
788  ATH_MSG_ERROR("The averaged calo cluster decorations are not available for "<<particleName(others)<<". Please check");
789  return CorrectionCode::Error;
790  }
791  const float other_eta = acc_eta(*others);
792  const float other_phi = acc_phi(*others);
793  const float dR = xAOD::P4Helpers::deltaR(ref_eta,ref_phi,other_eta,other_phi);
794  if (dR > MaxDR) continue;
795  if (dR< (primary->type() == xAOD::Type::ObjectType::Muon ? m_coreConeMu : m_coreConeEl)) continue;
796  isoValue -= acc_ene(*others);
797  }
798  }
799  isoValue = std::max(0.f, isoValue);
800  return CorrectionCode::Ok;
801  }

◆ getCloseByCorrectionTrackIso()

CorrectionCode CP::IsolationCloseByCorrectionTool::getCloseByCorrectionTrackIso ( const xAOD::IParticle primary,
const IsoType  type,
const ObjectCache cache,
float &  isoValue 
) const
private

Only check the TTVA working point again if the tool has non-TTVA working points

Definition at line 614 of file IsolationCloseByCorrectionTool.cxx.

615  {
616  if (!isTrackIso(type)) {
617  ATH_MSG_ERROR("Invalid isolation type " << toString(type));
618  return CorrectionCode::Error;
619  }
620  {
621  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
622  IsoHelperMap::const_iterator Itr = m_isohelpers.find(type);
623  if (Itr == m_isohelpers.end() || Itr->second->getOriginalIsolation(par, isoValue) == CorrectionCode::Error) {
624  ATH_MSG_WARNING(__func__<<"() -- "<<__LINE__<<" Could not retrieve the isolation variable " << toString(type));
625  return CorrectionCode::Error;
626  } else if (cache.tracks.empty())
627  return CorrectionCode::Ok;
628  }
629 
630  float MaxDR = coneSize(par, type);
631  const TrackSet ToExclude = getAssociatedTracks(par);
632 
633  const xAOD::IParticle* Ref = isoRefParticle(par);
634  ATH_MSG_VERBOSE(toString(type) << " of " << particleName(par) << " with pt: " << par->pt() * MeVtoGeV << " GeV, eta: " << par->eta()
635  << ", phi: " << par->phi() << " before correction: " << isoValue * MeVtoGeV << " GeV. "
636  << ToExclude.size() << " tracks will be excluded.");
637 
638  for (const TrackPtr& poluting_trk : cache.tracks) {
639  // Checks for the Pile-up robust isolation WP's
640  if (poluting_trk->pt() < trackPtCut(type)) continue;
642  if (isTrackIsoTTVA(type) && m_has_nonTTVA && !m_ttvaTool->isCompatible(*poluting_trk, *cache.prim_vtx)) continue;
643 
644  if (overlap(Ref, poluting_trk, MaxDR) && !ToExclude.count(poluting_trk)) {
645  ATH_MSG_VERBOSE("Subtract track with "
646  << poluting_trk->pt() * MeVtoGeV << " GeV, eta: " << poluting_trk->eta() << ", phi: " << poluting_trk->phi()
647  << " with dR: " << std::sqrt(deltaR2(Ref, poluting_trk)) << " from the isolation cone " << toString(type)
648  << " " << (isoValue * MeVtoGeV) << " GeV.");
649  isoValue -= poluting_trk->pt();
650  }
651  }
652  isoValue = std::max(0.f, isoValue);
653  ATH_MSG_VERBOSE(toString(type) << " of " << particleName(par) << " with pt: " << par->pt() * MeVtoGeV << " GeV, eta: " << par->eta()
654  << ", phi: " << par->phi() << " after correction: " << isoValue * MeVtoGeV << " GeV");
655  return CorrectionCode::Ok;
656  }

◆ getCloseByIsoCorrection()

CorrectionCode CP::IsolationCloseByCorrectionTool::getCloseByIsoCorrection ( const EventContext &  ctx,
const xAOD::ElectronContainer Electrons,
const xAOD::MuonContainer Muons,
const xAOD::PhotonContainer Photons 
) const
overridevirtual

Pick up first all objects that a considerable for the close-by correction

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 253 of file IsolationCloseByCorrectionTool.cxx.

257  {
258  if (!m_isInitialised) {
259  ATH_MSG_ERROR("The IsolationCloseByCorrectionTool was not initialised!!!");
260  return CorrectionCode::Error;
261  }
262  ObjectCache cache{};
265  loadPrimaryParticles(muons, cache);
266  loadPrimaryParticles(photons, cache);
267 
268  loadAssociatedObjects(ctx, cache);
269  CorrectionCode ret = performCloseByCorrection(ctx, cache);
271  lockDecorations(muons);
272  lockDecorations(photons);
273  return ret;
274  }

◆ getExtrapEtaPhi() [1/2]

bool CP::IsolationCloseByCorrectionTool::getExtrapEtaPhi ( const EventContext &  ctx,
const xAOD::TrackParticle tp,
float &  eta,
float &  phi 
) const
private

helper to get eta,phi of muon extrap

try the extention in athena if it's not obtained from muon yet.

if still not got the updated eta & phi

Definition at line 221 of file IsolationCloseByCorrectionTool.cxx.

221  {
223  ATH_MSG_DEBUG("Geting calo extension caloExtension tool.");
224  // If we have an extension cache then it owns the extension, otherwise we own it
225  // Therefore we have to prepare both an owning and a non-owning pointer
226  std::unique_ptr<Trk::CaloExtension> caloExtension;
227  caloExtension = m_caloExtTool->caloExtension(ctx, *tp);
228  if(!caloExtension){
229  ATH_MSG_WARNING("Can not get caloExtension.");
230  return false;
231  };
232 
233  const std::vector<Trk::CurvilinearParameters>& intersections = caloExtension->caloLayerIntersections();
234  if(!intersections.empty()){
235  Amg::Vector3D avePoint(0,0,0);
236  for (unsigned int i = 0; i < intersections.size(); ++i){
237  const Amg::Vector3D& point = intersections[i].position();
238  avePoint += point;
239  }
240  avePoint = (1./intersections.size())*avePoint;
241  eta = avePoint.eta();
242  phi = avePoint.phi();
243  return true;
244  } else {
245  ATH_MSG_WARNING("Muon Calo extension got no intersection!!!");
246  }
248  ATH_MSG_WARNING("Calo extension can not be obtained!!!");
249  return false;
250  }

◆ getExtrapEtaPhi() [2/2]

void CP::IsolationCloseByCorrectionTool::getExtrapEtaPhi ( const xAOD::IParticle particlear,
float &  eta,
float &  phi 
) const

Definition at line 802 of file IsolationCloseByCorrectionTool.cxx.

802  {
805  const CharAccessor acc_isDecor{caloDecors()[3] + m_caloDecSuffix};
806  if (par->type() != xAOD::Type::ObjectType::Muon) {
807  const xAOD::Egamma* egam = dynamic_cast<const xAOD::Egamma*>(par);
808  if( egam ) {
809  eta = egam->caloCluster()->eta();
810  phi = egam->caloCluster()->phi();
811  }
812  else {
813  eta = par->eta();
814  phi = par->phi();
815  }
816  } else if (acc_isDecor.isAvailable(*par) && acc_isDecor(*par)) {
817  eta = acc_assocEta(*par);
818  phi = acc_assocPhi(*par);
819  } else {
820  float assoc_ene{0.f};
823  const CharDecorator dec_isDecor{caloDecors()[3] + m_caloDecSuffix};
824  associateCluster(par,eta, phi, assoc_ene);
825  dec_assocEta(*par) = eta;
826  dec_assocPhi(*par) = phi;
827  dec_isDecor(*par) = true;
828  }
829  }

◆ getIsolationTypes()

const IsoVector & CP::IsolationCloseByCorrectionTool::getIsolationTypes ( const xAOD::IParticle particle) const
private

Definition at line 361 of file IsolationCloseByCorrectionTool.cxx.

361  {
362  static const IsoVector dummy{};
363  if (!particle) return dummy;
365  return m_electron_isoTypes;
366  else if (particle->type() == xAOD::Type::ObjectType::Muon)
367  return m_muon_isoTypes;
368  else if (particle->type() == xAOD::Type::ObjectType::Photon)
369  return m_photon_isoTypes;
370  return dummy;
371  }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getOriginalIsolation() [1/2]

float CP::IsolationCloseByCorrectionTool::getOriginalIsolation ( const xAOD::IParticle P,
IsoType  type 
) const
overridevirtual

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 1049 of file IsolationCloseByCorrectionTool.cxx.

1049  {
1051  }

◆ getOriginalIsolation() [2/2]

float CP::IsolationCloseByCorrectionTool::getOriginalIsolation ( const xAOD::IParticle particle,
IsoType  type 
) const
overridevirtual

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 1039 of file IsolationCloseByCorrectionTool.cxx.

1039  {
1040  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
1041  IsoHelperMap::const_iterator itr = m_isohelpers.find(isoVariable);
1042  float isovalue = 0;
1043  if (itr == m_isohelpers.end() || itr->second->getOriginalIsolation(particle, isovalue) == CorrectionCode::Error) {
1044  ATH_MSG_ERROR("Failed to retrive the original isolation cone ");
1045  isovalue = FLT_MAX;
1046  }
1047  return isovalue;
1048  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ getTrackCandidates()

TrackSet CP::IsolationCloseByCorrectionTool::getTrackCandidates ( const EventContext &  ctx,
const xAOD::IParticle particle 
) const
overridevirtual

Load all TrackParticles associated with the particles in the Container. The particles have to pass the selection decoration flag.

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 522 of file IsolationCloseByCorrectionTool.cxx.

522  {
524  }

◆ initialize()

StatusCode CP::IsolationCloseByCorrectionTool::initialize ( )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Retrieve the isolation tool and load the isolation cones

Setup the data dependency

Same holds for the TTVA selection tool

Reimplemented from asg::AsgTool.

Definition at line 42 of file IsolationCloseByCorrectionTool.cxx.

42  {
44  ATH_CHECK(m_selectorTool.retrieve());
48 
52  if (!m_isoDecSuffix.empty()) ATH_MSG_INFO("IsoDecSuffix set to " << m_isoDecSuffix);
53  if (!m_quality_name.empty()) ATH_MSG_INFO("SelectionDecorator set to " << m_quality_name);
54 
55 
56 #ifndef XAOD_ANALYSIS
61  ATH_CHECK(m_isoVarKeys.initialize());
62  ATH_CHECK(m_isoWriteDecVarKeys.initialize());
63  if (!m_caloExtTool.empty()) ATH_CHECK(m_caloExtTool.retrieve());
64  else {
65  ATH_MSG_WARNING("The ParticleCaloExtensionTool was not configured. Pleease include it!!!");
66  }
67 #endif
68 
69  ATH_CHECK(m_VtxKey.initialize());
70  ATH_CHECK(m_CaloClusterKey.initialize(m_caloModel == TopoConeCorrectionModel::SubtractObjectsDirectly));
71  ATH_CHECK(m_PflowKey.initialize(m_caloModel == TopoConeCorrectionModel::SubtractObjectsDirectly));
72 
73  // set default properties of track selection tool, if the user hasn't configured it
74  if (m_trkselTool.empty()) {
75  asg::AsgToolConfig config{"InDet::InDetTrackSelectionTool/TrackParticleSelectionTool"};
76  ATH_MSG_INFO("No TrackSelectionTool provided, so I will create and configure my own, called: " << config.name());
77  // The z0 cut is checked in any case either by the
78  // track to vertex association tool or by the tracking tool
79  ATH_CHECK(config.setProperty("maxZ0SinTheta", 3.));
80  // The minimum Pt requirement is lowered to 500 MeV because
81  // the Loose ttva cone variables accept very low-pt tracks
82  // https://gitlab.cern.ch/atlas/athena/blob/21.2/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoUpdatedTrackCones.py#L21
83  ATH_CHECK(config.setProperty("minPt", 500.));
84  ATH_CHECK(config.setProperty("CutLevel", "Loose"));
85  ATH_CHECK(config.makePrivateTool(m_trkselTool));
86  }
88  if (m_ttvaTool.empty()) {
89  asg::AsgToolConfig config{"CP::TrackVertexAssociationTool/ttva_selection_tool"};
90  ATH_CHECK(config.setProperty("WorkingPoint", "Nonprompt_All_MaxWeight"));
91  ATH_CHECK(config.makePrivateTool(m_ttvaTool));
92  }
93  ATH_CHECK(m_trkselTool.retrieve());
94  ATH_CHECK(m_ttvaTool.retrieve());
95 
96  if (!m_quality_name.empty()) m_acc_quality = std::make_unique<CharAccessor>(m_quality_name);
97  if (!m_passOR_name.empty()) m_acc_passOR = std::make_unique<CharAccessor>(m_passOR_name);
98  if (!m_isoSelection_name.empty()) m_dec_isoselection = std::make_unique<CharDecorator>(m_isoSelection_name);
99  m_isInitialised = true;
100  return StatusCode::SUCCESS;
101  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isEgamma()

bool CP::IsolationCloseByCorrectionTool::isEgamma ( const xAOD::IParticle particle)
static

Definition at line 525 of file IsolationCloseByCorrectionTool.cxx.

525  {
526  return P && (P->type() == xAOD::Type::ObjectType::Electron || P->type() == xAOD::Type::ObjectType::Photon);
527  }

◆ isFixedTrackIso()

bool CP::IsolationCloseByCorrectionTool::isFixedTrackIso ( xAOD::Iso::IsolationType  type)
static

Definition at line 1072 of file IsolationCloseByCorrectionTool.cxx.

◆ isFixedTrackIsoTTVA()

bool CP::IsolationCloseByCorrectionTool::isFixedTrackIsoTTVA ( xAOD::Iso::IsolationType  type)
static

◆ isoRefParticle()

const xAOD::IParticle * CP::IsolationCloseByCorrectionTool::isoRefParticle ( const xAOD::IParticle particle) const
overridevirtual

Retrieve the reference particle to define the cone axis in which the track particles contributing to the isolation have to be.

Implements CP::IIsolationCloseByCorrectionTool.

Definition at line 1001 of file IsolationCloseByCorrectionTool.cxx.

1001  {
1002  if (!P) {
1003  ATH_MSG_ERROR("Nullptr given");
1004  return nullptr;
1005  }
1006  // Use for muons the associated ID track. Else the particle itself
1007  if (P->type() == xAOD::Type::ObjectType::Muon) {
1008  const xAOD::Muon* muon = static_cast<const xAOD::Muon*>(P);
1009  const xAOD::TrackParticle* idTrk = muon->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
1010  return idTrk ? idTrk : muon->primaryTrackParticle();
1011  }
1012  return P;
1013  }

◆ isoTypesFromWP()

void CP::IsolationCloseByCorrectionTool::isoTypesFromWP ( const std::vector< std::unique_ptr< IsolationWP >> &  WP,
IsoVector types 
)
private

Helper function to load all Isolation types from the iso working points.

Definition at line 102 of file IsolationCloseByCorrectionTool.cxx.

102  {
103  types.clear();
104  for (const std::unique_ptr<IsolationWP>& W : WPs) {
105  for (const std::unique_ptr<IsolationCondition>& C : W->conditions()) {
106  for (unsigned int t = 0; t < C->num_types(); ++t) {
107  const IsoType iso_type = C->type(t);
108  if (std::find(types.begin(), types.end(), iso_type) == types.end()) types.emplace_back(iso_type);
109  if (m_isohelpers.find(iso_type) == m_isohelpers.end()) {
110  m_isohelpers.insert(std::make_pair(iso_type, std::make_unique<IsoVariableHelper>(iso_type, m_backup_prefix, m_isoDecSuffix)));
111  }
112  }
113  }
114  }
115  m_has_nonTTVA |= std::find_if(types.begin(), types.end(),
116  [](const IsolationType& t) { return isTrackIso(t) && !isTrackIsoTTVA(t); }) != types.end();
117  m_hasPflowIso |= std::find_if(types.begin(), types.end(),
118  [](const IsolationType& t) { return isPFlowIso(t); }) != types.end();
119  m_hasEtConeIso |= std::find_if(types.begin(), types.end(),
120  [](const IsolationType& t) { return isTopoEtIso(t); }) != types.end();
121  }

◆ isPFlowIso()

bool CP::IsolationCloseByCorrectionTool::isPFlowIso ( xAOD::Iso::IsolationType  type)
static

◆ isSame()

bool CP::IsolationCloseByCorrectionTool::isSame ( const xAOD::IParticle particle,
const xAOD::IParticle particle1 
) const

Definition at line 1014 of file IsolationCloseByCorrectionTool.cxx.

1014  {
1015  if (!P || !P1) {
1016  ATH_MSG_WARNING("Nullptr were given");
1017  return true;
1018  }
1019  return (P == P1);
1020  }

◆ isTopoEtIso()

bool CP::IsolationCloseByCorrectionTool::isTopoEtIso ( xAOD::Iso::IsolationType  type)
static

◆ isTrackIso()

bool CP::IsolationCloseByCorrectionTool::isTrackIso ( xAOD::Iso::IsolationType  type)
static

Definition at line 1074 of file IsolationCloseByCorrectionTool.cxx.

1074  {
1076  }

◆ isTrackIsoTTVA()

bool CP::IsolationCloseByCorrectionTool::isTrackIsoTTVA ( xAOD::Iso::IsolationType  type)
static

Definition at line 1094 of file IsolationCloseByCorrectionTool.cxx.

◆ isVarTrackIso()

bool CP::IsolationCloseByCorrectionTool::isVarTrackIso ( xAOD::Iso::IsolationType  type)
static

◆ isVarTrackIsoTTVA()

bool CP::IsolationCloseByCorrectionTool::isVarTrackIsoTTVA ( xAOD::Iso::IsolationType  Iso)
static

◆ loadAssociatedObjects()

void CP::IsolationCloseByCorrectionTool::loadAssociatedObjects ( const EventContext &  ctx,
ObjectCache cache 
) const

Load all associated tracks / clusters / flow elements into the cache.

Definition at line 167 of file IsolationCloseByCorrectionTool.cxx.

167  {
168 
169  // Use isLRT decoration for LLP particles to avoid looking for tracks from the primary vertex
170  static const CharAccessor isLRT("isLRT");
171 
172  cache.prim_vtx = retrieveIDBestPrimaryVertex(ctx);
173  for (const xAOD::IParticle* prim : cache.prim_parts) {
174  // skip LRT leptons
175  if (!isLRT.isAvailable(*prim) || !isLRT(*prim) ) {
176  const TrackSet tracks = getAssociatedTracks(prim, cache.prim_vtx);
177  cache.tracks.insert(tracks.begin(), tracks.end());
178  }
179  const ClusterSet clusters = getAssociatedClusters(ctx, prim, cache);
180  cache.clusters.insert(clusters.begin(), clusters.end());
181  }
182  getAssocFlowElements(ctx, cache);
183  }

◆ loadPrimaryParticles()

void CP::IsolationCloseByCorrectionTool::loadPrimaryParticles ( const xAOD::IParticleContainer container,
ObjectCache cache 
) const

Filter all electrons/muons/photons from the collection which pass the selection decoration.

Definition at line 141 of file IsolationCloseByCorrectionTool.cxx.

141  {
142  if (!container) return;
143  for (const xAOD::IParticle* particle : *container) {
144  if (m_dec_isoselection) (*m_dec_isoselection)(*particle) = true && m_selectorTool->accept(*particle);
145  const IsoVector& iso_types = getIsolationTypes(particle);
146  if (iso_types.empty()) { ATH_MSG_DEBUG("No isolation types have been defined for particle type " << particleName(particle)); }
147  for (const IsoType type : iso_types) {
148  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
149  IsoHelperMap::const_iterator Itr = m_isohelpers.find(type);
150  if (Itr == m_isohelpers.end() || Itr->second->backupIsolation(particle) == CorrectionCode::Error) {
151  ATH_MSG_WARNING("Failed to properly access the vanilla isolation variable "
152  << toString(type) << "for particle " << particleName(particle) << " with pT: "
153  << particle->pt() * MeVtoGeV << " GeV, eta: " << particle->eta() << ", phi: " << particle->phi());
154  }
155  }
156  // Save all particles to be sure to output the new iso decorated values
157  // They either pass or not the selection.
158  // The selected ones participate in the CloseBy and may have their isolation corrected.
160  cache.not_sel_parts.insert(particle);
161  }
162  else {
163  cache.prim_parts.insert(particle);
164  }
165  }
166  }

◆ lockDecorations()

void CP::IsolationCloseByCorrectionTool::lockDecorations ( const xAOD::IParticleContainer parts) const
private

Definition at line 324 of file IsolationCloseByCorrectionTool.cxx.

324  {
325  if (!parts) return;
326 
329  const CharDecorator dec_isDecor{caloDecors()[3] + m_caloDecSuffix};
330 
331  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
332 
333  if (parts->ownPolicy() == SG::VIEW_ELEMENTS) {
334  UnorderedContainerSet conts;
335  for (const xAOD::IParticle* part : *parts) {
336  const SG::AuxVectorData* c = part->container();
337  if (conts.insert(c).second) {
338  for (const auto& p : m_isohelpers) {
339  p.second->lockDecorations(*part->container());
340  }
342  const_cast<SG::AuxVectorData*> (c);
343  c_nc->lockDecoration (dec_assocEta.auxid());
344  c_nc->lockDecoration (dec_assocPhi.auxid());
345  c_nc->lockDecoration (dec_isDecor.auxid());
346  }
347  }
348  }
349 
350  else {
351  for (const auto& p : m_isohelpers) {
352  p.second->lockDecorations(*parts);
353  }
355  const_cast<xAOD::IParticleContainer*> (parts);
356  c_nc->lockDecoration (dec_assocEta.auxid());
357  c_nc->lockDecoration (dec_assocPhi.auxid());
358  c_nc->lockDecoration (dec_isDecor.auxid());
359  }
360  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ overlap()

bool CP::IsolationCloseByCorrectionTool::overlap ( const xAOD::IParticle particle,
const xAOD::IParticle particle1,
float  dR 
) const

Definition at line 1036 of file IsolationCloseByCorrectionTool.cxx.

1036  {
1037  return (!isSame(P, P1) && deltaR2(P, P1) < (dR * dR));
1038  }

◆ particleName() [1/2]

std::string CP::IsolationCloseByCorrectionTool::particleName ( const xAOD::IParticle C)
static

Definition at line 1063 of file IsolationCloseByCorrectionTool.cxx.

1063 { return particleName(C->type()); }

◆ particleName() [2/2]

std::string CP::IsolationCloseByCorrectionTool::particleName ( xAOD::Type::ObjectType  T)
static

Definition at line 1064 of file IsolationCloseByCorrectionTool.cxx.

1064  {
1065  if (T == xAOD::Type::ObjectType::Electron) return "Electron";
1066  if (T == xAOD::Type::ObjectType::Photon) return "Photon";
1067  if (T == xAOD::Type::ObjectType::Muon) return "Muon";
1068  if (T == xAOD::Type::ObjectType::TrackParticle) return "Track";
1069  if (T == xAOD::Type::ObjectType::CaloCluster) return "Cluster";
1070  return "Unknown";
1071  }

◆ passFirstStage()

bool CP::IsolationCloseByCorrectionTool::passFirstStage ( const xAOD::TrackParticle trk,
const xAOD::Vertex vtx 
) const
private

The Track particle has to pass the Track selection tool and the TTVA selection.

The latter only applies if there's no WP floating around using the legacy ptcone variables

Definition at line 491 of file IsolationCloseByCorrectionTool.cxx.

491  {
492  return trk && vtx && m_trkselTool->accept(*trk, vtx) && (!m_has_nonTTVA || m_ttvaTool->isCompatible(*trk, *vtx));
493  }

◆ passSelectionQuality()

bool CP::IsolationCloseByCorrectionTool::passSelectionQuality ( const xAOD::IParticle particle) const
private

Definition at line 608 of file IsolationCloseByCorrectionTool.cxx.

608  {
609  if (!P) return false;
610  if (m_acc_quality && (!m_acc_quality->isAvailable(*P) || !(*m_acc_quality)(*P))) return false;
611  if (m_acc_passOR && (!m_acc_passOR->isAvailable(*P) || !(*m_acc_passOR)(*P))) return false;
612  return true;
613  }

◆ performCloseByCorrection()

CorrectionCode CP::IsolationCloseByCorrectionTool::performCloseByCorrection ( const EventContext &  ctx,
ObjectCache cache 
) const
private

Definition at line 275 of file IsolationCloseByCorrectionTool.cxx.

275  {
276  if (cache.prim_vtx) {
277  // require a primary vertex for isolation correction - expect that if there is not primary vertex, then we only need to assure that the cache.not_sel_parts are treated correctly below
278  for (const xAOD::IParticle* particle : cache.prim_parts) {
279  ATH_MSG_DEBUG("Correct the isolation of particle "<<particleName(particle)<< " with pt: " << particle->pt() * MeVtoGeV << " GeV"
280  << " eta: " << particle->eta()
281  << " phi: " << particle->phi());
282 
284  ATH_MSG_ERROR("Failed to correct the isolation of particle with pt: " << particle->pt() * MeVtoGeV << " GeV"
285  << " eta: " << particle->eta()
286  << " phi: " << particle->phi());
287  return CorrectionCode::Error;
288  }
289  if (m_dec_isoselection) (*m_dec_isoselection)(*particle) = bool(m_selectorTool->accept(*particle));
290  ATH_MSG_DEBUG("Corrected the isolation of particle with pt: " << particle->pt() * MeVtoGeV << " GeV"
291  << " eta: " << particle->eta()
292  << " phi: " << particle->phi());
293 
294  }
295  }
296  else {
297  // Missing primary vertex - need to copy the uncorrected iso values
298  for (const xAOD::IParticle* particle : cache.prim_parts) {
299  ATH_MSG_DEBUG("Copy isolation values of particle with pt: " << particle->pt() * MeVtoGeV << " GeV"
300  << " eta: " << particle->eta()
301  << " phi: " << particle->phi());
303  ATH_MSG_ERROR("Failed to copy the isolation of particle with pt: " << particle->pt() * MeVtoGeV << " GeV"
304  << " eta: " << particle->eta()
305  << " phi: " << particle->phi());
306  return CorrectionCode::Error;
307  }
308  }
309  }
310  // Only need to copy the uncorrected iso values
311  for (const xAOD::IParticle* particle : cache.not_sel_parts) {
312  ATH_MSG_DEBUG("Copy isolation values of particle with pt: " << particle->pt() * MeVtoGeV << " GeV"
313  << " eta: " << particle->eta()
314  << " phi: " << particle->phi());
316  ATH_MSG_ERROR("Failed to copy the isolation of particle with pt: " << particle->pt() * MeVtoGeV << " GeV"
317  << " eta: " << particle->eta()
318  << " phi: " << particle->phi());
319  return CorrectionCode::Error;
320  }
321  }
322  return CorrectionCode::Ok;
323  }

◆ pflowDecors()

const caloDecorNames & CP::IsolationCloseByCorrectionTool::pflowDecors ( )
static

Definition at line 31 of file IsolationCloseByCorrectionTool.cxx.

31  {
32  static const caloDecorNames names =
33  {"IsoCloseByCorr_assocPflowEta", "IsoCloseByCorr_assocPflowPhi", "IsoCloseByCorr_assocPflowEnergy",
34  "IsoCloseByCorr_assocPflowDecor"};
35  return names;
36  }

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ printIsolationCones()

void CP::IsolationCloseByCorrectionTool::printIsolationCones ( const IsoVector types,
xAOD::Type::ObjectType  T 
) const
private

Definition at line 1095 of file IsolationCloseByCorrectionTool.cxx.

1095  {
1096  ATH_MSG_INFO("The following isolation cones are considered for " << particleName(T));
1097  for (const IsoType& cone : types) { ATH_MSG_INFO(" --- " << toString(cone)); }
1098  }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ retrieveIDBestPrimaryVertex()

const xAOD::Vertex * CP::IsolationCloseByCorrectionTool::retrieveIDBestPrimaryVertex ( const EventContext &  ctx) const

Definition at line 962 of file IsolationCloseByCorrectionTool.cxx.

962  {
964  if (!Verticies.isValid() || !Verticies->size()) {
965  ATH_MSG_WARNING("Failed to load vertex collection " << m_VtxKey.key());
966  return nullptr;
967  }
968  for (const xAOD::Vertex* V : *Verticies) {
969  if (V->vertexType() == xAOD::VxType::VertexType::PriVtx) {
970  ATH_MSG_VERBOSE("retrieveIDBestPrimaryVertex: vertex found ");
971  return V;
972  }
973  }
974  ATH_MSG_VERBOSE("retrieveIDBestPrimaryVertex: no vertex found ");
975  return nullptr;
976  }

◆ subtractCloseByContribution()

CorrectionCode CP::IsolationCloseByCorrectionTool::subtractCloseByContribution ( const EventContext &  ctx,
const xAOD::IParticle P,
ObjectCache cache 
) const
private

Definition at line 373 of file IsolationCloseByCorrectionTool.cxx.

375  {
377  if (types.empty()) {
378  ATH_MSG_WARNING("No isolation types are defiend for " << particleName(par));
380  }
381  for (const IsolationType iso_type : types) {
382  float iso_variable{0.f};
383  if (isTrackIso(iso_type)) {
384  if (getCloseByCorrectionTrackIso(par, iso_type, cache, iso_variable) == CorrectionCode::Error) {
385  ATH_MSG_ERROR("Failed to apply track correction");
386  return CorrectionCode::Error;
387  }
388  } else if (isTopoEtIso(iso_type)) {
389  if (getCloseByCorrectionTopoIso(ctx, par, iso_type, cache, iso_variable) == CorrectionCode::Error) {
390  ATH_MSG_ERROR("Failed to apply topo cluster correction");
391  return CorrectionCode::Error;
392  }
393  } else if (isPFlowIso(iso_type)) {
394  if (getCloseByCorrectionPflowIso(ctx, par, iso_type, cache, iso_variable) == CorrectionCode::Error) {
395  ATH_MSG_ERROR("Failed to apply pflow correction");
396  return CorrectionCode::Error;
397  }
398  }
399  ATH_MSG_DEBUG("subtractCloseByContribution: Set pt, eta, phi " << par->pt() << ", " << par->eta() << ", " << par->phi() << " for " << toString(iso_type) << " to " << iso_variable);
400  std::lock_guard<std::mutex> guard{m_isoHelpersMutex};
401  if (m_isohelpers.at(iso_type)->setIsolation(par, iso_variable) == CorrectionCode::Error) {
402  ATH_MSG_ERROR("Cannot set " << toString(iso_type) << " to " << iso_variable);
403  return CorrectionCode::Error;
404  }
405  }
406  return CorrectionCode::Ok;
407  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ trackPtCut()

float CP::IsolationCloseByCorrectionTool::trackPtCut ( xAOD::Iso::IsolationType  type)
static

Definition at line 1099 of file IsolationCloseByCorrectionTool.cxx.

1099  {
1100  if (!isTrackIso(type)) return -1;
1102  static const std::set<IsolationFlavour> Pt1000_Flavours{IsolationFlavour::ptcone_Nonprompt_All_MaxWeightTTVA_pt1000,
1106  if (Pt1000_Flavours.count(flavour)) return 1000;
1107  return 500;
1108  }

◆ unCalibPt()

float CP::IsolationCloseByCorrectionTool::unCalibPt ( const xAOD::IParticle particle) const
private

Definition at line 988 of file IsolationCloseByCorrectionTool.cxx.

988  {
989  if (!P) {
990  ATH_MSG_WARNING("No partcile given. Return stupidly big number. ");
991  return 1.e25;
992  }
994  if (!OR) {
995  ATH_MSG_VERBOSE("No reference from the shallow copy container of " << particleName(P) << " could be found");
996  return P->pt();
997  }
998  return OR->pt();
999  }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

IsoHelperMap m_isohelpers CP::IsolationCloseByCorrectionTool::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 306 of file IsolationCloseByCorrectionTool.h.

◆ ATLAS_THREAD_SAFE [2/2]

std::mutex m_isoHelpersMutex CP::IsolationCloseByCorrectionTool::ATLAS_THREAD_SAFE
mutableprivate

Mutex to protect the map if the method with signature getCloseByCorrection(std::vector<float>& corrections, const xAOD::IParticle& par, const std::vector<xAOD::Iso::IsolationType>& types, const xAOD::IParticleContainer& closePar) is called.

Definition at line 311 of file IsolationCloseByCorrectionTool.h.

◆ m_acc_passOR

SelectionAccessor CP::IsolationCloseByCorrectionTool::m_acc_passOR {nullptr}
private

Definition at line 302 of file IsolationCloseByCorrectionTool.h.

◆ m_acc_quality

SelectionAccessor CP::IsolationCloseByCorrectionTool::m_acc_quality {nullptr}
private

Definition at line 301 of file IsolationCloseByCorrectionTool.h.

◆ m_backup_prefix

Gaudi::Property<std::string> CP::IsolationCloseByCorrectionTool::m_backup_prefix
private
Initial value:
{
this, "BackupPrefix", "", "Prefix in front of the isolation variables, if the original cone values need to be backuped"}

Definition at line 219 of file IsolationCloseByCorrectionTool.h.

◆ m_CaloClusterKey

SG::ReadHandleKey<xAOD::CaloClusterContainer> CP::IsolationCloseByCorrectionTool::m_CaloClusterKey
private
Initial value:
{this, "CaloClusterContainer", "CaloCalTopoClusters",
"Name of the primary calo cluster container"}

Definition at line 281 of file IsolationCloseByCorrectionTool.h.

◆ m_caloDecSuffix

Gaudi::Property<std::string> CP::IsolationCloseByCorrectionTool::m_caloDecSuffix
private
Initial value:
{
this, "CaloDecSuffix", "", "Suffix added to output cluster variable names for close by corrections"}

Definition at line 224 of file IsolationCloseByCorrectionTool.h.

◆ m_caloExtTool

ToolHandle<Trk::IParticleCaloExtensionTool> CP::IsolationCloseByCorrectionTool::m_caloExtTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"}
private

calo extension tool for muon track particle extrapolation to calo

Definition at line 273 of file IsolationCloseByCorrectionTool.h.

◆ m_caloModel

Gaudi::Property<int> CP::IsolationCloseByCorrectionTool::m_caloModel {this, "CaloCorrectionModel", TopoConeCorrectionModel::SubtractObjectsDirectly}
private

EXPERT PROPERTIES.

Definition at line 228 of file IsolationCloseByCorrectionTool.h.

◆ m_ConeSizeVariation

Gaudi::Property<float> CP::IsolationCloseByCorrectionTool::m_ConeSizeVariation
private
Initial value:
{
this, "ExtrapolationConeSize", 1.2,
"Constant factor to be multiplied on top of the topo-etcone size if the reference particle is not a calorimeter particle in "
"order to account for extrapolation effects"}

Definition at line 251 of file IsolationCloseByCorrectionTool.h.

◆ m_coreConeEl

Gaudi::Property<float> CP::IsolationCloseByCorrectionTool::m_coreConeEl
private
Initial value:
{this, "CoreConeElectrons", 0.1,
"This is the size of the core cone for the topoetcone variables."}

Definition at line 231 of file IsolationCloseByCorrectionTool.h.

◆ m_coreConeMu

Gaudi::Property<float> CP::IsolationCloseByCorrectionTool::m_coreConeMu {this, "CoreConeMuons", 0.05, "This is the size of the core cone for the topoetcone variables."}
private

Definition at line 236 of file IsolationCloseByCorrectionTool.h.

◆ m_dec_isoselection

SelectionDecorator CP::IsolationCloseByCorrectionTool::m_dec_isoselection {nullptr}
private

Definition at line 303 of file IsolationCloseByCorrectionTool.h.

◆ m_declareCaloDecors

Gaudi::Property<bool> CP::IsolationCloseByCorrectionTool::m_declareCaloDecors {this, "declareCaloDecors", false, "If set to true, the data dependency on the calo/pflow decors will be declared"}
private

Definition at line 256 of file IsolationCloseByCorrectionTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_elecKeys

Gaudi::Property<std::vector<std::string> > CP::IsolationCloseByCorrectionTool::m_elecKeys
private
Initial value:
{
this, "EleContainers", {}, "Pipe the list of electron containers given later to the tool"}

Declare the data dependencies of the Input containers.

The isolation variables used in the working point calculation are declared to the avalanche scheduler. This is not needed for the AthAnalysis nor AnalysisBase releases.

Definition at line 261 of file IsolationCloseByCorrectionTool.h.

◆ m_electron_isoTypes

IsoVector CP::IsolationCloseByCorrectionTool::m_electron_isoTypes {}
private

Isolation variables used by the electron working point.

Definition at line 288 of file IsolationCloseByCorrectionTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_has_nonTTVA

bool CP::IsolationCloseByCorrectionTool::m_has_nonTTVA {false}
private

Switch whether a pile-up non robust TTVA working point is defined.

Definition at line 292 of file IsolationCloseByCorrectionTool.h.

◆ m_hasEtConeIso

bool CP::IsolationCloseByCorrectionTool::m_hasEtConeIso {false}
private

Switch whether a topoetcone isolation working point is defined.

Definition at line 296 of file IsolationCloseByCorrectionTool.h.

◆ m_hasPflowIso

bool CP::IsolationCloseByCorrectionTool::m_hasPflowIso {false}
private

Switch whether a pflow isolation working point is defined.

Definition at line 294 of file IsolationCloseByCorrectionTool.h.

◆ m_isInitialised

bool CP::IsolationCloseByCorrectionTool::m_isInitialised {false}
private

Definition at line 299 of file IsolationCloseByCorrectionTool.h.

◆ m_isoDecSuffix

Gaudi::Property<std::string> CP::IsolationCloseByCorrectionTool::m_isoDecSuffix
private
Initial value:
{
this, "IsoDecSuffix", "", "Suffix added to output isolation variable names for close by corrections"}

Definition at line 222 of file IsolationCloseByCorrectionTool.h.

◆ m_isoSelection_name

Gaudi::Property<std::string> CP::IsolationCloseByCorrectionTool::m_isoSelection_name {this, "IsolationSelectionDecorator", "", "Name of the final isolation decorator."}
private

Definition at line 217 of file IsolationCloseByCorrectionTool.h.

◆ m_isoVarKeys

SG::ReadDecorHandleKeyArray<xAOD::IParticleContainer> CP::IsolationCloseByCorrectionTool::m_isoVarKeys
private
Initial value:
{
this, "IsoVarKeys", {}, "The list is filled during the initialization"}

Definition at line 267 of file IsolationCloseByCorrectionTool.h.

◆ m_isoWriteDecVarKeys

SG::WriteDecorHandleKeyArray<xAOD::IParticleContainer> CP::IsolationCloseByCorrectionTool::m_isoWriteDecVarKeys
private
Initial value:
{
this, "IsoWriteDecVarKeys", {}, "The list is filled during the initialization"}

Definition at line 269 of file IsolationCloseByCorrectionTool.h.

◆ m_maxTopoPolution

Gaudi::Property<float> CP::IsolationCloseByCorrectionTool::m_maxTopoPolution
private
Initial value:
{
this, "MaxClusterFrac", 1.1,
"Maximum energy fraction a single cluster can make up to be considered as contributed to the isolation"}

Definition at line 247 of file IsolationCloseByCorrectionTool.h.

◆ m_muon_isoTypes

IsoVector CP::IsolationCloseByCorrectionTool::m_muon_isoTypes {}
private

Isolation variables used by the muon working point.

Definition at line 286 of file IsolationCloseByCorrectionTool.h.

◆ m_muonKeys

Gaudi::Property<std::vector<std::string> > CP::IsolationCloseByCorrectionTool::m_muonKeys
private
Initial value:
{
this, "MuoContainers", {}, "Pipe the list of muon containers given later to the tool"}

Definition at line 263 of file IsolationCloseByCorrectionTool.h.

◆ m_passOR_name

Gaudi::Property<std::string> CP::IsolationCloseByCorrectionTool::m_passOR_name
private
Initial value:
{this, "PassoverlapDecorator", "",
"Does the particle also need to pass the overlap removal?"}

Definition at line 215 of file IsolationCloseByCorrectionTool.h.

◆ m_PflowKey

SG::ReadHandleKey<xAOD::FlowElementContainer> CP::IsolationCloseByCorrectionTool::m_PflowKey
private
Initial value:
{this, "PflowContainer", "CHSNeutralParticleFlowObjects",
"Name of the neutral pflow elements"}

Definition at line 283 of file IsolationCloseByCorrectionTool.h.

◆ m_photKeys

Gaudi::Property<std::vector<std::string> > CP::IsolationCloseByCorrectionTool::m_photKeys
private
Initial value:
{
this, "PhoContainers", {}, "Pipe the list of photon containers given later to the tool"}

Definition at line 265 of file IsolationCloseByCorrectionTool.h.

◆ m_photon_isoTypes

IsoVector CP::IsolationCloseByCorrectionTool::m_photon_isoTypes {}
private

Isolation variables used by the photon working point.

Definition at line 290 of file IsolationCloseByCorrectionTool.h.

◆ m_ptvarconeRadius

Gaudi::Property<float> CP::IsolationCloseByCorrectionTool::m_ptvarconeRadius {this, "PtvarconeRadius", 1.e4, "This is the kT parameter for the ptvarcone variables."}
private

Definition at line 240 of file IsolationCloseByCorrectionTool.h.

◆ m_quality_name

Gaudi::Property<std::string> CP::IsolationCloseByCorrectionTool::m_quality_name
private
Initial value:
{
this, "SelectionDecorator", "",
"Name of the char auxdata defining whether the particle shall be considered for iso correction"}

Definition at line 212 of file IsolationCloseByCorrectionTool.h.

◆ m_selectorTool

ToolHandle<CP::IIsolationSelectionTool> CP::IsolationCloseByCorrectionTool::m_selectorTool
private
Initial value:
{this, "IsolationSelectionTool", "",
"Please give me your configured IsolationSelectionTool!"}

Definition at line 207 of file IsolationCloseByCorrectionTool.h.

◆ m_trkselTool

ToolHandle<InDet::IInDetTrackSelectionTool> CP::IsolationCloseByCorrectionTool::m_trkselTool
private
Initial value:
{
this, "TrackSelectionTool", "", "TrackSelectionTool to select tracks which made it actually into the isolation"}

Definition at line 203 of file IsolationCloseByCorrectionTool.h.

◆ m_ttvaTool

ToolHandle<CP::ITrackVertexAssociationTool> CP::IsolationCloseByCorrectionTool::m_ttvaTool
private
Initial value:
{this, "TTVASelectionTool", "",
"TTVASelectionTool to correct for the pile-up robust WPs"}

Definition at line 205 of file IsolationCloseByCorrectionTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_VtxKey

SG::ReadHandleKey<xAOD::VertexContainer> CP::IsolationCloseByCorrectionTool::m_VtxKey
private
Initial value:
{this, "VertexContainer", "PrimaryVertices",
"Name of the primary vertex container"}

Definition at line 279 of file IsolationCloseByCorrectionTool.h.


The documentation for this class was generated from the following files:
CP::IsolationCloseByCorrectionTool::copyIsoValuesForPartsNotSelected
CorrectionCode copyIsoValuesForPartsNotSelected(const xAOD::IParticle *part) const
Definition: IsolationCloseByCorrectionTool.cxx:409
CP::IsolationCloseByCorrectionTool::m_hasEtConeIso
bool m_hasEtConeIso
Switch whether a topoetcone isolation working point is defined.
Definition: IsolationCloseByCorrectionTool.h:296
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
CP::IsolationCloseByCorrectionTool::m_backup_prefix
Gaudi::Property< std::string > m_backup_prefix
Definition: IsolationCloseByCorrectionTool.h:219
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:74
xAOD::Iso::topoetcone
@ topoetcone
Topo-cluster ET-sum.
Definition: IsolationFlavour.h:25
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
CP::IsolationCloseByCorrectionTool::m_maxTopoPolution
Gaudi::Property< float > m_maxTopoPolution
Definition: IsolationCloseByCorrectionTool.h:247
test_pyathena.eta
eta
Definition: test_pyathena.py:10
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
CP::IsolationCloseByCorrectionTool::getAssociatedClusters
ClusterSet getAssociatedClusters(const EventContext &ctx, const xAOD::IParticle *particle, ObjectCache &cache) const
Loads the topo clusters associated with the primary IParticle.
Definition: IsolationCloseByCorrectionTool.cxx:533
CP::IsolationCloseByCorrectionTool::lockDecorations
void lockDecorations(const xAOD::IParticleContainer *parts) const
Definition: IsolationCloseByCorrectionTool.cxx:324
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
CP::IsolationCloseByCorrectionTool::m_ttvaTool
ToolHandle< CP::ITrackVertexAssociationTool > m_ttvaTool
Definition: IsolationCloseByCorrectionTool.h:205
xAOD::EgammaHelpers::getAssociatedTopoClusters
std::vector< const xAOD::CaloCluster * > getAssociatedTopoClusters(const xAOD::CaloCluster *cluster)
Return a vector of all the topo clusters associated with the egamma cluster.
Definition: EgammaxAODHelpers.cxx:65
CP::IsolationCloseByCorrectionTool::m_isoWriteDecVarKeys
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > m_isoWriteDecVarKeys
Definition: IsolationCloseByCorrectionTool.h:269
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
CP::IsolationCloseByCorrectionTool::isTrackIsoTTVA
static bool isTrackIsoTTVA(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1094
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
CP::IsolationCloseByCorrectionTool::isVarTrackIsoTTVA
static bool isVarTrackIsoTTVA(xAOD::Iso::IsolationType Iso)
Definition: IsolationCloseByCorrectionTool.cxx:1086
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CP::IsolationCloseByCorrectionTool::isFixedTrackIso
static bool isFixedTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1072
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CP::IsolationCloseByCorrectionTool::m_acc_quality
SelectionAccessor m_acc_quality
Definition: IsolationCloseByCorrectionTool.h:301
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
CP::IsolationCloseByCorrectionTool::m_declareCaloDecors
Gaudi::Property< bool > m_declareCaloDecors
Definition: IsolationCloseByCorrectionTool.h:256
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
CP::IsolationCloseByCorrectionTool::m_passOR_name
Gaudi::Property< std::string > m_passOR_name
Definition: IsolationCloseByCorrectionTool.h:215
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
JetTiledMap::W
@ W
Definition: TiledEtaPhiMap.h:44
xAOD::Iso::IsolationFlavour
IsolationFlavour
Enumeration for different ways of calculating isolation in xAOD files.
Definition: IsolationFlavour.h:17
CP::IsolationCloseByCorrectionTool::m_PflowKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_PflowKey
Definition: IsolationCloseByCorrectionTool.h:283
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
xAOD::Egamma_v1::e
virtual double e() const override final
The total energy of the particle.
Definition: Egamma_v1.cxx:90
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:78
DMTest::P
P_v1 P
Definition: P.h:23
CP::IsolationCloseByCorrectionTool::UseAveragedDecorators
@ UseAveragedDecorators
Definition: IsolationCloseByCorrectionTool.h:41
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
CP::PflowSet
std::set< FlowElementPtr > PflowSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:75
CP::IsolationCloseByCorrectionTool::passSelectionQuality
bool passSelectionQuality(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:608
DMTest::C
C_v1 C
Definition: C.h:26
CP::IsolationCloseByCorrectionTool::m_muonKeys
Gaudi::Property< std::vector< std::string > > m_muonKeys
Definition: IsolationCloseByCorrectionTool.h:263
CP::MeVtoGeV
constexpr float MeVtoGeV
Definition: IsolationCloseByCorrectionTool.cxx:38
CP::IsolationCloseByCorrectionTool::isTopoEtIso
static bool isTopoEtIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1077
CP::IsolationCloseByCorrectionTool::clusterEtMinusTile
static float clusterEtMinusTile(const xAOD::CaloCluster *C)
Definition: IsolationCloseByCorrectionTool.cxx:1052
CP::IsolationCloseByCorrectionTool::m_electron_isoTypes
IsoVector m_electron_isoTypes
Isolation variables used by the electron working point.
Definition: IsolationCloseByCorrectionTool.h:288
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
CP::TrackSet
std::set< TrackPtr > TrackSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:73
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
CP::IsolationCloseByCorrectionTool::m_elecKeys
Gaudi::Property< std::vector< std::string > > m_elecKeys
Declare the data dependencies of the Input containers.
Definition: IsolationCloseByCorrectionTool.h:261
CP::IsolationCloseByCorrectionTool::ATLAS_THREAD_SAFE
IsoHelperMap m_isohelpers ATLAS_THREAD_SAFE
Definition: IsolationCloseByCorrectionTool.h:306
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
CP::IsolationCloseByCorrectionTool::associateCluster
void associateCluster(const xAOD::IParticle *particle, float &eta, float &phi, float &energy) const override
Retrieve the associated clusters from the Particle and calculate the average eta/phi/energy.
Definition: IsolationCloseByCorrectionTool.cxx:854
xAOD::EgammaHelpers::getTrackParticles
std::set< const xAOD::TrackParticle * > getTrackParticles(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.
Definition: EgammaxAODHelpers.cxx:120
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
SG::AuxVectorData::lockDecoration
void lockDecoration(SG::auxid_t auxid)
Explicitly lock a decoration.
Definition: AuxVectorData.cxx:687
CP::CharDecorator
SG::AuxElement::Decorator< char > CharDecorator
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:20
CP::IsolationCloseByCorrectionTool::loadAssociatedObjects
void loadAssociatedObjects(const EventContext &ctx, ObjectCache &cache) const
Load all associated tracks / clusters / flow elements into the cache.
Definition: IsolationCloseByCorrectionTool.cxx:167
xAOD::Iso::neflowisol
@ neflowisol
neutral eflow
Definition: IsolationFlavour.h:31
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
xAOD::P4Helpers::deltaR2
double deltaR2(double rapidity1, double phi1, double rapidity2, double phi2)
from bare rapidity,phi
Definition: xAODP4Helpers.h:111
CP::IsolationCloseByCorrectionTool::m_caloModel
Gaudi::Property< int > m_caloModel
EXPERT PROPERTIES.
Definition: IsolationCloseByCorrectionTool.h:228
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
CP::IsolationCloseByCorrectionTool::isSame
bool isSame(const xAOD::IParticle *particle, const xAOD::IParticle *particle1) const
Definition: IsolationCloseByCorrectionTool.cxx:1014
CP::IsoType
xAOD::Iso::IsolationType IsoType
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:37
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
CP::CaloClusterPtr
SortedObjPtr< xAOD::CaloCluster > CaloClusterPtr
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:70
x
#define x
CP::IsolationCloseByCorrectionTool::performCloseByCorrection
CorrectionCode performCloseByCorrection(const EventContext &ctx, ObjectCache &cache) const
Definition: IsolationCloseByCorrectionTool.cxx:275
xAOD::Egamma_v1::nCaloClusters
size_t nCaloClusters() const
Return the number of xAOD::CaloClusters that define the electron candidate.
Definition: Egamma_v1.cxx:377
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
CP::FloatDecorator
SG::AuxElement::Decorator< float > FloatDecorator
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:23
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
CP::IsolationCloseByCorrectionTool::SubtractObjectsDirectly
@ SubtractObjectsDirectly
Definition: IsolationCloseByCorrectionTool.h:40
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
CP::IsolationCloseByCorrectionTool::m_coreConeMu
Gaudi::Property< float > m_coreConeMu
Definition: IsolationCloseByCorrectionTool.h:236
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CP::IsolationCloseByCorrectionTool::m_isoSelection_name
Gaudi::Property< std::string > m_isoSelection_name
Definition: IsolationCloseByCorrectionTool.h:217
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CP::IsolationCloseByCorrectionTool::m_photon_isoTypes
IsoVector m_photon_isoTypes
Isolation variables used by the photon working point.
Definition: IsolationCloseByCorrectionTool.h:290
xAOD::CaloCluster_v1::etaSample
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:525
CP::IsolationCloseByCorrectionTool::caloDecors
static const caloDecorNames & caloDecors()
Returns an array with the calo cluster decoration names [0]-> eta, [1]->phi, [2]->energy....
Definition: IsolationCloseByCorrectionTool.cxx:25
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
CP::IsolationCloseByCorrectionTool::m_has_nonTTVA
bool m_has_nonTTVA
Switch whether a pile-up non robust TTVA working point is defined.
Definition: IsolationCloseByCorrectionTool.h:292
CP::IsolationCloseByCorrectionTool::retrieveIDBestPrimaryVertex
const xAOD::Vertex * retrieveIDBestPrimaryVertex(const EventContext &ctx) const
Definition: IsolationCloseByCorrectionTool.cxx:962
xAOD::Cone
@ Cone
Definition: TrackingPrimitives.h:553
CP::IsolationCloseByCorrectionTool::m_ConeSizeVariation
Gaudi::Property< float > m_ConeSizeVariation
Definition: IsolationCloseByCorrectionTool.h:251
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CP::IsolationCloseByCorrectionTool::getAssocFlowElements
void getAssocFlowElements(const EventContext &ctx, ObjectCache &cache) const
Retrieve all Flow elements associated with the particles in the cache.
Definition: IsolationCloseByCorrectionTool.cxx:191
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
CP::IsolationCloseByCorrectionTool::m_muon_isoTypes
IsoVector m_muon_isoTypes
Isolation variables used by the muon working point.
Definition: IsolationCloseByCorrectionTool.h:286
CP::CorrectionCode::OutOfValidityRange
@ OutOfValidityRange
Input object is out of validity range.
Definition: CorrectionCode.h:37
CP::IsolationCloseByCorrectionTool::m_CaloClusterKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_CaloClusterKey
Definition: IsolationCloseByCorrectionTool.h:281
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
xAOD::Iso::ptvarcone
@ ptvarcone
mini isolation
Definition: IsolationFlavour.h:28
CP::IsolationCloseByCorrectionTool::isEgamma
static bool isEgamma(const xAOD::IParticle *particle)
Definition: IsolationCloseByCorrectionTool.cxx:525
CP::IsolationCloseByCorrectionTool::loadPrimaryParticles
void loadPrimaryParticles(const xAOD::IParticleContainer *container, ObjectCache &cache) const
Filter all electrons/muons/photons from the collection which pass the selection decoration.
Definition: IsolationCloseByCorrectionTool.cxx:141
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
StateLessPT_NewConfig.primary
primary
Definition: StateLessPT_NewConfig.py:234
xAOD::Iso::ptvarcone_Nonprompt_All_MaxWeightTTVALooseCone_pt1000
@ ptvarcone_Nonprompt_All_MaxWeightTTVALooseCone_pt1000
Definition: IsolationFlavour.h:42
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CP::IsolationCloseByCorrectionTool::deltaR2
float deltaR2(const xAOD::IParticle *particle, const xAOD::IParticle *particle1, bool AvgCalo=false) const
Definition: IsolationCloseByCorrectionTool.cxx:1022
asg::AsgToolConfig
an object that can create a AsgTool
Definition: AsgToolConfig.h:22
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
asg::AcceptInfo
Definition: AcceptInfo.h:28
CP::IsolationCloseByCorrectionTool::m_coreConeEl
Gaudi::Property< float > m_coreConeEl
Definition: IsolationCloseByCorrectionTool.h:231
HepMC::flow
int flow(const T &a, int i)
Definition: Flow.h:51
CP::IsolationCloseByCorrectionTool::coneSize
float coneSize(const xAOD::IParticle *particle, IsoType Cone) const
Definition: IsolationCloseByCorrectionTool.cxx:978
IsoCloseByCorrectionTest.containers
containers
Associate the close-by pflow objects and the calorimeter clusters.
Definition: IsoCloseByCorrectionTest.py:82
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
xAOD::P4Helpers::deltaR
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
Definition: xAODP4Helpers.h:150
CP::IsolationCloseByCorrectionTool::particleName
static std::string particleName(const xAOD::IParticle *C)
Definition: IsolationCloseByCorrectionTool.cxx:1063
CP::IsolationCloseByCorrectionTool::getCloseByCorrectionPflowIso
CorrectionCode getCloseByCorrectionPflowIso(const EventContext &ctx, const xAOD::IParticle *primary, const IsoType type, const ObjectCache &cache, float &isoValue) const
Definition: IsolationCloseByCorrectionTool.cxx:657
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.subdetectors.mmg.names
names
Definition: mmg.py:8
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
CP::IsolationCloseByCorrectionTool::passFirstStage
bool passFirstStage(const xAOD::TrackParticle *trk, const xAOD::Vertex *vtx) const
The Track particle has to pass the Track selection tool and the TTVA selection.
Definition: IsolationCloseByCorrectionTool.cxx:491
xAOD::Iso::IsolationType
IsolationType
Overall enumeration for isolation types in xAOD files.
Definition: IsolationType.h:26
CP::IsolationCloseByCorrectionTool::printIsolationCones
void printIsolationCones(const IsoVector &types, xAOD::Type::ObjectType T) const
Definition: IsolationCloseByCorrectionTool.cxx:1095
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:549
xAOD::Iso::ptcone_Nonprompt_All_MaxWeightTTVALooseCone_pt500
@ ptcone_Nonprompt_All_MaxWeightTTVALooseCone_pt500
ptcone for high mu
Definition: IsolationFlavour.h:45
CP::IsolationCloseByCorrectionTool::isFixedTrackIsoTTVA
static bool isFixedTrackIsoTTVA(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1078
xAOD::Egamma_v1::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition: Egamma_v1.cxx:388
xAOD::Iso::ptcone_Nonprompt_All_MaxWeightTTVA_pt500
@ ptcone_Nonprompt_All_MaxWeightTTVA_pt500
ptcone for high mu
Definition: IsolationFlavour.h:38
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
CP::IsolationCloseByCorrectionTool::isPFlowIso
static bool isPFlowIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1109
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
CP::IsolationCloseByCorrectionTool::m_photKeys
Gaudi::Property< std::vector< std::string > > m_photKeys
Definition: IsolationCloseByCorrectionTool.h:265
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
CP::IsolationCloseByCorrectionTool::m_caloExtTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtTool
calo extension tool for muon track particle extrapolation to calo
Definition: IsolationCloseByCorrectionTool.h:273
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
hist_file_dump.f
f
Definition: hist_file_dump.py:140
xAOD::Iso::ptvarcone_Nonprompt_All_MaxWeightTTVALooseCone_pt500
@ ptvarcone_Nonprompt_All_MaxWeightTTVALooseCone_pt500
Definition: IsolationFlavour.h:41
xAOD::Iso::ptcone
@ ptcone
Track isolation.
Definition: IsolationFlavour.h:22
xAOD::Egamma_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: Egamma_v1.cxx:75
xAOD::CaloCluster_v1::phiSample
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:540
CP::IsolationCloseByCorrectionTool::unCalibPt
float unCalibPt(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:988
CP::IsolationCloseByCorrectionTool::getAssociatedTracks
TrackSet getAssociatedTracks(const xAOD::IParticle *P) const
Retrieve all Inner detector tracks associated with the primary particle.
Definition: IsolationCloseByCorrectionTool.cxx:494
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::getIsolationAccessor
const SG::AuxElement::Accessor< float > * getIsolationAccessor(Iso::IsolationType type)
Get the Accessor object for a given isolation type.
Definition: getIsolationAccessor.cxx:24
CP::IsolationCloseByCorrectionTool::m_caloDecSuffix
Gaudi::Property< std::string > m_caloDecSuffix
Definition: IsolationCloseByCorrectionTool.h:224
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
CP::IsolationCloseByCorrectionTool::m_hasPflowIso
bool m_hasPflowIso
Switch whether a pflow isolation working point is defined.
Definition: IsolationCloseByCorrectionTool.h:294
CP::IsolationCloseByCorrectionTool::m_selectorTool
ToolHandle< CP::IIsolationSelectionTool > m_selectorTool
Definition: IsolationCloseByCorrectionTool.h:207
CP::IsolationCloseByCorrectionTool::m_isInitialised
bool m_isInitialised
Definition: IsolationCloseByCorrectionTool.h:299
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
xAOD::Iso::isolationFlavour
IsolationFlavour isolationFlavour(IsolationType type)
convert Isolation Type into Isolation Flavour
Definition: IsolationHelpers.h:47
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CP::IsolationCloseByCorrectionTool::m_acc_passOR
SelectionAccessor m_acc_passOR
Definition: IsolationCloseByCorrectionTool.h:302
CP::IsolationCloseByCorrectionTool::getExtrapEtaPhi
bool getExtrapEtaPhi(const EventContext &ctx, const xAOD::TrackParticle *tp, float &eta, float &phi) const
helper to get eta,phi of muon extrap
Definition: IsolationCloseByCorrectionTool.cxx:221
CP::IsolationCloseByCorrectionTool::getIsolationTypes
const IsoVector & getIsolationTypes(const xAOD::IParticle *particle) const
Definition: IsolationCloseByCorrectionTool.cxx:361
xAOD::Iso::ptvarcone_Nonprompt_All_MaxWeightTTVA_pt1000
@ ptvarcone_Nonprompt_All_MaxWeightTTVA_pt1000
Definition: IsolationFlavour.h:35
CP::IsolationCloseByCorrectionTool::m_isoDecSuffix
Gaudi::Property< std::string > m_isoDecSuffix
Definition: IsolationCloseByCorrectionTool.h:222
xAOD::CaloCluster_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
Definition: CaloCluster_v1.cxx:247
CP::IsolationCloseByCorrectionTool::pflowDecors
static const caloDecorNames & pflowDecors()
Definition: IsolationCloseByCorrectionTool.cxx:31
python.root_lsr_rank.types
types
Definition: root_lsr_rank.py:35
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
CP::IsolationCloseByCorrectionTool::m_trkselTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkselTool
Definition: IsolationCloseByCorrectionTool.h:203
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:28
weights
Definition: herwig7_interface.h:38
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
CP::IsolationCloseByCorrectionTool::getCloseByCorrectionTrackIso
CorrectionCode getCloseByCorrectionTrackIso(const xAOD::IParticle *primary, const IsoType type, const ObjectCache &cache, float &isoValue) const
Definition: IsolationCloseByCorrectionTool.cxx:614
xAOD::Iso::ptcone_Nonprompt_All_MaxWeightTTVALooseCone_pt1000
@ ptcone_Nonprompt_All_MaxWeightTTVALooseCone_pt1000
Definition: IsolationFlavour.h:46
CP::IsolationCloseByCorrectionTool::m_ptvarconeRadius
Gaudi::Property< float > m_ptvarconeRadius
Definition: IsolationCloseByCorrectionTool.h:240
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
CP::ClusterSet
std::set< CaloClusterPtr > ClusterSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:74
Muon
struct TBPatternUnitContext Muon
CP::IsolationCloseByCorrectionTool::subtractCloseByContribution
CorrectionCode subtractCloseByContribution(const EventContext &ctx, const xAOD::IParticle *P, ObjectCache &cache) const
Definition: IsolationCloseByCorrectionTool.cxx:373
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
CP::IsolationCloseByCorrectionTool::getCloseByCorrectionTopoIso
CorrectionCode getCloseByCorrectionTopoIso(const EventContext &ctx, const xAOD::IParticle *primary, const IsoType type, ObjectCache &cache, float &isoValue) const
Definition: IsolationCloseByCorrectionTool.cxx:729
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
python.HLT.Muon.MuonRecoSequences.isLRT
def isLRT(name)
Definition: MuonRecoSequences.py:65
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
CP::IsolationCloseByCorrectionTool::m_VtxKey
SG::ReadHandleKey< xAOD::VertexContainer > m_VtxKey
Definition: IsolationCloseByCorrectionTool.h:279
CheckAppliedSFs.WPs
WPs
Definition: CheckAppliedSFs.py:206
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CP::UnorderedContainerSet
std::unordered_set< const SG::AuxVectorData * > UnorderedContainerSet
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:78
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::IsolationCloseByCorrectionTool::getOriginalIsolation
virtual float getOriginalIsolation(const xAOD::IParticle &P, IsoType type) const override
Definition: IsolationCloseByCorrectionTool.cxx:1049
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
Root::OR
@ OR
Definition: TGRLCollection.h:32
CP::IsolationCloseByCorrectionTool::m_quality_name
Gaudi::Property< std::string > m_quality_name
Definition: IsolationCloseByCorrectionTool.h:212
CP::IsolationCloseByCorrectionTool::isTrackIso
static bool isTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1074
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
xAOD::Egamma_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: Egamma_v1.cxx:65
CP::IsolationCloseByCorrectionTool::caloDecorNames
std::array< std::string, 4 > caloDecorNames
Definition: IsolationCloseByCorrectionTool.h:45
xAOD::Iso::numIsolationTypes
@ numIsolationTypes
Definition: IsolationType.h:118
CP::FloatAccessor
SG::AuxElement::ConstAccessor< float > FloatAccessor
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:22
doL1CaloHVCorrections.parts
parts
Definition: doL1CaloHVCorrections.py:334
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: Egamma_v1.cxx:70
CP::IsolationCloseByCorrectionTool::overlap
bool overlap(const xAOD::IParticle *particle, const xAOD::IParticle *particle1, float dR) const
Definition: IsolationCloseByCorrectionTool.cxx:1036
CP::MinClusterEnergy
constexpr float MinClusterEnergy
Definition: IsolationCloseByCorrectionTool.cxx:37
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
CP::IsolationCloseByCorrectionTool::m_dec_isoselection
SelectionDecorator m_dec_isoselection
Definition: IsolationCloseByCorrectionTool.h:303
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:168
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAOD::getOriginalObject
const IParticle * getOriginalObject(const IParticle &copy)
This function can be used to conveniently get a pointer back to the original object from which a copy...
Definition: IParticleHelpers.cxx:140
Trk::CaloExtension::caloLayerIntersections
const std::vector< CurvilinearParameters > & caloLayerIntersections() const
access to the intersections with the calorimeter layers.
Definition: CaloExtension.h:59
xAOD::CaloCluster_v1::type
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
Definition: CaloCluster_v1.cxx:489
xAOD::CaloCluster_v1::hasSampling
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
Definition: CaloCluster_v1.h:882
asg::AcceptData
Definition: AcceptData.h:30
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:538
python.PyAthena.obj
obj
Definition: PyAthena.py:132
CP::IsolationCloseByCorrectionTool::isoRefParticle
const xAOD::IParticle * isoRefParticle(const xAOD::IParticle *particle) const override
Retrieve the reference particle to define the cone axis in which the track particles contributing to ...
Definition: IsolationCloseByCorrectionTool.cxx:1001
CP::IsolationCloseByCorrectionTool::getCloseByCorrection
virtual CorrectionCode getCloseByCorrection(std::vector< float > &corrections, const xAOD::IParticle &par, const std::vector< xAOD::Iso::IsolationType > &types, const xAOD::IParticleContainer &closePar) const override
Definition: IsolationCloseByCorrectionTool.cxx:435
SG::DataProxy
Definition: DataProxy.h:45
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:51
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27
CP::IsolationCloseByCorrectionTool::isVarTrackIso
static bool isVarTrackIso(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1073
python.compressB64.c
def c
Definition: compressB64.py:93
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:25
CP::IsolationCloseByCorrectionTool::declareDependency
void declareDependency(const std::vector< std::string > &containers, const IsoVector &types)
Helper function to declare the data dependencies.
Definition: IsolationCloseByCorrectionTool.cxx:123
xAOD::Iso::ptcone_Nonprompt_All_MaxWeightTTVA_pt1000
@ ptcone_Nonprompt_All_MaxWeightTTVA_pt1000
Definition: IsolationFlavour.h:39
CP::IsolationCloseByCorrectionTool::isoTypesFromWP
void isoTypesFromWP(const std::vector< std::unique_ptr< IsolationWP >> &WP, IsoVector &types)
Helper function to load all Isolation types from the iso working points.
Definition: IsolationCloseByCorrectionTool.cxx:102
CP::IsolationCloseByCorrectionTool::trackPtCut
static float trackPtCut(xAOD::Iso::IsolationType type)
Definition: IsolationCloseByCorrectionTool.cxx:1099
python.ParticleTypeUtil.info
def info
Definition: ParticleTypeUtil.py:87
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
xAOD::Iso::ptvarcone_Nonprompt_All_MaxWeightTTVA_pt500
@ ptvarcone_Nonprompt_All_MaxWeightTTVA_pt500
ptvarcone for high mu
Definition: IsolationFlavour.h:34
CP::IsoVector
std::vector< IsoType > IsoVector
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:38
CP::IsolationCloseByCorrectionTool::m_isoVarKeys
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_isoVarKeys
Definition: IsolationCloseByCorrectionTool.h:267
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
CP::TrackPtr
SortedObjPtr< xAOD::TrackParticle > TrackPtr
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:71
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
fitman.k
k
Definition: fitman.py:528
CP::CharAccessor
SG::AuxElement::ConstAccessor< char > CharAccessor
Definition: PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/Defs.h:19
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25