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