ATLAS Offline Software
PhysicsAnalysis
DerivationFramework
DerivationFrameworkLLP
src
AugmentationToolLeadingJets.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// AugmentationToolLeadingJets.cxx, (c) ATLAS Detector software
8
// Author: Louie Corpe (lcorpe@cern.ch)
9
//
10
11
#include "
DerivationFrameworkLLP/AugmentationToolLeadingJets.h
"
12
#include "
xAODJet/JetContainer.h
"
13
#include "
StoreGate/ReadHandle.h
"
14
#include "
StoreGate/WriteDecorHandle.h
"
15
#include <vector>
16
#include <string>
17
18
namespace
DerivationFramework
{
19
20
AugmentationToolLeadingJets::AugmentationToolLeadingJets
(
const
std::string&
t
,
21
const
std::string&
n
,
22
const
IInterface*
p
) :
23
base_class(
t
,
n
,
p
)
24
{
25
}
26
27
StatusCode
AugmentationToolLeadingJets::initialize
()
28
{
29
ATH_CHECK
(
AthAlgTool::initialize
() );
30
ATH_CHECK
(
m_jetKey
.
initialize
() );
31
ATH_CHECK
(
m_decorationKey
.
initialize
() );
32
return
StatusCode::SUCCESS;
33
}
34
35
StatusCode
AugmentationToolLeadingJets::addBranches
()
const
36
{
37
38
// Set up the decorators
39
SG::WriteDecorHandle<xAOD::JetContainer, bool>
decorator (
m_decorationKey
);
40
41
// CALCULATION OF THE NEW VARIABLE
42
// Get Primary vertex
43
SG::ReadHandle<xAOD::JetContainer>
jets
(
m_jetKey
);
44
int
counter
=0;
45
for
(
unsigned
int
i
=0 ;
i
<
jets
->size() ;
i
++){
46
auto
jet
= (*jets)[
i
] ;
47
if
(fabs(
jet
->eta()) < 2.5){
48
decorator(*
jet
) = (
counter
<2);
// pick the two leading jets only
49
counter
+=1;
50
}
else
{
51
decorator(*
jet
) = 0;
// pick the two leading jets only
52
}
53
}
54
return
StatusCode::SUCCESS;
55
}
56
}
SG::ReadHandle
Definition:
StoreGate/StoreGate/ReadHandle.h:67
initialize
void initialize()
Definition:
run_EoverP.cxx:894
DerivationFramework::AugmentationToolLeadingJets::m_decorationKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decorationKey
Definition:
AugmentationToolLeadingJets.h:33
defineDB.jets
jets
Definition:
JetTagCalibration/share/defineDB.py:24
read_hist_ntuple.t
t
Definition:
read_hist_ntuple.py:5
DerivationFramework::AugmentationToolLeadingJets::addBranches
virtual StatusCode addBranches() const override
Definition:
AugmentationToolLeadingJets.cxx:35
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:209
jet
Definition:
JetCalibTools_PlotJESFactors.cxx:23
lumiFormat.i
int i
Definition:
lumiFormat.py:85
beamspotman.n
n
Definition:
beamspotman.py:729
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::AugmentationToolLeadingJets::m_jetKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetKey
Definition:
AugmentationToolLeadingJets.h:31
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition:
StoreGate/StoreGate/WriteDecorHandle.h:100
WriteDecorHandle.h
Handle class for adding a decoration to an object.
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
DerivationFramework
THE reconstruction tool.
Definition:
ParticleSortingAlg.h:24
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition:
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DerivationFramework::AugmentationToolLeadingJets::AugmentationToolLeadingJets
AugmentationToolLeadingJets(const std::string &t, const std::string &n, const IInterface *p)
Definition:
AugmentationToolLeadingJets.cxx:20
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
JetContainer.h
ReadHandle.h
Handle class for reading from StoreGate.
DerivationFramework::AugmentationToolLeadingJets::initialize
virtual StatusCode initialize() override
Definition:
AugmentationToolLeadingJets.cxx:27
test_pyathena.counter
counter
Definition:
test_pyathena.py:15
AugmentationToolLeadingJets.h
Generated on Tue Sep 2 2025 21:07:30 for ATLAS Offline Software by
1.8.18