00001
00002 #include "Rivet/Tools/Logging.hh"
00003 #include "Rivet/Projections/MissingMomentum.hh"
00004 #include "Rivet/Cmp.hh"
00005
00006 namespace Rivet {
00007
00008
00009 int MissingMomentum::compare(const Projection& p) const {
00010 return mkNamedPCmp(p, "VisibleFS");
00011 }
00012
00013
00014 void MissingMomentum::clear() {
00015 _momentum = FourMomentum();
00016 _set = 0.0;
00017 }
00018
00019
00020 void MissingMomentum::project(const Event& e) {
00021 clear();
00022
00023
00024 const FinalState& vfs = applyProjection<FinalState>(e, "VisibleFS");
00025 foreach (const Particle& p, vfs.particles()) {
00026 const FourMomentum& mom = p.momentum();
00027 _momentum += mom;
00028 _set += mom.Et();
00029 }
00030 }
00031
00032
00033 }