Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef RIVET_MissingMomentum_HH
0003 #define RIVET_MissingMomentum_HH
0004 
0005 #include "Rivet/Config/RivetCommon.hh"
0006 #include "Rivet/Projection.hh"
0007 #include "Rivet/Projections/METFinder.hh"
0008 #include "Rivet/Projections/VisibleFinalState.hh"
0009 #include "Rivet/Particle.hh"
0010 #include "Rivet/Event.hh"
0011 
0012 namespace Rivet {
0013 
0014 
0015   /// @brief Calculate missing \f$ E \f$, \f$ E_\perp \f$ etc. as complements to the total visible momentum
0016   ///
0017   /// Project out the total visible energy vector, allowing missing \f$ E \f$,
0018   /// \f$ E_\perp \f$ etc. to be calculated. Final-state particle visibility
0019   /// restrictions are automatic, and the resulting visible/missing momentum
0020   /// vectors are over the whole event rather than over hard objects (jets +
0021   /// leptons) or specific to prompt invisibles.
0022   class MissingMomentum : public METFinder {
0023   public:
0024 
0025     using METFinder::operator=;
0026 
0027     /// Canonical constructor taking a FinalState as argument
0028     MissingMomentum(const FinalState& fs) {
0029       setName("MissingMomentum");
0030       declare(fs, "FS");
0031       declare(VisibleFinalState(fs), "VisibleFS");
0032     }
0033 
0034     /// Default constructor with optional cut
0035     MissingMomentum(const Cut& c=Cuts::open())
0036       : MissingMomentum(FinalState(c))
0037     {    }
0038 
0039 
0040     /// Clone on the heap
0041     RIVET_DEFAULT_PROJ_CLONE(MissingMomentum);
0042 
0043     /// Import to avoid warnings about overload-hiding
0044     using Projection::operator =;
0045 
0046 
0047     /// @name Visible/missing four-momentum functions
0048     /// @{
0049 
0050     /// @brief The vector-summed visible four-momentum in the event
0051     ///
0052     /// @note Reverse this vector with .reverse() to get the missing momentum vector.
0053     ///
0054     /// @note The optional @a mass argument is used to set a mass on the 4-vector. By
0055     ///   default it is zero (since missing momentum is really a 3-momentum quantity:
0056     ///   adding the E components of visible momenta just gives a huge mass)
0057     ///
0058     /// @todo Change to return a 3-vector with no argument, a 4-vector if a mass arg given
0059     const FourMomentum visibleMomentum(double mass=0*GeV) const;
0060     /// Alias for visibleMomentum
0061     const FourMomentum visibleMom(double mass=0*GeV) const { return visibleMomentum(mass); }
0062 
0063     /// @brief The missing four-momentum in the event, required to balance the final state.
0064     ///
0065     /// @note The optional @a mass argument is used to set a mass on the 4-vector. By
0066     ///   default it is zero (since missing momentum is really a 3-momentum quantity:
0067     ///   adding the E components of visible momenta just gives a huge mass)
0068     ///
0069     /// @todo Change to return a 3-vector with no argument, a 4-vector if a mass arg given
0070     const FourMomentum missingMomentum(double mass=0*GeV) const { return visibleMomentum(mass).reverse(); }
0071     /// Alias for missingMomentum
0072     const FourMomentum missingMom(double mass=0*GeV) const { return missingMomentum(mass); }
0073 
0074     /// @}
0075 
0076 
0077     /// @name Transverse momentum functions
0078     ///
0079     /// @note This may be what you want, even if the paper calls it "missing Et"!
0080     /// @{
0081 
0082     /// @brief The vector-summed visible transverse momentum in the event, as a 3-vector with z=0
0083     ///
0084     /// @note Reverse this vector with operator- to get the missing pT vector.
0085     const ThreeMomentum& vectorPt() const { return _vpt; }
0086 
0087     /// @brief The vector missing transverse momentum in the event, as a 3-vector with z=0
0088     const ThreeMomentum vectorPtMiss() const { return -vectorPt(); }
0089 
0090     /// @brief The scalar value of missing transverse momentum in the event
0091     double scalarPtMiss() const { return vectorPtMiss().pT(); }
0092 
0093     /// The scalar-summed visible transverse momentum in the event.
0094     double scalarPt() const { return _spt; }
0095     // /// Alias for scalarPt
0096     // double spt() const { return scalarPt(); }
0097 
0098     /// @}
0099 
0100 
0101     /// @name Transverse energy functions
0102     ///
0103     /// @warning Despite the common names "MET" and "SET", what's often meant is the pT functions above!
0104     /// @{
0105 
0106     /// @brief The vector-summed visible transverse energy in the event, as a 3-vector with z=0
0107     ///
0108     /// @note Reverse this vector with operator- to get the missing ET vector.
0109     const Vector3& vectorEt() const { return _vet; }
0110 
0111     /// @brief The vector missing transverse energy in the event, as a 3-vector with z=0
0112     const Vector3 vectorEtMiss() const { return -vectorEt(); }
0113 
0114     /// @brief The scalar value of missing transverse energy in the event
0115     double scalarEtMiss() const { return vectorEtMiss().perp(); }
0116 
0117     /// The scalar-summed visible transverse energy in the event.
0118     double scalarEt() const { return _set; }
0119 
0120     /// @}
0121 
0122 
0123     /// Clear the projection results.
0124     void clear();
0125 
0126 
0127   protected:
0128 
0129     /// Apply the projection to the event.
0130     void project(const Event& e);
0131 
0132     /// Compare projections.
0133     CmpState compare(const Projection& p) const;
0134 
0135 
0136   protected:
0137 
0138     /// The total visible momentum
0139     FourMomentum _momentum;
0140 
0141     /// Scalar transverse energy
0142     double _set, _spt;
0143 
0144     /// Vector transverse energy
0145     Vector3 _vet;
0146     ThreeMomentum _vpt;
0147 
0148   };
0149 
0150 
0151 
0152   /// A slightly more convenient name, following other Rivet shortening-conventions
0153   using MissingMom = MissingMomentum;
0154 
0155 
0156 }
0157 
0158 #endif