Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // ScalarScalarScalarDecayer.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_ScalarScalarScalarDecayer_H
0010 #define HERWIG_ScalarScalarScalarDecayer_H
0011 // This is the declaration of the ScalarScalarScalarDecayer class.
0012 
0013 #include "Herwig/Decay/DecayIntegrator.h"
0014 #include "Herwig/Decay/PhaseSpaceMode.h"
0015 
0016 namespace Herwig {
0017 using namespace ThePEG;
0018 
0019 /** \ingroup Decay
0020  *
0021  *  The <code>ScalarScalarScalarDecayer</code> class is designed for the decay
0022  *  of a scalar meson to two scalar mesons. This decay is obviously trival,
0023  *  however this decayer allows us to include off-shell effects for the outgoing
0024  *  particles and the correct calculation of the running width for the incoming
0025  *  particle.
0026  *
0027  *  The matrix element is taken to b
0028  *  \f[\mathcal{M} = g \f].
0029  *
0030  * The same Lorentz structure also applies and is used for Scalar to two PseudoScalars, and PseudoScalar to Scalar PseudoScalar decays.
0031  * @see DecayIntegrator
0032  * 
0033  * \author Peter Richardson
0034  *
0035  */
0036 class ScalarScalarScalarDecayer: public DecayIntegrator {
0037 
0038 public:
0039   
0040   /**
0041    * Which of the possible decays is required
0042    * @param cc Is this mode the charge conjugate
0043    * @param parent The decaying particle
0044    * @param children The decay products
0045    */
0046   virtual int modeNumber(bool & cc, tcPDPtr parent, 
0047              const tPDVector & children) const;
0048 
0049   /**
0050    * Return the matrix element squared for a given mode and phase-space channel.
0051    * @param ichan The channel we are calculating the matrix element for. 
0052    * @param part The decaying Particle.
0053    * @param outgoing The particles produced in the decay
0054    * @param momenta  The momenta of the particles produced in the decay
0055    * @param meopt Option for the calculation of the matrix element
0056    * @return The matrix element squared for the phase-space configuration.
0057    */
0058   double me2(const int ichan,const Particle & part,
0059          const tPDVector & outgoing,
0060          const vector<Lorentz5Momentum> & momenta,
0061          MEOption meopt) const;
0062 
0063   /**
0064    *   Construct the SpinInfos for the particles produced in the decay
0065    */
0066   virtual void constructSpinInfo(const Particle & part,
0067                  ParticleVector outgoing) const;
0068 
0069   /**
0070    * Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
0071    * @param dm The DecayMode
0072    * @param mecode The code for the matrix element as described
0073    *               in the GenericWidthGenerator class, in this case 6.
0074    * @param coupling The coupling for the matrix element.
0075    * @return True or False if this mode can be handled.
0076    */
0077   bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
0078 
0079   /**
0080    * Output the setup information for the particle database
0081    * @param os The stream to output the information to
0082    * @param header Whether or not to output the information for MySQL
0083    */
0084   virtual void dataBaseOutput(ofstream & os,bool header) const;
0085 
0086 public:
0087 
0088   /** @name Functions used by the persistent I/O system. */
0089   //@{
0090   /**
0091    * Function used to write out object persistently.
0092    * @param os the persistent output stream written to.
0093    */
0094   void persistentOutput(PersistentOStream & os) const;
0095 
0096   /**
0097    * Function used to read in object persistently.
0098    * @param is the persistent input stream read from.
0099    * @param version the version number of the object when written.
0100    */
0101   void persistentInput(PersistentIStream & is, int version);
0102   //@}
0103 
0104   /**
0105    * Standard Init function used to initialize the interfaces.
0106    */
0107   static void Init();
0108 
0109 protected:
0110 
0111   /** @name Clone Methods. */
0112   //@{
0113   /**
0114    * Make a simple clone of this object.
0115    * @return a pointer to the new object.
0116    */
0117   virtual IBPtr clone() const {return new_ptr(*this);}
0118 
0119   /** Make a clone of this object, possibly modifying the cloned object
0120    * to make it sane.
0121    * @return a pointer to the new object.
0122    */
0123   virtual IBPtr fullclone() const {return new_ptr(*this);}
0124   //@}
0125   
0126 protected:
0127   
0128   /** @name Standard Interfaced functions. */
0129   //@{
0130   /**
0131    * Initialize this object after the setup phase before saving and
0132    * EventGenerator to disk.
0133    * @throws InitException if object could not be initialized properly.
0134    */
0135   virtual void doinit();
0136 
0137   /**
0138    * Initialize this object to the begining of the run phase.
0139    */
0140   virtual void doinitrun();
0141   //@}
0142 
0143 private:
0144 
0145   /**
0146    * Private and non-existent assignment operator.
0147    */
0148   ScalarScalarScalarDecayer & operator=(const ScalarScalarScalarDecayer &) = delete;
0149 
0150 public:
0151 
0152   /**
0153    *   Set the parameters for a decay mode
0154    */
0155   string setUpDecayMode(string arg);
0156 
0157 private:
0158 
0159   /**
0160    * the PDG code for the incoming particle
0161    */
0162   vector<int> incoming_;
0163 
0164   /**
0165    * the PDG codes for the outgoing particles
0166    */
0167   vector<pair<int,int> > outgoing_;
0168 
0169   /**
0170    * the coupling for the decay
0171    */
0172   vector<Energy> coupling_;
0173 
0174   /**
0175    * the maximum weight for the decay
0176    */
0177   vector<double> maxWeight_;
0178 
0179   /**
0180    *  Spin density matrix
0181    */
0182   mutable RhoDMatrix rho_;
0183 };
0184 
0185 }
0186 
0187 #endif /* HERWIG_ScalarScalarScalarDecayer_H */