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

#include <CorrectPFOTool.h>

Inheritance diagram for CorrectPFOTool:
Collaboration diagram for CorrectPFOTool:

Public Member Functions

 CorrectPFOTool (const std::string &name)
 
StatusCode initialize () override final
 Dummy implementation of the initialisation function. More...
 
StatusCode process (xAOD::IParticleContainer *cont) const override final
 
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
 

Protected Member Functions

StatusCode setEtaPhi (xAOD::IParticle *obj, float eta, float phi) const
 
StatusCode setEnergyPt (xAOD::IParticle *obj, float e, float pt, const SG::AuxElement::Accessor< float > *weightAcc=nullptr) const
 
StatusCode setP4 (xAOD::IParticle *obj, const xAOD::JetFourMom_t &p4, const SG::AuxElement::Accessor< float > *weightAcc=nullptr) const
 
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

unsigned int m_inputType =xAOD::Type::Other
 
bool m_applyToChargedPFO =true
 
bool m_applyToNeutralPFO =true
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode process_impl (xAOD::IParticleContainer *cont) const override final
 
StatusCode correctPFO (xAOD::PFOContainer &cont) const
 
StatusCode correctPFO (xAOD::FlowElementContainer &cont) const
 
StatusCode correctPFOByVertex (xAOD::PFOContainer &cont) const
 
StatusCode correctPFOByVertex (xAOD::FlowElementContainer &cont) const
 
const xAOD::VertexgetPrimaryVertex () const
 
StatusCode applyNeutralCorrection (xAOD::PFO &pfo, const xAOD::Vertex &vtx) const
 
StatusCode applyNeutralCorrection (xAOD::FlowElement &pfo, const xAOD::Vertex &vtx) const
 
StatusCode applyChargedCorrection (xAOD::PFO &pfo) const
 
StatusCode applyChargedCorrection (xAOD::FlowElement &pfo) const
 
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

bool m_inputIsEM
 
bool m_calibrate
 If true EM clusters are used for neutral PFOs. More...
 
bool m_correctneutral
 If true, EM PFOs are calibrated to LC. More...
 
bool m_correctcharged
 
bool m_useChargedWeights
 
bool m_doByVertex
 
ToolHandle< CP::IWeightPFOToolm_weightPFOTool
 
SG::ReadHandleKey< xAOD::VertexContainerm_vertexContainer_key
 
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

Applies various corrections to PFO

Properties: InputIsEM - If true, EM-scale is used for the neutral pflow CalibratePFO - If true the EM-scale pflow is calibrated

Author
Jennifer Roloff, John Stupak, and Steven Schramm - based on PFlowPseudoJetGetter by P-A Delsart, D. Adams

Definition at line 32 of file CorrectPFOTool.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

◆ CorrectPFOTool()

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

Definition at line 13 of file CorrectPFOTool.cxx.

13  :
15  m_weightPFOTool("",this) {
16 
17  // Configuration
18  declareProperty("WeightPFOTool", m_weightPFOTool, "Name of tool that extracts the cPFO weights.");
19  declareProperty("InputIsEM", m_inputIsEM = true, "True if neutral PFOs are EM scale clusters.");
20  declareProperty("CalibratePFO", m_calibrate = false, "True if LC calibration should be applied to EM PFOs.");
21  declareProperty("CorrectNeutral", m_correctneutral = true, "True to use the neutral component of PFlow.");
22  declareProperty("CorrectCharged", m_correctcharged = true, "True if use the charged component of PFlow.");
23  declareProperty("UseChargedWeights",m_useChargedWeights = true, "True if we make use of weighting scheme for charged PFO");
24  declareProperty("DoByVertex", m_doByVertex = false, "True to add vertex-by-vertex corrections for neutral PFOs");
25 
26  // Input properties
27  declareProperty("VertexContainerKey",
28  m_vertexContainer_key="PrimaryVertices",
29  "Datahandle key for the primary vertex container");
30 }

Member Function Documentation

◆ applyChargedCorrection() [1/2]

StatusCode CorrectPFOTool::applyChargedCorrection ( xAOD::FlowElement pfo) const
private

Definition at line 313 of file CorrectPFOTool.cxx.

