|
|
|||
File indexing completed on 2026-08-06 09:38:27
0001 // -*- C++ -*- 0002 // 0003 // ME2to2Base.h is a part of ThePEG - Toolkit for HEP Event Generation 0004 // Copyright (C) 1999-2019 Leif Lonnblad 0005 // 0006 // ThePEG 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 ThePEG_ME2to2Base_H 0010 #define ThePEG_ME2to2Base_H 0011 // This is the declaration of the ME2to2Base class. 0012 0013 #include "ThePEG/MatrixElement/MEBase.h" 0014 #include "ThePEG/MatrixElement/Tree2toNDiagram.h" 0015 #include "ThePEG/Interface/Switch.fh" 0016 0017 namespace ThePEG { 0018 0019 /** 0020 * ME2to2Base can be used as a base class for any matrix element class 0021 * implementing 2\f$\rightarrow\f$ 2 processes. It extends the MEBase 0022 * base class by implementing the virtual scale() method to return the 0023 * assumed scale of a given process according to several options. It 0024 * also caches some useful characteristics of the chosen phase space 0025 * point, such as tHat(), uHat() and the masses of the external 0026 * partons. 0027 * 0028 * @see \ref ME2to2BaseInterfaces "The interfaces" 0029 * defined for ME2to2Base. 0030 * @see MEBase 0031 */ 0032 class ME2to2Base: public MEBase { 0033 0034 public: 0035 0036 /** @name Standard constructors and destructors. */ 0037 //@{ 0038 /** 0039 * Default constructor. 0040 */ 0041 ME2to2Base() 0042 : theScaleChoice(0), theLastTHat(ZERO), theLastUHat(ZERO), 0043 theLastPhi(0.0) {} 0044 0045 /** 0046 * Destructor. 0047 */ 0048 virtual ~ME2to2Base(); 0049 //@} 0050 0051 public: 0052 0053 /** @name Virtual functions required by the MEBase class. */ 0054 //@{ 0055 /** 0056 * The number of internal degreed of freedom used in the matrix 0057 * element. 0058 */ 0059 virtual int nDim() const { return 1; } 0060 0061 /** 0062 * Generate internal degrees of freedom given 'nDim()' uniform 0063 * random numbers in the interval ]0,1[. To help the phase space 0064 * generator, the 'dSigHatDR()' should be a smooth function of these 0065 * numbers, although this is not strictly necessary. Return 0066 * false if the chosen points failed the kinematical cuts. 0067 */ 0068 virtual bool generateKinematics(const double * r); 0069 0070 /** 0071 * Return the matrix element for the kinematical configuation 0072 * previously provided by the last call to setKinematics(). Uses 0073 * me(). 0074 */ 0075 virtual CrossSection dSigHatDR() const; 0076 0077 /** 0078 * Return the scale associated with the last set phase space point. 0079 */ 0080 virtual Energy2 scale() const; 0081 0082 /** 0083 * Set the typed and momenta of the incoming and outgoing partons to 0084 * be used in subsequent calls to me() and colourGeometries() 0085 * according to the associated XComb object. 0086 */ 0087 virtual void setKinematics(); 0088 //@} 0089 0090 /** 0091 * Used internally by generateKinematics, after calculating the 0092 * limits on cos(theta). 0093 */ 0094 virtual double getCosTheta(double cthmin, double cthmax, const double * r); 0095 0096 /** 0097 * Give the option corresponding to the way the scale of an 0098 * interaction is calculated. 0099 */ 0100 int scaleChoice() const { return theScaleChoice; } 0101 0102 public: 0103 0104 /** @name Access cached values in of the last set phase space point. */ 0105 //@{ 0106 /** 0107 * Return the \f$\hat{t}\f$ of the last set phase space point. 0108 */ 0109 Energy2 tHat() const { return theLastTHat; } 0110 0111 /** 0112 * Return the \f$\hat{u}\f$ of the last set phase space point. 0113 */ 0114 Energy2 uHat() const { return theLastUHat; } 0115 0116 /** 0117 * Return the azimuth angle of the last set phase space point. 0118 */ 0119 double phi() const { return theLastPhi; } 0120 //@} 0121 0122 public: 0123 0124 /** @name Functions used by the persistent I/O system. */ 0125 //@{ 0126 /** 0127 * Function used to write out object persistently. 0128 * @param os the persistent output stream written to. 0129 */ 0130 void persistentOutput(PersistentOStream & os) const; 0131 0132 /** 0133 * Function used to read in object persistently. 0134 * @param is the persistent input stream read from. 0135 * @param version the version number of the object when written. 0136 */ 0137 void persistentInput(PersistentIStream & is, int version); 0138 //@} 0139 0140 /** 0141 * Standard Init function used to initialize the interfaces. 0142 */ 0143 static void Init(); 0144 0145 protected: 0146 0147 /** @name Set the cached values in of the last set phase space point. */ 0148 //@{ 0149 /** 0150 * Set the \f$\hat{t}\f$ of the last set phase space point. 0151 */ 0152 void tHat(Energy2 e2) { theLastTHat = e2; } 0153 0154 /** 0155 * Set the \f$\hat{u}\f$ of the last set phase space point. 0156 */ 0157 void uHat(Energy2 e2) { theLastUHat = e2; } 0158 0159 /** 0160 * Set the azimuth angle of the last set phase space point. 0161 */ 0162 void phi(double phi) { theLastPhi = phi; } 0163 //@} 0164 0165 protected: 0166 0167 /** 0168 * Access to the acutal Switch object used to determine the choice 0169 * of scale. 0170 */ 0171 static Switch<ME2to2Base,int> & interfaceScaleChoice(); 0172 0173 private: 0174 0175 /** 0176 * The option indicating how to calculate the scale of an interaction. 0177 */ 0178 int theScaleChoice; 0179 0180 /** 0181 * The \f$\hat{t}\f$ of the last set phase space point. 0182 */ 0183 Energy2 theLastTHat; 0184 0185 /** 0186 * The \f$\hat{u}\f$ of the last set phase space point. 0187 */ 0188 Energy2 theLastUHat; 0189 0190 /** 0191 * The azimuth angle of the last set phase space point. 0192 */ 0193 double theLastPhi; 0194 0195 0196 private: 0197 0198 /** 0199 * Describe an abstract base class with persistent data. 0200 */ 0201 static AbstractClassDescription<ME2to2Base> initME2to2Base; 0202 0203 /** 0204 * Private and non-existent assignment operator. 0205 */ 0206 ME2to2Base & operator=(const ME2to2Base &) = delete; 0207 0208 }; 0209 0210 } 0211 0212 0213 namespace ThePEG { 0214 0215 /** @cond TRAITSPECIALIZATIONS */ 0216 0217 /** 0218 * This template specialization informs ThePEG about the 0219 * base class of ME2to2Base. 0220 */ 0221 template <> 0222 struct BaseClassTrait<ME2to2Base,1>: public ClassTraitsType { 0223 /** Typedef of the base class of ME2to2Base. */ 0224 typedef MEBase NthBase; 0225 }; 0226 0227 /** 0228 * This template specialization informs ThePEG about the name of the 0229 * ME2to2Base class. 0230 */ 0231 template <> 0232 struct ClassTraits<ME2to2Base>: public ClassTraitsBase<ME2to2Base> { 0233 /** Return the class name. */ 0234 static string className() { return "ThePEG::ME2to2Base"; } 0235 }; 0236 0237 /** @endcond */ 0238 0239 } 0240 0241 #endif /* ThePEG_ME2to2Base_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|