Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // EtaPiPiDefaultCurrent.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_EtaPiPiDefaultCurrent_H
0010 #define HERWIG_EtaPiPiDefaultCurrent_H
0011 //
0012 // This is the declaration of the EtaPiPiDefaultCurrent 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 EtaPiPiDefaultCurrent class implements the current from Z.Phys.C58:445 (1992),
0027  * for \f$    \pi^-  \pi^0    \eta \f$.
0028  *
0029  *
0030  * @see WeakCurrent
0031  * 
0032  */
0033 class EtaPiPiDefaultCurrent: public WeakCurrent {
0034 
0035 public:
0036 
0037   /**
0038    * Default constructor
0039    */
0040   EtaPiPiDefaultCurrent();
0041 
0042   /**
0043    * Hadronic current. This method is purely virtual and must be implemented in
0044    * all classes inheriting from this one.
0045    * @param resonance If specified only include terms with this particle
0046    * @param flavour Information on the required flavours of the quarks
0047    * @param imode The mode
0048    * @param ichan The phase-space channel the current is needed for.
0049    * @param scale The invariant mass of the particles in the current.
0050    * @param outgoing The particles produced in the decay
0051    * @param momenta  The momenta of the particles produced in the decay
0052    * @param meopt Option for the calculation of the matrix element
0053    * @return The current. 
0054    */
0055   virtual vector<LorentzPolarizationVectorE> 
0056   current(tcPDPtr resonance,
0057       FlavourInfo flavour,
0058       const int imode, const int ichan,Energy & scale,
0059       const tPDVector & outgoing,
0060       const vector<Lorentz5Momentum> & momenta,
0061       DecayIntegrator::MEOption meopt) const;
0062 
0063   /**
0064    * Accept the decay. Checks the mesons against the list.
0065    * @param id The id's of the particles in the current.
0066    * @return Can this current have the external particles specified.
0067    */
0068   virtual bool accept(vector<int> id);
0069 
0070   /**
0071    * Return the decay mode number for a given set of particles in the current. 
0072    * Checks the mesons against the list.
0073    * @param id The id's of the particles in the current.
0074    * @return The number of the mode
0075    */
0076   virtual unsigned int decayMode(vector<int> id);
0077 
0078   /**
0079    * The particles produced by the current. This returns the mesons for the mode.
0080    * @param icharge The total charge of the particles in the current.
0081    * @param imode The mode for which the particles are being requested
0082    * @param iq The PDG code for the quark
0083    * @param ia The PDG code for the antiquark
0084    * @return The external particles for the current.
0085    */
0086   virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
0087 
0088 public:
0089 
0090   /** @name Functions used by the persistent I/O system. */
0091   //@{
0092   /**
0093    * Function used to write out object persistently.
0094    * @param os the persistent output stream written to.
0095    */
0096   void persistentOutput(PersistentOStream & os) const;
0097 
0098   /**
0099    * Function used to read in object persistently.
0100    * @param is the persistent input stream read from.
0101    * @param version the version number of the object when written.
0102    */
0103   void persistentInput(PersistentIStream & is, int version);
0104   //@}
0105 
0106   /**
0107    * Standard Init function used to initialize the interfaces.
0108    */
0109   static void Init();
0110 
0111 public:
0112 
0113   /** @name Methods for the construction of the phase space integrator. */
0114   //@{
0115   /**
0116    * Complete the construction of the decay mode for integration.classes inheriting
0117    * from this one.
0118    * This method is purely virtual and must be implemented in the classes inheriting
0119    * from WeakCurrent.
0120    * @param icharge   The total charge of the outgoing particles in the current.
0121    * @param resonance If specified only include terms with this particle
0122    * @param flavour Information on the required flavours of the quarks
0123    * @param imode     The mode in the current being asked for.
0124    * @param mode      The phase space mode for the integration
0125    * @param iloc      The location of the of the first particle from the current in
0126    *                  the list of outgoing particles.
0127    * @param ires      The location of the first intermediate for the current.
0128    * @param phase     The prototype phase space channel for the integration.
0129    * @param upp       The maximum possible mass the particles in the current are
0130    *                  allowed to have.
0131    * @return Whether the current was sucessfully constructed.
0132    */
0133   virtual bool createMode(int icharge, tcPDPtr resonance,
0134               FlavourInfo flavour,
0135               unsigned int imode,PhaseSpaceModePtr mode,
0136               unsigned int iloc,int ires,
0137               PhaseSpaceChannel phase, Energy upp );
0138   //@}
0139 
0140   /**
0141    * Output the setup information for the particle database
0142    * @param os The stream to output the information to
0143    * @param header Whether or not to output the information for MySQL
0144    * @param create Whether or not to add a statement creating the object
0145    */
0146   virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
0147 
0148 protected:
0149 
0150   /** @name Clone Methods. */
0151   //@{
0152   /**
0153    * Make a simple clone of this object.
0154    * @return a pointer to the new object.
0155    */
0156   virtual IBPtr clone() const {return new_ptr(*this);}
0157 
0158   /** Make a clone of this object, possibly modifying the cloned object
0159    * to make it sane.
0160    * @return a pointer to the new object.
0161    */
0162   virtual IBPtr fullclone() const {return new_ptr(*this);}
0163   //@}
0164 
0165 protected:
0166 
0167   /**
0168    * Initialize this object after the setup phase before saving and
0169    * EventGenerator to disk.
0170    * @throws InitException if object could not be initialized properly.
0171    */
0172   virtual void doinit();
0173 
0174 private:
0175 
0176   /**
0177    * Private and non-existent assignment operator.
0178    */
0179   EtaPiPiDefaultCurrent & operator=(const EtaPiPiDefaultCurrent &) = delete;
0180 
0181 private:
0182   
0183   /**
0184    * The \f$\rho\f$ Breit-Wigner for the \f$F_{1,2,3}\f$ form factors.
0185    * @param q2 The scale \f$q^2\f$ for the Breit-Wigner
0186    * @param ires Which \f$\rho\f$ multiplet
0187    * @return The Breit-Wigner 
0188    */
0189   Complex BrhoF123(Energy2 q2,int ires) const {
0190     Complex output(0.);
0191     Complex norm = std::accumulate(_rhoF123wgts.begin(),_rhoF123wgts.end(),Complex(0.));
0192     if(ires<0) {
0193       for(unsigned int ix=0;ix<_rhoF123wgts.size();++ix) {
0194     output+=_rhoF123wgts[ix]*
0195       Resonance::BreitWignerPWave(q2,_rhoF123masses[ix],
0196                       _rhoF123widths[ix],_mpi,_mpi);
0197       }
0198     }
0199     else {
0200       assert(ires<=int(_rhoF123wgts.size()));
0201       output=_rhoF123wgts[ires]*
0202     Resonance::BreitWignerPWave(q2,_rhoF123masses[ires],
0203                     _rhoF123widths[ires],_mpi,_mpi);
0204     }
0205     return output/norm;
0206   }
0207 
0208   /**
0209    * The \f$\rho\f$ Breit-Wigner for the \f$F_5\f$ form factors.
0210    * @param q2 The scale \f$q^2\f$ for the Breit-Wigner
0211    * @param ires Which \f$\rho\f$ multiplet
0212    * @return The Breit-Wigner 
0213    */
0214   Complex BrhoF5(Energy2 q2,int ires) const {
0215     Complex output(0.);
0216     Complex norm = std::accumulate(_rhoF5wgts.begin(),_rhoF5wgts.end(),Complex(0.0));
0217     if(ires<0) {
0218       for(unsigned int ix=0;ix<_rhoF5wgts.size();++ix) {
0219     output+=_rhoF5wgts[ix]*
0220       Resonance::BreitWignerPWave(q2,_rhoF5masses[ix],
0221                       _rhoF5widths[ix],_mpi,_mpi);
0222       }
0223     }
0224     else {
0225       assert(ires<=int(_rhoF123wgts.size()));
0226       output=_rhoF5wgts[ires]*
0227     Resonance::BreitWignerPWave(q2,_rhoF5masses[ires],
0228                     _rhoF5widths[ires],_mpi,_mpi);
0229     }
0230     return output/norm;
0231   }
0232 
0233 private:
0234   
0235   /**
0236    * Parameters for the \f$\rho\f$ Breit-Wigner in the
0237    * \f$F_{1,2,3}\f$ form factors.
0238    */
0239   vector<double> _rhoF123wgts;
0240   
0241   /**
0242    * Parameters for the \f$\rho\f$ Breit-Wigner in the
0243    * \f$F_5\f$ form factors.
0244    */
0245   vector<double> _rhoF5wgts;
0246 
0247   /**
0248    * The pion decay constant, \f$f_\pi\f$.
0249    */
0250   Energy _fpi;
0251 
0252   /**
0253    * The pion mass
0254    */
0255   Energy _mpi;
0256 
0257   /**
0258    * The \f$\rho\f$ masses for the \f$F_{1,2,3}\f$ form factors.
0259    */
0260   vector<Energy> _rhoF123masses;
0261 
0262   /**
0263    * The \f$\rho\f$ masses for the \f$F_5\f$ form factors.
0264    */
0265   vector<Energy> _rhoF5masses;
0266 
0267   /**
0268    * The \f$\rho\f$ widths for the \f$F_{1,2,3}\f$ form factors.
0269    */
0270   vector<Energy> _rhoF123widths;
0271 
0272   /**
0273    * The \f$\rho\f$ widths for the \f$F_5\f$ form factors.
0274    */
0275   vector<Energy> _rhoF5widths;
0276 };
0277 
0278 }
0279 
0280 #endif /* HERWIG_EtaPiPiDefaultCurrent_H */