Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef HERWIG_MEMinBias_H
0003 #define HERWIG_MEMinBias_H
0004 //
0005 // This is the declaration of the MEMinBias class.
0006 //
0007 
0008 #include "Herwig/MatrixElement/HwMEBase.h"
0009 #include "Herwig/Shower/UEBase.h"
0010 
0011 namespace Herwig {
0012 
0013 using namespace ThePEG;
0014 
0015 /**
0016  * The MEMinBias class provides a simple colour singlet exchange matrix element
0017  * to be used in the soft component of the multiple scattering model of the 
0018  * underlying event
0019  *
0020  * @see \ref MEMinBiasInterfaces "The interfaces"
0021  * defined for MEMinBias.
0022  */
0023 class MEMinBias: public HwMEBase {
0024 
0025 public:
0026 
0027   /**
0028    * The default constructor.
0029    */
0030   MEMinBias() : csNorm_(1.), Scale_(2.*GeV) {}
0031 
0032 public:
0033 
0034   /** @name Virtual functions required by the MEBase class. */
0035   //@{
0036   /**
0037    * Return the order in \f$\alpha_S\f$ in which this matrix
0038    * element is given.
0039    */
0040   virtual unsigned int orderInAlphaS() const;
0041 
0042   /**
0043    * Return the order in \f$\alpha_{EW}\f$ in which this matrix
0044    * element is given.
0045    */
0046   virtual unsigned int orderInAlphaEW() const;
0047 
0048   /**
0049    * The matrix element for the kinematical configuration
0050    * previously provided by the last call to setKinematics(), suitably
0051    * scaled by sHat() to give a dimension-less number.
0052    * @return the matrix element scaled with sHat() to give a
0053    * dimensionless number.
0054    */
0055   virtual double me2() const;
0056 
0057   /**
0058    * Correction weight to reweight the cross section to the inelastic cross
0059    * section subtracted by the diffractive cross section.
0060    */
0061   double correctionweight() const;
0062   
0063   /**
0064    * Return the scale associated with the last set phase space point.
0065    */
0066   virtual Energy2 scale() const;
0067 
0068   /**
0069    * Set the typed and momenta of the incoming and outgoing partons to
0070    * be used in subsequent calls to me() and colourGeometries()
0071    * according to the associated XComb object. If the function is
0072    * overridden in a sub class the new function must call the base
0073    * class one first.
0074    */
0075   virtual void setKinematics();
0076 
0077   /**
0078    * The number of internal degrees of freedom used in the matrix
0079    * element.
0080    */
0081   virtual int nDim() const;
0082 
0083   /**
0084    * Generate internal degrees of freedom given nDim() uniform
0085    * random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
0086    * generator, the dSigHatDR should be a smooth function of these
0087    * numbers, although this is not strictly necessary.
0088    * @param r a pointer to the first of nDim() consecutive random numbers.
0089    * @return true if the generation succeeded, otherwise false.
0090    */
0091   virtual bool generateKinematics(const double * r);
0092 
0093   /**
0094    * Return the matrix element squared differential in the variables
0095    * given by the last call to generateKinematics().
0096    */
0097   virtual CrossSection dSigHatDR() const;
0098 
0099   /**
0100    * Add all possible diagrams with the add() function.
0101    */
0102   virtual void getDiagrams() const;
0103 
0104   /**
0105    * Get diagram selector. With the information previously supplied with the
0106    * setKinematics method, a derived class may optionally
0107    * override this method to weight the given diagrams with their
0108    * (although certainly not physical) relative probabilities.
0109    * @param dv the diagrams to be weighted.
0110    * @return a Selector relating the given diagrams to their weights.
0111    */
0112   virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
0113 
0114   /**
0115    * Return a Selector with possible colour geometries for the selected
0116    * diagram weighted by their relative probabilities.
0117    * @param diag the diagram chosen.
0118    * @return the possible colour geometries weighted by their
0119    * relative probabilities.
0120    */
0121   virtual Selector<const ColourLines *>
0122   colourGeometries(tcDiagPtr diag) const;
0123   //@}
0124 
0125 
0126 public:
0127   /** @name Functions used by the persistent I/O system. */
0128   //@{
0129   /**
0130    * Function used to write out object persistently.
0131    * @param os the persistent output stream written to.
0132    */
0133   void persistentOutput(PersistentOStream & os) const;
0134 
0135   /**
0136    * Function used to read in object persistently.
0137    * @param is the persistent input stream read from.
0138    * @param version the version number of the object when written.
0139    */
0140   void persistentInput(PersistentIStream & is, int version);
0141   //@}
0142 
0143   /**
0144    * The standard Init function used to initialize the interfaces.
0145    * Called exactly once for each class by the class description system
0146    * before the main function starts or
0147    * when this class is dynamically loaded.
0148    */
0149 
0150 
0151   /**
0152    * The standard Init function used to initialize the interfaces.
0153    * Called exactly once for each class by the class description system
0154    * before the main function starts or
0155    * when this class is dynamically loaded.
0156    */
0157   static void Init();
0158 
0159 protected:
0160 
0161   /** @name Clone Methods. */
0162   //@{
0163   /**
0164    * Make a simple clone of this object.
0165    * @return a pointer to the new object.
0166    */
0167   virtual IBPtr clone() const;
0168 
0169   /** Make a clone of this object, possibly modifying the cloned object
0170    * to make it sane.
0171    * @return a pointer to the new object.
0172    */
0173   virtual IBPtr fullclone() const;
0174   //@}
0175 
0176 
0177 // If needed, insert declarations of virtual function defined in the
0178 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0179 
0180 
0181 private:
0182   /**
0183    * Normalization of the min-bias cross section.
0184    * Note that the cross section is reweighted in addition to produce the
0185    * non-diffractive cross section given by the MPIHandler
0186    * csNorm can be modified to improve the unweighting effiency.  
0187    */
0188   double csNorm_;   
0189 
0190   /**
0191    * Scale for the Min Bias matrix element
0192    */
0193   Energy Scale_;
0194 
0195   /**
0196    * Allow only valence quark extraction.
0197    */ 
0198   bool onlyValQuarks_=true;
0199 
0200   /**
0201    * a MPIHandler to administer the creation of several (semihard) 
0202    * partonic interactions.
0203    * Needed to comunicate the non-diffractive cross section.
0204    */
0205   UEBasePtr MPIHandler_;
0206 
0207   /**
0208    * The assignment operator is private and must never be called.
0209    * In fact, it should not even be implemented.
0210    */
0211   MEMinBias & operator=(const MEMinBias &) = delete;
0212 
0213 };
0214 
0215 }
0216 
0217 #endif /* HERWIG_MEMinBias_H */