313  {
314  if (m_useChargedWeights) {
315  float weight = 0.0;
316  ATH_CHECK( m_weightPFOTool->fillWeight( pfo, weight ) );
317  ATH_MSG_VERBOSE("Fill pseudojet for CPFO with weighted pt: " << pfo.pt()*weight);
318  pfo.setP4(pfo.p4()*weight);
319  }//if should use charged PFO weighting scheme
320  return StatusCode::SUCCESS;
321 }

◆ applyChargedCorrection() [2/2]

StatusCode CorrectPFOTool::applyChargedCorrection ( xAOD::PFO pfo) const
private

Definition at line 303 of file CorrectPFOTool.cxx.

303  {
304  if (m_useChargedWeights) {
305  float weight = 0.0;
306  ATH_CHECK( m_weightPFOTool->fillWeight( pfo, weight ) );
307  ATH_MSG_VERBOSE("Fill pseudojet for CPFO with weighted pt: " << pfo.pt()*weight);
308  pfo.setP4(pfo.p4()*weight);
309  }//if should use charged PFO weighting scheme
310  return StatusCode::SUCCESS;
311 }

◆ applyNeutralCorrection() [1/2]

StatusCode CorrectPFOTool::applyNeutralCorrection ( xAOD::FlowElement pfo,
const xAOD::Vertex vtx 
) const
private

Definition at line 292 of file CorrectPFOTool.cxx.

292  {
293  if (pfo.e() < FLT_MIN) { //This is necessary to avoid changing sign of pT for pT<0 PFO
294  pfo.setP4(0,0,0,0);
295  }
296  // Only apply origin correction if we really reconstructed a vertex
297  else if(vtx.vertexType() == xAOD::VxType::PriVtx) {
299  }
300  return StatusCode::SUCCESS;
301 }

◆ applyNeutralCorrection() [2/2]

StatusCode CorrectPFOTool::applyNeutralCorrection ( xAOD::PFO pfo,
const xAOD::Vertex vtx 
) const
private

Definition at line 273 of file CorrectPFOTool.cxx.

273  {
274  if (pfo.e() < FLT_MIN) { //This is necessary to avoid changing sign of pT for pT<0 PFO
275  pfo.setP4(0,0,0,0);
276  } else {
277  if ( !m_inputIsEM || m_calibrate ) { // Use LC four-vector
278  // Only correct if we really reconstructed a vertex
279  if(vtx.vertexType()==xAOD::VxType::PriVtx) {
280  pfo.setP4(pfo.GetVertexCorrectedFourVec(vtx));
281  }
282  } else { // Use EM four-vector
283  // Only apply origin correction if we really reconstructed a vertex
284  if(vtx.vertexType()==xAOD::VxType::PriVtx) {
285  pfo.setP4(pfo.GetVertexCorrectedEMFourVec(vtx));
286  } else {pfo.setP4(pfo.p4EM());} // Just set EM 4-vec
287  }
288  }
289  return StatusCode::SUCCESS;
290 }

◆ correctPFO() [1/2]

StatusCode CorrectPFOTool::correctPFO ( xAOD::FlowElementContainer cont) const
private

◆ correctPFO() [2/2]

StatusCode CorrectPFOTool::correctPFO ( xAOD::PFOContainer cont) const
private

Definition at line 101 of file CorrectPFOTool.cxx.

101  {
102 
103  const xAOD::Vertex* vtx = nullptr;
104  if(m_correctneutral) {
105  vtx = getPrimaryVertex();
106  if(vtx==nullptr) {
107  ATH_MSG_ERROR("Primary vertex container was empty or no valid vertex found!");
108  return StatusCode::FAILURE;
109  } else if (vtx->vertexType()==xAOD::VxType::NoVtx) {
110  ATH_MSG_VERBOSE("No genuine primary vertex found. Will not apply origin correction");
111  }
112  }
113 
114  for ( xAOD::PFO* ppfo : cont ) {
115 
116  if ( std::abs(ppfo->charge())<FLT_MIN) { // Neutral PFOs
117  if(m_correctneutral) {
118  ATH_CHECK( applyNeutralCorrection(*ppfo, *vtx) );
119  }
120  } else { // Charged PFOs
121  if(m_correctcharged) {
123  }
124  }
125  } // PFO loop
126 
127  return StatusCode::SUCCESS;
128 }

◆ correctPFOByVertex() [1/2]

