ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
xAODMaker::xAODTruthCnvAlg Class Reference

Algorithm creating xAOD truth from HepMC. More...

#include <xAODTruthCnvAlg.h>

Inheritance diagram for xAODMaker::xAODTruthCnvAlg:
Collaboration diagram for xAODMaker::xAODTruthCnvAlg:

Classes

struct  MetadataFields
 
class  MetaDataWriter
 Factor out the pieces dealing with writing to meta data. More...
 
struct  VertexParticles
 Type for tracking particles connected to a single vertex. More...
 

Public Member Functions

 xAODTruthCnvAlg (const std::string &name, ISvcLocator *svcLoc)
 Regular algorithm constructor. More...
 
virtual StatusCode initialize () override
 Function initialising the algorithm. More...
 
virtual StatusCode execute (const EventContext &ctx) const override
 Function executing the algorithm. More...
 
virtual void handle (const Incident &incident) override
 Incident handler. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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 std::map< HepMC::ConstGenVertexPtr, VertexParticlesVertexMap
 Convenience handle for a map of vtx ptrs -> connected particles. More...
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

Static Private Member Functions

static void fillVertex (xAOD::TruthVertex *tv, const HepMC::ConstGenVertexPtr &gv)
 These functions do not set up ELs, just the other variables. More...
 
static void fillParticle (xAOD::TruthParticle *tp, const HepMC::ConstGenParticlePtr &gp)
 

Private Attributes

SG::ReadHandleKey< McEventCollectionm_aodContainerKey
 The key of the input AOD truth container. More...
 
SG::WriteHandleKey< xAOD::TruthEventContainerm_xaodTruthEventContainerKey
 The key for the output xAOD truth containers. More...
 
SG::WriteHandleKey< xAOD::TruthPileupEventContainerm_xaodTruthPUEventContainerKey
 
SG::WriteHandleKey< xAOD::TruthParticleContainerm_xaodTruthParticleContainerKey
 
SG::WriteHandleKey< xAOD::TruthVertexContainerm_xaodTruthVertexContainerKey
 
SG::WriteHandleKey< xAODTruthParticleLinkVectorm_truthLinkContainerKey
 
Gaudi::Property< bool > m_doAllPileUp {this, "WriteAllPileUpTruth", false}
 Pile-up options. More...
 
Gaudi::Property< bool > m_doInTimePileUp {this, "WriteInTimePileUpTruth", false}
 
MetaDataWriter m_meta ATLAS_THREAD_SAFE
 Helper for writing to the meta data store. More...
 
ServiceHandle< StoreGateSvcm_metaStore
 Connection to the metadata store. More...
 
std::string m_metaName
 SG key and name for meta data. More...
 
Gaudi::Property< bool > m_writeMetaData {this, "WriteTruthMetaData", true}
 option to disable writing of metadata (e.g. if running a filter on xAOD in generators) More...
 
SG::ReadHandleKey< xAOD::EventInfom_evtInfo {this, "EventInfo", "EventInfo", "" }
 Event Info. More...
 
bool m_firstBeginRun
 Tag Info. More...
 
MetadataFields m_metaFields
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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

Algorithm creating xAOD truth from HepMC.

This algorithm can be used to translate the HepMC coming from an AOD, and create xAOD truth objects out of them for an output xAOD.

Author
James Catmore James.nosp@m..Cat.nosp@m.more@.nosp@m.cern.nosp@m..ch
Jovan Mitreski Jovan.nosp@m..Mit.nosp@m.reski.nosp@m.@cer.nosp@m.n.ch
Andy Buckley Andy..nosp@m.Buck.nosp@m.ley@c.nosp@m.ern..nosp@m.ch

Definition at line 64 of file xAODTruthCnvAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ VertexMap

Convenience handle for a map of vtx ptrs -> connected particles.

Definition at line 123 of file xAODTruthCnvAlg.h.

Constructor & Destructor Documentation

◆ xAODTruthCnvAlg()

xAODMaker::xAODTruthCnvAlg::xAODTruthCnvAlg ( const std::string &  name,
ISvcLocator *  svcLoc 
)

Regular algorithm constructor.

Definition at line 54 of file xAODTruthCnvAlg.cxx.

55  : AthReentrantAlgorithm( name, svcLoc )
56  , m_metaStore( "MetaDataStore", name )
57  , m_firstBeginRun(true)
58  {
59  // leaving metadata alone for now--to be updated
60  declareProperty( "MetaObjectName", m_metaName = "TruthMetaData" );
61  declareProperty( "MetaDataStore", m_metaStore );
62  }

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode xAODMaker::xAODTruthCnvAlg::execute ( const EventContext &  ctx) const
overridevirtual

Function executing the algorithm.

Definition at line 105 of file xAODTruthCnvAlg.cxx.

