Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MEqq2W2ff.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_MEqq2W2ff_H
0010 #define HERWIG_MEqq2W2ff_H
0011 //
0012 // This is the declaration of the MEqq2W2ff class.
0013 //
0014 
0015 #include "Herwig/MatrixElement/DrellYanBase.h"
0016 #include "Herwig/MatrixElement/ProductionMatrixElement.h"
0017 #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
0018 #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
0019 #include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
0020 
0021 namespace Herwig {
0022 
0023 using namespace ThePEG;
0024 using namespace ThePEG::Helicity;
0025 
0026 /**
0027  * The MEqq2W2ff class implements the matrix element for \f$q\bar{q'}\to W^\pm\f$
0028  * including the decay of the \f$W^\pm\f$ to Standard Model fermions.
0029  *
0030  * @see \ref MEqq2W2ffInterfaces "The interfaces"
0031  * defined for MEqq2W2ff.
0032  */
0033 class MEqq2W2ff: public DrellYanBase {
0034 
0035 public:
0036 
0037   /**
0038    * The default constructor.
0039    */
0040   MEqq2W2ff();
0041 
0042   /** @name Virtual functions required by the MEBase class. */
0043   //@{
0044   /**
0045    * Return the order in \f$\alpha_S\f$ in which this matrix
0046    * element is given.
0047    */
0048   virtual unsigned int orderInAlphaS() const;
0049 
0050   /**
0051    * Return the order in \f$\alpha_{EW}\f$ in which this matrix
0052    * element is given.
0053    */
0054   virtual unsigned int orderInAlphaEW() const;
0055 
0056   /**
0057    * The matrix element for the kinematical configuration
0058    * previously provided by the last call to setKinematics(), suitably
0059    * scaled by sHat() to give a dimension-less number.
0060    * @return the matrix element scaled with sHat() to give a
0061    * dimensionless number.
0062    */
0063   virtual double me2() const;
0064 
0065   /**
0066    * Return the scale associated with the last set phase space point.
0067    */
0068   virtual Energy2 scale() const;
0069 
0070   /**
0071    * Add all possible diagrams with the add() function.
0072    */
0073   virtual void getDiagrams() const;
0074 
0075   /**
0076    * Get diagram selector. With the information previously supplied with the
0077    * setKinematics method, a derived class may optionally
0078    * override this method to weight the given diagrams with their
0079    * (although certainly not physical) relative probabilities.
0080    * @param dv the diagrams to be weighted.
0081    * @return a Selector relating the given diagrams to their weights.
0082    */
0083   virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
0084 
0085   /**
0086    * Return a Selector with possible colour geometries for the selected
0087    * diagram weighted by their relative probabilities.
0088    * @param diag the diagram chosen.
0089    * @return the possible colour geometries weighted by their
0090    * relative probabilities.
0091    */
0092   virtual Selector<const ColourLines *>
0093   colourGeometries(tcDiagPtr diag) const;
0094 
0095   /**
0096    *  Construct the vertex of spin correlations.
0097    */
0098   virtual void constructVertex(tSubProPtr);
0099   //@}
0100 
0101 
0102 public:
0103 
0104   /** @name Functions used by the persistent I/O system. */
0105   //@{
0106   /**
0107    * Function used to write out object persistently.
0108    * @param os the persistent output stream written to.
0109    */
0110   void persistentOutput(PersistentOStream & os) const;
0111 
0112   /**
0113    * Function used to read in object persistently.
0114    * @param is the persistent input stream read from.
0115    * @param version the version number of the object when written.
0116    */
0117   void persistentInput(PersistentIStream & is, int version);
0118   //@}
0119 
0120   /**
0121    * The standard Init function used to initialize the interfaces.
0122    * Called exactly once for each class by the class description system
0123    * before the main function starts or
0124    * when this class is dynamically loaded.
0125    */
0126   static void Init();
0127 
0128 protected:
0129 
0130   /**
0131    * Matrix element for \f$q\bar{q}\to \gamma/Z \to f\bar{f}\f$.
0132    * @param fin  Spinors for incoming quark
0133    * @param ain  Spinors for incoming antiquark
0134    * @param fout Spinors for incoming quark
0135    * @param aout Spinors for incoming antiquark
0136    * @param me  Whether or not to calculate the matrix element for spin correlations
0137    */
0138   double qqbarME(vector<SpinorWaveFunction>    & fin ,
0139          vector<SpinorBarWaveFunction> & ain ,
0140          vector<SpinorBarWaveFunction> & fout,
0141          vector<SpinorWaveFunction>    & aout,
0142          bool me) const;
0143 
0144 protected:
0145 
0146   /** @name Clone Methods. */
0147   //@{
0148   /**
0149    * Make a simple clone of this object.
0150    * @return a pointer to the new object.
0151    */
0152   virtual IBPtr clone() const { return new_ptr(*this); }
0153 
0154   /** Make a clone of this object, possibly modifying the cloned object
0155    * to make it sane.
0156    * @return a pointer to the new object.
0157    */
0158   virtual IBPtr fullclone() const { return new_ptr(*this); }
0159   //@}
0160 
0161 protected:
0162 
0163   /** @name Standard Interfaced functions. */
0164   //@{
0165   /**
0166    * Initialize this object after the setup phase before saving an
0167    * EventGenerator to disk.
0168    * @throws InitException if object could not be initialized properly.
0169    */
0170   virtual void doinit();
0171   //@}
0172 
0173 private:
0174 
0175   /**
0176    * The assignment operator is private and must never be called.
0177    * In fact, it should not even be implemented.
0178    */
0179   MEqq2W2ff & operator=(const MEqq2W2ff &) = delete;
0180 
0181 private:
0182 
0183   /**
0184    *  Pointer to the W vertex
0185    */
0186   AbstractFFVVertexPtr  _theFFWVertex;
0187 
0188   /**
0189    *  Pointers to the intermediates resonances
0190    */
0191   //@{
0192   /**
0193    *  Pointer to the \f$W^+\f$
0194    */
0195   tcPDPtr _wp;
0196 
0197   /**
0198    *  Pointer to the \f$W^-\f$
0199    */
0200   tcPDPtr _wm;
0201   //@}
0202 
0203   /**
0204    *  Switches to control the particles in the hard process
0205    */
0206   //@{
0207   /**
0208    *  The allowed flavours of the incoming quarks
0209    */
0210   unsigned int _maxflavour;
0211 
0212   /**
0213    *  Which intermediate \f$W^\pm\f$ bosons to include
0214    */
0215   unsigned int _plusminus;
0216 
0217   /**
0218    *  Which decay products of the \f$W^\pm\f$ to include
0219    */
0220   unsigned int _process;
0221   //@}
0222 
0223   /**
0224    * Matrix element for spin correlations
0225    */
0226   ProductionMatrixElement _me;
0227 };
0228 
0229 }
0230 
0231 #endif /* HERWIG_MEqq2W2ff_H */