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 /// Find final state photons which are found in a cone around 00017 /// any particle in the "signal" final state 00018 class ClusteredPhotons : public FinalState { 00019 00020 public: 00021 00022 /// @name Constructors 00023 //@{ 00024 /// Constructor with the two final states, and the maximum separation in dR 00025 /// for clustered photons 00026 ClusteredPhotons(const FinalState& fs, const FinalState& signal, double dRmax) 00027 : _dRmax(dRmax) 00028 { 00029 setName("ClusteredPhotons"); 00030 IdentifiedFinalState photonfs(fs); 00031 photonfs.acceptId(PHOTON); 00032 addProjection(photonfs, "Photons"); 00033 addProjection(signal, "Signal"); 00034 } 00035 00036 00037 /// Clone on the heap. 00038 virtual const Projection* clone() const { 00039 return new ClusteredPhotons(*this); 00040 } 00041 //@} 00042 00043 00044 public: 00045 00046 protected: 00047 00048 /// Apply the projection on the supplied event. 00049 void project(const Event& e); 00050 00051 /// Compare projections. 00052 int compare(const Projection& p) const; 00053 00054 00055 private: 00056 00057 /// maximum cone radius to find photons in 00058 double _dRmax; 00059 00060 }; 00061 00062 00063 } 00064 00065 00066 #endif