Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-18 08:35:09

0001 // -*- C++ -*-
0002 #ifndef RIVET_DileptonFinder_HH
0003 #define RIVET_DileptonFinder_HH
0004 
0005 #include "Rivet/Projections/FinalState.hh"
0006 #include "Rivet/Projections/LeptonFinder.hh"
0007 #include "Rivet/Projections/VetoedFinalState.hh"
0008 
0009 namespace Rivet {
0010 
0011 
0012   /// @brief Convenience finder of leptonically decaying Zs
0013   ///
0014   /// A convenience method for finding l+l- pair resonances, including photon clustering.
0015   class DileptonFinder : public FinalState {
0016   public:
0017 
0018     /// @name Constructors
0019     /// @{
0020 
0021     /// Modern constructor with a default FS, explicit mass target and dressing dR up-front (PID and LL via cuts)
0022     /// @return List of particles containing at most one boson
0023     /// Its PID will always correspond to the Z boson PID, independent of the mass target
0024     /// @note Will enforce that the paired leptons have the same flavor
0025     DileptonFinder(double masstarget,
0026            double dRdress,
0027            const Cut& lcuts=Cuts::OPEN,
0028            const Cut& llcuts=Cuts::OPEN,
0029            LeptonOrigin leptonOrigin=LeptonOrigin::PROMPT,
0030            PhotonOrigin photonOrigin=PhotonOrigin::NODECAY,
0031                    TauDecaysAs tauDecays=TauDecaysAs::PROMPT,
0032                    MuDecaysAs muDecays=MuDecaysAs::PROMPT,
0033                    DressingType dressing=DressingType::CONE);
0034 
0035 
0036     /// Modern constructor with an explicit FS, explicit mass target and dressing dR up-front (PID and LL via cuts)
0037     /// @return List of particles containing at most one boson
0038     /// Its PID will always correspond to the Z boson PID, independent of the mass target
0039     /// @note Will enforce that the paired leptons have the same flavor
0040     DileptonFinder(const FinalState& allfs,
0041                    double masstarget,
0042            double dRdress,
0043            const Cut& lcuts=Cuts::OPEN,
0044            const Cut& llcuts=Cuts::OPEN,
0045                    DressingType dressing=DressingType::CONE);
0046 
0047 
0048     /// Modern constructor with two explicit FSes, explicit mass target and dressing dR up-front (PID and LL via cuts)
0049     /// @return List of particles containing at most one boson
0050     /// Its PID will always correspond to the Z boson PID, independent of the mass target
0051     /// @note Will enforce that the paired leptons have the same flavor
0052     DileptonFinder(const FinalState& leptonfs,
0053                    const FinalState& photonfs,
0054                    double masstarget,
0055                    double dRdress,
0056                    const Cut& lcuts=Cuts::OPEN,
0057                    const Cut& llcuts=Cuts::OPEN,
0058                    DressingType dressing=DressingType::CONE);
0059 
0060 
0061     /// Clone on the heap.
0062     RIVET_DEFAULT_PROJ_CLONE(DileptonFinder);
0063 
0064     /// @}
0065 
0066 
0067     /// @brief Access to the found bosons
0068     ///
0069     /// @note Currently either 0 or 1 boson can be found.
0070     const Particles& bosons() const { return particles(); }
0071     /// Access to the found boson (assuming it exists).
0072     const Particle& boson() const { return bosons().front(); }
0073 
0074 
0075     /// @brief Access to the constituent clustered leptons (and photons)
0076     ///
0077     /// The positive charge constituent is first in the list (if not empty), and
0078     /// the negative one second. Any included photons follow.
0079     const Particles& constituents() const;
0080 
0081     /// @brief Access to the constituent clustered leptons (and photons)
0082     ///
0083     ///
0084     /// The positive charge constituent is first in the list (if not empty), and
0085     /// the negative one second. Any included photons follow.
0086     const Particles& leptons() const {  return constituents(); }
0087 
0088 
0089     /// Access to the event-particles other than the Z leptons and clustered photons
0090     ///
0091     /// Useful for e.g. input to a jet finder
0092     const VetoedFinalState& remainingFinalState() const;
0093 
0094 
0095   protected:
0096 
0097     /// Apply the projection on the supplied event.
0098     void project(const Event& e);
0099 
0100     /// Compare projections.
0101     CmpState compare(const Projection& p) const;
0102 
0103 
0104   public:
0105 
0106     /// Clear the projection
0107     void clear() { _theParticles.clear(); }
0108 
0109     /// Import to avoid warnings about overload-hiding
0110     using Projection::operator =;
0111 
0112 
0113   protected:
0114 
0115     /// Mass target for identifying the best fit
0116     double _masstarget;
0117 
0118   };
0119 
0120 
0121   /// Aliases
0122   using ZFinder = DileptonFinder;
0123   using LLFinder = DileptonFinder;
0124 
0125 
0126 }
0127 
0128 #endif