Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MEQCD2to2.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_MEQCD2to2_H
0010 #define HERWIG_MEQCD2to2_H
0011 //
0012 // This is the declaration of the MEQCD2to2 class.
0013 //
0014 
0015 #include "Herwig/MatrixElement/HwMEBase.h"
0016 #include "Herwig/MatrixElement/ProductionMatrixElement.h"
0017 #include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
0018 #include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
0019 #include "ThePEG/Helicity/Vertex/AbstractVVVVVertex.h"
0020 #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
0021 #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
0022 #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
0023 
0024 namespace Herwig {
0025 using namespace ThePEG;
0026 using namespace ThePEG::Helicity;
0027 
0028 /**
0029  * The MEQCD2to2 class provides the matrix elements for \f$2\to2\f$ 
0030  * QCD scattering processes in hadron-hadron collisions.
0031  *
0032  * @see \ref MEQCD2to2Interfaces "The interfaces"
0033  * defined for MEQCD2to2.
0034  */
0035 class MEQCD2to2: public HwMEBase {
0036 
0037 public:
0038 
0039   /**
0040    * The default constructor.
0041    */
0042   MEQCD2to2();
0043 
0044   /** @name Virtual functions required by the MEBase class. */
0045   //@{
0046   /**
0047    * Return the order in \f$\alpha_S\f$ in which this matrix
0048    * element is given.
0049    */
0050   virtual unsigned int orderInAlphaS() const;
0051 
0052   /**
0053    * Return the order in \f$\alpha_{EW}\f$ in which this matrix
0054    * element is given.
0055    */
0056   virtual unsigned int orderInAlphaEW() const;
0057 
0058   /**
0059    * The matrix element for the kinematical configuration
0060    * previously provided by the last call to setKinematics(), suitably
0061    * scaled by sHat() to give a dimension-less number.
0062    * @return the matrix element scaled with sHat() to give a
0063    * dimensionless number.
0064    */
0065   virtual double me2() const;
0066 
0067   /**
0068    * Return the scale associated with the last set phase space point.
0069    */
0070   virtual Energy2 scale() const;
0071 
0072   /**
0073    * Add all possible diagrams with the add() function.
0074    */
0075   virtual void getDiagrams() const;
0076 
0077   /**
0078    * Get diagram selector. With the information previously supplied with the
0079    * setKinematics method, a derived class may optionally
0080    * override this method to weight the given diagrams with their
0081    * (although certainly not physical) relative probabilities.
0082    * @param dv the diagrams to be weighted.
0083    * @return a Selector relating the given diagrams to their weights.
0084    */
0085   virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
0086 
0087   /**
0088    * Return a Selector with possible colour geometries for the selected
0089    * diagram weighted by their relative probabilities.
0090    * @param diag the diagram chosen.
0091    * @return the possible colour geometries weighted by their
0092    * relative probabilities.
0093    */
0094   virtual Selector<const ColourLines *>
0095   colourGeometries(tcDiagPtr diag) const;
0096 
0097   /**
0098    *  Construct the vertex of spin correlations.
0099    */
0100   virtual void constructVertex(tSubProPtr);
0101   //@}
0102 
0103 public:
0104 
0105   /** @name Functions used by the persistent I/O system. */
0106   //@{
0107   /**
0108    * Function used to write out object persistently.
0109    * @param os the persistent output stream written to.
0110    */
0111   void persistentOutput(PersistentOStream & os) const;
0112 
0113   /**
0114    * Function used to read in object persistently.
0115    * @param is the persistent input stream read from.
0116    * @param version the version number of the object when written.
0117    */
0118   void persistentInput(PersistentIStream & is, int version);
0119   //@}
0120 
0121   /**
0122    * The standard Init function used to initialize the interfaces.
0123    * Called exactly once for each class by the class description system
0124    * before the main function starts or
0125    * when this class is dynamically loaded.
0126    */
0127   static void Init();
0128 
0129 protected:
0130 
0131   /**
0132    *  Members to calculate the matrix elements
0133    */
0134   //@{
0135   /**
0136    * Matrix element for \f$gg\to gg\f$.
0137    * @param g1   The wavefunctions for the first  incoming gluon
0138    * @param g2   The wavefunctions for the second incoming gluon
0139    * @param g3   The wavefunctions for the first  outgoing gluon
0140    * @param g4   The wavefunctions for the second outgoing gluon
0141    * @param flow The colour flow
0142    */
0143   double gg2ggME(vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
0144          vector<VectorWaveFunction> &g3,vector<VectorWaveFunction> &g4,
0145          unsigned int flow) const;
0146 
0147   /**
0148    * Matrix element for \f$gg\to q\bar{q}\f$
0149    * @param g1   The wavefunctions for the first  incoming gluon
0150    * @param g2   The wavefunctions for the second incoming gluon
0151    * @param q    The wavefunction  for the outgoing quark
0152    * @param qbar The wavefunction  for the outgoing antiquark
0153    * @param flow The colour flow
0154    */
0155   double gg2qqbarME(vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
0156             vector<SpinorBarWaveFunction> & q,vector<SpinorWaveFunction> & qbar,
0157             unsigned int flow) const;
0158 
0159   /**
0160    * Matrix element for \f$q\bar{q}\to gg\f$
0161    * @param q    The wavefunction  for the incoming quark
0162    * @param qbar The wavefunction  for the incoming antiquark
0163    * @param g1   The wavefunctions for the first  outgoing gluon
0164    * @param g2   The wavefunctions for the second outgoing gluon
0165    * @param flow The colour flow
0166    */
0167   double qqbar2ggME(vector<SpinorWaveFunction> & q,vector<SpinorBarWaveFunction> & qbar,
0168             vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
0169             unsigned int flow) const;
0170 
0171   /**
0172    * Matrix element for \f$qg\to qg\f$
0173    * @param qin  The wavefunction for the incoming quark
0174    * @param g2   The wavefunction for the incoming gluon
0175    * @param qout The wavefunction for the outgoing quark
0176    * @param g4   The wavefunction for the outgoing gluon
0177    * @param flow The colour flow
0178    */
0179   double qg2qgME(vector<SpinorWaveFunction> & qin,vector<VectorWaveFunction> &g2,
0180          vector<SpinorBarWaveFunction> & qout,vector<VectorWaveFunction> &g4,
0181          unsigned int flow) const;
0182 
0183   /**
0184    * Matrix elements for \f$\bar{q}g\to \bar{q}g\f$.
0185    * @param qin  The wavefunction for the incoming antiquark
0186    * @param g2   The wavefunction for the incoming gluon
0187    * @param qout The wavefunction for the outgoing antiquark
0188    * @param g4   The wavefunction for the outgoing gluon
0189    * @param flow The colour flow
0190    */
0191   double qbarg2qbargME(vector<SpinorBarWaveFunction> & qin,
0192                vector<VectorWaveFunction> &g2,
0193                vector<SpinorWaveFunction> & qout,vector<VectorWaveFunction> &g4,
0194                unsigned int flow) const;
0195 
0196   /**
0197    * Matrix element for \f$qq\to qq\f$
0198    * @param q1 The wavefunction  for the first  incoming quark
0199    * @param q2 The wavefunction  for the second incoming quark
0200    * @param q3 The wavefunction  for the first  outgoing quark
0201    * @param q4 The wavefunction  for the second outgoing quark
0202    * @param flow The colour flow
0203    */
0204   double qq2qqME(vector<SpinorWaveFunction> & q1, vector<SpinorWaveFunction> & q2,
0205          vector<SpinorBarWaveFunction> & q3, vector<SpinorBarWaveFunction> & q4,
0206          unsigned int flow) const;
0207 
0208   /**
0209    * Matrix element for \f$\bar{q}\bar{q}\to \bar{q}\bar{q}\f$
0210    * @param q1 The wavefunction  for the first  incoming antiquark
0211    * @param q2 The wavefunction  for the second incoming antiquark
0212    * @param q3 The wavefunction  for the first  outgoing antiquark
0213    * @param q4 The wavefunction  for the second outgoing antiquark
0214    * @param flow The colour flow
0215    */
0216   double qbarqbar2qbarqbarME(vector<SpinorBarWaveFunction> & q1,
0217                  vector<SpinorBarWaveFunction> & q2,
0218                  vector<SpinorWaveFunction>    & q3,
0219                  vector<SpinorWaveFunction>    & q4,
0220                  unsigned int flow) const;
0221 
0222   /**
0223    * Matrix element for \f$q\bar{q}\to q\bar{q}\f$
0224    * @param q1 The wavefunction  for the incoming quark
0225    * @param q2 The wavefunction  for the incoming antiquark
0226    * @param q3 The wavefunction  for the outgoing quark
0227    * @param q4 The wavefunction  for the outgoing antiquark
0228    * @param flow The colour flow
0229    */
0230   double qqbar2qqbarME(vector<SpinorWaveFunction> & q1,
0231                vector<SpinorBarWaveFunction> & q2,
0232                vector<SpinorBarWaveFunction>    & q3,
0233                vector<SpinorWaveFunction>    & q4,
0234                unsigned int flow) const;
0235   //@}
0236 
0237 protected:
0238 
0239   /** @name Clone Methods. */
0240   //@{
0241   /**
0242    * Make a simple clone of this object.
0243    * @return a pointer to the new object.
0244    */
0245   virtual IBPtr clone() const { return new_ptr(*this); }
0246 
0247   /** Make a clone of this object, possibly modifying the cloned object
0248    * to make it sane.
0249    * @return a pointer to the new object.
0250    */
0251   virtual IBPtr fullclone() const { return new_ptr(*this); }
0252   //@}
0253 
0254 protected:
0255 
0256   /** @name Standard Interfaced functions. */
0257   //@{
0258   /**
0259    * Initialize this object after the setup phase before saving an
0260    * EventGenerator to disk.
0261    * @throws InitException if object could not be initialized properly.
0262    */
0263   virtual void doinit();
0264 
0265   /**
0266    * Rebind pointer to other Interfaced objects. Called in the setup phase
0267    * after all objects used in an EventGenerator has been cloned so that
0268    * the pointers will refer to the cloned objects afterwards.
0269    * @param trans a TranslationMap relating the original objects to
0270    * their respective clones.
0271    * @throws RebindException if no cloned object was found for a given
0272    * pointer.
0273    */
0274   virtual void rebind(const TranslationMap & trans)
0275    ;
0276 
0277   /**
0278    * Return a vector of all pointers to Interfaced objects used in this
0279    * object.
0280    * @return a vector of pointers.
0281    */
0282   virtual IVector getReferences();
0283   //@}
0284 
0285 
0286 private:
0287 
0288   /**
0289    * The assignment operator is private and must never be called.
0290    * In fact, it should not even be implemented.
0291    */
0292   MEQCD2to2 & operator=(const MEQCD2to2 &) = delete;
0293 
0294 private:
0295 
0296   /**
0297    *  Vertices needed to compute the diagrams
0298    */
0299   //@{
0300   /**
0301    *  \f$gggg\f$ vertex
0302    */
0303   AbstractVVVVVertexPtr _ggggvertex;
0304 
0305   /**
0306    *  \f$ggg\f$ vertex
0307    */
0308   AbstractVVVVertexPtr _gggvertex;
0309 
0310   /**
0311    *  \f$q\bar{q}g\f$ vertex
0312    */
0313   AbstractFFVVertexPtr _qqgvertex;
0314   //@}
0315 
0316   /**
0317    *  Maximum numbere of quark flavours to include
0318    */
0319   unsigned int _maxflavour;
0320 
0321   /**
0322    *  Processes to include
0323    */
0324   unsigned int _process;
0325 
0326   /**
0327    *  Colour flow
0328    */
0329   mutable unsigned int _flow;
0330 
0331   /**
0332    *  Diagram
0333    */
0334   mutable unsigned int _diagram;
0335 
0336   /**
0337    *  Matrix element
0338    */
0339   mutable ProductionMatrixElement _me;
0340 
0341   /**
0342    *  ParticleData objects of the partons
0343    */  
0344   //@{
0345   /**
0346    *  The gluon
0347    */
0348   PDPtr _gluon;
0349   
0350   /**
0351    *  the quarks
0352    */
0353   vector<PDPtr> _quark;
0354 
0355   /**
0356    *  the antiquarks
0357    */
0358   vector<PDPtr> _antiquark;
0359   //@}
0360 };
0361 
0362 }
0363 
0364 #endif /* HERWIG_MEQCD2to2_H */