Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-05-12 09:05:02

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