Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef RIVET_DISFinalState_HH
0003 #define RIVET_DISFinalState_HH
0004 
0005 #include "Rivet/Projections/FinalState.hh"
0006 #include "Rivet/Projections/DISKinematics.hh"
0007 
0008 namespace Rivet {
0009 
0010 
0011   /// @brief Final state particles boosted to the hadronic center of mass system.
0012   ///
0013   /// NB. The DIS scattered lepton is not included in the final state particles.
0014   class DISFinalState: public FinalState {
0015   public:
0016 
0017     /// @name Constructors
0018     /// @{
0019 
0020     /// @brief Constructor with explicit FinalState
0021     DISFinalState(const FinalState& fs, DISFrame boosttype)
0022       : _boosttype(boosttype)
0023     {
0024       setName("DISFinalState");
0025       declare(fs, "FS");
0026       declare(DISKinematics(), "Kinematics");
0027     }
0028 
0029 
0030     /// @brief Constructor with optional FinalState
0031     DISFinalState(DISFrame boosttype, const FinalState& fs=FinalState())
0032       : DISFinalState(fs, boosttype)
0033     {    }
0034 
0035 
0036     /// @brief Constructor with explicit cuts to define final-state particles
0037     ///
0038     /// @note The cuts will be applied *before* the boost, e.g. to express detector acceptance.
0039     ///
0040     /// @todo Add a second optional Cut argument for post-boost cuts.
0041     DISFinalState(const Cut& c, DISFrame boosttype)
0042       : DISFinalState(FinalState(c), boosttype)
0043     {    }
0044 
0045 
0046     /// @brief Constructor with explicit cuts to define final-state particles
0047     ///
0048     /// @note The cuts will be applied *before* the boost, e.g. to express detector acceptance.
0049     ///
0050     /// @todo Add a second optional Cut argument for post-boost cuts.
0051     ///
0052     /// @deprecated The DISKinematics has no parameters, hence explicitly passing it as an arg shouldn't be necessary.
0053     DISFinalState(DISFrame boosttype, const Cut& c)
0054       : DISFinalState(FinalState(c), boosttype)
0055     {    }
0056 
0057 
0058     // /// @brief Constructor with default FinalState
0059     // DISFinalState(BoostFrame boosttype)
0060     //   : DISFinalState(FinalState(), boosttype)
0061     // {    }
0062 
0063 
0064     /// Clone on the heap.
0065     RIVET_DEFAULT_PROJ_CLONE(DISFinalState);
0066 
0067     /// @}
0068 
0069 
0070     /// Import to avoid warnings about overload-hiding
0071     using Projection::operator =;
0072 
0073 
0074     /// Get the associated DISKinematics (to avoid needing a separate projection)
0075     const DISKinematics& kinematics() {
0076       return getProjection<DISKinematics>("Kinematics");
0077     }
0078 
0079 
0080   protected:
0081 
0082     /// Apply the projection on the supplied event.
0083     void project(const Event& e);
0084 
0085     
0086     /// Compare projections.
0087     CmpState compare(const Projection& p) const {
0088       const DISFinalState& other = dynamic_cast<const DISFinalState&>(p);
0089       return mkNamedPCmp(p, "Kinematics") || mkNamedPCmp(p, "FS") || cmp(_boosttype, other._boosttype);
0090     }
0091 
0092 
0093   protected:
0094 
0095     DISFrame _boosttype;
0096 
0097   };
0098 
0099 
0100 }
0101 
0102 #endif