Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MatchboxOLPME.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_MatchboxOLPME_H
0010 #define Herwig_MatchboxOLPME_H
0011 //
0012 // This is the declaration of the MatchboxOLPME class.
0013 //
0014 
0015 #include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
0016 
0017 namespace Herwig {
0018 
0019 using namespace ThePEG;
0020 
0021 /**
0022  * \ingroup Matchbox
0023  * \author Simon Platzer
0024  *
0025  * \brief MatchboxOLPME implements OLP interfaces.
0026  */
0027 class MatchboxOLPME: public MatchboxAmplitude {
0028 
0029 public:
0030 
0031   /**
0032    * The default constructor.
0033    */
0034   MatchboxOLPME();
0035 
0036 public:
0037 
0038   /**
0039    * Return true, if this amplitude can handle the given process.
0040    */
0041   virtual bool canHandle(const PDVector& p,
0042              Ptr<MatchboxFactory>::tptr,
0043              bool) const;
0044 
0045   /**
0046    * Set the (tree-level) order in \f$g_S\f$ in which this matrix
0047    * element should be evaluated.
0048    */
0049   virtual void orderInGs(unsigned int ogs) { theOrderInGs = ogs; }
0050 
0051   /**
0052    * Return the (tree-level) order in \f$g_S\f$ in which this matrix
0053    * element is given.
0054    */
0055   virtual unsigned int orderInGs() const { return theOrderInGs; }
0056 
0057   /**
0058    * Set the (tree-level) order in \f$g_{EM}\f$ in which this matrix
0059    * element should be evaluated.
0060    */
0061   virtual void orderInGem(unsigned int oge) { theOrderInGem = oge; }
0062 
0063   /**
0064    * Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
0065    * element is given.
0066    */
0067   virtual unsigned int orderInGem() const { return theOrderInGem; }
0068 
0069   /**
0070    * Return true, if this amplitude is handled by a BLHA one-loop provider
0071    */
0072   virtual bool isOLPTree() const { return true; }
0073 
0074   /**
0075    * Return true, if this amplitude is handled by a BLHA one-loop provider
0076    */
0077   virtual bool isOLPLoop() const { return true; }
0078 
0079   /**
0080    * Return true, if the colour basis is capable of assigning colour
0081    * flows.
0082    */
0083   virtual bool haveColourFlows() const { return false; }
0084 
0085   /**
0086    * Set the xcomb object.
0087    */
0088   virtual void setXComb(tStdXCombPtr xc);
0089 
0090   /**
0091    * Calculate the tree level amplitudes for the phasespace point
0092    * stored in lastXComb.
0093    */
0094   virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr) {}
0095 
0096   /**
0097    * Return the matrix element squared.
0098    */
0099   virtual double me2() const;
0100 
0101   /**
0102    * Return the colour correlated matrix element.
0103    */
0104   virtual double colourCorrelatedME2(pair<int,int> ij) const;
0105 
0106   /**
0107    * Return the large-N colour correlated matrix element.
0108    */
0109   virtual double largeNColourCorrelatedME2(pair<int,int>,
0110                        Ptr<ColourBasis>::tptr) const;
0111 
0112   /**
0113    * Return the largeN matrix element squared.
0114    */
0115   virtual double largeNME2(Ptr<ColourBasis>::tptr largeNBasis) const;
0116 
0117   /**
0118    * Return the colour and spin correlated matrix element.
0119    */
0120   virtual double spinColourCorrelatedME2(pair<int,int> ij,
0121                      const SpinCorrelationTensor& c) const;
0122 
0123   /**
0124    * Return the spin correlated matrix element.
0125    */
0126   virtual double spinCorrelatedME2(pair<int,int> ij,
0127                    const SpinCorrelationTensor& c) const;
0128 
0129   /**
0130    * Return true, if tree-level contributions will be evaluated at amplitude level.
0131    */
0132   virtual bool treeAmplitudes() const { return false; }
0133 
0134   /**
0135    * Return true, if this amplitude is capable of calculating one-loop
0136    * (QCD) corrections.
0137    */
0138   virtual bool haveOneLoop() const { return true; }
0139 
0140   /**
0141    * Return true, if this amplitude only provides
0142    * one-loop (QCD) corrections.
0143    */
0144   virtual bool onlyOneLoop() const { return false; }
0145 
0146   /**
0147    * Return true, if one-loop contributions will be evaluated at amplitude level.
0148    */
0149   virtual bool oneLoopAmplitudes() const { return false; }
0150 
0151   /**
0152    * Return true, if one loop corrections are given in the conventions
0153    * of everything expanded.
0154    */
0155   virtual bool isExpanded() const { return true; }
0156 
0157   /**
0158    * Return the value of the dimensional regularization
0159    * parameter. Note that renormalization scale dependence is fully
0160    * restored in DipoleIOperator.
0161    */
0162   virtual Energy2 mu2() const;
0163 
0164   /**
0165    * Indicate that this amplitude is running alphas by itself.
0166    */
0167   virtual bool hasRunningAlphaS() const;
0168 
0169   /**
0170    * Indicate that this amplitude is running alphaew by itself.
0171    */
0172   virtual bool hasRunningAlphaEW() const;
0173 
0174   /**
0175    * If defined, return the coefficient of the pole in epsilon^2
0176    */
0177   virtual double oneLoopDoublePole() const;
0178 
0179   /**
0180    * If defined, return the coefficient of the pole in epsilon
0181    */
0182   virtual double oneLoopSinglePole() const;
0183 
0184   /**
0185    * Calculate the one-loop amplitudes for the phasespace point
0186    * stored in lastXComb, if provided.
0187    */
0188   virtual void prepareOneLoopAmplitudes(Ptr<MatchboxMEBase>::tcptr) {}
0189 
0190   /**
0191    * Return the one-loop/tree interference.
0192    */
0193   virtual double oneLoopInterference() const;
0194 
0195 public:
0196 
0197   /**
0198    * Call OLP_EvalSubProcess and fill in the results
0199    */
0200   virtual void evalSubProcess() const = 0;
0201 
0202   /**
0203    * Fill in results for the given colour correlator
0204    */
0205   virtual void evalColourCorrelator(pair<int,int> ij) const = 0;
0206 
0207   /**
0208    * Fill in results for the given colour/spin correlator
0209    */
0210   virtual void evalSpinColourCorrelator(pair<int,int> ij) const = 0;
0211 
0212   /**
0213    * Fill in results for the given spin correlator; may not be supported
0214    */
0215   virtual void evalSpinCorrelator(pair<int,int> ij) const;
0216 
0217 public:
0218 
0219   /** @name Functions used by the persistent I/O system. */
0220   //@{
0221   /**
0222    * Function used to write out object persistently.
0223    * @param os the persistent output stream written to.
0224    */
0225   void persistentOutput(PersistentOStream & os) const;
0226 
0227   /**
0228    * Function used to read in object persistently.
0229    * @param is the persistent input stream read from.
0230    * @param version the version number of the object when written.
0231    */
0232   void persistentInput(PersistentIStream & is, int version);
0233   //@}
0234 
0235   /**
0236    * The standard Init function used to initialize the interfaces.
0237    * Called exactly once for each class by the class description system
0238    * before the main function starts or
0239    * when this class is dynamically loaded.
0240    */
0241   static void Init();
0242 
0243 
0244 // If needed, insert declarations of virtual function defined in the
0245 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0246 
0247 
0248 protected:
0249 
0250   /** @name Standard Interfaced functions. */
0251   //@{
0252   /**
0253    * Initialize this object after the setup phase before saving an
0254    * EventGenerator to disk.
0255    * @throws InitException if object could not be initialized properly.
0256    */
0257   virtual void doinit();
0258 
0259   /**
0260    * Initialize this object. Called in the run phase just before
0261    * a run begins.
0262    */
0263   virtual void doinitrun();
0264   //@}
0265 
0266   /**
0267    * Set an optional contract file name to be used
0268    */
0269   static string& optionalContractFile() {
0270     static string s = "";
0271     return s;
0272   }
0273 
0274   /**
0275    * Indicate that the OLP has been started
0276    */
0277   static bool& didStartOLP() {
0278     static bool f = false;
0279     return f;
0280   }
0281 
0282 private:
0283 
0284   /**
0285    * The assignment operator is private and must never be called.
0286    * In fact, it should not even be implemented.
0287    */
0288   MatchboxOLPME & operator=(const MatchboxOLPME &) = delete;
0289 
0290   /**
0291    * The (tree-level) order in \f$g_S\f$ in which this matrix
0292    * element is given.
0293    */
0294   unsigned int theOrderInGs;
0295 
0296   /**
0297    * The (tree-level) order in \f$g_{EM}\f$ in which this matrix
0298    * element is given.
0299    */
0300   unsigned int theOrderInGem;
0301 
0302   /**
0303    * Set the value of the dimensional regularization parameter 
0304    * to the value of the renormalization scale
0305    */
0306   bool theSetMuToMuR;
0307 
0308   /**
0309    * Use the running alpha_s instead of the reference alpha_s.
0310    * This also sets hasRunningAlphaS() to true.
0311    */
0312   bool theUseRunningAlphaS;
0313 
0314   /**
0315    * Use the running alpha_ew instead of the reference alpha_ew.
0316    * This also sets hasRunningAlphaEW() to true.
0317    */
0318   bool theUseRunningAlphaEW;
0319 
0320 };
0321 
0322 }
0323 
0324 #endif /* Herwig_MatchboxOLPME_H */