Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef RIVET_BeamThrust_HH
0003 #define RIVET_BeamThrust_HH
0004 
0005 #include "Rivet/Projection.hh"
0006 #include "Rivet/Projections/FinalState.hh"
0007 #include "Rivet/Event.hh"
0008 
0009 namespace Rivet {
0010 
0011 
0012   /// Calculator of the beam-thrust observable
0013   class BeamThrust : public Projection {
0014   public:
0015 
0016     /// Constructor.
0017     BeamThrust() {}
0018 
0019     BeamThrust(const FinalState& fsp) {
0020       setName("BeamThrust");
0021       declare(fsp, "FS");
0022     }
0023 
0024     /// Clone on the heap.
0025     RIVET_DEFAULT_PROJ_CLONE(BeamThrust);
0026 
0027     /// Import to avoid warnings about overload-hiding
0028     using Projection::operator =;
0029 
0030 
0031   protected:
0032 
0033     /// Perform the projection on the Event
0034     void project(const Event& e) {
0035       const vector<Particle> ps
0036         = apply<FinalState>(e, "FS").particles();
0037       calc(ps);
0038     }
0039 
0040     /// Compare projections
0041     CmpState compare(const Projection& p) const {
0042       return mkNamedPCmp(p, "FS");
0043     }
0044 
0045   public:
0046 
0047     double beamthrust() const { return _beamthrust; }
0048 
0049     /// @name Direct methods
0050     /// Ways to do the calculation directly, without engaging the caching system
0051     /// @{
0052 
0053     /// Manually calculate the beamthrust, without engaging the caching system
0054     void calc(const FinalState& fs);
0055 
0056     /// Manually calculate the beamthrust, without engaging the caching system
0057     void calc(const vector<Particle>& fsparticles);
0058 
0059     /// Manually calculate the beamthrust, without engaging the caching system
0060     void calc(const vector<FourMomentum>& fsmomenta);
0061 
0062     /// @}
0063 
0064 
0065   protected:
0066 
0067     /// The beamthrust scalar.
0068     double _beamthrust;
0069 
0070 
0071   protected:
0072 
0073     /// Explicitly calculate the beamthrust values.
0074     void _calcBeamThrust(const vector<FourMomentum>& fsmomenta);
0075 
0076   };
0077 
0078 }
0079 
0080 #endif