Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // ScalarMesonCurrent.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_ScalarMesonCurrent_H
0010 #define HERWIG_ScalarMesonCurrent_H
0011 // This is the declaration of the ScalarMesonCurrent class.
0012 
0013 #include "WeakCurrent.h"
0014 
0015 namespace Herwig {
0016 using namespace ThePEG;
0017 
0018 /** \ingroup Decay
0019  *
0020  * The weak current for the production of one (pseudo)-scalar meson.
0021  *
0022  *  In this case the current is given by
0023  *  \f[J^\mu = f_Pp_P^\mu,\f]
0024  *  where
0025  * - \f$f_P\f$ is the decay constant for the meson,
0026  * - \f$p_P\f$ is the momentum of the meson.
0027  *
0028  *  The outgoing mesons and their decay constants can be specified using the
0029  *  interfaces.
0030  *
0031  * @see WeakCurrent.
0032  * 
0033  */
0034 class ScalarMesonCurrent: public WeakCurrent {
0035 
0036 public:
0037 
0038   /**
0039    * Default constructor
0040    */
0041   ScalarMesonCurrent();
0042 
0043 public:
0044 
0045   /** @name Functions used by the persistent I/O system. */
0046   //@{
0047   /**
0048    * Function used to write out object persistently.
0049    * @param os the persistent output stream written to.
0050    */
0051   void persistentOutput(PersistentOStream & os) const;
0052 
0053   /**
0054    * Function used to read in object persistently.
0055    * @param is the persistent input stream read from.
0056    * @param version the version number of the object when written.
0057    */
0058   void persistentInput(PersistentIStream & is, int version);
0059   //@}
0060 
0061   /**
0062    * Standard Init function used to initialize the interfaces.
0063    */
0064   static void Init();
0065 
0066 public:
0067 
0068   /** @name Methods for the construction of the phase space integrator. */
0069   //@{
0070   /**
0071    * Complete the construction of the decay mode for integration.classes inheriting
0072    * from this one.
0073    * This method is purely virtual and must be implemented in the classes inheriting
0074    * from WeakCurrent.
0075    * @param icharge   The total charge of the outgoing particles in the current.
0076    * @param resonance If specified only include terms with this particle
0077    * @param flavour Information on the required flavours of the quarks
0078    * @param imode     The mode in the current being asked for.
0079    * @param mode      The phase space mode for the integration
0080    * @param iloc      The location of the of the first particle from the current in
0081    *                  the list of outgoing particles.
0082    * @param ires      The location of the first intermediate for the current.
0083    * @param phase     The prototype phase space channel for the integration.
0084    * @param upp       The maximum possible mass the particles in the current are
0085    *                  allowed to have.
0086    * @return Whether the current was sucessfully constructed.
0087    */
0088   virtual bool createMode(int icharge, tcPDPtr resonance,
0089               FlavourInfo flavour,
0090               unsigned int imode,PhaseSpaceModePtr mode,
0091               unsigned int iloc,int ires,
0092               PhaseSpaceChannel phase, Energy upp );
0093 
0094   /**
0095    * The particles produced by the current. This just returns the pseudoscalar
0096    * meson.
0097    * @param icharge The total charge of the particles in the current.
0098    * @param imode The mode for which the particles are being requested
0099    * @param iq The PDG code for the quark
0100    * @param ia The PDG code for the antiquark
0101    * @return The external particles for the current.
0102    */
0103   virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
0104   //@}
0105   
0106   /**
0107    * Hadronic current. This method is purely virtual and must be implemented in
0108    * all classes inheriting from this one.
0109    * @param resonance If specified only include terms with this particle
0110    * @param flavour Information on the required flavours of the quarks
0111    * @param imode The mode
0112    * @param ichan The phase-space channel the current is needed for.
0113    * @param scale The invariant mass of the particles in the current.
0114    * @param outgoing The particles produced in the decay
0115    * @param momenta  The momenta of the particles produced in the decay
0116    * @param meopt Option for the calculation of the matrix element
0117    * @return The current. 
0118    */
0119   virtual vector<LorentzPolarizationVectorE> 
0120   current(tcPDPtr resonance,
0121       FlavourInfo flavour,
0122       const int imode, const int ichan,Energy & scale,
0123       const tPDVector & outgoing,
0124       const vector<Lorentz5Momentum> & momenta,
0125       DecayIntegrator::MEOption meopt) const;
0126 
0127   /**
0128    * Accept the decay. Checks the meson against the list
0129    * @param id The id's of the particles in the current.
0130    * @return Can this current have the external particles specified.
0131    */
0132   virtual bool accept(vector<int> id);
0133 
0134   /**
0135    * Return the decay mode number for a given set of particles in the current. 
0136    * Checks the meson against the list
0137    * @param id The id's of the particles in the current.
0138    * @return The number of the mode
0139    */
0140   virtual unsigned int decayMode(vector<int> id);
0141 
0142   /**
0143    * Output the setup information for the particle database
0144    * @param os The stream to output the information to
0145    * @param header Whether or not to output the information for MySQL
0146    * @param create Whether or not to add a statement creating the object
0147    */
0148   virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
0149 
0150 protected:
0151 
0152   /** @name Clone Methods. */
0153   //@{
0154   /**
0155    * Make a simple clone of this object.
0156    * @return a pointer to the new object.
0157    */
0158   virtual IBPtr clone() const {return new_ptr(*this);}
0159 
0160   /** Make a clone of this object, possibly modifying the cloned object
0161    * to make it sane.
0162    * @return a pointer to the new object.
0163    */
0164   virtual IBPtr fullclone() const {return new_ptr(*this);}
0165   //@}
0166   
0167 protected:
0168 
0169   /** @name Standard Interfaced functions. */
0170   //@{
0171   /**
0172    * Initialize this object after the setup phase before saving and
0173    * EventGenerator to disk.
0174    * @throws InitException if object could not be initialized properly.
0175    */
0176   virtual void doinit();
0177   //@}
0178 
0179 private:
0180 
0181   /**
0182    * Private and non-existent assignment operator.
0183    */
0184   ScalarMesonCurrent & operator=(const ScalarMesonCurrent &) = delete;
0185 
0186 private:
0187 
0188   /**
0189    * the pdg code for the meson
0190    */
0191   vector<long> _id;
0192 
0193   /**
0194    * the decay constant
0195    */
0196   vector<Energy> _decay_constant;
0197 
0198   /**
0199    * The \f$\eta-\eta'\f$ mixing angle 
0200    */
0201   double _thetaeta;
0202 
0203   /**
0204    * The inital size of the arrays
0205    */
0206   unsigned int _initsize;
0207 
0208 };
0209 
0210 }
0211 
0212 
0213 #endif /* HERWIG_ScalarMesonCurrent_H */