|
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 |
|
SG::WriteHandleKey< xAOD::TruthParticleContainer > | m_lheTruthParticleContainerKey |
|
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 111 of file xAODTruthCnvAlg.cxx.
114 ATH_CHECK(truthLinkVec.record(std::make_unique<xAODTruthParticleLinkVector>()));
119 if (!mcColl.isValid()) {
121 return StatusCode::FAILURE;
131 ATH_CHECK(xTruthEventContainer.record(std::make_unique<xAOD::TruthEventContainer>(),
132 std::make_unique<xAOD::TruthEventAuxContainer>()));
139 ATH_CHECK(xTruthPileupEventContainer.
record(std::make_unique<xAOD::TruthPileupEventContainer>(),
140 std::make_unique<xAOD::TruthPileupEventAuxContainer>()));
146 ATH_CHECK(xTruthParticleContainer.record(std::make_unique<xAOD::TruthParticleContainer>(),
147 std::make_unique<xAOD::TruthParticleAuxContainer>()));
151 ATH_CHECK(xTruthVertexContainer.record(std::make_unique<xAOD::TruthVertexContainer>(),
152 std::make_unique<xAOD::TruthVertexAuxContainer>()));
157 bool hadLHERecord =
false;
191 ATH_MSG_DEBUG(
"Number of GenEvents in this Athena event = " << mcColl->size());
193 bool newAttributesPresent(
false);
195 for (
unsigned int cntr = 0; cntr < mcColl->size(); ++cntr) {
196 const HepMC::GenEvent* genEvt = (*mcColl)[cntr];
197 bool isSignalProcess(
false);
199 isSignalProcess=
true;
201 auto bunchCrossingTime = genEvt->attribute<HepMC3::IntAttribute>(
"BunchCrossingTime");
202 if (bunchCrossingTime) {
203 newAttributesPresent =
true;
216 isSignalProcess=
false;
218 auto bunchCrossingTime = genEvt->attribute<HepMC3::IntAttribute>(
"BunchCrossingTime");
219 if (bunchCrossingTime) {
233 if (newAttributesPresent) {
261 if (isSignalProcess) {
262 xTruthEventContainer->push_back( xTruthEvent );
277 if (evtInfo.isValid()) {
283 return StatusCode::FAILURE;
290 for (
const double&
w : genEvt->weights())
weights.push_back((
float)(
w));
296 auto const hiInfo = genEvt->heavy_ion();
334 auto const pdfInfo = genEvt->pdf_info();
363 auto lhe_record_attribute = genEvt->attribute<HepMC::ShortEventAttribute>(
"LHERecord");
369 ATH_CHECK(xTruthLHEParticleContainer.record(std::make_unique<xAOD::TruthParticleContainer>(),
370 std::make_unique<xAOD::TruthParticleAuxContainer>()));
373 for (
int nPart=0;nPart<lhe_record_attribute->NUP;++nPart) {
377 xTruthLHEParticleContainer->push_back( xTruthParticle );
379 xTruthParticle->
setPdgId( lhe_record_attribute->IDUP[nPart] );
381 xTruthParticle->
setStatus( lhe_record_attribute->ISTUP[nPart] );
382 xTruthParticle->
setPx( lhe_record_attribute->PUP[nPart][0] );
383 xTruthParticle->
setPy( lhe_record_attribute->PUP[nPart][1] );
384 xTruthParticle->
setPz( lhe_record_attribute->PUP[nPart][2] );
385 xTruthParticle->
setE( lhe_record_attribute->PUP[nPart][3] );
386 xTruthParticle->
setM( lhe_record_attribute->PUP[nPart][4] );
389 else if (hadLHERecord){
390 ATH_MSG_WARNING(
"Truth record appeared to have two LHE records; this should not be possible");
394 ATH_MSG_WARNING(
"HEPMC2 does not support LHE truth record storage. Skipping.");
398 xTruthPileupEventContainer->
push_back( xTruthPileupEvent );
407 vector<HepMC::ConstGenVertexPtr> vertices;
412 if (disconnectedSignalProcessVtx) {
413 if (disconnectedSignalProcessVtx->particles_in_size() == 0 && disconnectedSignalProcessVtx->particles_out_size() == 0 ) {
415 vertices.push_back (disconnectedSignalProcessVtx);
418 ATH_MSG_WARNING(
"Signal process vertex pointer not valid in HepMC Collection for GenEvent #" << cntr <<
" / " << mcColl->size());
422 pair<HepMC::ConstGenParticlePtr,HepMC::ConstGenParticlePtr> beamParticles;
423 bool genEvt_valid_beam_particles=
false;
425 auto beamParticles_vec = genEvt->beams();
426 genEvt_valid_beam_particles=(beamParticles_vec.size()>1);
427 if (genEvt_valid_beam_particles){beamParticles.first=beamParticles_vec[0]; beamParticles.second=beamParticles_vec[1]; }
429 auto bcmapatt = genEvt->attribute<HepMC::GenEventBarcodes>(
"barcodes");
430 if (!bcmapatt)
ATH_MSG_ERROR(
"TruthParticleCnvTool.cxx: Event does not contain barcodes attribute");
431 std::map<int, HepMC3::ConstGenParticlePtr> bcmap = bcmapatt->barcode_to_particle_map();
432 xTruthParticleContainer->reserve(bcmap.size());
433 for (
const auto &[genPartBarcode,
part]: bcmap) {
435 genEvt_valid_beam_particles=genEvt->valid_beam_particles();
436 if ( genEvt_valid_beam_particles ) beamParticles = genEvt->beam_particles();
437 xTruthParticleContainer->reserve(genEvt->particles_size());
438 for (
auto part: *genEvt) {
444 xTruthParticleContainer->push_back( xTruthParticle );
456 if (genEvt_valid_beam_particles) {
457 if (isSignalProcess) {
463 auto productionVertex =
part->production_vertex();
467 if (productionVertex && productionVertex->parent_event() !=
nullptr) {
468 VertexParticles&
parts = vertexMap[productionVertex];
469 if (
parts.incoming.empty() &&
parts.outgoing.empty())
470 vertices.push_back (productionVertex);
471 parts.outgoingEL.push_back(eltp);
472 parts.outgoing.push_back(xTruthParticle);
478 auto decayVertex =
part->end_vertex();
480 VertexParticles&
parts = vertexMap[decayVertex];
481 if (
parts.incoming.empty() &&
parts.outgoing.empty())
482 vertices.push_back (decayVertex);
483 parts.incomingEL.push_back(eltp);
484 parts.incoming.push_back(xTruthParticle);
491 xTruthVertexContainer->reserve(vertices.size());
492 for (
const auto&
vertex : vertices) {
497 xTruthVertexContainer->push_back( xTruthVertex );
516 if (isSignalProcess)
delete xTruthPileupEvent;
517 if (!isSignalProcess)
delete xTruthEvent;
523 ATH_MSG_VERBOSE(
"Summarizing truth link size: " << truthLinkVec->size() );
525 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 590 of file xAODTruthCnvAlg.cxx.
591 tp->setPdgId(gp->pdg_id());
596 if (pol.is_defined()) {
601 tp->setM(gp->generated_mass());
602 tp->setPx(gp->momentum().px());
603 tp->setPy(gp->momentum().py());
604 tp->setPz(gp->momentum().pz());
605 tp->setE(gp->momentum().e());
◆ fillVertex()
These functions do not set up ELs, just the other variables.
Definition at line 578 of file xAODTruthCnvAlg.cxx.
582 tv->
setX(gv->position().x());
583 tv->
setY(gv->position().y());
584 tv->
setZ(gv->position().z());
585 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 528 of file xAODTruthCnvAlg.cxx.
532 if(inputStore.retrieve().isFailure()) {
537 if(inputStore->retrieve(tagInfo,
"/TagInfo").isFailure()) {
538 ATH_MSG_WARNING(
"Failed to retrieve /TagInfo metadata from the input store");
541 if(tagInfo->payloadContainer()->size()>0) {
543 if(tagInfoPayload->
size()>0) {
545 if (al.exists(
"lhefGenerator")){
549 if (al.exists(
"generators")){
553 if (al.exists(
"evgenProcess")){
557 if (al.exists(
"evgenTune")){
561 if (al.exists(
"hardPDF")){
565 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;
92 incSvc->addListener(
this,
"BeginRun", 10);
107 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, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, 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 154 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_lheTruthParticleContainerKey
Initial value:{
this, "xAODTruthLHEParticleContainerName", "", "Output TruthLHEParticles container"}
Definition at line 144 of file xAODTruthCnvAlg.h.
◆ 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 162 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
void setStatus(int value)
Set status code.
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)
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_lheTruthParticleContainerKey
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.
void setE(float value)
Set the energy of the particle.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void setBarcode(int value)
Set barcode.
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 setPx(float value)
Set the x component of the particle's momentum.
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
void setM(float value)
Also store the mass.
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.
void setPy(float value)
Set the y component of the particle's momentum.
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.
void setPdgId(int pid)
Set PDG ID code.
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
void setPz(float value)
Set the z component of the particle's momentum.
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)