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/Tools/Logging.hh"
00006 #include "Rivet/Rivet.hh"
00007 #include "Rivet/Particle.hh"
00008 #include "Rivet/Event.hh"
00009 #include "Rivet/Projection.hh"
00010 #include "Rivet/Projections/ChargedFinalState.hh"
00011 #include "Rivet/Projections/LeptonClusters.hh"
00012 
00013 namespace Rivet {
00014 
00015 
00016   /// @brief Convenience finder of leptonically decaying Ws
00017   ///
00018   /// Chain together different projections as convenience for finding W's
00019   /// from two leptons in the final state, including photon clustering.
00020   class WFinder : public FinalState {
00021   public:
00022 
00023     /// @name Constructors
00024     //@{
00025 
00026     // /// Constructor taking a FinalState and type of the charged lepton, mass window,
00027     // /// and maximum dR of photons around the charged lepton to take into account for W
00028     // /// reconstruction.
00029     // WFinder(const ChargedFinalState& fs_l,
00030     //         PdgId pid,
00031     //         double minmass, double maxmass,
00032     //         double missingET,
00033     //         double dRmax, bool clusterPhotons, bool excludePhotonsFromRFS);
00034 
00035 
00036     /// Constructor taking single eta/pT bounds and type of the charged lepton, transverse mass
00037     /// window, and maximum dR of photons around the charged lepton to take into account
00038     /// for W reconstruction.
00039     WFinder(double etaMin, double etaMax,
00040             double pTmin,
00041             PdgId pid,
00042             double minmass, double maxmass,
00043             double missingET,
00044             double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
00045             double masstarget=80.4,
00046             bool useTransverseMass=false);
00047 
00048 
00049     /// Constructor taking multiple eta/pT bounds and type of the charged lepton, transverse mass
00050     /// window, and maximum dR of photons around the charged lepton to take into account
00051     /// for W reconstruction.
00052     WFinder(const std::vector<std::pair<double, double> >& etaRanges,
00053             double pTmin,
00054             PdgId pid,
00055             double minmass, const double maxmass,
00056             double missingET,
00057             double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
00058             double masstarget=80.4,
00059             bool useTransverseMass=false);
00060 
00061 
00062     /// Clone on the heap.
00063     virtual const Projection* clone() const {
00064       return new WFinder(*this);
00065     }
00066     //@}
00067 
00068 
00069     /// Access to the found bosons (currently either 0 or 1)
00070     const ParticleVector& bosons() const { return _bosons; }
00071 
00072     /// Access to the W constituent clustered leptons (currently either of
00073     /// size 0 if no boson was found or 1 if one boson was found)
00074     const vector<Particle>& constituentLeptons() const { return _constituentLeptons; }
00075 
00076     /// Access to the W constituent neutrinos (currently either of size 0 if no
00077     /// boson was found or 1 if one boson was found)
00078     const vector<Particle>& constituentNeutrinos() const { return _constituentNeutrinos; }
00079 
00080     /// Access to the remaining particles, after the W and clustered photons
00081     /// have been removed from the full final state
00082     /// (e.g. for running a jet finder on it)
00083     const FinalState& remainingFinalState() const;
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   public:
00095 
00096     /// Clear the projection
00097     void clear() {
00098       _theParticles.clear();
00099       _bosons.clear();
00100       _constituentLeptons.clear();
00101       _constituentNeutrinos.clear();
00102     }
00103 
00104 
00105   private:
00106 
00107     /// Common implementation of constructor operation, taking FS params.
00108     void _init(const std::vector<std::pair<double, double> >& etaRanges,
00109                double pTmin,  PdgId pid,
00110                double minmass, double maxmass,
00111                double missingET,
00112                double dRmax, bool clusterPhotons, bool trackPhotons,
00113                double masstarget,
00114                bool useTransverseMass);
00115 
00116 
00117   private:
00118 
00119     /// Transverse mass cuts
00120     double _minmass, _maxmass, _masstarget;
00121     bool _useTransverseMass;
00122 
00123     /// Missing ET cut
00124     double _etMiss;
00125 
00126     /// Switch for tracking of photons (whether to add them to _theParticles)
00127     /// This is relevant when the ZFinder::_theParticles are to be excluded
00128     /// from e.g. the input to a jet finder, to specify whether the clustered
00129     /// photons are to be excluded as well.
00130     /// (Yes, some experiments make a difference between clusterPhotons and
00131     /// trackPhotons!)
00132     bool _trackPhotons;
00133 
00134     /// Lepton flavour
00135     PdgId _pid;
00136 
00137     /// Neutrino flavour
00138     PdgId _nu_pid;
00139 
00140     /// list of found bosons (currently either 0 or 1)
00141     ParticleVector _bosons;
00142 
00143     /// Constituent leptons (currently either 0 or 1)
00144     ParticleVector _constituentLeptons;
00145 
00146     /// Constituent neutrinos (currently either 0 or 1)
00147     ParticleVector _constituentNeutrinos;
00148 
00149   };
00150 
00151 
00152 }
00153 
00154 
00155 #endif