00001 // -*- C++ -*- 00002 #include "Rivet/Rivet.hh" 00003 #include "Rivet/Projections/VisibleFinalState.hh" 00004 #include "Rivet/Cmp.hh" 00005 #include "Rivet/Tools/Utils.hh" 00006 #include <algorithm> 00007 00008 namespace Rivet { 00009 00010 00011 namespace { 00012 void _setup_vfs(VetoedFinalState& vfs) { 00013 vfs.vetoNeutrinos(); 00014 vfs.addVetoId(1000022); // lightest neutralino 00015 vfs.addVetoId(1000039); // gravitino 00016 /// @todo More? 00017 } 00018 } 00019 00020 00021 VisibleFinalState::VisibleFinalState() { 00022 setName("VisibleFinalState"); 00023 VetoedFinalState vfs; 00024 _setup_vfs(vfs); 00025 addProjection(vfs, "VetoedFS"); 00026 } 00027 00028 00029 VisibleFinalState::VisibleFinalState(double mineta, double maxeta, double minpt) { 00030 setName("VisibleFinalState"); 00031 VetoedFinalState vfs(FinalState(mineta, maxeta, minpt)); 00032 _setup_vfs(vfs); 00033 addProjection(vfs, "VetoedFS"); 00034 } 00035 00036 00037 VisibleFinalState::VisibleFinalState(const FinalState& fsp) { 00038 setName("VisibleFinalState"); 00039 VetoedFinalState vfs(fsp); 00040 _setup_vfs(vfs); 00041 addProjection(vfs, "VetoedFS"); 00042 } 00043 00044 00045 int VisibleFinalState::compare(const Projection& p) const { 00046 return mkNamedPCmp(p, "VetoedFS"); 00047 } 00048 00049 00050 void VisibleFinalState::project(const Event& e) { 00051 const FinalState& vfs = applyProjection<FinalState>(e, "VetoedFS"); 00052 _theParticles = vfs.particles(); 00053 } 00054 00055 00056 }