Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // Onium3GDecayer.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_Onium3GDecayer_H
0010 #define THEPEG_Onium3GDecayer_H
0011 // This is the declaration of the Onium3GDecayer class.
0012 
0013 #include "ThePEG/PDT/FlatDecayer.h"
0014 
0015 namespace ThePEG {
0016 
0017 /**
0018  * The Onium3GDecayer class inherits from performs FlatDecayer and
0019  * will reweight the flat phase space suitable to describe the decay
0020  * of a spin-1 onium resonance into three gluons or two gluons and a
0021  * photon. After the decay the collision handler is instructed to
0022  * restart the generation from the hadronization (or optionally the
0023  * parton cascade) stage.
0024  *
0025  * @see \ref Onium3GDecayerInterfaces "The interfaces"
0026  * defined for Onium3GDecayer.
0027  * @see FlatDecayer
0028  * @see ParticleData
0029  */
0030 class Onium3GDecayer: public FlatDecayer {
0031 
0032 public:
0033 
0034   /**
0035    * Default constructor.
0036    */
0037   Onium3GDecayer() : doShower(true), theMinGGMass(2.0*GeV) {}
0038 
0039 public:
0040 
0041   /** @name Virtual functions required by the Decayer class.
0042    */
0043   //@{
0044   /**
0045    * Check if this decayer can perfom the decay specified by the
0046    * given decay mode.
0047    * @param dm the DecayMode describing the decay.
0048    * @return true if this decayer can handle the given mode, otherwise false.
0049    */
0050   virtual bool accept(const DecayMode & dm) const;
0051 
0052   /**
0053    * Perform a decay for a given DecayMode and a given Particle instance.
0054    * @param dm the DecayMode describing the decay.
0055    * @param p the Particle instance to be decayed.
0056    * @return a ParticleVector containing the decay products.
0057    */
0058   virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
0059 
0060   /**
0061    * Give a weight to a phase space point. To be overridden by
0062    * subclasses. For a given decay mode, \a dm, decaying \a parent
0063    * particle and decayproducts, \a children, distributed according to
0064    * a flat distribution in phase space, return a weight (less or
0065    * equal to unity) modifying the flat distribution to the desired
0066    * one. Note that the chosen phase space point may be rejected, but
0067    * the chosen decay channel will not. This means that the weight
0068    * returned by this function does not influence the branching
0069    * ratios.
0070    */
0071   virtual double reweight(const DecayMode & dm, const Particle & parent,
0072                  const ParticleVector & children) const;
0073   //@}
0074 
0075   /**
0076    * Return true if the produced gluons should be showered.
0077    */
0078   bool shower() const { return doShower; }
0079 
0080   /**
0081    * Return the minimum invariant mass between two gluons in gamma-g-g
0082    * decays.
0083    */
0084   Energy minGGMass() const { return theMinGGMass; }
0085 
0086 public:
0087 
0088 
0089   /** @name Functions used by the persistent I/O system. */
0090   //@{
0091   /**
0092    * Function used to write out object persistently.
0093    * @param os the persistent output stream written to.
0094    */
0095   void persistentOutput(PersistentOStream & os) const;
0096 
0097   /**
0098    * Function used to read in object persistently.
0099    * @param is the persistent input stream read from.
0100    * @param version the version number of the object when written.
0101    */
0102   void persistentInput(PersistentIStream & is, int version);
0103   //@}
0104 
0105   /**
0106    * Standard Init function used to initialize the interfaces.
0107    */
0108   static void Init();
0109 
0110 protected:
0111 
0112   /** @name Clone Methods. */
0113   //@{
0114   /**
0115    * Make a simple clone of this object.
0116    * @return a pointer to the new object.
0117    */
0118   virtual IBPtr clone() const;
0119 
0120   /** Make a clone of this object, possibly modifying the cloned object
0121    * to make it sane.
0122    * @return a pointer to the new object.
0123    */
0124   virtual IBPtr fullclone() const;
0125   //@}
0126 
0127 private:
0128 
0129   /**
0130    * If true the produced gluons should be showered.
0131    */
0132   bool doShower;
0133 
0134   /**
0135    * The minimum invariant mass between two gluons in gamma-g-g
0136    * decays.
0137    */
0138   Energy theMinGGMass;
0139 
0140 private:
0141 
0142   /**
0143    * Describe a concrete class with persistent data.
0144    */
0145   static ClassDescription<Onium3GDecayer> initOnium3GDecayer;
0146 
0147   /**
0148    * Private and non-existent assignment operator.
0149    */
0150   Onium3GDecayer & operator=(const Onium3GDecayer &) = delete;
0151 
0152 };
0153 
0154 }
0155 
0156 
0157 namespace ThePEG {
0158 
0159 /** @cond TRAITSPECIALIZATIONS */
0160 
0161 /** This template specialization informs ThePEG about the base classes
0162  *  of Onium3GDecayer. */
0163 template <>
0164 struct BaseClassTrait<Onium3GDecayer,1>: public ClassTraitsType {
0165   /** Typedef of the first base class of Onium3GDecayer. */
0166   typedef FlatDecayer NthBase;
0167 };
0168 
0169 /** This template specialization informs ThePEG about the name of the
0170  *  Onium3GDecayer class and the shared object where it is
0171  *  defined. */
0172 template <>
0173 struct ClassTraits<Onium3GDecayer>
0174   : public ClassTraitsBase<Onium3GDecayer> {
0175   /** Return a platform-independent class name */
0176   static string className() { return "ThePEG::Onium3GDecayer"; }
0177   /** Return the name of the shared library be loaded to get access to
0178    *  the Onium3GDecayer class and every other class it uses
0179    *  (except the base class). */
0180   static string library() { return "Onium3GDecayer.so"; }
0181 };
0182 
0183 /** @endcond */
0184 
0185 }
0186 
0187 #endif /* THEPEG_Onium3GDecayer_H */