Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef Herwig_KMatrix_H
0003 #define Herwig_KMatrix_H
0004 //
0005 // This is the declaration of the KMatrix class.
0006 //
0007 
0008 #include "ThePEG/Interface/Interfaced.h"
0009 #include "Herwig/Decay/IsoSpin.h"
0010 #include "KMatrix.fh"
0011 #include <boost/numeric/ublas/matrix.hpp>
0012 #include "Herwig/Utilities/Interpolator.h"
0013 
0014 namespace Herwig {
0015 namespace ublas = boost::numeric::ublas;
0016 using namespace ThePEG;
0017 
0018 /**
0019  * The KMatrix class is a base class for the implementation of
0020  * K-matrix parameterizations in Herwig
0021  *
0022  * @see \ref KMatrixInterfaces "The interfaces"
0023  * defined for KMatrix.
0024  */
0025 class KMatrix: public Interfaced {
0026 
0027 public:
0028   
0029   /**
0030    * Enum for the possible channels
0031    */
0032   enum Channels { PiPi, KPi, KEta, KEtaPrime, KK, EtaEta,EtaEtaPrime,FourPi};
0033 
0034 public:
0035 
0036   /**
0037    * The default constructor.
0038    */
0039   KMatrix(FlavourInfo flavour=FlavourInfo(),
0040       vector<Channels> channels=vector<Channels>(),
0041       vector<Energy2> poles=vector<Energy2>(),
0042       vector<vector<Energy> > g=vector<vector<Energy> >());
0043 
0044   /**
0045    *   The quantum numbers of the K-matrix
0046    */
0047   FlavourInfo flavourInfo() const {
0048     return flavour_;
0049   };
0050 
0051   /**
0052    * Compute the K-matrix for a given scale
0053    * @param s The scale
0054    * @param Whether or not to multiply by \f$\prod_i(1-s/m^2_i)\f$ to regularise the poles
0055    */
0056   virtual ublas::matrix<double> K(Energy2 s, bool multiplyByPoles=false) const = 0;
0057 
0058   /**
0059    *   The \f$\rho\f$ matrix
0060    */
0061   virtual ublas::matrix<Complex> rho(Energy2 s) const;
0062   
0063   /**
0064    *  Vector containing the locations of the poles
0065    */
0066   const vector<Energy2> & poles() const {return poles_;}
0067 
0068   /**
0069    *  Access the couplings of the poles
0070    */
0071   const vector<vector<Energy> > & poleCouplings() const {return g_;}
0072 
0073   /**
0074    * Compute the amplitdes given the \f$P\f$-vector
0075    * @param Whether or not to multiply by \f$\prod_i(1-s/m^2_i)\f$ to regularise the poles
0076    */
0077   virtual ublas::vector<Complex>
0078   amplitudes(Energy2 s, ublas::vector<Complex> pVector,
0079          bool multiplyByPoles=false) const;
0080 
0081   /**
0082    *  The number of channels
0083    */
0084   unsigned int numberOfChannels() {return channels_.size();}
0085 
0086   /**
0087    *   Set the couplings
0088    */
0089   string setCouplings(string arg);
0090 
0091   /**
0092    *   Set the pole values
0093    */
0094   string setPoles(string arg);
0095   
0096 public:
0097 
0098   /** @name Functions used by the persistent I/O system. */
0099   //@{
0100   /**
0101    * Function used to write out object persistently.
0102    * @param os the persistent output stream written to.
0103    */
0104   void persistentOutput(PersistentOStream & os) const;
0105 
0106   /**
0107    * Function used to read in object persistently.
0108    * @param is the persistent input stream read from.
0109    * @param version the version number of the object when written.
0110    */
0111   void persistentInput(PersistentIStream & is, int version);
0112   //@}
0113 
0114   /**
0115    * The standard Init function used to initialize the interfaces.
0116    * Called exactly once for each class by the class description system
0117    * before the main function starts or
0118    * when this class is dynamically loaded.
0119    */
0120   static void Init();
0121 
0122 protected:
0123 
0124   /** @name Standard Interfaced functions. */
0125   //@{
0126   /**
0127    * Initialize this object after the setup phase before saving an
0128    * EventGenerator to disk.
0129    * @throws InitException if object could not be initialized properly.
0130    */
0131   virtual void doinit();
0132   //@}
0133 
0134 private:
0135 
0136   /**
0137    * The assignment operator is private and must never be called.
0138    * In fact, it should not even be implemented.
0139    */
0140   KMatrix & operator=(const KMatrix &) = delete;
0141 
0142 private:
0143 
0144   /**
0145    *   The quantum numbers for the K-matrix
0146    */
0147   FlavourInfo flavour_;
0148   
0149   /**
0150    *   The mesons in the various channels
0151    */
0152   vector<Channels> channels_;
0153 
0154   /**
0155    *  The positions of the poles
0156    */
0157   vector<Energy2> poles_;
0158 
0159   /**
0160    *  Couplings for the resonances
0161    */
0162   vector<vector<Energy> > g_;
0163 
0164 private:
0165 
0166   /**
0167    *  Common masses for the \f$\rho\f$ matrix
0168    */
0169   //@{
0170   /**
0171    *   The charged pion mass
0172    */
0173   Energy mPiPlus_;
0174 
0175   /**
0176    *   The neutral pion mass
0177    */
0178   Energy mPi0_;
0179 
0180   /**
0181    *   The charged kaon mass
0182    */
0183   Energy mKPlus_;
0184 
0185   /**
0186    *   The neutral kaon mass
0187    */
0188   Energy mK0_;
0189 
0190   /**
0191    *  The \f$\eta\f$ mass
0192    */
0193   Energy mEta_;
0194 
0195   /**
0196    *  The \f$\eta^\prime\f$ mass
0197    */
0198   Energy mEtaPrime_;
0199   //@}
0200 
0201   /**
0202    *  Parameters for the four piojn phase space
0203    */
0204   //@{
0205   /**
0206    *  Initialize the table
0207    */
0208   bool initTable_;
0209   
0210   /**
0211    *   Matching constant
0212    */
0213   double rho0_;
0214 
0215   /**
0216    *  Power
0217    */
0218   double n_;
0219 
0220   /**
0221    *   Energy values for interpolator
0222    */
0223   vector<Energy2> en_;
0224 
0225   /**
0226    *  \f$\rho\f$ values
0227    */
0228   vector<double> rho_;
0229 
0230   /**
0231    *  The interpolator
0232    */
0233   mutable Interpolator<double,Energy2>::Ptr inter_; 
0234   //@}
0235 };
0236 
0237 }
0238 
0239 #endif /* Herwig_KMatrix_H */