Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7878602
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
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
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 19, 6:26 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3796928
Default Alt Text
(1 KB)
Attached To
rRIVETHG rivethg
Event Timeline
Log In to Comment