Back to home page

EIC code displayed by LXR

 
 

    


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

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