Back to home page

EIC code displayed by LXR

 
 

    


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

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