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/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 DressedLepton : public Particle {
00019   public:
00020 
00021     DressedLepton(const Particle& lepton) :
00022       Particle(lepton.pid(), 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     /// Constructor with a single eta range
00049     DressedLeptons(const FinalState& photons, const FinalState& signal,
00050                    double dRmax, bool cluster,
00051                    double etaMin, double etaMax,
00052                    double pTmin, bool useDecayPhotons=false);
00053 
00054     /// Constructor with multiple eta ranges
00055     DressedLeptons(const FinalState& photons, const FinalState& signal,
00056                    double dRmax, bool cluster, Cut c,
00057                    bool useDecayPhotons=false);
00058 
00059 
00060     /// Clone this projection
00061     virtual const Projection* clone() const {
00062       return new DressedLeptons(*this);
00063     }
00064 
00065     /// Retrieve the dressed leptons
00066     const vector<DressedLepton>& dressedLeptons() const { return _clusteredLeptons; }
00067 
00068     /// Retrieve the dressed leptons (synonym)
00069     /// @deprecated Use dressedLeptons()
00070     const vector<DressedLepton>& clusteredLeptons() const { return _clusteredLeptons; }
00071 
00072 
00073   protected:
00074 
00075     /// Apply the projection on the supplied event.
00076     void project(const Event& e);
00077 
00078     /// Compare projections.
00079     int compare(const Projection& p) const;
00080 
00081 
00082   private:
00083 
00084     /// Maximum cone radius to find photons in
00085     double _dRmax;
00086     /// Whether to actually add the photon momenta to clusteredLeptons
00087     bool _cluster;
00088     /// Whether to include photons from hadron (particularly pi0) decays
00089     bool _fromDecay;
00090 
00091     /// Container which stores the clustered lepton objects
00092     vector<DressedLepton> _clusteredLeptons;
00093 
00094   };
00095 
00096 
00097 
00098 }
00099 
00100 
00101 #endif