ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
JetCaloEnergies Class Reference

#include <JetCaloEnergies.h>

Inheritance diagram for JetCaloEnergies:
Collaboration diagram for JetCaloEnergies:

Public Member Functions

 JetCaloEnergies (const std::string &t)
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode decorate (const xAOD::JetContainer &jets) const override
 Decorate a jet collection without otherwise modifying it. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) 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. More...
 

Protected Member Functions

void fillEperSamplingCluster (const xAOD::Jet &jet, std::vector< float > &ePerSampling) const
 
void fillEperSamplingPFO (const xAOD::Jet &jet, std::vector< float > &ePerSampling) const
 
void fillEperSamplingFE (const xAOD::Jet &jet, std::vector< float > &ePerSampling) const
 
void fillEperSamplingFEClusterBased (const xAOD::Jet &jet, std::vector< float > &ePerSampling) const
 
bool isInVector (const std::string &key, const std::vector< std::string > &calculations)
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Protected Attributes

bool m_doFracSamplingMax = false
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< std::vector< std::string > > m_calculationNames {this, "Calculations", {}, "Name of calo quantities to compute and add as decorations"}
 
Gaudi::Property< std::string > m_jetContainerName {this, "JetContainer", "", "SG key for the input jet container"}
 
Gaudi::Property< bool > m_calcClusterBasedVars {this, "calcClusterBasedVars", false, "SG key to decide if cluster-based variables will be calculated for FE-based jets"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_ePerSamplingKey {this, "EPerSamplingName", "EnergyPerSampling", "SG key for the EnergyPerSampling attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_emFracKey {this, "EMFracName", "EMFrac", "SG key for the EMFrac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_hecFracKey {this, "HECFracName", "HECFrac", "SG key for the HECFrac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_psFracKey {this, "PSFracName", "PSFrac", "SG key for the PSFrac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_em3FracKey {this, "EM3FracName", "EM3Frac", "SG key for the EM3Frac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_tile0FracKey {this, "Tile0FracName", "Tile0Frac", "SG key for the Tile0Frac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_effNClustsFracKey {this, "EffNClustsName", "EffNClusts", "SG key for the EffNClusts attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_fracSamplingMaxKey {this, "FracSamplingMaxName", "FracSamplingMax", "SG key for the FracSamplingMax attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_fracSamplingMaxIndexKey {this, "FracSamplingMaxIndexName", "FracSamplingMaxIndex", "SG key for the FracSamplingMaxIndex attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_ePerSamplingClusterKey {this, "EPerSamplingClusterName", "EnergyPerSamplingCaloBased", "SG key for the EnergyPerSampling attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_emFracClusterKey {this, "EMFracClusterName", "EMFracCaloBased", "SG key for the EMFrac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_hecFracClusterKey {this, "HECFracClusterName", "HECFracCaloBased", "SG key for the HECFrac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_psFracClusterKey {this, "PSFracClusterName", "PSFracCaloBased", "SG key for the PSFrac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_em3FracClusterKey {this, "EM3FracClusterName", "EM3FracCaloBased", "SG key for the EM3Frac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_tile0FracClusterKey {this, "Tile0FracClusterName", "Tile0FracCaloBased", "SG key for the Tile0Frac attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_effNClustsFracClusterKey {this, "EffNClustsClusterName", "EffNClustsCaloBased", "SG key for the EffNClusts attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_fracSamplingMaxClusterKey {this, "FracSamplingMaxClusterName", "FracSamplingMaxCaloBased", "SG key for the FracSamplingMax (clus) attribute"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_fracSamplingMaxIndexClusterKey {this, "FracSamplingMaxIndexClusterName", "FracSamplingMaxIndexCaloBased", "SG key for FracSamplingMaxIndex (clus) attribute"}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 17 of file JetCaloEnergies.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

◆ JetCaloEnergies()

JetCaloEnergies::JetCaloEnergies ( const std::string &  t)

Definition at line 22 of file JetCaloEnergies.cxx.

23 : AsgTool(name) { }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ decorate()

StatusCode JetCaloEnergies::decorate ( const xAOD::JetContainer jets) const
overridevirtual

Decorate a jet collection without otherwise modifying it.

Implements IJetDecorator.

Definition at line 102 of file JetCaloEnergies.cxx.

102  {
103  ATH_MSG_VERBOSE("Begin decorating jets.");
104  for(const xAOD::Jet* jet : jets) {
106  size_t numConstit = jet->numConstituents();
107  ePerSamplingHandle(*jet) = std::vector<float>(CaloSampling::Unknown, 0.);
108  std::vector<float>& ePerSampling = ePerSamplingHandle(*jet);
109  for ( float& e : ePerSampling ) e = 0.0; // re-initialize
110 
111  if ( numConstit == 0 ) {
112  ATH_MSG_VERBOSE("Jet has no constituents.");
113  continue;
114  }
115 
116  // should find a more robust solution than using 1st constit type.
117  xAOD::Type::ObjectType ctype = jet->rawConstituent( 0 )->type();
118  if ( ctype == xAOD::Type::CaloCluster ) {
119  ATH_MSG_VERBOSE(" Constituents are calo clusters.");
120  fillEperSamplingCluster(*jet, ePerSampling);
121 
122  } else if (ctype == xAOD::Type::ParticleFlow) {
123  ATH_MSG_VERBOSE(" Constituents are pflow objects.");
124  fillEperSamplingPFO(*jet, ePerSampling);
125 
126  } else if (ctype == xAOD::Type::FlowElement) {
127  ATH_MSG_VERBOSE(" Constituents are FlowElements.");
128  fillEperSamplingFE(*jet, ePerSampling);
129 
130  // In addition, calculate variables using the underlying cluster rather than
131  // the energy-subtracted FlowElements (improved implementation)
133  ATH_MSG_VERBOSE(" Constituents are FlowElements - Additional calculation");
134 
136  ePerSamplingClusterHandle(*jet) = std::vector<float>(CaloSampling::Unknown, 0.);
137  std::vector<float>& ePerSamplingCluster = ePerSamplingClusterHandle(*jet);
138  for ( float& e : ePerSamplingCluster ) e = 0.0; // re-initialize
139 
140  fillEperSamplingFEClusterBased(*jet, ePerSamplingCluster);
141  }
142 
143  }else {
144  ATH_MSG_VERBOSE("Constituents are not CaloClusters, PFOs, or FlowElements.");
145  }
146 
147  }
148  return StatusCode::SUCCESS;
149 }

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

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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

◆ fillEperSamplingCluster()

void JetCaloEnergies::fillEperSamplingCluster ( const xAOD::Jet jet,
std::vector< float > &  ePerSampling 
) const
protected

Definition at line 151 of file JetCaloEnergies.cxx.

151  {
152  // loop over raw constituents
153  size_t numConstit = jet.numConstituents();
154  for ( size_t i=0; i<numConstit; i++ ) {
155  if(jet.rawConstituent(i)->type()!=xAOD::Type::CaloCluster) {
156  ATH_MSG_WARNING("Tried to call fillEperSamplingCluster with a jet constituent that is not a cluster!");
157  continue;
158  }
159  const xAOD::CaloCluster* constit = static_cast<const xAOD::CaloCluster*>(jet.rawConstituent(i));
160  for ( size_t s= CaloSampling::PreSamplerB; s< CaloSampling::Unknown; s++ ) {
161  ePerSampling[s] += constit->eSample( (xAOD::CaloCluster::CaloSample) s );
162  }
163  }
164 
165  double fracSamplingMax = -999999999.;
166  int fracSamplingMaxIndex = -1;
167  double sumE_samplings = 0.0;
168 
170  for(unsigned int i = 0; i < ePerSampling.size(); ++i){
171  double e = ePerSampling[i];
172  sumE_samplings += e;
173  if (e>fracSamplingMax){
174  fracSamplingMax=e;
175  fracSamplingMaxIndex = i;
176  }
177  }
178  }
179 
183 
184  emFracHandle(jet) = jet::JetCaloQualityUtils::emFraction( ePerSampling );
185  hecFracHandle(jet) = jet::JetCaloQualityUtils::hecF( &jet );
187 
190  fracSamplingMaxHandle(jet) = sumE_samplings != 0. ? fracSamplingMax/sumE_samplings : 0.;
192  fracSamplingMaxIndexHandle(jet) = fracSamplingMaxIndex;
193  }
194 }

◆ fillEperSamplingFE()

void JetCaloEnergies::fillEperSamplingFE ( const xAOD::Jet jet,
std::vector< float > &  ePerSampling 
) const
protected

Definition at line 287 of file JetCaloEnergies.cxx.

287  {
288  float emTot = 0.;
289  float em3Tot = 0.;
290  float hecTot = 0.;
291  float psTot = 0.;
292  float tile0Tot = 0.;
293  float eTot = 0.;
294  float e2Tot = 0.;
295  size_t numConstit = jet.numConstituents();
296 
297  std::vector<int> indicesNeutralFE;
298  std::vector<int> indicesChargedFE;
299 
300  for ( size_t i=0; i<numConstit; i++ ) {
301  if(jet.rawConstituent(i)->type()!=xAOD::Type::FlowElement) {
302  ATH_MSG_WARNING("Tried to call fillEperSamplingFE with a jet constituent that is not a FlowElement!");
303  continue;
304  }
305  const xAOD::FlowElement* constit = static_cast<const xAOD::FlowElement*>(jet.rawConstituent(i));
306 
307  // Need to distinguish two cases:
308  // (1) Jet is a PFlow jet (constituents are charged or neutral FEs) or
309  // (2) Jet is a UFO jet (need to get the underlying charged and neutral FEs first)
310 
311  //For PFlow jets, we can directly get the information from the constituent
312  if(constit->signalType() & xAOD::FlowElement::PFlow){
313 
314  //Charged FlowElements:
315  if(constit->isCharged()){
316  eTot += constit->chargedObject(0)->e();
317  e2Tot += constit->chargedObject(0)->e()*constit->chargedObject(0)->e();
318  }
319  //Neutral FlowElements
320  else{
321  eTot += constit->e();
322  e2Tot += constit->e()*constit->e();
323  //Get the energy-per-layer information from the FE, not the underlying cluster (i.e. after subtraction)
324  std::vector<float> constitEPerSampling = FEHelpers::getEnergiesPerSampling(*constit);
325  for ( size_t s = CaloSampling::PreSamplerB; s < CaloSampling::Unknown; s++ ) {
326  ePerSampling[s] += constitEPerSampling[s];
327  }
328  emTot += (constitEPerSampling[CaloSampling::PreSamplerB] + constitEPerSampling[CaloSampling::EMB1]
329  + constitEPerSampling[CaloSampling::EMB2] + constitEPerSampling[CaloSampling::EMB3]
330  + constitEPerSampling[CaloSampling::PreSamplerE] + constitEPerSampling[CaloSampling::EME1]
331  + constitEPerSampling[CaloSampling::EME2] + constitEPerSampling[CaloSampling::EME3]
332  + constitEPerSampling[CaloSampling::FCAL0]);
333 
334  hecTot += (constitEPerSampling[CaloSampling::HEC0] + constitEPerSampling[CaloSampling::HEC1]
335  + constitEPerSampling[CaloSampling::HEC2] + constitEPerSampling[CaloSampling::HEC3]);
336 
337  psTot += (constitEPerSampling[CaloSampling::PreSamplerB] + constitEPerSampling[CaloSampling::PreSamplerE]);
338 
339  em3Tot += (constitEPerSampling[CaloSampling::EMB3] + constitEPerSampling[CaloSampling::EME3]);
340 
341  tile0Tot += (constitEPerSampling[CaloSampling::TileBar0] + constitEPerSampling[CaloSampling::TileExt0]);
342  }
343  }
344  else{
345  //For UFO jets, we first need to get the charged and neutral FE + corresponding energy from combined UFOs
346 
347  // UFO is simply a charged FlowElement
348  if(constit->signalType() == xAOD::FlowElement::Charged){
349  eTot += constit->chargedObject(0)->e();
350  e2Tot += constit->chargedObject(0)->e()*constit->chargedObject(0)->e();
351  }
352  //UFO is simply a neutral Flowelement
353  else if(constit->signalType() == xAOD::FlowElement::Neutral){
354  // For neutral UFOs, there is only one "other object" stored which is the neutral FE
355  // Protection in case there is something wrong with this FE
356  if(constit->otherObjects().size() != 1 || !constit->otherObject(0)){
357  continue;
358  }
359 
360  // Cast other object as FlowElement
361  const xAOD::FlowElement* nFE = static_cast<const xAOD::FlowElement*>(constit->otherObject(0));
362 
363  eTot += nFE->e();
364  e2Tot += nFE->e()*nFE->e();
365 
366  std::vector<float> neutralEPerSampling = FEHelpers::getEnergiesPerSampling(*nFE);
367  for ( size_t s = CaloSampling::PreSamplerB; s < CaloSampling::Unknown; s++ ) {
368  ePerSampling[s] += neutralEPerSampling[s];
369  }
370  emTot += (neutralEPerSampling[CaloSampling::PreSamplerB] + neutralEPerSampling[CaloSampling::EMB1]
371  + neutralEPerSampling[CaloSampling::EMB2] + neutralEPerSampling[CaloSampling::EMB3]
372  + neutralEPerSampling[CaloSampling::PreSamplerE] + neutralEPerSampling[CaloSampling::EME1]
373  + neutralEPerSampling[CaloSampling::EME2] + neutralEPerSampling[CaloSampling::EME3]
374  + neutralEPerSampling[CaloSampling::FCAL0]);
375 
376  hecTot += (neutralEPerSampling[CaloSampling::HEC0] + neutralEPerSampling[CaloSampling::HEC1]
377  + neutralEPerSampling[CaloSampling::HEC2] + neutralEPerSampling[CaloSampling::HEC3]);
378 
379  psTot += (neutralEPerSampling[CaloSampling::PreSamplerB] + neutralEPerSampling[CaloSampling::PreSamplerE]);
380 
381  em3Tot += (neutralEPerSampling[CaloSampling::EMB3] + neutralEPerSampling[CaloSampling::EME3]);
382 
383  tile0Tot += (neutralEPerSampling[CaloSampling::TileBar0] + neutralEPerSampling[CaloSampling::TileExt0]);
384  }
385  else if(constit->signalType() == xAOD::FlowElement::Combined){
386  // For the combined UFOs, otherObjects are neutral or charged FEs
387  // matched to this tracks (via track-to-cluster extrapolation)
388  for (size_t n = 0; n < constit->otherObjects().size(); ++n) {
389  if(! constit->otherObject(n)) continue;
390  const xAOD::FlowElement* FE_from_combined = static_cast<const xAOD::FlowElement*>(constit->otherObject(n));
391 
392  //Charged FE (add energy to total energy only)
393  if(FE_from_combined->isCharged()){
394  if(std::find(indicesChargedFE.begin(), indicesChargedFE.end(), FE_from_combined->index()) == indicesChargedFE.end()){
395  eTot += FE_from_combined->e();
396  e2Tot += FE_from_combined->e()*FE_from_combined->e();
397  indicesChargedFE.push_back(FE_from_combined->index());
398  }
399  continue;
400  }
401  //Neutral FE:
402  //One neutral FE can be matched to various tracks and therefore be used for several UFOs
403  //We do not want to double count the energy and only add it once
404  if(std::find(indicesNeutralFE.begin(), indicesNeutralFE.end(), FE_from_combined->index()) == indicesNeutralFE.end()){
405  eTot += FE_from_combined->e();
406  e2Tot += FE_from_combined->e()*FE_from_combined->e();
407  std::vector<float> neutralFromCombEPerSampling = FEHelpers::getEnergiesPerSampling(*FE_from_combined);
408  for ( size_t s = CaloSampling::PreSamplerB; s < CaloSampling::Unknown; s++ ) {
409  ePerSampling[s] += neutralFromCombEPerSampling[s];
410  }
411  emTot += (neutralFromCombEPerSampling[CaloSampling::PreSamplerB] + neutralFromCombEPerSampling[CaloSampling::EMB1]
412  + neutralFromCombEPerSampling[CaloSampling::EMB2] + neutralFromCombEPerSampling[CaloSampling::EMB3]
413  + neutralFromCombEPerSampling[CaloSampling::PreSamplerE] + neutralFromCombEPerSampling[CaloSampling::EME1]
414  + neutralFromCombEPerSampling[CaloSampling::EME2] + neutralFromCombEPerSampling[CaloSampling::EME3]
415  + neutralFromCombEPerSampling[CaloSampling::FCAL0]);
416 
417  hecTot += (neutralFromCombEPerSampling[CaloSampling::HEC0] + neutralFromCombEPerSampling[CaloSampling::HEC1]
418  + neutralFromCombEPerSampling[CaloSampling::HEC2] + neutralFromCombEPerSampling[CaloSampling::HEC3]);
419 
420  psTot += (neutralFromCombEPerSampling[CaloSampling::PreSamplerB] + neutralFromCombEPerSampling[CaloSampling::PreSamplerE]);
421 
422  em3Tot += (neutralFromCombEPerSampling[CaloSampling::EMB3] + neutralFromCombEPerSampling[CaloSampling::EME3]);
423 
424  tile0Tot += (neutralFromCombEPerSampling[CaloSampling::TileBar0] + neutralFromCombEPerSampling[CaloSampling::TileExt0]);
425 
426  indicesNeutralFE.push_back(FE_from_combined->index());
427  }
428  }
429  }
430  }
431  }
432 
433  double fracSamplingMax = -999999999.;
434  int fracSamplingMaxIndex = -1;
435  double sumE_samplings = 0.0;
436 
438  for(unsigned int i = 0; i < ePerSampling.size(); ++i){
439  double e = ePerSampling[i];
440  sumE_samplings += e;
441  if (e>fracSamplingMax){
442  fracSamplingMax=e;
443  fracSamplingMaxIndex = i;
444  }
445  }
446  }
447 
448  for( const std::string & calcN : m_calculationNames){
449  if ( calcN == "EMFrac" ) {
451  emFracHandle(jet) = eTot != 0. ? emTot/eTot : 0.;
452  } else if ( calcN == "HECFrac" ) {
454  hecFracHandle(jet) = eTot != 0. ? hecTot/eTot : 0.;
455  } else if ( calcN == "PSFrac" ) {
457  psFracHandle(jet) = eTot != 0. ? psTot/eTot : 0.;
458  } else if ( calcN == "EM3Frac" ) {
460  em3FracHandle(jet) = eTot != 0. ? em3Tot/eTot : 0.;
461  } else if ( calcN == "Tile0Frac" ) {
463  tile0FracHandle(jet) = eTot != 0. ? tile0Tot/eTot : 0.;
464  } else if ( calcN == "EffNClusts" ) {
466  effNClustsFracHandle(jet) = eTot != 0. ? std::sqrt(eTot*eTot/e2Tot) : 0.;
467  } else if ( calcN == "FracSamplingMax" ){
469  fracSamplingMaxHandle(jet) = sumE_samplings != 0. ? fracSamplingMax/sumE_samplings : 0.;
471  fracSamplingMaxIndexHandle(jet) = fracSamplingMaxIndex;
472  }
473  }
474 }

◆ fillEperSamplingFEClusterBased()

void JetCaloEnergies::fillEperSamplingFEClusterBased ( const xAOD::Jet jet,
std::vector< float > &  ePerSampling 
) const
protected

Definition at line 479 of file JetCaloEnergies.cxx.

479  {
480  float emTot = 0.;
481  float em3Tot = 0.;
482  float hecTot = 0.;
483  float psTot = 0.;
484  float tile0Tot = 0.;
485  float eTot = 0.;
486  float e2Tot = 0.;
487  size_t numConstit = jet.numConstituents();
488  std::unique_ptr<std::vector<const xAOD::CaloCluster*> > constitV_tot = std::make_unique<std::vector<const xAOD::CaloCluster*>>();
489 
490  for ( size_t i=0; i<numConstit; i++ ) {
491  if(jet.rawConstituent(i)->type()!=xAOD::Type::FlowElement) {
492  ATH_MSG_WARNING("Tried to call fillEperSamplingFE with a jet constituent that is not a FlowElement!");
493  continue;
494  }
495  const xAOD::FlowElement* constit = static_cast<const xAOD::FlowElement*>(jet.rawConstituent(i));
496 
497  for (size_t n = 0; n < constit->otherObjects().size(); ++n) {
498  if(! constit->otherObject(n)) continue;
499  int index_pfo = constit->otherObject(n)->index();
500  if(index_pfo<0) continue;
501 
502  const auto* fe = (constit->otherObject(n));
503  const xAOD::CaloCluster* cluster = nullptr;
504 
505  //If we have a cluster, we can directly access the calorimeter information
506  if(fe->type() == xAOD::Type::CaloCluster){
507  cluster = dynamic_cast<const xAOD::CaloCluster*> (fe);
508  }
509  //If we have a PFO, we should still get the associated cluster first
510  else {
511  const xAOD::FlowElement* pfo = dynamic_cast<const xAOD::FlowElement*>(fe);
512  if(!pfo->otherObjects().empty() && pfo->otherObject(0) && pfo->otherObject(0)->type() == xAOD::Type::CaloCluster){
513  cluster = dynamic_cast<const xAOD::CaloCluster*> (pfo->otherObject(0));
514  }
515  }
516  if(!cluster) continue;
517 
518  if(std::find(constitV_tot->begin(), constitV_tot->end(), cluster) == constitV_tot->end()){
519  for ( size_t s= CaloSampling::PreSamplerB; s< CaloSampling::Unknown; s++ ) {
520  ePerSampling[s] += cluster->eSample( (xAOD::CaloCluster::CaloSample) s );
521  }
522  eTot += cluster->rawE();
523  e2Tot += cluster->rawE()*cluster->rawE();
524 
525  emTot += (cluster->eSample( CaloSampling::PreSamplerB) + cluster->eSample( CaloSampling::EMB1)
526  + cluster->eSample( CaloSampling::EMB2) + cluster->eSample( CaloSampling::EMB3)
528  + cluster->eSample( CaloSampling::EME2) + cluster->eSample( CaloSampling::EME3)
529  + cluster->eSample( CaloSampling::FCAL0));
530 
531  hecTot += (cluster->eSample( CaloSampling::HEC0) + cluster->eSample( CaloSampling::HEC1)
532  + cluster->eSample( CaloSampling::HEC2) + cluster->eSample( CaloSampling::HEC3));
533 
534  psTot += (cluster->eSample( CaloSampling::PreSamplerB) + cluster->eSample( CaloSampling::PreSamplerE));
535 
536  em3Tot += (cluster->eSample( CaloSampling::EMB3) + cluster->eSample( CaloSampling::EME3));
537 
538  tile0Tot += (cluster->eSample( CaloSampling::TileBar0) + cluster->eSample( CaloSampling::TileExt0));
539 
540  constitV_tot->push_back(cluster);
541  }
542  }
543  }
544 
545  float fracSamplingMax = -999999999.;
546  int fracSamplingMaxIndex = -1;
547  float sumE_samplings = 0.0;
548 
550  for(unsigned int i = 0; i < ePerSampling.size(); ++i){
551  float e = ePerSampling[i];
552  sumE_samplings += e;
553  if (e>fracSamplingMax){
554  fracSamplingMax=e;
555  fracSamplingMaxIndex = i;
556  }
557  }
558  }
559 
560  for( const std::string & calcN : m_calculationNames){
561  if ( calcN == "EMFrac" ) {
563  emFracClusterHandle(jet) = eTot != 0. ? emTot/eTot : 0.;
564  } else if ( calcN == "HECFrac" ) {
566  hecFracClusterHandle(jet) = eTot != 0. ? hecTot/eTot : 0.;
567  } else if ( calcN == "PSFrac" ) {
569  psFracClusterHandle(jet) = eTot != 0. ? psTot/eTot : 0.;
570  } else if ( calcN == "EM3Frac" ) {
572  em3FracClusterHandle(jet) = eTot != 0. ? em3Tot/eTot : 0.;
573  } else if ( calcN == "Tile0Frac" ) {
575  tile0FracClusterHandle(jet) = eTot != 0. ? tile0Tot/eTot : 0.;
576  } else if ( calcN == "EffNClusts" ) {
578  effNClustsFracClusterHandle(jet) = eTot != 0. ? std::sqrt(eTot*eTot/e2Tot) : 0.;
579  } else if ( calcN == "FracSamplingMax" ){
581  fracSamplingMaxClusterHandle(jet) = sumE_samplings != 0. ? fracSamplingMax/sumE_samplings : 0.;
583  fracSamplingMaxIndexClusterHandle(jet) = fracSamplingMaxIndex;
584  }
585  }
586 
587 }

◆ fillEperSamplingPFO()

void JetCaloEnergies::fillEperSamplingPFO ( const xAOD::Jet jet,
std::vector< float > &  ePerSampling 
) const
protected

Definition at line 202 of file JetCaloEnergies.cxx.

202  {
203 
204  float emTot=0;
205  float hecTot=0;
206  float eTot =0;
207  size_t numConstit = jet.numConstituents();
208 
209  for ( size_t i=0; i<numConstit; i++ ) {
210  if (jet.rawConstituent(i)->type()==xAOD::Type::ParticleFlow){
211  const xAOD::PFO* constit = static_cast<const xAOD::PFO*>(jet.rawConstituent(i));
212  if ( fabs(constit->charge())>FLT_MIN ){
213  eTot += constit->track(0)->e();
214  } else {
215  eTot += constit->e();
220 
225 
230 
234 
238 
242 
246 
247  FillESamplingPFO(MINIFCAL0);
248  FillESamplingPFO(MINIFCAL1);
249  FillESamplingPFO(MINIFCAL2);
250  FillESamplingPFO(MINIFCAL3);
251 
252  emTot += ( E_PreSamplerB+E_EMB1+E_EMB2+E_EMB3+
253  E_PreSamplerE+E_EME1+E_EME2+E_EME3+
254  E_FCAL0 );
255  hecTot += ( E_HEC0+E_HEC1+E_HEC2+E_HEC3 );
256 
257  }//only consider neutral PFO
258  } else {
259  ATH_MSG_WARNING("Tried to call fillEperSamplingPFlow with a jet constituent that is not a PFO!");
260  }
261  }
262 
264  if(eTot != 0.0){
265  emFracHandle(jet) = emTot/eTot;
266  /*
267  * Ratio of EM layer calorimeter energy of neutrals to sum of all constituents
268  * at EM scale (note charged PFO have an EM scale at track scale, and charged weights are ignored)
269  * */
270  }
271  else {
272  emFracHandle(jet) = 0.;
273  }
274 
276  if (eTot != 0.0){
277  hecFracHandle(jet) = hecTot/eTot;
278  }
279  else{
280  hecFracHandle(jet) = 0.;
281  }
282 
283 }

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

◆ 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 JetCaloEnergies::initialize ( )
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 42 of file JetCaloEnergies.cxx.

42  {
43  ATH_MSG_INFO("Initializing JetCaloEnergies " << name());
44 
45  if(m_jetContainerName.empty()){
46  ATH_MSG_ERROR("JetCaloEnergies needs to have its input jet container configured!");
47  return StatusCode::FAILURE;
48  }
49 
59 
70  }
71 
72  // Init calo based variables if necessary
80 
82 
85 
86  // Init standard variables if necessary
87  ATH_CHECK(m_ePerSamplingKey.initialize());
88  ATH_CHECK(m_emFracKey.initialize());
89  ATH_CHECK(m_hecFracKey.initialize());
90  ATH_CHECK(m_psFracKey.initialize());
96 
97  return StatusCode::SUCCESS;
98 }

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

◆ isInVector()

bool JetCaloEnergies::isInVector ( const std::string &  key,
const std::vector< std::string > &  calculations 
)
protected

Definition at line 27 of file JetCaloEnergies.cxx.

27  {
28  // Split key to get back the actual handle key
29  std::vector<std::string> split;
30  std::string sub_string;
31  std::istringstream tokenStream(key);
32 
33  while (std::getline(tokenStream, sub_string, '.'))
34  {
35  split.push_back(sub_string);
36  }
37 
38  // Return true if handle key in list of calculations
39  return std::find(calculations.begin(), calculations.end(), split[1]) != calculations.end();
40 }

◆ 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);};

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

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

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_calcClusterBasedVars

Gaudi::Property<bool> JetCaloEnergies::m_calcClusterBasedVars {this, "calcClusterBasedVars", false, "SG key to decide if cluster-based variables will be calculated for FE-based jets"}
private

Definition at line 38 of file JetCaloEnergies.h.

◆ m_calculationNames

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

Definition at line 36 of file JetCaloEnergies.h.

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

bool JetCaloEnergies::m_doFracSamplingMax = false
protected

Definition at line 33 of file JetCaloEnergies.h.

◆ m_effNClustsFracClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_effNClustsFracClusterKey {this, "EffNClustsClusterName", "EffNClustsCaloBased", "SG key for the EffNClusts attribute"}
private

Definition at line 57 of file JetCaloEnergies.h.

◆ m_effNClustsFracKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_effNClustsFracKey {this, "EffNClustsName", "EffNClusts", "SG key for the EffNClusts attribute"}
private

Definition at line 46 of file JetCaloEnergies.h.

◆ m_em3FracClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_em3FracClusterKey {this, "EM3FracClusterName", "EM3FracCaloBased", "SG key for the EM3Frac attribute"}
private

Definition at line 55 of file JetCaloEnergies.h.

◆ m_em3FracKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_em3FracKey {this, "EM3FracName", "EM3Frac", "SG key for the EM3Frac attribute"}
private

Definition at line 44 of file JetCaloEnergies.h.

◆ m_emFracClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_emFracClusterKey {this, "EMFracClusterName", "EMFracCaloBased", "SG key for the EMFrac attribute"}
private

Definition at line 52 of file JetCaloEnergies.h.

◆ m_emFracKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_emFracKey {this, "EMFracName", "EMFrac", "SG key for the EMFrac attribute"}
private

Definition at line 41 of file JetCaloEnergies.h.

◆ m_ePerSamplingClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_ePerSamplingClusterKey {this, "EPerSamplingClusterName", "EnergyPerSamplingCaloBased", "SG key for the EnergyPerSampling attribute"}
private

Definition at line 51 of file JetCaloEnergies.h.

◆ m_ePerSamplingKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_ePerSamplingKey {this, "EPerSamplingName", "EnergyPerSampling", "SG key for the EnergyPerSampling attribute"}
private

Definition at line 40 of file JetCaloEnergies.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_fracSamplingMaxClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_fracSamplingMaxClusterKey {this, "FracSamplingMaxClusterName", "FracSamplingMaxCaloBased", "SG key for the FracSamplingMax (clus) attribute"}
private

Definition at line 58 of file JetCaloEnergies.h.

◆ m_fracSamplingMaxIndexClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_fracSamplingMaxIndexClusterKey {this, "FracSamplingMaxIndexClusterName", "FracSamplingMaxIndexCaloBased", "SG key for FracSamplingMaxIndex (clus) attribute"}
private

Definition at line 59 of file JetCaloEnergies.h.

◆ m_fracSamplingMaxIndexKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_fracSamplingMaxIndexKey {this, "FracSamplingMaxIndexName", "FracSamplingMaxIndex", "SG key for the FracSamplingMaxIndex attribute"}
private

Definition at line 48 of file JetCaloEnergies.h.

◆ m_fracSamplingMaxKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_fracSamplingMaxKey {this, "FracSamplingMaxName", "FracSamplingMax", "SG key for the FracSamplingMax attribute"}
private

Definition at line 47 of file JetCaloEnergies.h.

◆ m_hecFracClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_hecFracClusterKey {this, "HECFracClusterName", "HECFracCaloBased", "SG key for the HECFrac attribute"}
private

Definition at line 53 of file JetCaloEnergies.h.

◆ m_hecFracKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_hecFracKey {this, "HECFracName", "HECFrac", "SG key for the HECFrac attribute"}
private

Definition at line 42 of file JetCaloEnergies.h.

◆ m_jetContainerName

Gaudi::Property<std::string> JetCaloEnergies::m_jetContainerName {this, "JetContainer", "", "SG key for the input jet container"}
private

Definition at line 37 of file JetCaloEnergies.h.

◆ m_psFracClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_psFracClusterKey {this, "PSFracClusterName", "PSFracCaloBased", "SG key for the PSFrac attribute"}
private

Definition at line 54 of file JetCaloEnergies.h.

◆ m_psFracKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_psFracKey {this, "PSFracName", "PSFrac", "SG key for the PSFrac attribute"}
private

Definition at line 43 of file JetCaloEnergies.h.

◆ m_tile0FracClusterKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_tile0FracClusterKey {this, "Tile0FracClusterName", "Tile0FracCaloBased", "SG key for the Tile0Frac attribute"}
private

Definition at line 56 of file JetCaloEnergies.h.

◆ m_tile0FracKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetCaloEnergies::m_tile0FracKey {this, "Tile0FracName", "Tile0Frac", "SG key for the Tile0Frac attribute"}
private

Definition at line 45 of file JetCaloEnergies.h.

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


The documentation for this class was generated from the following files:
JetCaloEnergies::m_fracSamplingMaxClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_fracSamplingMaxClusterKey
Definition: JetCaloEnergies.h:58
JetCaloEnergies::isInVector
bool isInVector(const std::string &key, const std::vector< std::string > &calculations)
Definition: JetCaloEnergies.cxx:27
xAOD::CaloCluster_v1::rawE
flt_t rawE() const
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
JetCaloEnergies::m_effNClustsFracKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_effNClustsFracKey
Definition: JetCaloEnergies.h:46
xAOD::FlowElement_v1::Neutral
@ Neutral
Definition: FlowElement_v1.h:37
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
CaloCell_ID_FCS::TileExt2
@ TileExt2
Definition: FastCaloSim_CaloCell_ID.h:39
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
JetCaloEnergies::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition: JetCaloEnergies.h:37
JetCaloEnergies::fillEperSamplingPFO
void fillEperSamplingPFO(const xAOD::Jet &jet, std::vector< float > &ePerSampling) const
Definition: JetCaloEnergies.cxx:202
xAOD::FlowElement_v1::Charged
@ Charged
Definition: FlowElement_v1.h:38
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
ObjectType
ObjectType
Definition: BaseObject.h:11
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
xAOD::PFO_v1::track
const TrackParticle * track(unsigned int index) const
Retrieve a const pointer to a Rec::TrackParticle.
Definition: PFO_v1.cxx:691
CaloCell_ID_FCS::TileBar1
@ TileBar1
Definition: FastCaloSim_CaloCell_ID.h:32
JetCaloEnergies::m_em3FracClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_em3FracClusterKey
Definition: JetCaloEnergies.h:55
JetCaloEnergies::m_doFracSamplingMax
bool m_doFracSamplingMax
Definition: JetCaloEnergies.h:33
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
JetCaloEnergies::m_fracSamplingMaxIndexKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_fracSamplingMaxIndexKey
Definition: JetCaloEnergies.h:48
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::IParticle::type
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
JetCaloEnergies::fillEperSamplingFE
void fillEperSamplingFE(const xAOD::Jet &jet, std::vector< float > &ePerSampling) const
Definition: JetCaloEnergies.cxx:287
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
IDTPM::eTot
float eTot(const U &p)
Accessor utility function for getting the value of Energy.
Definition: TrackParametersHelper.h:126
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
FEHelpers::getEnergiesPerSampling
std::vector< float > getEnergiesPerSampling(const xAOD::FlowElement &fe)
Definition: FEHelpers.cxx:78
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
JetCaloEnergies::m_tile0FracKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_tile0FracKey
Definition: JetCaloEnergies.h:45
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
JetCaloEnergies::m_ePerSamplingKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_ePerSamplingKey
Definition: JetCaloEnergies.h:40
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
JetCaloEnergies::m_psFracClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_psFracClusterKey
Definition: JetCaloEnergies.h:54
JetCaloEnergies::m_ePerSamplingClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_ePerSamplingClusterKey
Definition: JetCaloEnergies.h:51
xAOD::FlowElement_v1::PFlow
@ PFlow
Definition: FlowElement_v1.h:45
xAOD::PFO_v1::e
virtual double e() const
The total energy of the particle.
Definition: PFO_v1.cxx:81
xAOD::FlowElement_v1::isCharged
bool isCharged() const
Definition: FlowElement_v1.cxx:56
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
JetCaloEnergies::m_hecFracClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_hecFracClusterKey
Definition: JetCaloEnergies.h:53
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
beamspotman.n
n
Definition: beamspotman.py:731
CaloCell_ID_FCS::TileGap2
@ TileGap2
Definition: FastCaloSim_CaloCell_ID.h:35
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition: FlowElement.h:16
JetCaloEnergies::m_fracSamplingMaxKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_fracSamplingMaxKey
Definition: JetCaloEnergies.h:47
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:99
xAOD::PFO_v1::charge
float charge() const
get charge of PFO
xAOD::FlowElement_v1::signalType
signal_t signalType() const
JetCaloEnergies::m_fracSamplingMaxIndexClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_fracSamplingMaxIndexClusterKey
Definition: JetCaloEnergies.h:59
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAODType::ParticleFlow
@ ParticleFlow
The object is a particle-flow object.
Definition: ObjectType.h:41
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
JetCaloEnergies::m_tile0FracClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_tile0FracClusterKey
Definition: JetCaloEnergies.h:56
CaloCell_ID_FCS::TileGap1
@ TileGap1
Definition: FastCaloSim_CaloCell_ID.h:34
FillESamplingPFO
#define FillESamplingPFO(LAYERNAME)
Definition: JetCaloEnergies.cxx:196
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::FlowElement_v1::chargedObject
const xAOD::IParticle * chargedObject(std::size_t i) const
Definition: FlowElement_v1.cxx:127
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
xAOD::PFO_v1
Class describing a particle flow object.
Definition: PFO_v1.h:35
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
xAOD::FlowElement_v1::e
virtual double e() const override
The total energy of the particle.
Definition: FlowElement_v1.cxx:25
JetCaloEnergies::m_effNClustsFracClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_effNClustsFracClusterKey
Definition: JetCaloEnergies.h:57
xAOD::TrackParticle_v1::e
virtual double e() const override final
The total energy of the particle.
Definition: TrackParticle_v1.cxx:109
JetCaloEnergies::m_calculationNames
Gaudi::Property< std::vector< std::string > > m_calculationNames
Definition: JetCaloEnergies.h:36
xAOD::FlowElement_v1::Combined
@ Combined
Definition: FlowElement_v1.h:39
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
JetCaloEnergies::m_emFracKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_emFracKey
Definition: JetCaloEnergies.h:41
JetCaloEnergies::m_emFracClusterKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_emFracClusterKey
Definition: JetCaloEnergies.h:52
JetCaloEnergies::m_calcClusterBasedVars
Gaudi::Property< bool > m_calcClusterBasedVars
Definition: JetCaloEnergies.h:38
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
jet::JetCaloQualityUtils::hecF
static double hecF(const Jet *jet)
Definition: JetCaloQualityUtils.cxx:67
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
h
IJetDecorator::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const =0
Decorate a jet collection without otherwise modifying it.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
xAOD::FlowElement_v1::otherObject
const xAOD::IParticle * otherObject(std::size_t i) const
Definition: FlowElement_v1.cxx:196
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
JetCaloEnergies::m_em3FracKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_em3FracKey
Definition: JetCaloEnergies.h:44
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
JetCaloEnergies::m_psFracKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_psFracKey
Definition: JetCaloEnergies.h:43
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
jet::JetCaloQualityUtils::emFraction
static double emFraction(const std::vector< float > &ePerSampling)
Definition: JetCaloQualityUtils.cxx:56
JetCaloEnergies::fillEperSamplingFEClusterBased
void fillEperSamplingFEClusterBased(const xAOD::Jet &jet, std::vector< float > &ePerSampling) const
Definition: JetCaloEnergies.cxx:479
JetCaloEnergies::m_hecFracKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_hecFracKey
Definition: JetCaloEnergies.h:42
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
JetCaloEnergies::fillEperSamplingCluster
void fillEperSamplingCluster(const xAOD::Jet &jet, std::vector< float > &ePerSampling) const
Definition: JetCaloEnergies.cxx:151
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
SG::DataProxy
Definition: DataProxy.h:44
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
CaloCell_ID_FCS::TileBar2
@ TileBar2
Definition: FastCaloSim_CaloCell_ID.h:33
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
jet::JetCaloQualityUtils::presamplerFraction
static double presamplerFraction(const Jet *jet)
Definition: JetCaloQualityUtils.cxx:83
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
xAOD::IParticle::e
virtual double e() const =0
The total energy of the particle.
fitman.k
k
Definition: fitman.py:528
xAOD::FlowElement_v1::otherObjects
std::vector< const xAOD::IParticle * > otherObjects() const
Definition: FlowElement_v1.cxx:163
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37