rivet is hosted by Hepforge, IPPP Durham
NonHadronicFinalState.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Projections/NonHadronicFinalState.hh"
00003 
00004 namespace Rivet {
00005 
00006 
00007   int NonHadronicFinalState::compare(const Projection& p) const {
00008     return FinalState::compare(p);
00009   }
00010 
00011 
00012   bool nonHadronFilter(const Particle& p) {
00013     return PID::isHadron(p.pdgId());
00014   }
00015 
00016   void NonHadronicFinalState::project(const Event& e) {
00017     const FinalState& fs = applyProjection<FinalState>(e, "FS");
00018     _theParticles.clear();
00019     std::remove_copy_if(fs.particles().begin(), fs.particles().end(),
00020                         std::back_inserter(_theParticles), nonHadronFilter);
00021     MSG_DEBUG("Number of non-hadronic final-state particles = "
00022              << _theParticles.size());
00023   }
00024 
00025 }