8#include "fastjet/PseudoJet.hh"
21 ATH_MSG_ERROR(
"Jet grooming requested with no input ungroomed jets");
22 return StatusCode::FAILURE;
24 ATH_MSG_ERROR(
"Jet grooming requested with no input pseudojets");
25 return StatusCode::FAILURE;
29 ATH_MSG_WARNING(
"A non-empty value was found for the FinalPseudoJets WriteHandleKey -- this will be ignored!");
38 return StatusCode::SUCCESS;
43std::pair<std::unique_ptr<xAOD::JetContainer>,std::unique_ptr<SG::IAuxStore> >
JetGroomer::getJets()
const {
45 auto nullreturn = std::make_pair(std::unique_ptr<xAOD::JetContainer>(
nullptr), std::unique_ptr<SG::IAuxStore>(
nullptr));
63 auto groomedJets = std::make_unique<xAOD::JetContainer>();
64 auto auxCont = std::make_unique<xAOD::JetAuxContainer>();
65 groomedJets->setStore(auxCont.get());
71 auto groomPJVector = std::make_unique<PseudoJetVector>( );
72 groomPJVector->resize( jetContHandle->size() );
75 for (
const xAOD::Jet* parentJet: *jetContHandle){
77 this->
insertGroomedJet(*parentJet, *pjContHandle, *groomedJets, *groomPJVector);
83 if(!pjVectorHandle.
record(std::move(groomPJVector))){
88 return std::make_pair(std::move(groomedJets),std::move(auxCont));
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< PseudoJetContainer > m_inputPseudoJets
This is the input to the parent JetContainer. It is needed in order to re-assign the ghost constituen...
virtual void insertGroomedJet(const xAOD::Jet &, const PseudoJetContainer &, xAOD::JetContainer &, PseudoJetVector &) const =0
virtual std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > getJets() const override final
Method to build the collection and return it to the caller.
SG::WriteHandleKey< PseudoJetVector > m_finalPseudoJets
SG::ReadHandleKey< xAOD::JetContainer > m_inputJetContainer
Handle Input JetContainer (this contains the parent ungroomed jets to be trimmed)
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".