rivet is hosted by Hepforge, IPPP Durham
DressedLeptons.hh
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_DressedLeptons_HH
00003 #define RIVET_DressedLeptons_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/Cuts.hh"
00011 #include "Rivet/Projections/FinalState.hh"
00012 #include "Rivet/Projections/IdentifiedFinalState.hh"
00013 
00014 namespace Rivet {
00015 
00016 
00017   /// A charged lepton meta-particle created by clustering photons close to the bare lepton
00018   class ClusteredLepton : public Particle {
00019   public:
00020 
00021     ClusteredLepton(Particle lepton) :
00022       Particle(lepton.pdgId(), lepton.momentum()),
00023       _constituentLepton(lepton) {}
00024 
00025     void addPhoton(const Particle& p, bool cluster) {
00026       _constituentPhotons.push_back(p);
00027       if (cluster) setMomentum(momentum() + p.momentum());
00028     }
00029 
00030     const Particle& constituentLepton() const { return _constituentLepton; }
00031     const Particles& constituentPhotons() const { return _constituentPhotons; }
00032 
00033   private:
00034 
00035     Particles _constituentPhotons;
00036     Particle _constituentLepton;
00037   };
00038 
00039 
00040   /// @brief Cluster photons from a given FS to all charged particles (typically leptons)
00041   ///
00042   /// This stores the original charged particles and photons as particles()
00043   /// while the newly created clustered lepton objects are accessible as
00044   /// clusteredLeptons().
00045   class DressedLeptons : public FinalState {
00046   public:
00047 
00048     DressedLeptons(const FinalState& photons, const FinalState& signal,
00049                    double dRmax, bool cluster, Cut c,
00050                    bool useDecayPhotons=false);
00051 
00052     virtual const Projection* clone() const {
00053       return new DressedLeptons(*this);
00054     }
00055 
00056     const vector<ClusteredLepton>& clusteredLeptons() const { return _clusteredLeptons; }
00057 
00058 
00059   protected:
00060 
00061     /// Apply the projection on the supplied event.
00062     void project(const Event& e);
00063 
00064     /// Compare projections.
00065     int compare(const Projection& p) const;
00066 
00067 
00068   private:
00069 
00070     /// Maximum cone radius to find photons in
00071     double _dRmax;
00072     /// Whether to actually add the photon momenta to clusteredLeptons
00073     bool _cluster;
00074     /// Whether to include photons from hadron (particularly pi0) decays
00075     bool _fromDecay;
00076 
00077     /// Container which stores the clustered lepton objects
00078     vector<ClusteredLepton> _clusteredLeptons;
00079 
00080   };
00081 
00082 
00083 
00084 
00085 }
00086 
00087 
00088 #endif