|
ATLAS Offline Software
|
Go to the documentation of this file.
18 ISvcLocator* pSvcLocator)
19 : AnaAlgorithm (
name, pSvcLocator)
40 return StatusCode::SUCCESS;
46 const EventContext &ctx = Gaudi::Hive::currentContext();
51 return StatusCode::FAILURE;
55 using GTC = std::vector<ElementLink<DataVector<xAOD::IParticle> > >;
58 std::vector<SG::ReadDecorHandle<xAOD::JetContainer, GTC> > ghostTrackAccs;
61 ghostTrackAccs.emplace_back(
key, ctx);
67 std::vector<ElementLink<xAOD::IParticleContainer>> mergedGhosts;
68 for (
const auto& ghostTrackAcc: ghostTrackAccs) {
69 const GTC &ghosts = ghostTrackAcc( *
jet );
70 mergedGhosts.insert(mergedGhosts.end(), ghosts.begin(), ghosts.end());
72 mergedGhostDecor(*
jet) = std::move(mergedGhosts);
74 return StatusCode::SUCCESS;
SG::ReadHandleKey< xAOD::JetContainer > m_jetLocation
the jet collection we run on
SG::WriteDecorHandleKey< xAOD::JetContainer > m_mergedGhostContainer
the name of the output ghost collection
Select isolated Photons, Electrons and Muons.
JetGhostMergingAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< SG::ReadDecorHandleKey< xAOD::JetContainer > > m_ghostTrackKeys
internal vector to hold the ReadDecorHandles for the difference ghosts
StatusCode initialize() override
StatusCode execute() override
Gaudi::Property< std::vector< std::string > > m_inputGhostTrackNames