ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetSubStructureMomentTools
Root
QwTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetSubStructureMomentTools/QwTool.h
"
6
#include "
JetSubStructureUtils/Qw.h
"
7
8
#include "
AsgDataHandles/WriteDecorHandle.h
"
9
10
11
QwTool::QwTool
(
const
std::string& myname)
12
:
JetSubStructureMomentToolsBase
(myname) {
13
}
14
15
StatusCode
QwTool::initialize
() {
16
if
(
m_jetContainerName
.empty()){
17
ATH_MSG_ERROR
(
"NSubjettinessTool needs to have its input jet container name configured!"
);
18
return
StatusCode::FAILURE;
19
}
20
21
m_Qw_Key
=
m_jetContainerName
+
"."
+
m_prefix
+
m_Qw_Key
.key();
22
ATH_CHECK
(
m_Qw_Key
.initialize());
23
24
return
StatusCode::SUCCESS;
25
}
26
27
StatusCode
QwTool::modify
(
xAOD::JetContainer
& jets)
const
{
28
SG::WriteDecorHandle<xAOD::JetContainer, float>
wdh_Qw(
m_Qw_Key
);
29
30
for
(
const
xAOD::Jet
* injet : jets){
31
fastjet::PseudoJet
jet
;
32
bool
decorate =
SetupDecoration
(
jet
, *injet);
33
float
qw_value = -999;
34
35
if
(decorate) {
36
static
const
JetSubStructureUtils::Qw
qw;
37
qw_value = qw.result(
jet
);
38
}
39
40
wdh_Qw(*injet) = qw_value;
41
}
42
43
return
StatusCode::SUCCESS;
44
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
WriteDecorHandle.h
Handle class for adding a decoration to an object.
QwTool.h
Qw.h
JetSubStructureMomentToolsBase::JetSubStructureMomentToolsBase
JetSubStructureMomentToolsBase(const std::string &name)
Definition
JetSubStructureMomentToolsBase.cxx:8
JetSubStructureMomentToolsBase::SetupDecoration
bool SetupDecoration(fastjet::PseudoJet &pseudojet, const xAOD::Jet &jet, bool requireJetStructure=false) const
Definition
JetSubStructureMomentToolsBase.cxx:30
JetSubStructureMomentToolsBase::m_prefix
std::string m_prefix
Definition
JetSubStructureMomentToolsBase.h:30
JetSubStructureUtils::Qw
Definition
Qw.h:34
QwTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition
QwTool.h:36
QwTool::QwTool
QwTool(const std::string &t)
Definition
QwTool.cxx:11
QwTool::m_Qw_Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_Qw_Key
Definition
QwTool.h:39
QwTool::modify
StatusCode modify(xAOD::JetContainer &jets) const override
Loop over calls to modifyJet.
Definition
QwTool.cxx:27
QwTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
QwTool.cxx:15
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition
StoreGate/StoreGate/WriteDecorHandle.h:100
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
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