MissingMomentum.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Projections/MissingMomentum.hh" 00003 00004 namespace Rivet { 00005 00006 00007 int MissingMomentum::compare(const Projection& p) const { 00008 return mkNamedPCmp(p, "VisibleFS"); 00009 } 00010 00011 00012 void MissingMomentum::clear() { 00013 _momentum = FourMomentum(); 00014 _set = 0.0; 00015 _vet = Vector3(); 00016 } 00017 00018 00019 void MissingMomentum::project(const Event& e) { 00020 clear(); 00021 00022 // Project into final state 00023 const FinalState& vfs = applyProjection<FinalState>(e, "VisibleFS"); 00024 foreach (const Particle& p, vfs.particles()) { 00025 const FourMomentum& mom = p.momentum(); 00026 _momentum += mom; 00027 _set += mom.Et(); 00028 _vet += mom.Et() * mom.vector3().setZ(0.0).unit(); 00029 } 00030 } 00031 00032 00033 const FourMomentum MissingMomentum::visibleMomentum(double mass) const { 00034 /// @todo Couldn't we just reset the internal _momentum's mass and return by value? Would require mutable, though 00035 FourMomentum p4 = _momentum; 00036 const double pmod2 = p4.p3().mod2(); 00037 const double new_energy = sqrt(pmod2 + sqr(mass)); 00038 p4.setE(new_energy); 00039 return p4; 00040 } 00041 00042 00043 } Generated on Thu Mar 10 2016 08:29:51 for The Rivet MC analysis system by ![]() |