Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-18 09:06:08

0001 // -*- C++ -*-
0002 #ifndef RIVET_DISLepton_HH
0003 #define RIVET_DISLepton_HH
0004 
0005 #include "Rivet/Projections/Beam.hh"
0006 #include "Rivet/Projections/PromptFinalState.hh"
0007 #include "Rivet/Projections/HadronicFinalState.hh"
0008 #include "Rivet/Projections/LeptonFinder.hh"
0009 #include "Rivet/Projections/UndressBeamLeptons.hh"
0010 #include "Rivet/Projections/VetoedFinalState.hh"
0011 #include "Rivet/Particle.hh"
0012 #include "Rivet/Event.hh"
0013 
0014 namespace Rivet {
0015 
0016   /// Enum for available DIS incoming-to-outgoing lepton mode
0017   enum class DISMode { L2L, L2NU, NU2L, NU2NU };
0018 
0019   /// @brief Get the incoming and outgoing leptons in a DIS event.
0020   class DISLepton : public FinalState {
0021   public:
0022 
0023     /// @name Constructors.
0024     /// @{
0025 
0026     /// Constructor with optional cuts first
0027     DISLepton(const Cut& cuts=Cuts::OPEN,
0028           LeptonReco lreco=LeptonReco::ALL, ObjOrdering lsort=ObjOrdering::ENERGY,
0029           double beamundresstheta=0.0, double isolDR=0.0, double dressDR=0.0, DISMode dismode=DISMode::L2L)
0030       : _isolDR(isolDR), _lsort(lsort), _lreco(lreco), _dismode(dismode)
0031     {
0032       setName("DISLepton");
0033       declare(HadronicFinalState(), "IFS");
0034 
0035       // Beam undressing
0036       if (beamundresstheta > 0.0) {
0037         declare(UndressBeamLeptons(beamundresstheta), "Beam");
0038       } else {
0039         declare(Beam(), "Beam");
0040       }
0041 
0042       // Lepton reco mode
0043       switch (_lreco) {
0044       case LeptonReco::ALL:
0045         declare(FinalState(cuts), "LFS");
0046         break;
0047       case LeptonReco::ALL_DRESSED:
0048         declare(LeptonFinder(FinalState(), dressDR, cuts), "LFS");
0049         break;
0050       case LeptonReco::PROMPT_BARE:
0051         declare(PromptFinalState(cuts), "LFS");
0052         break;
0053       case LeptonReco::PROMPT_DRESSED:
0054         declare(LeptonFinder(PromptFinalState(), dressDR, cuts), "LFS");
0055         break;
0056       }
0057 
0058       // Identify the non-outgoing-lepton part of the event
0059       VetoedFinalState remainingFS;
0060       remainingFS.addVetoOnThisFinalState(*this);
0061       declare(remainingFS, "RFS");
0062     }
0063 
0064 
0065     /// Constructor without lepton-ordering spec, requiring cuts
0066     DISLepton(Cut& cuts, LeptonReco lreco=LeptonReco::ALL,
0067           double beamundresstheta=0.0, double isolDR=0.0, double dressDR=0.0, DISMode dismode=DISMode::L2L)
0068       : DISLepton(cuts, lreco, ObjOrdering::ENERGY, beamundresstheta, isolDR, dressDR, dismode)
0069     {  }
0070 
0071     /// Constructor without cuts, requiring lepton reco spec
0072     DISLepton(LeptonReco lreco, ObjOrdering lsort=ObjOrdering::ENERGY,
0073           double beamundresstheta=0.0, double isolDR=0.0, double dressDR=0.0, DISMode dismode=DISMode::L2L)
0074       : DISLepton(Cuts::OPEN, lreco, lsort, beamundresstheta, isolDR, dressDR, dismode)
0075     {  }
0076 
0077     /// Constructor without cuts or lepton-ordering spec, requiring lepton reco spec
0078     DISLepton(LeptonReco lreco,
0079           double beamundresstheta=0.0, double isolDR=0.0, double dressDR=0.0, DISMode dismode=DISMode::L2L)
0080       : DISLepton(Cuts::OPEN, lreco, ObjOrdering::ENERGY, beamundresstheta, isolDR, dressDR, dismode)
0081     {  }
0082 
0083 
0084     /// Clone on the heap.
0085     RIVET_DEFAULT_PROJ_CLONE(DISLepton);
0086 
0087     /// @}
0088 
0089     /// Import to avoid warnings about overload-hiding
0090     using Projection::operator =;
0091 
0092 
0093   protected:
0094 
0095     /// Perform the projection operation on the supplied event.
0096     virtual void project(const Event& e);
0097 
0098     /// Compare with other projections.
0099     virtual CmpState compare(const Projection& p) const;
0100 
0101 
0102   public:
0103 
0104     /// The incoming lepton
0105     const Particle& in() const { return _incoming; }
0106 
0107     /// The outgoing lepton
0108     const Particle& out() const { return _outgoing; }
0109 
0110     /// Sign of the incoming lepton pz component
0111     int pzSign() const { return sign(_incoming.pz()); }
0112 
0113     /// Lepton reconstruction mode
0114     LeptonReco reconstructionMode() const { return _lreco; }
0115 
0116 
0117     /// Access to the particles other than outgoing leptons and clustered photons
0118     ///
0119     /// Useful for e.g. input to a jet finder
0120     const VetoedFinalState& remainingFinalState() const;
0121 
0122     /// Clear the projection
0123     void clear() { _theParticles.clear(); }
0124 
0125 
0126   protected:
0127 
0128     /// The incoming lepton
0129     Particle _incoming;
0130 
0131     /// The outgoing lepton
0132     Particle _outgoing;
0133 
0134     /// An isolation cone around the lepton
0135     double _isolDR;
0136 
0137     /// How to sort leptons
0138     ObjOrdering _lsort;
0139 
0140     /// The lepton reconstruction mode
0141     LeptonReco _lreco;
0142 
0143     /// The incoming-to-outgoing lepton mode
0144     DISMode _dismode;
0145 
0146   };
0147 
0148 
0149 }
0150 
0151 #endif