Commit 68f9cab2 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Ignore particles with p.genStatus() > 1 in ParticlesWithTruthPID and DummyFarForwardParticles

parent 1caac100
......@@ -118,7 +118,8 @@ private:
std::vector<RecData> zdc(const dd4pod::Geant4ParticleCollection& mc) {
std::vector<RecData> rc;
for (const auto& part : mc) {
if (part.genStatus() != 1) {
if (part.genStatus() > 1) {
debug() << "ignoring particle with genStatus = " << p.genStatus() << endmsg;
continue;
}
// only detect neutrons and photons
......
......@@ -73,7 +73,8 @@ public:
double best_delta = std::numeric_limits<double>::max();
for (size_t ip = 0; ip < mc.size(); ++ip) {
const auto& mcpart = mc[ip];
if (consumed[ip] || mcpart.genStatus() != 1 || mcpart.charge() == 0 || mcpart.charge() * charge_rec < 0) {
if (consumed[ip] || mcpart.genStatus() > 1 || mcpart.charge() == 0 || mcpart.charge() * charge_rec < 0) {
debug() << "ignoring non-primary/neutral/opposite charge particle" << endmsg;
continue;
}
const double dp_rel = std::abs((mom.mag() - mcpart.ps().mag()) / mcpart.ps().mag());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment