Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef Herwig_PseudoScalar2FermionsDecayer_H
0003 #define Herwig_PseudoScalar2FermionsDecayer_H
0004 //
0005 // This is the declaration of the PseudoScalar2FermionsDecayer class.
0006 //
0007 
0008 #include "Herwig/Decay/DecayIntegrator.h"
0009 #include "Herwig/Decay/PhaseSpaceMode.h"
0010 #include "ThePEG/Helicity/LorentzSpinorBar.h"
0011 
0012 namespace Herwig {
0013 
0014 using namespace ThePEG;
0015 
0016 /**
0017  * The PseudoScalar2FermionsDecayer class is designed for the decay of a pseudoscalar meson to
0018  * two fermions, in reality this is always the decay of the \f$\eta_c\f$ to a baryon
0019  * antibaryon pair.
0020  *
0021  * @see \ref PseudoScalar2FermionsDecayerInterfaces "The interfaces"
0022  * defined for PseudoScalar2FermionsDecayer.
0023  */
0024 class PseudoScalar2FermionsDecayer: public DecayIntegrator {
0025 
0026 public:
0027 
0028   /**
0029    * The default constructor.
0030    */
0031   PseudoScalar2FermionsDecayer();
0032 
0033   /**
0034    * Which of the possible decays is required
0035    * @param cc Is this mode the charge conjugate
0036    * @param parent The decaying particle
0037    * @param children The decay products
0038    */
0039   virtual int modeNumber(bool & cc, tcPDPtr parent, 
0040              const tPDVector & children) const;
0041 
0042   /**
0043    * Return the matrix element squared for a given mode and phase-space channel.
0044    * @param ichan The channel we are calculating the matrix element for. 
0045    * @param part The decaying Particle.
0046    * @param outgoing The particles produced in the decay
0047    * @param momenta  The momenta of the particles produced in the decay
0048    * @param meopt Option for the calculation of the matrix element
0049    * @return The matrix element squared for the phase-space configuration.
0050    */
0051   double me2(const int ichan,const Particle & part,
0052          const tPDVector & outgoing,
0053          const vector<Lorentz5Momentum> & momenta,
0054          MEOption meopt) const;
0055 
0056   /**
0057    *   Construct the SpinInfos for the particles produced in the decay
0058    */
0059   virtual void constructSpinInfo(const Particle & part,
0060                  ParticleVector outgoing) const;
0061 
0062   /**
0063    * Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
0064    * @param dm The DecayMode
0065    * @param mecode The code for the matrix element as described
0066    *               in the GenericWidthGenerator class, in this case 2.
0067    * @param coupling The coupling for the matrix element.
0068    * @return True or False if this mode can be handled.
0069    */
0070   bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
0071 
0072   /**
0073    * Output the setup information for the particle database
0074    * @param os The stream to output the information to
0075    * @param header Whether or not to output the information for MySQL
0076    */
0077   virtual void dataBaseOutput(ofstream & os,bool header) const;
0078 
0079 public:
0080 
0081   /** @name Functions used by the persistent I/O system. */
0082   //@{
0083   /**
0084    * Function used to write out object persistently.
0085    * @param os the persistent output stream written to.
0086    */
0087   void persistentOutput(PersistentOStream & os) const;
0088 
0089   /**
0090    * Function used to read in object persistently.
0091    * @param is the persistent input stream read from.
0092    * @param version the version number of the object when written.
0093    */
0094   void persistentInput(PersistentIStream & is, int version);
0095   //@}
0096 
0097   /**
0098    * The standard Init function used to initialize the interfaces.
0099    * Called exactly once for each class by the class description system
0100    * before the main function starts or
0101    * when this class is dynamically loaded.
0102    */
0103   static void Init();
0104 
0105 protected:
0106 
0107   /** @name Clone Methods. */
0108   //@{
0109   /**
0110    * Make a simple clone of this object.
0111    * @return a pointer to the new object.
0112    */
0113   virtual IBPtr clone() const;
0114 
0115   /** Make a clone of this object, possibly modifying the cloned object
0116    * to make it sane.
0117    * @return a pointer to the new object.
0118    */
0119   virtual IBPtr fullclone() const;
0120   //@}
0121 
0122 protected:
0123 
0124   /** @name Standard Interfaced functions. */
0125   //@{
0126   /**
0127    * Initialize this object after the setup phase before saving and
0128    * EventGenerator to disk.
0129    * @throws InitException if object could not be initialized properly.
0130    */
0131   virtual void doinit();
0132 
0133   /**
0134    * Initialize this object to the begining of the run phase.
0135    */
0136   virtual void doinitrun();
0137   //@}
0138 
0139 private:
0140 
0141   /**
0142    * The assignment operator is private and must never be called.
0143    * In fact, it should not even be implemented.
0144    */
0145   PseudoScalar2FermionsDecayer & operator=(const PseudoScalar2FermionsDecayer &) = delete;
0146 
0147 public:
0148 
0149   /**
0150    *   Set the parameters for a decay mode
0151    */
0152   string setUpDecayMode(string arg);
0153 
0154 private:
0155 
0156   /**
0157    * coupling for a decay
0158    */
0159   vector<double> coupling_;
0160 
0161   /**
0162    * the PDG codes for the incoming particles
0163    */
0164   vector<long> incoming_;
0165 
0166   /**
0167    * the PDG codes for the outgoing fermion-antifermion
0168    */
0169   vector<pair<long,long>> outgoing_;
0170 
0171   /**
0172    * maximum weight for a decay
0173    */
0174   vector<double> maxweight_;
0175 
0176   /**
0177    *  Spin density matrix
0178    */
0179   mutable RhoDMatrix rho_;
0180 
0181   /**
0182    *  Spinors for the decay products
0183    */
0184   mutable vector<Helicity::LorentzSpinor   <SqrtEnergy> > wave_;
0185 
0186   /**
0187    *  barred spinors for the decay products
0188    */
0189   mutable vector<Helicity::LorentzSpinorBar<SqrtEnergy> > wavebar_;
0190 
0191 };
0192 
0193 }
0194 
0195 #endif /* Herwig_PseudoScalar2FermionsDecayer_H */