Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // OneKaonTwoPionDefaultCurrent.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_OneKaonTwoPionDefaultCurrent_H
0010 #define HERWIG_OneKaonTwoPionDefaultCurrent_H
0011 //
0012 // This is the declaration of the OneKaonTwoPionDefaultCurrent class.
0013 //
0014 #include "WeakCurrent.h"
0015 #include "Herwig/Utilities/Interpolator.h"
0016 #include "Herwig/Utilities/Kinematics.h"
0017 #include "ThePEG/StandardModel/StandardModelBase.h"
0018 #include "Herwig/Decay/ResonanceHelpers.h"
0019 #include <numeric>
0020 
0021 namespace Herwig {
0022 using namespace ThePEG;
0023 
0024 /** \ingroup Decay
0025  *
0026  * The OneKaonTwoPionDefaultCurrent class implements the currents from Z.Phys.C58:445 (1992),
0027  * this paper uses the form from Z.Phys.C48:445 (1990) for the \f$a_1\f$ width and
0028  * is the default model in TAUOLA.
0029  *
0030  *  The following three meson modes are implemented.
0031  *
0032  * - \f$    \pi^0  \pi^0    K^- \f$, (imode=5)
0033  * - \f$    K^-   \pi^-    \pi^+ \f$, (imode=6)
0034  * - \f$    \pi^-  \bar{K}^0  \pi^0 \f$, (imode=7)
0035  *
0036  *  using the currents from TAUOLA
0037  *
0038  *
0039  * @see WeakCurrent
0040  * @see Defaulta1MatrixElement
0041  * 
0042  */
0043 class OneKaonTwoPionDefaultCurrent: public WeakCurrent {
0044 
0045 public:
0046 
0047   /**
0048    * Default constructor
0049    */
0050   OneKaonTwoPionDefaultCurrent();
0051 
0052   /**
0053    * Hadronic current. This method is purely virtual and must be implemented in
0054    * all classes inheriting from this one.
0055    * @param resonance If specified only include terms with this particle
0056    * @param flavour Information on the required flavours of the quarks
0057    * @param imode The mode
0058    * @param ichan The phase-space channel the current is needed for.
0059    * @param scale The invariant mass of the particles in the current.
0060    * @param outgoing The particles produced in the decay
0061    * @param momenta  The momenta of the particles produced in the decay
0062    * @param meopt Option for the calculation of the matrix element
0063    * @return The current. 
0064    */
0065   virtual vector<LorentzPolarizationVectorE> 
0066   current(tcPDPtr resonance,
0067       FlavourInfo flavour,
0068       const int imode, const int ichan,Energy & scale,
0069       const tPDVector & outgoing,
0070       const vector<Lorentz5Momentum> & momenta,
0071       DecayIntegrator::MEOption meopt) const;
0072 
0073   /**
0074    * Accept the decay. Checks the mesons against the list.
0075    * @param id The id's of the particles in the current.
0076    * @return Can this current have the external particles specified.
0077    */
0078   virtual bool accept(vector<int> id);
0079 
0080   /**
0081    * Return the decay mode number for a given set of particles in the current. 
0082    * Checks the mesons against the list.
0083    * @param id The id's of the particles in the current.
0084    * @return The number of the mode
0085    */
0086   virtual unsigned int decayMode(vector<int> id);
0087 
0088   /**
0089    * The particles produced by the current. This returns the mesons for the mode.
0090    * @param icharge The total charge of the particles in the current.
0091    * @param imode The mode for which the particles are being requested
0092    * @param iq The PDG code for the quark
0093    * @param ia The PDG code for the antiquark
0094    * @return The external particles for the current.
0095    */
0096   virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
0097 
0098 public:
0099 
0100   /** @name Functions used by the persistent I/O system. */
0101   //@{
0102   /**
0103    * Function used to write out object persistently.
0104    * @param os the persistent output stream written to.
0105    */
0106   void persistentOutput(PersistentOStream & os) const;
0107 
0108   /**
0109    * Function used to read in object persistently.
0110    * @param is the persistent input stream read from.
0111    * @param version the version number of the object when written.
0112    */
0113   void persistentInput(PersistentIStream & is, int version);
0114   //@}
0115 
0116   /**
0117    * Standard Init function used to initialize the interfaces.
0118    */
0119   static void Init();
0120 
0121 public:
0122 
0123   /** @name Methods for the construction of the phase space integrator. */
0124   //@{
0125   /**
0126    * Complete the construction of the decay mode for integration.classes inheriting
0127    * from this one.
0128    * This method is purely virtual and must be implemented in the classes inheriting
0129    * from WeakCurrent.
0130    * @param icharge   The total charge of the outgoing particles in the current.
0131    * @param resonance If specified only include terms with this particle
0132    * @param flavour Information on the required flavours of the quarks
0133    * @param imode     The mode in the current being asked for.
0134    * @param mode      The phase space mode for the integration
0135    * @param iloc      The location of the of the first particle from the current in
0136    *                  the list of outgoing particles.
0137    * @param ires      The location of the first intermediate for the current.
0138    * @param phase     The prototype phase space channel for the integration.
0139    * @param upp       The maximum possible mass the particles in the current are
0140    *                  allowed to have.
0141    * @return Whether the current was sucessfully constructed.
0142    */
0143   virtual bool createMode(int icharge, tcPDPtr resonance,
0144               FlavourInfo flavour,
0145               unsigned int imode,PhaseSpaceModePtr mode,
0146               unsigned int iloc,int ires,
0147               PhaseSpaceChannel phase, Energy upp );
0148   //@}
0149 
0150   /**
0151    * Output the setup information for the particle database
0152    * @param os The stream to output the information to
0153    * @param header Whether or not to output the information for MySQL
0154    * @param create Whether or not to add a statement creating the object
0155    */
0156   virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
0157   
0158 protected:
0159 
0160   /** @name Clone Methods. */
0161   //@{
0162   /**
0163    * Make a simple clone of this object.
0164    * @return a pointer to the new object.
0165    */
0166   virtual IBPtr clone() const {return new_ptr(*this);}
0167 
0168   /** Make a clone of this object, possibly modifying the cloned object
0169    * to make it sane.
0170    * @return a pointer to the new object.
0171    */
0172   virtual IBPtr fullclone() const {return new_ptr(*this);}
0173   //@}
0174 
0175 protected:
0176 
0177   /**
0178    * Initialize this object after the setup phase before saving and
0179    * EventGenerator to disk.
0180    * @throws InitException if object could not be initialized properly.
0181    */
0182   virtual void doinit();
0183 
0184 private:
0185 
0186   /**
0187    * Private and non-existent assignment operator.
0188    */
0189   OneKaonTwoPionDefaultCurrent & operator=(const OneKaonTwoPionDefaultCurrent &) = delete;
0190 
0191 private:
0192   
0193   /**
0194    * The \f$\rho\f$ Breit-Wigner for the \f$F_{1,2,3}\f$ form factors.
0195    * @param q2 The scale \f$q^2\f$ for the Breit-Wigner
0196    * @param ires Which \f$\rho\f$ multiplet
0197    * @return The Breit-Wigner 
0198    */
0199   Complex BrhoF123(Energy2 q2,int ires) const {
0200     if(ires>=int(_rhoF123wgts.size())) return 0.;
0201     Complex output(0.);
0202     Complex norm = std::accumulate(_rhoF123wgts.begin(),
0203                    _rhoF123wgts.end(),Complex(0.));
0204     unsigned int imin=0,imax=_rhoF123wgts.size();
0205     if(ires>0) {
0206       imin=ires;
0207       imax=imin+1;
0208     }
0209     for(unsigned int ix=imin;ix<imax;++ix)
0210       output+=_rhoF123wgts[ix]*Resonance::BreitWignerPWave(q2,_rhoF123masses[ix],
0211                                _rhoF123widths[ix],_mpi,_mpi);
0212     return output/norm;
0213   }
0214 
0215   /**
0216    * The \f$K^*\f$ Breit-Wigner for the \f$F_{1,2,3}\f$ form factors.
0217    * @param q2 The scale \f$q^2\f$ for the Breit-Wigner
0218    * @param ires Which \f$\rho\f$ multiplet
0219    * @return The Breit-Wigner 
0220    */
0221   Complex BKstarF123(Energy2 q2,int ires) const {
0222     if(ires>=int(_kstarF123wgts.size())) return 0.;
0223     Complex output(0.);
0224     Complex norm = std::accumulate(_kstarF123wgts.begin(),
0225                    _kstarF123wgts.end(),Complex(0.));
0226     unsigned int imin=0,imax=_kstarF123wgts.size();
0227     if(ires>0) {
0228       imin=ires;
0229       imax=imin+1;
0230     }
0231     assert(imax<=_kstarF123wgts.size());
0232     for(unsigned int ix=imin;ix<imax;++ix)
0233       output+=_kstarF123wgts[ix]*Resonance::BreitWignerPWave(q2,_kstarF123masses[ix],
0234                                  _kstarF123widths[ix],_mpi,_mK);
0235     return output/norm;
0236   }
0237   
0238   /**
0239    * Mixed Breit Wigner for the \f$F_5\f$ form factor
0240    * @param si The scale \f$s_1\f$.
0241    * @param sj The scale \f$s_2\f$.
0242    * @param ires Which resonances to use
0243    * @return The mixed Breit-Wigner
0244    */
0245   Complex FKrho(Energy2 si,Energy2 sj,int ires) const {
0246     Complex output;
0247     if(ires<0)
0248       output = _rhoKstarwgt*BKstarF123(si,-1)+BrhoF123(sj,-1);
0249     else if(ires%2==0)
0250       output= _rhoKstarwgt*BKstarF123(si,ires/2);
0251     else if(ires%2==1)
0252       output=BrhoF123(sj,ires/2);
0253     return output/(1.+_rhoKstarwgt);
0254   }
0255 
0256 private:
0257   
0258   /**
0259    * Parameters for the \f$\rho\f$ Breit-Wigner in the
0260    * \f$F_{1,2,3}\f$ form factors.
0261    */
0262   vector<double> _rhoF123wgts;
0263 
0264   /**
0265    * Parameters for the \f$K^*\f$ Breit-Wigner in the
0266    * \f$F_{1,2,3}\f$ form factors.
0267    */
0268   vector<double> _kstarF123wgts;
0269 
0270   /**
0271    * Parameters for the \f$K^*\f$ Breit-Wigner in the
0272    * \f$F_5\f$ form factors.
0273    */
0274   vector<double> _kstarF5wgts;
0275   
0276   /**
0277    * The relative weight of the \f$\rho\f$ and \f$K^*\f$ where needed.
0278    */
0279   double _rhoKstarwgt;
0280 
0281   /**
0282    * The mass of the \f$aK1\f$ resonances.
0283    */
0284   Energy _k1mass;
0285 
0286   /**
0287    * The width of the \f$K_1\f$ resonances.
0288    */
0289   Energy _k1width;
0290 
0291   /**
0292    * The pion decay constant, \f$f_\pi\f$.
0293    */
0294   Energy _fpi;
0295 
0296   /**
0297    * The pion mass
0298    */
0299   Energy _mpi;
0300 
0301   /**
0302    * The kaon mass
0303    */
0304   Energy _mK;
0305 
0306   /**
0307    * The \f$\rho\f$ masses for the \f$F_{1,2,3}\f$ form factors.
0308    */
0309   vector<Energy> _rhoF123masses;
0310 
0311   /**
0312    * The \f$\rho\f$ widths for the \f$F_{1,2,3}\f$ form factors.
0313    */
0314   vector<Energy> _rhoF123widths;
0315 
0316   /**
0317    * The \f$K^*\f$ masses for the \f$F_{1,2,3}\f$ form factors.
0318    */
0319   vector<Energy> _kstarF123masses;
0320 
0321   /**
0322    * The \f$K^*\f$ masses for the \f$F_5\f$ form factors.
0323    */
0324   vector<Energy> _kstarF5masses;
0325 
0326   /**
0327    * The \f$K^*\f$ widths for the \f$F_{1,2,3}\f$ form factors.
0328    */
0329   vector<Energy> _kstarF123widths;
0330 
0331   /**
0332    * The \f$K^*\f$ widths for the \f$F_5\f$ form factors.
0333    */
0334   vector<Energy> _kstarF5widths;
0335 };
0336 
0337 }
0338 
0339 #endif /* HERWIG_OneKaonTwoPionDefaultCurrent_H */