ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetJvtEfficiency
JetJvtEfficiency
JvtEfficiencyToolBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef JETJVTEFFICIENCY_JVTEFFICIENCYTOOLBASE_H
6
#define JETJVTEFFICIENCY_JVTEFFICIENCYTOOLBASE_H
7
8
#include "
AsgDataHandles/ReadDecorHandle.h
"
9
#include "
AsgTools/AsgTool.h
"
10
#include "
AsgTools/PropertyWrapper.h
"
11
#include "
JetAnalysisInterfaces/IJvtEfficiencyTool.h
"
12
#include "
PATInterfaces/SystematicsTool.h
"
13
14
#include <TH2.h>
15
#include <memory>
16
17
namespace
CP
{
18
class
JvtEfficiencyToolBase
:
public
asg::AsgTool
,
19
public
CP::SystematicsTool
,
20
virtual
public
CP::IJvtEfficiencyTool
{
21
public
:
22
using
asg::AsgTool::AsgTool
;
23
virtual
~JvtEfficiencyToolBase
()
override
=
default
;
24
25
virtual
StatusCode
initialize
()
override
;
26
27
virtual
CorrectionCode
28
getEfficiencyScaleFactor
(
const
xAOD::Jet
&
jet
,
float
&sf)
const override
;
29
30
virtual
CorrectionCode
31
getInefficiencyScaleFactor
(
const
xAOD::Jet
&
jet
,
float
&sf)
const override
;
32
33
protected
:
34
Gaudi::Property<std::string>
m_jetContainer
{
35
this
,
"JetContainer"
,
""
,
36
"The name of the jet container, used to correctly initialize the read handles"
};
37
Gaudi::Property<bool>
m_doTruthRequirement
{
38
this
,
"DoTruthReq"
,
true
,
39
"Use the truth-matching requirement. **Strongly** recommended"
};
40
SG::ReadDecorHandleKey<xAOD::JetContainer>
m_truthHSLabel
{
41
this
,
"TruthHSLabel"
,
"isJvtHS"
,
"Label for truth-matched jets"
};
42
Gaudi::Property<float>
m_minEta
{
43
this
,
"MinEtaForJvt"
, -1,
"All jets with |eta| below this are out of range"
};
44
Gaudi::Property<float>
m_maxEta
{
45
this
,
"MaxEtaForJvt"
, 2.5,
"All jets with |eta| above this are out of range"
};
46
Gaudi::Property<float>
m_minPtForJvt
{
47
this
,
"MinPtForJvt"
, 20e3,
"All jets with pT below this are out of range"
};
48
Gaudi::Property<float>
m_maxPtForJvt
{
49
this
,
"MaxPtForJvt"
, 60e3,
"All jets with pT above this are out of range"
};
50
Gaudi::Property<float>
m_dummySFError
{
51
this
,
"DummySFError"
, 0.1,
"The amount by which to vary the dummy SF"
};
52
// NB: Use a string not a read handle key as this is not written with a write handle key
53
Gaudi::Property<std::string>
m_jetEtaName
{
54
this
,
"JetEtaName"
,
"eta"
,
"The name of the jet eta to use."
};
55
std::unique_ptr<TH2>
m_jvtHist
;
56
std::unique_ptr<TH2>
m_effHist
;
57
bool
m_useDummySFs
{
false
};
58
// The accessor for the jet eta
59
SG::ConstAccessor<float>
m_etaAcc
{
m_jetEtaName
};
60
// -1, 0 or +1 depending on the systematic
61
int
m_appliedSysSigma
= 0;
62
// TEMPORARY: Allow for using an accessor rather than the full decorhandle
63
std::optional<SG::AuxElement::ConstAccessor<char>>
m_accIsHS
;
64
66
StatusCode
initHists
(
const
std::string &
file
,
const
std::string &wp);
67
bool
isInRange
(
const
xAOD::Jet
&
jet
)
const
;
68
CorrectionCode
getEffImpl
(
float
x
,
float
y
,
float
&sf)
const
;
69
CorrectionCode
getIneffImpl
(
float
x
,
float
y
,
float
&sf)
const
;
70
};
71
}
// namespace CP
72
73
#endif
//> !JETJVTEFFICIENCY_JVTEFFICIENCYTOOLBASE_H
AsgTool.h
ReadDecorHandle.h
Handle class for reading a decoration on an object.
IJvtEfficiencyTool.h
PropertyWrapper.h
SystematicsTool.h
y
#define y
x
#define x
CP::CorrectionCode
Return value from object correction CP tools.
Definition
CorrectionCode.h:31
CP::IJvtEfficiencyTool
Definition
IJvtEfficiencyTool.h:22
CP::JvtEfficiencyToolBase
Definition
JvtEfficiencyToolBase.h:20
CP::JvtEfficiencyToolBase::m_minEta
Gaudi::Property< float > m_minEta
Definition
JvtEfficiencyToolBase.h:42
CP::JvtEfficiencyToolBase::initHists
StatusCode initHists(const std::string &file, const std::string &wp)
Read the input histograms. Passing an empty 'file' string uses dummy SFs.
Definition
JvtEfficiencyToolBase.cxx:85
CP::JvtEfficiencyToolBase::m_minPtForJvt
Gaudi::Property< float > m_minPtForJvt
Definition
JvtEfficiencyToolBase.h:46
CP::JvtEfficiencyToolBase::m_useDummySFs
bool m_useDummySFs
Definition
JvtEfficiencyToolBase.h:57
CP::JvtEfficiencyToolBase::m_maxEta
Gaudi::Property< float > m_maxEta
Definition
JvtEfficiencyToolBase.h:44
CP::JvtEfficiencyToolBase::getIneffImpl
CorrectionCode getIneffImpl(float x, float y, float &sf) const
Definition
JvtEfficiencyToolBase.cxx:137
CP::JvtEfficiencyToolBase::m_jvtHist
std::unique_ptr< TH2 > m_jvtHist
Definition
JvtEfficiencyToolBase.h:55
CP::JvtEfficiencyToolBase::m_etaAcc
SG::ConstAccessor< float > m_etaAcc
Definition
JvtEfficiencyToolBase.h:59
CP::JvtEfficiencyToolBase::m_effHist
std::unique_ptr< TH2 > m_effHist
Definition
JvtEfficiencyToolBase.h:56
CP::JvtEfficiencyToolBase::m_truthHSLabel
SG::ReadDecorHandleKey< xAOD::JetContainer > m_truthHSLabel
Definition
JvtEfficiencyToolBase.h:40
CP::JvtEfficiencyToolBase::m_appliedSysSigma
int m_appliedSysSigma
Definition
JvtEfficiencyToolBase.h:61
CP::JvtEfficiencyToolBase::m_doTruthRequirement
Gaudi::Property< bool > m_doTruthRequirement
Definition
JvtEfficiencyToolBase.h:37
CP::JvtEfficiencyToolBase::~JvtEfficiencyToolBase
virtual ~JvtEfficiencyToolBase() override=default
CP::JvtEfficiencyToolBase::getInefficiencyScaleFactor
virtual CorrectionCode getInefficiencyScaleFactor(const xAOD::Jet &jet, float &sf) const override
Calculate the inefficiency scale factor for the provided jet.
Definition
JvtEfficiencyToolBase.cxx:67
CP::JvtEfficiencyToolBase::getEffImpl
CorrectionCode getEffImpl(float x, float y, float &sf) const
Definition
JvtEfficiencyToolBase.cxx:124
CP::JvtEfficiencyToolBase::getEfficiencyScaleFactor
virtual CorrectionCode getEfficiencyScaleFactor(const xAOD::Jet &jet, float &sf) const override
Calculate the efficiency scale factor for the provided jet.
Definition
JvtEfficiencyToolBase.cxx:48
CP::JvtEfficiencyToolBase::m_jetContainer
Gaudi::Property< std::string > m_jetContainer
Definition
JvtEfficiencyToolBase.h:34
CP::JvtEfficiencyToolBase::m_accIsHS
std::optional< SG::AuxElement::ConstAccessor< char > > m_accIsHS
Definition
JvtEfficiencyToolBase.h:63
CP::JvtEfficiencyToolBase::m_maxPtForJvt
Gaudi::Property< float > m_maxPtForJvt
Definition
JvtEfficiencyToolBase.h:48
CP::JvtEfficiencyToolBase::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
JvtEfficiencyToolBase.cxx:31
CP::JvtEfficiencyToolBase::isInRange
bool isInRange(const xAOD::Jet &jet) const
Definition
JvtEfficiencyToolBase.cxx:155
CP::JvtEfficiencyToolBase::m_dummySFError
Gaudi::Property< float > m_dummySFError
Definition
JvtEfficiencyToolBase.h:50
CP::JvtEfficiencyToolBase::m_jetEtaName
Gaudi::Property< std::string > m_jetEtaName
Definition
JvtEfficiencyToolBase.h:53
CP::SystematicsTool
Base class for CP tools providing systematic variations.
Definition
SystematicsTool.h:48
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition
ConstAccessor.h:55
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition
StoreGate/StoreGate/ReadDecorHandleKey.h:86
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
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
file
TFile * file
Definition
tile_monitor.h:29
Generated on
for ATLAS Offline Software by
1.17.0