Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef HERWIG_MEPP2ZHPowheg_H
0003 #define HERWIG_MEPP2ZHPowheg_H
0004 //
0005 // This is the declaration of the MEPP2ZHPowheg class.
0006 //
0007 
0008 #include "Herwig/MatrixElement/Hadron/MEPP2ZH.h"
0009 #include "ThePEG/PDF/BeamParticleData.h"
0010 
0011 namespace Herwig {
0012 
0013 using namespace ThePEG;
0014 
0015 /**
0016  * The MEPP2ZHPowheg class implements the matrix element
0017  * for \f$q\bar{q}\to Z^0h^0\f$.
0018  *
0019  * @see \ref MEPP2ZHPowhegInterfaces "The interfaces"
0020  * defined for MEPP2ZHPowheg.
0021  */
0022 class MEPP2ZHPowheg: public MEPP2ZH {
0023 
0024 public:
0025 
0026   /**
0027    * The default constructor.
0028    */
0029   MEPP2ZHPowheg();
0030 
0031   /** @name Virtual functions required by the MEBase class. */
0032   //@{
0033   /**
0034    * Return the scale associated with the last set phase space point.
0035    */
0036   virtual Energy2 scale() const;
0037 
0038   /**
0039    * The number of internal degreed of freedom used in the matrix
0040    * element.
0041    */
0042   virtual int nDim() const;
0043 
0044   /**
0045    * Generate internal degrees of freedom given 'nDim()' uniform
0046    * random numbers in the interval ]0,1[. To help the phase space
0047    * generator, the 'dSigHatDR()' should be a smooth function of these
0048    * numbers, although this is not strictly necessary. Return
0049    * false if the chosen points failed the kinematical cuts.
0050    */
0051   virtual bool generateKinematics(const double * r);
0052 
0053   /**
0054    * Return the matrix element for the kinematical configuation
0055    * previously provided by the last call to setKinematics(). Uses
0056    * me().
0057    */
0058   virtual CrossSection dSigHatDR() const;
0059   //@}
0060 
0061 public:
0062 
0063   /** @name Functions used by the persistent I/O system. */
0064   //@{
0065   /**
0066    * Function used to write out object persistently.
0067    * @param os the persistent output stream written to.
0068    */
0069   void persistentOutput(PersistentOStream & os) const;
0070 
0071   /**
0072    * Function used to read in object persistently.
0073    * @param is the persistent input stream read from.
0074    * @param version the version number of the object when written.
0075    */
0076   void persistentInput(PersistentIStream & is, int version);
0077   //@}
0078 
0079   /**
0080    * The standard Init function used to initialize the interfaces.
0081    * Called exactly once for each class by the class description system
0082    * before the main function starts or
0083    * when this class is dynamically loaded.
0084    */
0085   static void Init();
0086 
0087 protected:
0088   /**
0089    * Calculate the correction weight with which leading-order
0090    * configurations are re-weighted.
0091    */
0092   double NLOweight() const;
0093 
0094   /**
0095    * Calculate the variable \f$x=M_{B}^2/s\f$ from the integration variables. 
0096    */
0097   double x(double xt, double v) const;
0098 
0099   /**
0100    * Calculate the momentum fraction of the first parton. 
0101    */
0102   double x_a(double x, double v) const;
0103 
0104   /**
0105    * Calculate the momentum fraction of second parton. 
0106    */
0107   double x_b(double x, double v) const;
0108 
0109   /**
0110    * Calculate the minimum of \f$x\f$. 
0111    */
0112   double xbar(double v) const;
0113 
0114   /**
0115    * Calculate the ratio of the radiative luminosity funcion to the
0116    * Born luminosity function for the \f$qg\f$ initiated channel. 
0117    */
0118   double Ltilde_qg(double x, double v) const;
0119 
0120   /**
0121    * Calculate the ratio of the radiative luminosity funcion to the
0122    * Born luminosity function for the \f$g\bar{q}\f$ initiated channel. 
0123    */
0124   double Ltilde_gq(double x, double v) const;
0125 
0126   /**
0127    * Calculate the ratio of the radiative luminosity funcion to the
0128    * Born luminosity function for the \f$q\bar{q}\f$ initiated channel. 
0129    */
0130   double Ltilde_qq(double x, double v) const;
0131 
0132   /**
0133    * Calculate the soft-virtual contribution to the NLO weight. 
0134    */
0135   double Vtilde_qq() const;
0136 
0137   /**
0138    * Function for calculation of the \f$g\bar{q}\f$ and \f$g\bar{q}\f$ 
0139    * initiated real contribution.
0140    */
0141   double Ccalbar_qg(double x) const;
0142 
0143   /**
0144    * Function for calculation of the \f$qg\f$ 
0145    * initiated real contribution.
0146    */
0147   double Fcal_qg(double x, double v) const;
0148 
0149   /**
0150    * Function for calculation of the \f$g\bar{q}\f$ initiated real
0151    * contribution.
0152    */
0153   double Fcal_gq(double x, double v) const;
0154 
0155   /**
0156    * Function for calculation of the \f$q\bar{q}\f$ initiated real
0157    * contribution.
0158    */
0159   double Fcal_qq(double x, double v) const;
0160 
0161   /**
0162    * Function for calculation of the \f$qg\f$ initiated real
0163    * contribution.
0164    */
0165   double Ftilde_qg(double xt, double v) const;
0166 
0167   /**
0168    * Function for calculation of the \f$g\bar{q}\f$ initiated real
0169    * contribution.
0170    */
0171   double Ftilde_gq(double xt, double v) const;
0172 
0173   /**
0174    * Function for calculation of the \f$q\bar{q}\f$ initiated real
0175    * contribution.
0176    */
0177   double Ftilde_qq(double xt, double v) const;
0178 
0179   /**
0180    * Function for calculation of the \f$qg\f$ initiated real
0181    * contribution.
0182    */
0183   double Ctilde_qg(double x, double v) const;
0184 
0185   /**
0186    * Function for calculation of the \f$g\bar{q}\f$ initiated real
0187    * contribution.
0188    */
0189   double Ctilde_gq(double x, double v) const;
0190 
0191   /**
0192    * Function for calculation of the \f$q\bar{q}\f$ initiated real
0193    * contribution.
0194    */
0195   double Ctilde_qq(double x, double v) const;
0196 
0197 protected:
0198 
0199   /** @name Clone Methods. */
0200   //@{
0201   /**
0202    * Make a simple clone of this object.
0203    * @return a pointer to the new object.
0204    */
0205   virtual IBPtr clone() const { return new_ptr(*this); }
0206 
0207   /** Make a clone of this object, possibly modifying the cloned object
0208    * to make it sane.
0209    * @return a pointer to the new object.
0210    */
0211   virtual IBPtr fullclone() const { return new_ptr(*this); }
0212   //@}
0213 
0214 protected:
0215 
0216   /** @name Standard Interfaced functions. */
0217   //@{
0218   /**
0219    * Initialize this object after the setup phase before saving an
0220    * EventGenerator to disk.
0221    * @throws InitException if object could not be initialized properly.
0222    */
0223   virtual void doinit();
0224   //@}
0225 
0226 private:
0227 
0228   /**
0229    * The assignment operator is private and must never be called.
0230    * In fact, it should not even be implemented.
0231    */
0232   MEPP2ZHPowheg & operator=(const MEPP2ZHPowheg &) = delete;
0233 
0234 private:
0235 
0236   /**
0237    *  The momentum fraction of the first parton in the Born process
0238    */
0239   mutable double _xb_a;
0240 
0241   /**
0242    *  The momentum fraction of the second parton in the Born process
0243    */
0244   mutable double _xb_b;
0245 
0246   /**
0247    *  The ParticleData object for the first parton in the Born process
0248    */
0249   mutable tcPDPtr _parton_a;
0250 
0251   /**
0252    *  The ParticleData object for the second parton in the Born process
0253    */
0254   mutable tcPDPtr _parton_b;
0255 
0256   /**
0257    *  The BeamParticleData object for the first  hadron
0258    */
0259   mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_A;
0260 
0261   /**
0262    *  The BeamParticleData object for the second hadron
0263    */
0264   mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_B;
0265 
0266   /**
0267    *  the ParticleData object for the gluon
0268    */
0269   tcPDPtr _gluon;
0270 
0271   /**
0272    * The \f$T_R\f$ colour factor
0273    */
0274   const double TR_;
0275 
0276   /**
0277    *  The \f$C_F\f$ colour factor
0278    */
0279   const double CF_;
0280 
0281   /**
0282    *  The value of \f$\frac{\alpha_S}{2\pi}\f$ used for the calculation
0283    */
0284   mutable double _alphaS2Pi;
0285 
0286   /**
0287    *  The mass squared of the lepton pair
0288    */
0289   mutable Energy2 _mll2;
0290 
0291   /**  
0292    * The renormalization/factorization scale
0293    */
0294   mutable Energy2 _mu2;
0295 
0296   /**
0297    *  Parameters for the NLO weight
0298    */
0299   //@{
0300   /**
0301    *  Whether to generate the positive, negative or leading order contribution
0302    */
0303   unsigned int _contrib;
0304 
0305   /**
0306    *  Whether to use a fixed or a running QCD coupling for the NLO weight
0307    */
0308   unsigned int _nlo_alphaS_opt;
0309 
0310   /**
0311    *  The value of alphaS to use for the nlo weight if _nloalphaSopt=1
0312    */
0313   double _fixed_alphaS;
0314 
0315   /**
0316    *  The magnitude of the correction term to reduce the negative contribution
0317    */
0318   double _a;
0319 
0320   /**
0321    *  The power of the correction term to reduce the negative contribution
0322    */
0323   double _p;
0324 
0325   //@}
0326 
0327   /**
0328    *  Choice of the scale
0329    */
0330   //@{
0331   /**
0332    *  Type of scale
0333    */
0334   unsigned int _scaleopt;
0335 
0336   /**
0337    *  Fixed scale if used
0338    */
0339   Energy _fixedScale;
0340 
0341   /**
0342    *  Prefactor if variable scale used
0343    */
0344   double _scaleFact;
0345   //@}
0346 
0347   /**
0348    *  Radiation variables
0349    */
0350   //@{
0351   /**
0352    *   The \f$\tilde{x}\f$ variable
0353    */
0354   double _xt;
0355 
0356   /**
0357    *  The \f$v\f$ angular variable
0358    */
0359   double _v;
0360   //@}
0361 
0362   /**
0363    *  Values of the PDF's before radiation
0364    */
0365   //@{
0366   /**
0367    *  For the quark
0368    */
0369   mutable double _oldq;
0370 
0371   /**
0372    *  For the antiquark
0373    */
0374   mutable double _oldqbar;
0375   //@}
0376 };
0377 
0378 }
0379 
0380 #endif /* HERWIG_MEPP2ZHPowheg_H */