Skip to content
Snippets Groups Projects
Commit 68f9cab2 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

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

parent 1caac100
Branches
Tags v0.1.0
1 merge request!258Accept particles with p.genStatus() == 0 in MC2DummyParticle and TrackParamTruthInit
...@@ -118,7 +118,8 @@ private: ...@@ -118,7 +118,8 @@ private:
std::vector<RecData> zdc(const dd4pod::Geant4ParticleCollection& mc) { std::vector<RecData> zdc(const dd4pod::Geant4ParticleCollection& mc) {
std::vector<RecData> rc; std::vector<RecData> rc;
for (const auto& part : mc) { for (const auto& part : mc) {
if (part.genStatus() != 1) { if (part.genStatus() > 1) {
debug() << "ignoring particle with genStatus = " << p.genStatus() << endmsg;
continue; continue;
} }
// only detect neutrons and photons // only detect neutrons and photons
......
...@@ -73,7 +73,8 @@ public: ...@@ -73,7 +73,8 @@ public:
double best_delta = std::numeric_limits<double>::max(); double best_delta = std::numeric_limits<double>::max();
for (size_t ip = 0; ip < mc.size(); ++ip) { for (size_t ip = 0; ip < mc.size(); ++ip) {
const auto& mcpart = mc[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; continue;
} }
const double dp_rel = std::abs((mom.mag() - mcpart.ps().mag()) / mcpart.ps().mag()); const double dp_rel = std::abs((mom.mag() - mcpart.ps().mag()) / mcpart.ps().mag());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment