ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetRec
Root
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
7
#include "
JetRec/JetReclusterer.h
"
8
#include "
JetRec/JetFinder.h
"
9
10
using
fastjet::PseudoJet;
11
using
xAOD::JetContainer
;
12
13
using
NameList
=
IJetFinder::NameList
;
14
15
//**********************************************************************
16
17
JetReclusterer::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
25
JetReclusterer::~JetReclusterer
() =
default
;
26
27
//**********************************************************************
28
29
StatusCode
JetReclusterer::initialize
() {
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
41
int
JetReclusterer::groom
(
const
xAOD::Jet
& jin,
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
//**********************************************************************
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
PseudoJetVector
std::vector< fastjet::PseudoJet > PseudoJetVector
Definition
JetConstituentFiller.cxx:17
NameList
IJetConstituentsRetriever::NameList NameList
Definition
JetConstituentsRetriever.cxx:22
JetFinder.h
JetReclusterer.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
IJetFinder::NameList
std::vector< std::string > NameList
Type for ghost labels.
Definition
IJetFinder.h:36
JetReclusterer::print
virtual void print() const override
Print the state of the tool.
Definition
JetReclusterer.cxx:69
JetReclusterer::groom
virtual int groom(const xAOD::Jet &jin, const PseudoJetContainer &, xAOD::JetContainer &jout) const override
Transform jet.
Definition
JetReclusterer.cxx:41
JetReclusterer::~JetReclusterer
~JetReclusterer()
JetReclusterer::JetReclusterer
JetReclusterer(const std::string &name)
Definition
JetReclusterer.cxx:17
JetReclusterer::m_hcr
ToolHandle< IJetConstituentsRetriever > m_hcr
Definition
JetReclusterer.h:53
JetReclusterer::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
JetReclusterer.cxx:29
JetReclusterer::m_finder
ToolHandle< IJetFinder > m_finder
Definition
JetReclusterer.h:54
PseudoJetContainer
Definition
PseudoJetContainer.h:48
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0