ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PFMuonFlowElementAssoc Class Reference

AthReentrantAlgorithm to associate Flow Elements (FEs) to Muons. More...

#include <PFMuonFlowElementAssoc.h>

Inheritance diagram for PFMuonFlowElementAssoc:
Collaboration diagram for PFMuonFlowElementAssoc:

Public Member Functions

 PFMuonFlowElementAssoc (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~PFMuonFlowElementAssoc ()
 
virtual StatusCode initialize ()
 
virtual StatusCode execute (const EventContext &ctx) const
 
 AthReentrantAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters: More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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 > &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
 

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

std::pair< double, double > doMuonCellMatching (bool &isCellMatched, const xAOD::CaloCluster &FECluster, const xAOD::CaloCluster &muonCluster) const
 Function that flags whether the FE cluster has any cell that is also in the muon list of cells. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::MuonContainerm_muonReadHandleKey {this,"MuonContainer","Muons","ReadHandleKey for Muons"}
 
SG::ReadHandleKey< xAOD::FlowElementContainerm_neutralFEReadHandleKey {this,"JetEtMissNeutralFlowElementContainer","JetETMissNeutralParticleFlowObjects","ReadHandleKey for neutral FlowElements"}
 
SG::ReadHandleKey< xAOD::FlowElementContainerm_chargedFEReadHandleKey {this,"JetEtMissChargedFlowElementContainer","JetETMissChargedParticleFlowObjects","ReadHandleKey for charged FlowElements"}
 
SG::WriteDecorHandleKey< xAOD::MuonContainerm_muonChargedFEWriteHandleKey {this,"MuonContainer_chargedFELinks","Muons.chargedFELinks","WriteHandleKey for muon link to charged FlowElements"}
 Write key for adding charged Flow Element link decorations to muons. More...
 
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_ChargedFE_energy_match_muonWriteHandleKey {this,"FlowElementContainer_ChargedFE_ennergy_matched_muon","JetETMissChargedParticleFlowObjects.FE_efrac_matched_muon","WriteHandleKey for the fraction of neutral FlowElements cluster energy used to match to Muons"}
 Write key for adding fraction of nFlowElement cluster energy used in cell matching decoration of FlowElementContainer - EXPERIMENTAL. More...
 
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_ChargedFEmuonWriteHandleKey {this,"JetETMissChargedFlowElements_FE_MuonLinks","JetETMissChargedParticleFlowObjects.FE_MuonLinks","WriteHandleKey for Charged Flow Elements coupled to muons"}
 Write key for adding Muon link decorations to charged Flow Elements. More...
 
SG::WriteDecorHandleKey< xAOD::MuonContainerm_muonNeutralFEWriteHandleKey {this,"MuonContainer_neutralFELinks","Muons.neutralFELinks","WriteHandleKey for muon links to neutral FlowElement"}
 Write key for adding neutral Flow Element link decorations to muons. More...
 
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_NeutralFEmuonWriteHandleKey {this,"JetETMissNeutralFlowElementContainer_FE_MuonLinks","JetETMissNeutralParticleFlowObjects.FE_MuonLinks","WriteHandleKey for neutral flow Elements to Muons"}
 Write key for adding Muon link decorations to neutral Flow Elements. More...
 
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_NeutralFE_efrac_match_muonWriteHandleKey {this,"FlowElementContainer_FE_efrac_matched_muon","JetETMissNeutralParticleFlowObjects.FE_efrac_matched_muon","WriteHandleKey for the fraction of neutral FlowElements cluster energy used to match to Muons"}
 Write key for adding fraction of nFlowElement cluster energy used in cell matching decoration of FlowElementContainer - EXPERIMENTAL. More...
 
SG::WriteDecorHandleKey< xAOD::MuonContainerm_muonNeutralFE_muon_efrac_WriteDecorHandleKey {this,"MuonContainer_muon_efrac_matched_FE","Muons.muon_efrac_matched_FE","WriteHandleKey for the fraction of muon cluster energy used to match to neutral Flow Elements"}
 Write key for adding fraction of Muon cluster energy used in cell matching decoration of MuonContainer -EXPERIMENTAL. More...
 
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_NeutralFEmuon_nMatches_WriteDecorHandleKey {this,"FlowElementContainer_nMatchedMuons","JetETMissNeutralParticleFlowObjects.FE_nMatchedMuons","WriteHandleKey for the number of muons matched to a given neutral flow element"}
 Write key to count number of muons matched to a given neutral FE - EXPERIMENTAL. More...
 
SG::WriteDecorHandleKey< xAOD::MuonContainerm_muon_ClusterInfo_deltaR_WriteDecorHandleKey {this,"MuonContainer_ClusterInfo_deltaR","Muons.ClusterInfo_deltaR","WriteHandleKey for the delta R between the muon and it's associated calocluster"}
 Write key to measure dR between calo clusters and the muon -EXPERIMENTAL. More...
 
SG::ReadDecorHandleKey< xAOD::CaloClusterContainerm_ClustCollectionLinkKey {this,"ElementLinkName", "MuonClusterCollection.constituentClusterLinks"}
 
Gaudi::Property< bool > m_LinkNeutralFEClusters {this,"LinkNeutralFEClusters",false,"Toggle usage of linkage of Neutral FlowElements - false by default (EXPERIMENTAL)"}
 Gaudi Property to configure linkage of Neutral Flow Elements to Muon clusters (EXPERIMENTAL - default = False/OFF) More...
 
Gaudi::Property< bool > m_useMuonTopoClusters {this,"useMuonTopoClusters",false,"Toggle usage of linker of muon associated topoclusters to flow elements - false by default (EXPERIMENTAL)"}
 (EXPERIMENTAL) Gaudi Property to configure linkage of Neutral FEs to TopoClusters associated to Muons. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. 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

AthReentrantAlgorithm to associate Flow Elements (FEs) to Muons.

Associates tracks from charged flow elements to Muons only (otherwise links to NULL)

Definition at line 29 of file PFMuonFlowElementAssoc.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PFMuonFlowElementAssoc()

PFMuonFlowElementAssoc::PFMuonFlowElementAssoc ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 25 of file PFMuonFlowElementAssoc.cxx.

25  :
26  AthReentrantAlgorithm(name, pSvcLocator) {
27  // Declare the decoration keys
28 }

◆ ~PFMuonFlowElementAssoc()

PFMuonFlowElementAssoc::~PFMuonFlowElementAssoc ( )
virtualdefault

Member Function Documentation

◆ AthReentrantAlgorithm()

AthReentrantAlgorithm::AthReentrantAlgorithm

Constructor with parameters:

Definition at line 90 of file AthReentrantAlgorithm.cxx.

22  :
24 {
25 
26  // Set up to run AthAlgorithmDHUpdate in sysInitialize before
27  // merging depedency lists. This extends the output dependency
28  // list with any symlinks implied by inheritance relations.
29  m_updateDataHandles =
30  std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
32  std::move (m_updateDataHandles));
33 }

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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; }

◆ doMuonCellMatching()

std::pair< double, double > PFMuonFlowElementAssoc::doMuonCellMatching ( bool &  isCellMatched,
const xAOD::CaloCluster FECluster,
const xAOD::CaloCluster muonCluster 
) const
private

Function that flags whether the FE cluster has any cell that is also in the muon list of cells.

If so the function sets isCellMatched to true and returns non-zero values of the sum of matched energy in the FE and muon clusters.

Definition at line 325 of file PFMuonFlowElementAssoc.cxx.

326  {
327 
328  const CaloClusterCellLink* FECellLinks = FECluster.getCellLinks();
329  if (!FECellLinks && !m_useMuonTopoClusters) {
330  ATH_MSG_WARNING("Flow Element CaloCluster CaloClusterCellLink is nullptr");
331  return std::make_pair(0.0,0.0);
332  }
333 
334  const CaloClusterCellLink* muonCellLinks = muonCluster.getCellLinks();
335  if (!muonCellLinks) {
336  ATH_MSG_WARNING("This Muon calo cluster does not have any cells associated to it");
337  return std::make_pair(0.0,0.0);
338  }
339 
340  //sum of energy of FE cells that are matched
341  double FE_matchedCellEnergy = 0;
342  //sum of energy of muon cells that are matched
343  double muon_matchedCellEnergy = 0;
344 
345  for (auto thisFECell : *FECellLinks){
346  Identifier FECellID = thisFECell->ID();
347  for (auto thisMuonCell : *muonCellLinks){
348  Identifier muonCellID = thisMuonCell->ID();
349  if (muonCellID == FECellID){
350  isCellMatched = true;
351  FE_matchedCellEnergy += thisFECell->e();
352  muon_matchedCellEnergy += thisMuonCell->e();
353  }//if FE cell is also a muon cell
354  }//loop on muon cells
355  }//loop on FE cluster cells
356 
357  return std::make_pair(FE_matchedCellEnergy,muon_matchedCellEnergy);
358 
359 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode PFMuonFlowElementAssoc::execute ( const EventContext &  ctx) const
virtual

not all muons have a track. catch the nullptrs in this case and skip

In short, this feature is an experimental linker between neutral FEs and Muons either by the following:
Case 1) Retrieve the CaloCluster(s) from the muon, and get any topocluster(s) associated to those, then link the topoclusters to the

