Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // DipoleMPKOperator.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_DipoleMPKOperator_H
0010 #define HERWIG_DipoleMPKOperator_H
0011 //
0012 // This is the declaration of the DipoleMPKOperator class.
0013 //
0014 
0015 #include "Herwig/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h"
0016 #include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
0017 #include "ThePEG/PDF/PDF.h"
0018 
0019 namespace Herwig {
0020 
0021 using namespace ThePEG;
0022 
0023 /**
0024  * \ingroup Matchbox
0025  * \author Simon Platzer, Daniel Rauch, Christian Reuschle,
0026  *         Johannes Bellm
0027  *
0028  * \brief DipoleMPKOperator implements the P+K
0029  * insertion operator for the massive case.
0030  * DipoleMPKOperator does not apply for dimen-
0031  * sional reduction.
0032  *
0033  */
0034 class DipoleMPKOperator: public MatchboxInsertionOperator {
0035 
0036 public:
0037 
0038   /** @name Standard constructors and destructors. */
0039   //@{
0040   /**
0041    * The default constructor.
0042    */
0043   DipoleMPKOperator();
0044 
0045   /**
0046    * The destructor.
0047    */
0048   virtual ~DipoleMPKOperator();
0049   //@}
0050 
0051 public:
0052 
0053   /**
0054    * Set the XComb object steering the Born matrix
0055    * element this class represents virtual corrections to.
0056    */
0057   virtual void setXComb(tStdXCombPtr xc);
0058 
0059   /**
0060    * Return the number of additional random variables
0061    * needed to calculate this virtual correction.
0062    * We treat all integrations on equal footing.
0063    */
0064   virtual int nDimAdditional() const { return 1; }
0065 
0066   /**
0067    * Return a vector of PDG codes of the light flavours,
0068    * which are contained in the jet particle group.
0069    */
0070   vector<int> NLightJetVec() const;
0071 
0072   /**
0073    * Return a vector of PDG codes of the heavy flavours,
0074    * which are contained in the jet particle group.
0075    */
0076   vector<int> NHeavyJetVec() const;
0077 
0078   /**
0079    * Return a vector of PDG codes of the light flavours,
0080    * which are contained in the associated Born sub-process.
0081    */
0082   vector<int> NLightBornVec() const;
0083 
0084   /**
0085    * Return a vector of PDG codes of the heavy flavours,
0086    * which are contained in the associated Born sub-process.
0087    */
0088   vector<int> NHeavyBornVec() const;
0089 
0090   /**
0091    * Return a vector of PDG codes of the light flavours,
0092    * which are contained in the proton particle group.
0093    */
0094   vector<int> NLightProtonVec() const;
0095 
0096   /**
0097    * Evaluate the finite virtual correction for the
0098    * variables supplied through the Born XComb object
0099    * and possible additional random numbers.
0100    */
0101   virtual double me2() const;
0102 
0103   /**
0104    * Evaluate the finite virtual correction for the
0105    * variables supplied through the Born XComb object
0106    * and possible additional random numbers.
0107    */
0108   virtual CrossSection dSigHatDR() const { 
0109     return sqr(hbarc) * me2() * lastBorn()->lastXComb().jacobian() / (2.*lastSHat());
0110   }
0111 
0112 public:
0113 
0114   /**
0115    * Return true, if contributions exist to
0116    * the given parton.
0117    */
0118   bool apply(tcPDPtr) const;
0119 
0120   /**
0121    * Return true, if contributions exist to
0122    * the given parton.
0123    */
0124   bool applyNotMassless(tcPDPtr) const;
0125 
0126   /**
0127    * Return true, if this virtual correction
0128    * applies to the given process.
0129    */
0130   virtual bool apply(const cPDVector&) const;
0131 
0132   /**
0133    * The initial-final contribution
0134    * [1/(1-z)]_+ + \delta(1-z)
0135    */
0136   double gammaSoft() const;
0137 
0138   /**
0139    * [(1/(1-z))*ln((1-z)/z)]_+
0140    */
0141   double softLogByz(tcPDPtr p) const;
0142 
0143   /**
0144    * [(1/(1-z))*ln((1-z))]_+
0145    */
0146   double softLog(tcPDPtr p) const;
0147 
0148   /**
0149    * The Kbar^{qq} contribution
0150    */
0151   double KBarqq() const;
0152 
0153   /**
0154    * The Ktilde^{qq} contribution
0155    */
0156   double KTildeqq() const;
0157 
0158   /**
0159    * The P^{qq} contribution
0160    */
0161   double Pqq() const;
0162 
0163   /**
0164    * The Kbar^{qg} contribution
0165    */
0166   double KBarqg() const;
0167 
0168   /**
0169    * The Ktilde^{qg} contribution
0170    */
0171   double KTildeqg() const;
0172 
0173   /**
0174    * The P^{qg} contribution
0175    */
0176   double Pqg() const;
0177 
0178   /**
0179    * The Kbar^{gq} contribution
0180    */
0181   double KBargq() const;
0182 
0183   /**
0184    * The Ktilde^{gq} contribution
0185    */
0186   double KTildegq() const;
0187 
0188   /**
0189    * The P^{gq} contribution
0190    */
0191   double Pgq() const;
0192 
0193   /**
0194    * The Kbar^{gg} contribution
0195    */
0196   double KBargg() const;
0197 
0198   /**
0199    * The Ktilde^{gg} contribution
0200    */
0201   double KTildegg() const;
0202 
0203   /**
0204    * The P^{gg} contribution
0205    */
0206   double Pgg() const;
0207 
0208   //////////////////////////////////////
0209 
0210   /**
0211    * Kscript^{a,a'}_j terms with j=quark
0212    */
0213 
0214   /**
0215    * [J^a_{gQ}(z,\mu_Q^2)]_+
0216    * a,a' = quark for later
0217    * use of this function
0218    * in Kscript^{qq}_q
0219    */
0220   double Ja_gQplus(double muQ2) const;
0221 
0222   /**
0223    * [1/(1-z)]_+ * log( (2-z)/(2-z+\mu_Q^2) )
0224    * a,a' = quark for later use of this function
0225    * in Kscript^{qq}_q
0226    */
0227   double gammaSoft2(double muQ2) const;
0228 
0229   /**
0230    * The Kscript^{qq}_q contribution
0231    */
0232   double Kscriptqq_q(Energy2 sja, Energy2 mj2) const;
0233 
0234   /**
0235    * The Kscript^{qg}_q contribution
0236    */
0237   double Kscriptqg_q(Energy2 sja, Energy2 mj2) const;
0238 
0239   /**
0240    * The Kscript^{gq}_q contribution
0241    */
0242   double Kscriptgq_q() const;
0243 
0244   /**
0245    * The Kscript^{gg}_q contribution
0246    */
0247   double Kscriptgg_q(Energy2 sja, Energy2 mj2) const;
0248 
0249   /**
0250    * The Kscriptbar^{qq}_q contribution (B.17)
0251    */
0252   double Kscriptbarqq_q(Energy2 Qja2, Energy2 mj2) const;
0253 
0254   /**
0255    * The Kscriptbar^{qg}_q contribution (B.17)
0256    */
0257   double Kscriptbarqg_q(Energy2 Qja2, Energy2 mj2) const;
0258 
0259   /**
0260    * The Kscriptbar^{gq}_q contribution (B.17)
0261    */
0262   double Kscriptbargq_q() const;
0263 
0264   /**
0265    * The Kscriptbar^{gg}_q contribution (B.17)
0266    */
0267   double Kscriptbargg_q(Energy2 Qja2, Energy2 mj2) const;
0268 
0269   ////////////////////////////
0270 
0271   /**
0272    * Kscript^{a,a'}_j terms with j=gluon
0273    * The ones for a!=a' will return zero
0274    */
0275 
0276   /**
0277    * J^{a;NS}_{Q\bar{Q}}(\mu_Q^2)
0278    * Not folded with 1/z*PDF(x/z)*\Theta(z-x)
0279    */
0280   double JaNS_QQ(double muQ2) const;
0281 
0282   /**
0283    * [J^a_{Q\bar{Q}}(z,\mu_Q^2)]_{z_+}
0284    */
0285   double Ja_QQzplus(double muQ2, int F, double zplus) const;
0286 
0287   /**
0288    * The Kscript^{qq}_g contribution
0289    */
0290   // double Kscriptqq_g(Energy2 sja) const;
0291   double Kscriptqq_g(Energy2 sja, double lambda) const;
0292 
0293   /**
0294    * The Kscript^{qg}_g contribution
0295    */
0296   double Kscriptqg_g() const;
0297 
0298   /**
0299    * The Kscript^{gq}_g contribution
0300    */
0301   double Kscriptgq_g() const;
0302 
0303   /**
0304    * The Kscript^{gg}_g contribution
0305    * equals the Kscript^{qq}_g contribution
0306    */
0307   // double Kscriptgg_g(Energy2 sja) const;
0308   double Kscriptgg_g(Energy2 sja, double lambda) const;
0309 
0310   /**
0311    * The Kscriptbar^{qq}_g contribution (B.18)
0312    */
0313   // double Kscriptbarqq_g(Energy2 Qja2) const;
0314   double Kscriptbarqq_g(Energy2 Qja2, double lambda) const;
0315 
0316   /**
0317    * The Kscriptbar^{qg}_g contribution (B.18)
0318    */
0319   double Kscriptbarqg_g() const;
0320 
0321   /**
0322    * The Kscriptbar^{gq}_g contribution (B.18)
0323    */
0324   double Kscriptbargq_g() const;
0325 
0326   /**
0327    * The Kscriptbar^{gg}_g contribution (B.18)
0328    */
0329   // double Kscriptbargg_g(Energy2 Qja2) const;
0330   double Kscriptbargg_g(Energy2 Qja2, double lambda) const;
0331 
0332   //////////////////////////////////////
0333 
0334   /**
0335    * Get all contributions for the indicated incoming parton.
0336    */
0337   double sumParton(int id) const;
0338 
0339 public:
0340 
0341   /** @name Functions used by the persistent I/O system. */
0342   //@{
0343   /**
0344    * Function used to write out object persistently.
0345    * @param os the persistent output stream written to.
0346    */
0347   void persistentOutput(PersistentOStream & os) const;
0348 
0349   /**
0350    * Function used to read in object persistently.
0351    * @param is the persistent input stream read from.
0352    * @param version the version number of the object when written.
0353    */
0354   void persistentInput(PersistentIStream & is, int version);
0355   //@}
0356 
0357   /**
0358    * The standard Init function used to initialize the interfaces.
0359    * Called exactly once for each class by the class description system
0360    * before the main function starts or
0361    * when this class is dynamically loaded.
0362    */
0363   static void Init();
0364 
0365 protected:
0366 
0367   /** @name Clone Methods. */
0368   //@{
0369   /**
0370    * Make a simple clone of this object.
0371    * @return a pointer to the new object.
0372    */
0373   virtual IBPtr clone() const;
0374 
0375   /** Make a clone of this object, possibly modifying the cloned object
0376    * to make it sane.
0377    * @return a pointer to the new object.
0378    */
0379   virtual IBPtr fullclone() const;
0380   //@}
0381 
0382 private:
0383 
0384   /**
0385    * C_A
0386    */
0387   double CA;
0388 
0389   /**
0390    * C_F
0391    */
0392   double CF;
0393 
0394   /**
0395    * \gamma_q
0396    */
0397   double gammaQuark;
0398 
0399   /**
0400    * \gamma_g
0401    */
0402   double gammaGluon;
0403 
0404   /**
0405    * K_q
0406    */
0407   double KQuark;
0408 
0409   /**
0410    * K_g
0411    */
0412   double KGluon;
0413 
0414   /**
0415    * The scale to be used.
0416    */
0417   mutable Energy2 scale;
0418 
0419   /**
0420    * The PDF to be used.
0421    */
0422   mutable tcPDFPtr pdf;
0423 
0424   /**
0425    * The incoming parton type considered.
0426    */
0427   mutable tcPDPtr particle;
0428 
0429   /**
0430    * The x to be used.
0431    */
0432   mutable double x;
0433 
0434   /**
0435    * The convolution variable to be used.
0436    */
0437   mutable double z;
0438 
0439   /**
0440    * Cache PDFs evaluated at x, x/z and x/z_+,
0441    * z_+ depends hereby on the masses of the heavy flavours,
0442    * so, in contrast to the massless case, we need a vector
0443    * of size 2+n_F(heavy) instead of the pair<double,double>
0444    */
0445   mutable map<pair<tcPDFPtr,tcPDPtr>,vector<double> > pdfCache;
0446 
0447   /**
0448    * The currently considered incoming parton.
0449    */
0450   mutable tcPDPtr parton;
0451 
0452   /**
0453    * Get a PDF value at x
0454    */
0455   double PDFx(tcPDPtr) const;
0456 
0457   /**
0458    * Get a PDF value at x/z
0459    */
0460   double PDFxByz(tcPDPtr) const;
0461 
0462   //////////////////////////////////////
0463 
0464   /**
0465    * Get a PDF value at x/z_+
0466    */
0467   double PDFxByzplus(tcPDPtr,int,double) const;
0468 
0469   //////////////////////////////////////
0470 
0471 private:
0472 
0473   /**
0474    * The assignment operator is private and must never be called.
0475    * In fact, it should not even be implemented.
0476    */
0477   DipoleMPKOperator & operator=(const DipoleMPKOperator &) = delete;
0478 
0479 };
0480 
0481 }
0482 
0483 #endif /* HERWIG_DipoleMPKOperator_H */