diff --git a/Reconstruction/eflowRec/eflowRec/PFMuonFlowElementAssoc.h b/Reconstruction/eflowRec/eflowRec/PFMuonFlowElementAssoc.h index df78e9cd954d039d60bd7a7b30837b3b0f399533..9afe4167cd6550af08091a25f810f68c4f68430f 100644 --- a/Reconstruction/eflowRec/eflowRec/PFMuonFlowElementAssoc.h +++ b/Reconstruction/eflowRec/eflowRec/PFMuonFlowElementAssoc.h @@ -50,17 +50,19 @@ private: /** Write key for adding charged Flow Element link decorations to muons **/ - SG::WriteDecorHandleKey<xAOD::MuonContainer> m_muonChargedFEWriteDecorKey; + SG::WriteDecorHandleKey<xAOD::MuonContainer> m_muonChargedFEWriteHandleKey{this,"MuonContainer","Muons.chargedFELinks","WriteHandleKey for muon link to charged FlowElements"}; + /** Write key for adding Muon link decorations to charged Flow Elements **/ - SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_ChargedFEmuonWriteDecorKey; + SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_ChargedFEmuonWriteHandleKey{this,"FlowElementOutputName","JetETMissChargedFlowElements.FE_MuonLinks","WriteHandleKey for Charged Flow Elements coupled to muons"}; /** Write key for adding neutral Flow Element link decorations to muons **/ - SG::WriteDecorHandleKey<xAOD::MuonContainer> m_muonNeutralFEWriteDecorKey; + SG::WriteDecorHandleKey<xAOD::MuonContainer> m_muonNeutralFEWriteHandleKey{this,"MuonContainer","Muons.neutralFELinks","WriteHandleKey for muon links to neutral FlowElement"}; + /** Write key for adding Muon link decorations to neutral Flow Elements **/ - SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_NeutralFEmuonWriteDecorKey; + SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_NeutralFEmuonWriteHandleKey{this,"FlowElementContainer","JetETMissNeutralFlowElements.MuonLinks","WriteHandleKey for neutral flow Elements to Muons"}; /** Write key for adding fraction of energy used in cell matching decorations to muons **/ - SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_NeutralFE_efrac_match_muonWriteDecorKey; + SG::WriteDecorHandleKey<xAOD::FlowElementContainer> m_NeutralFE_efrac_match_muonWriteHandleKey{this,"FlowElementContainer","JetETMissNeutralFlowElements.FE_efrac_matched_muon","WriteHandleKey for neutral FlowElements to Muons"}; /***Gaudi Property to configure linkage of Neutral Flow Elements to Muon clusters (EXPERIMENTAL - default = False/OFF) **/ Gaudi::Property<bool> m_LinkNeutralFEClusters{this,"m_LinkNeutralFEClusters",false,"Toggle usage of linkage of Neutral FlowElements - false by default (EXPERIMENTAL)"}; diff --git a/Reconstruction/eflowRec/src/PFMuonFlowElementAssoc.cxx b/Reconstruction/eflowRec/src/PFMuonFlowElementAssoc.cxx index 16ac967d19b5192d3eb671436533c72172084f62..6b687ab1d6a714ecceda58c938a12ed9f481c26a 100644 --- a/Reconstruction/eflowRec/src/PFMuonFlowElementAssoc.cxx +++ b/Reconstruction/eflowRec/src/PFMuonFlowElementAssoc.cxx @@ -25,11 +25,7 @@ PFMuonFlowElementAssoc::PFMuonFlowElementAssoc(const std::string& name, AthReentrantAlgorithm(name, pSvcLocator) { // Declare the decoration keys - declareProperty ("MuonChargedFlowElementDecorKey", m_muonChargedFEWriteDecorKey = "Muons.chargedFELinks"); // updated muon container with the new link - declareProperty("ChargedFlowElementMuonDecorKey", m_ChargedFEmuonWriteDecorKey="JetETMissChargedFlowElements.FE_MuonLinks"); // updated Charge - declareProperty ("MuonNeutralFlowElementDecorKey", m_muonNeutralFEWriteDecorKey = "Muons.neutralFELinks"); - declareProperty ("NeutralFlowElementMuonDecorKey",m_NeutralFEmuonWriteDecorKey = "JetETMissNeutralFlowElements.FE_MuonLinks"); - declareProperty ("NeutralFlowElement_efrac_matched_MuonDecorKey",m_NeutralFE_efrac_match_muonWriteDecorKey= "JetETMissNeutralFlowElements.FE_efrac_matched_muon"); + } PFMuonFlowElementAssoc::~PFMuonFlowElementAssoc() {} @@ -40,17 +36,18 @@ StatusCode PFMuonFlowElementAssoc::initialize() { ATH_MSG_DEBUG("Initializing " << name() << "..."); // Initialise the decoration keys - ATH_CHECK(m_muonChargedFEWriteDecorKey.initialize()); - ATH_CHECK(m_muonNeutralFEWriteDecorKey.initialize()); + ATH_CHECK(m_muonChargedFEWriteHandleKey.initialize()); + ATH_CHECK(m_muonNeutralFEWriteHandleKey.initialize()); - ATH_CHECK(m_ChargedFEmuonWriteDecorKey.initialize()); - ATH_CHECK(m_NeutralFEmuonWriteDecorKey.initialize()); + ATH_CHECK(m_ChargedFEmuonWriteHandleKey.initialize()); + ATH_CHECK(m_NeutralFEmuonWriteHandleKey.initialize()); + ATH_CHECK(m_NeutralFE_efrac_match_muonWriteHandleKey.initialize()); //init ReadHandleKeys ATH_CHECK(m_muonReadHandleKey.initialize()); ATH_CHECK(m_chargedFEReadHandleKey.initialize()); ATH_CHECK(m_neutralFEReadHandleKey.initialize()); - ATH_CHECK(m_NeutralFE_efrac_match_muonWriteDecorKey.initialize()); + ATH_MSG_DEBUG("Initialization completed successfully"); @@ -72,14 +69,14 @@ StatusCode PFMuonFlowElementAssoc::execute(const EventContext & ctx) const ATH_MSG_DEBUG("Started execute step"); // Get container for muons - SG::WriteDecorHandle<xAOD::MuonContainer,std::vector<FlowElementLink_t> > muonChargedFEWriteDecorHandle (m_muonChargedFEWriteDecorKey,ctx); - SG::WriteDecorHandle<xAOD::MuonContainer,std::vector<FlowElementLink_t> > muonNeutralFEWriteDecorHandle (m_muonNeutralFEWriteDecorKey,ctx); + SG::WriteDecorHandle<xAOD::MuonContainer,std::vector<FlowElementLink_t> > muonChargedFEWriteDecorHandle (m_muonChargedFEWriteHandleKey,ctx); + SG::WriteDecorHandle<xAOD::MuonContainer,std::vector<FlowElementLink_t> > muonNeutralFEWriteDecorHandle (m_muonNeutralFEWriteHandleKey,ctx); // get container for charged flow elements - SG::WriteDecorHandle<xAOD::FlowElementContainer,std::vector<MuonLink_t> > ChargedFEmuonWriteDecorHandle (m_ChargedFEmuonWriteDecorKey,ctx); - SG::WriteDecorHandle<xAOD::FlowElementContainer,std::vector<MuonLink_t> > NeutralFEmuonWriteDecorHandle(m_NeutralFEmuonWriteDecorKey,ctx); + SG::WriteDecorHandle<xAOD::FlowElementContainer,std::vector<MuonLink_t> > ChargedFEmuonWriteDecorHandle (m_ChargedFEmuonWriteHandleKey,ctx); + SG::WriteDecorHandle<xAOD::FlowElementContainer,std::vector<MuonLink_t> > NeutralFEmuonWriteDecorHandle(m_NeutralFEmuonWriteHandleKey,ctx); //extra container handle with frac_e matched between neutral FE cluster and Muon CaloCluster - SG::WriteDecorHandle<xAOD::FlowElementContainer,std::vector<double> > NeutralFE_efrac_match_muonWriteDecorHandle(m_NeutralFE_efrac_match_muonWriteDecorKey,ctx); + SG::WriteDecorHandle<xAOD::FlowElementContainer,std::vector<double> > NeutralFE_efrac_match_muonWriteDecorHandle(m_NeutralFE_efrac_match_muonWriteHandleKey,ctx); //store readhandles for muon and charged flow elements SG::ReadHandle<xAOD::MuonContainer> muonReadHandle (m_muonReadHandleKey,ctx); // readhandle for muon