ATLAS Offline Software
Loading...
Searching...
No Matches
JetReclusterer.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5// JetReclusterer.cxx
6
8#include "JetRec/JetFinder.h"
9
10using fastjet::PseudoJet;
12
14
15//**********************************************************************
16
17JetReclusterer::JetReclusterer(const std::string& name)
18 : AsgTool(name), m_hcr("",this), m_finder("",this) {
19 declareProperty("JetConstituentsRetriever", m_hcr);
20 declareProperty("JetFinder", m_finder);
21}
22
23//**********************************************************************
24
26
27//**********************************************************************
28
30 if ( m_hcr.empty() ) {
31 ATH_MSG_ERROR("Unable to retrieve jet constituent retriever.");
32 }
33 if ( m_finder.empty() ) {
34 ATH_MSG_ERROR("Unable to retrieve jet finder.");
35 }
36 return StatusCode::SUCCESS;
37}
38
39//**********************************************************************
40
42 const PseudoJetContainer&,
43 xAOD::JetContainer& jets) const {
44 if ( m_hcr.empty() ) {
45 ATH_MSG_WARNING("Jet does not have a jet constituent retriever.");
46 return 2;
47 }
48 PseudoJetVector inps;
49 NameList ghostlabs;
50 m_hcr->constituents(jin, inps, &ghostlabs);
51 if ( inps.empty() ) {
52 ATH_MSG_WARNING("Jet has no constituents.");
53 return 3;
54 }
55 // Cluster.
56 // PS 31/10/2017 Removinving the next line as compiler
57 // rightfully complains of an unused variable
58 // xAOD::JetInput::Type intype = jin.getInputType();
59
60 //m_finder->find(inps, jets, intype, ghostlabs);
61 // FIXME
62 ATH_MSG_WARNING("JetReclusterer::groom(): Jet finding has been disabled in transition to PseudoJetContainer usage!");
63 ATH_MSG_DEBUG("Jet count after reclustering: " << jets.size());
64 return 0;
65}
66
67//**********************************************************************
68
70 ATH_MSG_INFO(" Jet finder: " << m_finder.name());
71}
72
73//**********************************************************************
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
std::vector< fastjet::PseudoJet > PseudoJetVector
IJetConstituentsRetriever::NameList NameList
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< std::string > NameList
Type for ghost labels.
Definition IJetFinder.h:36
virtual void print() const override
Print the state of the tool.
virtual int groom(const xAOD::Jet &jin, const PseudoJetContainer &, xAOD::JetContainer &jout) const override
Transform jet.
JetReclusterer(const std::string &name)
ToolHandle< IJetConstituentsRetriever > m_hcr
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
ToolHandle< IJetFinder > m_finder
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".