Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:24:25

0001 // -*- C++ -*-
0002 //
0003 // IFLightKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
0004 // Copyright (C) 2002-2019 The Herwig Collaboration
0005 //
0006 // Herwig 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 HERWIG_IFLightKinematics_H
0010 #define HERWIG_IFLightKinematics_H
0011 //
0012 // This is the declaration of the IFLightKinematics class.
0013 //
0014 
0015 #include "DipoleSplittingKinematics.h"
0016 
0017 namespace Herwig {
0018 
0019 using namespace ThePEG;
0020 
0021 /**
0022  * \ingroup DipoleShower
0023  * \author Simon Platzer
0024  *
0025  * \brief IFLightKinematics implements massless splittings
0026  * off an initial-final dipole.
0027  *
0028  * @see \ref IFLightKinematicsInterfaces "The interfaces"
0029  * defined for IFLightKinematics.
0030  */
0031 class IFLightKinematics: public DipoleSplittingKinematics {
0032 
0033 public:
0034 
0035   /**
0036    * The default constructor.
0037    */
0038   IFLightKinematics();
0039 
0040 public:
0041 
0042   /**
0043    * Return the maximum pt for the given dipole scale.
0044    */
0045   virtual Energy ptMax(Energy dScale, 
0046                double emX, double specX,
0047                const DipoleIndex&,
0048                const DipoleSplittingKernel&) const;
0049 
0050   /**
0051    * Return the maximum virtuality for the given dipole scale.
0052    */
0053   virtual Energy QMax(Energy dScale, 
0054               double emX, double specX,
0055               const DipoleIndex& dIndex,
0056               const DipoleSplittingKernel&) const;
0057 
0058   /**
0059    * Return the pt given a virtuality.
0060    */
0061   virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
0062 
0063   /**
0064    * Return the virtuality given a pt.
0065    */
0066   virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
0067 
0068   /**
0069    * Return the boundaries on the momentum fraction
0070    */
0071   virtual pair<double,double> zBoundaries(Energy pt,
0072                       const DipoleSplittingInfo& dInfo,
0073                       const DipoleSplittingKernel& split) const;
0074 
0075   /**
0076    * Generate splitting variables given three random numbers
0077    * and the momentum fractions of the emitter and spectator.
0078    * Return true on success.
0079    */
0080   virtual bool generateSplitting(double kappa, double xi, double phi,
0081                  DipoleSplittingInfo& dIndex,
0082                  const DipoleSplittingKernel&);
0083 
0084   /**
0085    * Generate the full kinematics given emitter and
0086    * spectator momentum and a previously completeted
0087    * DipoleSplittingInfo object.
0088    */
0089   virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
0090                   const Lorentz5Momentum& pSpectator,
0091                   const DipoleSplittingInfo& dInfo);
0092 
0093 public:
0094 
0095   /** @name Functions used by the persistent I/O system. */
0096   //@{
0097   /**
0098    * Function used to write out object persistently.
0099    * @param os the persistent output stream written to.
0100    */
0101   void persistentOutput(PersistentOStream & os) const;
0102 
0103   /**
0104    * Function used to read in object persistently.
0105    * @param is the persistent input stream read from.
0106    * @param version the version number of the object when written.
0107    */
0108   void persistentInput(PersistentIStream & is, int version);
0109   //@}
0110 
0111   /**
0112    * The standard Init function used to initialize the interfaces.
0113    * Called exactly once for each class by the class description system
0114    * before the main function starts or
0115    * when this class is dynamically loaded.
0116    */
0117   static void Init();
0118 
0119 protected:
0120 
0121   /** @name Clone Methods. */
0122   //@{
0123   /**
0124    * Make a simple clone of this object.
0125    * @return a pointer to the new object.
0126    */
0127   virtual IBPtr clone() const;
0128 
0129   /** Make a clone of this object, possibly modifying the cloned object
0130    * to make it sane.
0131    * @return a pointer to the new object.
0132    */
0133   virtual IBPtr fullclone() const;
0134   //@}
0135 
0136 
0137 // If needed, insert declarations of virtual function defined in the
0138 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0139 
0140 
0141 private:
0142 
0143   /**
0144    * The static object used to initialize the description of this class.
0145    * Indicates that this is a concrete class with persistent data.
0146    */
0147   static ClassDescription<IFLightKinematics> initIFLightKinematics;
0148 
0149   /**
0150    * The assignment operator is private and must never be called.
0151    * In fact, it should not even be implemented.
0152    */
0153   IFLightKinematics & operator=(const IFLightKinematics &) = delete;
0154 
0155 private:
0156 
0157   /**
0158    * Wether or not to choose the `collinear' scheme
0159    */
0160   bool theCollinearScheme;
0161 
0162 };
0163 
0164 }
0165 
0166 #include "ThePEG/Utilities/ClassTraits.h"
0167 
0168 namespace ThePEG {
0169 
0170 /** @cond TRAITSPECIALIZATIONS */
0171 
0172 /** This template specialization informs ThePEG about the
0173  *  base classes of IFLightKinematics. */
0174 template <>
0175 struct BaseClassTrait<Herwig::IFLightKinematics,1> {
0176   /** Typedef of the first base class of IFLightKinematics. */
0177   typedef Herwig::DipoleSplittingKinematics NthBase;
0178 };
0179 
0180 /** This template specialization informs ThePEG about the name of
0181  *  the IFLightKinematics class and the shared object where it is defined. */
0182 template <>
0183 struct ClassTraits<Herwig::IFLightKinematics>
0184   : public ClassTraitsBase<Herwig::IFLightKinematics> {
0185   /** Return a platform-independent class name */
0186   static string className() { return "Herwig::IFLightKinematics"; }
0187   /**
0188    * The name of a file containing the dynamic library where the class
0189    * IFLightKinematics is implemented. It may also include several, space-separated,
0190    * libraries if the class IFLightKinematics depends on other classes (base classes
0191    * excepted). In this case the listed libraries will be dynamically
0192    * linked in the order they are specified.
0193    */
0194   static string library() { return "HwDipoleShower.so"; }
0195 };
0196 
0197 /** @endcond */
0198 
0199 }
0200 
0201 #endif /* HERWIG_IFLightKinematics_H */