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/Projection.hh"
00006 #include "Rivet/Projections/FinalState.hh"
00007 #include "Rivet/Projections/IdentifiedFinalState.hh"
00008 #include "Rivet/Config/RivetCommon.hh"
00009 
00010 namespace Rivet {
00011 
00012 
00013   /// A charged lepton meta-particle created by clustering photons close to the bare lepton
00014   class DressedLepton : public Particle {
00015   public:
00016 
00017     DressedLepton(const Particle& lepton) :
00018       Particle(lepton.pid(), lepton.momentum()),
00019       _constituentLepton(lepton) {}
00020 
00021     void addPhoton(const Particle& p, bool cluster) {
00022       _constituentPhotons.push_back(p);
00023       if (cluster) setMomentum(momentum() + p.momentum());
00024     }
00025 
00026     const Particle& constituentLepton() const { return _constituentLepton; }
00027     const Particles& constituentPhotons() const { return _constituentPhotons; }
00028 
00029   private:
00030 
00031     Particles _constituentPhotons;
00032     Particle _constituentLepton;
00033   };
00034 
00035 
00036   /// @brief Cluster photons from a given FS to all charged particles (typically leptons)
00037   ///
00038   /// This stores the original (bare) charged particles and photons as particles()
00039   /// while the newly created clustered lepton objects are accessible as
00040   /// dressedLeptons(). The clustering is done by a delta(R) cone around each bare
00041   /// lepton, with double counting being avoided by only adding a photon to the _closest_
00042   /// bare lepton if it happens to be within the capture radius of more than one.
00043   class DressedLeptons : public FinalState {
00044   public:
00045 
00046     /// @brief Constructor with a general (and optional) Cut argument
00047     ///
00048     /// Provide final state projections used to select the photons and bare
00049     /// leptons (wish we had put the first two args the other way around...),
00050     /// a clustering delta(R) cone size around each bare lepton, and an optional
00051     /// cut on the _dressed_ leptons (i.e. the momenta after clustering.)
00052     /// The final two arguments are rarely used.
00053     DressedLeptons(const FinalState& photons, const FinalState& bareleptons,
00054                    double dRmax, const Cut& cut=Cuts::open(),
00055                    bool cluster=true, bool useDecayPhotons=false);
00056 
00057     /// Constructor with a general (and optional) Cut argument
00058     /// @deprecated Use the version with Cut c before cluster (i.e. with the most common non-default args first)
00059     DEPRECATED("Use the version with Cut c before cluster")
00060     DressedLeptons(const FinalState& photons, const FinalState& bareleptons,
00061                    double dRmax, bool cluster, const Cut& cut=Cuts::open(),
00062                    bool useDecayPhotons=false);
00063 
00064     /// Constructor with numerical eta and pT cuts
00065     /// @deprecated Use the Cut version
00066     DEPRECATED("Use the Cut version")
00067     DressedLeptons(const FinalState& photons, const FinalState& bareleptons,
00068                    double dRmax, bool cluster,
00069                    double etaMin, double etaMax,
00070                    double pTmin, bool useDecayPhotons=false);
00071 
00072 
00073     /// Clone this projection
00074     DEFAULT_RIVET_PROJ_CLONE(DressedLeptons);
00075 
00076     /// Retrieve the dressed leptons
00077     const vector<DressedLepton>& dressedLeptons() const { return _clusteredLeptons; }
00078 
00079     /// Retrieve the dressed leptons (synonym)
00080     /// @deprecated Use dressedLeptons()
00081     DEPRECATED("Use dressedLeptons()")
00082     const vector<DressedLepton>& clusteredLeptons() const { return _clusteredLeptons; }
00083 
00084 
00085   protected:
00086 
00087     /// Apply the projection on the supplied event.
00088     void project(const Event& e);
00089 
00090     /// Compare projections.
00091     int compare(const Projection& p) const;
00092 
00093 
00094   private:
00095 
00096     /// Maximum cone radius to find photons in
00097     double _dRmax;
00098     /// Whether to actually add the photon momenta to clusteredLeptons
00099     bool _cluster;
00100     /// Whether to include photons from hadron (particularly pi0) decays
00101     bool _fromDecay;
00102 
00103     /// Container which stores the clustered lepton objects
00104     vector<DressedLepton> _clusteredLeptons;
00105 
00106   };
00107 
00108 
00109 
00110 }
00111 
00112 
00113 #endif