ATLAS Offline Software
Loading...
Searching...
No Matches
JetCaloQualityToolFE Class Reference

#include <JetCaloQualityToolFE.h>

Inheritance diagram for JetCaloQualityToolFE:
Collaboration diagram for JetCaloQualityToolFE:

Public Member Functions

 JetCaloQualityToolFE (const std::string &name)
virtual StatusCode decorate (const xAOD::JetContainer &jets) const override
 Decorate a jet collection without otherwise modifying it.
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function.
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
virtual StatusCode modify (xAOD::JetContainer &jets) const override final
 Concrete implementation of the function inherited from IJetModifier.
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

void fillQualityVariables (const xAOD::Jet &jet) const
std::vector< const xAOD::CaloCluster * > extractConstituents (const xAOD::Jet &jet) const
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

Gaudi::Property< std::vector< std::string > > m_calculationNames
Gaudi::Property< std::vector< double > > m_timingTimeCuts
Gaudi::Property< std::vector< int > > m_thresholdCuts
Gaudi::Property< std::string > m_jetContainerName
SG::WriteDecorHandleKeyArray< xAOD::JetContainerm_writeDecorKeys
SG::WriteDecorHandleKeyArray< xAOD::JetContainerm_writeDecorKeys_OOT
SG::WriteDecorHandleKeyArray< xAOD::JetContainerm_writeDecorKeys_Nfrac
bool m_doLArQ = false
bool m_doHECQ = false
bool m_doNegE = false
bool m_doAvgLAr = false
bool m_doCentroid = false
bool m_doBchCorrCell = false
bool m_doTime = false

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 21 of file JetCaloQualityToolFE.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JetCaloQualityToolFE()

JetCaloQualityToolFE::JetCaloQualityToolFE ( const std::string & name)

Definition at line 16 of file JetCaloQualityToolFE.cxx.

17 : asg::AsgTool(name)
18{
19}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ decorate()

StatusCode JetCaloQualityToolFE::decorate ( const xAOD::JetContainer & jets) const
overridevirtual

Decorate a jet collection without otherwise modifying it.

Implements IJetDecorator.

Definition at line 92 of file JetCaloQualityToolFE.cxx.

93{
94
95 ATH_MSG_VERBOSE("Begin decorating jets.");
96
97 for(const xAOD::Jet* jet : jets) {
99 }
100
101 return StatusCode::SUCCESS;
102}
#define ATH_MSG_VERBOSE(x)
void fillQualityVariables(const xAOD::Jet &jet) const
Jet_v1 Jet
Definition of the current "jet version".

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extractConstituents()

std::vector< const xAOD::CaloCluster * > JetCaloQualityToolFE::extractConstituents ( const xAOD::Jet & jet) const
protected

Definition at line 104 of file JetCaloQualityToolFE.cxx.

