HadronicFinalState.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/HadronicFinalState.hh" 00005 #include "Rivet/Cmp.hh" 00006 #include <algorithm> 00007 00008 namespace Rivet { 00009 00010 00011 int HadronicFinalState::compare(const Projection& p) const { 00012 return FinalState::compare(p); 00013 } 00014 00015 00016 bool hadronFilter(const Particle& p) { 00017 return ! PID::isHadron(p.pdgId()); 00018 } 00019 00020 00021 void HadronicFinalState::project(const Event& e) { 00022 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00023 _theParticles.clear(); 00024 std::remove_copy_if(fs.particles().begin(), fs.particles().end(), 00025 std::back_inserter(_theParticles), hadronFilter); 00026 MSG_DEBUG("Number of hadronic final-state particles = " 00027 << _theParticles.size()); 00028 } 00029 00030 } Generated on Fri Dec 21 2012 15:03:40 for The Rivet MC analysis system by ![]() |