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 single eta/pT bounds
00027     /// @param pid type of the charged lepton
00028     /// @param minmass,maxmass (transverse) mass window
00029     /// @param missingET minimal amount of missing ET (neutrinos) required
00030     /// @param dRmax maximum dR of photons around charged lepton to take into account
00031     ///  for W reconstruction (only relevant if one of the following are true)
00032     /// @param clusterPhotons whether such photons are supposed to be
00033     ///  clustered to the lepton object and thus W mom
00034     /// @param trackPhotons whether such photons should be added to _theParticles
00035     ///  (cf. _trackPhotons)
00036     /// @param useTransverseMass whether mass window should be applied using mT
00037     WFinder(double etaMin, double etaMax,
00038             double pTmin,
00039             PdgId pid,
00040             double minmass, double maxmass,
00041             double missingET,
00042             double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
00043             double masstarget=80.4,
00044             bool useTransverseMass=false,
00045             FinalState inputfs=FinalState());
00046 
00047 
00048     /// Constructor taking multiple eta/pT bounds
00049     /// @param pid type of the charged lepton
00050     /// @param minmass,maxmass (transverse) mass window
00051     /// @param missingET minimal amount of missing ET (neutrinos) required
00052     /// @param dRmax maximum dR of photons around charged lepton to take into account
00053     ///  for W reconstruction (only relevant if one of the following are true)
00054     /// @param clusterPhotons whether such photons are supposed to be
00055     ///  clustered to the lepton object and thus W mom
00056     /// @param trackPhotons whether such photons should be added to _theParticles
00057     ///  (cf. _trackPhotons)
00058     /// @param useTransverseMass whether mass window should be applied using mT
00059     WFinder(const std::vector<std::pair<double, double> >& etaRanges,
00060             double pTmin,
00061             PdgId pid,
00062             double minmass, const double maxmass,
00063             double missingET,
00064             double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
00065             double masstarget=80.4,
00066             bool useTransverseMass=false,
00067             FinalState inputfs=FinalState());
00068 
00069 
00070     /// Clone on the heap.
00071     virtual const Projection* clone() const {
00072       return new WFinder(*this);
00073     }
00074     //@}
00075 
00076 
00077     /// Access to the found bosons (currently either 0 or 1)
00078     const ParticleVector& bosons() const { return _bosons; }
00079 
00080     /// Access to the W constituent clustered leptons (currently either of
00081     /// size 0 if no boson was found or 1 if one boson was found)
00082     const vector<Particle>& constituentLeptons() const { return _constituentLeptons; }
00083 
00084     /// Access to the W constituent neutrinos (currently either of size 0 if no
00085     /// boson was found or 1 if one boson was found)
00086     const vector<Particle>& constituentNeutrinos() const { return _constituentNeutrinos; }
00087 
00088     /// Access to the remaining particles, after the W and clustered photons
00089     /// have been removed from the full final state
00090     /// (e.g. for running a jet finder on it)
00091     const FinalState& remainingFinalState() const;
00092 
00093   protected:
00094 
00095     /// Apply the projection on the supplied event.
00096     void project(const Event& e);
00097 
00098     /// Compare projections.
00099     int compare(const Projection& p) const;
00100 
00101 
00102   public:
00103 
00104     /// Clear the projection
00105     void clear() {
00106       _theParticles.clear();
00107       _bosons.clear();
00108       _constituentLeptons.clear();
00109       _constituentNeutrinos.clear();
00110     }
00111 
00112 
00113   private:
00114 
00115     /// Common implementation of constructor operation, taking FS params.
00116     void _init(const std::vector<std::pair<double, double> >& etaRanges,
00117                double pTmin,  PdgId pid,
00118                double minmass, double maxmass,
00119                double missingET,
00120                double dRmax, bool clusterPhotons, bool trackPhotons,
00121                double masstarget,
00122                bool useTransverseMass,
00123                FinalState inputfs);
00124 
00125 
00126   private:
00127 
00128     /// Transverse mass cuts
00129     double _minmass, _maxmass, _masstarget;
00130     bool _useTransverseMass;
00131 
00132     /// Missing ET cut
00133     double _etMiss;
00134 
00135     /// Switch for tracking of photons (whether to add them to _theParticles)
00136     /// This is relevant when the ZFinder::_theParticles are to be excluded
00137     /// from e.g. the input to a jet finder, to specify whether the clustered
00138     /// photons are to be excluded as well.
00139     /// (Yes, some experiments make a difference between clusterPhotons and
00140     /// trackPhotons!)
00141     bool _trackPhotons;
00142 
00143     /// Lepton flavour
00144     PdgId _pid;
00145 
00146     /// Neutrino flavour
00147     PdgId _nu_pid;
00148 
00149     /// list of found bosons (currently either 0 or 1)
00150     ParticleVector _bosons;
00151 
00152     /// Constituent leptons (currently either 0 or 1)
00153     ParticleVector _constituentLeptons;
00154 
00155     /// Constituent neutrinos (currently either 0 or 1)
00156     ParticleVector _constituentNeutrinos;
00157 
00158   };
00159 
00160 
00161 }
00162 
00163 
00164 #endif