104 {
105
106 std::vector<const xAOD::CaloCluster*> clusters;
107
108 // Get the input type:
110
111 if ( ctype == xAOD::Type::CaloCluster ) {
112 ATH_MSG_VERBOSE(" Constituents are calo clusters.");
113 for ( size_t i = 0; i < jet.numConstituents(); i++ ) {
114 const xAOD::CaloCluster* constit = static_cast<const xAOD::CaloCluster*>(jet.rawConstituent(i));
115 clusters.push_back(constit);
116 }
117 }
118 else if( ctype == xAOD::Type::FlowElement ){
119
120 ATH_MSG_VERBOSE(" Constituents are FlowElements.");
121
122 //Need to distinguish between ParticleFlow and UFOs
123 const xAOD::FlowElement* constit0 = static_cast<const xAOD::FlowElement*>(jet.rawConstituent(0));
124
125 // If jet constituents are ParticleFlow objects (stored as FlowElements)
126 if(constit0->signalType() & xAOD::FlowElement::PFlow){
127 ATH_MSG_VERBOSE(" Constituents are ParticleFlow objects stored as FlowElements.");
128 for ( size_t i = 0; i < jet.numConstituents(); i++ ) {
129 const xAOD::FlowElement* constit = static_cast<const xAOD::FlowElement*>(jet.rawConstituent(i));
130 // Use only neutral PFOs
131 if(constit->isCharged())
132 continue;
133
134 if(constit->nOtherObjects() >= 1){
135 const xAOD::CaloCluster* cluster = dynamic_cast<const xAOD::CaloCluster*>(constit->otherObject(0));
136 if(cluster != nullptr){
137 clusters.push_back(cluster);
138 }
139 }
140 }
141 }
142 else{ // jet constituents are UFOs (stored as FlowElements)
143 ATH_MSG_VERBOSE(" Constituents are UFOs stored as FlowElements.");
144
145 for ( size_t i = 0; i < jet.numConstituents(); i++ ) {
146 const xAOD::FlowElement* constit = static_cast<const xAOD::FlowElement*>(jet.rawConstituent(i));
147
148 //Reject charged UFOs (but keep combined UFOs)
150 continue;
151
152 // For UFOs, otherObjects are links to the underlying ParticleFlow objects
153 for (size_t n = 0; n < constit->otherObjects().size(); ++n) {
154 if(! constit->otherObject(n)) continue;
155 int index_pfo = constit->otherObject(n)->index();
156 if(index_pfo<0) continue;
157
158 const auto* fe = (constit->otherObject(n));
159 const xAOD::CaloCluster* cluster = nullptr;
160
161 if(fe->type() == xAOD::Type::FlowElement){
162 const xAOD::FlowElement* pfo = dynamic_cast<const xAOD::FlowElement*>(fe);
163 if(pfo && !pfo->otherObjects().empty() && pfo->otherObject(0) && pfo->otherObject(0)->type() == xAOD::Type::CaloCluster){
164 cluster = dynamic_cast<const xAOD::CaloCluster*> (pfo->otherObject(0));
165 }
166 }
167 if(!cluster){continue;}
168
169 if(std::find(clusters.begin(), clusters.end(), cluster) == clusters.end()){
170 clusters.push_back(cluster);
171 }
172 }
173 }
174 }
175 }
176
177 return clusters;
178
179}
size_t size() const
Number of registered mappings.
std::size_t nOtherObjects() const
std::vector< const xAOD::IParticle * > otherObjects() const
signal_t signalType() const
const xAOD::IParticle * otherObject(std::size_t i) const
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
size_t numConstituents() const
Number of constituents in this jets (this is valid even when reading a file where the constituents ha...
Definition Jet_v1.cxx:155
const IParticle * rawConstituent(size_t i) const
Direct access to constituents. WARNING expert use only.
Definition Jet_v1.cxx:169
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32
@ FlowElement
The object is a track-calo-cluster.
Definition ObjectType.h:52
@ CaloCluster
The object is a calorimeter cluster.
Definition ObjectType.h:39
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fillQualityVariables()

void JetCaloQualityToolFE::fillQualityVariables ( const xAOD::Jet & jet) const
protected

Definition at line 181 of file JetCaloQualityToolFE.cxx.

181 {
182
183 // First, extract the constituents directly (in case of cluster-based jet) or underlying clusters
184 std::vector<const xAOD::CaloCluster*> clusters = extractConstituents(jet);
185
186 // Calculate moments
187 float sum_E = 0.0;
188 float sum_E_square = 0.0;
189
190 float sum_badLarQ = 0.0;
191 float sum_badHECQ = 0.0;
192 float sum_e_HEC = 0.0;
193 float sum_e_neg = 0.0;
194 float sum_avg_lar_q = 0.0;
195 float sum_timing = 0.0;
196 float centroid_x = 0.0, centroid_y = 0.0, centroid_z = 0.0;
197 float sum_e_bad_cells = 0.0;
198
199 std::vector<float> sum_OOT;
200 sum_OOT.resize(m_timingTimeCuts.size());
201
202 std::vector<int> counter_Nfrac;
203 counter_Nfrac.resize(m_thresholdCuts.size());
204
205 std::vector<float> cluster_energies;
206
207 for ( size_t i = 0; i < clusters.size(); i++){
208
209 const xAOD::CaloCluster* constit = static_cast<const xAOD::CaloCluster*>(clusters[i]);
210
211 float cluster_E = constit->e(xAOD::CaloCluster::UNCALIBRATED);
212
213 sum_E += cluster_E;
214 sum_E_square += cluster_E*cluster_E;
215
216 cluster_energies.push_back(cluster_E);
217
218 //LArQuality || HECQuality
219 double bad_frac=0.0;
220 if(m_doLArQ || m_doHECQ){
222
223 if(m_doLArQ){
224 sum_badLarQ += bad_frac*cluster_E;
225 }
226
227 if(m_doHECQ){
228 float e_HEC = constit->eSample( CaloSampling::HEC0) + constit->eSample( CaloSampling::HEC1) + constit->eSample( CaloSampling::HEC2) + constit->eSample( CaloSampling::HEC3);
229 sum_e_HEC += e_HEC;
230 sum_badHECQ += bad_frac*e_HEC;
231 }
232 }
233
234 //NegativeE
235 if(m_doNegE){
236 double e_pos=0.0;
238 sum_e_neg += cluster_E - e_pos;
239 }
240
241 //JetCalcAverageLArQualityF
242 if(m_doAvgLAr){
243 double avg_lar_q=0.0;
244 constit->retrieveMoment(xAOD::CaloCluster::AVG_LAR_Q, avg_lar_q);
245 sum_avg_lar_q += avg_lar_q*cluster_E*cluster_E;
246 }
247
248 //Centroid
249 if(m_doCentroid){
250 double x = 0.0, y = 0.0, z = 0.0;
254
255 centroid_x += x*cluster_E;
256 centroid_y += y*cluster_E;
257 centroid_z += z*cluster_E;
258 }
259
260 //BchCorrCell
261 if(m_doBchCorrCell){
262 double cells_bad_E = 0.0;
264 sum_e_bad_cells += cells_bad_E;
265 }
266
267 //Timing / OOT
268 if(m_doTime || m_timingTimeCuts.size() > 0){
269 double timing = constit->time();
270
271 if(m_doTime){
272 sum_timing += timing*cluster_E*cluster_E;
273 }
274
275 //OOT
276 for(size_t j = 0; j < m_timingTimeCuts.size(); j++){
277 if(std::abs(timing) > m_timingTimeCuts[j]){
278 sum_OOT[j] += cluster_E;
279 }
280 }
281 }
282 } // end loop over all all constituents
283
284
285 if(m_thresholdCuts.size() > 0){
286
287 std::sort(cluster_energies.rbegin(),cluster_energies.rend());
288
289 for(size_t iFracCut = 0; iFracCut < m_thresholdCuts.size(); iFracCut++){
290
291 int counter = 0;
292 float tmp_sum = 0;
293
294 for(unsigned int iClus = 0; iClus < cluster_energies.size(); iClus++){
295 tmp_sum += cluster_energies[iClus];
296 counter++;
297 if(tmp_sum > m_thresholdCuts[iFracCut]*sum_E/100.) break;
298 }
299 counter_Nfrac[iFracCut] = counter;
300 }
301 }
302
303 //Add the decorations
304 for(size_t i = 0; i < m_calculationNames.size(); i++){
305 std::string calcN = m_calculationNames[i];
306
307 SG::WriteDecorHandle<xAOD::JetContainer, float> decHandle(m_writeDecorKeys.at(i));
308
309 if(calcN == "LArQuality"){
310 decHandle(jet) = sum_E != 0. ? sum_badLarQ/sum_E : 0.;
311 }
312 else if(calcN == "HECQuality"){
313 decHandle(jet) = sum_e_HEC != 0. ? sum_badHECQ/sum_e_HEC : 0.;
314 }
315 else if(calcN == "NegativeE"){
316 decHandle(jet) = sum_e_neg;
317 }
318 else if(calcN == "AverageLArQF"){
319 decHandle(jet) = sum_E_square != 0. ? sum_avg_lar_q/sum_E_square : 0.;
320 }
321 else if(calcN == "Timing"){
322 decHandle(jet) = sum_E_square != 0. ? sum_timing/sum_E_square : 0.;
323 }
324 else if(calcN == "Centroid"){
325 decHandle(jet) = sum_E_square != 0. ? sqrt(centroid_x*centroid_x+centroid_y*centroid_y+centroid_z*centroid_z)/sum_E_square : 0.;
326 }
327 else if(calcN == "BchCorrCell"){
328 decHandle(jet) = jet.jetP4(xAOD::JetEMScaleMomentum).E() != 0. ? sum_e_bad_cells/jet.jetP4(xAOD::JetEMScaleMomentum).E() : 0. ;
329 }
330 }
331
332 for( size_t iCut = 0; iCut < m_timingTimeCuts.size(); iCut++){
333 SG::WriteDecorHandle<xAOD::JetContainer, float> decHandle_timing(m_writeDecorKeys_OOT.at(iCut));
334 decHandle_timing(jet) = sum_E != 0. ? sum_OOT[iCut]/sum_E : 0. ;
335 }
336
337 for( size_t iFracCut = 0; iFracCut < m_thresholdCuts.size(); iFracCut++){
338 //Variable was previously stored as float rather than int
339 //Keep float to not break e.g. jet calibration with derivations storing variable as float
340 SG::WriteDecorHandle<xAOD::JetContainer, float> decHandle_frac(m_writeDecorKeys_Nfrac.at(iFracCut));
341 decHandle_frac(jet) = counter_Nfrac[iFracCut];
342 }
343}
#define y
#define x
#define z
Gaudi::Property< std::vector< double > > m_timingTimeCuts
std::vector< const xAOD::CaloCluster * > extractConstituents(const xAOD::Jet &jet) const
SG::WriteDecorHandleKeyArray< xAOD::JetContainer > m_writeDecorKeys
SG::WriteDecorHandleKeyArray< xAOD::JetContainer > m_writeDecorKeys_OOT
Gaudi::Property< std::vector< int > > m_thresholdCuts
SG::WriteDecorHandleKeyArray< xAOD::JetContainer > m_writeDecorKeys_Nfrac
Gaudi::Property< std::vector< std::string > > m_calculationNames
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
flt_t time() const
Access cluster time.
virtual double e() const
The total energy of the particle.
float eSample(const CaloSample sampling) const
@ AVG_LAR_Q
Sum(E_cell_LAr^2 Q_cell_LAr)/Sum(E_cell_LAr^2).
@ CENTER_Z
Cluster Centroid ( ).
@ ENG_BAD_CELLS
Total em-scale energy of bad cells in this cluster.
@ ENG_POS
Total positive Energy of this cluster.
@ BADLARQ_FRAC
Energy fraction of LAr cells with quality larger than a given cut.
@ CENTER_X
Cluster Centroid ( ).
@ CENTER_Y
Cluster Centroid ( ).
JetFourMom_t jetP4() const
The full 4-momentum of the particle : internal jet type.
Definition Jet_v1.cxx:76
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
@ JetEMScaleMomentum
Definition JetTypes.h:28

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::Event, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::Event, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode JetCaloQualityToolFE::initialize ( void )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 21 of file JetCaloQualityToolFE.cxx.

21 {
22 ATH_MSG_DEBUG( "Inside initialize() method" );
23
24 if(!m_writeDecorKeys.empty()){
25 ATH_MSG_ERROR("OutputDecorKeys should not be configured manually!");
26 return StatusCode::FAILURE;
27 }
28 if(m_jetContainerName.empty()){
29 ATH_MSG_ERROR("JetCaloQualityToolFE needs to have its input jet container name configured!");
30 return StatusCode::FAILURE;
31 }
32
33 // Set the DecorHandleKeys with the correct strings
34 for( const std::string & calcN : m_calculationNames){
35
36 if(calcN == "LArQuality"){
37 m_doLArQ = true;
38 }
39 else if(calcN == "HECQuality"){
40 m_doHECQ = true;
41 }
42 else if(calcN == "NegativeE"){
43 m_doNegE = true;
44 }
45 else if(calcN == "AverageLArQF"){
46 m_doAvgLAr = true;
47 }
48 else if(calcN == "Timing"){
49 m_doTime = true;
50 }
51 else if(calcN == "Centroid"){
52 m_doCentroid = true;
53 }
54 else if(calcN == "BchCorrCell"){
55 m_doBchCorrCell = true;
56 }
57
58 if(calcN == "Centroid"){
59 m_writeDecorKeys.emplace_back(m_jetContainerName + "." + calcN+"R");
60 }
61 else{
62 m_writeDecorKeys.emplace_back(m_jetContainerName + "." + calcN);
63 }
64 }
65
66 // Define OOT calculators.
67 for( const double timeCut : m_timingTimeCuts){
68 // build the moment name from the base-name and the value of the timing cut
69 std::stringstream s;
70 s << std::setprecision(0) << std::fixed << "OotFracClusters" << timeCut;
71 m_writeDecorKeys_OOT.emplace_back(m_jetContainerName + "." + s.str());
72 }
73
74 // Define tresholds for NXConstituents:
75 for( const int fracCut: m_thresholdCuts){
76 std::ostringstream sout;
77 sout << "N" << fracCut << "Constituents";
78 m_writeDecorKeys_Nfrac.emplace_back(m_jetContainerName + "." + sout.str());
79 }
80
81 ATH_CHECK(m_writeDecorKeys.initialize());
82 if(!m_writeDecorKeys_OOT.empty()){
83 ATH_CHECK(m_writeDecorKeys_OOT.initialize());
84 }
85 if(!m_writeDecorKeys_Nfrac.empty()){
87 }
88
89 return StatusCode::SUCCESS;
90}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
Gaudi::Property< std::string > m_jetContainerName

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ modify()

virtual StatusCode IJetDecorator::modify ( xAOD::JetContainer & jets) const
inlinefinaloverridevirtualinherited

Concrete implementation of the function inherited from IJetModifier.

Implements IJetModifier.

Definition at line 32 of file IJetDecorator.h.

32{return decorate(jets);};
virtual StatusCode decorate(const xAOD::JetContainer &jets) const =0
Decorate a jet collection without otherwise modifying it.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_calculationNames

Gaudi::Property<std::vector<std::string> > JetCaloQualityToolFE::m_calculationNames
protected
Initial value:
{this, "Calculations", {},
"Name of calo quantities to compute and add as decorations"}

Definition at line 34 of file JetCaloQualityToolFE.h.

34 {this, "Calculations", {},
35 "Name of calo quantities to compute and add as decorations"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doAvgLAr

bool JetCaloQualityToolFE::m_doAvgLAr = false
protected

Definition at line 59 of file JetCaloQualityToolFE.h.

◆ m_doBchCorrCell

bool JetCaloQualityToolFE::m_doBchCorrCell = false
protected

Definition at line 61 of file JetCaloQualityToolFE.h.

◆ m_doCentroid

bool JetCaloQualityToolFE::m_doCentroid = false
protected

Definition at line 60 of file JetCaloQualityToolFE.h.

◆ m_doHECQ

bool JetCaloQualityToolFE::m_doHECQ = false
protected

Definition at line 57 of file JetCaloQualityToolFE.h.

◆ m_doLArQ

bool JetCaloQualityToolFE::m_doLArQ = false
protected

Definition at line 56 of file JetCaloQualityToolFE.h.

◆ m_doNegE

bool JetCaloQualityToolFE::m_doNegE = false
protected

Definition at line 58 of file JetCaloQualityToolFE.h.

◆ m_doTime

bool JetCaloQualityToolFE::m_doTime = false
protected

Definition at line 62 of file JetCaloQualityToolFE.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_jetContainerName

Gaudi::Property<std::string> JetCaloQualityToolFE::m_jetContainerName
protected
Initial value:
{this, "JetContainer", "",
"SG key of input jet container"}

Definition at line 40 of file JetCaloQualityToolFE.h.

40 {this, "JetContainer", "",
41 "SG key of input jet container"};

◆ m_thresholdCuts

Gaudi::Property<std::vector<int> > JetCaloQualityToolFE::m_thresholdCuts
protected
Initial value:
{this, "ThresholdCuts", {},
"Thresholds cuts (NxConstituents)"}

Definition at line 38 of file JetCaloQualityToolFE.h.

38 {this, "ThresholdCuts", {},
39 "Thresholds cuts (NxConstituents)"};

◆ m_timingTimeCuts

Gaudi::Property<std::vector<double> > JetCaloQualityToolFE::m_timingTimeCuts
protected
Initial value:
{this, "TimingCuts", {},
"Time cuts for out-of-time calo quantities"}

Definition at line 36 of file JetCaloQualityToolFE.h.

36 {this, "TimingCuts", {},
37 "Time cuts for out-of-time calo quantities"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeDecorKeys

SG::WriteDecorHandleKeyArray<xAOD::JetContainer> JetCaloQualityToolFE::m_writeDecorKeys
protected
Initial value:
{this, "OutputDecorKeys", {},
"SG keys for output decorations (not to be configured manually!)"}

Definition at line 43 of file JetCaloQualityToolFE.h.

43 {this, "OutputDecorKeys", {},
44 "SG keys for output decorations (not to be configured manually!)"};

◆ m_writeDecorKeys_Nfrac

SG::WriteDecorHandleKeyArray<xAOD::JetContainer> JetCaloQualityToolFE::m_writeDecorKeys_Nfrac
protected
Initial value:
{this, "OutputNfracConstitDecorKeys", {},
"SG keys for output NfracConstituents decorations (not to be configured manually!)"}

Definition at line 49 of file JetCaloQualityToolFE.h.

49 {this, "OutputNfracConstitDecorKeys", {},
50 "SG keys for output NfracConstituents decorations (not to be configured manually!)"};

◆ m_writeDecorKeys_OOT

SG::WriteDecorHandleKeyArray<xAOD::JetContainer> JetCaloQualityToolFE::m_writeDecorKeys_OOT
protected
Initial value:
{this, "OutputOOTDecorKeys", {},
"SG keys for output OOT decorations (not to be configured manually!)"}

Definition at line 46 of file JetCaloQualityToolFE.h.

46 {this, "OutputOOTDecorKeys", {},
47 "SG keys for output OOT decorations (not to be configured manually!)"};

The documentation for this class was generated from the following files: