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
00028     /// @param pid type of the leptons
00029     /// @param minmass,maxmass mass window
00030     /// @param dRmax maximum dR of photons around leptons to take into account
00031     ///  for Z 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 objects and thus Z mom
00034     /// @param trackPhotons whether such photons should be added to _theParticles
00035     ///  (cf. _trackPhotons)
00036     ZFinder(double etaMin, double etaMax,
00037             double pTmin,
00038             PdgId pid,
00039             double minmass, double maxmass,
00040             double dRmax, bool clusterPhotons, bool trackPhotons,
00041             double masstarget=91.2*GeV,
00042             FinalState inputfs=FinalState());
00043 
00044 
00045     /// Constructor taking multiple eta/pT bounds
00046     /// @param pid type of the leptons
00047     /// @param minmass,maxmass mass window
00048     /// @param dRmax maximum dR of photons around leptons to take into account
00049     ///  for Z reconstruction (only relevant if one of the following are true)
00050     /// @param clusterPhotons whether such photons are supposed to be
00051     ///  clustered to the lepton objects and thus Z mom
00052     /// @param trackPhotons whether such photons should be added to _theParticles
00053     ///  (cf. _trackPhotons)
00054     ZFinder(const std::vector<std::pair<double, double> >& etaRanges,
00055             double pTmin,
00056             PdgId pid,
00057             double minmass, const double maxmass,
00058             double dRmax, bool clusterPhotons, bool trackPhotons,
00059             double masstarget=91.2*GeV,
00060             FinalState inputfs=FinalState());
00061 
00062 
00063     /// Clone on the heap.
00064     virtual const Projection* clone() const {
00065       return new ZFinder(*this);
00066     }
00067     //@}
00068 
00069 
00070     /// Access to the found bosons (currently either 0 or 1)
00071     const ParticleVector& bosons() const { return _bosons; }
00072 
00073     /// Access to the Z constituent clustered leptons
00074     /// (e.g. for more fine-grained cuts on the clustered leptons)
00075     const vector<Particle>& constituents() const { return _constituents; }
00076 
00077     /// Access to the remaining particles, after the Z and clustered photons
00078     /// have been removed from the full final state
00079     /// (e.g. for running a jet finder on it)
00080     const FinalState& remainingFinalState() const;
00081 
00082 
00083   protected:
00084 
00085     /// Apply the projection on the supplied event.
00086     void project(const Event& e);
00087 
00088     /// Compare projections.
00089     int compare(const Projection& p) const;
00090 
00091 
00092   public:
00093 
00094     /// Clear the projection
00095     void clear() {
00096       _theParticles.clear();
00097       _bosons.clear();
00098       _constituents.clear();
00099     }
00100 
00101 
00102   private:
00103     /// Common implementation of constructor operation, taking FS params.
00104     void _init(const std::vector<std::pair<double, double> >& etaRanges,
00105                double pTmin,  PdgId pid,
00106                double minmass, double maxmass,
00107                double dRmax, bool clusterPhotons, bool trackPhotons,
00108                double masstarget,
00109                FinalState inputfs);
00110 
00111     /// Mass cuts to apply to clustered leptons (cf. InvMassFinalState)
00112     double _minmass, _maxmass, _masstarget;
00113 
00114     /// Switch for tracking of photons (whether to add them to _theParticles)
00115     /// This is relevant when the ZFinder::_theParticles are to be excluded
00116     /// from e.g. the input to a jet finder, to specify whether the clustered
00117     /// photons are to be excluded as well.
00118     /// (Yes, some experiments make a difference between clusterPhotons and
00119     /// trackPhotons!)
00120     bool _trackPhotons;
00121 
00122     /// Lepton flavour
00123     PdgId _pid;
00124 
00125     /// list of found bosons (currently either 0 or 1)
00126     ParticleVector _bosons;
00127 
00128     /// Clustered leptons
00129     vector<Particle> _constituents;
00130 
00131   };
00132 
00133 
00134 }
00135 
00136 
00137 
00138 #endif