MissingMomentum.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 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 _vet = Vector3(); 00018 } 00019 00020 00021 void MissingMomentum::project(const Event& e) { 00022 clear(); 00023 00024 // Project into final state 00025 const FinalState& vfs = applyProjection<FinalState>(e, "VisibleFS"); 00026 foreach (const Particle& p, vfs.particles()) { 00027 const FourMomentum& mom = p.momentum(); 00028 _momentum += mom; 00029 _set += mom.Et(); 00030 _vet += mom.Et() * mom.vector3().setZ(0.0).unit(); 00031 } 00032 } 00033 00034 00035 } Generated on Fri Dec 21 2012 15:03:41 for The Rivet MC analysis system by ![]() |