rivet is hosted by Hepforge, IPPP Durham
NeutralFinalState.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Projections/NeutralFinalState.hh"
00003 
00004 namespace Rivet {
00005 
00006 
00007   int NeutralFinalState::compare(const Projection& p) const {
00008     const NeutralFinalState& other = dynamic_cast<const NeutralFinalState&>(p);
00009     return mkNamedPCmp(other, "FS") || cmp(_Etmin, other._Etmin);
00010   }
00011 
00012 
00013   void NeutralFinalState::project(const Event& e) {
00014     const FinalState& fs = applyProjection<FinalState>(e, "FS");
00015     _theParticles.clear();
00016     foreach (const Particle& p, fs.particles()){
00017       if ((PID::threeCharge(p.pdgId()) == 0) && (p.Et() > _Etmin)) {
00018         _theParticles.push_back(p);
00019         MSG_TRACE("Selected: ID = " << p.pdgId()
00020                   << ", Et = " << p.Et()
00021                   << ", eta = " << p.eta()
00022                   << ", charge = " << p.charge());
00023       }
00024     }
00025     MSG_DEBUG("Number of neutral final-state particles = " << _theParticles.size());
00026   }
00027 
00028 
00029 }