Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MEee2ff.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_MEee2ff_H
0010 #define HERWIG_MEee2ff_H
0011 //
0012 // This is the declaration of the MEee2ff class.
0013 //
0014 
0015 #include "Herwig/MatrixElement/HwMEBase.h"
0016 #include "Herwig/Models/StandardModel/StandardModel.h"
0017 #include "ThePEG/PDT/EnumParticles.h"
0018 #include "Herwig/MatrixElement/ProductionMatrixElement.h"
0019 #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
0020 #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
0021 #include "Herwig/Shower/ShowerAlpha.h"
0022 
0023 namespace Herwig {
0024 
0025 using namespace ThePEG;
0026 
0027 /**
0028  * The MEee2ff class provides the matrix element for
0029  * \f$e^+e^-\to\ell^+\ell^-\f$. N.B. for the production of \f$e^+e^-\f$
0030  * only the \f$s\f$-channel Z and photon diagrams are included.
0031  *
0032  * @see \ref MEee2ffInterfaces "The interfaces"
0033  * defined for MEee2ff.
0034  */
0035 class MEee2ff: public HwMEBase {
0036 
0037 public:
0038 
0039   /**
0040    * The default constructor.
0041    */
0042   MEee2ff() : allowed_(0), helicity_(0), incoming_(0), pTmin_(GeV),
0043          preFactor_(6.) {
0044     massOption(vector<unsigned int>(2,1));
0045   }
0046 
0047   /**
0048    *  Members for hard corrections to the emission of QCD radiation
0049    */
0050   //@{
0051   /**
0052    *  Has a POWHEG style correction
0053    */
0054   virtual POWHEGType hasPOWHEGCorrection() {return FSR;}
0055 
0056   /**
0057    *  Has an old fashioned ME correction
0058    */
0059   virtual bool hasMECorrection() {return false;}
0060 
0061   /**
0062    *  Apply the POWHEG style correction
0063    */
0064   virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
0065                          ShowerInteraction);
0066   //@}
0067 
0068 public:
0069 
0070   /** @name Virtual functions required by the MEBase class. */
0071   //@{
0072   /**
0073    * Return the order in \f$\alpha_S\f$ in which this matrix
0074    * element is given.
0075    */
0076   virtual unsigned int orderInAlphaS() const;
0077 
0078   /**
0079    * Return the order in \f$\alpha_{EW}\f$ in which this matrix
0080    * element is given.
0081    */
0082   virtual unsigned int orderInAlphaEW() const;
0083 
0084   /**
0085    * The matrix element for the kinematical configuration
0086    * previously provided by the last call to setKinematics(), suitably
0087    * scaled by sHat() to give a dimension-less number.
0088    * @return the matrix element scaled with sHat() to give a
0089    * dimensionless number.
0090    */
0091   virtual double me2() const;
0092 
0093   /**
0094    * Return the scale associated with the last set phase space point.
0095    */
0096   virtual Energy2 scale() const;
0097 
0098   /**
0099    * Add all possible diagrams with the add() function.
0100    */
0101   virtual void getDiagrams() const;
0102 
0103   /**
0104    * Get diagram selector. With the information previously supplied with the
0105    * setKinematics method, a derived class may optionally
0106    * override this method to weight the given diagrams with their
0107    * (although certainly not physical) relative probabilities.
0108    * @param dv the diagrams to be weighted.
0109    * @return a Selector relating the given diagrams to their weights.
0110    */
0111   virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
0112 
0113   /**
0114    * Return a Selector with possible colour geometries for the selected
0115    * diagram weighted by their relative probabilities.
0116    * @param diag the diagram chosen.
0117    * @return the possible colour geometries weighted by their
0118    * relative probabilities.
0119    */
0120   virtual Selector<const ColourLines *>
0121   colourGeometries(tcDiagPtr diag) const;
0122 
0123   /**
0124    *  Construct the vertex of spin correlations.
0125    */
0126   virtual void constructVertex(tSubProPtr);
0127   //@}
0128 
0129 
0130 public:
0131 
0132   /** @name Functions used by the persistent I/O system. */
0133   //@{
0134   /**
0135    * Function used to write out object persistently.
0136    * @param os the persistent output stream written to.
0137    */
0138   void persistentOutput(PersistentOStream & os) const;
0139 
0140   /**
0141    * Function used to read in object persistently.
0142    * @param is the persistent input stream read from.
0143    * @param version the version number of the object when written.
0144    */
0145   void persistentInput(PersistentIStream & is, int version);
0146   //@}
0147 
0148   /**
0149    * The standard Init function used to initialize the interfaces.
0150    * Called exactly once for each class by the class description system
0151    * before the main function starts or
0152    * when this class is dynamically loaded.
0153    */
0154   static void Init();
0155 
0156 protected:
0157 
0158   /** @name Clone Methods. */
0159   //@{
0160   /**
0161    * Make a simple clone of this object.
0162    * @return a pointer to the new object.
0163    */
0164   virtual IBPtr clone() const {return new_ptr(*this);}
0165 
0166   /** Make a clone of this object, possibly modifying the cloned object
0167    * to make it sane.
0168    * @return a pointer to the new object.
0169    */
0170   virtual IBPtr fullclone() const {return new_ptr(*this);}
0171   //@}
0172 
0173 protected:
0174 
0175   /** @name Standard Interfaced functions. */
0176   //@{
0177   /**
0178    * Initialize this object after the setup phase before saving an
0179    * EventGenerator to disk.
0180    * @throws InitException if object could not be initialized properly.
0181    */
0182   virtual void doinit();
0183 
0184   /**
0185    * Rebind pointer to other Interfaced objects. Called in the setup phase
0186    * after all objects used in an EventGenerator has been cloned so that
0187    * the pointers will refer to the cloned objects afterwards.
0188    * @param trans a TranslationMap relating the original objects to
0189    * their respective clones.
0190    * @throws RebindException if no cloned object was found for a given
0191    * pointer.
0192    */
0193   virtual void rebind(const TranslationMap & trans)
0194    ;
0195 
0196   /**
0197    * Return a vector of all pointers to Interfaced objects used in this
0198    * object.
0199    * @return a vector of pointers.
0200    */
0201   virtual IVector getReferences();
0202   //@}
0203 
0204 protected:
0205 
0206   /**
0207    *  Calculate the matrix element for \f$e^+e^-\to \ell^+ \ell^-\f$.
0208    * @param partons The incoming and outgoing particles
0209    * @param momenta The momenta of the incoming and outgoing particles
0210    */
0211   double loME(const vector<cPDPtr> & partons,
0212           const vector<Lorentz5Momentum> & momenta,
0213           bool first) const;
0214 
0215   /**
0216    * Member to calculate the matrix element
0217    * @param fin  Spinors for incoming fermion
0218    * @param ain  Spinors for incoming antifermion
0219    * @param fout Spinors for outgoing fermion
0220    * @param aout Spinors for outgong antifermion
0221    * @param me   Spin summed Matrix element
0222    * @param cont The continuum piece of the matrix element
0223    * @param BW   The Z piece of the matrix element
0224    */
0225   ProductionMatrixElement HelicityME(vector<SpinorWaveFunction>    & fin,
0226                      vector<SpinorBarWaveFunction> & ain,
0227                      vector<SpinorBarWaveFunction> & fout,
0228                      vector<SpinorWaveFunction>    & aout,
0229                      double & me,
0230                      double & cont,
0231                      double & BW ) const;
0232 
0233   /**
0234    *  The ratio of the matrix element for one additional jet over the
0235    * leading order result. In practice
0236    * \[\frac{\hat{s}|\overline{\mathcal{M}}|^2_2|D_{\rm emit}|}{4\pi C_F\alpha_S|\overline{\mathcal{M}}|^2_3\left(|D_{\rm emit}|+|D_{\rm spect}\right)}}\]
0237    * is returned where \f$\|\overline{\mathcal{M}}|^2\f$ is
0238    * the spin and colour summed/averaged matrix element.
0239    * @param partons The incoming and outgoing particles
0240    * @param momenta The momenta of the incoming and outgoing particles
0241    * @param iemitter Whether the quark or antiquark is regardede as the emitter
0242    * @param inter The type of interaction
0243    */
0244   double meRatio(vector<cPDPtr> partons,
0245          vector<Lorentz5Momentum> momenta,
0246          unsigned int iemittor,
0247          bool subtract=false) const;
0248 
0249   /**
0250    *  Calculate the matrix element for \f$e^-e^-\to q \bar q g$.
0251    * @param partons The incoming and outgoing particles
0252    * @param momenta The momenta of the incoming and outgoing particles
0253    * @param inter The type of interaction
0254    */
0255   InvEnergy2 realME(const vector<cPDPtr> & partons,
0256             const vector<Lorentz5Momentum> & momenta) const;
0257 
0258   /**
0259    *  Generate the momenta for a hard configuration
0260    */
0261   Energy generateHard(RealEmissionProcessPtr tree,
0262               vector<Lorentz5Momentum> & emission,
0263               unsigned int & iemit, unsigned int & ispect,
0264               bool applyVeto);
0265 
0266 
0267 protected:
0268 
0269   /**
0270    *  Pointer to the fermion-antifermion Z vertex
0271    */
0272   AbstractFFVVertexPtr FFZVertex() const {return FFZVertex_;}
0273 
0274   /**
0275    *  Pointer to the fermion-antifermion photon vertex
0276    */
0277   AbstractFFVVertexPtr FFPVertex() const {return FFPVertex_;}
0278 
0279   /**
0280    *  Pointer to the particle data object for the Z
0281    */
0282   PDPtr Z0() const {return Z0_;}
0283 
0284   /**
0285    *  Pointer to the particle data object for the photon
0286    */
0287   PDPtr gamma() const {return gamma_;}
0288 
0289 private:
0290 
0291   /**
0292    * The assignment operator is private and must never be called.
0293    * In fact, it should not even be implemented.
0294    */
0295   MEee2ff & operator=(const MEee2ff &) = delete;
0296 
0297 private:
0298 
0299   /**
0300    *  Pointers to the vertices
0301    */
0302   //@{
0303   /**
0304    *  Pointer to the fermion-antifermion Z vertex
0305    */
0306   AbstractFFVVertexPtr FFZVertex_;
0307 
0308   /**
0309    *  Pointer to the fermion-antifermion photon vertex
0310    */
0311   AbstractFFVVertexPtr FFPVertex_;
0312   //@}
0313 
0314   /**
0315    *  Pointer to the particle data object for the Z
0316    */
0317   PDPtr Z0_;
0318 
0319   /**
0320    *  Pointer to the particle data object for the photon
0321    */
0322   PDPtr gamma_;
0323 
0324   /**
0325    * The allowed outgoing
0326    */
0327   int allowed_;
0328 
0329   /**
0330    * The allowed helicity configuration
0331    */
0332   int helicity_;
0333 
0334   /**
0335    * Set the incoming lepton beam, either electron or meuon beams
0336    */
0337   int incoming_;
0338 
0339   /**
0340    *  Pointer to the EM coupling
0341    */
0342   ShowerAlphaPtr alphaQED_;
0343 
0344   /**
0345    *  Variables for the POWHEG style corrections
0346    */
0347   //@{
0348   /**
0349    *  The cut off on pt, assuming massless quarks.
0350    */
0351   Energy pTmin_;
0352 
0353   /**
0354    *  Overestimate for the prefactor
0355    */
0356   double preFactor_;
0357 
0358   /**
0359    *  ParticleData objects for the partons
0360    */
0361   vector<cPDPtr> partons_;
0362 
0363   /**
0364    *  Momenta of the leading-order partons
0365    */
0366   vector<Lorentz5Momentum> loMomenta_;
0367   //@}
0368 
0369 };
0370 
0371 }
0372 
0373 #endif /* HERWIG_MEee2ff_H */