Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef Herwig_BlobME_H
0003 #define Herwig_BlobME_H
0004 //
0005 // This is the declaration of the BlobME class.
0006 //
0007 
0008 #include "ThePEG/MatrixElement/BlobMEBase.h"
0009 #include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
0010 
0011 namespace Herwig {
0012 
0013 using namespace ThePEG;
0014 
0015 /**
0016  * \brief BlobME serves as a base class for special processes such as
0017  * instanton or sphaleron induced ones.
0018  *
0019  * \author Simon Platzer
0020  *
0021  * @see \ref BlobMEInterfaces "The interfaces"
0022  * defined for BlobME.
0023  */
0024 class BlobME: public BlobMEBase {
0025 
0026 public:
0027 
0028   /** @name Standard constructors and destructors. */
0029   //@{
0030   /**
0031    * The default constructor.
0032    */
0033   BlobME();
0034 
0035   /**
0036    * The destructor.
0037    */
0038   virtual ~BlobME();
0039   //@}
0040 
0041 public:
0042 
0043   /**
0044    * Return the scale associated with the phase space point provided
0045    * by the last call to setKinematics().
0046    */
0047   virtual Energy2 scale() const {
0048     return lastSHat();
0049   }
0050 
0051   /**
0052    * Generate internal degrees of freedom given nDim() uniform random
0053    * numbers in the interval ]0,1[. To help the phase space generator,
0054    * the 'dSigHatDR' should be a smooth function of these numbers,
0055    * although this is not strictly necessary. The return value should
0056    * be true of the generation succeeded. If so the generated momenta
0057    * should be stored in the meMomenta() vector.
0058    */
0059   virtual bool generateKinematics(const double * r) {
0060     jacobian(thePhasespace->generateTwoToNKinematics(r,meMomenta()));
0061     return jacobian() > 0.0;
0062   }
0063   
0064   /**
0065    * Return the additional number of objects to generate
0066    */
0067   size_t nAdditional() const { return theNAdditional; }
0068 
0069   /**
0070    * Set the additional number of objects to generate
0071    */
0072   void nAdditional(size_t n) { theNAdditional = n; }
0073 
0074   /**
0075    * Return the minimal number of final state particles
0076    */
0077   virtual size_t nOutgoing() const = 0;
0078 
0079   /**
0080    * The number of internal degreed of freedom used in the matrix
0081    * element. This default version returns 0;
0082    */
0083   virtual int nDim() const {
0084     return thePhasespace->nDimPhasespace(nOutgoing()+nAdditional());
0085   }
0086 
0087   /**
0088    * Set the xcomb object
0089    */
0090   virtual void setXComb(tStdXCombPtr xc);
0091 
0092   /**
0093    * Return the phase space used
0094    */
0095   Ptr<MatchboxPhasespace>::tptr phasespace() const { return thePhasespace; }
0096 
0097 public:
0098 
0099   /** @name Functions used by the persistent I/O system. */
0100   //@{
0101   /**
0102    * Function used to write out object persistently.
0103    * @param os the persistent output stream written to.
0104    */
0105   void persistentOutput(PersistentOStream & os) const;
0106 
0107   /**
0108    * Function used to read in object persistently.
0109    * @param is the persistent input stream read from.
0110    * @param version the version number of the object when written.
0111    */
0112   void persistentInput(PersistentIStream & is, int version);
0113   //@}
0114 
0115   /**
0116    * The standard Init function used to initialize the interfaces.
0117    * Called exactly once for each class by the class description system
0118    * before the main function starts or
0119    * when this class is dynamically loaded.
0120    */
0121   static void Init();
0122 
0123 // If needed, insert declarations of virtual function defined in the
0124 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0125 
0126 private:
0127 
0128   /**
0129    * The phase space to be used
0130    */
0131   Ptr<MatchboxPhasespace>::ptr thePhasespace;
0132 
0133   /**
0134    * The multiplicity of additional objects to consider
0135    */
0136   size_t theNAdditional;
0137 
0138 private:
0139 
0140   /**
0141    * The assignment operator is private and must never be called.
0142    * In fact, it should not even be implemented.
0143    */
0144   BlobME & operator=(const BlobME &) = delete;
0145 
0146 };
0147 
0148 }
0149 
0150 #endif /* Herwig_BlobME_H */