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

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

◆ createHepMCParticle()

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

Definition at line 284 of file xAODtoHepMCTool.cxx.

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

◆ createHepMCVertex()

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

Definition at line 294 of file xAODtoHepMCTool.cxx.

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

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

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

◆ getHepMCEvents()

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

Implements IxAODtoHepMCTool.

Definition at line 56 of file xAODtoHepMCTool.cxx.

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

◆ 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  m_evtCount = 0;
21  m_badSuggest = 0;
22  m_noProdVtx = 0;
23  m_badBeams = 0;
24  return StatusCode::SUCCESS;
25 }

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

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

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

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

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:304
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:27
xAODtoHepMCTool::createHepMCEvent
HepMC::GenEvent createHepMCEvent(const xAOD::TruthEvent *xEvt, const xAOD::EventInfo *eventInfo) const
Definition: xAODtoHepMCTool.cxx:93
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:342
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:109
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:348
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:284
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:221
weights
Definition: herwig7_interface.h:44
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:260
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:294
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:345
xAODtoHepMCTool::m_badSuggest
std::atomic< int > m_badSuggest
Definition: xAODtoHepMCTool.h:58
SG::DataProxy
Definition: DataProxy.h:44
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