105  {
106 
108  ATH_CHECK(truthLinkVec.record(std::make_unique<xAODTruthParticleLinkVector>()));
109 
110  // Retrieve the HepMC truth:
112  // validity check is only really needed for serial running. Remove when MT is only way.
113  if (!mcColl.isValid()) {
114  ATH_MSG_ERROR("Could not retrieve HepMC with key:" << m_aodContainerKey.key());
115  return StatusCode::FAILURE;
116  } else {
117  ATH_MSG_DEBUG( "Retrieved HepMC with key: " << m_aodContainerKey.key() );
118  }
119 
120  // **************************************************************
121  // Create the xAOD containers and their auxiliary stores:
122  // **************************************************************
123  // Signal event
125  ATH_CHECK(xTruthEventContainer.record(std::make_unique<xAOD::TruthEventContainer>(),
126  std::make_unique<xAOD::TruthEventAuxContainer>()));
127  ATH_MSG_DEBUG( "Recorded TruthEventContainer with key: " << m_xaodTruthEventContainerKey.key() );
128 
129  // Pile-up events
130  SG::WriteHandle<xAOD::TruthPileupEventContainer> xTruthPileupEventContainer;
133  ATH_CHECK(xTruthPileupEventContainer.record(std::make_unique<xAOD::TruthPileupEventContainer>(),
134  std::make_unique<xAOD::TruthPileupEventAuxContainer>()));
135  ATH_MSG_DEBUG( "Recorded TruthPileupEventContainer with key: " << m_xaodTruthPUEventContainerKey.key() );
136  }
137 
138  // Particles
140  ATH_CHECK(xTruthParticleContainer.record(std::make_unique<xAOD::TruthParticleContainer>(),
141  std::make_unique<xAOD::TruthParticleAuxContainer>()));
142  ATH_MSG_DEBUG( "Recorded TruthParticleContainer with key: " << m_xaodTruthParticleContainerKey.key() );
143  // Vertices
145  ATH_CHECK(xTruthVertexContainer.record(std::make_unique<xAOD::TruthVertexContainer>(),
146  std::make_unique<xAOD::TruthVertexAuxContainer>()));
147  ATH_MSG_DEBUG( "Recorded TruthVertexContainer with key: " << m_xaodTruthVertexContainerKey.key() );
148 
149  // ***********************************************************************************
150  // Create the xAOD objects
151  // This consists of three parts:
152  // (1) For each Athena event, loop over the GenEvents and build TruthEvent collections
153  // In principle there can be more than one GenEvent per event
154  // (2) For each GenEvent, loop over the GenParticles. For each GenParticle:
155  // (a) Create a TruthParticle.
156  // (b) Call fillParticle
157  // (c) Add the TruthParticle to the TruthParticle container, and add
158  // an EL to this TruthParticle to the truthParticles in TruthEvent
159  // (call this EL eltp)
160  // (d) For the GenVertex * that's this particle's production vertex,
161  // (i) see if it is in tempMap. If not, add it.
162  // (ii) add a copy of eltp (the EL to this truth particle) to map[gv].second
163  // (e) For the GenVertex * that's this particle's decay vertex,
164  // (i) see if it is in tempMap. If not, add it.
165  // (ii) add a copy of eltp (the EL to this truth particle) to map[gv].first
166  // (3) Iterate over tempMap. For each GenVertex *:
167  // (a) Create a TruthVertex
168  // (b) Call fillVertex
169  // (c) Add the TruthVertex to the TruthTruth container, and add an EL to this TruthVertex
170  // to the truthVertices in TruthEvent. (call this EL eltv)
171  // (d) call tv->setIncomingParticles(mapiter.second.first) <- I think mapiter.second.first is the first of the pair
172  // (e) call tv->setOutgoingParticles(mapiter.second.second)
173  // (f) Iterate through the incomingParticles, and set the decay vertex EL as eltv.
174  // (g) Iterate through the outgoingParticles, and set the incoming vertex EL as eltv.
175  //
176  // Comment lines below follow this recipe
177  // ************************************************************************************
178 
179  // (1) Build TruthEvents
180  ATH_MSG_DEBUG("Number of GenEvents in this Athena event = " << mcColl->size());
181 #ifdef HEPMC3
182  bool newAttributesPresent(false);
183 #endif
184  for (unsigned int cntr = 0; cntr < mcColl->size(); ++cntr) {
185  const HepMC::GenEvent* genEvt = (*mcColl)[cntr];
186  bool isSignalProcess(false);
187  if (cntr==0) {
188  isSignalProcess=true;
189 #ifdef HEPMC3
190  auto bunchCrossingTime = genEvt->attribute<HepMC3::IntAttribute>("BunchCrossingTime");
191  if (bunchCrossingTime) {
192  newAttributesPresent = true;
193  ATH_MSG_VERBOSE("New attributes present.");
194  }
195  else {
196  ATH_MSG_VERBOSE("New attributes missing.");
197  }
198 #else
199  ATH_MSG_VERBOSE("New attributes missing.");
200 #endif
201  }
202  if (cntr>0) {
203  // Handle pile-up events
204  if (!m_doInTimePileUp && !m_doAllPileUp) break;
205  isSignalProcess=false;
206 #ifdef HEPMC3
207  auto bunchCrossingTime = genEvt->attribute<HepMC3::IntAttribute>("BunchCrossingTime");
208  if (bunchCrossingTime) {
209  // New approach based on checking the bunch crossing
210  // time directly.
211  if (m_doInTimePileUp && std::abs(bunchCrossingTime->value()) > 0) {
212  // Skip out-of-time pile-up events
213  continue;
214  }
215  }
216  else {
217  // Old approach based on McEventCollection structure. If
218  // in-time pileup only is requested, loop stops when the
219  // separator GenEvent between out-of-time and in-time is
220  // reached
221  if (m_doInTimePileUp && isSeparatorGenEvent(genEvt)) {
222  if (newAttributesPresent) {
223  // Old structure with new Attributes?! Check all
224  // GenEvents just in case.
225  ATH_MSG_VERBOSE("New-style, but seeing separator GenEvents");
226  continue;
227  }
228  // Old structure - stop at the first separator
229  // GenEvent.
230  break;
231  }
232  }
233 #else
234  // Old approach based on McEventCollection structure. If
235  // in-time pileup only is requested, loop stops when the
236  // separator GenEvent between out-of-time and in-time is
237  // reached
238  if (m_doInTimePileUp && isSeparatorGenEvent(genEvt)) {
239  // Old structure - stop at the first separator
240  // GenEvent.
241  break;
242  }
243 #endif
244  }
245 
246  xAOD::TruthEvent* xTruthEvent = new xAOD::TruthEvent();
247  xAOD::TruthPileupEvent* xTruthPileupEvent = new xAOD::TruthPileupEvent();
248 
249 
250  if (isSignalProcess) {
251  xTruthEventContainer->push_back( xTruthEvent );
252  // Cross-section
253  auto crossSection = genEvt->cross_section();
254 #ifdef HEPMC3
255  xTruthEvent->setCrossSection(crossSection ? (float)crossSection->xsec() : -1);
256  xTruthEvent->setCrossSectionError(crossSection ? (float)crossSection->xsec_err() : -1);
257 #else
258  xTruthEvent->setCrossSection(crossSection ? (float)crossSection->cross_section() : -1);
259  xTruthEvent->setCrossSectionError(crossSection ? (float)crossSection->cross_section_error() : -1);
260 #endif
261 
262  if (m_writeMetaData) {
263  //The mcChannelNumber is used as a unique identifier for which truth meta data belongs to
266  if (evtInfo.isValid()) {
267  mcChannelNumber = evtInfo->mcChannelNumber();
268  if (mcChannelNumber==0) mcChannelNumber = evtInfo->runNumber();
269  }
270  else {
271  ATH_MSG_FATAL("Faied to retrieve EventInfo");
272  return StatusCode::FAILURE;
273  }
274 
275  ATH_CHECK( m_meta.maybeWrite (mcChannelNumber, *genEvt, m_metaFields) );
276  }
277  // Event weights
278  vector<float> weights;
279  for (const double& w : genEvt->weights()) weights.push_back((float)(w));
280  //AV This to be decided. It is always a good idea to have a default weight 1.0.
281  //if (weights.empty()) weights.push_back(1.0);
282  xTruthEvent->setWeights(weights);
283 
284  // Heavy ion info
285  auto const hiInfo = genEvt->heavy_ion();
286  if (hiInfo) {
287 #ifdef HEPMC3
288  /* Please note HepMC3 as well as more recent HePMC2 versions have more Hi parameters */
289  xTruthEvent->setHeavyIonParameter(hiInfo->Ncoll_hard, xAOD::TruthEvent::NCOLLHARD);
290  xTruthEvent->setHeavyIonParameter(hiInfo->Npart_proj, xAOD::TruthEvent::NPARTPROJ);
291  xTruthEvent->setHeavyIonParameter(hiInfo->Npart_targ, xAOD::TruthEvent::NPARTTARG);
292  xTruthEvent->setHeavyIonParameter(hiInfo->Ncoll, xAOD::TruthEvent::NCOLL);
293  xTruthEvent->setHeavyIonParameter(hiInfo->spectator_neutrons, xAOD::TruthEvent::SPECTATORNEUTRONS);
294  xTruthEvent->setHeavyIonParameter(hiInfo->spectator_protons, xAOD::TruthEvent::SPECTATORPROTONS);
295  xTruthEvent->setHeavyIonParameter(hiInfo->N_Nwounded_collisions, xAOD::TruthEvent::NNWOUNDEDCOLLISIONS);
296  xTruthEvent->setHeavyIonParameter(hiInfo->Nwounded_N_collisions, xAOD::TruthEvent::NWOUNDEDNCOLLISIONS);
297  xTruthEvent->setHeavyIonParameter(hiInfo->Nwounded_Nwounded_collisions, xAOD::TruthEvent::NWOUNDEDNWOUNDEDCOLLISIONS);
298  xTruthEvent->setHeavyIonParameter((float)hiInfo->impact_parameter, xAOD::TruthEvent::IMPACTPARAMETER);
299  xTruthEvent->setHeavyIonParameter((float)hiInfo->event_plane_angle, xAOD::TruthEvent::EVENTPLANEANGLE);
300  xTruthEvent->setHeavyIonParameter((float)hiInfo->eccentricity, xAOD::TruthEvent::ECCENTRICITY);
301  xTruthEvent->setHeavyIonParameter((float)hiInfo->sigma_inel_NN, xAOD::TruthEvent::SIGMAINELNN);
302 #else
303  xTruthEvent->setHeavyIonParameter(hiInfo->Ncoll_hard(), xAOD::TruthEvent::NCOLLHARD);
304  xTruthEvent->setHeavyIonParameter(hiInfo->Npart_proj(), xAOD::TruthEvent::NPARTPROJ);
305  xTruthEvent->setHeavyIonParameter(hiInfo->Npart_targ(), xAOD::TruthEvent::NPARTTARG);
306  xTruthEvent->setHeavyIonParameter(hiInfo->Ncoll(), xAOD::TruthEvent::NCOLL);
307  xTruthEvent->setHeavyIonParameter(hiInfo->spectator_neutrons(), xAOD::TruthEvent::SPECTATORNEUTRONS);
308  xTruthEvent->setHeavyIonParameter(hiInfo->spectator_protons(), xAOD::TruthEvent::SPECTATORPROTONS);
309  xTruthEvent->setHeavyIonParameter(hiInfo->N_Nwounded_collisions(), xAOD::TruthEvent::NNWOUNDEDCOLLISIONS);
310  xTruthEvent->setHeavyIonParameter(hiInfo->Nwounded_N_collisions(), xAOD::TruthEvent::NWOUNDEDNCOLLISIONS);
311  xTruthEvent->setHeavyIonParameter(hiInfo->Nwounded_Nwounded_collisions(), xAOD::TruthEvent::NWOUNDEDNWOUNDEDCOLLISIONS);
312  xTruthEvent->setHeavyIonParameter(hiInfo->impact_parameter(), xAOD::TruthEvent::IMPACTPARAMETER);
313  xTruthEvent->setHeavyIonParameter(hiInfo->event_plane_angle(), xAOD::TruthEvent::EVENTPLANEANGLE);
314  xTruthEvent->setHeavyIonParameter(hiInfo->eccentricity(), xAOD::TruthEvent::ECCENTRICITY);
315  xTruthEvent->setHeavyIonParameter(hiInfo->sigma_inel_NN(), xAOD::TruthEvent::SIGMAINELNN);
316 #endif
317  // This doesn't yet exist in our version of HepMC
318  // xTruthEvent->setHeavyIonParameter(hiInfo->centrality(),xAOD::TruthEvent::CENTRALITY);
319  }
320 
321  // Parton density info
322  // This will exist 99% of the time, except for e.g. cosmic or particle gun simulation
323  auto const pdfInfo = genEvt->pdf_info();
324  if (pdfInfo) {
325 #ifdef HEPMC3
326  xTruthEvent->setPdfInfoParameter(pdfInfo->parton_id[0], xAOD::TruthEvent::PDGID1);
327  xTruthEvent->setPdfInfoParameter(pdfInfo->parton_id[1], xAOD::TruthEvent::PDGID2);
328  xTruthEvent->setPdfInfoParameter(pdfInfo->pdf_id[1], xAOD::TruthEvent::PDFID1);
329  xTruthEvent->setPdfInfoParameter(pdfInfo->pdf_id[1], xAOD::TruthEvent::PDFID2);
330 
331  xTruthEvent->setPdfInfoParameter((float)pdfInfo->x[0], xAOD::TruthEvent::X1);
332  xTruthEvent->setPdfInfoParameter((float)pdfInfo->x[1], xAOD::TruthEvent::X2);
333  xTruthEvent->setPdfInfoParameter((float)pdfInfo->scale, xAOD::TruthEvent::Q);
334  xTruthEvent->setPdfInfoParameter((float)pdfInfo->xf[0], xAOD::TruthEvent::XF1);
335  xTruthEvent->setPdfInfoParameter((float)pdfInfo->xf[1], xAOD::TruthEvent::XF2);
336 #else
337  xTruthEvent->setPdfInfoParameter(pdfInfo->id1(), xAOD::TruthEvent::PDGID1);
338  xTruthEvent->setPdfInfoParameter(pdfInfo->id2(), xAOD::TruthEvent::PDGID2);
339  xTruthEvent->setPdfInfoParameter(pdfInfo->pdf_id1(), xAOD::TruthEvent::PDFID1);
340  xTruthEvent->setPdfInfoParameter(pdfInfo->pdf_id2(), xAOD::TruthEvent::PDFID2);
341 
342  xTruthEvent->setPdfInfoParameter((float)pdfInfo->x1(), xAOD::TruthEvent::X1);
343  xTruthEvent->setPdfInfoParameter((float)pdfInfo->x2(), xAOD::TruthEvent::X2);
344  xTruthEvent->setPdfInfoParameter((float)pdfInfo->scalePDF(), xAOD::TruthEvent::Q);
345  xTruthEvent->setPdfInfoParameter((float)pdfInfo->pdf1(), xAOD::TruthEvent::XF1);
346  xTruthEvent->setPdfInfoParameter((float)pdfInfo->pdf2(), xAOD::TruthEvent::XF2);
347 #endif
348  }
349  }else{//not isSignalProcess
350  xTruthPileupEventContainer->push_back( xTruthPileupEvent );
351  }
352 
353  // (2) Build particles and vertices
354  // Map for building associations between particles and vertices
355  // The pair in the map is the (incomingParticles . outgoingParticles) of the given vertex
356  // If signal process vertex is a disconnected vertex (no incoming/outgoing particles), add it manually
357  VertexMap vertexMap;
358  VertexMap::iterator mapItr;
359  vector<HepMC::ConstGenVertexPtr> vertices;
360 
361  // Check signal process vertex
362  // If this is a disconnected vertex, add it manually or won't be added from the loop over particles below.
363  auto disconnectedSignalProcessVtx = HepMC::signal_process_vertex(genEvt); // Get the signal process vertex
364  if (disconnectedSignalProcessVtx) {
365  if (disconnectedSignalProcessVtx->particles_in_size() == 0 && disconnectedSignalProcessVtx->particles_out_size() == 0 ) {
366  //This is a disconnected vertex, add it manually
367  vertices.push_back (disconnectedSignalProcessVtx);
368  }
369  } else {
370  ATH_MSG_WARNING("Signal process vertex pointer not valid in HepMC Collection for GenEvent #" << cntr << " / " << mcColl->size());
371  }
372 
373  // Get the beam particles
374  pair<HepMC::ConstGenParticlePtr,HepMC::ConstGenParticlePtr> beamParticles;
375  bool genEvt_valid_beam_particles=false;
376 #ifdef HEPMC3
377  auto beamParticles_vec = genEvt->beams();
378  genEvt_valid_beam_particles=(beamParticles_vec.size()>1);
379  if (genEvt_valid_beam_particles){beamParticles.first=beamParticles_vec[0]; beamParticles.second=beamParticles_vec[1]; }
380  // We want to process particles in barcode order.
381  auto bcmapatt = genEvt->attribute<HepMC::GenEventBarcodes>("barcodes"); // FIXME barcode-based
382  if (!bcmapatt) ATH_MSG_ERROR("TruthParticleCnvTool.cxx: Event does not contain barcodes attribute");
383  std::map<int, HepMC3::ConstGenParticlePtr> bcmap = bcmapatt->barcode_to_particle_map();
384  xTruthParticleContainer->reserve(bcmap.size());
385  for (const auto &[genPartBarcode,part]: bcmap) {
386 #else
387  genEvt_valid_beam_particles=genEvt->valid_beam_particles();
388  if ( genEvt_valid_beam_particles ) beamParticles = genEvt->beam_particles();
389  xTruthParticleContainer->reserve(genEvt->particles_size());
390  for (auto part: *genEvt) {
391  int genPartBarcode = HepMC::barcode(part); // FIXME barcode-based
392 #endif
393  // (a) create TruthParticle
394  xAOD::TruthParticle* xTruthParticle = new xAOD::TruthParticle();
395  // (b) Put particle into container;
396  xTruthParticleContainer->push_back( xTruthParticle );
397  fillParticle(xTruthParticle, part); // (c) Copy HepMC info into the new particle
398  // (d) Build Event<->Particle element link
399  const ElementLink<xAOD::TruthParticleContainer> eltp(*xTruthParticleContainer, xTruthParticleContainer->size()-1);
400  if (isSignalProcess) xTruthEvent->addTruthParticleLink(eltp);
401  if (!isSignalProcess) xTruthPileupEvent->addTruthParticleLink(eltp);
402 
403  // Create link between HepMC and xAOD truth
404  if (isSignalProcess) truthLinkVec->push_back(new xAODTruthParticleLink(HepMcParticleLink(genPartBarcode,0,HepMcParticleLink::IS_POSITION, HepMcParticleLink::IS_BARCODE), eltp)); // FIXME barcode-based
405  if (!isSignalProcess) truthLinkVec->push_back(new xAODTruthParticleLink(HepMcParticleLink(genPartBarcode,genEvt->event_number(), HepMcParticleLink::IS_EVENTNUM, HepMcParticleLink::IS_BARCODE), eltp)); // FIXME barcode-based
406 
407  // Is this one of the beam particles?
408  if (genEvt_valid_beam_particles) {
409  if (isSignalProcess) {
410  if (part == beamParticles.first) xTruthEvent->setBeamParticle1Link(eltp);
411  if (part == beamParticles.second) xTruthEvent->setBeamParticle2Link(eltp);
412  }
413  }
414  // (e) Particle's production vertex
415  auto productionVertex = part->production_vertex();
416  // Skip the dummy vertex that HepMC3 adds
417  // Can distinguish it from real vertices because it has
418  // a null event pointer.
419  if (productionVertex && productionVertex->parent_event() != nullptr) {
420  VertexParticles& parts = vertexMap[productionVertex];
421  if (parts.incoming.empty() && parts.outgoing.empty())
422  vertices.push_back (productionVertex);
423  parts.outgoingEL.push_back(eltp);
424  parts.outgoing.push_back(xTruthParticle);
425  }
426  //
427  // else maybe want to keep track that this is the production vertex
428  //
429  // (f) Particle's decay vertex
430  auto decayVertex = part->end_vertex();
431  if (decayVertex) {
432  VertexParticles& parts = vertexMap[decayVertex];
433  if (parts.incoming.empty() && parts.outgoing.empty())
434  vertices.push_back (decayVertex);
435  parts.incomingEL.push_back(eltp);
436  parts.incoming.push_back(xTruthParticle);
437  }
438 
439  } // end of loop over particles
440 
441  // (3) Loop over the map
442  auto signalProcessVtx = HepMC::signal_process_vertex(genEvt); // Get the signal process vertex
443  xTruthVertexContainer->reserve(vertices.size());
444  for (const auto& vertex : vertices) {
445  const auto& parts = vertexMap[vertex];
446  // (a) create TruthVertex
447  xAOD::TruthVertex* xTruthVertex = new xAOD::TruthVertex();
448  // (b) Put particle into container (so has store)
449  xTruthVertexContainer->push_back( xTruthVertex );
450  fillVertex(xTruthVertex, vertex); // (c) Copy HepMC info into the new vertex
451  // (d) Build Event<->Vertex element link
452  ElementLink<xAOD::TruthVertexContainer> eltv(*xTruthVertexContainer, xTruthVertexContainer->size()-1);
453  // Mark if this is the signal process vertex
454  if (vertex == signalProcessVtx && isSignalProcess) xTruthEvent->setSignalProcessVertexLink(eltv);
455  if (isSignalProcess) xTruthEvent->addTruthVertexLink(eltv);
456  if (!isSignalProcess) xTruthPileupEvent->addTruthVertexLink(eltv);
457  // (e) Assign incoming particles to the vertex, from the map
458  xTruthVertex->setIncomingParticleLinks( parts.incomingEL );
459  // (f) Assign outgoing particles to the vertex, from the map
460  xTruthVertex->setOutgoingParticleLinks( parts.outgoingEL );
461  // (g) Set Particle<->Vertex links for incoming particles
462  for (xAOD::TruthParticle* p : parts.incoming) p->setDecayVtxLink(eltv);
463  // (h) Set Particle<->Vertex links for incoming particles
464  for (xAOD::TruthParticle* p : parts.outgoing) p->setProdVtxLink(eltv);
465  } //end of loop over vertices
466 
467  // Delete the event that wasn't used
468  if (isSignalProcess) delete xTruthPileupEvent;
469  if (!isSignalProcess) delete xTruthEvent;
470 
471  } // end of loop over McEventCollection
472 
473 
474  std::stable_sort(truthLinkVec->begin(), truthLinkVec->end(), SortTruthParticleLink());
475  ATH_MSG_VERBOSE("Summarizing truth link size: " << truthLinkVec->size() );
476 
477  return StatusCode::SUCCESS;
478  }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ fillParticle()

