|
|
|||
File indexing completed on 2026-08-06 09:24:16
0001 // -*- C++ -*- 0002 // 0003 // ProductionMatrixElement.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_ProductionMatrixElement_H 0010 #define HERWIG_ProductionMatrixElement_H 0011 // 0012 // This is the declaration of the ProductionMatrixElement class. 0013 0014 #include <ThePEG/EventRecord/RhoDMatrix.h> 0015 0016 namespace Herwig { 0017 0018 0019 using namespace ThePEG; 0020 0021 /** \ingroup Helicity 0022 * 0023 * The storage of the helicity amplitude expression for the matrix element 0024 * of a hard process. Two incoming particles and an arbitary number of 0025 * external particles are supported. 0026 * 0027 * @see DecayMatrixElement 0028 * @see RhoDMatrix 0029 * @see HardVertex 0030 * 0031 * \author Peter Richardson 0032 */ 0033 0034 class ProductionMatrixElement { 0035 0036 public: 0037 0038 /** @name Standard constructors and destructors. */ 0039 //@{ 0040 /** 0041 * Constructor for 2-1 scattering. 0042 * @param in1 \f$2S+1\f$ for the first incoming particle. 0043 * @param in2 \f$2S+1\f$ for the second incoming particle. 0044 * @param out \f$2S+1\f$ for the outgoing particle. 0045 */ 0046 ProductionMatrixElement(PDT::Spin in1,PDT::Spin in2,PDT::Spin out); 0047 0048 /** 0049 * Constructor for 2-2 scattering. 0050 * @param in1 \f$2S+1\f$ for the first incoming particle. 0051 * @param in2 \f$2S+1\f$ for the second incoming particle. 0052 * @param out1 \f$2S+1\f$ for the first outgoing particle. 0053 * @param out2 \f$2S+1\f$ for the second outgoing particle. 0054 */ 0055 ProductionMatrixElement(PDT::Spin in1,PDT::Spin in2,PDT::Spin out1, 0056 PDT::Spin out2); 0057 0058 /** 0059 * Constructor for 2-3 scattering. 0060 * @param in1 \f$2S+1\f$ for the first incoming particle. 0061 * @param in2 \f$2S+1\f$ for the second incoming particle. 0062 * @param out1 \f$2S+1\f$ for the first outgoing particle. 0063 * @param out2 \f$2S+1\f$ for the second outgoing particle. 0064 * @param out3 \f$2S+1\f$ for the third outgoing particle. 0065 */ 0066 ProductionMatrixElement(PDT::Spin in1,PDT::Spin in2,PDT::Spin out1, 0067 PDT::Spin out2,PDT::Spin out3); 0068 0069 /** 0070 * Constructor for 2-4 scattering. 0071 * @param in1 \f$2S+1\f$ for the first incoming particle. 0072 * @param in2 \f$2S+1\f$ for the second incoming particle. 0073 * @param out1 \f$2S+1\f$ for the first outgoing particle. 0074 * @param out2 \f$2S+1\f$ for the second outgoing particle. 0075 * @param out3 \f$2S+1\f$ for the third outgoing particle. 0076 * @param out4 \f$2S+1\f$ for the fourth outgoing particle. 0077 */ 0078 ProductionMatrixElement(PDT::Spin in1,PDT::Spin in2,PDT::Spin out1, 0079 PDT::Spin out2,PDT::Spin out3, PDT::Spin out4); 0080 0081 /** 0082 * Constructor for 2-5 scattering. 0083 * @param in1 \f$2S+1\f$ for the first incoming particle. 0084 * @param in2 \f$2S+1\f$ for the second incoming particle. 0085 * @param out1 \f$2S+1\f$ for the first outgoing particle. 0086 * @param out2 \f$2S+1\f$ for the second outgoing particle. 0087 * @param out3 \f$2S+1\f$ for the third outgoing particle. 0088 * @param out4 \f$2S+1\f$ for the fourth outgoing particle. 0089 * @param out5 \f$2S+1\f$ for the fifth outgoing particle. 0090 */ 0091 ProductionMatrixElement(PDT::Spin in1,PDT::Spin in2,PDT::Spin out1, 0092 PDT::Spin out2,PDT::Spin out3, PDT::Spin out4, 0093 PDT::Spin out5); 0094 0095 /** 0096 * Constructor for 2-6 scattering. 0097 * @param in1 \f$2S+1\f$ for the first incoming particle. 0098 * @param in2 \f$2S+1\f$ for the second incoming particle. 0099 * @param out1 \f$2S+1\f$ for the first outgoing particle. 0100 * @param out2 \f$2S+1\f$ for the second outgoing particle. 0101 * @param out3 \f$2S+1\f$ for the third outgoing particle. 0102 * @param out4 \f$2S+1\f$ for the fourth outgoing particle. 0103 * @param out5 \f$2S+1\f$ for the fifth outgoing particle. 0104 * @param out6 \f$2S+1\f$ for the sixth outgoing particle. 0105 */ 0106 ProductionMatrixElement(PDT::Spin in1,PDT::Spin in2,PDT::Spin out1, 0107 PDT::Spin out2,PDT::Spin out3, PDT::Spin out4, 0108 PDT::Spin out5, PDT::Spin out6); 0109 0110 /** 0111 * Constructor for 2-n scattering. 0112 * @param in1 \f$2S+1\f$ for the first incoming particle. 0113 * @param in2 \f$2S+1\f$ for the second incoming particle. 0114 * @param out A vector containing \f$2S+1\f$ for the outgoing particles. 0115 */ 0116 ProductionMatrixElement(PDT::Spin in1,PDT::Spin in2,vector<PDT::Spin> out); 0117 0118 /** 0119 * Default constructor. 0120 */ 0121 ProductionMatrixElement() : _nout(0) {} 0122 //@} 0123 0124 public: 0125 0126 /** @name Access to the spins of the particles. */ 0127 //@{ 0128 /** 0129 * Get the spins of the incoming particles particle 0130 * @return A vector containing \f$2S+1\f$ for the two incoming particles. 0131 */ 0132 vector<PDT::Spin> inspin() {return _inspin;} 0133 0134 /** 0135 * Get the spins of the outgoing particles. 0136 * @return A vector containing \f$2S+1\f$ for the outgoing particles. 0137 */ 0138 vector<PDT::Spin> outspin() {return _outspin;} 0139 //@} 0140 0141 public: 0142 0143 /** @name Access to the individual helicity components. */ 0144 //@{ 0145 /** 0146 * Access the helicity components for a 2-1 scattering. This method supplies 0147 * the component but does not allow it to be changed. 0148 * @param in1 The helicity of the first incoming particle. 0149 * @param in2 The helicity of the second incoming particle. 0150 * @param out The helicity of the outgoing particle. 0151 * @return The matrix element for the given helicities. 0152 */ 0153 Complex operator () (unsigned int in1,unsigned int in2, 0154 unsigned int out) const; 0155 0156 /** 0157 * Access the helicity components for a 2-1 scattering. This method supplies 0158 * the component and allows it to be changed. 0159 * @param in1 The helicity of the first incoming particle. 0160 * @param in2 The helicity of the second incoming particle. 0161 * @param out The helicity of the outgoing particle. 0162 * @return The matrix element for the given helicities. 0163 */ 0164 Complex & operator () (unsigned int in1,unsigned int in2, 0165 unsigned int out); 0166 0167 /** 0168 * Access the helicity components for a 2-2 scattering. This method supplies 0169 * the component but does not allow it to be changed. 0170 * @param in1 The helicity of the first incoming particle. 0171 * @param in2 The helicity of the second incoming particle. 0172 * @param out1 The helicity of the first outgoing particle. 0173 * @param out2 The helicity of the second outgoing particle. 0174 * @return The matrix element for the given helicities. 0175 */ 0176 Complex operator () (unsigned int in1,unsigned int in2, 0177 unsigned int out1,unsigned int out2) const; 0178 0179 /** 0180 * Access the helicity components for a 2-2 scattering. This method supplies 0181 * the component and allows it to be changed. 0182 * @param in1 The helicity of the first incoming particle. 0183 * @param in2 The helicity of the second incoming particle. 0184 * @param out1 The helicity of the first outgoing particle. 0185 * @param out2 The helicity of the second outgoing particle. 0186 * @return The matrix element for the given helicities. 0187 */ 0188 Complex & operator () (unsigned int in1,unsigned int in2, 0189 unsigned int out1,unsigned int out2); 0190 0191 /** 0192 * Access the helicity components for a 2-3 scattering. This method supplies 0193 * the component but does not allow it to be changed. 0194 * @param in1 The helicity of the first incoming particle. 0195 * @param in2 The helicity of the second incoming particle. 0196 * @param out1 The helicity of the first outgoing particle. 0197 * @param out2 The helicity of the second outgoing particle. 0198 * @param out3 The helicity of the third outgoing particle. 0199 * @return The matrix element for the given helicities. 0200 */ 0201 Complex operator () (unsigned int in1,unsigned int in2, 0202 unsigned int out1,unsigned int out2, 0203 unsigned int out3) const; 0204 0205 /** 0206 * Access the helicity components for a 2-3 scattering. This method supplies 0207 * the component and allows it to be changed. 0208 * @param in1 The helicity of the first incoming particle. 0209 * @param in2 The helicity of the second incoming particle. 0210 * @param out1 The helicity of the first outgoing particle. 0211 * @param out2 The helicity of the second outgoing particle. 0212 * @param out3 The helicity of the third outgoing particle. 0213 * @return The matrix element for the given helicities. 0214 */ 0215 Complex & operator () (unsigned int in1,unsigned int in2, 0216 unsigned int out1,unsigned int out2, 0217 unsigned int out3); 0218 0219 /** 0220 * Access the helicity components for a 2-4 scattering. This method supplies 0221 * the component but does not allow it to be changed. 0222 * @param in1 The helicity of the first incoming particle. 0223 * @param in2 The helicity of the second incoming particle. 0224 * @param out1 The helicity of the first outgoing particle. 0225 * @param out2 The helicity of the second outgoing particle. 0226 * @param out3 The helicity of the third outgoing particle. 0227 * @param out4 The helicity of the fourth outgoing particle. 0228 * @return The matrix element for the given helicities. 0229 */ 0230 Complex operator () (unsigned int in1,unsigned int in2, 0231 unsigned int out1,unsigned int out2, 0232 unsigned int out3,unsigned int out4) const; 0233 0234 /** 0235 * Access the helicity components for a 2-4 scattering. This method supplies 0236 * the component and allows it to be changed. 0237 * @param in1 The helicity of the first incoming particle. 0238 * @param in2 The helicity of the second incoming particle. 0239 * @param out1 The helicity of the first outgoing particle. 0240 * @param out2 The helicity of the second outgoing particle. 0241 * @param out3 The helicity of the third outgoing particle. 0242 * @param out4 The helicity of the fourth outgoing particle. 0243 * @return The matrix element for the given helicities. 0244 */ 0245 Complex & operator () (unsigned int in1,unsigned int in2, 0246 unsigned int out1,unsigned int out2, 0247 unsigned int out3, unsigned int out4); 0248 0249 /** 0250 * Access the helicity components for a 2-5 scattering. This method supplies 0251 * the component but does not allow it to be changed. 0252 * @param in1 The helicity of the first incoming particle. 0253 * @param in2 The helicity of the second incoming particle. 0254 * @param out1 The helicity of the first outgoing particle. 0255 * @param out2 The helicity of the second outgoing particle. 0256 * @param out3 The helicity of the third outgoing particle. 0257 * @param out4 The helicity of the fourth outgoing particle. 0258 * @param out5 The helicity of the fifth outgoing particle. 0259 * @return The matrix element for the given helicities. 0260 */ 0261 Complex operator () (unsigned int in1,unsigned int in2, 0262 unsigned int out1,unsigned int out2, 0263 unsigned int out3,unsigned int out4, 0264 unsigned int out5) const; 0265 0266 /** 0267 * Access the helicity components for a 2-5 scattering. This method supplies 0268 * the component and allows it to be changed. 0269 * @param in1 The helicity of the first incoming particle. 0270 * @param in2 The helicity of the second incoming particle. 0271 * @param out1 The helicity of the first outgoing particle. 0272 * @param out2 The helicity of the second outgoing particle. 0273 * @param out3 The helicity of the third outgoing particle. 0274 * @param out4 The helicity of the fourth outgoing particle. 0275 * @param out5 The helicity of the fifth outgoing particle. 0276 * @return The matrix element for the given helicities. 0277 */ 0278 Complex & operator () (unsigned int in1,unsigned int in2, 0279 unsigned int out1,unsigned int out2, 0280 unsigned int out3, unsigned int out4, 0281 unsigned int out5); 0282 0283 /** 0284 * Access the helicity components for a 2-6 scattering. This method supplies 0285 * the component but does not allow it to be changed. 0286 * @param in1 The helicity of the first incoming particle. 0287 * @param in2 The helicity of the second incoming particle. 0288 * @param out1 The helicity of the first outgoing particle. 0289 * @param out2 The helicity of the second outgoing particle. 0290 * @param out3 The helicity of the third outgoing particle. 0291 * @param out4 The helicity of the fourth outgoing particle. 0292 * @param out5 The helicity of the fifth outgoing particle. 0293 * @param out6 The helicity of the sixth outgoing particle. 0294 * @return The matrix element for the given helicities. 0295 */ 0296 Complex operator () (unsigned int in1,unsigned int in2, 0297 unsigned int out1,unsigned int out2, 0298 unsigned int out3,unsigned int out4, 0299 unsigned int out5,unsigned int out6) const; 0300 0301 /** 0302 * Access the helicity components for a 2-6 scattering. This method supplies 0303 * the component and allows it to be changed. 0304 * @param in1 The helicity of the first incoming particle. 0305 * @param in2 The helicity of the second incoming particle. 0306 * @param out1 The helicity of the first outgoing particle. 0307 * @param out2 The helicity of the second outgoing particle. 0308 * @param out3 The helicity of the third outgoing particle. 0309 * @param out4 The helicity of the fourth outgoing particle. 0310 * @param out5 The helicity of the fifth outgoing particle. 0311 * @param out6 The helicity of the sixth outgoing particle. 0312 * @return The matrix element for the given helicities. 0313 */ 0314 Complex & operator () (unsigned int in1,unsigned int in2, 0315 unsigned int out1,unsigned int out2, 0316 unsigned int out3, unsigned int out4, 0317 unsigned int out5, unsigned int out6); 0318 0319 /** 0320 * Access the helicity components for a 2-n scattering. This method supplies 0321 * the component but does not allow it to be changed. 0322 * @param hel The helicities of the incoming and outgoing particles 0323 * @return The matrix element for the given helicities. 0324 */ 0325 Complex operator () (vector<unsigned int> hel) const; 0326 0327 /** 0328 * Access the helicity components for a 2-n scattering. This method supplies 0329 * the component and allows it to be changed. 0330 * @param hel The helicities of the incoming and outgoing particles 0331 * @return The matrix element for the given helicities. 0332 */ 0333 Complex & operator () (vector<unsigned int> hel); 0334 //@} 0335 0336 public: 0337 0338 /** 0339 * Calculate the decay matrix for an incoming particle. 0340 */ 0341 RhoDMatrix calculateDMatrix(int,const RhoDMatrix &, 0342 const vector<RhoDMatrix> &) const; 0343 0344 /** 0345 * Calculate the rho matrix for a given outgoing particle. 0346 */ 0347 RhoDMatrix calculateRhoMatrix(int,const RhoDMatrix &, 0348 const RhoDMatrix &, 0349 const vector<RhoDMatrix> &) const; 0350 0351 /** 0352 * Compute the spin averaged matrix element 0353 */ 0354 double average() const; 0355 0356 /** 0357 * Compute the spin average matrix element 0358 */ 0359 double average(const RhoDMatrix & in1, 0360 const RhoDMatrix & in2) const; 0361 0362 /** 0363 * Compute the spin average matrix element 0364 */ 0365 Complex average(const ProductionMatrixElement & me2, 0366 const RhoDMatrix & in1, 0367 const RhoDMatrix & in2) const; 0368 0369 public: 0370 0371 /** 0372 * Reset the matrix element. 0373 */ 0374 void reset(const ProductionMatrixElement & x) const; 0375 0376 /** 0377 * Standard Init function used to initialize the interfaces. 0378 */ 0379 static void Init(); 0380 0381 private: 0382 0383 /** 0384 * Set the size of the vector containing the matrix element. 0385 */ 0386 void setMESize(); 0387 0388 private: 0389 0390 /** 0391 * Number of outgoing particles. 0392 */ 0393 mutable unsigned int _nout; 0394 0395 /** 0396 * Spin of the incoming particles as 2s+1. 0397 */ 0398 mutable vector<PDT::Spin> _inspin; 0399 0400 /** 0401 * Spins of the outgoing particles. 0402 */ 0403 mutable vector<PDT::Spin> _outspin; 0404 0405 /** 0406 * Storage of the matrix element, a vector is better for memory usage. 0407 */ 0408 mutable vector<Complex> _matrixelement; 0409 0410 /** 0411 * Constants needed to map the index of the vector to a helicity structure. 0412 */ 0413 mutable vector<int> _constants; 0414 0415 }; 0416 0417 } 0418 0419 #endif /* HERWIG_ProductionMatrixElement_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|