ChargedLeptons.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_ChargedLeptons_HH
00003 #define RIVET_ChargedLeptons_HH
00004 
00005 #include "Rivet/Projection.hh"
00006 #include "Rivet/Projections/ChargedFinalState.hh"
00007 #include "Rivet/Particle.hh"
00008 #include "Rivet/Event.hh"
00009 
00010 namespace Rivet {
00011 
00012 
00013   /// Project out charged final-state leptons (i.e. electrons and muons, unless
00014   /// you set taus stable!)
00015   class ChargedLeptons : public Projection {
00016  
00017   public:
00018  
00019     /// Constructor
00020     ChargedLeptons(const FinalState& fsp)
00021     {
00022       setName("ChargedLeptons");
00023       addProjection(ChargedFinalState(fsp), "ChFS");
00024     }
00025  
00026     /// Clone on the heap.
00027     virtual const Projection* clone() const {
00028       return new ChargedLeptons(*this);
00029     }
00030 
00031   protected:
00032  
00033     /// Apply the projection to the event.
00034     void project(const Event& evt);
00035  
00036     /// Compare projections.
00037     int compare(const Projection& other) const;
00038  
00039   public:
00040  
00041     /// Access the projected leptons.
00042     const ParticleVector& chargedLeptons() const {
00043       return _theChargedLeptons;
00044     }
00045  
00046   private:
00047 
00048     /// The leptons
00049     ParticleVector _theChargedLeptons;
00050      
00051   };
00052 
00053 
00054 }
00055 
00056 #endif