Rivet
1.8.0
|
00001 // -*- C++ -*- 00002 #ifndef RIVET_PVertex_HH 00003 #define RIVET_PVertex_HH 00004 00005 #include "Rivet/Projection.hh" 00006 #include "Rivet/Event.hh" 00007 #include "Rivet/Particle.hh" 00008 00009 namespace Rivet { 00010 00011 00023 class PVertex : public Projection { 00024 public: 00025 00027 00028 00030 PVertex() 00031 : _thePVertex(0) 00032 { 00033 setName("PVertex"); 00034 } 00035 00037 virtual const Projection* clone() const { 00038 return new PVertex(*this); 00039 } 00041 00042 00044 const Vector3 position() const { 00045 if (_thePVertex != 0) return Vector3(_thePVertex->position()); 00046 return Vector3(0,0,0); 00047 } 00048 00049 00050 protected: 00051 00053 void project(const Event& e); 00054 00055 00057 int compare(const Projection& UNUSED(p)) const { 00058 return EQUIVALENT; 00059 } 00060 00061 00062 private: 00063 00065 GenVertex* _thePVertex; 00066 00067 }; 00068 00069 } 00070 00071 #endif