rivet is hosted by Hepforge, IPPP Durham
ClusteredPhotons.hh
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_ClusteredPhotons_HH
00003 #define RIVET_ClusteredPhotons_HH
00004 
00005 #include "Rivet/Tools/Logging.hh"
00006 #include "Rivet/Rivet.hh"
00007 #include "Rivet/Particle.hh"
00008 #include "Rivet/Event.hh"
00009 #include "Rivet/Projection.hh"
00010 #include "Rivet/Projections/FinalState.hh"
00011 #include "Rivet/Projections/IdentifiedFinalState.hh"
00012 
00013 namespace Rivet {
00014 
00015 
00016   /// @brief Find final state photons which in a cone around any particle in the "signal" final state
00017   class ClusteredPhotons : public FinalState {
00018   public:
00019 
00020     /// @name Constructors
00021     //@{
00022     /// Constructor with the two final states, and the maximum separation in dR
00023     /// for clustered photons
00024     ClusteredPhotons(const FinalState& fs, const FinalState& signal, double dRmax)
00025       : _dRmax(dRmax)
00026     {
00027       setName("ClusteredPhotons");
00028       IdentifiedFinalState photonfs(fs);
00029       photonfs.acceptId(PID::PHOTON);
00030       addProjection(photonfs, "Photons");
00031       addProjection(signal, "Signal");
00032     }
00033 
00034 
00035     /// Clone on the heap.
00036     virtual const Projection* clone() const {
00037       return new ClusteredPhotons(*this);
00038     }
00039     //@}
00040 
00041 
00042   protected:
00043 
00044     /// Apply the projection on the supplied event.
00045     void project(const Event& e);
00046 
00047     /// Compare projections.
00048     int compare(const Projection& p) const;
00049 
00050 
00051   private:
00052 
00053     /// maximum cone radius to find photons in
00054     double _dRmax;
00055 
00056   };
00057 
00058 
00059 }
00060 
00061 
00062 #endif