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

#include <xAODtoHepMCTool.h>

Inheritance diagram for xAODtoHepMCTool:
Collaboration diagram for xAODtoHepMCTool:

Public Member Functions

 xAODtoHepMCTool (const std::string &name)
 
virtual ~xAODtoHepMCTool ()
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
StatusCode finalize () override
 
std::vector< HepMC::GenEvent > getHepMCEvents (const xAOD::TruthEventContainer *xTruthEventContainer, const xAOD::EventInfo *eventInfo) const override
 
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

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

HepMC::GenEvent createHepMCEvent (const xAOD::TruthEvent *xEvt, const xAOD::EventInfo *eventInfo) const
 
HepMC::GenVertexPtr vertexHelper (const xAOD::TruthVertex *, std::map< const xAOD::TruthVertex *, HepMC::GenVertexPtr > &, bool &) const
 
HepMC::GenParticlePtr createHepMCParticle (const xAOD::TruthParticle *) const
 
HepMC::GenVertexPtr createHepMCVertex (const xAOD::TruthVertex *) const
 
void printxAODEvent (const xAOD::TruthEvent *event, const xAOD::EventInfo *eventInfo) 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

Gaudi::Property< float > m_momFac
 Input container key (job property) More...
 
Gaudi::Property< float > m_lenFac
 
Gaudi::Property< bool > m_signalOnly
 
Gaudi::Property< int > m_maxCount
 
std::atomic< int > m_evtCount {}
 Counters. More...
 
std::atomic< int > m_badSuggest {}
 
int m_noProdVtx {}
 
int m_badBeams {}
 
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 22 of file xAODtoHepMCTool.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

◆ xAODtoHepMCTool()

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

Definition at line 11 of file xAODtoHepMCTool.cxx.

13 {
14 }

◆ ~xAODtoHepMCTool()

virtual xAODtoHepMCTool::~xAODtoHepMCTool ( )
inlinevirtual

Definition at line 26 of file xAODtoHepMCTool.h.

26 { };

Member Function Documentation

◆ createHepMCEvent()

HepMC::GenEvent xAODtoHepMCTool::createHepMCEvent ( const xAOD::TruthEvent xEvt,
const xAOD::EventInfo eventInfo 
) const
private

EVENT LEVEL

Avoid double deletion

Definition at line 89 of file xAODtoHepMCTool.cxx.

