WFinder.hh
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #ifndef RIVET_WFinder_HH 00003 #define RIVET_WFinder_HH 00004 00005 #include "Rivet/Projections/FinalState.hh" 00006 #include "Rivet/Projections/VetoedFinalState.hh" 00007 00008 namespace Rivet { 00009 00010 00011 /// @brief Convenience finder of leptonically decaying W 00012 /// 00013 /// Chain together different projections as convenience for finding one W 00014 /// from one lepton and the missing E 4-vector in the final state, including photon clustering. 00015 /// 00016 /// @todo Inherit directly from ParticleFinder, not FinalState 00017 class WFinder : public FinalState { 00018 public: 00019 00020 enum ClusterPhotons { NOCLUSTER=0, CLUSTERNODECAY=1, CLUSTERALL }; 00021 enum PhotonTracking { NOTRACK=0, TRACK=1 }; 00022 enum MassWindow { MASS=0, TRANSMASS=1 }; 00023 00024 /// @name Constructors 00025 //@{ 00026 00027 /// Constructor taking cuts object 00028 /// @param inputfs Input final state 00029 /// @param cuts charged lepton cuts 00030 /// @param pid type of the charged lepton 00031 /// @param minmass,maxmass (transverse) mass window 00032 /// @param missingET minimal amount of missing ET (neutrinos) required 00033 /// @param dRmax maximum dR of photons around charged lepton to take into account 00034 /// for W reconstruction (only relevant if one of the following are true) 00035 /// @param clusterPhotons whether such photons are supposed to be 00036 /// clustered to the lepton object and thus W mom 00037 /// @param trackPhotons whether such photons should be added to _theParticles 00038 /// @param masstype whether mass window should be applied using m or mT 00039 WFinder(const FinalState& inputfs, 00040 const Cut & cuts, 00041 PdgId pid, 00042 double minmass, double maxmass, 00043 double missingET, 00044 double dRmax=0.1, 00045 ClusterPhotons clusterPhotons=CLUSTERNODECAY, 00046 PhotonTracking trackPhotons=NOTRACK, 00047 MassWindow masstype=MASS, 00048 double masstarget=80.4*GeV); 00049 00050 /// Clone on the heap. 00051 virtual const Projection* clone() const { 00052 return new WFinder(*this); 00053 } 00054 00055 //@} 00056 00057 00058 /// Access to the found bosons 00059 /// 00060 /// @note Currently either 0 or 1 boson can be found. 00061 const Particles& bosons() const { return _bosons; } 00062 00063 /// Access to the found boson (assuming it exists) 00064 const Particle& boson() const { return _bosons[0]; } 00065 00066 00067 /// Access to the W constituent clustered leptons 00068 /// 00069 /// @note Either size 0 if no boson was found or 1 if one boson was found 00070 const Particles& constituentLeptons() const { return _constituentLeptons; } 00071 00072 /// Access to the W constituent clustered lepton (assuming it exists) 00073 const Particle& constituentLepton() const { return _constituentLeptons[0]; } 00074 00075 00076 /// Access to the W constituent neutrinos 00077 /// 00078 /// @note Either size 0 if no boson was found or 1 if one boson was found 00079 const Particles& constituentNeutrinos() const { return _constituentNeutrinos; } 00080 00081 /// Access to the W constituent neutrinos 00082 const Particle& constituentNeutrino() const { return _constituentNeutrinos[0]; } 00083 00084 00085 /// Access to the particles other than the W leptons and clustered photons 00086 /// 00087 /// Useful for e.g. input to a jet finder 00088 const VetoedFinalState& remainingFinalState() const; 00089 00090 /// @brief Calculate the transverse mass of the W, from the charged lepton and neutrino 00091 /// 00092 /// Defined as sqrt(2 pT_l pT_nu (1.0 - cos(dphi_lnu))). Return -1 if no boson found. 00093 double mT() const { 00094 if (bosons().empty()) return -1; 00095 const FourMomentum& l = constituentLeptons()[0].momentum(); 00096 const FourMomentum& nu = constituentNeutrinos()[0].momentum(); 00097 return sqrt( 2 * l.pT() * nu.pT() * (1 - cos(deltaPhi(l, nu))) ); 00098 } 00099 00100 00101 protected: 00102 00103 /// Apply the projection on the supplied event. 00104 void project(const Event& e); 00105 00106 /// Compare projections. 00107 int compare(const Projection& p) const; 00108 00109 00110 public: 00111 00112 /// Clear the projection 00113 void clear() { 00114 _theParticles.clear(); 00115 _bosons.clear(); 00116 _constituentLeptons.clear(); 00117 _constituentNeutrinos.clear(); 00118 } 00119 00120 private: 00121 00122 /// Transverse mass cuts 00123 double _minmass, _maxmass, _masstarget; 00124 bool _useTransverseMass; 00125 00126 /// Missing ET cut 00127 double _etMiss; 00128 00129 /// Switch for tracking of photons (whether to add them to _theParticles) 00130 /// This is relevant when the ZFinder::_theParticles are to be excluded 00131 /// from e.g. the input to a jet finder, to specify whether the clustered 00132 /// photons are to be excluded as well. 00133 /// (Yes, some experiments make a difference between clusterPhotons and 00134 /// trackPhotons!) 00135 PhotonTracking _trackPhotons; 00136 00137 /// Lepton flavour 00138 PdgId _pid; 00139 00140 /// Neutrino flavour 00141 PdgId _nu_pid; 00142 00143 /// list of found bosons (currently either 0 or 1) 00144 Particles _bosons; 00145 00146 /// Constituent leptons (currently either 0 or 1) 00147 Particles _constituentLeptons; 00148 00149 /// Constituent neutrinos (currently either 0 or 1) 00150 Particles _constituentNeutrinos; 00151 00152 }; 00153 00154 00155 } 00156 00157 00158 #endif Generated on Fri Jul 24 2015 15:47:57 for The Rivet MC analysis system by ![]() |