Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // SimpleZGenerator.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_SimpleZGenerator_H
0010 #define THEPEG_SimpleZGenerator_H
0011 // This is the declaration of the SimpleZGenerator class.
0012 
0013 #include "ThePEG/Handlers/ZGenerator.h"
0014 
0015 namespace ThePEG {
0016 
0017 /**
0018  * SimpleZGenerator is a very simple concrete subclass of
0019  * ZGenerator. It implements a naive unphysical model to generate the
0020  * momentum fraction, \f$z\f$, taken by hadrons produced in a hadronization
0021  * scenario. It should only be used for testing purposes.
0022  *
0023  * @see \ref SimpleZGeneratorInterfaces "The interfaces"
0024  * defined for SimpleZGenerator.
0025  */
0026 class SimpleZGenerator: public ZGenerator {
0027 
0028 public:
0029 
0030   /** @name Standard constructors and destructors. */
0031   //@{
0032   /**
0033    * Destructor.
0034    */
0035   virtual ~SimpleZGenerator();
0036   //@}
0037 
0038 public:
0039 
0040   /** @name Virtual functions mandated by the ZGenerator base class. */
0041   //@{
0042   /**
0043    * Return the momentum fraction. Assume that an initial
0044    * (anti-)(di-)quark \a q1 produces a hadron and leaves behind
0045    * another (anti-)(di-)quark \a q2. The hadron is assumed to have a
0046    * squared transverse mass, \a mT2, w.r.t. the initial quark
0047    * direction.
0048    * @return the energy fraction distributed as \f$\sqrt{z}\f$ (or
0049    * \f$1-\sqrt{z}\f$) if \a q1 (or \a q2) is a diquark. Otherwise a
0050    * flat distribution is used.
0051    */
0052   virtual double generate(cPDPtr q1, cPDPtr q2, Energy2 mT2 ) const;
0053   //@}
0054  
0055 public:
0056 
0057   /** @name Functions used by the persistent I/O system. */
0058   //@{
0059   /**
0060    * Function used to write out object persistently.
0061    * @param os the persistent output stream written to.
0062    */
0063   void persistentOutput(PersistentOStream & os) const;
0064 
0065   /**
0066    * Function used to read in object persistently.
0067    * @param is the persistent input stream read from.
0068    * @param version the version number of the object when written.
0069    */
0070   void persistentInput(PersistentIStream & is, int version);
0071   //@}
0072 
0073   /**
0074    * Standard Init function used to initialize the interfaces.
0075    */
0076   static void Init();
0077 
0078 protected:
0079 
0080   /** @name Clone Methods. */
0081   //@{
0082   /**
0083    * Make a simple clone of this object.
0084    * @return a pointer to the new object.
0085    */
0086   virtual IBPtr clone() const;
0087 
0088   /** Make a clone of this object, possibly modifying the cloned object
0089    * to make it sane.
0090    * @return a pointer to the new object.
0091    */
0092   virtual IBPtr fullclone() const;
0093   //@}
0094 
0095 private:
0096 
0097   /**
0098    * Describe a concrete class with persistent data.
0099    */
0100   static ClassDescription<SimpleZGenerator> initSimpleZGenerator;
0101 
0102   /**
0103    * Private and non-existent assignment operator.
0104    */
0105   SimpleZGenerator & operator=(const SimpleZGenerator &) = delete;
0106 
0107 };
0108 
0109 }
0110 
0111 
0112 #include "ThePEG/Utilities/ClassTraits.h"
0113 
0114 namespace ThePEG {
0115 
0116 /** @cond TRAITSPECIALIZATIONS */
0117 
0118 /**
0119  * This template specialization informs ThePEG about the base class of
0120  * SimpleZGenerator.
0121  */
0122 template <>
0123 struct BaseClassTrait<SimpleZGenerator,1>: public ClassTraitsType {
0124   /** Typedef of the base class of SimpleZGenerator. */
0125   typedef ZGenerator NthBase;
0126 };
0127 
0128 /**
0129  * This template specialization informs ThePEG about the name of the
0130  * SimpleZGenerator class and the shared object where it is defined.
0131  */
0132 template <>
0133 struct ClassTraits<SimpleZGenerator>
0134   : public ClassTraitsBase<SimpleZGenerator> {
0135   /** Return the class name.  */
0136   static string className() { return "ThePEG::SimpleZGenerator"; }
0137   /**
0138    * Return the name of the shared library to be loaded to get access
0139    * to the SimpleZGenerator class and every other class it uses
0140    * (except the base class).
0141    */
0142   static string library() { return "SimpleZGenerator.so"; }
0143 
0144 };
0145 
0146 /** @endcond */
0147 
0148 }
0149 
0150 #endif /* THEPEG_SimpleZGenerator_H */