void xAODMaker::xAODTruthCnvAlg::fillParticle ( xAOD::TruthParticle tp,
const HepMC::ConstGenParticlePtr gp 
)
staticprivate

Definition at line 542 of file xAODTruthCnvAlg.cxx.

542  {
543  tp->setPdgId(gp->pdg_id());
544  tp->setBarcode(HepMC::barcode(gp)); // FIXME barcode-based
545  tp->setStatus(HepMC::old_particle_status_from_new(HepMC::status(gp))); // For now convert the status back to the old scheme
546 
547  auto pol = HepMC::polarization(gp);
548  if (pol.is_defined()) {
549  tp->setPolarizationParameter(pol.theta(), xAOD::TruthParticle::polarizationTheta);
550  tp->setPolarizationParameter(pol.phi(), xAOD::TruthParticle::polarizationPhi);
551  }
552 
553  tp->setM(gp->generated_mass());
554  tp->setPx(gp->momentum().px());
555  tp->setPy(gp->momentum().py());
556  tp->setPz(gp->momentum().pz());
557  tp->setE(gp->momentum().e());
558  }

◆ fillVertex()

void xAODMaker::xAODTruthCnvAlg::fillVertex ( xAOD::TruthVertex tv,
const HepMC::ConstGenVertexPtr gv 
)
staticprivate

