Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef HERWIG_BaryonWidthGenerator_H
0003 #define HERWIG_BaryonWidthGenerator_H
0004 //
0005 // This is the declaration of the BaryonWidthGenerator class.
0006 //
0007 
0008 #include "GenericWidthGenerator.h"
0009 #include "BaryonWidthGenerator.fh"
0010 #include "Herwig/Decay/Baryon/Baryon1MesonDecayerBase.h"
0011 
0012 namespace Herwig {
0013 using namespace ThePEG;
0014 
0015 /** \ingroup PDT
0016  * The BaryonWidthGenerator class is designed to automatically calculate the running
0017  * width for a given particle using information from the decayModes and the 
0018  * Baryon1MesonDecayer to construct the running width.
0019  *
0020  * It inherits from the GenericWidthGenerator.
0021  *
0022  * @see GenericWidthGenerator
0023  * @see GenericMassGenerator
0024  *
0025  */
0026 class BaryonWidthGenerator: public GenericWidthGenerator {
0027 
0028 public:
0029 
0030   /** @name Functions used by the persistent I/O system. */
0031   //@{
0032   /**
0033    * Function used to write out object persistently.
0034    * @param os the persistent output stream written to.
0035    */
0036   void persistentOutput(PersistentOStream & os) const;
0037 
0038   /**
0039    * Function used to read in object persistently.
0040    * @param is the persistent input stream read from.
0041    * @param version the version number of the object when written.
0042    */
0043   void persistentInput(PersistentIStream & is, int version);
0044   //@}
0045 
0046   /**
0047    * The standard Init function used to initialize the interfaces.
0048    * Called exactly once for each class by the class description system
0049    * before the main function starts or
0050    * when this class is dynamically loaded.
0051    */
0052   static void Init();
0053 
0054 public:
0055 
0056   /**
0057    * Output the initialisation info for the database
0058    * @param output The stream to output the information to
0059    * @param header output the header.
0060    **/
0061   virtual void dataBaseOutput(ofstream & output,bool header=true);
0062 
0063 
0064   /**
0065    * The \f$1\to2\f$ width for outgoing particles which can be off-shell.
0066    * @param iloc The location of the mode in the list.
0067    * @param m0 The mass of the decaying particle.
0068    * @param m1 The mass of the first outgoing particle.
0069    * @param m2 The mass of the second outgoing particle.
0070    * @return The partial width.
0071    */
0072   virtual Energy partial2BodyWidth(int iloc,Energy m0,Energy m1,Energy m2) const;
0073 
0074 protected: 
0075 
0076   /**
0077    * Perform the set up for a mode, this is called by the base class
0078    * @param mode The decay mode
0079    * @param decayer The decayer for the mode.
0080    * @param imode The number of the mode.
0081    */
0082   virtual void setupMode(tcDMPtr mode, tDecayIntegratorPtr decayer, unsigned int imode);
0083 
0084 protected:
0085 
0086   /** @name Clone Methods. */
0087   //@{
0088   /**
0089    * Make a simple clone of this object.
0090    * @return a pointer to the new object.
0091    */
0092   virtual IBPtr clone() const {return new_ptr(*this);}
0093 
0094   /** Make a clone of this object, possibly modifying the cloned object
0095    * to make it sane.
0096    * @return a pointer to the new object.
0097    */
0098   virtual IBPtr fullclone() const {return new_ptr(*this);}
0099   //@}
0100 
0101 protected:
0102 
0103   /** @name Standard Interfaced functions. */
0104   //@{
0105 
0106   /**
0107    * Initialize this object after the setup phase before saving and
0108    * EventGenerator to disk.
0109    * @throws InitException if object could not be initialized properly.
0110    */
0111   virtual void doinit();
0112   //@}
0113 
0114 private:
0115 
0116   /**
0117    * The assignment operator is private and must never be called.
0118    * In fact, it should not even be implemented.
0119    */
0120   BaryonWidthGenerator & operator=(const BaryonWidthGenerator &) = delete;
0121 
0122 private:
0123 
0124   /**
0125    *  vector of pointers to the decayers 
0126    */
0127   vector<Baryon1MesonDecayerBasePtr> _baryondecayers;
0128 
0129   /**
0130    * Location of the decay mode in the decayer
0131    */
0132   vector<int> _modeloc;
0133 
0134 };
0135 
0136 }
0137 
0138 #endif /* HERWIG_BaryonWidthGenerator_H */