StatusCode CorrectPFOTool::correctPFOByVertex ( xAOD::FlowElementContainer cont) const
private

◆ correctPFOByVertex() [2/2]

StatusCode CorrectPFOTool::correctPFOByVertex ( xAOD::PFOContainer cont) const
private

Definition at line 159 of file CorrectPFOTool.cxx.

159  {
160  static const SG::AuxElement::Accessor<unsigned> copyIndex("ConstituentCopyIndex");
161  // Retrieve Primary Vertices
162  auto handle = SG::makeHandle(m_vertexContainer_key);
163  if (!handle.isValid()){
164  ATH_MSG_WARNING(" This event has no primary vertex container" );
165  return StatusCode::FAILURE;
166  }
167 
168  const xAOD::VertexContainer* pvtxs = handle.cptr();
169  if(pvtxs->empty()){
170  ATH_MSG_WARNING(" Failed to retrieve valid primary vertex container" );
171  return StatusCode::FAILURE;
172  }
173 
174  for ( xAOD::PFO* ppfo : cont ) {
175 
176  if ( std::abs(ppfo->charge())<FLT_MIN) { // Neutral PFOs
177  if(m_correctneutral) {
178  // Neutral PFOs - there are copies, one per vertex, already created
179  // We need to now need to correct each copy to point to the corresponding vertex
180  if (!copyIndex.isAvailable(*ppfo))
181  {
182  ATH_MSG_WARNING("Encountered a neutral per-vertex PFO object without the corresponding vertex index attribute");
183  continue;
184  }
185 
186  const unsigned iVtx = copyIndex(*ppfo);
187  if (iVtx >= pvtxs->size())
188  {
189  ATH_MSG_WARNING("Encountered a neutral per-vertex PFO object with an index beyond the size of the vertex container");
190  continue;
191  }
192  const xAOD::Vertex* vtx = pvtxs->at(iVtx);
193  // Determine the correct four-vector interpretation for a neutral PFO associated with this vertex
194  // Cannot use applyNeutralCorrection as that only used VxType::PriVtx, but we want to apply to all primary vertices
195  // As such, extract the relevant parts and modify appropriately here
196  // This is necessary to avoid changing sign of pT for pT<0 PFO
197  if (ppfo->e() < FLT_MIN) {
198  ppfo->setP4(0, 0, 0, 0);
199  }
200  if (!m_inputIsEM || m_calibrate) { // Use LC four-vector
201  ppfo->setP4(ppfo->GetVertexCorrectedFourVec(*vtx));
202  } else { // Use EM four-vector
203  ppfo->setP4(ppfo->GetVertexCorrectedEMFourVec(*vtx));
204  }
205  }
206  } else { // Charged PFOs
207  if(m_correctcharged) {
209  }
210  }
211  } // PFO loop
212 
213 
214  return StatusCode::SUCCESS;
215 }

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

◆ 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

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

◆ getPrimaryVertex()

const xAOD::Vertex * CorrectPFOTool::getPrimaryVertex ( ) const
private

Definition at line 66 of file CorrectPFOTool.cxx.

66  {
67  // Retrieve Primary Vertices
69  if (!handle.isValid()){
70  ATH_MSG_WARNING(" This event has no primary vertex container" );
71  return nullptr;
72  }
73 
74  const xAOD::VertexContainer* pvtxs = handle.cptr();
75  if(pvtxs->empty()){
76  ATH_MSG_WARNING(" Failed to retrieve valid primary vertex container" );
77  return nullptr;
78  }
79 
80  //Usually the 0th vertex is the primary one, but this is not always
81  // the case. So we will choose the first vertex of type PriVtx
82  for (const auto *theVertex : *pvtxs) {
83  if (theVertex->vertexType()==xAOD::VxType::PriVtx) {
84  return theVertex;
85  }//If we have a vertex of type primary vertex
86  }//iterate over the vertices and check their type
87 
88  // If we failed to find an appropriate vertex, return the dummy vertex
89  ATH_MSG_DEBUG("Could not find a primary vertex in this event " );
90  for (const auto *theVertex : *pvtxs) {
91  if (theVertex->vertexType()==xAOD::VxType::NoVtx) {
92  return theVertex;
93  }
94  }
95 
96  // If there is no primary vertex, then we cannot do PV matching.
97  ATH_MSG_WARNING("Primary vertex container was empty");
98  return nullptr;
99 }

◆ getProperty()

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

Get one of the tool's properties.

◆ initialize()

StatusCode CorrectPFOTool::initialize ( )
finaloverridevirtual

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 32 of file CorrectPFOTool.cxx.

32  {
34  ATH_MSG_ERROR("This tool is configured to do nothing!");
35  return StatusCode::FAILURE;
36  }
38  ATH_MSG_ERROR("CorrectPFOTool requires PFO inputs. It cannot operate on objects of type "
39  << m_inputType);
40  return StatusCode::FAILURE;
41  }
43  ATH_CHECK( m_weightPFOTool.retrieve() );
44  }
45  ATH_CHECK( m_vertexContainer_key.initialize() );
46 
47  ATH_MSG_INFO("Running CorrectPFOTool by vertex:" << m_doByVertex);
48  return StatusCode::SUCCESS;
49 }

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

◆ 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

◆ process()

StatusCode JetConstituentModifierBase::process ( xAOD::IParticleContainer cont) const
finaloverridevirtualinherited

Implements IJetConstituentModifier.

Definition at line 23 of file JetConstituentModifierBase.cxx.

24 {
25  // Test that we are operating on the type of object that
26  // we will be writing out.
27  // By implication, any supporting containers should not
28  // be the ones passed to this method...
29  if(!cont->empty() && cont->front()->type() != m_inputType) {
30  ATH_MSG_ERROR("Object type mismatch! This tool expects " << m_inputType
31  << ", but received " << cont->front()->type());
32  return StatusCode::FAILURE;
33  }
34 
35  ATH_CHECK(process_impl(cont));
36 
37  return StatusCode::SUCCESS;
38 }

◆ process_impl()

StatusCode CorrectPFOTool::process_impl ( xAOD::IParticleContainer cont) const
finaloverrideprivatevirtual

Reimplemented from JetConstituentModifierBase.

Definition at line 51 of file CorrectPFOTool.cxx.

51  {
52  // Type-checking happens in the JetConstituentModifierBase class
53  // so it is safe just to static_cast
55  xAOD::FlowElementContainer* feCont = static_cast<xAOD::FlowElementContainer*>(cont);
56  if(!feCont->empty() && !(feCont->front()->signalType() & xAOD::FlowElement::PFlow)){
57  ATH_MSG_ERROR("CorrectPFOTool received FlowElements that aren't PFOs");
58  return StatusCode::FAILURE;
59  }
60  return m_doByVertex ? correctPFOByVertex(*feCont) : correctPFO(*feCont);
61  }
62  xAOD::PFOContainer* pfoCont = static_cast<xAOD::PFOContainer*> (cont);
63  return m_doByVertex ? correctPFOByVertex(*pfoCont) : correctPFO(*pfoCont);
64 }

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

◆ setEnergyPt()

StatusCode JetConstituentModifierBase::setEnergyPt ( xAOD::IParticle obj,
float  e,
float  pt,
const SG::AuxElement::Accessor< float > *  weightAcc = nullptr 
) const
protectedinherited

Definition at line 61 of file JetConstituentModifierBase.cxx.

63 {
64  switch(m_inputType) {
66  {
67  xAOD::CaloCluster* clus = static_cast<xAOD::CaloCluster*>(obj);
68  // Clusters get pt via the energy
69  // This currently leaves the mass unaltered.
70  if(weightAcc) (*weightAcc)(*clus) = clus->calE() > 0. ? e / clus->calE() : 0.;
71  clus->setCalE(e);
72  }
73  break;
75  {
76  xAOD::PFO* pfo = static_cast<xAOD::PFO*>(obj);
77  if( (m_applyToChargedPFO && pfo->isCharged()) ||
78  (m_applyToNeutralPFO && !pfo->isCharged()) ) {
79  if(weightAcc) (*weightAcc)(*pfo) = pfo->pt() > 0. ? pt / pfo->pt() : 0.;
80  // KTJ: Temporary fix
81  // Defeats the purpose, but we need to use this to reset the 4-vec cache
82  pfo->setP4(pt, pfo->eta(), pfo->phi());
83  }
84  }
85  break;
87  {
88  xAOD::FlowElement* pfo = static_cast<xAOD::FlowElement*>(obj);
89  if( (m_applyToChargedPFO && pfo->isCharged()) ||
90  (m_applyToNeutralPFO && !pfo->isCharged()) ) {
91  if(weightAcc) (*weightAcc)(*pfo) = pfo->pt() > 0. ? pt / pfo->pt() : 0.;
92  pfo->setP4(pt, pfo->eta(), pfo->phi(), 0.);
93  }
94  }
95  break;
97  {
99  if( tcc->taste() != 0) {
100  if(weightAcc) (*weightAcc)(*tcc) = tcc->pt() > 0. ? pt / tcc->pt() : 0.;
101  tcc->setParameters(pt, tcc->eta(), tcc->phi(), tcc->m(), xAOD::TrackCaloCluster::Taste(tcc->taste()), tcc->trackParticleLink(), tcc->caloClusterLinks());
102  }
103  }
104  break;
105  default:
106  // Should not get here, because type-checking should happen in process()
107  ATH_MSG_ERROR("No specialisation for object type " << m_inputType);
108  return StatusCode::FAILURE;
109  }
110  return StatusCode::SUCCESS;
111 }

◆ setEtaPhi()

StatusCode JetConstituentModifierBase::setEtaPhi ( xAOD::IParticle obj,
float  eta,
float  phi 
) const
protectedinherited

Definition at line 41 of file JetConstituentModifierBase.cxx.

42 {
43  switch(m_inputType) {
44  // The main (only?) application is origin-correcting LC topoclusters
45  // By convention we leave the raw p4 unmodified
47  {
48  xAOD::CaloCluster* clus = static_cast<xAOD::CaloCluster*>(obj);
49  clus->setCalEta(eta);
50  clus->setCalPhi(phi);
51  }
52  break;
53  default:
54  // Should not get here, because type-checking should happen in process()
55  ATH_MSG_ERROR("No specialisation for object type " << m_inputType);
56  return StatusCode::FAILURE;
57  }
58  return StatusCode::SUCCESS;
59 }

◆ setP4()

StatusCode JetConstituentModifierBase::setP4 ( xAOD::IParticle obj,
const xAOD::JetFourMom_t p4,
const SG::AuxElement::Accessor< float > *  weightAcc = nullptr 
) const
protectedinherited

Definition at line 113 of file JetConstituentModifierBase.cxx.

114  {
115  switch(m_inputType) {
117  {
118  xAOD::CaloCluster* clus = static_cast<xAOD::CaloCluster*>(obj);
119  // This currently leaves the mass unaltered
120  if(weightAcc) (*weightAcc)(*clus) = clus->calE() > 0. ? p4.e() / clus->calE() : 0.;
121  clus->setCalE(p4.e());
122  clus->setCalEta(p4.eta());
123  clus->setCalPhi(p4.phi());
124  }
125  break;
127  {
128  xAOD::PFO* pfo = static_cast<xAOD::PFO*>(obj);
129  // The PFO setter defaults to m=0
130  if( (m_applyToChargedPFO && pfo->isCharged()) ||
131  (m_applyToNeutralPFO && !pfo->isCharged()) ) {
132  if(weightAcc) (*weightAcc)(*pfo) = pfo->pt() > 0. ? p4.pt() / pfo->pt() : 0.;
133  pfo->setP4(p4.pt(),p4.eta(),p4.phi(),p4.mass());
134  }
135  }
136  break;
138  {
139  xAOD::FlowElement* pfo = static_cast<xAOD::FlowElement*>(obj);
140  if( (m_applyToChargedPFO && pfo->isCharged()) ||
141  (m_applyToNeutralPFO && !pfo->isCharged()) ) {
142  if(weightAcc) (*weightAcc)(*pfo) = pfo->pt() > 0. ? p4.pt() / pfo->pt() : 0.;
143  pfo->setP4(p4.pt(),p4.eta(),p4.phi(),p4.mass());
144  }
145  }
146  break;
148  {
149  xAOD::TrackCaloCluster* tcc = static_cast<xAOD::TrackCaloCluster*>(obj);
150  if( tcc->taste() != 0) {
151  if(weightAcc) (*weightAcc)(*tcc) = tcc->pt() > 0. ? p4.pt() / tcc->pt() : 0.;
152  tcc->setParameters(p4.pt(), p4.eta(), p4.phi(), p4.mass(), xAOD::TrackCaloCluster::Taste(tcc->taste()), tcc->trackParticleLink(), tcc->caloClusterLinks());
153  }
154  break;
155  }
156 
157  default:
158  // Should not get here, because type-checking should happen in process()
159  ATH_MSG_ERROR("No specialisation for object type " << m_inputType);
160  return StatusCode::FAILURE;
161  }
162  return StatusCode::SUCCESS;
163 }

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

bool JetConstituentModifierBase::m_applyToChargedPFO =true
protectedinherited

Definition at line 62 of file JetConstituentModifierBase.h.

◆ m_applyToNeutralPFO

bool JetConstituentModifierBase::m_applyToNeutralPFO =true
protectedinherited

Definition at line 63 of file JetConstituentModifierBase.h.

◆ m_calibrate

bool CorrectPFOTool::m_calibrate
private

If true EM clusters are used for neutral PFOs.

Definition at line 59 of file CorrectPFOTool.h.

◆ m_correctcharged

bool CorrectPFOTool::m_correctcharged
private

Definition at line 61 of file CorrectPFOTool.h.

◆ m_correctneutral

bool CorrectPFOTool::m_correctneutral
private

If true, EM PFOs are calibrated to LC.

Definition at line 60 of file CorrectPFOTool.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_doByVertex

bool CorrectPFOTool::m_doByVertex
private

Definition at line 63 of file CorrectPFOTool.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_inputIsEM

bool CorrectPFOTool::m_inputIsEM
private

Definition at line 58 of file CorrectPFOTool.h.

◆ m_inputType

unsigned int JetConstituentModifierBase::m_inputType =xAOD::Type::Other
protectedinherited

Definition at line 60 of file JetConstituentModifierBase.h.

◆ m_useChargedWeights

bool CorrectPFOTool::m_useChargedWeights
private

Definition at line 62 of file CorrectPFOTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainer_key

SG::ReadHandleKey<xAOD::VertexContainer> CorrectPFOTool::m_vertexContainer_key
private

Definition at line 66 of file CorrectPFOTool.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_weightPFOTool

ToolHandle<CP::IWeightPFOTool> CorrectPFOTool::m_weightPFOTool
private

Definition at line 64 of file CorrectPFOTool.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
CorrectPFOTool::m_vertexContainer_key
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainer_key
Definition: CorrectPFOTool.h:66
JetConstituentModifierBase::m_applyToNeutralPFO
bool m_applyToNeutralPFO
Definition: JetConstituentModifierBase.h:63
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
xAOD::PFO_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition: PFO_v1.cxx:52
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CorrectPFOTool::m_inputIsEM
bool m_inputIsEM
Definition: CorrectPFOTool.h:58
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JetConstituentModifierBase::JetConstituentModifierBase
JetConstituentModifierBase(const std::string &name)
Definition: JetConstituentModifierBase.cxx:14
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
CorrectPFOTool::m_weightPFOTool
ToolHandle< CP::IWeightPFOTool > m_weightPFOTool
Definition: CorrectPFOTool.h:64
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CorrectPFOTool::correctPFO
StatusCode correctPFO(xAOD::PFOContainer &cont) const
Definition: CorrectPFOTool.cxx:101
xAOD::CaloCluster_v1::calE
flt_t calE() const
Geet Energy in signal state CALIBRATED.
xAOD::TrackCaloCluster_v1
Class describing a TrackCaloCluster.
Definition: TrackCaloCluster_v1.h:25
JetConstituentModifierBase::process_impl
virtual StatusCode process_impl(xAOD::IParticleContainer *) const
Definition: JetConstituentModifierBase.h:33
CorrectPFOTool::m_calibrate
bool m_calibrate
If true EM clusters are used for neutral PFOs.
Definition: CorrectPFOTool.h:59
test_pyathena.pt
pt
Definition: test_pyathena.py:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::CaloCluster_v1::setCalEta
void setCalEta(flt_t)
Set for signal state CALIBRATED.
Definition: CaloCluster_v1.cxx:311
xAOD::FlowElement_v1::pt
virtual double pt() const override
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
JetConstituentModifierBase::m_applyToChargedPFO
bool m_applyToChargedPFO
Definition: JetConstituentModifierBase.h:62
xAOD::Vertex_v1::vertexType
VxType::VertexType vertexType() const
The type of the vertex.
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:570
xAOD::PFO_v1::GetVertexCorrectedFourVec
TLorentzVector GetVertexCorrectedFourVec(const xAOD::Vertex &vertexToCorrectTo) const
Correct 4-vector to point at a vertex.
Definition: PFO_v1.cxx:722
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
xAOD::PFO_v1::p4EM
FourMom_t p4EM() const
get EM scale 4-vector
Definition: PFO_v1.cxx:144
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
xAOD::TrackCaloCluster
TrackCaloCluster_v1 TrackCaloCluster
Reference the current persistent version:
Definition: TrackCaloCluster.h:12
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
xAOD::FlowElement_v1::PFlow
@ PFlow
Definition: FlowElement_v1.h:45
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
xAOD::TrackCaloCluster_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
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
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CorrectPFOTool::getPrimaryVertex
const xAOD::Vertex * getPrimaryVertex() const
Definition: CorrectPFOTool.cxx:66
xAOD::CaloCluster_v1::setCalPhi
void setCalPhi(flt_t)
Set for signal state CALIBRATED.
Definition: CaloCluster_v1.cxx:316
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition: FlowElement.h:16
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
xAOD::PFO_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: PFO_v1.cxx:95
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
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CorrectPFOTool::m_correctcharged
bool m_correctcharged
Definition: CorrectPFOTool.h:61
xAOD::PFO_v1::isCharged
bool isCharged() const
is a charged PFO
Definition: PFO_v1.cxx:251
CorrectPFOTool::correctPFOByVertex
StatusCode correctPFOByVertex(xAOD::PFOContainer &cont) const
Definition: CorrectPFOTool.cxx:159
CorrectPFOTool::applyChargedCorrection
StatusCode applyChargedCorrection(xAOD::PFO &pfo) const
Definition: CorrectPFOTool.cxx:303
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
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:221
xAOD::FlowElement_v1::e
virtual double e() const override
The total energy of the particle.
Definition: FlowElement_v1.cxx:25
xAOD::TrackCaloCluster_v1::taste
virtual int taste() const
The taste of the particle.
CorrectPFOTool::m_doByVertex
bool m_doByVertex
Definition: CorrectPFOTool.h:63
xAOD::PFO_v1::setP4
void setP4(const FourMom_t &vec)
set the 4-vec
Definition: PFO_v1.cxx:107
JetConstituentModifierBase::m_inputType
unsigned int m_inputType
Definition: JetConstituentModifierBase.h:60
xAOD::FlowElement_v1::p4
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
Definition: FlowElement_v1.cxx:33
a
TList * a
Definition: liststreamerinfos.cxx:10
CorrectPFOTool::applyNeutralCorrection
StatusCode applyNeutralCorrection(xAOD::PFO &pfo, const xAOD::Vertex &vtx) const
Definition: CorrectPFOTool.cxx:273
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::TrackCaloCluster_v1::Taste
Taste
Type of TrackCaloCluster - Charged - Neutral - Combined.
Definition: TrackCaloCluster_v1.h:30
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::FlowElement_v1::setP4
void setP4(float pt, float eta, float phi, float m)
Definition: FlowElement_v1.cxx:39
CorrectPFOTool::m_correctneutral
bool m_correctneutral
If true, EM PFOs are calibrated to LC.
Definition: CorrectPFOTool.h:60
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
CorrectPFOTool::m_useChargedWeights
bool m_useChargedWeights
Definition: CorrectPFOTool.h:62
python.PyAthena.obj
obj
Definition: PyAthena.py:132
xAOD::PFO_v1::GetVertexCorrectedEMFourVec
TLorentzVector GetVertexCorrectedEMFourVec(const xAOD::Vertex &vertexToCorrectTo) const
Correct EM scale 4-vector to point at a vertex.
Definition: PFO_v1.cxx:737
SG::DataProxy
Definition: DataProxy.h:44
FEHelpers::getVertexCorrectedFourVec
TLorentzVector getVertexCorrectedFourVec(const xAOD::FlowElement &fe, const xAOD::Vertex &vertexToCorrectTo)
Definition: FEHelpers.cxx:13
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
fitman.k
k
Definition: fitman.py:528
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25