Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:22

0001 // -*- C++ -*-
0002 //
0003 // FixedCMSLuminosity.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef ThePEG_FixedCMSLuminosity_H
0010 #define ThePEG_FixedCMSLuminosity_H
0011 // This is the declaration of the FixedCMSLuminosity class.
0012 
0013 #include "LuminosityFunction.h"
0014 
0015 namespace ThePEG {
0016 
0017 /**
0018  * The FixedCMSLuminosity class describes an experiment with incoming
0019  * particles colliding with precicely defined and opposite momenta. It
0020  * is derived from the LuminosityFunction base class.
0021  *
0022  * \deprecated As the LuminosityFunction base class has increased
0023  * functionality (exceeding the functionality of this class) the use
0024  * of FixedCMSLuminosity is deprecated, and the class will be removed
0025  * in a future release. Note also that by setting the individual beam
0026  * energies in the base class, the behavior of this object may be
0027  * inconsistent, in that the collision will not, as specified, be in
0028  * the center-of-mass system.
0029  *
0030  * @see \ref FixedCMSLuminosityInterfaces "The interfaces"
0031  * defined for FixedCMSLuminosity.
0032  */
0033 class FixedCMSLuminosity: public LuminosityFunction {
0034 
0035 public:
0036 
0037   /** @name Standard constructors and destructors. */
0038   //@{
0039   /**
0040    * Destructor.
0041    */
0042   virtual ~FixedCMSLuminosity();
0043   //@}
0044 
0045 public:
0046 
0047   /**
0048    * The total energy in the cms of the incoming particles.
0049    */
0050   Energy energy() const { return maximumCMEnergy(); }
0051 
0052 public:
0053 
0054   /**
0055    * Standard Init function used to initialize the interface.
0056    */
0057   static void Init();
0058 
0059 protected:
0060 
0061   /** @name Clone Methods. */
0062   //@{
0063   /**
0064    * Make a simple clone of this object.
0065    * @return a pointer to the new object.
0066    */
0067   virtual IBPtr clone() const;
0068 
0069   /** Make a clone of this object, possibly modifying the cloned object
0070    * to make it sane.
0071    * @return a pointer to the new object.
0072    */
0073   virtual IBPtr fullclone() const;
0074   //@}
0075 
0076 private:
0077 
0078   /**
0079    * Utility function used by the interface.
0080    */
0081   void setEnergy(Energy);
0082 
0083   /**
0084    * Utility function used by the interface.
0085    */
0086   Energy getEnergy() const;
0087 
0088 private:
0089 
0090   /**
0091    * Describe a concrete class with persistent data.
0092    */
0093   static NoPIOClassDescription<FixedCMSLuminosity> initFixedCMSLuminosity;
0094 
0095   /**
0096    *  Private and non-existent assignment operator.
0097    */
0098   FixedCMSLuminosity & operator=(const FixedCMSLuminosity &) = delete;
0099 
0100 };
0101 
0102 /** @cond TRAITSPECIALIZATIONS */
0103 
0104 /**
0105  * This template specialization informs ThePEG about the
0106  * base class of FixedCMSLuminosity.
0107  */
0108 template <>
0109 struct BaseClassTrait<FixedCMSLuminosity,1>: public ClassTraitsType {
0110   /** Typedef of the base class of FixedCMSLuminosity. */
0111   typedef LuminosityFunction NthBase;
0112 };
0113 
0114 /**
0115  * This template specialization informs ThePEG about the name of the
0116  * FixedCMSLuminosity class and the shared object where it is defined.
0117  */
0118 template <>
0119 struct ClassTraits<FixedCMSLuminosity>:
0120     public ClassTraitsBase<FixedCMSLuminosity> {
0121   /** Return the class name. */
0122   static string className() { return "ThePEG::FixedCMSLuminosity"; }
0123   /** Return the name of the shared library be loaded to get access to
0124    *  the FixedCMSLuminosity class and every other class it uses
0125    *  (except the base class). */
0126   static string library() { return "FixedCMSLuminosity.so"; }
0127 };
0128 
0129 /** @endcond */
0130 
0131 }
0132 
0133 #endif /* ThePEG_FixedCMSLuminosity_H */