Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // PScalarPScalarVectorDecayer.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_PScalarPScalarVectorDecayer_H
0010 #define HERWIG_PScalarPScalarVectorDecayer_H
0011 //
0012 // This is the declaration of the PScalarPScalarVectorDecayer class.
0013 //
0014 #include "Herwig/Decay/DecayIntegrator.h"
0015 #include "Herwig/Decay/PhaseSpaceMode.h"
0016 #include "ThePEG/Helicity/LorentzPolarizationVector.h"
0017 
0018 namespace Herwig {
0019 using namespace ThePEG;
0020 
0021 /** \ingroup Decay
0022  *
0023  * The <code>PScalarPScalarVectorDecayer</code> class is designed to perform the decay
0024  * of a pseudoscalar meson to another pseudoscalar meson and a vector meson.
0025  * In this case the matrix element has the 
0026  * form
0027  *  \f[\mathcal{M} = g\epsilon_2^\mu(p_0+p_1)_\mu,\f]
0028  *  where
0029  * - \f$p_0\f$ is the momentum of the incoming pseudoscalar meson.
0030  * - \f$p_1\f$ is the momentum of the outgoing pseudoscalar meson.
0031  * - \f$\epsilon_2\f$ is the polarization vector of the vector meson.
0032  * - \f$g\f$ is the coupling for the decay.
0033  *
0034  * The same Lorentz structure is also valid, and used for Scalar to Scalar Vector, Scalar to PseudoScalar PseudoVector, or PseudoScalar to PseudoVector Scalar decays.
0035  * @see DecayIntegrator
0036  *
0037  * \author Peter Richardson
0038  * 
0039  */
0040 class PScalarPScalarVectorDecayer: public DecayIntegrator {
0041 
0042 public:
0043   
0044   /**
0045    * Which of the possible decays is required
0046    * @param cc Is this mode the charge conjugate
0047    * @param parent The decaying particle
0048    * @param children The decay products
0049    */
0050   virtual int modeNumber(bool & cc, tcPDPtr parent, 
0051              const tPDVector & children) const;
0052 
0053   /**
0054    * Return the matrix element squared for a given mode and phase-space channel.
0055    * @param ichan The channel we are calculating the matrix element for. 
0056    * @param part The decaying Particle.
0057    * @param outgoing The particles produced in the decay
0058    * @param momenta  The momenta of the particles produced in the decay
0059    * @param meopt Option for the calculation of the matrix element
0060    * @return The matrix element squared for the phase-space configuration.
0061    */
0062   double me2(const int ichan,const Particle & part,
0063          const tPDVector & outgoing,
0064          const vector<Lorentz5Momentum> & momenta,
0065          MEOption meopt) const;
0066 
0067   /**
0068    *   Construct the SpinInfos for the particles produced in the decay
0069    */
0070   virtual void constructSpinInfo(const Particle & part,
0071                  ParticleVector outgoing) const;
0072   
0073   /**
0074    * Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
0075    * @param dm The DecayMode
0076    * @param mecode The code for the matrix element as described
0077    *               in the GenericWidthGenerator class, in this case 10.
0078    * @param coupling The coupling for the matrix element.
0079    * @return True or False if this mode can be handled.
0080    */
0081   bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
0082 
0083 public:
0084 
0085   /** @name Functions used by the persistent I/O system. */
0086   //@{
0087   /**
0088    * Function used to write out object persistently.
0089    * @param os the persistent output stream written to.
0090    */
0091   void persistentOutput(PersistentOStream & os) const;
0092 
0093   /**
0094    * Function used to read in object persistently.
0095    * @param is the persistent input stream read from.
0096    * @param version the version number of the object when written.
0097    */
0098   void persistentInput(PersistentIStream & is, int version);
0099   //@}
0100 
0101   /**
0102    * Standard Init function used to initialize the interfaces.
0103    */
0104   static void Init();
0105 
0106   /**
0107    * Output the setup information for the particle database
0108    * @param os The stream to output the information to
0109    * @param header Whether or not to output the information for MySQL
0110    */
0111   virtual void dataBaseOutput(ofstream & os,bool header) const;
0112 
0113 protected:
0114 
0115   /** @name Clone Methods. */
0116   //@{
0117   /**
0118    * Make a simple clone of this object.
0119    * @return a pointer to the new object.
0120    */
0121   virtual IBPtr clone() const {return new_ptr(*this);}
0122 
0123   /** Make a clone of this object, possibly modifying the cloned object
0124    * to make it sane.
0125    * @return a pointer to the new object.
0126    */
0127   virtual IBPtr fullclone() const {return new_ptr(*this);}
0128   //@}
0129   
0130 protected:
0131   
0132   /** @name Standard Interfaced functions. */
0133   //@{
0134 
0135   /**
0136    * Initialize this object after the setup phase before saving and
0137    * EventGenerator to disk.
0138    * @throws InitException if object could not be initialized properly.
0139    */
0140   virtual void doinit();
0141 
0142   /**
0143    * Initialize this object to the begining of the run phase.
0144    */
0145   virtual void doinitrun();
0146   //@}
0147 
0148 public:
0149 
0150   /**
0151    *   Set the parameters for a decay mode
0152    */
0153   string setUpDecayMode(string arg);
0154   
0155 private:
0156 
0157   /**
0158    * Private and non-existent assignment operator.
0159    */
0160   PScalarPScalarVectorDecayer & operator=(const PScalarPScalarVectorDecayer &) = delete;
0161 
0162 private:
0163 
0164   /**
0165    * the PDG code for the incoming particle
0166    */
0167   vector<int> incoming_;
0168 
0169   /**
0170    * the PDG code for the outgoing particles pseudoscalar, then vector
0171    */
0172   vector<pair<int,int> > outgoing_;
0173 
0174   /**
0175    * the coupling for the decay
0176    */
0177   vector<double> coupling_;
0178 
0179   /**
0180    * the maximum weight for the decay
0181    */
0182   vector<double> maxWeight_;
0183 
0184   /**
0185    *  Spin density matrix
0186    */
0187   mutable RhoDMatrix rho_;
0188 
0189   /**
0190    *  Polarization vectors for the decay products
0191    */
0192   mutable vector<Helicity::LorentzPolarizationVector> vectors_;
0193 };
0194 
0195 }
0196 
0197 
0198 #endif /* HERWIG_PScalarPScalarVectorDecayer_H */