VisibleFinalState.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Projections/VisibleFinalState.hh" 00003 00004 namespace Rivet { 00005 00006 00007 int VisibleFinalState::compare(const Projection& p) const { 00008 return mkNamedPCmp(p, "FS"); 00009 } 00010 00011 00012 // Since we remove invisibles from the FinalState in project(), 00013 // we need a filter where invisible --> true 00014 namespace { 00015 bool isInvisible(const Particle& p) { return !p.isVisible(); } 00016 } 00017 00018 00019 void VisibleFinalState::project(const Event& e) { 00020 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00021 _theParticles.clear(); 00022 std::remove_copy_if(fs.particles().begin(), fs.particles().end(), 00023 std::back_inserter(_theParticles), isInvisible); 00024 MSG_DEBUG("Number of visible final-state particles = " << _theParticles.size()); 00025 } 00026 00027 00028 } Generated on Wed Oct 7 2015 12:09:15 for The Rivet MC analysis system by ![]() |