NeutralFinalState.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Rivet.hh" 00003 #include "Rivet/Projections/NeutralFinalState.hh" 00004 #include "Rivet/Tools/ParticleIdUtils.hh" 00005 #include "Rivet/Cmp.hh" 00006 #include <algorithm> 00007 00008 namespace Rivet { 00009 00010 00011 int NeutralFinalState::compare(const Projection& p) const { 00012 const NeutralFinalState& other = dynamic_cast<const NeutralFinalState&>(p); 00013 return mkNamedPCmp(other, "FS") || cmp(_Etmin, other._Etmin); 00014 } 00015 00016 00017 void NeutralFinalState::project(const Event& e) { 00018 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00019 _theParticles.clear(); 00020 foreach (const Particle& p, fs.particles()){ 00021 if ((PID::threeCharge(p.pdgId()) == 0) && (p.momentum().Et() > _Etmin)) { 00022 _theParticles.push_back(p); 00023 MSG_TRACE("Selected: ID = " << p.pdgId() 00024 << ", Et = " << p.momentum().Et() 00025 << ", eta = " << p.momentum().eta() 00026 << ", charge = " << PID::threeCharge(p.pdgId())/3.0); 00027 } 00028 } 00029 MSG_DEBUG("Number of neutral final-state particles = " << _theParticles.size()); 00030 } 00031 00032 00033 } Generated on Fri Dec 21 2012 15:03:41 for The Rivet MC analysis system by ![]() |