Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MEff2vv.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_MEff2vv_H
0010 #define HERWIG_MEff2vv_H
0011 //
0012 // This is the declaration of the MEff2vv class.
0013 //
0014 
0015 #include "GeneralHardME.h"
0016 #include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
0017 #include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
0018 #include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
0019 #include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
0020 #include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
0021 #include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
0022 #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
0023 #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
0024 #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
0025 #include "Herwig/MatrixElement/ProductionMatrixElement.h"
0026 
0027 namespace Herwig {
0028 using namespace ThePEG;
0029 using ThePEG::Helicity::SpinorWaveFunction;
0030 using ThePEG::Helicity::SpinorBarWaveFunction;
0031 using ThePEG::Helicity::VectorWaveFunction;
0032 
0033 /**
0034  * This class implements the matrix element calculation for a generic
0035  * \f$\Psi \Psi \rightarrow V^{\mu} V^{\nu}\f$ process. 
0036  *
0037  * @see \ref MEff2vvInterfaces "The interfaces"
0038  * defined for MEff2vv.
0039  */
0040 class MEff2vv: public GeneralHardME {
0041 public:
0042   
0043   /** Vector of SpinorWaveFunctions objects */
0044   typedef vector<SpinorWaveFunction> SpinorVector;
0045 
0046   /** Vector of SpinorBarWaveFunction objects. */
0047   typedef vector<SpinorBarWaveFunction> SpinorBarVector;
0048 
0049   /** Vector of VectorWaveFunction objects. */
0050   typedef vector<VectorWaveFunction> VBVector;
0051 
0052 public:
0053 
0054   /**
0055    * The default constructor.
0056    */
0057   MEff2vv() : vector_(0), tensor_(0), scalar_(0) {}
0058 
0059   /** @name Virtual functions required by the GeneralHardME class. */
0060   //@{
0061   /**
0062    * The matrix element for the kinematical configuration
0063    * previously provided by the last call to setKinematics(), suitably
0064    * scaled by sHat() to give a dimension-less number.
0065    * @return the matrix element scaled with sHat() to give a
0066    * dimensionless number.
0067    */
0068   virtual double me2() const;
0069   //@}
0070 
0071   /**
0072    * Construct the vertex information for the spin correlations
0073    * @param sub Pointer to the relevent SubProcess
0074    */
0075   virtual void constructVertex(tSubProPtr sub);
0076 
0077 
0078 protected:
0079   
0080   /**
0081    * A debugging function to test the value of me2 against an
0082    * analytic function.
0083    * @param me2 \f$ |\bar{\mathcal{M}}|^2 \f$
0084    */
0085   virtual void debug(double me2) const;
0086 
0087 private: 
0088   
0089   /**
0090    * Compute the production matrix element.
0091    * @param sp Spinors for first incoming fermion
0092    * @param sbar SpinorBar Wavefunctions for incoming anti-fermion
0093    * @param v1 A vector of VectorWaveFunction objects for the first vector
0094    * @param m1 Whether v1 is massless or not
0095    * @param v2 A vector of VectorWaveFunction objects for the second vector
0096    * @param m2 Whether v2 is massless or not
0097    * @param first Whether or not first call to decide if colour decomposition etc
0098    * should be calculated
0099    * @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
0100    */
0101   ProductionMatrixElement 
0102   ff2vvME(const SpinorVector & sp, const SpinorBarVector sbar, 
0103       const VBVector & v1, bool m1, const VBVector & v2, bool m2,
0104       double & me2, bool first) const;
0105 
0106 public:
0107 
0108   /** @name Functions used by the persistent I/O system. */
0109   //@{
0110   /**
0111    * Function used to write out object persistently.
0112    * @param os the persistent output stream written to.
0113    */
0114   void persistentOutput(PersistentOStream & os) const;
0115 
0116   /**
0117    * Function used to read in object persistently.
0118    * @param is the persistent input stream read from.
0119    * @param version the version number of the object when written.
0120    */
0121   void persistentInput(PersistentIStream & is, int version);
0122   //@}
0123 
0124   /**
0125    * The standard Init function used to initialize the interfaces.
0126    * Called exactly once for each class by the class description system
0127    * before the main function starts or
0128    * when this class is dynamically loaded.
0129    */
0130   static void Init();
0131 
0132 protected:
0133 
0134   /** @name Clone Methods. */
0135   //@{
0136   /**
0137    * Make a simple clone of this object.
0138    * @return a pointer to the new object.
0139    */
0140   virtual IBPtr clone() const {return new_ptr(*this);}
0141 
0142   /** Make a clone of this object, possibly modifying the cloned object
0143    * to make it sane.
0144    * @return a pointer to the new object.
0145    */
0146   virtual IBPtr fullclone() const {return new_ptr(*this);}
0147   //@}
0148 
0149 protected:
0150 
0151   /** @name Standard Interfaced functions. */
0152   //@{
0153   /**
0154    * Initialize this object after the setup phase before saving an
0155    * EventGenerator to disk.
0156    * @throws InitException if object could not be initialized properly.
0157    */
0158   virtual void doinit();
0159   //@}
0160   
0161 private:
0162 
0163   /**
0164    * The assignment operator is private and must never be called.
0165    * In fact, it should not even be implemented.
0166    */
0167   MEff2vv & operator=(const MEff2vv &) = delete;
0168 
0169 private:
0170 
0171   /**
0172    * Storage for a dynamically cast vertices for a tchannel vector
0173    * intermediate
0174    */
0175   vector<pair<AbstractFFVVertexPtr, AbstractFFVVertexPtr> > fermion_;
0176 
0177   /**
0178    * Storage for a dynamically cast vertices for a schannel vector
0179    * intermediate
0180    */
0181   vector<pair<AbstractFFVVertexPtr, AbstractVVVVertexPtr> > vector_;
0182 
0183   /**
0184    * Storage for a dynamically cast vertices for a schannel scalar
0185    * intermediate
0186    */
0187   vector<pair<AbstractFFTVertexPtr, AbstractVVTVertexPtr> > tensor_;
0188 
0189   /**
0190    * Storage for a dynamically cast vertices for a schannel scalar
0191    * intermediate for massless external vector bosons
0192    */
0193   vector<pair<AbstractFFSVertexPtr, AbstractVVSVertexPtr> > scalar_;
0194 };
0195 
0196 }
0197 
0198 #endif /* HERWIG_MEff2vv_H */