19 ATH_MSG_INFO(
"Initializing " << name() <<
" with properties:");
38 return StatusCode::FAILURE;
46 return StatusCode::SUCCESS;
57 if( !incoll.isValid() ) {
60 return StatusCode::SUCCESS;
69 ATH_MSG_DEBUG(
"Created new PseudoJetContainer \"" <<
m_outcoll.key() <<
"\" with size " << pjcont->size());
71 ATH_CHECK( outcoll.record(std::move(pjcont)) );
73 return StatusCode::SUCCESS;
79 std::vector<fastjet::PseudoJet> vpj;
81 #ifndef GENERATIONBASE
90 [[maybe_unused]]
const EventContext& unused_ctx = ctx;
95 auto extractor = std::make_unique<IParticleExtractor>(&cont,
m_label,
m_isGhost);
96 ATH_MSG_DEBUG(
"Created extractor: " << extractor->toString(0));
100 for(fastjet::PseudoJet& pj : vpj) {pj *=
ghostscale;}
104 auto pjcont = std::make_unique<PseudoJetContainer>(std::move(extractor), vpj);
105 ATH_MSG_DEBUG(
"New PseudoJetContainer size " << pjcont->size());
111std::vector<fastjet::PseudoJet>
113#ifndef GENERATIONBASE
120#ifndef GENERATIONBASE
121std::vector<fastjet::PseudoJet>
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
constexpr float ghostscale
Gaudi::Property< bool > m_useNeutral
Flag to define if neutral PFOs / FEs should be considered.
bool m_pflow
True if inputs are EM-scale topo clusters.
Gaudi::Property< bool > m_useChargedPV
Flag to define if charged PFOs / FEs should be matched to PV.
std::vector< fastjet::PseudoJet > createPseudoJets(const xAOD::IParticleContainer &) const
bool m_ufo
True if inputs are PFlow.
Gaudi::Property< std::string > m_label
Label for the collection.
Gaudi::Property< bool > m_useChargedPUsideband
Flag for PFlow sideband definition.
Gaudi::Property< bool > m_useCharged
Flag to define if charged PFOs / FEs should be considered.
SG::WriteHandleKey< PseudoJetContainer > m_outcoll
Output collection name.
bool m_emtopo
Determines whether the PJs should be made ghosts.
bool m_isGhost
Internal steering flags Set in initialize()
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainer_key
Gaudi::Property< bool > m_skipNegativeEnergy
Flag indicating to skip objects with E<0.
virtual std::unique_ptr< PseudoJetContainer > createPJContainer(const xAOD::IParticleContainer &cont, const EventContext &ctx) const
Method to construct the PseudoJetContainer and record in StoreGate.
Gaudi::Property< bool > m_byVertex
Flag for by-vertex jet reconstruction.
virtual void print() const
Dump to properties to the log.
virtual StatusCode execute(const EventContext &ctx) const override final
virtual StatusCode initialize() override final
Athena algorithm's Hooks.
Gaudi::Property< bool > m_negEnergyAsGhosts
Flag indicating to treat objects with E<0 as ghosts (useful for HI)
SG::ReadHandleKey< xAOD::IParticleContainer > m_incoll
Input collection name.
std::string find(const std::string &s)
return a remapped string
std::vector< fastjet::PseudoJet > EMToposToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy)
std::vector< fastjet::PseudoJet > PFlowsToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy, bool useChargedPFOs, bool useNeutralPFOs, bool useChargedPV, bool useChargedPUsideband, bool isUFO)
std::vector< fastjet::PseudoJet > IParticlesToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy)
std::vector< fastjet::PseudoJet > ByVertexPFlowsToPJs(const xAOD::IParticleContainer &ips, const xAOD::VertexContainer *pvs, bool skipNegativeEnergy, bool useChargedPFOs, bool useNeutralPFOs, bool isUFO)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.