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 17 of file JetCaloQualityToolFE.cxx.

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

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 93 of file JetCaloQualityToolFE.cxx.

94{
95
96 ATH_MSG_VERBOSE("Begin decorating jets.");
97
98 for(const xAOD::Jet* jet : jets) {
100 }
101
102 return StatusCode::SUCCESS;
103}
#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 105 of file JetCaloQualityToolFE.cxx.

105 {
106
107 std::vector<const xAOD::CaloCluster*> clusters;
108
109 // Get the input type:
111
112 if ( ctype == xAOD::Type::CaloCluster ) {
113 ATH_MSG_VERBOSE(" Constituents are calo clusters.");
114 for ( size_t i = 0; i < jet.numConstituents(); i++ ) {
115 const xAOD::CaloCluster* constit = static_cast<const xAOD::CaloCluster*>(jet.rawConstituent(i));
116 clusters.push_back(constit);
117 }
118 }
119 else if( ctype == xAOD::Type::FlowElement ){
120
121 ATH_MSG_VERBOSE(" Constituents are FlowElements.");
122
123 //Need to distinguish between ParticleFlow and UFOs
124 const xAOD::FlowElement* constit0 = static_cast<const xAOD::FlowElement*>(jet.rawConstituent(0));
125
126 // If jet constituents are ParticleFlow objects (stored as FlowElements)
127 if(constit0->signalType() & xAOD::FlowElement::PFlow){
128 ATH_MSG_VERBOSE(" Constituents are ParticleFlow objects stored as FlowElements.");
129 for ( size_t i = 0; i < jet.numConstituents(); i++ ) {
130 const xAOD::FlowElement* constit = static_cast<const xAOD::FlowElement*>(jet.rawConstituent(i));
131 // Use only neutral PFOs
132 if(constit->isCharged())
133 continue;
134
135 if(constit->nOtherObjects() >= 1){
136 const xAOD::CaloCluster* cluster = dynamic_cast<const xAOD::CaloCluster*>(constit->otherObject(0));
137 if(cluster != nullptr){
138 clusters.push_back(cluster);
139 }
140 }
141 }
142 }
143 else{ // jet constituents are UFOs (stored as FlowElements)
144 ATH_MSG_VERBOSE(" Constituents are UFOs stored as FlowElements.");
145
146 for ( size_t i = 0; i < jet.numConstituents(); i++ ) {
147 const xAOD::FlowElement* constit = static_cast<const xAOD::FlowElement*>(jet.rawConstituent(i));
148
149 //Reject charged UFOs (but keep combined UFOs)
151 continue;
152
153 // For UFOs, otherObjects are links to the underlying ParticleFlow objects
154 for (size_t n = 0; n < constit->otherObjects().size(); ++n) {
155 if(! constit->otherObject(n)) continue;
156 int index_pfo = constit->otherObject(n)->index();
157 if(index_pfo<0) continue;
158
159 const auto* fe = (constit->otherObject(n));
160 const xAOD::CaloCluster* cluster = nullptr;
161
162 if(fe->type() == xAOD::Type::FlowElement){
163 const xAOD::FlowElement* pfo = dynamic_cast<const xAOD::FlowElement*>(fe);
164 if(!pfo->otherObjects().empty() && pfo->otherObject(0) && pfo->otherObject(0)->type() == xAOD::Type::CaloCluster){
165 cluster = dynamic_cast<const xAOD::CaloCluster*> (pfo->otherObject(0));
166 }
167 }
168 if(!cluster){continue;}
169
170 if(std::find(clusters.begin(), clusters.end(), cluster) == clusters.end()){
171 clusters.push_back(cluster);
172 }
173 }
174 }
175 }
176 }
177
178 return clusters;
179
180}
size_t index() const
Return the index of this element within its container.
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:153
const IParticle * rawConstituent(size_t i) const
Direct access to constituents. WARNING expert use only.
Definition Jet_v1.cxx:158
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 182 of file JetCaloQualityToolFE.cxx.