These functions do not set up ELs, just the other variables.

Definition at line 530 of file xAODTruthCnvAlg.cxx.

530  {
531  // id was renamed to status in HepMC3.
532  tv->setId(HepMC::old_vertex_status_from_new(HepMC::status(gv))); // For now convert the status back to the old scheme
533  tv->setBarcode(HepMC::barcode(gv)); // FIXME barcode-based
534  tv->setX(gv->position().x());
535  tv->setY(gv->position().y());
536  tv->setZ(gv->position().z());
537  tv->setT(gv->position().t());
538  }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ handle()

void xAODMaker::xAODTruthCnvAlg::handle ( const Incident &  incident)
overridevirtual

Incident handler.

Definition at line 480 of file xAODTruthCnvAlg.cxx.

480  {
481  if (m_firstBeginRun && incident.type()==IncidentType::BeginRun) {
482  m_firstBeginRun = false;
483  ServiceHandle<StoreGateSvc> inputStore("StoreGateSvc/InputMetaDataStore", name());
484  if(inputStore.retrieve().isFailure()) {
485  ATH_MSG_ERROR("Failed to retrieve Input Metadata Store");
486  return;
487  }
488  const IOVMetaDataContainer* tagInfo{nullptr};
489  if(inputStore->retrieve(tagInfo,"/TagInfo").isFailure()) {
490  ATH_MSG_WARNING("Failed to retrieve /TagInfo metadata from the input store");
491  return;
492  }
493  if(tagInfo->payloadContainer()->size()>0) {
494  CondAttrListCollection* tagInfoPayload = tagInfo->payloadContainer()->at(0);
495  if(tagInfoPayload->size()>0) {
496  const CondAttrListCollection::AttributeList& al = tagInfoPayload->attributeList(0);
497  if (al.exists("lhefGenerator")){
498  m_metaFields.lhefGenerator = al["lhefGenerator"].data<std::string>();
499  }
500 
501  if (al.exists("generators")){
502  m_metaFields.generators = al["generators"].data<std::string>();
503  }
504 
505  if (al.exists("evgenProcess")){
506  m_metaFields.evgenProcess = al["evgenProcess"].data<std::string>();
507  }
508 
509  if (al.exists("evgenTune")){
510  m_metaFields.evgenTune = al["evgenTune"].data<std::string>();
511  }
512 
513  if (al.exists("hardPDF")){
514  m_metaFields.hardPDF = al["hardPDF"].data<std::string>();
515  }
516 
517  if (al.exists("softPDF")){
518  m_metaFields.softPDF = al["softPDF"].data<std::string>();
519  }
520  }
521  }
522  else {
523  ATH_MSG_WARNING("Empty Tag Info metadata!");
524  }
525  }
526  }

◆ initialize()

StatusCode xAODMaker::xAODTruthCnvAlg::initialize ( )
overridevirtual

Function initialising the algorithm.

Definition at line 65 of file xAODTruthCnvAlg.cxx.

65  {
67  ATH_MSG_FATAL( "Contradictory xAOD truth pile-up setting: all pile-up AND in-time alone requested simultaneously. Check settings." );
68  return StatusCode::FAILURE;
69  }
70 
71  if (m_writeMetaData) {
72  ATH_CHECK( m_meta.initialize (m_metaStore, m_metaName) );
73  }
74 
75  // initialize handles
77 
78  // only if doing full truth
84 
86 
87  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", name());
88  ATH_CHECK(incSvc.retrieve());
89  incSvc->addListener( this, "BeginRun", 10);
90 
91  ATH_MSG_DEBUG("AODContainerName = " << m_aodContainerKey.key() );
92  ATH_MSG_DEBUG("xAOD TruthEventContainer name = " << m_xaodTruthEventContainerKey.key() );
93  ATH_MSG_DEBUG("xAOD TruthPileupEventContainer name = " << m_xaodTruthPUEventContainerKey.key());
94  ATH_MSG_DEBUG("xAOD TruthParticleContainer name = " << m_xaodTruthParticleContainerKey.key() );
95  ATH_MSG_DEBUG("xAOD TruthVertexContainer name = " << m_xaodTruthVertexContainerKey.key() );
96 
97  if (m_doAllPileUp) ATH_MSG_INFO( "All pile-up truth (including out-of-time) will be written" );
98  if (m_doInTimePileUp) ATH_MSG_INFO( "In-time pile-up truth (but not out-of-time) will be written" );
99  if (!m_doAllPileUp && !m_doInTimePileUp) ATH_MSG_INFO( "No pile-up truth will be written" );
100 
101  return StatusCode::SUCCESS;
102  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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

◆ ATLAS_THREAD_SAFE

MetaDataWriter m_meta xAODMaker::xAODTruthCnvAlg::ATLAS_THREAD_SAFE
mutableprivate

Helper for writing to the meta data store.

This factors out the pieces that are non-const. It's declared mutable and protected with a mutex.

Definition at line 152 of file xAODTruthCnvAlg.h.

◆ m_aodContainerKey

SG::ReadHandleKey<McEventCollection> xAODMaker::xAODTruthCnvAlg::m_aodContainerKey
private
Initial value:
{
this, "AODContainerName", "GEN_AOD", "The input McEvenCollection"}

The key of the input AOD truth container.

Definition at line 130 of file xAODTruthCnvAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doAllPileUp

Gaudi::Property<bool> xAODMaker::xAODTruthCnvAlg::m_doAllPileUp {this, "WriteAllPileUpTruth", false}
private

Pile-up options.

Definition at line 146 of file xAODTruthCnvAlg.h.

◆ m_doInTimePileUp

Gaudi::Property<bool> xAODMaker::xAODTruthCnvAlg::m_doInTimePileUp {this, "WriteInTimePileUpTruth", false}
private

Definition at line 147 of file xAODTruthCnvAlg.h.

◆ m_evtInfo

SG::ReadHandleKey<xAOD::EventInfo> xAODMaker::xAODTruthCnvAlg::m_evtInfo {this, "EventInfo", "EventInfo", "" }
private

Event Info.

Definition at line 163 of file xAODTruthCnvAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_firstBeginRun

bool xAODMaker::xAODTruthCnvAlg::m_firstBeginRun
private

Tag Info.

Definition at line 166 of file xAODTruthCnvAlg.h.

◆ m_metaFields

MetadataFields xAODMaker::xAODTruthCnvAlg::m_metaFields
private

Definition at line 167 of file xAODTruthCnvAlg.h.

◆ m_metaName

std::string xAODMaker::xAODTruthCnvAlg::m_metaName
private

SG key and name for meta data.

Definition at line 157 of file xAODTruthCnvAlg.h.

◆ m_metaStore

ServiceHandle< StoreGateSvc > xAODMaker::xAODTruthCnvAlg::m_metaStore
private

Connection to the metadata store.

Definition at line 155 of file xAODTruthCnvAlg.h.

◆ m_truthLinkContainerKey

SG::WriteHandleKey<xAODTruthParticleLinkVector> xAODMaker::xAODTruthCnvAlg::m_truthLinkContainerKey
private
Initial value:
{
this, "TruthLinks", "xAODTruthLinks", "Output xAODTruthLinks container"}

Definition at line 142 of file xAODTruthCnvAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeMetaData

Gaudi::Property<bool> xAODMaker::xAODTruthCnvAlg::m_writeMetaData {this, "WriteTruthMetaData", true}
private

option to disable writing of metadata (e.g. if running a filter on xAOD in generators)

Definition at line 160 of file xAODTruthCnvAlg.h.

◆ m_xaodTruthEventContainerKey

SG::WriteHandleKey<xAOD::TruthEventContainer> xAODMaker::xAODTruthCnvAlg::m_xaodTruthEventContainerKey
private
Initial value:
{
this, "xAODTruthEventContainerName", "TruthEvents", "Output TruthEvents container"}

The key for the output xAOD truth containers.

Definition at line 134 of file xAODTruthCnvAlg.h.

◆ m_xaodTruthParticleContainerKey

SG::WriteHandleKey<xAOD::TruthParticleContainer> xAODMaker::xAODTruthCnvAlg::m_xaodTruthParticleContainerKey
private
Initial value:
{
this, "xAODTruthParticleContainerName", "TruthParticles", "Output TruthParticles container"}

Definition at line 138 of file xAODTruthCnvAlg.h.

◆ m_xaodTruthPUEventContainerKey

SG::WriteHandleKey<xAOD::TruthPileupEventContainer> xAODMaker::xAODTruthCnvAlg::m_xaodTruthPUEventContainerKey
private
Initial value:
{
this, "xAODTruthPileupEventContainerName", "TruthPileupEvents", "Output TruthPileupEvents container"}

Definition at line 136 of file xAODTruthCnvAlg.h.

◆ m_xaodTruthVertexContainerKey

SG::WriteHandleKey<xAOD::TruthVertexContainer> xAODMaker::xAODTruthCnvAlg::m_xaodTruthVertexContainerKey
private
Initial value:
{
this, "xAODTruthVertexContainerName", "TruthVertices", "Output TruthVertices container"}

Definition at line 140 of file xAODTruthCnvAlg.h.


The documentation for this class was generated from the following files:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
HepMC::old_vertex_status_from_new
int old_vertex_status_from_new(const int newStatus)
Get vertex status in the old scheme from the status in the new scheme.
Definition: MagicNumbers.h:408
xAOD::TruthEvent_v1::X2
@ X2
[float]
Definition: TruthEvent_v1.h:80
xAOD::TruthEvent_v1::setCrossSection
void setCrossSection(float value)
Set the cross-section.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
xAODMaker::xAODTruthCnvAlg::m_xaodTruthParticleContainerKey
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_xaodTruthParticleContainerKey
Definition: xAODTruthCnvAlg.h:138
xAOD::TruthEvent_v1::XF2
@ XF2
[float]
Definition: TruthEvent_v1.h:86
xAOD::TruthEvent_v1::setSignalProcessVertexLink
void setSignalProcessVertexLink(const TruthVertexLink_t &link)
Set pointer to a vertex representing the primary beam interaction point.
IOVMetaDataContainer
This class is a container for conditions data. It is intended to be used to store conditions data fro...
Definition: IOVMetaDataContainer.h:37
xAOD::TruthEvent_v1::ECCENTRICITY
@ ECCENTRICITY
[float]
Definition: TruthEvent_v1.h:142
HepMC::polarization
Polarization polarization(const T &a)
Definition: Polarization.h:47
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::TruthEvent_v1::setWeights
void setWeights(const std::vector< float > &weights)
Set the event weights.
xAOD::TruthEvent_v1::NPARTPROJ
@ NPARTPROJ
[int]
Definition: TruthEvent_v1.h:132
xAODMaker::xAODTruthCnvAlg::m_xaodTruthEventContainerKey
SG::WriteHandleKey< xAOD::TruthEventContainer > m_xaodTruthEventContainerKey
The key for the output xAOD truth containers.
Definition: xAODTruthCnvAlg.h:134
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle< McEventCollection >
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TruthEvent
TruthEvent_v1 TruthEvent
Typedef to implementation.
Definition: TruthEvent.h:17
xAOD::TruthEvent_v1::PDFID2
@ PDFID2
[int]
Definition: TruthEvent_v1.h:78
xAOD::TruthEvent_v1::setBeamParticle2Link
void setBeamParticle2Link(const TruthParticleLink_t &pcl2)
Set one incoming beam particle.
xAODMaker::xAODTruthCnvAlg::MetadataFields::lhefGenerator
std::string lhefGenerator
Definition: xAODTruthCnvAlg.h:84
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
xAOD::TruthEvent_v1::setHeavyIonParameter
bool setHeavyIonParameter(int value, HIParam parameter)
Set an integer HI parameter.
Definition: TruthEvent_v1.cxx:162
xAOD::TruthEvent_v1::IMPACTPARAMETER
@ IMPACTPARAMETER
[float]
Definition: TruthEvent_v1.h:140
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::TruthVertex_v1::setT
void setT(float value)
Set the vertex time.
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::TruthPileupEvent_v1
Class describing a pile-up truth event in the MC record.
Definition: TruthPileupEvent_v1.h:23
xAOD::TruthVertex_v1::setIncomingParticleLinks
void setIncomingParticleLinks(const TPLinks_t &links)
Set all the incoming particles.
xAOD::TruthEvent_v1::NWOUNDEDNWOUNDEDCOLLISIONS
@ NWOUNDEDNWOUNDEDCOLLISIONS
[int]
Definition: TruthEvent_v1.h:139
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAODMaker::xAODTruthCnvAlg::m_metaName
std::string m_metaName
SG key and name for meta data.
Definition: xAODTruthCnvAlg.h:157
xAOD::TruthVertex_v1::setY
void setY(float value)
Set the y displacement of the vertex.
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
xAOD::mcChannelNumber
mcChannelNumber
Definition: EventInfo_v1.cxx:197
xAOD::TruthVertex_v1::setOutgoingParticleLinks
void setOutgoingParticleLinks(const TPLinks_t &links)
Set all the outgoing particles.
std::stable_sort
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
Definition: DVL_algorithms.h:711
xAODMaker::xAODTruthCnvAlg::fillParticle
static void fillParticle(xAOD::TruthParticle *tp, const HepMC::ConstGenParticlePtr &gp)
Definition: xAODTruthCnvAlg.cxx:542
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::TruthEventBase_v1::addTruthParticleLink
void addTruthParticleLink(const TruthParticleLink_t &plink)
Add one truth particle.
Definition: TruthEventBase_v1.cxx:68
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
xAODMaker::xAODTruthCnvAlg::m_doInTimePileUp
Gaudi::Property< bool > m_doInTimePileUp
Definition: xAODTruthCnvAlg.h:147
xAODMaker::xAODTruthCnvAlg::MetadataFields::generators
std::string generators
Definition: xAODTruthCnvAlg.h:85
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::TruthEvent_v1::NPARTTARG
@ NPARTTARG
[int]
Definition: TruthEvent_v1.h:133
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
xAODMaker::xAODTruthCnvAlg::fillVertex
static void fillVertex(xAOD::TruthVertex *tv, const HepMC::ConstGenVertexPtr &gv)
These functions do not set up ELs, just the other variables.
Definition: xAODTruthCnvAlg.cxx:530
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::TruthEvent_v1::NNWOUNDEDCOLLISIONS
@ NNWOUNDEDCOLLISIONS
[int]
Definition: TruthEvent_v1.h:137
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
HepMC::old_particle_status_from_new
int old_particle_status_from_new(const int newStatus)
Get particle status in the old scheme from the status in the new scheme.
Definition: MagicNumbers.h:399
xAODMaker::xAODTruthCnvAlg::m_firstBeginRun
bool m_firstBeginRun
Tag Info.
Definition: xAODTruthCnvAlg.h:166
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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
xAODMaker::xAODTruthCnvAlg::m_xaodTruthPUEventContainerKey
SG::WriteHandleKey< xAOD::TruthPileupEventContainer > m_xaodTruthPUEventContainerKey
Definition: xAODTruthCnvAlg.h:136
xAOD::TruthEvent_v1::setPdfInfoParameter
bool setPdfInfoParameter(int value, PdfParam parameter)
Set an integer PDF info parameter.
Definition: TruthEvent_v1.cxx:75
xAOD::TruthEvent_v1::SIGMAINELNN
@ SIGMAINELNN
[float]
Definition: TruthEvent_v1.h:143
xAODMaker::xAODTruthCnvAlg::MetadataFields::evgenTune
std::string evgenTune
Definition: xAODTruthCnvAlg.h:87
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition: Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
xAODMaker::xAODTruthCnvAlg::MetadataFields::softPDF
std::string softPDF
Definition: xAODTruthCnvAlg.h:89
xAOD::TruthEvent_v1
Class describing a signal truth event in the MC record.
Definition: TruthEvent_v1.h:35
xAODMaker::xAODTruthCnvAlg::m_aodContainerKey
SG::ReadHandleKey< McEventCollection > m_aodContainerKey
The key of the input AOD truth container.
Definition: xAODTruthCnvAlg.h:130
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::TruthPileupEvent
TruthPileupEvent_v1 TruthPileupEvent
Typedef to implementation.
Definition: TruthPileupEvent.h:15
xAOD::TruthEvent_v1::setCrossSectionError
void setCrossSectionError(float value)
Set the cross-section error.
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CondAttrListCollection::attributeList
const AttributeList & attributeList(ChanNum chanNum) const
attribute list for a given channel number
Definition: CondAttrListCollection.h:401
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::TruthVertex
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition: TruthVertex.h:15
xAOD::TruthEvent_v1::SPECTATORNEUTRONS
@ SPECTATORNEUTRONS
[int]
Definition: TruthEvent_v1.h:135
xAOD::TruthEvent_v1::XF1
@ XF1
[float]
Definition: TruthEvent_v1.h:85
xAODMaker::xAODTruthCnvAlg::MetadataFields::evgenProcess
std::string evgenProcess
Definition: xAODTruthCnvAlg.h:86
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
xAODMaker::xAODTruthCnvAlg::m_xaodTruthVertexContainerKey
SG::WriteHandleKey< xAOD::TruthVertexContainer > m_xaodTruthVertexContainerKey
Definition: xAODTruthCnvAlg.h:140
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
xAODMaker::xAODTruthCnvAlg::m_metaFields
MetadataFields m_metaFields
Definition: xAODTruthCnvAlg.h:167
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
xAODMaker::xAODTruthCnvAlg::m_evtInfo
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfo
Event Info.
Definition: xAODTruthCnvAlg.h:163
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
xAOD::TruthEvent_v1::EVENTPLANEANGLE
@ EVENTPLANEANGLE
[float]
Definition: TruthEvent_v1.h:141
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::TruthEvent_v1::PDGID1
@ PDGID1
[int]
Definition: TruthEvent_v1.h:75
xAODMaker::xAODTruthCnvAlg::MetadataFields::hardPDF
std::string hardPDF
Definition: xAODTruthCnvAlg.h:88
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
xAOD::crossSection
crossSection
Definition: TruthEvent_v1.cxx:33
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
weights
Definition: herwig7_interface.h:44
xAOD::TruthEvent_v1::SPECTATORPROTONS
@ SPECTATORPROTONS
[int]
Definition: TruthEvent_v1.h:136
xAOD::TruthVertex_v1::setId
void setId(int value)
Obsolete function Set vertex ID code HepMC2 id == HepMC3 status, i.e.
xAOD::TruthEvent_v1::NCOLL
@ NCOLL
[int]
Definition: TruthEvent_v1.h:134
xAODMaker::xAODTruthCnvAlg::m_truthLinkContainerKey
SG::WriteHandleKey< xAODTruthParticleLinkVector > m_truthLinkContainerKey
Definition: xAODTruthCnvAlg.h:142
xAODMaker::xAODTruthCnvAlg::VertexMap
std::map< HepMC::ConstGenVertexPtr, VertexParticles > VertexMap
Convenience handle for a map of vtx ptrs -> connected particles.
Definition: xAODTruthCnvAlg.h:123
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:322
xAODMaker::xAODTruthCnvAlg::m_writeMetaData
Gaudi::Property< bool > m_writeMetaData
option to disable writing of metadata (e.g. if running a filter on xAOD in generators)
Definition: xAODTruthCnvAlg.h:160
xAOD::TruthEvent_v1::X1
@ X1
[float]
Definition: TruthEvent_v1.h:79
xAOD::TruthVertex_v1::setZ
void setZ(float value)
Set the vertex's longitudinal distance from the origin.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
h
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
xAOD::TruthVertex_v1::setBarcode
void setBarcode(int value)
Set barcode.
xAOD::TruthEvent_v1::PDGID2
@ PDGID2
[int]
Definition: TruthEvent_v1.h:76
xAOD::TruthParticle_v1::polarizationTheta
@ polarizationTheta
Polarization in ( )
Definition: TruthParticle_v1.h:319
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::TruthParticle_v1::polarizationPhi
@ polarizationPhi
Polarization in ( )
Definition: TruthParticle_v1.h:318
xAODMaker::xAODTruthCnvAlg::m_metaStore
ServiceHandle< StoreGateSvc > m_metaStore
Connection to the metadata store.
Definition: xAODTruthCnvAlg.h:155
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
doL1CaloHVCorrections.parts
parts
Definition: doL1CaloHVCorrections.py:334
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAODMaker::xAODTruthCnvAlg::m_doAllPileUp
Gaudi::Property< bool > m_doAllPileUp
Pile-up options.
Definition: xAODTruthCnvAlg.h:146
CondAttrListCollection::AttributeList
coral::AttributeList AttributeList
Definition: CondAttrListCollection.h:56
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
HepMC::status
int status(const T &p)
Definition: MagicNumbers.h:125
isSeparatorGenEvent
bool isSeparatorGenEvent(const HepMC::GenEvent *genEvt)
Definition: xAODTruthCnvAlg.cxx:41
xAOD::TruthEvent_v1::Q
@ Q
[float]
Definition: TruthEvent_v1.h:82
xAOD::TruthEvent_v1::PDFID1
@ PDFID1
[int]
Definition: TruthEvent_v1.h:77
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::TruthEventBase_v1::addTruthVertexLink
void addTruthVertexLink(const TruthVertexLink_t &vlink)
Add one truth vertex.
Definition: TruthEventBase_v1.cxx:129
xAOD::TruthEvent_v1::NWOUNDEDNCOLLISIONS
@ NWOUNDEDNCOLLISIONS
[int]
Definition: TruthEvent_v1.h:138
fitman.k
k
Definition: fitman.py:528
xAOD::TruthEvent_v1::setBeamParticle1Link
void setBeamParticle1Link(const TruthParticleLink_t &pcl1)
Set one incoming beam particle.
xAOD::TruthVertex_v1::setX
void setX(float value)
Set the x displacement of the vertex.
ServiceHandle< StoreGateSvc >
xAOD::TruthEvent_v1::NCOLLHARD
@ NCOLLHARD
[int]
Definition: TruthEvent_v1.h:131
HepMC::signal_process_vertex
GenVertex * signal_process_vertex(const GenEvent *e)
Definition: GenEvent.h:625