Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:27

0001 // -*- C++ -*-
0002 //
0003 // ME2to2QCD.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG 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 ThePEG_ME2to2QCD_H
0010 #define ThePEG_ME2to2QCD_H
0011 // This is the declaration of the ME2to2QCD class.
0012 
0013 #include "ThePEG/MatrixElement/ME2to2Base.h"
0014 
0015 namespace ThePEG {
0016 
0017 /**
0018  * The ME2to2QCD class inherits from the ME2to2Base class and can be
0019  * used as a sub class for all QCD 2\f$\rightarrow\f$ 2 processes. It
0020  * implements some common functions such as common pre-factors,
0021  * maximum number of flavours, treatment of interference terms and
0022  * possibility to enhance certain terms.
0023  *
0024  * @see \ref ME2to2QCDInterfaces "The interfaces"
0025  * defined for ME2to2QCD.
0026  * @see ME2to2Base
0027  */
0028 class ME2to2QCD: public ME2to2Base {
0029 
0030 public:
0031 
0032   /** @name Standard constructors and destructors. */
0033   //@{
0034   /**
0035    * Default constructor.
0036    */
0037   ME2to2QCD()
0038     : theMaxFlavour(5), theKfac(1.0), theKfacA(1.0), useInterference(true) {}
0039 
0040   /**
0041    * Destructor.
0042    */
0043   virtual ~ME2to2QCD();
0044   //@}
0045 
0046 public:
0047 
0048   /** @name Virtual functions required by the MEBase class. */
0049   //@{
0050   /**
0051    * Return the order in \f$\alpha_S\f$ in which this matrix element
0052    * is given. Returns 2.
0053    */
0054   virtual unsigned int orderInAlphaS() const;
0055 
0056   /**
0057    * Return the order in \f$\alpha_{EM}\f$ in which this matrix
0058    * element is given. Returns 0.
0059    */
0060   virtual unsigned int orderInAlphaEW() const;
0061 
0062   /**
0063    * The common prefactor for all 2\f$\rightarrow\f$ 2 QCD sub-processes
0064    * ie. \f$\alpha_S^2\f$.
0065    */
0066   double comfac() const;
0067 
0068   /**
0069    * Return the heaviest flavour allowed for this matrix element.
0070    */
0071   int maxFlavour() const { return theMaxFlavour; }
0072 
0073   /**
0074    * K-factor for artificially boosting the cross-section.
0075    */
0076   double Kfac() const { return theKfac; }
0077 
0078   /**
0079    * K-factor for artificially boosting colour-annihilation diagrams.
0080    */
0081   double KfacA() const { return theKfacA >= 0.0? theKfacA: theKfac; }
0082 
0083   /**
0084    * Return true if interference terms should be used.
0085    */
0086   bool interference() const { return useInterference; }
0087 
0088   /**
0089    * Return true if argument is a quark.
0090    */
0091   bool isQuark(const ParticleData & p) const {
0092     return ( p.id() && abs(p.id()) <= maxFlavour() );
0093   }
0094 
0095   /**
0096    * Return the quark with flavour i (or gluon if i = 0);
0097    */
0098   tcPDPtr quark(int i) const;
0099   //@}
0100 
0101 public:
0102 
0103   /** @name Functions used by the persistent I/O system. */
0104   //@{
0105   /**
0106    * Function used to write out object persistently.
0107    * @param os the persistent output stream written to.
0108    */
0109   void persistentOutput(PersistentOStream & os) const;
0110 
0111   /**
0112    * Function used to read in object persistently.
0113    * @param is the persistent input stream read from.
0114    * @param version the version number of the object when written.
0115    */
0116   void persistentInput(PersistentIStream & is, int version);
0117   //@}
0118 
0119   /**
0120    * Standard Init function used to initialize the interfaces.
0121    */
0122   static void Init();
0123 
0124 private:
0125 
0126   /**
0127    * The heaviest flavour allowed for incoming and outgoing partons.
0128    */
0129   int theMaxFlavour;
0130 
0131   /**
0132    * Overall K-factor used to boost this cross-section.
0133    */
0134   double theKfac;
0135 
0136   /**
0137    * Overall K-factors used to boost the colour annihilation diagram
0138    * in the cross-section.
0139    */
0140   double theKfacA;
0141 
0142   /**
0143    * Flag so tell whether interference should be used or not.
0144    */
0145   bool useInterference;
0146 
0147 private:
0148 
0149   /**
0150    * Describe an abstract base class with persistent data.
0151    */
0152   static AbstractClassDescription<ME2to2QCD> initME2to2QCD;
0153 
0154   /**
0155    *  Private and non-existent assignment operator.
0156    */
0157   ME2to2QCD & operator=(const ME2to2QCD &) = delete;
0158 
0159 };
0160 
0161 }
0162 
0163 
0164 namespace ThePEG {
0165 
0166 /** @cond TRAITSPECIALIZATIONS */
0167 
0168 /**
0169  * This template specialization informs ThePEG about the
0170  * base class of ME2to2QCD.
0171  */
0172 template <>
0173 struct BaseClassTrait<ME2to2QCD,1>: public ClassTraitsType {
0174   /** Typedef of the base class of ME2to2QCD. */
0175   typedef ME2to2Base NthBase;
0176 };
0177 
0178 /**
0179  * This template specialization informs ThePEG about the name of the
0180  * ME2to2QCD class.
0181  */
0182 template <>
0183 struct ClassTraits<ME2to2QCD>: public ClassTraitsBase<ME2to2QCD> {
0184   /** Return the class name. */
0185   static string className() { return "ThePEG::ME2to2QCD"; }
0186 };
0187 
0188 /** @endcond */
0189 
0190 }
0191 
0192 #endif /* ThePEG_ME2to2QCD_H */