#include <TruthPVCollectionMaker.h>
Definition at line 18 of file TruthPVCollectionMaker.h.
◆ TruthPVCollectionMaker()
DerivationFramework::TruthPVCollectionMaker::TruthPVCollectionMaker |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TruthPVCollectionMaker()
DerivationFramework::TruthPVCollectionMaker::~TruthPVCollectionMaker |
( |
| ) |
|
|
default |
◆ addBranches()
StatusCode DerivationFramework::TruthPVCollectionMaker::addBranches |
( |
| ) |
const |
|
virtual |
Definition at line 44 of file TruthPVCollectionMaker.cxx.
46 const EventContext& ctx{Gaudi::Hive::currentContext()};
49 if (!importedTruthEvents.isValid()) {
51 return StatusCode::FAILURE;
56 ATH_CHECK(writeHandleVtx.record(std::make_unique<xAOD::TruthVertexContainer>(),
57 std::make_unique<xAOD::TruthVertexAuxContainer>()));
62 for (
const auto *
event : *importedTruthEvents){
68 if (!old_vert &&
event->nTruthVertices()>0){
69 old_vert =
event->truthVertex(0);
75 newVertexCollection->
push_back( xTruthVertex );
79 xTruthVertex->
setX(old_vert->x());
80 xTruthVertex->
setY(old_vert->y());
81 xTruthVertex->
setZ(old_vert->z());
82 xTruthVertex->
setT(old_vert->t());
84 ATH_MSG_WARNING(
"No signal vertex or vertices associated to an input event!");
87 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::TruthPVCollectionMaker::initialize |
( |
| ) |
|
◆ m_eventsKey
◆ m_outVtxKey
The documentation for this class was generated from the following files: