Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // ZGenerator.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_ZGenerator_H
0010 #define ThePEG_ZGenerator_H
0011 // This is the declaration of the ZGenerator class.
0012 
0013 #include "ThePEG/Config/ThePEG.h"
0014 #include "ThePEG/Handlers/HandlerBase.h"
0015 
0016 namespace ThePEG {
0017 
0018 /**
0019  * ZGenerator is the base class for all classes implementing models to
0020  * generate the momentum fraction, \f$z\f$, taken by hadrons produced in a
0021  * hadronization scenario.
0022  * 
0023  * It inherits from <code>HandlerBase</code> class which among other
0024  * things provides forward access to the random number generator of
0025  * the EventGenerator class.
0026  * 
0027  * @see \ref ZGeneratorInterfaces "The interfaces"
0028  * defined for ZGenerator.
0029  * @see HandlerBase
0030  * @see EventGenerator
0031  */
0032 class ZGenerator: public HandlerBase {
0033 
0034 public:
0035 
0036   /** @name Virtual functions mandated by the ZGenerator base class. */
0037   //@{
0038   /**
0039    * Return the momentum fraction. Assume that an initial
0040    * (anti-)(di-)quark \a q1 produces a hadron and leaves behind
0041    * another (anti-)(di-)quark \a q2. The hadron is assumed to have a
0042    * squared transverse mass, \a mT2, w.r.t. the initial quark
0043    * direction.
0044    * @return the energy fraction.
0045    */
0046   virtual double generate(cPDPtr q1, cPDPtr q2, Energy2 mT2 ) const =0;
0047   //@}
0048 
0049   /**
0050    * Standard Init function used to initialize the interface.
0051    */
0052   static void Init();
0053 
0054 
0055 private:
0056 
0057   /**
0058    * Describe an abstract class without persistent data.
0059    */
0060   static AbstractClassDescription<ZGenerator> initZGenerator;
0061 
0062 };
0063 
0064 
0065 /** @cond TRAITSPECIALIZATIONS */
0066 
0067 /**
0068  * This template specialization informs ThePEG about the base class of
0069  * ZGenerator.
0070  */
0071 template <>
0072 struct BaseClassTrait<ZGenerator,1>: public ClassTraitsType {
0073   /** Typedef of the base class of ZGenerator. */
0074   typedef HandlerBase NthBase;
0075 };
0076 
0077 /**
0078  * This template specialization informs ThePEG about the name of the
0079  * ZGenerator class.
0080  */
0081 template <>
0082 struct ClassTraits<ZGenerator>: public ClassTraitsBase<ZGenerator> {
0083   /** Return the class name.  */
0084   static string className() { return "ThePEG::ZGenerator"; }
0085 };
0086   
0087 /** @endcond */
0088 
0089 }
0090 
0091 #endif /* ThePEG_ZGenerator_H */