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/Config/RivetCommon.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   /// A charged lepton meta-particle created by clustering photons close to the bare lepton
00017   class ClusteredLepton : public Particle {
00018   public:
00019 
00020     ClusteredLepton(Particle lepton) :
00021       Particle(lepton.pdgId(), lepton.momentum()),
00022       _constituentLepton(lepton) {}
00023 
00024     void addPhoton(const Particle& p, bool cluster) {
00025       _constituentPhotons.push_back(p);
00026       if (cluster) setMomentum(momentum() + p.momentum());
00027     }
00028 
00029     const Particle& constituentLepton() const { return _constituentLepton; }
00030     const Particles& constituentPhotons() const { return _constituentPhotons; }
00031 
00032   private:
00033 
00034     Particles _constituentPhotons;
00035     Particle _constituentLepton;
00036   };
00037 
00038 
00039   /// @brief Cluster photons from a given FS to all charged particles (typically leptons)
00040   ///
00041   /// This stores the original charged particles and photons as particles()
00042   /// while the newly created clustered lepton objects are accessible as
00043   /// clusteredLeptons().
00044   class DressedLeptons : public FinalState {
00045   public:
00046 
00047     DressedLeptons(const FinalState& photons, const FinalState& signal,
00048                    double dRmax, bool cluster,
00049                    const vector<pair<double, double> >& etaRanges,
00050                    double pTmin, 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