neutral FEs Case 2) Retrieve the CaloCluster(s) from the muon then link to the neutral FEs

This code is switched using two switches:
m_LinkNeutralFEClusters (turns on the experimental feature)
m_useMuonTopoClusters (True= Case 1, False = Case 2)

Definition at line 61 of file PFMuonFlowElementAssoc.cxx.

61  {
62  // WriteDecorHandles for the charged/neutral Flow Elements and Muons
63  // Links a Muon that has a track to a charged flow element if possible
64 
65  ATH_MSG_VERBOSE("Started execute step");
66 
67  // Get container for muons
69  ctx);
71  ctx);
72  // get container for charged flow elements
74  ctx);
76  ctx);
77 
78  // extra container handles between neutral FE cluster and Muon CaloCluster - these are all for studies based on neutral Flow Element
79  // matching - All of these handles are experimental
80  SG::WriteDecorHandle<xAOD::FlowElementContainer, std::vector<double>> NeutralFE_efrac_match_muonWriteDecorHandle(
82  SG::WriteDecorHandle<xAOD::MuonContainer, std::vector<double>> muonNeutralFE_muon_efrac_WriteDecorHandle(
84  SG::WriteDecorHandle<xAOD::FlowElementContainer, int> NeutralFEmuon_nMatches_WriteDecorHandle(
86  SG::WriteDecorHandle<xAOD::MuonContainer, double> muon_ClusterInfo_deltaR_WriteDecorHandle(
88 
89  // store readhandles for muon and charged flow elements
90  SG::ReadHandle<xAOD::MuonContainer> muonReadHandle(m_muonReadHandleKey, ctx); // readhandle for muon
94  // now init some Flow element link containers
95  std::vector<std::vector<FlowElementLink_t>> muonChargedFEVec(muonReadHandle->size());
96  std::vector<std::vector<FlowElementLink_t>> muonNeutralFEVec(muonReadHandle->size());
97 
98  // for neutral flow element studies
99  std::vector<std::vector<double>> muonNeutralFE_frac_cluster_energy_matched_Vec(muonReadHandle->size());
100 
102 
103  // Loop over the Flow Elements
104 
106  // CHARGED LOOP
108  for (const xAOD::FlowElement* FE : *ChargedFEmuonWriteDecorHandle) {
109  // get the track associated to the charged flow element (or at least the index of said track)
110  size_t FETrackIndex = FE->chargedObjects().at(0)->index();
111  // Init a vector of element links to muons
112  std::vector<MuonLink_t> FEMuonLinks;
113 
114  //vector of fractions of FE cluster energy matched to muons
115  std::vector<double> FEMatchedClusterCellEnergies;
116  for (unsigned int counter = 0; counter < FE->otherObjects().size(); ++counter) FEMatchedClusterCellEnergies.push_back(0.0);
117 
118  // loop over muons in container
119  for (const xAOD::Muon* muon : *muonChargedFEWriteDecorHandle) {
120  const xAOD::TrackParticle* muon_trk = muon->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
122  if (!muon_trk) continue;
123  // skip muon matching if the following cases occur
124  int MuonType = muon->muonType();
125  int MuonAuthor = muon->author();
126  if (MuonType == xAOD::Muon::SiliconAssociatedForwardMuon) { // if muon is a forward muon, skip. Basically the tracks associated
127  // to this are the wrong type (InDetForwardTrackParticle instead of
128  // InDetTrackParticle), so the indices used would be wrong/generate
129  // spurious matches
130  ATH_MSG_DEBUG("Muon is identified as a forward muon, skipping");
131  continue;
132  }
133  if (MuonAuthor == xAOD::Muon::Author::STACO) { // remove muons primarily authored by STACO algorithm.
134  ATH_MSG_DEBUG("Muon is authored by STACO algorithm, skip");
135  continue;
136  }
137  size_t MuonTrkIndex = muon_trk->index();
138  if (MuonTrkIndex == FETrackIndex) {
139  // Add Muon element link to a vector
140  // index() is the unique index of the muon in the muon container
141  FEMuonLinks.emplace_back(*muonReadHandle, muon->index());
142  // Add flow element link to a vector
143  // index() is the unique index of the cFlowElement in the cFlowElementcontaine
144  muonChargedFEVec.at(muon->index()).emplace_back(*ChargedFEReadHandle, FE->index());
145  } // matching block
146 
147  //if in mode where we can access calorimeter cells, then we will check if any of the clusters
148  //that this chargedFE has modified have calorimeter cells that match the muons calorimeter cells
149  //if so then we will decorate the charged FE with the fraction of cluster energy that was matched
150  if (!m_useMuonTopoClusters){
151  const xAOD::CaloCluster* muonCluster = muon->cluster();
152  //these clusters are expected to be nullptr sometimes
153  if (!muonCluster) continue;
154  unsigned int counter = 0;
155  for (auto thisCluster : FE->otherObjects()){
156  const xAOD::CaloCluster* thisCaloCluster = dynamic_cast<const xAOD::CaloCluster*>(thisCluster);
157  bool isCellMatched = false;
158  std::pair <double,double> FEAndMuonMatchedCellEnergy = this->doMuonCellMatching(isCellMatched, *thisCaloCluster,*muonCluster);
159  FEMatchedClusterCellEnergies[counter] += FEAndMuonMatchedCellEnergy.first;
160  counter++;
161  }//loop over associated calorimeter clusters
162  }
163  }// end of muon loop
164 
165  chargedFE_energy_match_muonWriteHandle(*FE) = FEMatchedClusterCellEnergies;
166 
167  // Add vector of muon element links as decoration to FlowElement container
168  ChargedFEmuonWriteDecorHandle(*FE) = FEMuonLinks;
169  } // end of charged Flow Element loop
170 
172  // Loop over Neutral FlowElements
174 
184  ATH_MSG_VERBOSE("Experimental: Cluster Linkers between neutral FEs and Muons are used");
185  for (const xAOD::FlowElement* FE : *NeutralFEmuonWriteDecorHandle) {
186  int nMatchedFE = 0;
187  // get the index of the cluster corresponding to the Neutral FlowElements
188  ATH_MSG_DEBUG("P1");
189  ATH_MSG_DEBUG("FE with e, eta and phi" << FE->e() << ", " << FE->eta() << " and " << FE->phi());
190  const xAOD::IParticle* otherObject = FE->otherObjects().at(0);
191  //This is expected to happen for low energy FE - sometimes the linked cluster has E < 0 and
192  //is thinned away in the AOD
193  if (!otherObject){
194  ATH_MSG_DEBUG("No linked cluster for Neutral FE with E, eta and phi" << FE->e() << ", " << FE->eta() << " and " << FE->phi());
195  continue;
196  }
197  size_t FEclusterindex = otherObject->index();
198 
199  // FE->otherObjects returns a vector of IParticles. We only want the first one
200  const xAOD::IParticle* FE_Iparticle = FE->otherObjects().at(0);
201 
202  // dynamic cast to CaloCluster
203  const xAOD::CaloCluster* FE_cluster = dynamic_cast<const xAOD::CaloCluster*>(FE_Iparticle); // cast to CaloCluster
204 
205  // debug for Negative energy cluster
206 
207  double cluster_E = FE_cluster->p4().E();
208  bool neg_E_cluster = (cluster_E < 0.0);
209 
210  // design the vector of ElementLinks
211  std::vector<MuonLink_t> FEMuonLinks;
212  std::vector<double> FE_efrac_clustermatch;
213  std::vector<double> Muon_efrac_clustermatch;
214  for (const xAOD::Muon* muon : *muonNeutralFEWriteDecorHandle) {
215  // Retrieve the ElementLink vector of clusters
216  const xAOD::CaloCluster* cluster = muon->cluster();
217  // de-ref the element link to retrieve the pointer to the original object
218  // check if the ElementLink is valid
219  if (!cluster) {
220  ATH_MSG_DEBUG("Muon has an invalid link to cluster");
221  continue;
222  }
223  if (m_useMuonTopoClusters) {
224  // get the linker to the topo clusters
225  const std::vector<ElementLink<xAOD::CaloClusterContainer>>& linksToTopoClusters = acc_constClusterLinks(*cluster);
226  for (const ElementLink<xAOD::CaloClusterContainer>& TopoClusterLink : linksToTopoClusters) {
227  //This is expected to happen for low energy cluster - sometimes the linked cluster has E < 0 and
228  //is thinned away in the AOD
229  if (!TopoClusterLink.isValid()) {
230  ATH_MSG_DEBUG("Muon Calo cluster's TopoCluster link not found, skip");
231  continue;
232  }
233  const xAOD::CaloCluster* MuonTopoCluster = *TopoClusterLink; // de-ref the link to get the topo-cluster
234  size_t MuonTopoCluster_index = MuonTopoCluster->index();
235  if (MuonTopoCluster_index == FEclusterindex) {
236  // Add Muon element link to a vector
237  // index() is the unique index of the muon in the muon container
238  FEMuonLinks.emplace_back(*muonReadHandle, muon->index());
239  // index() is the unique index of the cFlowElement in the cFlowElementcontaine
240  muonNeutralFEVec.at(muon->index()).emplace_back(*NeutralFEReadHandle, FE->index());
241  ATH_MSG_VERBOSE("Got a match between NFE and Muon");
242  nMatchedFE++; // count number of matches between FE and muons
243  if (neg_E_cluster) ATH_MSG_ERROR("Muon cluster matched to negative E topocluster from FE");
244  } // check block of index matching
245  } // end of loop over element links
246  } // end of TopoCluster specific block
247  else { // case when we don't use Topoclusters, just match the caloclusters to the flow element
248  // if we don't match topoclusters, do something more complex:
249  // Retrieve cells in both the FE cluster and muon cluster
250  // Define the link as where at least one calo cell is shared between the FE cluster and the Muon Cluster
251 
252  bool isCellMatched = false;
253  std::pair<double,double> FEAndMuonMatchedCellEnergy = this->doMuonCellMatching(isCellMatched, *FE_cluster,*cluster);
254 
255  double FE_sum_matched_cellEnergy = FEAndMuonMatchedCellEnergy.first;
256  double Muon_sum_matched_cellEnergy = FEAndMuonMatchedCellEnergy.second;
257 
258  double frac_FE_cluster_energy_matched = 0;
259  // retrieve total cluster energy from the FE cluster
260  double tot_FE_cluster_energy = FE_cluster->e();
261  if (tot_FE_cluster_energy != 0) { // ! div 0
262  frac_FE_cluster_energy_matched = FE_sum_matched_cellEnergy / tot_FE_cluster_energy;
263  }
264  double tot_muon_cluster_energy = cluster->e();
265  double frac_muon_cluster_energy_matched = 0;
266  if (tot_muon_cluster_energy != 0) {
267  frac_muon_cluster_energy_matched = Muon_sum_matched_cellEnergy / tot_muon_cluster_energy;
268  }
269  if (frac_FE_cluster_energy_matched > 0) {
270  ATH_MSG_VERBOSE("Fraction of FE cluster energy used in match: " << frac_FE_cluster_energy_matched << ", ismatched? "
271  << isCellMatched << "");
272  ATH_MSG_VERBOSE("Numerator and denominator are " << FE_sum_matched_cellEnergy << " and " << tot_FE_cluster_energy);
273  ATH_MSG_VERBOSE("Fraction of Muon cluster energy used in match: " << frac_muon_cluster_energy_matched << "");
274  }
275 
276  if (isCellMatched) { // cell matched => Link the two objects.
277  // Add Muon element link to a vector
278  // index() is the unique index of the muon in the muon container
279  FEMuonLinks.emplace_back(*muonReadHandle, muon->index());
280  // index() is the unique index of the nFlowElement in the nFlowElementcontainer
281  muonNeutralFEVec.at(muon->index()).emplace_back(*NeutralFEReadHandle, FE->index());
282  // save the energy fraction used in the cluster matching - mostly for debug/extension studies
283  FE_efrac_clustermatch.push_back(frac_FE_cluster_energy_matched); // fraction of FE cluster energy matched
284  muonNeutralFE_frac_cluster_energy_matched_Vec.at(muon->index())
285  .push_back(frac_muon_cluster_energy_matched); // fraction of Muon cluster energy matched
286  nMatchedFE++; // count number of matches incrementally
287  if (neg_E_cluster) { ATH_MSG_ERROR("Muon cluster matched to negative E topocluster from FE"); }
288  }
289 
290  } // end of calocluster specific block
291  // loop over caloclusters
292  } // loop over muons
293  NeutralFEmuon_nMatches_WriteDecorHandle(*FE) = nMatchedFE;
294  NeutralFEmuonWriteDecorHandle(*FE) = FEMuonLinks;
295  NeutralFE_efrac_match_muonWriteDecorHandle(*FE) = FE_efrac_clustermatch;
296  } // loop over neutral FE
297  } // end of the Gaudi check block
298 
300  // WRITE OUTPUT: ADD HANDLES TO MUON CONTAINERS
302  // Add the vectors of the Flow Element Links as decoations to the muon container
303  for (const xAOD::Muon* muon : *muonChargedFEWriteDecorHandle) {
304  muonChargedFEWriteDecorHandle(*muon) = muonChargedFEVec.at(muon->index());
305  } // end of muon loop
306  if (m_LinkNeutralFEClusters) { // Experimental
307  for (const xAOD::Muon* muon : *muonNeutralFEWriteDecorHandle) {
308  if (!muonNeutralFEVec.empty()) {
309  muonNeutralFEWriteDecorHandle(*muon) = muonNeutralFEVec.at(muon->index());
310  muonNeutralFE_muon_efrac_WriteDecorHandle(*muon) = muonNeutralFE_frac_cluster_energy_matched_Vec.at(muon->index());
311  }
312  // For debug of the muon clusters used, add also: dR between caloclusters and number of caloclusters associated to each muon.
313  // retrieve element link again to cluster
314  // use elem link to retrieve container
315  const xAOD::CaloCluster* MuonCluster = muon->cluster();
316  // retrieve the vector of delta R between muon and its associated calo cluster.
317  muon_ClusterInfo_deltaR_WriteDecorHandle(*muon) = MuonCluster ? xAOD::P4Helpers::deltaR(MuonCluster,muon,false) : -1.;
318  }
319  } // end of experimental block
320  ATH_MSG_VERBOSE("Execute completed successfully");
321 
322  return StatusCode::SUCCESS;
323 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode PFMuonFlowElementAssoc::initialize ( )
virtual

Definition at line 33 of file PFMuonFlowElementAssoc.cxx.

33  {
34  ATH_MSG_VERBOSE("Initializing " << name() << "...");
35 
36  // Initialise the decoration keys
40  ATH_CHECK(m_ClustCollectionLinkKey.initialize());
44 
45  // init the experimental keys
49 
50  // init ReadHandleKeys
51  ATH_CHECK(m_muonReadHandleKey.initialize());
52  ATH_CHECK(m_chargedFEReadHandleKey.initialize());
53  ATH_CHECK(m_neutralFEReadHandleKey.initialize());
54 
55  ATH_MSG_VERBOSE("Initialization completed successfully");
56 
57  return StatusCode::SUCCESS;
58 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ m_ChargedFE_energy_match_muonWriteHandleKey

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFMuonFlowElementAssoc::m_ChargedFE_energy_match_muonWriteHandleKey {this,"FlowElementContainer_ChargedFE_ennergy_matched_muon","JetETMissChargedParticleFlowObjects.FE_efrac_matched_muon","WriteHandleKey for the fraction of neutral FlowElements cluster energy used to match to Muons"}
private

Write key for adding fraction of nFlowElement cluster energy used in cell matching decoration of FlowElementContainer - EXPERIMENTAL.

Definition at line 61 of file PFMuonFlowElementAssoc.h.

◆ m_ChargedFEmuonWriteHandleKey

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFMuonFlowElementAssoc::m_ChargedFEmuonWriteHandleKey {this,"JetETMissChargedFlowElements_FE_MuonLinks","JetETMissChargedParticleFlowObjects.FE_MuonLinks","WriteHandleKey for Charged Flow Elements coupled to muons"}
private

Write key for adding Muon link decorations to charged Flow Elements.

Definition at line 65 of file PFMuonFlowElementAssoc.h.

◆ m_chargedFEReadHandleKey

SG::ReadHandleKey<xAOD::FlowElementContainer> PFMuonFlowElementAssoc::m_chargedFEReadHandleKey {this,"JetEtMissChargedFlowElementContainer","JetETMissChargedParticleFlowObjects","ReadHandleKey for charged FlowElements"}
private

Definition at line 55 of file PFMuonFlowElementAssoc.h.

◆ m_ClustCollectionLinkKey

SG::ReadDecorHandleKey<xAOD::CaloClusterContainer> PFMuonFlowElementAssoc::m_ClustCollectionLinkKey {this,"ElementLinkName", "MuonClusterCollection.constituentClusterLinks"}
private

Definition at line 85 of file PFMuonFlowElementAssoc.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_LinkNeutralFEClusters

Gaudi::Property<bool> PFMuonFlowElementAssoc::m_LinkNeutralFEClusters {this,"LinkNeutralFEClusters",false,"Toggle usage of linkage of Neutral FlowElements - false by default (EXPERIMENTAL)"}
private

Gaudi Property to configure linkage of Neutral Flow Elements to Muon clusters (EXPERIMENTAL - default = False/OFF)

Definition at line 88 of file PFMuonFlowElementAssoc.h.

◆ m_muon_ClusterInfo_deltaR_WriteDecorHandleKey

SG::WriteDecorHandleKey<xAOD::MuonContainer> PFMuonFlowElementAssoc::m_muon_ClusterInfo_deltaR_WriteDecorHandleKey {this,"MuonContainer_ClusterInfo_deltaR","Muons.ClusterInfo_deltaR","WriteHandleKey for the delta R between the muon and it's associated calocluster"}
private

Write key to measure dR between calo clusters and the muon -EXPERIMENTAL.

Definition at line 83 of file PFMuonFlowElementAssoc.h.

◆ m_muonChargedFEWriteHandleKey

SG::WriteDecorHandleKey<xAOD::MuonContainer> PFMuonFlowElementAssoc::m_muonChargedFEWriteHandleKey {this,"MuonContainer_chargedFELinks","Muons.chargedFELinks","WriteHandleKey for muon link to charged FlowElements"}
private

Write key for adding charged Flow Element link decorations to muons.

Definition at line 58 of file PFMuonFlowElementAssoc.h.

◆ m_muonNeutralFE_muon_efrac_WriteDecorHandleKey

SG::WriteDecorHandleKey<xAOD::MuonContainer> PFMuonFlowElementAssoc::m_muonNeutralFE_muon_efrac_WriteDecorHandleKey {this,"MuonContainer_muon_efrac_matched_FE","Muons.muon_efrac_matched_FE","WriteHandleKey for the fraction of muon cluster energy used to match to neutral Flow Elements"}
private

Write key for adding fraction of Muon cluster energy used in cell matching decoration of MuonContainer -EXPERIMENTAL.

Definition at line 77 of file PFMuonFlowElementAssoc.h.

◆ m_muonNeutralFEWriteHandleKey

SG::WriteDecorHandleKey<xAOD::MuonContainer> PFMuonFlowElementAssoc::m_muonNeutralFEWriteHandleKey {this,"MuonContainer_neutralFELinks","Muons.neutralFELinks","WriteHandleKey for muon links to neutral FlowElement"}
private

Write key for adding neutral Flow Element link decorations to muons.

Definition at line 68 of file PFMuonFlowElementAssoc.h.

◆ m_muonReadHandleKey

SG::ReadHandleKey<xAOD::MuonContainer> PFMuonFlowElementAssoc::m_muonReadHandleKey {this,"MuonContainer","Muons","ReadHandleKey for Muons"}
private

Definition at line 51 of file PFMuonFlowElementAssoc.h.

◆ m_NeutralFE_efrac_match_muonWriteHandleKey

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFMuonFlowElementAssoc::m_NeutralFE_efrac_match_muonWriteHandleKey {this,"FlowElementContainer_FE_efrac_matched_muon","JetETMissNeutralParticleFlowObjects.FE_efrac_matched_muon","WriteHandleKey for the fraction of neutral FlowElements cluster energy used to match to Muons"}
private

Write key for adding fraction of nFlowElement cluster energy used in cell matching decoration of FlowElementContainer - EXPERIMENTAL.

Definition at line 74 of file PFMuonFlowElementAssoc.h.

◆ m_NeutralFEmuon_nMatches_WriteDecorHandleKey

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFMuonFlowElementAssoc::m_NeutralFEmuon_nMatches_WriteDecorHandleKey {this,"FlowElementContainer_nMatchedMuons","JetETMissNeutralParticleFlowObjects.FE_nMatchedMuons","WriteHandleKey for the number of muons matched to a given neutral flow element"}
private

Write key to count number of muons matched to a given neutral FE - EXPERIMENTAL.

Definition at line 80 of file PFMuonFlowElementAssoc.h.

◆ m_NeutralFEmuonWriteHandleKey

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFMuonFlowElementAssoc::m_NeutralFEmuonWriteHandleKey {this,"JetETMissNeutralFlowElementContainer_FE_MuonLinks","JetETMissNeutralParticleFlowObjects.FE_MuonLinks","WriteHandleKey for neutral flow Elements to Muons"}
private

Write key for adding Muon link decorations to neutral Flow Elements.

Definition at line 71 of file PFMuonFlowElementAssoc.h.

◆ m_neutralFEReadHandleKey

SG::ReadHandleKey<xAOD::FlowElementContainer> PFMuonFlowElementAssoc::m_neutralFEReadHandleKey {this,"JetEtMissNeutralFlowElementContainer","JetETMissNeutralParticleFlowObjects","ReadHandleKey for neutral FlowElements"}
private

Definition at line 53 of file PFMuonFlowElementAssoc.h.

◆ m_useMuonTopoClusters

Gaudi::Property<bool> PFMuonFlowElementAssoc::m_useMuonTopoClusters {this,"useMuonTopoClusters",false,"Toggle usage of linker of muon associated topoclusters to flow elements - false by default (EXPERIMENTAL)"}
private

(EXPERIMENTAL) Gaudi Property to configure linkage of Neutral FEs to TopoClusters associated to Muons.

Only works with previous option set to True (m_LinkNeutralFEClusters). True: Link FEs to Topoclusters associated to Muons False: Link FEs to CaloClusters associated to Muons

Definition at line 95 of file PFMuonFlowElementAssoc.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
PFMuonFlowElementAssoc::m_LinkNeutralFEClusters
Gaudi::Property< bool > m_LinkNeutralFEClusters
Gaudi Property to configure linkage of Neutral Flow Elements to Muon clusters (EXPERIMENTAL - default...
Definition: PFMuonFlowElementAssoc.h:88
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PFMuonFlowElementAssoc::m_ChargedFEmuonWriteHandleKey
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_ChargedFEmuonWriteHandleKey
Write key for adding Muon link decorations to charged Flow Elements.
Definition: PFMuonFlowElementAssoc.h:65
PFMuonFlowElementAssoc::m_NeutralFEmuonWriteHandleKey
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_NeutralFEmuonWriteHandleKey
Write key for adding Muon link decorations to neutral Flow Elements.
Definition: PFMuonFlowElementAssoc.h:71
PFMuonFlowElementAssoc::doMuonCellMatching
std::pair< double, double > doMuonCellMatching(bool &isCellMatched, const xAOD::CaloCluster &FECluster, const xAOD::CaloCluster &muonCluster) const
Function that flags whether the FE cluster has any cell that is also in the muon list of cells.
Definition: PFMuonFlowElementAssoc.cxx:325
PFMuonFlowElementAssoc::m_muon_ClusterInfo_deltaR_WriteDecorHandleKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muon_ClusterInfo_deltaR_WriteDecorHandleKey
Write key to measure dR between calo clusters and the muon -EXPERIMENTAL.
Definition: PFMuonFlowElementAssoc.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
PFMuonFlowElementAssoc::m_ChargedFE_energy_match_muonWriteHandleKey
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_ChargedFE_energy_match_muonWriteHandleKey
Write key for adding fraction of nFlowElement cluster energy used in cell matching decoration of Flow...
Definition: PFMuonFlowElementAssoc.h:61
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
PFMuonFlowElementAssoc::m_muonNeutralFE_muon_efrac_WriteDecorHandleKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonNeutralFE_muon_efrac_WriteDecorHandleKey
Write key for adding fraction of Muon cluster energy used in cell matching decoration of MuonContaine...
Definition: PFMuonFlowElementAssoc.h:77
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
PFMuonFlowElementAssoc::m_muonReadHandleKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonReadHandleKey
Definition: PFMuonFlowElementAssoc.h:51
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
xAOD::P4Helpers::deltaR
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
Definition: xAODP4Helpers.h:150
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:99
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
PFMuonFlowElementAssoc::m_muonChargedFEWriteHandleKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonChargedFEWriteHandleKey
Write key for adding charged Flow Element link decorations to muons.
Definition: PFMuonFlowElementAssoc.h:58
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
xAOD::CaloCluster_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: CaloCluster_v1.cxx:465
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
PFMuonFlowElementAssoc::m_NeutralFEmuon_nMatches_WriteDecorHandleKey
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_NeutralFEmuon_nMatches_WriteDecorHandleKey
Write key to count number of muons matched to a given neutral FE - EXPERIMENTAL.
Definition: PFMuonFlowElementAssoc.h:80
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
PFMuonFlowElementAssoc::m_chargedFEReadHandleKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_chargedFEReadHandleKey
Definition: PFMuonFlowElementAssoc.h:55
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
PFMuonFlowElementAssoc::m_muonNeutralFEWriteHandleKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonNeutralFEWriteHandleKey
Write key for adding neutral Flow Element link decorations to muons.
Definition: PFMuonFlowElementAssoc.h:68
PFMuonFlowElementAssoc::m_useMuonTopoClusters
Gaudi::Property< bool > m_useMuonTopoClusters
(EXPERIMENTAL) Gaudi Property to configure linkage of Neutral FEs to TopoClusters associated to Muons...
Definition: PFMuonFlowElementAssoc.h:95
MuonCluster
Definition: Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h:46
PFMuonFlowElementAssoc::m_neutralFEReadHandleKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_neutralFEReadHandleKey
Definition: PFMuonFlowElementAssoc.h:53
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::STACO
@ STACO
Tracks produced by STACO.
Definition: TrackingPrimitives.h:99
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
test_pyathena.counter
counter
Definition: test_pyathena.py:15
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
PFMuonFlowElementAssoc::m_ClustCollectionLinkKey
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > m_ClustCollectionLinkKey
Definition: PFMuonFlowElementAssoc.h:85
fitman.k
k
Definition: fitman.py:528
PFMuonFlowElementAssoc::m_NeutralFE_efrac_match_muonWriteHandleKey
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_NeutralFE_efrac_match_muonWriteHandleKey
Write key for adding fraction of nFlowElement cluster energy used in cell matching decoration of Flow...
Definition: PFMuonFlowElementAssoc.h:74
ServiceHandle< ICondSvc >
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25