|
|
|||
File indexing completed on 2026-08-06 09:24:21
0001 // -*- C++ -*- 0002 // 0003 // TwoOffShellCalculator.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_TwoOffShellCalculator_H 0010 #define HERWIG_TwoOffShellCalculator_H 0011 // 0012 // This is the declaration of the TwoOffShellCalculator class. 0013 // 0014 #include "WidthCalculatorBase.h" 0015 #include "GenericMassGenerator.h" 0016 #include "TwoOffShellCalculator.fh" 0017 #include "OneOffShellCalculator.fh" 0018 #include "Herwig/Utilities/GSLIntegrator.h" 0019 0020 namespace Herwig { 0021 using namespace ThePEG; 0022 0023 struct TwoOffShellIntegrand; 0024 0025 /** \ingroup PDT 0026 * 0027 * Use <code>WidthCalculatorBase</code> objects to integrate over the mass of two 0028 * external particles which can be off-shell for running width calculations. 0029 * 0030 * @see WidthCalculatorBase 0031 * @see TwoOffShellIntegrand 0032 */ 0033 class TwoOffShellCalculator: public WidthCalculatorBase { 0034 0035 /** 0036 * The TwoOffShellIntegrand class is a friend to allow access to the private 0037 * members for the integration. 0038 */ 0039 friend struct TwoOffShellIntegrand; 0040 0041 public: 0042 0043 /** 0044 * Constructor which should be used setting all the required members. 0045 * @param inloc The mass which is off-shell and to be integrated over. 0046 * @param inwidth Pointer to the WidthGeneratorBase object which calculates 0047 * the partial width for a given mass of the off-shell particle. This 0048 * should be a OneOffShellCalculator instance. 0049 * @param inmass Pointer to the GenericMassGenerator for the off-shell particle. 0050 * @param inmin1 The minimum mass for the first off-shell particle. 0051 * @param inmin2 The minimum mass for the second off-shell particle. 0052 */ 0053 TwoOffShellCalculator(int inloc, WidthCalculatorBasePtr inwidth, 0054 GenericMassGeneratorPtr inmass, 0055 Energy inmin2,Energy inmin1) 0056 : _themass(inloc),_minmass(inmin2),_mother(inmin1),_oneoffwidth(inwidth), 0057 _massptr(inmass) 0058 {} 0059 0060 /** 0061 * member to calculate the partial width. 0062 * @param scale The mass squared for the decaying particle. 0063 * @return The partial width. 0064 */ 0065 Energy partialWidth(Energy2 scale) const; 0066 0067 /** 0068 * Get the mass of one of the decay products. This must be 0069 * implemented in classes inheriting from this one. 0070 * @param imass The mass required. 0071 * @param mass The new value. 0072 * @return The mass required. 0073 */ 0074 void resetMass(int imass,Energy mass) { 0075 _oneoffwidth->resetMass(imass,mass); 0076 } 0077 0078 /** 0079 * Get the mass of one of the decay products. This must be 0080 * implemented in classes inheriting from this one. 0081 * @param imass The mass required. 0082 * @return The mass required. 0083 */ 0084 Energy getMass(const int imass) const { 0085 return _oneoffwidth->getMass(imass); 0086 } 0087 0088 /** 0089 * Get the masses of all bar the one specified. Used to get the limits 0090 * for integration. 0091 * @param imass The particle not needed 0092 * @return The sum of the other masses. 0093 */ 0094 Energy otherMass(const int imass) const { 0095 return _oneoffwidth->otherMass(imass); 0096 } 0097 0098 protected: 0099 0100 /** 0101 * The integrand. 0102 * @param mass The mass of the second off-shell particle, 0103 * @return The differential rate. 0104 */ 0105 Energy dGamma(Energy mass) const { 0106 _oneoffwidth->resetMass(_themass,mass); 0107 Energy wgt = (_oneoffwidth->partialWidth(_scale)); 0108 wgt*=(_massptr->weight(mass)); 0109 return wgt; 0110 } 0111 0112 private: 0113 0114 /** 0115 * Private and non-existent assignment operator. 0116 */ 0117 TwoOffShellCalculator & operator=(const TwoOffShellCalculator &) = delete; 0118 0119 private: 0120 0121 /** 0122 * The second mass which is offshell 0123 */ 0124 0125 int _themass; 0126 /** 0127 * the minimum allowed mass 0128 */ 0129 Energy _minmass; 0130 0131 /** 0132 * sum of the masses of the other decay products 0133 */ 0134 Energy _mother; 0135 0136 /** 0137 * pointer to object calculating the width for one-off shell particle. 0138 */ 0139 WidthCalculatorBasePtr _oneoffwidth; 0140 0141 /** 0142 * pointer to object calculating the mass of the particle 0143 */ 0144 GenericMassGeneratorPtr _massptr; 0145 0146 /** 0147 * integrator 0148 */ 0149 GSLIntegrator _integrator; 0150 0151 /** 0152 * the mass squared of the decaying particle 0153 */ 0154 mutable Energy2 _scale; 0155 0156 }; 0157 0158 0159 /** \ingroup PDT 0160 * Class for the integrand of a matrix element where two of the outgoing 0161 * particles is off-shell. This class is used by the TwoOffShellCalculator class 0162 * to perform the integral. 0163 */ 0164 struct TwoOffShellIntegrand { 0165 /** 0166 * Constructor. 0167 * @param in Pointer to the OneOffShellCalculator class this is doing the 0168 * integration for. 0169 * @param m2 The mass squared of the off-shell particle for the Jacobian 0170 * transform. 0171 * @param mw The mass times width of the off-shell particle for the Jacobian 0172 * transform. 0173 */ 0174 TwoOffShellIntegrand(tcTwoOffShellCalculatorPtr in,Energy2 m2,Energy2 mw) 0175 : _integrand(in),_mass2(m2),_mwidth(mw) 0176 {} 0177 0178 /** 0179 * Retreive function value 0180 */ 0181 Energy operator ()(double x) const { 0182 return _integrand->dGamma(sqrt(_mass2+_mwidth*tan(x))); 0183 } 0184 /** Argument type for the GSLIntegrator */ 0185 typedef double ArgType; 0186 /** Return type for the GSLIntegrator */ 0187 typedef Energy ValType; 0188 0189 private: 0190 0191 /** 0192 * pointer to the decay integrator 0193 */ 0194 cTwoOffShellCalculatorPtr _integrand; 0195 0196 /** 0197 * The mass squared for the off-shell particle for the Jacobian transform. 0198 */ 0199 Energy2 _mass2; 0200 0201 /** 0202 * The mass times width for the off-shell particle for the Jacobian transform. 0203 */ 0204 Energy2 _mwidth; 0205 }; 0206 } 0207 0208 #endif /* HERWIG_TwoOffShellCalculator_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|