diff --git a/Reconstruction/eflowRec/eflowRec/PFOChargedCreatorAlgorithm.h b/Reconstruction/eflowRec/eflowRec/PFOChargedCreatorAlgorithm.h index 36f1341519bab859c20dabe97f19ff4cf9125a5d..04b8c515966216b4f83e8a0d9ba8aba2df222ff9 100644 --- a/Reconstruction/eflowRec/eflowRec/PFOChargedCreatorAlgorithm.h +++ b/Reconstruction/eflowRec/eflowRec/PFOChargedCreatorAlgorithm.h @@ -7,10 +7,7 @@ #include "GaudiKernel/ToolHandle.h" #include "StoreGate/DataHandle.h" -#include "TrackVertexAssociationTool/ITrackVertexAssociationTool.h" - #include "xAODPFlow/PFOContainer.h" -#include "xAODTracking/VertexContainer.h" class PFOChargedCreatorAlgorithm : public AthAlgorithm { @@ -21,7 +18,6 @@ public: ~PFOChargedCreatorAlgorithm() {} StatusCode initialize(); - void execute(const eflowCaloObject& energyFlowCaloObject, SG::WriteHandle<xAOD::PFOContainer>& chargedPFOContainerWriteHandle); StatusCode execute(); StatusCode finalize(); @@ -34,18 +30,11 @@ private: /** Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed */ Gaudi::Property<bool> m_eOverPMode{this,"EOverPMode",false,"Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed"}; - /** ToolHandle to tracking CP loose vertex selection tool */ - ToolHandle<CP::ITrackVertexAssociationTool> m_trackVertexAssociationTool{this,"TrackVertexAssociationTool","","ToolHandle to tracking CP loose vertex selection tool"}; - - /** ReadHandleKey for vertex container */ - SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainerReadHandleKey{this,"VertexContainerName","PrimaryVertices","ReadHandleKey for vertex container"}; - /** ReadHandleKey for eflowCaloObjectContainer */ SG::ReadHandleKey<eflowCaloObjectContainer> m_eflowCaloObjectContainerReadHandleKey{this,"eflowCaloObjectContainerName","eflowCaloObjects","ReadHandleKey for eflowCaloObjectContainer"}; /** WriteHandleKey for charged PFO */ SG::WriteHandleKey<xAOD::PFOContainer> m_chargedPFOContainerWriteHandleKey{this,"PFOOutputName","JetETMissChargedParticleFlowObjects","WriteHandleKey for charged PFO"}; - - + }; #endif diff --git a/Reconstruction/eflowRec/share/PFlowMTConfig.py b/Reconstruction/eflowRec/share/PFlowMTConfig.py index 56ac69502467e4bb3b7cd02af53d38ce9958e3f0..d66a7a19d599e328a984d3ec084fb465ba6ef962 100644 --- a/Reconstruction/eflowRec/share/PFlowMTConfig.py +++ b/Reconstruction/eflowRec/share/PFlowMTConfig.py @@ -187,10 +187,6 @@ topSequence += PFAlgorithm from eflowRec.eflowRecConf import PFOChargedCreatorAlgorithm PFOChargedCreatorAlgorithm = PFOChargedCreatorAlgorithm("PFOChargedCreatorAlgorithm") -from TrackVertexAssociationTool.TrackVertexAssociationToolConf import CP__TightTrackVertexAssociationTool -PFlowTrackVertexAssociationTool = CP__TightTrackVertexAssociationTool(name="PFlowTightCPTool", dzSinTheta_cut=2.0, doPV=True) -PFOChargedCreatorAlgorithm.TrackVertexAssociationTool = PFlowTrackVertexAssociationTool - topSequence += PFOChargedCreatorAlgorithm from eflowRec.eflowRecConf import PFONeutralCreatorAlgorithm diff --git a/Reconstruction/eflowRec/src/PFOChargedCreatorAlgorithm.cxx b/Reconstruction/eflowRec/src/PFOChargedCreatorAlgorithm.cxx index dde38be0878b80445a0f2ad4a8f37b5e37c9238c..bbca23ca89468e99e206b692bc723212f524855f 100644 --- a/Reconstruction/eflowRec/src/PFOChargedCreatorAlgorithm.cxx +++ b/Reconstruction/eflowRec/src/PFOChargedCreatorAlgorithm.cxx @@ -17,9 +17,6 @@ PFOChargedCreatorAlgorithm::PFOChargedCreatorAlgorithm(const std::string& name, StatusCode PFOChargedCreatorAlgorithm::initialize(){ - ATH_CHECK(m_trackVertexAssociationTool.retrieve()); - - ATH_CHECK(m_vertexContainerReadHandleKey.initialize()); ATH_CHECK(m_eflowCaloObjectContainerReadHandleKey.initialize()); ATH_CHECK(m_chargedPFOContainerWriteHandleKey.initialize()); @@ -27,18 +24,6 @@ StatusCode PFOChargedCreatorAlgorithm::initialize(){ return StatusCode::SUCCESS; } -void PFOChargedCreatorAlgorithm::execute(const eflowCaloObject& energyFlowCaloObject, SG::WriteHandle<xAOD::PFOContainer>& chargedPFOContainerWriteHandle){ - - ATH_MSG_DEBUG("Processing eflowCaloObject"); - - createChargedPFO(energyFlowCaloObject, true, chargedPFOContainerWriteHandle); - - SG::ReadHandle<xAOD::VertexContainer> vertexContainerReadHandle(m_vertexContainerReadHandleKey); - const xAOD::VertexContainer* theVertexContainer = vertexContainerReadHandle.ptr(); - addVertexLinksToChargedPFO(theVertexContainer, chargedPFOContainerWriteHandle); - -} - StatusCode PFOChargedCreatorAlgorithm::execute(){ ATH_MSG_DEBUG("Processing eflowCaloObjectContainer"); @@ -48,7 +33,7 @@ StatusCode PFOChargedCreatorAlgorithm::execute(){ /* Create Charged PFOs from all eflowCaloObjects */ SG::ReadHandle<eflowCaloObjectContainer> eflowCaloObjectContainerReadHandle(m_eflowCaloObjectContainerReadHandleKey); - for (auto thisEflowCaloObject : *eflowCaloObjectContainerReadHandle) execute(*thisEflowCaloObject,chargedPFOContainerWriteHandle); + for (auto thisEflowCaloObject : *eflowCaloObjectContainerReadHandle) createChargedPFO(*thisEflowCaloObject,true,chargedPFOContainerWriteHandle); return StatusCode::SUCCESS; } @@ -151,17 +136,3 @@ void PFOChargedCreatorAlgorithm::createChargedPFO(const eflowCaloObject& energyF }//loop over the tracks on the eflowCaloObject } - -void PFOChargedCreatorAlgorithm::addVertexLinksToChargedPFO(const xAOD::VertexContainer* theVertexContainer, SG::WriteHandle<xAOD::PFOContainer>& chargedPFOContainerWriteHandle){ - - //This is a loop on all xAOD::PFO with non-zero charge - for (auto theChargedPFO : *(chargedPFOContainerWriteHandle.ptr())){ - const xAOD::TrackParticle* theTrack = theChargedPFO->track(0); - if (theTrack){ - ElementLink< xAOD::VertexContainer> theVertexLink = m_trackVertexAssociationTool->getUniqueMatchVertexLink(*theTrack,*theVertexContainer); - bool haveSetLink = theChargedPFO->setVertexLink(theVertexLink); - if (!haveSetLink) ATH_MSG_WARNING(" Could not set vertex link on charged PFO"); - }//if valid pointer to xAOD::TrackParticle - } - -}