Page MenuHomeHEPForge

No OneTemporary

diff --git a/src/Projections/VisibleFinalState.cc b/src/Projections/VisibleFinalState.cc
--- a/src/Projections/VisibleFinalState.cc
+++ b/src/Projections/VisibleFinalState.cc
@@ -1,46 +1,28 @@
// -*- C++ -*-
#include "Rivet/Projections/VisibleFinalState.hh"
namespace Rivet {
int VisibleFinalState::compare(const Projection& p) const {
return mkNamedPCmp(p, "FS");
}
// Since we remove invisibles from the FinalState in project(),
// we need a filter where invisible --> true
- bool isInvisibleFilter(const Particle& p) {
- // Charged particles are visible
- if ( PID::threeCharge( p.pid() ) != 0 )
- return false;
-
- // Neutral hadrons are visible
- if ( PID::isHadron( p.pid() ) )
- return false;
-
- // Photons are visible
- if ( p.pid() == PID::PHOTON )
- return false;
-
- // Gluons are visible (for parton level analyses)
- if ( p.pid() == PID::GLUON )
- return false;
-
- // Everything else is invisible
- return true;
+ namespace {
+ bool isInvisible(const Particle& p) { return !p.isVisible(); }
}
void VisibleFinalState::project(const Event& e) {
const FinalState& fs = applyProjection<FinalState>(e, "FS");
_theParticles.clear();
std::remove_copy_if(fs.particles().begin(), fs.particles().end(),
- std::back_inserter(_theParticles), isInvisibleFilter);
- MSG_DEBUG("Number of visible final-state particles = "
- << _theParticles.size());
+ std::back_inserter(_theParticles), isInvisible);
+ MSG_DEBUG("Number of visible final-state particles = " << _theParticles.size());
}
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 6:26 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3796928
Default Alt Text
(1 KB)

Event Timeline