90 {
91 
93  HepMC::GenEvent genEvt;
94  #ifdef HEPMC3
95  genEvt.set_units(HepMC3::Units::MEV, HepMC3::Units::MM);
96  #endif
97 
98  long long int evtNum = eventInfo->eventNumber();
99  genEvt.set_event_number(evtNum);
100  ATH_MSG_DEBUG("Start createHepMCEvent for event " << evtNum);
101 
102  //Weights
103  #ifndef XAOD_STANDALONE
104  const std::vector<float> weights = xEvt->weights();
105  std::map<std::string, int> weightNameMap;
106  if (AthAnalysisHelper::retrieveMetadata("/Generation/Parameters","HepMCWeightNames", weightNameMap).isFailure()) {
107  ATH_MSG_DEBUG("Couldn't find meta-data for weight names.");
108  }
109  #ifdef HEPMC3
110  std::shared_ptr<HepMC3::GenRunInfo> runinfo = std::make_shared<HepMC3::GenRunInfo>();
111  genEvt.set_run_info(runinfo);
112  std::vector<std::string> wnames;
113  wnames.reserve(weights.size());
114  for (int idx = 0; idx < int(weights.size()); ++idx) {
115  for (const auto& it : weightNameMap) {
116  if (it.second == idx) {
117  wnames.push_back(it.first);
118  break;
119  }
120  }
121  }
122  genEvt.run_info()->set_weight_names(wnames);
123  for ( std::vector<float>::const_iterator wgt = weights.begin(); wgt != weights.end(); ++wgt ) {
124  genEvt.weights().push_back(*wgt);
125  }
126  #else
127  if (weightNameMap.size()) {
128  HepMC::WeightContainer& wc = genEvt.weights();
129  wc.clear();
130  for (int idx = 0; idx < int(weights.size()); ++idx) {
131  for (const auto& it : weightNameMap) {
132  if (it.second == idx) {
133  wc[ it.first ] = weights[idx];
134  break;
135  }
136  }
137  }
138  }
139  else {
140  for ( std::vector<float>::const_iterator wgt = weights.begin(); wgt != weights.end(); ++wgt ) {
141  genEvt.weights().push_back(*wgt);
142  }
143  }
144  #endif
145  #endif
146 
147  // PARTICLES AND VERTICES
148  // Map of existing vertices - needed for the tree linking
149  std::map<const xAOD::TruthVertex *, HepMC::GenVertexPtr> vertexMap;
150 
151  // Loop over all of the particles in the event, call particle builder
152  for (auto tlink : xEvt->truthParticleLinks()) {
153  if (!tlink.isValid()) { continue; }
154  const xAOD::TruthParticle *xPart = *tlink;
155 
156  // sanity check
157  if (xPart == nullptr) {
158  ATH_MSG_WARNING("xAOD TruthParticle is equal to NULL. This should not happen!");
159  continue;
160  }
161 
162  if (!xPart->hasProdVtx() && !xPart->hasDecayVtx()) {
163  ATH_MSG_WARNING("xAOD particle with no vertices, uniqueID = " << HepMC::uniqueID(xPart));
164  continue;
165  }
166 
167  // skip particles which are Geant4 secondaries
168  if (HepMC::is_simulation_particle(xPart)) { continue; }
169 
170  // Create GenParticle
171  // presumably the GenEvent takes ownership of this, but creating a unique_ptr here as that will only happen if there's an associated vertex
172 #ifdef HEPMC3
173  auto hepmcParticle = createHepMCParticle(xPart);
174 #else
175  std::unique_ptr<HepMC::GenParticle> hepmcParticle(createHepMCParticle(xPart));
176 #endif
177  int bcpart = HepMC::barcode(xPart);
178 
179  // Get the production and decay vertices
180  if (xPart->hasProdVtx()) {
181  const xAOD::TruthVertex *xAODProdVtx = xPart->prodVtx();
182  // skip production vertices which are Geant4 secondaries
183  if (HepMC::is_simulation_vertex(xAODProdVtx)) { continue; }
184  bool prodVtxSeenBefore(false); // is this new?
185  auto hepmcProdVtx = vertexHelper(xAODProdVtx, vertexMap, prodVtxSeenBefore);
186  // Set the decay/production links
187 #ifdef HEPMC3
188  hepmcProdVtx->add_particle_out(hepmcParticle);
189 #else
190  hepmcProdVtx->add_particle_out(hepmcParticle.get());
191 #endif
192  // Insert into Event
193  if (!prodVtxSeenBefore) {
194  genEvt.add_vertex(hepmcProdVtx);
195  if (!HepMC::suggest_barcode(hepmcProdVtx, HepMC::barcode(xAODProdVtx))) {
196  ATH_MSG_WARNING("suggest_barcode failed for vertex " << HepMC::barcode(xAODProdVtx));
197  ++m_badSuggest;
198  }
199  }
200  if (!HepMC::suggest_barcode(hepmcParticle, bcpart)) {
201  ATH_MSG_VERBOSE("suggest_barcode failed for particle " << bcpart);
202  ++m_badSuggest;
203  }
204  bcpart = 0;
205  }
206  else {
207  ATH_MSG_VERBOSE("No production vertex found for particle " << HepMC::uniqueID(xPart));
208  }
209 
210  if (xPart->hasDecayVtx()) {
211  const xAOD::TruthVertex *xAODDecayVtx = xPart->decayVtx();
212  // skip decay vertices which are Geant4 secondaries
213  if (HepMC::is_simulation_vertex(xAODDecayVtx)) {
215 #ifndef HEPMC3
216  if (xPart->hasProdVtx()) { (void)hepmcParticle.release(); }
217 #endif
218  continue;
219  }
220  bool decayVtxSeenBefore(false); // is this new?
221  auto hepmcDecayVtx = vertexHelper(xAODDecayVtx, vertexMap, decayVtxSeenBefore);
222  // Set the decay/production links
223 #ifdef HEPMC3
224  hepmcDecayVtx->add_particle_in(hepmcParticle);
225 #else
226  hepmcDecayVtx->add_particle_in(hepmcParticle.get());
227 #endif
228  // Insert into Event
229  if (!decayVtxSeenBefore) {
230  genEvt.add_vertex(hepmcDecayVtx);
231  if (!HepMC::suggest_barcode(hepmcDecayVtx, HepMC::barcode(xAODDecayVtx))) {
232  ATH_MSG_WARNING("suggest_barcode failed for vertex "
233  << HepMC::barcode(xAODDecayVtx));
234  ++m_badSuggest;
235  }
236  }
237  if (bcpart != 0) {
238  if (!HepMC::suggest_barcode(hepmcParticle, bcpart)) {
239  ATH_MSG_DEBUG("suggest_barcode failed for particle " << bcpart);
240  ++m_badSuggest;
241  }
242  bcpart = 0;
243  }
244  }
245 #ifndef HEPMC3
246  (void)hepmcParticle.release();
247 #endif
248 
249  } // end of particle loop
250 
251  return genEvt;
252 }

