NonHadronicFinalState.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Rivet.hh" 00003 #include "Rivet/Tools/ParticleIdUtils.hh" 00004 #include "Rivet/Projections/NonHadronicFinalState.hh" 00005 #include "Rivet/Cmp.hh" 00006 #include <algorithm> 00007 00008 namespace Rivet { 00009 00010 00011 int NonHadronicFinalState::compare(const Projection& p) const { 00012 return FinalState::compare(p); 00013 } 00014 00015 00016 bool nonHadronFilter(const Particle& p) { 00017 return PID::isHadron(p.pdgId()); 00018 } 00019 00020 void NonHadronicFinalState::project(const Event& e) { 00021 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00022 _theParticles.clear(); 00023 std::remove_copy_if(fs.particles().begin(), fs.particles().end(), 00024 std::back_inserter(_theParticles), nonHadronFilter); 00025 MSG_DEBUG("Number of non-hadronic final-state particles = " 00026 << _theParticles.size()); 00027 } 00028 00029 } Generated on Fri Dec 21 2012 15:03:41 for The Rivet MC analysis system by ![]() |