ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetMomentTools
src
JetCaloCellQualityTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef XAOD_ANALYSIS
6
7
#include "
JetCaloCellQualityTool.h
"
8
#include "
xAODJet/JetAccessorMap.h
"
9
#include <iostream>
10
11
JetCaloCellQualityTool::JetCaloCellQualityTool
(
const
std::string& name)
12
:
JetCaloQualityTool
(name) {
13
declareInterface<IJetDecorator>(
this
);
14
}
15
16
StatusCode
JetCaloCellQualityTool::initialize
(){
17
ATH_MSG_DEBUG
(
" initialize() "
);
18
19
// In this tool we're using the cell-based calculators
20
m_calcProcessor
= &
m_jetCalculations
;
21
22
// Define and use a macro to compactify the addition of calo calculators
23
// The macro defines a JetCalculator as 'c' in case addition setting are needed.
24
#define ADDCALCULATOR( klass ) klass *c = new klass(); c->setName( c->name() + m_attSuffix); m_cellCalculators.addCellCalculator(c)
25
26
// convert names passed as property into calo calculators
27
for
( std::string & calcN :
m_calculationNames
){
28
29
if
( calcN ==
"LArQuality"
) {
30
ADDCALCULATOR
( jet::JetCalcQuality_fromCells );
31
c->LArQualityCut =
m_LArQualityCut
;
// c is defined in the macro.
32
}
else
if
( calcN ==
"TileQuality"
) {
33
ADDCALCULATOR
( jet::JetCalcQuality_fromCells );
34
c->setName(
"TileQuality"
);
35
c->TileQualityCut =
m_TileQualityCut
;
// c is defined in the macro.
36
c->includeTile =
true
;
37
c->includeLAr =
false
;
38
}
else
if
( calcN ==
"Timing"
) {
39
ADDCALCULATOR
( jet::JetCalcTimeCells_fromCells );
40
}
else
if
( calcN ==
"QualityHEC"
) {
41
ADDCALCULATOR
( jet::JetCalcQualityHEC_fromCells );
42
}
else
if
( calcN ==
"NegativeE"
) {
43
ADDCALCULATOR
( jet::JetCalcNegativeEnergy_fromCells );
44
}
else
if
( calcN ==
"AverageLArQF"
) {
45
ADDCALCULATOR
( jet::JetCalcAverageLArQualityF_fromCells );
46
}
else
if
( calcN ==
"Centroid"
) {
47
ADDCALCULATOR
( jet::JetCalcCentroid_fromCells );
48
}
else
if
( calcN ==
"N90Cells"
) {
49
ADDCALCULATOR
( jet::JetCalcnLeadingCells_fromCells );
50
c->setName(
xAOD::JetAttributeAccessor::name
(
xAOD::JetAttribute::N90Cells
) );
51
}
else
if
( calcN ==
"BchCorrCell"
) {
52
ATH_MSG_ERROR
(
" No BchCorrCell implemented yet using CaloCell direct access"
);
53
return
StatusCode::FAILURE;
54
}
else
if
(calcN ==
"FracSamplingMax"
) {
55
m_doFracSamplingMax
=
true
;
// no caculator, as this is a special case.
56
}
57
58
}
// end loop over m_calculationNames
59
60
61
// Define OOT calculators.
62
for
(
double
& timeCut :
m_timingTimeCuts
){
63
64
// build the moment name from the base-name and the value of the timing cut
65
std::stringstream s;
66
s << std::setprecision(0) << std::fixed <<
"OotFracCells"
<< timeCut;
67
68
jet::JetCalcOutOfTimeEnergyFraction_fromCells* c =
new
jet::JetCalcOutOfTimeEnergyFraction_fromCells();
69
c->setName(s.str());
70
c->timecut = timeCut;
71
m_cellCalculators
.addCalculator( c );
72
}
73
74
75
for
(
size_t
i=0;i<
m_cellCalculators
.numCalculators();i++) {
76
const
jet::JetCaloCalculator
* calc =
m_cellCalculators
.at(i);
77
ATH_MSG_INFO
(
"Will calculate cell calo attribute : "
<< calc->name() );
78
}
79
80
return
StatusCode::SUCCESS;
81
82
}
83
#endif
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
JetAccessorMap.h
JetCaloCellQualityTool.h
ADDCALCULATOR
#define ADDCALCULATOR(klass)
JetCaloCellQualityTool::m_LArQualityCut
Gaudi::Property< int > m_LArQualityCut
Definition
JetCaloCellQualityTool.h:48
JetCaloCellQualityTool::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition
JetCaloCellQualityTool.cxx:16
JetCaloCellQualityTool::JetCaloCellQualityTool
JetCaloCellQualityTool(const std::string &name)
Definition
JetCaloCellQualityTool.cxx:11
JetCaloCellQualityTool::m_cellCalculators
jet::JetCaloCellCalculations m_cellCalculators
This objects holds a list of cell-based calculators.
Definition
JetCaloCellQualityTool.h:43
JetCaloCellQualityTool::m_TileQualityCut
Gaudi::Property< int > m_TileQualityCut
Definition
JetCaloCellQualityTool.h:49
JetCaloQualityTool::m_calculationNames
Gaudi::Property< std::vector< std::string > > m_calculationNames
Definition
JetCaloQualityTool.h:51
JetCaloQualityTool::JetCaloQualityTool
JetCaloQualityTool(const std::string &name)
Definition
JetCaloQualityTool.cxx:19
JetCaloQualityTool::m_calcProcessor
jet::JetCaloCalculations * m_calcProcessor
Definition
JetCaloQualityTool.h:65
JetCaloQualityTool::m_timingTimeCuts
Gaudi::Property< std::vector< double > > m_timingTimeCuts
Definition
JetCaloQualityTool.h:53
JetCaloQualityTool::m_doFracSamplingMax
bool m_doFracSamplingMax
Definition
JetCaloQualityTool.h:67
JetCaloQualityTool::m_jetCalculations
jet::JetCaloCalculations m_jetCalculations
This objects holds a list of cluster-based calculators.
Definition
JetCaloQualityTool.h:62
jet::JetCaloCalculator
Base class to support cpu-efficient calculation on calorimeter jets either at CaloCell or constituent...
Definition
JetCaloCalculations.h:76
xAOD::JetAttributeAccessor::name
std::string name(xAOD::JetAttribute::AttributeID id)
Definition
JetAccessorMap.h:30
xAOD::JetAttribute::N90Cells
@ N90Cells
Definition
JetAttributes.h:92
Generated on
for ATLAS Offline Software by
1.17.0