◆ createHepMCParticle()

HepMC::GenParticlePtr xAODtoHepMCTool::createHepMCParticle ( const xAOD::TruthParticle particle) const
private

Definition at line 280 of file xAODtoHepMCTool.cxx.

281 {
282  ATH_MSG_VERBOSE("Creating GenParticle for uniqueID " << HepMC::uniqueID(particle));
283  const HepMC::FourVector fourVec(m_momFac * particle->px(), m_momFac * particle->py(), m_momFac * particle->pz(), m_momFac * particle->e());
284  auto hepmcParticle = HepMC::newGenParticlePtr(fourVec, particle->pdgId(), particle->status());
285  hepmcParticle->set_generated_mass(m_momFac * particle->m());
286  return hepmcParticle;
287 }

◆ createHepMCVertex()

HepMC::GenVertexPtr xAODtoHepMCTool::createHepMCVertex ( const xAOD::TruthVertex vertex) const
private

Definition at line 290 of file xAODtoHepMCTool.cxx.

291 {
292  ATH_MSG_VERBOSE("Creating GenVertex for uniqueID " << HepMC::uniqueID(vertex));
293  HepMC::FourVector prod_pos(m_lenFac * vertex->x(), m_lenFac * vertex->y(), m_lenFac * vertex->z(), m_lenFac * vertex->t());
294  auto genVertex = HepMC::newGenVertexPtr(prod_pos);
295  return genVertex;
296 }

◆ 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

◆ finalize()

StatusCode xAODtoHepMCTool::finalize ( )
overridevirtual

Implements IxAODtoHepMCTool.

Definition at line 23 of file xAODtoHepMCTool.cxx.

24 {
25  ATH_MSG_INFO("==============================================================");
26  ATH_MSG_INFO("========== xAOD -> HepMC Tool :: Run Summary ==========");
27  ATH_MSG_INFO("==============================================================");
28  if (m_noProdVtx)
29  {
30  ATH_MSG_INFO("Number of events that have a missing production vertex = " << m_noProdVtx);
31  }
32  else
33  {
34  ATH_MSG_INFO("No missing production vertices");
35  }
36  if (m_badBeams)
37  {
38  ATH_MSG_INFO("Number events with improperly defined beamparticles = " << m_badBeams);
39  ATH_MSG_INFO("Inconsistencies with the beam particles storage in the event record!");
40  ATH_MSG_INFO("... check xAOD::TruthEvent record ...");
41  }
42  else
43  {
44  ATH_MSG_INFO("No events with undefined beams.");
45  }
46  ATH_MSG_INFO("==============================================================");
47  ATH_MSG_INFO("=================== End Run Summary ===================");
48  ATH_MSG_INFO("==============================================================");
49  return StatusCode::SUCCESS;
50 }

◆ getHepMCEvents()

std::vector< HepMC::GenEvent > xAODtoHepMCTool::getHepMCEvents ( const xAOD::TruthEventContainer xTruthEventContainer,
const xAOD::EventInfo eventInfo 
) const
overridevirtual

