Skip to content
Snippets Groups Projects
Commit af0a95b5 authored by Savannah Rose Shively's avatar Savannah Rose Shively
Browse files

add st pos to truth vectors

parent 23640b10
No related branches found
No related tags found
No related merge requests found
Pipeline #5160449 passed
...@@ -627,7 +627,7 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const ...@@ -627,7 +627,7 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
} }
} }
if ( particle->pdgId() == 11) // daughter particle (positron) if ( particle->pdgId() == 11) // daughter particle (electron)
{ {
m_truthd0_P.push_back(particle->p4().P()); m_truthd0_P.push_back(particle->p4().P());
m_truthd0_px.push_back(particle->p4().X()); m_truthd0_px.push_back(particle->p4().X());
...@@ -638,13 +638,21 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const ...@@ -638,13 +638,21 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
m_truthd0_x.push_back(particle->prodVtx()->x()); m_truthd0_x.push_back(particle->prodVtx()->x());
m_truthd0_y.push_back(particle->prodVtx()->y()); m_truthd0_y.push_back(particle->prodVtx()->y());
m_truthd0_z.push_back(particle->prodVtx()->z()); m_truthd0_z.push_back(particle->prodVtx()->z());
auto positions = m_fiducialParticleTool->getTruthPositions(particle->barcode());
for (int station = 1; station < 4; ++station) {
m_truthd0_x.push_back(positions[station].x());
m_truthd0_y.push_back(positions[station].y());
m_truthd0_z.push_back(positions[station].z());
}
} else { } else {
m_truthd0_x.push_back(NaN); m_truthd0_x.push_back(NaN);
m_truthd0_y.push_back(NaN); m_truthd0_y.push_back(NaN);
m_truthd0_z.push_back(NaN); m_truthd0_z.push_back(NaN);
} }
} }
if ( particle->pdgId() == -11) // daughter particle (electron) if ( particle->pdgId() == -11) // daughter particle (positron)
{ {
m_truthd1_P.push_back(particle->p4().P()); m_truthd1_P.push_back(particle->p4().P());
m_truthd1_px.push_back(particle->p4().X()); m_truthd1_px.push_back(particle->p4().X());
...@@ -655,6 +663,14 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const ...@@ -655,6 +663,14 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
m_truthd1_x.push_back(particle->prodVtx()->x()); m_truthd1_x.push_back(particle->prodVtx()->x());
m_truthd1_y.push_back(particle->prodVtx()->y()); m_truthd1_y.push_back(particle->prodVtx()->y());
m_truthd1_z.push_back(particle->prodVtx()->z()); m_truthd1_z.push_back(particle->prodVtx()->z());
auto positions = m_fiducialParticleTool->getTruthPositions(particle->barcode());
for (int station = 1; station < 4; ++station) {
m_truthd1_x.push_back(positions[station].x());
m_truthd1_y.push_back(positions[station].y());
m_truthd1_z.push_back(positions[station].z());
}
} else { } else {
m_truthd1_x.push_back(NaN); m_truthd1_x.push_back(NaN);
m_truthd1_y.push_back(NaN); m_truthd1_y.push_back(NaN);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment