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 (bare) charged particles and photons as particles() 00043 /// while the newly created clustered lepton objects are accessible as 00044 /// dressedLeptons(). The clustering is done by a delta(R) cone around each bare 00045 /// lepton, with double counting being avoided by only adding a photon to the _closest_ 00046 /// bare lepton if it happens to be within the capture radius of more than one. 00047 class DressedLeptons : public FinalState { 00048 public: 00049 00050 /// @brief Constructor with a general (and optional) Cut argument 00051 /// 00052 /// Provide final state projections used to select the photons and bare 00053 /// leptons (wish we had put the first two args the other way around...), 00054 /// a clustering delta(R) cone size around each bare lepton, and an optional 00055 /// cut on the _dressed_ leptons (i.e. the momenta after clustering.) 00056 /// The final two arguments are rarely used. 00057 DressedLeptons(const FinalState& photons, const FinalState& bareleptons, 00058 double dRmax, const Cut& cut=Cuts::open(), 00059 bool cluster=true, bool useDecayPhotons=false); 00060 00061 /// Constructor with a general (and optional) Cut argument 00062 /// @deprecated Use the version with Cut c before cluster (i.e. with the most common non-default args first) 00063 DEPRECATED("Use the version with Cut c before cluster") 00064 DressedLeptons(const FinalState& photons, const FinalState& bareleptons, 00065 double dRmax, bool cluster=true, const Cut& cut=Cuts::open(), 00066 bool useDecayPhotons=false); 00067 00068 /// Constructor with numerical eta and pT cuts 00069 /// @deprecated Use the Cut version 00070 DEPRECATED("Use the Cut version") 00071 DressedLeptons(const FinalState& photons, const FinalState& bareleptons, 00072 double dRmax, bool cluster, 00073 double etaMin, double etaMax, 00074 double pTmin, bool useDecayPhotons=false); 00075 00076 00077 /// Clone this projection 00078 virtual const Projection* clone() const { 00079 return new DressedLeptons(*this); 00080 } 00081 00082 /// Retrieve the dressed leptons 00083 const vector<DressedLepton>& dressedLeptons() const { return _clusteredLeptons; } 00084 00085 /// Retrieve the dressed leptons (synonym) 00086 /// @deprecated Use dressedLeptons() 00087 DEPRECATED("Use dressedLeptons()") 00088 const vector<DressedLepton>& clusteredLeptons() const { return _clusteredLeptons; } 00089 00090 00091 protected: 00092 00093 /// Apply the projection on the supplied event. 00094 void project(const Event& e); 00095 00096 /// Compare projections. 00097 int compare(const Projection& p) const; 00098 00099 00100 private: 00101 00102 /// Maximum cone radius to find photons in 00103 double _dRmax; 00104 /// Whether to actually add the photon momenta to clusteredLeptons 00105 bool _cluster; 00106 /// Whether to include photons from hadron (particularly pi0) decays 00107 bool _fromDecay; 00108 00109 /// Container which stores the clustered lepton objects 00110 vector<DressedLepton> _clusteredLeptons; 00111 00112 }; 00113 00114 00115 00116 } 00117 00118 00119 #endif Generated on Thu Mar 10 2016 08:29:50 for The Rivet MC analysis system by ![]() |