ZFinder.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_ZFinder_HH
00003 #define RIVET_ZFinder_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/FinalState.hh"
00011 #include "Rivet/Projections/LeptonClusters.hh"
00012 
00013 namespace Rivet {
00014 
00015 
00016   /// @brief Convenience finder of leptonically decaying Zs
00017   ///
00018   /// Chain together different projections as convenience for finding Z's
00019   /// from two leptons in the final state, including photon clustering.
00020   class ZFinder : public FinalState {
00021 
00022   public:
00023 
00024     /// @name Constructors
00025     //@{
00026 
00027     /// Constructor taking single eta/pT bounds and type of the leptons, mass
00028     /// window, and maximum dR of photons around leptons to take into account
00029     /// for Z reconstruction.
00030     /// It has to be specified separately whether such photons are
00031     /// supposed to be clustered to the lepton objects and whether they should
00032     /// be excluded from the remaining FS.
00033     ZFinder(double etaMin, double etaMax,
00034             double pTmin,
00035             PdgId pid,
00036             double minmass, double maxmass,
00037             double dRmax, bool clusterPhotons, bool trackPhotons,
00038             double masstarget=91.2*GeV);
00039 
00040 
00041     /// Constructor taking multiple eta/pT bounds and type of the leptons, mass
00042     /// window, and maximum dR of photons around leptons to take into account
00043     /// for Z reconstruction.
00044     /// It has to be specified separately whether such photons are
00045     /// supposed to be clustered to the lepton objects and whether they should
00046     /// be excluded from the remaining FS.
00047     ZFinder(const std::vector<std::pair<double, double> >& etaRanges,
00048             double pTmin,
00049             PdgId pid,
00050             double minmass, const double maxmass,
00051             double dRmax, bool clusterPhotons, bool trackPhotons,
00052             double masstarget=91.2*GeV);
00053 
00054 
00055     /// Clone on the heap.
00056     virtual const Projection* clone() const {
00057       return new ZFinder(*this);
00058     }
00059     //@}
00060 
00061 
00062     /// Access to the found bosons (currently either 0 or 1)
00063     const ParticleVector& bosons() const { return _bosons; }
00064 
00065     /// Access to the Z constituent clustered leptons
00066     /// (e.g. for more fine-grained cuts on the clustered leptons)
00067     const vector<Particle>& constituents() const { return _constituents; }
00068 
00069     /// Access to the remaining particles, after the Z and clustered photons
00070     /// have been removed from the full final state
00071     /// (e.g. for running a jet finder on it)
00072     const FinalState& remainingFinalState() const;
00073 
00074 
00075   protected:
00076 
00077     /// Apply the projection on the supplied event.
00078     void project(const Event& e);
00079 
00080     /// Compare projections.
00081     int compare(const Projection& p) const;
00082 
00083 
00084   public:
00085 
00086     /// Clear the projection
00087     void clear() {
00088       _theParticles.clear();
00089       _bosons.clear();
00090       _constituents.clear();
00091     }
00092 
00093 
00094   private:
00095     /// Common implementation of constructor operation, taking FS params.
00096     void _init(const std::vector<std::pair<double, double> >& etaRanges,
00097                double pTmin,  PdgId pid,
00098                double minmass, double maxmass,
00099                double dRmax, bool clusterPhotons, bool trackPhotons,
00100                double masstarget);
00101 
00102     /// Mass cuts to apply to clustered leptons (cf. InvMassFinalState)
00103     double _minmass, _maxmass, _masstarget;
00104 
00105     /// Switch for tracking of photons (whether to add them to _theParticles)
00106     /// This is relevant when the ZFinder::_theParticles are to be excluded
00107     /// from e.g. the input to a jet finder, to specify whether the clustered
00108     /// photons are to be excluded as well.
00109     /// (Yes, some experiments make a difference between clusterPhotons and
00110     /// trackPhotons!)
00111     bool _trackPhotons;
00112 
00113     /// Lepton flavour
00114     PdgId _pid;
00115 
00116     /// list of found bosons (currently either 0 or 1)
00117     ParticleVector _bosons;
00118 
00119     /// Clustered leptons
00120     vector<Particle> _constituents;
00121 
00122   };
00123 
00124 
00125 }
00126 
00127 
00128 
00129 #endif