Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PVertex.hh

Go to the documentation of this file.
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 
00010 namespace Rivet {
00011   
00012   
00013   /// Returns the primary vertex of an event
00014   class PVertex: public Projection {
00015 
00016   public:
00017 
00018     /// @name Standard constructors and destructors.
00019     //@{
00020     /// The default constructor.
00021     inline PVertex() { 
00022     }
00023 
00024     /// The destructor.
00025     virtual ~PVertex() { }
00026     //@}
00027 
00028     public:
00029       /// Return the name of the projection
00030       inline string getName() const {
00031         return "PVertex";
00032       }
00033 
00034   protected:
00035 
00036     /// Do the projection.
00037     virtual void project(const Event & e);
00038 
00039     /// Compare projections.
00040     inline virtual int compare(const Projection & p) const {
00041       return 0;
00042     }
00043 
00044   public:
00045 
00046     /// Get the primary vertex.
00047     inline const GenVertex& getPrimaryVertex() const {
00048       return *_thePVertex;
00049     }
00050 
00051   private:
00052 
00053     /// The Primary Vertex in the current collision.
00054     GenVertex* _thePVertex;
00055 
00056   };
00057 
00058 }
00059 
00060 
00061 #endif