182 {
183
184 // First, extract the constituents directly (in case of cluster-based jet) or underlying clusters
185 std::vector<const xAOD::CaloCluster*> clusters = extractConstituents(jet);
186
187 // Calculate moments
188 float sum_E = 0.0;
189 float sum_E_square = 0.0;
190
191 float sum_badLarQ = 0.0;
192 float sum_badHECQ = 0.0;
193 float sum_e_HEC = 0.0;
194 float sum_e_neg = 0.0;
195 float sum_avg_lar_q = 0.0;
196 float sum_timing = 0.0;
197 float centroid_x = 0.0, centroid_y = 0.0, centroid_z = 0.0;
198 float sum_e_bad_cells = 0.0;
199
200 std::vector<float> sum_OOT;
201 sum_OOT.resize(m_timingTimeCuts.size());
202
203 std::vector<int> counter_Nfrac;
204 counter_Nfrac.resize(m_thresholdCuts.size());
205
206 std::vector<float> cluster_energies;
207
208 for ( size_t i = 0; i < clusters.size(); i++){
209
210 const xAOD::CaloCluster* constit = static_cast<const xAOD::CaloCluster*>(clusters[i]);
211
212 float cluster_E = constit->e(xAOD::CaloCluster::UNCALIBRATED);
213
214 sum_E += cluster_E;
215 sum_E_square += cluster_E*cluster_E;
216
217 cluster_energies.push_back(cluster_E);
218
219 //LArQuality || HECQuality
220 double bad_frac=0.0;
221 if(m_doLArQ || m_doHECQ){
223
224 if(m_doLArQ){
225 sum_badLarQ += bad_frac*cluster_E;
226 }
227
228 if(m_doHECQ){
229 float e_HEC = constit->eSample( CaloSampling::HEC0) + constit->eSample( CaloSampling::HEC1) + constit->eSample( CaloSampling::HEC2) + constit->eSample( CaloSampling::HEC3);
230 sum_e_HEC += e_HEC;
231 sum_badHECQ += bad_frac*e_HEC;
232 }
233 }
234
235 //NegativeE
236 if(m_doNegE){
237 double e_pos=0.0;
239 sum_e_neg += cluster_E - e_pos;
240 }
241
242 //JetCalcAverageLArQualityF
243 if(m_doAvgLAr){
244 double avg_lar_q=0.0;
245 constit->retrieveMoment(xAOD::CaloCluster::AVG_LAR_Q, avg_lar_q);
246 sum_avg_lar_q += avg_lar_q*cluster_E*cluster_E;
247 }
248
249 //Centroid
250 if(m_doCentroid){
251 double x = 0.0, y = 0.0, z = 0.0;
255
256 centroid_x += x*cluster_E;
257 centroid_y += y*cluster_E;
258 centroid_z += z*cluster_E;
259 }
260
261 //BchCorrCell
262 if(m_doBchCorrCell){
263 double cells_bad_E = 0.0;
265 sum_e_bad_cells += cells_bad_E;
266 }
267
268 //Timing / OOT
269 if(m_doTime || m_timingTimeCuts.size() > 0){
270 double timing = constit->time();
271
272 if(m_doTime){
273 sum_timing += timing*cluster_E*cluster_E;
274 }
275
276 //OOT
277 for(size_t j = 0; j < m_timingTimeCuts.size(); j++){
278 if(std::abs(timing) > m_timingTimeCuts[j]){
279 sum_OOT[j] += cluster_E;
280 }
281 }
282 }
283 } // end loop over all all constituents
284
285
286 if(m_thresholdCuts.size() > 0){
287
288 std::sort(cluster_energies.rbegin(),cluster_energies.rend());
289
290 for(size_t iFracCut = 0; iFracCut < m_thresholdCuts.size(); iFracCut++){
291
292 int counter = 0;
293 float tmp_sum = 0;
294
295 for(unsigned int iClus = 0; iClus < cluster_energies.size(); iClus++){
296 tmp_sum += cluster_energies[iClus];
297 counter++;
298 if(tmp_sum > m_thresholdCuts[iFracCut]*sum_E/100.) break;
299 }
300 counter_Nfrac[iFracCut] = counter;
301 }
302 }
303
304 //Add the decorations
305 for(size_t i = 0; i < m_calculationNames.size(); i++){
306 std::string calcN = m_calculationNames[i];
307
308 SG::WriteDecorHandle<xAOD::JetContainer, float> decHandle(m_writeDecorKeys.at(i));
309
310 if(calcN == "LArQuality"){
311 decHandle(jet) = sum_E != 0. ? sum_badLarQ/sum_E : 0.;
312 }
313 else if(calcN == "HECQuality"){
314 decHandle(jet) = sum_e_HEC != 0. ? sum_badHECQ/sum_e_HEC : 0.;
315 }
316 else if(calcN == "NegativeE"){
317 decHandle(jet) = sum_e_neg;
318 }
319 else if(calcN == "AverageLArQF"){
320 decHandle(jet) = sum_E_square != 0. ? sum_avg_lar_q/sum_E_square : 0.;
321 }
322 else if(calcN == "Timing"){
323 decHandle(jet) = sum_E_square != 0. ? sum_timing/sum_E_square : 0.;
324 }
325 else if(calcN == "Centroid"){
326 decHandle(jet) = sum_E_square != 0. ? sqrt(centroid_x*centroid_x+centroid_y*centroid_y+centroid_z*centroid_z)/sum_E_square : 0.;
327 }
328 else if(calcN == "BchCorrCell"){
329 decHandle(jet) = jet.jetP4(xAOD::JetEMScaleMomentum).E() != 0. ? sum_e_bad_cells/jet.jetP4(xAOD::JetEMScaleMomentum).E() : 0. ;
330 }
331 }
332
333 for( size_t iCut = 0; iCut < m_timingTimeCuts.size(); iCut++){
334 SG::WriteDecorHandle<xAOD::JetContainer, float> decHandle_timing(m_writeDecorKeys_OOT.at(iCut));
335 decHandle_timing(jet) = sum_E != 0. ? sum_OOT[iCut]/sum_E : 0. ;
336 }
337
338 for( size_t iFracCut = 0; iFracCut < m_thresholdCuts.size(); iFracCut++){
339 //Variable was previously stored as float rather than int
340 //Keep float to not break e.g. jet calibration with derivations storing variable as float
341 SG::WriteDecorHandle<xAOD::JetContainer, float> decHandle_frac(m_writeDecorKeys_Nfrac.at(iFracCut));
342 decHandle_frac(jet) = counter_Nfrac[iFracCut];
343 }
344}
#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
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::TEvent 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::TEvent, 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::TEvent 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::TEvent, 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 22 of file JetCaloQualityToolFE.cxx.

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

◆ 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 >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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: