|
ATLAS Offline Software
|
Algorithm creating xAOD truth from HepMC.
More...
#include <xAODTruthCnvAlg.h>
|
| 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 |
|
|
SG::ReadHandleKey< McEventCollection > | m_aodContainerKey |
| The key of the input AOD truth container. More...
|
|
SG::WriteHandleKey< xAOD::TruthEventContainer > | m_xaodTruthEventContainerKey |
| The key for the output xAOD truth containers. More...
|
|
SG::WriteHandleKey< xAOD::TruthPileupEventContainer > | m_xaodTruthPUEventContainerKey |
|
SG::WriteHandleKey< xAOD::TruthParticleContainer > | m_xaodTruthParticleContainerKey |
|
SG::WriteHandleKey< xAOD::TruthVertexContainer > | m_xaodTruthVertexContainerKey |
|
SG::WriteHandleKey< xAODTruthParticleLinkVector > | m_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< StoreGateSvc > | m_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::EventInfo > | m_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 |
|
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.
◆ StoreGateSvc_t
◆ VertexMap
Convenience handle for a map of vtx ptrs -> connected particles.
Definition at line 123 of file xAODTruthCnvAlg.h.
◆ xAODTruthCnvAlg()
xAODMaker::xAODTruthCnvAlg::xAODTruthCnvAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
◆ 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.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode xAODMaker::xAODTruthCnvAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Function executing the algorithm.
Definition at line 105 of file xAODTruthCnvAlg.cxx.
108 ATH_CHECK(truthLinkVec.record(std::make_unique<xAODTruthParticleLinkVector>()));
113 if (!mcColl.isValid()) {
115 return StatusCode::FAILURE;
125 ATH_CHECK(xTruthEventContainer.record(std::make_unique<xAOD::TruthEventContainer>(),
126 std::make_unique<xAOD::TruthEventAuxContainer>()));
133 ATH_CHECK(xTruthPileupEventContainer.
record(std::make_unique<xAOD::TruthPileupEventContainer>(),
134 std::make_unique<xAOD::TruthPileupEventAuxContainer>()));
140 ATH_CHECK(xTruthParticleContainer.record(std::make_unique<xAOD::TruthParticleContainer>(),
141 std::make_unique<xAOD::TruthParticleAuxContainer>()));
145 ATH_CHECK(xTruthVertexContainer.record(std::make_unique<xAOD::TruthVertexContainer>(),
146 std::make_unique<xAOD::TruthVertexAuxContainer>()));
180 ATH_MSG_DEBUG(
"Number of GenEvents in this Athena event = " << mcColl->size());
182 bool newAttributesPresent(
false);
184 for (
unsigned int cntr = 0; cntr < mcColl->size(); ++cntr) {
185 const HepMC::GenEvent* genEvt = (*mcColl)[cntr];
186 bool isSignalProcess(
false);
188 isSignalProcess=
true;
190 auto bunchCrossingTime = genEvt->attribute<HepMC3::IntAttribute>(
"BunchCrossingTime");
191 if (bunchCrossingTime) {
192 newAttributesPresent =
true;
205 isSignalProcess=
false;
207 auto bunchCrossingTime = genEvt->attribute<HepMC3::IntAttribute>(
"BunchCrossingTime");
208 if (bunchCrossingTime) {
222 if (newAttributesPresent) {
250 if (isSignalProcess) {
251 xTruthEventContainer->push_back( xTruthEvent );
266 if (evtInfo.isValid()) {
272 return StatusCode::FAILURE;
279 for (
const double&
w : genEvt->weights())
weights.push_back((
float)(
w));
285 auto const hiInfo = genEvt->heavy_ion();
323 auto const pdfInfo = genEvt->pdf_info();
350 xTruthPileupEventContainer->
push_back( xTruthPileupEvent );
359 vector<HepMC::ConstGenVertexPtr> vertices;
364 if (disconnectedSignalProcessVtx) {
365 if (disconnectedSignalProcessVtx->particles_in_size() == 0 && disconnectedSignalProcessVtx->particles_out_size() == 0 ) {
367 vertices.push_back (disconnectedSignalProcessVtx);
370 ATH_MSG_WARNING(
"Signal process vertex pointer not valid in HepMC Collection for GenEvent #" << cntr <<
" / " << mcColl->size());
374 pair<HepMC::ConstGenParticlePtr,HepMC::ConstGenParticlePtr> beamParticles;
375 bool genEvt_valid_beam_particles=
false;
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]; }
381 auto bcmapatt = genEvt->attribute<HepMC::GenEventBarcodes>(
"barcodes");
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) {
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) {
396 xTruthParticleContainer->push_back( xTruthParticle );
408 if (genEvt_valid_beam_particles) {
409 if (isSignalProcess) {
415 auto productionVertex =
part->production_vertex();
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);
430 auto decayVertex =
part->end_vertex();
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);
443 xTruthVertexContainer->reserve(vertices.size());
444 for (
const auto&
vertex : vertices) {
449 xTruthVertexContainer->push_back( xTruthVertex );
468 if (isSignalProcess)
delete xTruthPileupEvent;
469 if (!isSignalProcess)
delete xTruthEvent;
475 ATH_MSG_VERBOSE(
"Summarizing truth link size: " << truthLinkVec->size() );
477 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
86 return Algorithm::extraOutputDeps();
◆ fillParticle()
Definition at line 542 of file xAODTruthCnvAlg.cxx.
543 tp->setPdgId(gp->pdg_id());
548 if (pol.is_defined()) {
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());
◆ fillVertex()
These functions do not set up ELs, just the other variables.
Definition at line 530 of file xAODTruthCnvAlg.cxx.
534 tv->
setX(gv->position().x());
535 tv->
setY(gv->position().y());
536 tv->
setZ(gv->position().z());
537 tv->
setT(gv->position().t());
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ handle()
void xAODMaker::xAODTruthCnvAlg::handle |
( |
const Incident & |
incident | ) |
|
|
overridevirtual |
Incident handler.
Definition at line 480 of file xAODTruthCnvAlg.cxx.
484 if(inputStore.retrieve().isFailure()) {
489 if(inputStore->retrieve(tagInfo,
"/TagInfo").isFailure()) {
490 ATH_MSG_WARNING(
"Failed to retrieve /TagInfo metadata from the input store");
493 if(tagInfo->payloadContainer()->size()>0) {
495 if(tagInfoPayload->
size()>0) {
497 if (al.exists(
"lhefGenerator")){
501 if (al.exists(
"generators")){
505 if (al.exists(
"evgenProcess")){
509 if (al.exists(
"evgenTune")){
513 if (al.exists(
"hardPDF")){
517 if (al.exists(
"softPDF")){
◆ initialize()
StatusCode xAODMaker::xAODTruthCnvAlg::initialize |
( |
| ) |
|
|
overridevirtual |
Function initialising the algorithm.
Definition at line 65 of file xAODTruthCnvAlg.cxx.
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;
89 incSvc->addListener(
this,
"BeginRun", 10);
101 return StatusCode::SUCCESS;
◆ inputHandles()
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 |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, InDet::SiSPGNNTrackMaker, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ 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.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ 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.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ ATLAS_THREAD_SAFE
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
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
◆ m_doAllPileUp
Gaudi::Property<bool> xAODMaker::xAODTruthCnvAlg::m_doAllPileUp {this, "WriteAllPileUpTruth", false} |
|
private |
◆ m_doInTimePileUp
Gaudi::Property<bool> xAODMaker::xAODTruthCnvAlg::m_doInTimePileUp {this, "WriteInTimePileUpTruth", false} |
|
private |
◆ m_evtInfo
◆ m_evtStore
◆ 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 |
◆ m_metaFields
◆ m_metaName
std::string xAODMaker::xAODTruthCnvAlg::m_metaName |
|
private |
◆ m_metaStore
◆ m_truthLinkContainerKey
Initial value:{
this, "TruthLinks", "xAODTruthLinks", "Output xAODTruthLinks container"}
Definition at line 142 of file xAODTruthCnvAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ 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
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
Initial value:{
this, "xAODTruthParticleContainerName", "TruthParticles", "Output TruthParticles container"}
Definition at line 138 of file xAODTruthCnvAlg.h.
◆ m_xaodTruthPUEventContainerKey
Initial value:{
this, "xAODTruthPileupEventContainerName", "TruthPileupEvents", "Output TruthPileupEvents container"}
Definition at line 136 of file xAODTruthCnvAlg.h.
◆ m_xaodTruthVertexContainerKey
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:
JetConstituentVector::iterator iterator
int old_vertex_status_from_new(const int newStatus)
Get vertex status in the old scheme from the status in the new scheme.
void setCrossSection(float value)
Set the cross-section.
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_xaodTruthParticleContainerKey
void setSignalProcessVertexLink(const TruthVertexLink_t &link)
Set pointer to a vertex representing the primary beam interaction point.
Polarization polarization(const T &a)
void setWeights(const std::vector< float > &weights)
Set the event weights.
SG::WriteHandleKey< xAOD::TruthEventContainer > m_xaodTruthEventContainerKey
The key for the output xAOD truth containers.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
TruthEvent_v1 TruthEvent
Typedef to implementation.
void setBeamParticle2Link(const TruthParticleLink_t &pcl2)
Set one incoming beam particle.
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
bool setHeavyIonParameter(int value, HIParam parameter)
Set an integer HI parameter.
std::vector< SG::VarHandleKeyArray * > m_vhka
void setT(float value)
Set the vertex time.
Class describing a pile-up truth event in the MC record.
void setIncomingParticleLinks(const TPLinks_t &links)
Set all the incoming particles.
@ NWOUNDEDNWOUNDEDCOLLISIONS
[int]
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::string m_metaName
SG key and name for meta data.
void setY(float value)
Set the y displacement of the vertex.
This class is a collection of AttributeLists where each one is associated with a channel number....
void setOutgoingParticleLinks(const TPLinks_t &links)
Set all the outgoing particles.
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.
static void fillParticle(xAOD::TruthParticle *tp, const HepMC::ConstGenParticlePtr &gp)
virtual void setOwner(IDataHandleHolder *o)=0
void addTruthParticleLink(const TruthParticleLink_t &plink)
Add one truth particle.
Gaudi::Property< bool > m_doInTimePileUp
a link optimized in size for a GenParticle in a McEventCollection
AthReentrantAlgorithm()
Default constructor:
static void fillVertex(xAOD::TruthVertex *tv, const HepMC::ConstGenVertexPtr &gv)
These functions do not set up ELs, just the other variables.
@ NNWOUNDEDCOLLISIONS
[int]
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
int old_particle_status_from_new(const int newStatus)
Get particle status in the old scheme from the status in the new scheme.
bool m_firstBeginRun
Tag Info.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
SG::WriteHandleKey< xAOD::TruthPileupEventContainer > m_xaodTruthPUEventContainerKey
bool setPdfInfoParameter(int value, PdfParam parameter)
Set an integer PDF info parameter.
TruthParticle_v1 TruthParticle
Typedef to implementation.
Class describing a signal truth event in the MC record.
SG::ReadHandleKey< McEventCollection > m_aodContainerKey
The key of the input AOD truth container.
TruthPileupEvent_v1 TruthPileupEvent
Typedef to implementation.
void setCrossSectionError(float value)
Set the cross-section error.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
const AttributeList & attributeList(ChanNum chanNum) const
attribute list for a given channel number
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
TruthVertex_v1 TruthVertex
Typedef to implementation.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
SG::WriteHandleKey< xAOD::TruthVertexContainer > m_xaodTruthVertexContainerKey
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
MetadataFields m_metaFields
Class describing a truth vertex in the MC record.
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfo
Event Info.
virtual StatusCode sysInitialize() override
Override sysInitialize.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
void setId(int value)
Obsolete function Set vertex ID code HepMC2 id == HepMC3 status, i.e.
SG::WriteHandleKey< xAODTruthParticleLinkVector > m_truthLinkContainerKey
std::map< HepMC::ConstGenVertexPtr, VertexParticles > VertexMap
Convenience handle for a map of vtx ptrs -> connected particles.
size_type size() const
number of Chan/AttributeList pairs
Gaudi::Property< bool > m_writeMetaData
option to disable writing of metadata (e.g. if running a filter on xAOD in generators)
void setZ(float value)
Set the vertex's longitudinal distance from the origin.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
void setBarcode(int value)
Set barcode.
@ polarizationTheta
Polarization in ( )
#define ATH_MSG_WARNING(x)
@ polarizationPhi
Polarization in ( )
std::pair< HepMcParticleLink, ElementLink< xAOD::TruthParticleContainer > > xAODTruthParticleLink
ServiceHandle< StoreGateSvc > m_metaStore
Connection to the metadata store.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Property< bool > m_doAllPileUp
Pile-up options.
coral::AttributeList AttributeList
bool isSeparatorGenEvent(const HepMC::GenEvent *genEvt)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void addTruthVertexLink(const TruthVertexLink_t &vlink)
Add one truth vertex.
@ NWOUNDEDNCOLLISIONS
[int]
void setBeamParticle1Link(const TruthParticleLink_t &pcl1)
Set one incoming beam particle.
void setX(float value)
Set the x displacement of the vertex.
GenVertex * signal_process_vertex(const GenEvent *e)