|
|
|||
File indexing completed on 2026-08-06 09:24:21
0001 // -*- C++ -*- 0002 // 0003 // TwoBodyAllOnCalculator.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_TwoBodyAllOnCalculator_H 0010 #define HERWIG_TwoBodyAllOnCalculator_H 0011 // This is the declaration of the TwoBodyAllOnCalculator class. 0012 0013 #include "WidthCalculatorBase.h" 0014 #include "TwoBodyAllOnCalculator.fh" 0015 #include "GenericWidthGenerator.h" 0016 0017 namespace Herwig { 0018 using namespace ThePEG; 0019 0020 /** \ingroup PDT 0021 * 0022 * The <code>TwoBodyAllOnCalculator</code> class is a wrapped around the the 0023 * simple two body decay matrix elements in the <code>GenericWidthGenerator</code> 0024 * class and is designed to allow these matrix elements to be integrated 0025 * if the external particles can be off-shell. 0026 * 0027 * @see TwoBodyAllOnCalculator 0028 * 0029 */ 0030 class TwoBodyAllOnCalculator: public WidthCalculatorBase { 0031 0032 public: 0033 0034 /** 0035 * The GenericWidthGenerator class is a friend to allow easier access for the 0036 * integration of the two body partial widths. 0037 */ 0038 friend class GenericWidthGenerator; 0039 0040 public: 0041 0042 /** 0043 * Constructor. 0044 * @param inwidth Pointer to the GenericWidthGenerator class. 0045 * @param imode The mode in the GenericWidthGenerator class we are integrating 0046 * @param m1 The mass of the first particle. 0047 * @param m2 The mass of the second particle. 0048 */ 0049 TwoBodyAllOnCalculator(tGenericWidthGeneratorPtr inwidth,int imode, 0050 Energy m1,Energy m2) 0051 : _mode(imode),_mass1(m1),_mass2(m2),_widthgen(inwidth) 0052 {} 0053 0054 /** 0055 * member to calculate the partial width. 0056 * @param scale The mass squared for the decaying particle. 0057 * @return The partial width. 0058 */ 0059 Energy partialWidth(Energy2 scale) const; 0060 0061 /** 0062 * Get the mass of one of the decay products. This must be 0063 * implemented in classes inheriting from this one. 0064 * @param imass The mass required. 0065 * @param mass The new value. 0066 * @return The mass required. 0067 */ 0068 void resetMass(int imass,Energy mass) { 0069 if(imass==1) _mass1=mass; 0070 else if(imass==2) _mass2=mass; 0071 else throw Exception() << "Unknown particle in " 0072 << "TwoBodyAllOnCalculator::resetMass()" 0073 << Exception::runerror; 0074 } 0075 0076 /** 0077 * Get the mass of one of the decay products. This must be 0078 * implemented in classes inheriting from this one. 0079 * @param imass The mass required. 0080 * @return The mass required. 0081 */ 0082 Energy getMass(const int imass) const { 0083 if(imass==1) return _mass1; 0084 else if(imass==2) return _mass2; 0085 else throw Exception() << "Unknown particle in " 0086 << "TwoBodyAllOnCalculator::getMass()" 0087 << Exception::runerror; 0088 } 0089 0090 /** 0091 * Get the masses of all bar the one specified. Used to get the limits 0092 * for integration. 0093 * @param imass The particle not needed 0094 * @return The sum of the other masses. 0095 */ 0096 Energy otherMass(const int imass) const { 0097 if(imass==1) return _mass2; 0098 else if(imass==2) return _mass1; 0099 else throw Exception() << "Unknown particle in " 0100 << "TwoBodyAllOnCalculator::otherMass()" 0101 << Exception::runerror; 0102 } 0103 0104 private: 0105 0106 /** 0107 * Private and non-existent assignment operator. 0108 */ 0109 TwoBodyAllOnCalculator & operator=(const TwoBodyAllOnCalculator &) = delete; 0110 0111 private: 0112 0113 /** 0114 * the mode 0115 */ 0116 int _mode; 0117 0118 /** 0119 * Mass of the first particle. 0120 */ 0121 Energy _mass1; 0122 0123 /** 0124 * Mass of the second particle. 0125 */ 0126 Energy _mass2; 0127 0128 /** 0129 * the width generator 0130 */ 0131 GenericWidthGeneratorPtr _widthgen; 0132 0133 }; 0134 0135 } 0136 0137 #endif /* HERWIG_TwoBodyAllOnCalculator_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|