ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetUtils
JetUtils
JetCaloQualityUtils.h
Go to the documentation of this file.
1
// emacs, this file is -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
15
16
#ifndef JETUTIL_JETCALOQUALITYUTILS_H
17
#define JETUTIL_JETCALOQUALITYUTILS_H
18
19
#include "
JetUtils/JetCaloCalculations.h
"
20
#include "
xAODJet/Jet.h
"
21
#include <vector>
22
//#include "xAODJet/JetAttributes.h"
23
24
25
namespace
jet
{
26
27
using
xAOD::Jet
;
28
class
JetCaloQualityUtils
{
29
public
:
30
friend
class
JetCalcnLeadingCells
;
31
32
/* @brief Compute em fraction for the vector of e per sampling (jet->getAttribute(EnergyPerSampling))*/
33
static
double
emFraction
(
const
std::vector<float>& ePerSampling);
34
35
/* @brief Compute the maximum of E_layer/Ejet*/
36
static
double
fracSamplingMax
(
const
Jet
*
jet
,
int
& SamplingMax);
37
38
// /* @brief Compute Out-Of-Time energy fraction from cells*/
39
// static double jetOutOfTimeEnergyFraction(const Jet* jet, const double time=25, const bool doOnlyPos=false);
40
41
// /* @brief DEPRECATED still here to avoid a compilation failure in JetD3PDMaker/ */
42
static
double
jetOutOfTimeEnergyFractionClusters
(
const
Jet
* ,
const
double
,
const
bool
){
return
0;}
43
44
45
/* @brief Compute the jet energy fraction in HEC*/
46
static
double
hecF
(
const
Jet
*
jet
);
47
48
/* @brief Compute the jet energy fraction in presampler*/
49
static
double
presamplerFraction
(
const
Jet
*
jet
);
50
51
/* @brief Compute the jet energy fraction in TILEGAP3*/
52
static
double
tileGap3F
(
const
Jet
*
jet
);
53
54
/* @brief total negative energy in a jet*/
55
static
double
jetNegativeEnergy
(
const
Jet
*
jet
);
56
57
// isGoodTight , isGoodMedium, isGoodMedium and
58
// isBadTight, isBadMedium, isBad
59
// These functions are removed because DEPRECATED.
60
// Instead use IJetSelector and/or JetCleaningTool from PhysicsAnalysis/JetMissingEtID/JetSelectorTools
61
62
/* @brief Check if it is a ugly jet. Still needed in run2 ? */
63
static
bool
isUgly
(
const
Jet
*
jet
,
const
bool
recalculateQuantities=
false
);
64
65
66
private
:
67
/* @brief Compute the minimal number of objects containing at least threshold% of the jet energy */
68
static
int
compute_nLeading
(std::vector<double> &cell_energies,
const
float
& e,
const
float
& frac);
69
70
71
72
73
};
74
75
77
// Implement some of the task in JetCaloQualityUtils as JetCaloCalculator
78
79
// JETCALCFUNCDECL is a declaration shortcut defined in JetCaloHelper.h
80
81
using
xAOD::JetAttribute
;
82
83
/* @brief Compute the minimal number of cells containing at least threshold% of the jet energy*/
84
class
JetCalcnLeadingCells
:
virtual
public
JetCaloCalculator
{
85
protected
:
86
std::vector<double>
m_cell_energies
;
87
double
m_sumE_cells
{};
88
double
m_threshold
{};
89
90
JETCALCFUNCDECL
(
JetCalcnLeadingCells
,
JetAttribute::N90Constituents
,
m_threshold
= 0.9;);
91
};
92
93
94
/* @brief Compute Out-Of-Time energy fraction */
95
class
JetCalcOutOfTimeEnergyFraction
:
virtual
public
JetCaloCalculator
{
96
protected
:
97
double
m_sumE
{},
m_sumE_OOT
{};
98
public
:
99
double
timecut
;
100
bool
onlyPosEnergy
;
101
JETCALCFUNCDECL
(
JetCalcOutOfTimeEnergyFraction
,
JetAttribute::OotFracCells10
,
timecut
= 10;
onlyPosEnergy
=
false
;
m_sumE
=0;);
102
};
103
104
/* @brief Compute the jet timing information from calorimeter*/
105
106
class
JetCalcTimeCells
:
virtual
public
JetCaloCalculator
{
107
protected
:
108
double
m_time
{},
m_norm
{};
109
110
JETCALCFUNCDECL
(
JetCalcTimeCells
,
JetAttribute::Timing
,
m_norm
=0; );
111
112
};
113
114
115
/* @brief Compute the jet average quality factor */
116
class
JetCalcAverageLArQualityF
:
virtual
public
JetCaloCalculator
{
117
protected
:
118
double
m_qf
{},
m_norm
{};
119
bool
m_useTile
;
120
JETCALCFUNCDECL
(
JetCalcAverageLArQualityF
,
JetAttribute::AverageLArQF
,
m_useTile
=
false
;
m_norm
=0;);
121
122
};
123
124
/* @brief Compute the jet quality factor information*/
125
class
JetCalcQuality
:
virtual
public
JetCaloCalculator
{
126
protected
:
127
double
m_totE
{},
m_badE
{};
128
129
public
:
130
int
LArQualityCut
;
131
int
TileQualityCut
;
// =254
132
bool
includeTile
,
includeLAr
;
133
134
JETCALCFUNCDECL
(
JetCalcQuality
,
JetAttribute::LArQuality
,
includeTile
=
false
;
includeLAr
=
true
;
LArQualityCut
=4000 ;
TileQualityCut
=254;
m_totE
=0;
m_badE
=0;);
135
};
136
137
138
/* @brief Compute the jet quality factor information for HEC only*/
139
class
JetCalcQualityHEC
:
virtual
public
JetCalcQuality
{
140
public
:
141
142
//ABC this class does not include JETCALCFUNCDECL ?
143
bool
processConstituent
(
xAOD::JetConstituentVector::iterator
& iter);
144
//bool processCell(const CaloCell *theCell, weight_t);
145
JetCaloCalculator
*
clone
()
const
{
return
new
JetCalcQualityHEC
(*
this
); }
146
147
//bool processCell(const CaloCell *cell, weight_t w);
148
JetCalcQualityHEC
() :
JetCaloCalculator
(
JetAttribute
::HECQuality),
JetCalcQuality
(
JetAttribute
::HECQuality) { }
149
150
};
151
152
153
/* @brief total negative energy in a jet*/
154
class
JetCalcNegativeEnergy
:
virtual
public
JetCaloCalculator
{
155
protected
:
156
double
m_totE
{};
157
158
JETCALCFUNCDECL
(
JetCalcNegativeEnergy
,
JetAttribute::NegativeE
,
m_totE
=0; );
159
};
160
161
/* @brief total negative energy in a jet*/
162
class
JetCalcCentroid
:
virtual
public
JetCaloCalculator
{
163
protected
:
164
double
m_totE
{},
m_centroid_x
{},
m_centroid_y
{},
m_centroid_z
{};
165
166
167
JETCALCFUNCDECL
(
JetCalcCentroid
,
JetAttribute::CentroidR
,
m_totE
=0; );
168
};
169
171
class
JetCalcBadCellsFrac
:
virtual
public
JetCaloCalculator
{
172
protected
:
173
double
m_totE
{};
174
double
m_badE
{};
175
JETCALCFUNCDECL
(
JetCalcBadCellsFrac
,
JetAttribute::BchCorrCell
,
setName
(
"BchCorrCell"
););
176
177
};
178
179
}
180
#endif
Jet.h
JetCaloCalculations.h
jet::JetCalcAverageLArQualityF
Definition
JetCaloQualityUtils.h:116
jet::JetCalcAverageLArQualityF::JETCALCFUNCDECL
JETCALCFUNCDECL(JetCalcAverageLArQualityF, JetAttribute::AverageLArQF, m_useTile=false;m_norm=0;)
jet::JetCalcAverageLArQualityF::m_useTile
bool m_useTile
Definition
JetCaloQualityUtils.h:119
jet::JetCalcAverageLArQualityF::m_qf
double m_qf
Definition
JetCaloQualityUtils.h:118
jet::JetCalcAverageLArQualityF::m_norm
double m_norm
Definition
JetCaloQualityUtils.h:118
jet::JetCalcBadCellsFrac
Fraction of Bad energy in jet. From cluster moment ENG_BAD_CELLS.
Definition
JetCaloQualityUtils.h:171
jet::JetCalcBadCellsFrac::m_totE
double m_totE
Definition
JetCaloQualityUtils.h:173
jet::JetCalcBadCellsFrac::JETCALCFUNCDECL
JETCALCFUNCDECL(JetCalcBadCellsFrac, JetAttribute::BchCorrCell, setName("BchCorrCell");)
jet::JetCalcBadCellsFrac::m_badE
double m_badE
Definition
JetCaloQualityUtils.h:174
jet::JetCalcCentroid
Definition
JetCaloQualityUtils.h:162
jet::JetCalcCentroid::m_centroid_y
double m_centroid_y
Definition
JetCaloQualityUtils.h:164
jet::JetCalcCentroid::m_totE
double m_totE
Definition
JetCaloQualityUtils.h:164
jet::JetCalcCentroid::m_centroid_z
double m_centroid_z
Definition
JetCaloQualityUtils.h:164
jet::JetCalcCentroid::JETCALCFUNCDECL
JETCALCFUNCDECL(JetCalcCentroid, JetAttribute::CentroidR, m_totE=0;)
jet::JetCalcCentroid::m_centroid_x
double m_centroid_x
Definition
JetCaloQualityUtils.h:164
jet::JetCalcNegativeEnergy
Definition
JetCaloQualityUtils.h:154
jet::JetCalcNegativeEnergy::JETCALCFUNCDECL
JETCALCFUNCDECL(JetCalcNegativeEnergy, JetAttribute::NegativeE, m_totE=0;)
jet::JetCalcNegativeEnergy::m_totE
double m_totE
Definition
JetCaloQualityUtils.h:156
jet::JetCalcOutOfTimeEnergyFraction
Definition
JetCaloQualityUtils.h:95
jet::JetCalcOutOfTimeEnergyFraction::m_sumE
double m_sumE
Definition
JetCaloQualityUtils.h:97
jet::JetCalcOutOfTimeEnergyFraction::m_sumE_OOT
double m_sumE_OOT
Definition
JetCaloQualityUtils.h:97
jet::JetCalcOutOfTimeEnergyFraction::timecut
double timecut
Definition
JetCaloQualityUtils.h:99
jet::JetCalcOutOfTimeEnergyFraction::onlyPosEnergy
bool onlyPosEnergy
Definition
JetCaloQualityUtils.h:100
jet::JetCalcOutOfTimeEnergyFraction::JETCALCFUNCDECL
JETCALCFUNCDECL(JetCalcOutOfTimeEnergyFraction, JetAttribute::OotFracCells10, timecut=10;onlyPosEnergy=false;m_sumE=0;)
jet::JetCalcQualityHEC::clone
JetCaloCalculator * clone() const
Clone. Base class should not be cloned.
Definition
JetCaloQualityUtils.h:145
jet::JetCalcQualityHEC::processConstituent
bool processConstituent(xAOD::JetConstituentVector::iterator &iter)
Perform 1 calculation step using 1 constituent.
Definition
JetCaloQualityUtils.cxx:316
jet::JetCalcQualityHEC::JetCalcQualityHEC
JetCalcQualityHEC()
Definition
JetCaloQualityUtils.h:148
jet::JetCalcQuality
Definition
JetCaloQualityUtils.h:125
jet::JetCalcQuality::includeTile
bool includeTile
Definition
JetCaloQualityUtils.h:132
jet::JetCalcQuality::TileQualityCut
int TileQualityCut
Definition
JetCaloQualityUtils.h:131
jet::JetCalcQuality::JETCALCFUNCDECL
JETCALCFUNCDECL(JetCalcQuality, JetAttribute::LArQuality, includeTile=false;includeLAr=true;LArQualityCut=4000 ;TileQualityCut=254;m_totE=0;m_badE=0;)
jet::JetCalcQuality::LArQualityCut
int LArQualityCut
Definition
JetCaloQualityUtils.h:130
jet::JetCalcQuality::includeLAr
bool includeLAr
Definition
JetCaloQualityUtils.h:132
jet::JetCalcQuality::m_badE
double m_badE
Definition
JetCaloQualityUtils.h:127
jet::JetCalcQuality::m_totE
double m_totE
Definition
JetCaloQualityUtils.h:127
jet::JetCalcTimeCells
Definition
JetCaloQualityUtils.h:106
jet::JetCalcTimeCells::JETCALCFUNCDECL
JETCALCFUNCDECL(JetCalcTimeCells, JetAttribute::Timing, m_norm=0;)
jet::JetCalcTimeCells::m_time
double m_time
Definition
JetCaloQualityUtils.h:108
jet::JetCalcTimeCells::m_norm
double m_norm
Definition
JetCaloQualityUtils.h:108
jet::JetCalcnLeadingCells
Definition
JetCaloQualityUtils.h:84
jet::JetCalcnLeadingCells::m_threshold
double m_threshold
Definition
JetCaloQualityUtils.h:88
jet::JetCalcnLeadingCells::m_cell_energies
std::vector< double > m_cell_energies
Definition
JetCaloQualityUtils.h:86
jet::JetCalcnLeadingCells::JETCALCFUNCDECL
JETCALCFUNCDECL(JetCalcnLeadingCells, JetAttribute::N90Constituents, m_threshold=0.9;)
jet::JetCalcnLeadingCells::m_sumE_cells
double m_sumE_cells
Definition
JetCaloQualityUtils.h:87
jet::JetCaloCalculator
Base class to support cpu-efficient calculation on calorimeter jets either at CaloCell or constituent...
Definition
JetCaloCalculations.h:76
jet::JetCaloCalculator::JetCaloCalculator
JetCaloCalculator()
Definition
JetCaloCalculations.h:81
jet::JetCaloCalculator::setName
void setName(const std::string &n)
Definition
JetCaloCalculations.h:104
jet::JetCaloQualityUtils
Definition
JetCaloQualityUtils.h:28
jet::JetCaloQualityUtils::compute_nLeading
static int compute_nLeading(std::vector< double > &cell_energies, const float &e, const float &frac)
Definition
JetCaloQualityUtils.cxx:37
jet::JetCaloQualityUtils::jetOutOfTimeEnergyFractionClusters
static double jetOutOfTimeEnergyFractionClusters(const Jet *, const double, const bool)
Definition
JetCaloQualityUtils.h:42
jet::JetCaloQualityUtils::emFraction
static double emFraction(const std::vector< float > &ePerSampling)
Definition
JetCaloQualityUtils.cxx:56
jet::JetCaloQualityUtils::hecF
static double hecF(const Jet *jet)
Definition
JetCaloQualityUtils.cxx:67
jet::JetCaloQualityUtils::fracSamplingMax
static double fracSamplingMax(const Jet *jet, int &SamplingMax)
Definition
JetCaloQualityUtils.cxx:107
jet::JetCaloQualityUtils::jetNegativeEnergy
static double jetNegativeEnergy(const Jet *jet)
Definition
JetCaloQualityUtils.cxx:137
jet::JetCaloQualityUtils::presamplerFraction
static double presamplerFraction(const Jet *jet)
Definition
JetCaloQualityUtils.cxx:83
jet::JetCaloQualityUtils::JetCalcnLeadingCells
friend class JetCalcnLeadingCells
Definition
JetCaloQualityUtils.h:30
jet::JetCaloQualityUtils::tileGap3F
static double tileGap3F(const Jet *jet)
Definition
JetCaloQualityUtils.cxx:95
jet::JetCaloQualityUtils::isUgly
static bool isUgly(const Jet *jet, const bool recalculateQuantities=false)
Definition
JetCaloQualityUtils.cxx:144
xAOD::JetConstituentVector::iterator
Definition
JetConstituentVector.h:121
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
jet::JetAttribute::LArQuality
@ LArQuality
Definition
JetAttributes.h:83
jet::JetAttribute::BchCorrCell
@ BchCorrCell
Definition
JetAttributes.h:94
jet::JetAttribute::NegativeE
@ NegativeE
Definition
JetAttributes.h:84
jet::JetAttribute::Timing
@ Timing
Definition
JetAttributes.h:90
jet::JetAttribute::OotFracCells10
@ OotFracCells10
Definition
JetAttributes.h:89
jet::JetAttribute::AverageLArQF
@ AverageLArQF
Definition
JetAttributes.h:85
jet::JetAttribute::N90Constituents
@ N90Constituents
Definition
JetAttributes.h:91
jet::JetAttribute::CentroidR
@ CentroidR
Definition
JetAttributes.h:131
xAOD::JetAttribute
Definition
JetAttributes.h:22
Generated on
for ATLAS Offline Software by
1.17.0