00001 // -*- C++ -*- 00002 00003 #include "Rivet/Projections/FinalStateHCM.hh" 00004 #include "Rivet/Cmp.hh" 00005 00006 00007 namespace Rivet { 00008 00009 int FinalStateHCM::compare(const Projection& p) const { 00010 const FinalStateHCM& other = dynamic_cast<const FinalStateHCM&>(p); 00011 return \ 00012 pcmp(*_lepton, *other._lepton) || 00013 pcmp(*_kinematics, *other._kinematics) || 00014 pcmp(*_fsproj, *other._fsproj); 00015 } 00016 00017 00018 void FinalStateHCM::project(const Event& e) { 00019 const DISLepton& dislep = e.applyProjection(*_lepton); 00020 const DISKinematics& diskin = e.applyProjection(*_kinematics); 00021 const FinalState& fs = e.applyProjection(*_fsproj); 00022 _theParticles.clear(); 00023 _theParticles.reserve(fs.particles().size()); 00024 for (int i=0, N=fs.particles().size(); i < N; ++i) { 00025 if ( &(fs.particles()[i].getHepMCParticle()) != 00026 &(dislep.out().getHepMCParticle()) ) { 00027 _theParticles.push_back(fs.particles()[i]); 00028 _theParticles[i].getMomentum() *= diskin.boostHCM(); 00029 } 00030 } 00031 } 00032 00033 }