|
|
|||
File indexing completed on 2026-08-06 09:24:24
0001 // -*- C++ -*- 0002 // 0003 // ColourMatrixElementCorrection.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 2 of the GPL, see COPYING for details. 0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 0008 // 0009 #ifndef Herwig_ColourMatrixElementCorrection_H 0010 #define Herwig_ColourMatrixElementCorrection_H 0011 // 0012 // This is the declaration of the ColourMatrixElementCorrection class. 0013 // 0014 0015 #include "Herwig/Shower/Dipole/Base/DipoleSplittingReweight.h" 0016 0017 #include <tuple> 0018 0019 namespace Herwig { 0020 0021 using namespace ThePEG; 0022 0023 /** 0024 * \ingroup DipoleShower 0025 * \author Johan Thoren, Simon Platzer 0026 * 0027 * \brief ColourMatrixElementCorrection is implementing colour matrix element 0028 * corrections through the weighted Sudakov algorithm 0029 * 0030 * @see \ref ColourMatrixElementCorrectionInterfaces "The interfaces" 0031 * defined for ColourMatrixElementCorrection. 0032 */ 0033 class ColourMatrixElementCorrection: public DipoleSplittingReweight { 0034 0035 public: 0036 0037 /** 0038 * The default constructor. 0039 */ 0040 ColourMatrixElementCorrection(); 0041 0042 public: 0043 0044 /** 0045 * Calculate and cache the colour matrix element correction factor 0046 * for the given splitting type. 0047 */ 0048 double cmec(const DipoleSplittingInfo&) const; 0049 0050 /** 0051 * Return the reweighting factor for the given splitting type. 0052 */ 0053 virtual double evaluate(const DipoleSplittingInfo& s) const { 0054 return cmec(s); 0055 } 0056 0057 /** 0058 * Return the absolute value of the colour matrix element correction 0059 * as an enhancement hint for the sampling of the un-reweighted 0060 * splitting kernel. 0061 */ 0062 virtual double hint(const DipoleSplittingInfo& s) const { 0063 if ( hintOnly(s) ) 0064 return cmec(s); 0065 return abs(cmec(s))*lambda; 0066 } 0067 0068 /** 0069 * Return true, if the reweight can be entirely absorbed into the hint. A 0070 * possible detuning will be switched off. 0071 */ 0072 virtual bool hintOnly(const DipoleSplittingInfo& s) const { 0073 return cmec(s) > 0.; 0074 } 0075 0076 /** 0077 * Set the factor in front of enhance used by the veto algorithm. 0078 */ 0079 virtual void reweightFactor(const double c) { 0080 assert(c > 0.0); 0081 lambda = c; 0082 } 0083 0084 /** 0085 * Set the factor in front of enhance used by the veto algorithm. 0086 */ 0087 virtual void negativeScaling(const double c) { 0088 assert(c >= 0.0); 0089 negCMECScaling = c; 0090 } 0091 0092 public: 0093 0094 /** @name Functions used by the persistent I/O system. */ 0095 //@{ 0096 /** 0097 * Function used to write out object persistently. 0098 * @param os the persistent output stream written to. 0099 */ 0100 void persistentOutput(PersistentOStream & os) const; 0101 0102 /** 0103 * Function used to read in object persistently. 0104 * @param is the persistent input stream read from. 0105 * @param version the version number of the object when written. 0106 */ 0107 void persistentInput(PersistentIStream & is, int version); 0108 //@} 0109 0110 /** 0111 * The standard Init function used to initialize the interfaces. 0112 * Called exactly once for each class by the class description system 0113 * before the main function starts or 0114 * when this class is dynamically loaded. 0115 */ 0116 static void Init(); 0117 0118 protected: 0119 0120 /** @name Clone Methods. */ 0121 //@{ 0122 /** 0123 * Make a simple clone of this object. 0124 * @return a pointer to the new object. 0125 */ 0126 virtual IBPtr clone() const; 0127 0128 /** Make a clone of this object, possibly modifying the cloned object 0129 * to make it sane. 0130 * @return a pointer to the new object. 0131 */ 0132 virtual IBPtr fullclone() const; 0133 //@} 0134 0135 // If needed, insert declarations of virtual function defined in the 0136 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). 0137 0138 private: 0139 0140 /** 0141 * Factor to shuffle the magnitude of the CMEC between the splitting kernel 0142 * and the weight in the reweighted veto algorithm. 0143 */ 0144 double lambda; 0145 0146 /** 0147 * Scaling factor multiplying all of the negative colour matrix element 0148 * corrections. The physically sensible value is 1.0, but this factor can 0149 * be used to examine the effects of the negative contributions. 0150 */ 0151 double negCMECScaling; 0152 0153 /** 0154 * The assignment operator is private and must never be called. 0155 * In fact, it should not even be implemented. 0156 */ 0157 ColourMatrixElementCorrection & operator=(const ColourMatrixElementCorrection &) = delete; 0158 0159 }; 0160 0161 } 0162 0163 #endif /* Herwig_ColourMatrixElementCorrection_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|