ATLAS Offline Software
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 
10 using fastjet::PseudoJet;
11 using xAOD::JetContainer;
12 
14 
15 //**********************************************************************
16 
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 
69 void JetReclusterer::print() const {
70  ATH_MSG_INFO(" Jet finder: " << m_finder.name());
71 }
72 
73 //**********************************************************************
JetFinder.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
JetReclusterer::m_finder
ToolHandle< IJetFinder > m_finder
Definition: JetReclusterer.h:54
PseudoJetContainer
Definition: PseudoJetContainer.h:48
JetReclusterer.h
JetReclusterer::groom
virtual int groom(const xAOD::Jet &jin, const PseudoJetContainer &, xAOD::JetContainer &jout) const override
Transform jet.
Definition: JetReclusterer.cxx:41
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
JetReclusterer::m_hcr
ToolHandle< IJetConstituentsRetriever > m_hcr
Definition: JetReclusterer.h:53
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IJetFinder::NameList
std::vector< std::string > NameList
Type for ghost labels.
Definition: IJetFinder.h:36
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
JetReclusterer::~JetReclusterer
~JetReclusterer()
JetReclusterer::JetReclusterer
JetReclusterer(const std::string &name)
Definition: JetReclusterer.cxx:17
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
PseudoJetVector
std::vector< fastjet::PseudoJet > PseudoJetVector
Definition: JetConstituentFiller.cxx:17
NameList
IJetConstituentsRetriever::NameList NameList
Definition: JetConstituentsRetriever.cxx:22
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
JetReclusterer::print
virtual void print() const override
Print the state of the tool.
Definition: JetReclusterer.cxx:69
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition: JetContainer.h:17
JetReclusterer::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetReclusterer.cxx:29