Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // ScalarFormFactor.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_ScalarFormFactor_H
0010 #define HERWIG_ScalarFormFactor_H
0011 //
0012 // This is the declaration of the ScalarFormFactor class.
0013 //
0014 #include "ThePEG/Interface/Interfaced.h"
0015 #include "ScalarFormFactor.fh"
0016 #include "ThePEG/Config/Complex.h"
0017 
0018 namespace Herwig {
0019 using namespace ThePEG;
0020 
0021 /** \ingroup Decay
0022  * 
0023  *  The ScalarFormFactor class is the base class for the form factors
0024  *  for the weak decay of scalar to scalar, vector and tensor mesons.
0025  *
0026  *  This is designed so that the form factors can be used for both the semi-leptonic
0027  *  decays and using factorization for hadronic weak decays. It also includes the
0028  *  necessary form factors for the weak-radiative decays \f$B\to K\gamma\f$
0029  *   and \f$B\to K \ell^+\ell^-\f$.
0030  *
0031  *  The form factors are given below for the decay \f$X(p_X)\to Y(p_Y)\f$ with 
0032  *  \f$q_\mu=(p_X-p_Y)_\mu\f$.
0033  *
0034  *  The scalar-scalar form factor is defined by
0035  *
0036  *  \f[ \langle Y(p_Y)|(V-A)_\mu|X(p_X)\rangle = 
0037  *      \left\{(p_X+p_Y)_\mu-\frac{m_X^2-m_Y^2}{q^2}q_\mu\right\}f_+(q^2)
0038  *     +\left\{\frac{m_X^2-m_Y^2}{q^2}q_\mu\right\}f_0(q^2).  \f]
0039  *
0040  *  This is the form factor for the standard weak current. For the weak radiative
0041  *  decays we also need the penguin current.
0042  *  
0043  *  \f[ \langle Y(p_Y)|J^\sigma_\mu|X(p_X)\rangle = \frac{i}{m_X+m_Y}
0044  *   \left\{q^2(p_X+p_Y)_\mu-(m_X^2-m_Y^2)q_\mu\right\}f_T(q^2)\f]
0045  *
0046  *
0047  *  The scalar-vector form factors are defined so that
0048  *
0049  * \f[ \langle Y(p_Y)|(V-A)_\mu|X(p_X)\rangle = -i\epsilon^*_\mu(m_X+m_Y)A_1(q^2)
0050  * +i(p_X+p_Y)_\mu\epsilon^*\cdot q \frac{A_2(q^2)}{m_X+m_Y}\f]
0051  *\f[\phantom{\langle Y(p_Y)|(V-A)_\mu|X(p_X)\rangle =}
0052  * +iq_\mu\epsilon^*\cdot q \frac{2m_Y}{q^2}\left(A_3(q^2)-A_0(q^2)\right)
0053  * +\epsilon_{\mu\nu\rho\sigma}\epsilon^{*\nu}p_X^\rho p_Y^\sigma \frac{2V(q^2)}{m_X+m_Y},
0054  * \f]
0055  *
0056  *  where the form factor \f$A_3(q^2)\f$ can be defined in terms of \f$A_1\f$
0057  *  and \f$A_2\f$ using
0058  *
0059  * \f[ A_3(q^2) = \frac{m_X+m_Y}{2m_Y}A_1(q^2)-\frac{m_X-m_Y}{2m_Y}A_2(q^2)\f]
0060  *
0061  *  and \f$A_0(0)=A_3(0)\f$.
0062  *
0063  *  As with the scalar to scalar currents this is the form factor for the standard
0064  *  weak current. We also need the penguin current
0065  *
0066  * \f[ \langle Y(p_Y)|J^\sigma_\mu|X(p_X)\rangle = 
0067  * i\epsilon_{\mu\nu\rho\sigma}\epsilon^{*\nu}p_X^\rho p_Y^\sigma2T_1(q^2)
0068  * +T_2(q^2)\left\{\epsilon^*_\mu(m_X^2-m^2_Y)-\epsilon^*\cdot q (p_X+p_Y)_\mu\right\}
0069  * \f]\f[\phantom{\langle Y(p_Y)|J^\sigma_\mu|X(p_X)\rangle = }
0070  * +T_3(q^2)\epsilon^*\cdot q\left\{q_\mu-\frac{q^2}{m^2_X-m^2_Y}(p_X+p_Y)_\mu\right\},
0071  * \f]
0072  * 
0073  * with \f$T_1(0)=T_2(0)\f$.
0074  *
0075  *  The scalar-tensor form factors are defined as
0076  *
0077  * \f[ \langle Y(p_Y)|(V-A)_\mu|X(p_x)\rangle = 
0078  *  i h(q^2) \epsilon_{\mu\nu\lambda\rho} \epsilon^{*\nu\alpha} p_{Y\alpha}
0079  *    (p_X+p_Y)^\lambda(p_X-p_Y)^\rho
0080  *    -k(q^2)\epsilon^*_{\mu\nu}p_Y^\nu 
0081  * \f]\f[\phantom{\langle Y(p_Y)|(V-A)_mu|X(p_x)\rangle =}
0082  *    -b_+(q^2)\epsilon^*_{\alpha\beta}p_X^\alpha p_X^\beta(p_X+p_Y)_\mu
0083  *    -b_-(q^2)\epsilon^*_{\alpha\beta}p_X^\alpha p_X^\beta(p_X-p_Y)_\mu.
0084  * \f]
0085  *
0086  *  This is the base class and contains virtual methods which should return
0087  *  the form factors described above. This class stores information on the
0088  *  incoming and outgoing particles for a given form factor, the spin of the
0089  *  outgoing particle and the id's of the quarks.
0090  *
0091  *  Classes inheriting from this class should specify which combinations of
0092  *  particles etc are allowed using the addFormFactor member.
0093  *
0094  * @see BaryonFormFactor
0095  */
0096 
0097 class ScalarFormFactor: public Interfaced {
0098 
0099 public:
0100 
0101   /**
0102    * Default constructor
0103    */
0104   ScalarFormFactor() : _numbermodes(0) {}
0105 
0106 public:
0107 
0108   /** @name Functions used by the persistent I/O system. */
0109   //@{
0110   /**
0111    * Function used to write out object persistently.
0112    * @param os the persistent output stream written to.
0113    */
0114   void persistentOutput(PersistentOStream & os) const;
0115 
0116   /**
0117    * Function used to read in object persistently.
0118    * @param is the persistent input stream read from.
0119    * @param version the version number of the object when written.
0120    */
0121   void persistentInput(PersistentIStream & is, int version);
0122   //@}
0123 
0124   /**
0125    * Standard Init function used to initialize the interfaces.
0126    */
0127   static void Init();
0128 
0129 protected:
0130 
0131   /** @name Clone Methods. */
0132   //@{
0133   /**
0134    * Make a simple clone of this object.
0135    * @return a pointer to the new object.
0136    */
0137   virtual IBPtr clone() const {return new_ptr(*this);}
0138 
0139   /** Make a clone of this object, possibly modifying the cloned object
0140    * to make it sane.
0141    * @return a pointer to the new object.
0142    */
0143   virtual IBPtr fullclone() const {return new_ptr(*this);}
0144   //@}
0145 
0146 public:
0147 
0148   /** @name Functions to give information about the form factors available. */
0149   //@{
0150 
0151   /**
0152    * Find the location for a given pair of particle. 
0153    * \param in   PDG code for the incoming meson.
0154    * \param out  PDG code for the outgoing meson.
0155    * \param cc  particles or charge conjugates stored in form factor.
0156    * @return The location in the vectors storing the data. 
0157    */
0158   int formFactorNumber(int in,int out,bool & cc) const  {
0159     if(_incomingid.size()==0) return -1;
0160     int output(-1);unsigned int ix(0);
0161     do {
0162       if(_incomingid[ix]== in && _outgoingid[ix]== out) {
0163     cc=false;
0164     output=ix;
0165       }
0166       else if (_incomingid[ix]==-in && _outgoingid[ix]==-out) {
0167     cc=true;
0168     output=ix;
0169       }
0170       else if(_incomingid[ix]==-in && _outgoingid[ix]==out &&
0171           (abs(_outgoingid[ix])/100)%10==(abs(_outgoingid[ix])/10)%10) {
0172     cc=true;
0173     output=ix;
0174       }
0175       ++ix;
0176     }
0177     while(ix<_incomingid.size()&&output<0);
0178     return output;
0179   }
0180   
0181   /**
0182    * Get the particle ids for an entry.
0183    * @param iloc The location in the list.
0184    * @param id0 The PDG code for the incoming meson.
0185    * @param id1 The PDG code for the outgoing meson.
0186    */
0187   void particleID(unsigned int iloc,int& id0,int& id1) const {
0188     id0=_incomingid[iloc];
0189     id1=_outgoingid[iloc];
0190   }
0191 
0192   /**
0193    * Information on the form factor.
0194    * @param iloc The location in the list.
0195    * @param ispin The spin of the outgoing meson.
0196    * @param spect The PDG code of the spectator quark.
0197    * @param inquark The PDG code for decaying incoming quark.
0198    * @param outquark The PDG code for the outgoing quark produced in the decay.
0199    */
0200   void formFactorInfo(unsigned int & iloc,int & ispin,int & spect,
0201               int & inquark, int & outquark) const {
0202     ispin    = _outgoingJ[iloc];
0203     spect    = _spectator[iloc];
0204     inquark  = _inquark[iloc];
0205     outquark = _outquark[iloc];
0206   }
0207 
0208   /**
0209    * Information on the form factor.
0210    * @param in The PDG code of the incoming meson.
0211    * @param out The PDG code of the outgoing meson.
0212    * @param ispin The spin of the outgoing meson.
0213    * @param spect The PDG code of the spectator quark.
0214    * @param inquark The PDG code for decaying incoming quark.
0215    * @param outquark The PDG code for the outgoing quark produced in the decay.
0216    */
0217   void formFactorInfo(int in,int out,int & ispin,
0218               int & spect,int & inquark, int & outquark) const {
0219     bool dummy;
0220     unsigned int ix(formFactorNumber(in,out,dummy));
0221     formFactorInfo(ix,ispin,spect,inquark,outquark);
0222   }
0223 
0224   /**
0225    * number of form factors
0226    */
0227   unsigned int numberOfFactors() const {return _incomingid.size();}
0228   //@}
0229 
0230 public:
0231 
0232   /** @name Form Factors */
0233   //@{
0234   /**
0235    * The form factor for the weak decay of a scalar to a scalar.  
0236    * This method is virtual and must be implementented in classes
0237    * inheriting from this which include scalar to scalar form factors.
0238    * @param q2 The scale \f$q^2\f$.
0239    * @param iloc The location in the form factor list.
0240    * @param id0 The PDG code of the incoming meson.
0241    * @param id1 The PDG code of the outgoing meson.
0242    * @param m0 The mass of the incoming meson.
0243    * @param m1 The mass of the outgoing meson.
0244    * @param f0 The form factor \f$f_0\f$. 
0245    * @param fp The form factor \f$f_+\f$.
0246    */
0247   virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
0248                       Energy m0,Energy m1,Complex & f0,
0249                       Complex & fp) const;
0250 
0251   /**
0252    * The form factor for the weak decay of a scalar to a vector. This method is virtual
0253    * and must be implemented in classes inheriting from this which include scalar to
0254    * vector form factors.
0255    * @param q2 The scale \f$q^2\f$.
0256    * @param iloc The location in the form factor list.
0257    * @param id0 The PDG code of the incoming meson.
0258    * @param id1 The PDG code of the outgoing meson.
0259    * @param m0 The mass of the incoming meson.
0260    * @param m1 The mass of the outgoing meson.
0261    * @param A0 The form factor \f$A_0\f$
0262    * @param A1 The form factor \f$A_1\f$
0263    * @param A2 The form factor \f$A_2\f$
0264    * @param V  The form factor \f$V\f$
0265    */
0266   virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
0267                       Energy m0, Energy m1,Complex & A0,
0268                       Complex & A1,Complex & A2, Complex & V) const;
0269 
0270   /**
0271    * The form factor for the weak decay of a scalar to a tensor. This method is virtual
0272    * and must be implemented in classes inheriting from this which include scalar to
0273    * tensor form factors.
0274    * @param q2 The scale \f$q^2\f$.
0275    * @param iloc The location in the form factor list.
0276    * @param id0 The PDG code of the incoming meson.
0277    * @param id1 The PDG code of the outgoing meson.
0278    * @param m0 The mass of the incoming meson.
0279    * @param m1 The mass of the outgoing meson.
0280    * @param h  The form factor \f$h\f$.
0281    * @param k  The form factor \f$k\f$. 
0282    * @param bp The form factor \f$b_+\f$.
0283    * @param bm The form factor \f$b_-\f$.
0284    */
0285   virtual void ScalarTensorFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
0286                       Energy m0, Energy m1, complex<InvEnergy2> & h,
0287                       Complex & k, complex<InvEnergy2> & bp,
0288                       complex<InvEnergy2> & bm) const;
0289 
0290   /**
0291    * The form factor for the weak penguin decay of a scalar meson to a scalar meson.
0292    * This method is virtual
0293    * and must be implemented in classes inheriting from this which include scalar to
0294    * scalar penguin form factors. 
0295    * @param q2 The scale \f$q^2\f$.
0296    * @param iloc The location in the form factor list.
0297    * @param id0 The PDG code of the incoming meson.
0298    * @param id1 The PDG code of the outgoing meson.
0299    * @param m0 The mass of the incoming meson.
0300    * @param m1 The mass of the outgoing meson.
0301    * @param fT The form factor \f$f_T\f$.
0302    */
0303   virtual void ScalarScalarSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
0304                        Energy m0, Energy m1,Complex & fT) const;
0305 
0306   /**
0307    * The form factor for the weak penguin decay of a scalar meson to a vector meson. 
0308    * This method is virtual
0309    * and must be implemented in classes inheriting from this which include scalar to
0310    * vector penguin form factors.
0311    * @param q2 The scale \f$q^2\f$.
0312    * @param iloc The location in the form factor list.
0313    * @param id0 The PDG code of the incoming meson.
0314    * @param id1 The PDG code of the outgoing meson.
0315    * @param m0 The mass of the incoming meson.
0316    * @param m1 The mass of the outgoing meson.
0317    * @param T1 The form factor \f$T_1\f$.
0318    * @param T2 The form factor \f$T_2\f$.
0319    * @param T3 The form factor \f$T_3\f$.
0320    */
0321   virtual void ScalarVectorSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
0322                        Energy m0, Energy m1, Complex & T1,
0323                        Complex & T2, Complex & T3) const;
0324 
0325   //@}
0326 
0327   /**
0328    * Output the setup information for the particle database
0329    * @param os The stream to output the information to
0330    * @param header Whether or not to output the information for MySQL
0331    * @param create Whether or not to add a statement creating the object
0332    */
0333   virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
0334 
0335 protected:  
0336 
0337   /**
0338    * Add a form factor to the list.
0339    * @param in The PDG code of the incoming meson.
0340    * @param out The PDG code of the outgoing meson.
0341    * @param spin The spin of the outgoing meson.
0342    * @param spect The PDG code of the spectator quark.
0343    * @param inquark The PDG code for decaying incoming quark.
0344    * @param outquark The PDG code for the outgoing quark produced in the decay.
0345    */
0346   void addFormFactor(int in,int out,int spin, int spect,
0347              int inquark, int outquark) {
0348     _incomingid.push_back(in);
0349     _outgoingid.push_back(out);
0350     _outgoingJ.push_back(spin);
0351     _spectator.push_back(spect);
0352     _inquark.push_back(inquark);
0353     _outquark.push_back(outquark);
0354   }
0355 
0356   /**
0357    *  Set initial number of modes
0358    * @param nmodes The number of modes.
0359    */
0360   void initialModes(unsigned int nmodes) {_numbermodes=nmodes;}
0361 
0362   /**
0363    * Get the initial number of modes
0364    */
0365   unsigned int initialModes() const {return _numbermodes;}
0366 
0367 protected:
0368 
0369   /** @name Standard Interfaced functions. */
0370   //@{
0371   /**
0372    * Initialize this object after the setup phase before saving and
0373    * EventGenerator to disk.
0374    * @throws InitException if object could not be initialized properly.
0375    */
0376   virtual void doinit();
0377   //@}
0378 
0379 private:
0380 
0381   /**
0382    * Private and non-existent assignment operator.
0383    */
0384   ScalarFormFactor & operator=(const ScalarFormFactor &) = delete;
0385 
0386   private:
0387 
0388   /**
0389    * the id's of the incoming particles
0390    */
0391   vector<int> _incomingid;
0392 
0393   /**
0394    * the id's of the  outgoing particles
0395    */
0396   vector<int> _outgoingid;
0397 
0398   /**
0399    * spin of the outgoing particle
0400    */
0401   vector<int> _outgoingJ;
0402 
0403   /**
0404    * the id of the spectator quark
0405    */
0406   vector<int> _spectator;
0407 
0408   /**
0409    * the id of the decaying quark
0410    */
0411   vector<int> _inquark;
0412 
0413   /**
0414    * the id of the outgoing quark
0415    */
0416   vector<int> _outquark;
0417 
0418   /**
0419    * The initial number of modes
0420    */
0421   unsigned int _numbermodes;
0422 
0423 };
0424 
0425 }
0426 
0427 #endif /* HERWIG_ScalarFormFactor_H */