ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetMissingEtID
JetSelectorTools
JetSelectorTools
JetCleaningTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef JETSELECTORTOOLS_JETCLEANINGTOOL_H
6
#define JETSELECTORTOOLS_JETCLEANINGTOOL_H
7
15
16
// Stdlib includes
17
#include <string>
18
#include <vector>
19
#include <unordered_map>
20
21
// Base classes
22
#include "
AsgTools/AsgTool.h
"
23
#include "
AsgTools/PropertyWrapper.h
"
24
#include "
AsgDataHandles/ReadDecorHandleKey.h
"
25
#include "
AsgDataHandles/WriteDecorHandleKey.h
"
26
#include "
JetInterface/IJetDecorator.h
"
27
#include "
JetInterface/IJetSelector.h
"
28
29
30
// The xAOD jet type
31
#include "
xAODJet/Jet.h
"
32
33
// Return object
34
#include "
PATCore/AcceptInfo.h
"
35
#include "
PATCore/AcceptData.h
"
36
37
namespace
JCT
{
class
HotCell
; }
38
39
class
JetCleaningTool
:
public
asg::AsgTool
,
virtual
public
IJetDecorator
,
virtual
public
IJetSelector
40
{
41
42
ASG_TOOL_CLASS2
(
JetCleaningTool
,
IJetDecorator
,
IJetSelector
)
43
44
public
:
46
enum
CleaningLevel
47
{
48
SuperLooseBadLLP
,
49
VeryLooseBadLLP
,
50
LooseBad
,
51
LooseBadLLP
,
52
LooseBadTrigger
,
53
TightBad
,
54
UnknownCut
55
};
56
58
JetCleaningTool
(
const
std::string &name =
"JetCleaningTool"
);
59
61
JetCleaningTool
(
const
CleaningLevel
alevel,
const
bool
doUgly =
false
);
62
64
JetCleaningTool
(
const
std::string &name,
const
CleaningLevel
alevel,
const
bool
doUgly =
false
);
65
67
virtual
~JetCleaningTool
();
68
70
virtual
StatusCode
initialize
()
override
;
71
72
const
asg::AcceptInfo
&
getAcceptInfo
()
const
73
{
74
return
m_accept
;
75
}
76
78
asg::AcceptData
accept
(
const
int
isJetClean,
const
int
fmaxIndex )
const
;
79
81
asg::AcceptData
accept
(
const
int
isJetClean,
82
const
double
sumpttrk,
//in MeV, same as sumpttrk
83
const
double
fmax,
84
const
double
eta
,
85
const
double
pt,
86
const
int
fmaxIndex )
const
;
87
89
asg::AcceptData
accept
(
const
double
emf,
90
const
double
hecf,
91
const
double
larq,
92
const
double
hecq,
93
const
double
sumpttrk,
//in MeV, same as sumpttrk
94
const
double
eta
,
//emscale Eta
95
const
double
pt,
//in MeV, same as sumpttrk
96
const
double
fmax,
97
const
double
negE ,
//in MeV
98
const
double
AverageLArQF,
99
const
int
fMaxIndex )
const
;
100
102
asg::AcceptData
accept
(
const
xAOD::Jet
&
jet
)
const
;
103
104
int
keep
(
const
xAOD::Jet
&
jet
)
const
final
105
{
return
static_cast<
bool
>
(
accept
(
jet
)); }
106
107
virtual
StatusCode
decorate
(
const
xAOD::JetContainer
&jets)
const override
;
108
110
bool
containsHotCells
(
const
xAOD::Jet
&
jet
,
const
unsigned
int
runNumber)
const
;
111
113
static
CleaningLevel
getCutLevel
(
const
std::string& );
114
static
std::string
getCutName
(
const
CleaningLevel
);
115
116
private
:
117
119
Gaudi::Property<std::string>
m_cutName
{
this
,
"CutLevel"
,
""
};
120
CleaningLevel
m_cutLevel
{
LooseBad
};
121
Gaudi::Property<bool>
m_doUgly
{
this
,
"DoUgly"
,
false
};
122
Gaudi::Property<bool>
m_useDecorations
{
this
,
"UseDecorations"
,
true
};
123
Gaudi::Property<bool>
m_useLooseDecorForTightCut
{
this
,
"UseLooseDecorForTightCut"
,
false
};
124
SG::ConstAccessor<char>
m_acc_jetClean
{
"DFCommonJets_jetClean_LooseBad"
};
125
126
//
127
Gaudi::Property<std::string>
m_jetContainerName
{
this
,
"JetContainer"
,
""
,
"SG key for input jet container"
};
128
SG::WriteDecorHandleKey<xAOD::JetContainer>
m_jetCleanKey
{
this
,
"JetCleaningName"
,
"isClean"
,
"SG key for output jet cleaning decoration"
};
129
asg::AcceptInfo
m_accept
;
130
132
Gaudi::Property<std::string>
m_hotCellsFile
{
this
,
"HotCellsFile"
,
""
};
133
std::unordered_map<unsigned int, std::vector<std::unique_ptr<JCT::HotCell>>>
m_hotCellsMap
;
134
StatusCode
readHotCells
();
135
136
void
missingVariable
(
const
std::string& varName)
const
;
137
138
};
// End: class definition
139
140
141
142
#endif
AcceptData.h
AcceptInfo.h
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition
AsgToolMacros.h:77
AsgTool.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
WriteDecorHandleKey.h
Jet.h
IJetDecorator.h
IJetSelector.h
PropertyWrapper.h
IJetDecorator
Interface for adding a decoration to a jet container.
Definition
IJetDecorator.h:21
IJetSelector
IJetSelector is a dual-use tool interface for a tool that selects a jet.
Definition
IJetSelector.h:19
JCT::HotCell
Definition
JetCleaningTool.cxx:39
JetCleaningTool::getAcceptInfo
const asg::AcceptInfo & getAcceptInfo() const
Definition
JetCleaningTool.h:72
JetCleaningTool::m_accept
asg::AcceptInfo m_accept
Definition
JetCleaningTool.h:129
JetCleaningTool::accept
asg::AcceptData accept(const int isJetClean, const int fmaxIndex) const
The DFCommonJets decoration accept method.
Definition
JetCleaningTool.cxx:145
JetCleaningTool::getCutLevel
static CleaningLevel getCutLevel(const std::string &)
Helpers for cut names.
Definition
JetCleaningTool.cxx:393
JetCleaningTool::JetCleaningTool
JetCleaningTool(const std::string &name="JetCleaningTool")
Standard constructor.
Definition
JetCleaningTool.cxx:89
JetCleaningTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition
JetCleaningTool.h:127
JetCleaningTool::m_acc_jetClean
SG::ConstAccessor< char > m_acc_jetClean
Definition
JetCleaningTool.h:124
JetCleaningTool::missingVariable
void missingVariable(const std::string &varName) const
Definition
JetCleaningTool.cxx:280
JetCleaningTool::m_cutName
Gaudi::Property< std::string > m_cutName
Name of the cut.
Definition
JetCleaningTool.h:119
JetCleaningTool::m_useDecorations
Gaudi::Property< bool > m_useDecorations
Definition
JetCleaningTool.h:122
JetCleaningTool::m_hotCellsMap
std::unordered_map< unsigned int, std::vector< std::unique_ptr< JCT::HotCell > > > m_hotCellsMap
Definition
JetCleaningTool.h:133
JetCleaningTool::containsHotCells
bool containsHotCells(const xAOD::Jet &jet, const unsigned int runNumber) const
Hot cell checks.
Definition
JetCleaningTool.cxx:377
JetCleaningTool::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
Definition
JetCleaningTool.cxx:362
JetCleaningTool::getCutName
static std::string getCutName(const CleaningLevel)
Definition
JetCleaningTool.cxx:404
JetCleaningTool::keep
int keep(const xAOD::Jet &jet) const final
Method to select.
Definition
JetCleaningTool.h:104
JetCleaningTool::m_hotCellsFile
Gaudi::Property< std::string > m_hotCellsFile
Hot cells caching.
Definition
JetCleaningTool.h:132
JetCleaningTool::m_cutLevel
CleaningLevel m_cutLevel
Definition
JetCleaningTool.h:120
JetCleaningTool::CleaningLevel
CleaningLevel
Levels of cut.
Definition
JetCleaningTool.h:47
JetCleaningTool::TightBad
@ TightBad
Definition
JetCleaningTool.h:53
JetCleaningTool::VeryLooseBadLLP
@ VeryLooseBadLLP
Definition
JetCleaningTool.h:49
JetCleaningTool::LooseBad
@ LooseBad
Definition
JetCleaningTool.h:50
JetCleaningTool::LooseBadTrigger
@ LooseBadTrigger
Definition
JetCleaningTool.h:52
JetCleaningTool::LooseBadLLP
@ LooseBadLLP
Definition
JetCleaningTool.h:51
JetCleaningTool::UnknownCut
@ UnknownCut
Definition
JetCleaningTool.h:54
JetCleaningTool::SuperLooseBadLLP
@ SuperLooseBadLLP
Definition
JetCleaningTool.h:48
JetCleaningTool::m_doUgly
Gaudi::Property< bool > m_doUgly
Definition
JetCleaningTool.h:121
JetCleaningTool::m_jetCleanKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetCleanKey
Definition
JetCleaningTool.h:128
JetCleaningTool::m_useLooseDecorForTightCut
Gaudi::Property< bool > m_useLooseDecorForTightCut
Definition
JetCleaningTool.h:123
JetCleaningTool::~JetCleaningTool
virtual ~JetCleaningTool()
Standard destructor.
JetCleaningTool::readHotCells
StatusCode readHotCells()
Hot cells reading helper.
Definition
JetCleaningTool.cxx:417
JetCleaningTool::initialize
virtual StatusCode initialize() override
Initialize method.
Definition
JetCleaningTool.cxx:116
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition
ConstAccessor.h:55
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
asg::AcceptData
Definition
AcceptData.h:31
asg::AcceptInfo
Definition
AcceptInfo.h:28
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
JCT
Definition
PhysicsAnalysis/JetMissingEtID/JetSelectorTools/JetSelectorTools/Helpers.h:22
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