23 #include <TMathBase.h>
34 throw std::invalid_argument(
"Missing input filename");
37 throw std::invalid_argument(
"Missing tree name");
89 return {0
u, m_events};
94 delete m_particleType;
109 delete m_vertexPrimary;
110 delete m_vertexSecondary;
113 delete m_subParticle;
118 ACTS_DEBUG(
"Trying to read recorded particles.");
121 if (m_inputChain !=
nullptr && context.
eventNumber < m_events) {
123 std::lock_guard<std::mutex> lock(m_read_mutex);
130 std::vector<uint32_t> priVtxCollection;
132 std::vector<uint32_t> secVtxCollection;
136 if (not
m_cfg.orderedEvents and
entry < m_entryNumbers.size()) {
139 m_inputChain->GetEntry(
entry);
141 <<
" stored as entry: " <<
entry);
143 unsigned int nParticles = m_particleId->size();
145 for (
unsigned int i = 0;
i < nParticles;
i++) {
148 p.
setProcess(static_cast<ActsFatras::ProcessType>((*m_process)[
i]));
149 p.
setPdg(static_cast<Acts::PdgParticle>((*m_particleType)[i]));
154 (*m_vy)[i] * Acts::UnitConstants::mm,
155 (*m_vz)[i] * Acts::UnitConstants::mm,
161 particleContainer.insert(particleContainer.end(),
p);
162 priVtxCollection.push_back((*m_vertexPrimary)[i]);
163 secVtxCollection.push_back((*m_vertexSecondary)[i]);
167 m_outputParticles(context,
std::move(particleContainer));
169 if (not
m_cfg.vertexPrimaryCollection.empty()) {
170 m_outputPrimaryVertices(context,
std::move(priVtxCollection));
173 if (not
m_cfg.vertexSecondaryCollection.empty()) {
174 m_outputSecondaryVertices(context,
std::move(secVtxCollection));