Rivet  1.8.0
ClusteredPhotons.hh
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 
00017   class ClusteredPhotons : public FinalState {
00018   public:
00019 
00021 
00022 
00023 
00024     ClusteredPhotons(const FinalState& fs, const FinalState& signal, double dRmax)
00025       : _dRmax(dRmax)
00026     {
00027       setName("ClusteredPhotons");
00028       IdentifiedFinalState photonfs(fs);
00029       photonfs.acceptId(PHOTON);
00030       addProjection(photonfs, "Photons");
00031       addProjection(signal, "Signal");
00032     }
00033 
00034 
00036     virtual const Projection* clone() const {
00037       return new ClusteredPhotons(*this);
00038     }
00040 
00041 
00042   public:
00043 
00044   protected:
00045 
00047     void project(const Event& e);
00048 
00050     int compare(const Projection& p) const;
00051 
00052 
00053   private:
00054 
00056     double _dRmax;
00057 
00058   };
00059 
00060 
00061 }
00062 
00063 
00064 #endif