Implements IxAODtoHepMCTool.

Definition at line 52 of file xAODtoHepMCTool.cxx.

53 {
54  ++m_evtCount;
55  bool doPrint = m_evtCount < m_maxCount;
56  // CREATE HEPMC EVENT COLLECTION
57  std::vector<HepMC::GenEvent> mcEventCollection;
58  // Loop over xAOD truth container
59  // Signal event is always first, followed by pileup events
60  ATH_MSG_DEBUG("Start event loop");
61  for (const xAOD::TruthEvent *xAODEvent : *xTruthEventContainer)
62  {
63  if (doPrint)
64  ATH_MSG_DEBUG("XXX Printing xAOD Event");
65  if (doPrint)
66  printxAODEvent(xAODEvent, eventInfo);
67  // Create GenEvent for each xAOD truth event
68  ATH_MSG_DEBUG("Create new GenEvent");
69  HepMC::GenEvent&& hepmcEvent = createHepMCEvent(xAODEvent, eventInfo);
70  #ifdef HEPMC3
71  std::shared_ptr<HepMC3::GenRunInfo> runinfo = std::make_shared<HepMC3::GenRunInfo>(*(hepmcEvent.run_info().get()));
72  #endif
73  // Insert into McEventCollection
74  mcEventCollection.push_back(std::move(hepmcEvent));
75  #ifdef HEPMC3
76  mcEventCollection[mcEventCollection.size()-1].set_run_info(runinfo);
77  #endif
78  if (doPrint)
79  ATH_MSG_DEBUG("XXX Printing HepMC Event");
80  if (doPrint)
81  HepMC::Print::line(std::cout, hepmcEvent);
82  // Quit if signal only
83  if (m_signalOnly)
84  break;
85  }
86  return mcEventCollection;
87 }

◆ 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 xAODtoHepMCTool::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 16 of file xAODtoHepMCTool.cxx.

17 {
18  ATH_MSG_INFO("Initializing xAODtoHepMCTool " << name() << "...");
19  ATH_MSG_INFO("SignalOnly = " << m_signalOnly);
20  return StatusCode::SUCCESS;
21 }

◆ 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

◆ printxAODEvent()

void xAODtoHepMCTool::printxAODEvent ( const xAOD::TruthEvent event,
const xAOD::EventInfo eventInfo 
) const
private

Definition at line 300 of file xAODtoHepMCTool.cxx.

301 {
302 
303  std::vector<int> uidPars;
304  std::vector<int> uidKids;
305 
306  long long int evtNum = eventInfo->eventNumber();
307 
308  std::cout << "======================================================================================" << std::endl;
309  std::cout << "xAODTruth Event " << evtNum << std::endl;
310  std::cout << " UniqueID PDG Id Status px(GeV) py(GeV) pz(GeV) E(GeV) Parent: Decay" << std::endl;
311  std::cout << " -----------------------------------------------------------------------------------" << std::endl;
312 
313  int nPart = event->nTruthParticles();
314  for (int i = 0; i < nPart; ++i)
315  {
316  const xAOD::TruthParticle *part = event->truthParticle(i);
317  if (part == nullptr) continue;
318  if (HepMC::generations(part) > 0) continue;
319  int id = part->pdgId();
320  if (id != 25) continue;
321  int stat = part->status();
322  float px = part->px() / 1000.;
323  float py = part->py() / 1000.;
324  float pz = part->pz() / 1000.;
325  float e = part->e() / 1000.;
326  uidPars.clear();
327  uidKids.clear();
328 
329  if (part->hasProdVtx())
330  {
331  const xAOD::TruthVertex *pvtx = part->prodVtx();
332  if (pvtx)
333  uidPars.push_back(HepMC::uniqueID(pvtx));
334  }
335 
336  if (part->hasDecayVtx())
337  {
338  const xAOD::TruthVertex *dvtx = part->decayVtx();
339  if (dvtx)
340  uidKids.push_back(HepMC::uniqueID(dvtx));
341  }
342 
343  std::cout << std::setw(10) << HepMC::uniqueID(part) << std::setw(12) << id
344  << std::setw(8) << stat
345  << std::setprecision(2) << std::fixed
346  << std::setw(10) << px << std::setw(10) << py
347  << std::setw(10) << pz << std::setw(10) << e << " ";
348  std::cout << "P: ";
349  for (unsigned int k = 0; k < uidPars.size(); ++k)
350  {
351  std::cout << uidPars[k] << " ";
352  }
353  std::cout << " D: ";
354  for (unsigned int k = 0; k < uidKids.size(); ++k)
355  {
356  std::cout << uidKids[k] << " ";
357  }
358  std::cout << std::endl;
359  }
360  std::cout << "======================================================================================" << std::endl;
361 }

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

◆ vertexHelper()

HepMC::GenVertexPtr xAODtoHepMCTool::vertexHelper ( const xAOD::TruthVertex xaodVertex,
std::map< const xAOD::TruthVertex *, HepMC::GenVertexPtr > &  vertexMap,
bool &  seenBefore 
) const
private

Definition at line 256 of file xAODtoHepMCTool.cxx.

259 {
260 
261  HepMC::GenVertexPtr hepmcVertex;
263  vMapItr = vertexMap.find(xaodVertex);
264  // Vertex seen before?
265  if (vMapItr != vertexMap.end()) {
266  // YES: use the HepMC::Vertex already in the map
267  hepmcVertex = (*vMapItr).second;
268  seenBefore = true;
269  }
270  else {
271  // NO: create a new HepMC::Vertex
272  vertexMap[xaodVertex] = createHepMCVertex(xaodVertex);
273  hepmcVertex = vertexMap[xaodVertex];
274  seenBefore = false;
275  }
276  return hepmcVertex;
277 }

Member Data Documentation

◆ m_badBeams

int xAODtoHepMCTool::m_badBeams {}
private

Definition at line 60 of file xAODtoHepMCTool.h.

◆ m_badSuggest

std::atomic<int> xAODtoHepMCTool::m_badSuggest {}
mutableprivate

Definition at line 58 of file xAODtoHepMCTool.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_evtCount

std::atomic<int> xAODtoHepMCTool::m_evtCount {}
mutableprivate

Counters.

Definition at line 57 of file xAODtoHepMCTool.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_lenFac

Gaudi::Property<float> xAODtoHepMCTool::m_lenFac
private
Initial value:
{
this, "LengthFactor", 1.0,
"Scale factor to be applied to truth lengths to convert from mm, e.g. 0.01 to go to cm"}

Definition at line 46 of file xAODtoHepMCTool.h.

◆ m_maxCount

Gaudi::Property<int> xAODtoHepMCTool::m_maxCount
private
Initial value:
{
this, "PrintNevents", 0,
"Maximum number of events to print out"}

Definition at line 52 of file xAODtoHepMCTool.h.

◆ m_momFac

Gaudi::Property<float> xAODtoHepMCTool::m_momFac
private
Initial value:
{
this, "MomentFactor", 0.001,
"Scale factor to be applied to truth energy and momenta to convert from MeV, e.g. 0.001 to go to GeV"}

Input container key (job property)

Definition at line 43 of file xAODtoHepMCTool.h.

◆ m_noProdVtx

int xAODtoHepMCTool::m_noProdVtx {}
private

Definition at line 59 of file xAODtoHepMCTool.h.

◆ m_signalOnly

Gaudi::Property<bool> xAODtoHepMCTool::m_signalOnly
private
Initial value:
{
this, "SignalOnly", true,
"Convert only the signal event (true), or all events found"}

Definition at line 49 of file xAODtoHepMCTool.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:
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
HepMC::suggest_barcode
bool suggest_barcode(T &p, int i)
Definition: GenEvent.h:670
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
xAODtoHepMCTool::m_signalOnly
Gaudi::Property< bool > m_signalOnly
Definition: xAODtoHepMCTool.h:49
test_pyathena.px
px
Definition: test_pyathena.py:18
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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
MM
@ MM
Definition: RegSelEnums.h:38
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
HepMC::Print::line
void line(std::ostream &os, const GenEvent &e)
Definition: GenEvent.h:676
DeMoUpdate.runinfo
def runinfo
Definition: DeMoUpdate.py:542
xAODtoHepMCTool::m_badBeams
int m_badBeams
Definition: xAODtoHepMCTool.h:60
xAODtoHepMCTool::printxAODEvent
void printxAODEvent(const xAOD::TruthEvent *event, const xAOD::EventInfo *eventInfo) const
Definition: xAODtoHepMCTool.cxx:300
xAODtoHepMCTool::m_evtCount
std::atomic< int > m_evtCount
Counters.
Definition: xAODtoHepMCTool.h:57
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
xAODtoHepMCTool::m_noProdVtx
int m_noProdVtx
Definition: xAODtoHepMCTool.h:59
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAODtoHepMCTool::m_maxCount
Gaudi::Property< int > m_maxCount
Definition: xAODtoHepMCTool.h:52
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAODtoHepMCTool::createHepMCEvent
HepMC::GenEvent createHepMCEvent(const xAOD::TruthEvent *xEvt, const xAOD::EventInfo *eventInfo) const
Definition: xAODtoHepMCTool.cxx:89
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::TruthParticle_v1::hasDecayVtx
bool hasDecayVtx() const
Check for a decay vertex on this particle.
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
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:355
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAODtoHepMCTool::m_lenFac
Gaudi::Property< float > m_lenFac
Definition: xAODtoHepMCTool.h:46
xAOD::TruthParticle_v1::hasProdVtx
bool hasProdVtx() const
Check for a production vertex on this particle.
Definition: TruthParticle_v1.cxx:74
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
xAOD::TruthEvent_v1
Class describing a signal truth event in the MC record.
Definition: TruthEvent_v1.h:35
python.xAODType.dummy
dummy
Definition: xAODType.py:4
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
HepMC::is_simulation_vertex
bool is_simulation_vertex(const T &v)
Method to establish if the vertex was created during simulation (TODO migrate to be based on status).
Definition: MagicNumbers.h:361
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
beamspotman.stat
stat
Definition: beamspotman.py:266
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::TruthParticle_v1::decayVtx
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
xAOD::TruthEvent_v1::weights
const std::vector< float > & weights() const
Const access to the weights vector.
xAOD::TruthParticle_v1::prodVtx
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Definition: TruthParticle_v1.cxx:80
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
xAODtoHepMCTool::createHepMCParticle
HepMC::GenParticlePtr createHepMCParticle(const xAOD::TruthParticle *) const
Definition: xAODtoHepMCTool.cxx:280
Amg::py
@ py
Definition: GeoPrimitives.h:39
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
weights
Definition: herwig7_interface.h:38
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
h
xAODtoHepMCTool::vertexHelper
HepMC::GenVertexPtr vertexHelper(const xAOD::TruthVertex *, std::map< const xAOD::TruthVertex *, HepMC::GenVertexPtr > &, bool &) const
Definition: xAODtoHepMCTool.cxx:256
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAODtoHepMCTool::createHepMCVertex
HepMC::GenVertexPtr createHepMCVertex(const xAOD::TruthVertex *) const
Definition: xAODtoHepMCTool.cxx:290
xAODtoHepMCTool::m_momFac
Gaudi::Property< float > m_momFac
Input container key (job property)
Definition: xAODtoHepMCTool.h:43
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::TruthEventBase_v1::truthParticleLinks
const TruthParticleLinks_t & truthParticleLinks() const
Get all the truth particles.
HepMC::generations
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (TODO migrate to be...
Definition: MagicNumbers.h:358
xAODtoHepMCTool::m_badSuggest
std::atomic< int > m_badSuggest
Definition: xAODtoHepMCTool.h:58
SG::DataProxy
Definition: DataProxy.h:45
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
AthAnalysisHelper::retrieveMetadata
static std::string retrieveMetadata(const std::string &folder, const std::string &key, const ServiceHandle< StoreGateSvc > &inputMetaStore)
method that always returns as a string you can use from, e.g, pyROOT with evt = ROOT....
Definition: AthAnalysisHelper.h:254