Back to home page

EIC code displayed by LXR

 
 

    


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

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