Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MEPP2HiggsJet.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_MEPP2HiggsJet_H
0010 #define HERWIG_MEPP2HiggsJet_H
0011 //
0012 // This is the declaration of the MEPP2HiggsJet class.
0013 //
0014 
0015 #include "ThePEG/MatrixElement/ME2to2Base.h"
0016 #include "Herwig/Utilities/Maths.h"
0017 #include "Herwig/MatrixElement/ProductionMatrixElement.h"
0018 #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
0019 #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
0020 #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
0021 #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
0022 #include "Herwig/PDT/GenericMassGenerator.h"
0023 #include "Herwig/MatrixElement/ProductionMatrixElement.h"
0024 
0025 namespace Herwig {
0026 using namespace ThePEG;
0027 using namespace ThePEG::Helicity;
0028 
0029 /**
0030  * The MEPP2HiggsJet class implements the matrix element for Higgs+jet production.
0031  *
0032  * @see \ref MEPP2HiggsJetInterfaces "The interfaces"
0033  * defined for MEPP2HiggsJet.
0034  */
0035 class MEPP2HiggsJet: public ME2to2Base {
0036 
0037 public:
0038 
0039   /**
0040    * The default constructor.
0041    */
0042   MEPP2HiggsJet() :  
0043     _shapeopt(2),_maxflavour(5), _process(0),
0044     _minloop(6),_maxloop(6),_massopt(0) , _mh(ZERO),_wh(ZERO)
0045   {}
0046 
0047   /** @name Virtual functions required by the MEBase class. */
0048   //@{
0049   /**
0050    * Return the matrix element for the kinematical configuation
0051    * previously provided by the last call to setKinematics(). Uses
0052    * me().
0053    */
0054   virtual CrossSection dSigHatDR() const;
0055 
0056   /**
0057    * The number of internal degreed of freedom used in the matrix
0058    * element.
0059    */
0060   virtual int nDim() const;
0061 
0062   /**
0063    * Return the order in \f$\alpha_S\f$ in which this matrix
0064    * element is given.
0065    */
0066   virtual unsigned int orderInAlphaS() const;
0067 
0068   /**
0069    * Return the order in \f$\alpha_{EW}\f$ in which this matrix
0070    * element is given.
0071    */
0072   virtual unsigned int orderInAlphaEW() const;
0073 
0074   /**
0075    * The matrix element for the kinematical configuration
0076    * previously provided by the last call to setKinematics(), suitably
0077    * scaled by sHat() to give a dimension-less number.
0078    * @return the matrix element scaled with sHat() to give a
0079    * dimensionless number.
0080    */
0081   virtual double me2() const;
0082 
0083   /**
0084    * Return the scale associated with the last set phase space point.
0085    */
0086   virtual Energy2 scale() const;
0087 
0088   /**
0089    * Add all possible diagrams with the add() function.
0090    */
0091   virtual void getDiagrams() const;
0092 
0093   /**
0094    * Get diagram selector. With the information previously supplied with the
0095    * setKinematics method, a derived class may optionally
0096    * override this method to weight the given diagrams with their
0097    * (although certainly not physical) relative probabilities.
0098    * @param dv the diagrams to be weighted.
0099    * @return a Selector relating the given diagrams to their weights.
0100    */
0101   virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
0102 
0103   /**
0104    * Return a Selector with possible colour geometries for the selected
0105    * diagram weighted by their relative probabilities.
0106    * @param diag the diagram chosen.
0107    * @return the possible colour geometries weighted by their
0108    * relative probabilities.
0109    */
0110   virtual Selector<const ColourLines *>
0111   colourGeometries(tcDiagPtr diag) const;
0112 
0113   /**
0114    * Generate internal degrees of freedom given nDim() uniform
0115    * random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
0116    * generator, the dSigHatDR should be a smooth function of these
0117    * numbers, although this is not strictly necessary.
0118    * @param r a pointer to the first of nDim() consecutive random numbers.
0119    * @return true if the generation succeeded, otherwise false.
0120    */
0121   virtual bool generateKinematics(const double * r);
0122 
0123   /**
0124    *  Construct the vertex of spin correlations.
0125    */
0126   virtual void constructVertex(tSubProPtr);
0127   //@}
0128 
0129 public:
0130 
0131   /** @name Functions used by the persistent I/O system. */
0132   //@{
0133   /**
0134    * Function used to write out object persistently.
0135    * @param os the persistent output stream written to.
0136    */
0137   void persistentOutput(PersistentOStream & os) const;
0138 
0139   /**
0140    * Function used to read in object persistently.
0141    * @param is the persistent input stream read from.
0142    * @param version the version number of the object when written.
0143    */
0144   void persistentInput(PersistentIStream & is, int version);
0145   //@}
0146 
0147   /**
0148    * The standard Init function used to initialize the interfaces.
0149    * Called exactly once for each class by the class description system
0150    * before the main function starts or
0151    * when this class is dynamically loaded.
0152    */
0153   static void Init();
0154 
0155 protected:
0156 
0157   /** @name Clone Methods. */
0158   //@{
0159   /**
0160    * Make a simple clone of this object.
0161    * @return a pointer to the new object.
0162    */
0163   virtual IBPtr clone() const;
0164 
0165   /** Make a clone of this object, possibly modifying the cloned object
0166    * to make it sane.
0167    * @return a pointer to the new object.
0168    */
0169   virtual IBPtr fullclone() const;
0170   //@}
0171 
0172 protected:
0173 
0174   /** @name Standard Interfaced functions. */
0175   //@{
0176   /**
0177    * Initialize this object after the setup phase before saving an
0178    * EventGenerator to disk.
0179    * @throws InitException if object could not be initialized properly.
0180    */
0181   virtual void doinit();
0182   //@}
0183 
0184 private:
0185 
0186   /**
0187    *  Members to return the matrix elements for the different subprocesses
0188    */
0189   //@{
0190   /**
0191    * Matrix element for \f$q\bar{q}\to Hg\f$.
0192    * @param fin   Spinors for incoming quark
0193    * @param ain   Spinors for incoming antiquark
0194    * @param hout  Wavefunction for the outgoing higgs
0195    * @param gout  Polarization vectors for the outgoing gluon
0196    * @param me    Whether or not to calculate the matrix element for spin correlations
0197    **/
0198   double qqbarME(vector<SpinorWaveFunction> & fin, vector<SpinorBarWaveFunction> & ain,
0199          ScalarWaveFunction & hout, vector<VectorWaveFunction> & gout,
0200          bool me) const;
0201 
0202   /**
0203    * Matrix element for \f$qg\to Hq\f$.
0204    * @param fin  Spinors for incoming quark
0205    * @param gin  Polarization vectors for the incoming gluon
0206    * @param hout Wavefunction for the outgoing higgs
0207    * @param fout Spinors for outgoing quark
0208    * @param me   Whether or not to calculate the matrix element for spin correlations
0209    **/
0210   double qgME(vector<SpinorWaveFunction> & fin,vector<VectorWaveFunction> & gin,
0211           ScalarWaveFunction & hout, vector<SpinorBarWaveFunction> & fout,
0212           bool me) const;
0213 
0214   /**
0215    * Matrix element for \f$\bar{q}g\to H\bar{q}\f$.
0216    * @param fin  Spinors for incoming antiquark
0217    * @param gin  Polarization vectors for the incoming gluon
0218    * @param hout Wavefunction for the outgoing higgs
0219    * @param fout Spinors for outgoing antiquark
0220    * @param me   Whether or not to calculate the matrix element for spin correlations
0221    **/
0222   double qbargME(vector<SpinorBarWaveFunction> & fin,vector<VectorWaveFunction> & gin,
0223          ScalarWaveFunction & hout, vector<SpinorWaveFunction> & fout,
0224          bool me) const;
0225 
0226   /**
0227    * Matrix element for \f$gg\to Hg\f$.
0228    * @param g1   Polarization vectors for the first  incoming gluon
0229    * @param g2   Polarization vectors for the second incoming gluon
0230    * @param hout Wavefunction for the outgoing higgs
0231    * @param g4   Polarization vectors for the outgoing gluon
0232    * @param me   Whether or not to calculate the matrix element for spin correlations
0233    **/
0234   double ggME(vector<VectorWaveFunction> g1, vector<VectorWaveFunction> g2,
0235           ScalarWaveFunction & hout,     vector<VectorWaveFunction> g4,
0236           bool me) const;
0237   //@}
0238 
0239 private:
0240 
0241   /**
0242    * The assignment operator is private and must never be called.
0243    * In fact, it should not even be implemented.
0244    */
0245   MEPP2HiggsJet & operator=(const MEPP2HiggsJet &) = delete;
0246 
0247 private:
0248 
0249   /**
0250    * Defines the Higgs resonance shape
0251    */
0252   unsigned int _shapeopt;
0253 
0254   /**
0255    *  Maximum PDG code of the quarks allowed
0256    */
0257   unsigned int _maxflavour;
0258 
0259   /**
0260    *  Option for which processes to include
0261    */
0262   unsigned int _process;
0263   
0264   /**
0265    * Matrix element for spin correlations
0266    */
0267   ProductionMatrixElement _me;
0268 
0269   /**
0270    *  Minimum flavour of quarks to include in the loops
0271    */
0272   int _minloop;
0273 
0274   /**
0275    *  Maximum flavour of quarks to include in the loops
0276    */
0277   int _maxloop;
0278 
0279   /**
0280    *  Option for treatment of the fermion loops
0281    */
0282   unsigned int _massopt;
0283 
0284   /**
0285    *  On-shell mass for the higgs
0286    */
0287   Energy _mh;
0288 
0289   /**
0290    *  On-shell width for the higgs
0291    */
0292   Energy _wh;
0293 
0294   /**
0295    *  The mass generator for the Higgs
0296    */
0297   GenericMassGeneratorPtr _hmass;
0298 
0299   /**
0300    *  Storage of the loop functions
0301    */
0302   //@{
0303   /**
0304    *  B functions
0305    */
0306   mutable Complex _bi[5];
0307 
0308   /**
0309    *  C functions
0310    */
0311   mutable Complex _ci[8];
0312 
0313   /**
0314    *  D functions
0315    */
0316   mutable Complex _di[4];
0317   //@}
0318 
0319   /**
0320    *  Storage of the diagram weights for the \f$gg\to Hg\f$ subprocess
0321    */
0322   mutable double _diagwgt[3];
0323 };
0324 
0325 }
0326 
0327 #endif /* HERWIG_MEPP2HiggsJet_H */