Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MEfv2fs.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_MEfv2fs_H
0010 #define HERWIG_MEfv2fs_H
0011 //
0012 // This is the declaration of the MEfv2fs class.
0013 //
0014 
0015 #include "GeneralHardME.h"
0016 #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
0017 #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
0018 #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
0019 #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
0020 #include "Herwig/MatrixElement/ProductionMatrixElement.h"
0021 #include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
0022 #include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
0023 #include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
0024 #include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
0025 #include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
0026 #include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
0027 #include "ThePEG/Helicity/Vertex/AbstractFFVSVertex.h"
0028 
0029 namespace Herwig {
0030 using namespace ThePEG;
0031 using ThePEG::Helicity::SpinorWaveFunction;
0032 using ThePEG::Helicity::SpinorBarWaveFunction;
0033 using ThePEG::Helicity::VectorWaveFunction;
0034 using ThePEG::Helicity::ScalarWaveFunction;
0035 
0036 
0037 /**
0038  * This class is designed to implement the matrix element for 
0039  * fermion-vector to fermion scalar. It inherits from GeneralHardME 
0040  * and implements the required virtual functions.
0041  *
0042  * @see GeneralHardME
0043  */
0044 class MEfv2fs: public GeneralHardME {
0045 
0046   /** Vector of SpinorWaveFunctions. */
0047   typedef vector<SpinorWaveFunction> SpinorVector;
0048 
0049   /** Vector of SpinorBarWaveFunctions. */
0050   typedef vector<SpinorBarWaveFunction> SpinorBarVector;
0051 
0052   /** Vector of VectorWaveFunctions. */
0053   typedef vector<VectorWaveFunction> VecWFVector;
0054 
0055 public:
0056 
0057   /** @name Virtual functions required by the GeneralHardME class. */
0058   //@{
0059   /**
0060    * The matrix element for the kinematical configuration
0061    * previously provided by the last call to setKinematics(), suitably
0062    * scaled by sHat() to give a dimension-less number.
0063    * @return the matrix element scaled with sHat() to give a
0064    * dimensionless number.
0065    */
0066   virtual double me2() const;
0067   //@}
0068 
0069   /**
0070    * Construct the vertex information for the spin correlations
0071    * @param subp Pointer to the relevent SubProcess
0072    */
0073   virtual void constructVertex(tSubProPtr subp);
0074 
0075 private:
0076 
0077   /** @name Functions to calculate production matrix elements and me2. */
0078   //@{
0079   /**
0080    * Calculate me2 and the production matrix element for the normal mode.
0081    * @param spIn Vector of SpinorWaveFunction for the incoming fermion
0082    * @param vecIn Vector of VectorWaveFunction for incoming boson
0083    * @param spbOut Vector of SpinorBarWaveFunction for outgoing fermion
0084    * @param scaOut ScalarWaveFunction for outgoing scalar.
0085    * @param first Whether or not first call to decide if colour decomposition etc
0086    * should be calculated
0087    * @param full_me The value of me2 calculation
0088    */
0089   ProductionMatrixElement fv2fbsHeME(const SpinorVector & spIn, 
0090                      const VecWFVector & vecIn,
0091                      const SpinorBarVector & spbOut,
0092                      const ScalarWaveFunction & scaOut,
0093                      double & full_me, bool first) const;
0094   
0095   /**
0096    * Calculate me2 and the production matrix element for the cc mode.
0097    * @param spbIn Vector of SpinorBarWaveFunction for the incoming fermion
0098    * @param vecIn Vector of VectorWaveFunction for incoming boson
0099    * @param spOut Vector of SpinorWaveFunction for outgoing fermion
0100    * @param scaOut ScalarWaveFunction for outgoing scalar.
0101    * @param first Whether or not first call to decide if colour decomposition etc
0102    * should be calculated
0103    * @param full_me The value of me2 calculation
0104    */
0105   ProductionMatrixElement fbv2fsHeME(const SpinorBarVector & spbIn, 
0106                      const VecWFVector & vecIn,
0107                      const SpinorVector & spOut,
0108                      const ScalarWaveFunction & scaOut,
0109                      double & full_me, bool first) const;
0110   //@}
0111 
0112 protected:
0113 
0114   /**
0115    * A debugging function to test the value of me2 against an
0116    * analytic function.
0117    * @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
0118    */
0119   virtual void debug(double me2) const;
0120 
0121 public:
0122 
0123   /** @name Functions used by the persistent I/O system. */
0124   //@{
0125   /**
0126    * Function used to write out object persistently.
0127    * @param os the persistent output stream written to.
0128    */
0129   void persistentOutput(PersistentOStream & os) const;
0130 
0131   /**
0132    * Function used to read in object persistently.
0133    * @param is the persistent input stream read from.
0134    * @param version the version number of the object when written.
0135    */
0136   void persistentInput(PersistentIStream & is, int version);
0137   //@}
0138 
0139   /**
0140    * The standard Init function used to initialize the interfaces.
0141    * Called exactly once for each class by the class description system
0142    * before the main function starts or
0143    * when this class is dynamically loaded.
0144    */
0145   static void Init();
0146 
0147 protected:
0148 
0149   /** @name Standard Interfaced functions. */
0150   //@{
0151   /**
0152    * Initialize this object after the setup phase before saving an
0153    * EventGenerator to disk.
0154    * @throws InitException if object could not be initialized properly.
0155    */
0156   void doinit();
0157   //@}
0158 
0159 protected:
0160 
0161   /** @name Clone Methods. */
0162   //@{
0163   /**
0164    * Make a simple clone of this object.
0165    * @return a pointer to the new object.
0166    */
0167   virtual IBPtr clone() const {return new_ptr(*this);}
0168 
0169   /** Make a clone of this object, possibly modifying the cloned object
0170    * to make it sane.
0171    * @return a pointer to the new object.
0172    */
0173   virtual IBPtr fullclone() const {return new_ptr(*this);}
0174   //@}
0175 
0176 private:
0177 
0178   /**
0179    * The assignment operator is private and must never be called.
0180    * In fact, it should not even be implemented.
0181    */
0182   MEfv2fs & operator=(const MEfv2fs &) = delete;
0183 
0184 private:
0185 
0186   /**
0187    * Store a pair of  FFSVertex and VSSVertex pointers  
0188    */
0189   vector<pair<AbstractFFSVertexPtr, AbstractVSSVertexPtr> > scalar_;
0190 
0191   /**
0192    * Store a pair of  FFSVertex and FFVVertex pointers  
0193    */
0194   vector<pair<AbstractFFSVertexPtr, AbstractFFVVertexPtr> > fermion_;
0195 
0196   /**
0197    * Store a pair of  VVSVertex and FFVVertex pointers  
0198    */
0199   vector<pair<AbstractFFVVertexPtr,AbstractVVSVertexPtr> > vector_;
0200 
0201   /**
0202    * Store a pair of  FFSVertex and FFVVertex pointers  
0203    */
0204   vector<pair<AbstractRFSVertexPtr, AbstractRFVVertexPtr> > RSfermion_;
0205 
0206   /**
0207    *  Store any 4-point vertices
0208    */
0209   vector<AbstractFFVSVertexPtr> four_;
0210 };
0211 
0212 }
0213 
0214 #endif /* HERWIG_MEfv2fs_H */