|
|
|||
File indexing completed on 2026-08-06 09:24:07
0001 // -*- C++ -*- 0002 // 0003 // HwppSelector.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_HwppSelector_H 0010 #define HERWIG_HwppSelector_H 0011 // 0012 // This is the declaration of the HwppSelector class. 0013 // 0014 0015 #include "HadronSelector.h" 0016 0017 namespace Herwig { 0018 0019 using namespace ThePEG; 0020 0021 /** \ingroup hadronization 0022 * The HwppSelector class selects the hadrons produced in cluster decay using 0023 * the Herwig variant of the cluster model. 0024 * 0025 * @see \ref HwppSelectorInterfaces "The interfaces" 0026 * defined for HwppSelector. 0027 */ 0028 class HwppSelector: public HadronSelector { 0029 0030 public: 0031 0032 /** 0033 * The default constructor. 0034 */ 0035 HwppSelector() : HadronSelector(1), 0036 _pwtDquark( 1.0 ),_pwtUquark( 1.0 ),_pwtSquark( 1.0 ),_pwtCquark( 0.0 ), 0037 _pwtBquark( 0.0 ),_pwtDIquark(1.0 ), 0038 _sngWt( 1.0 ), _decWt( 1.0 ), 0039 _mode(1), _enhanceSProb(0), _m0Decay(1.*GeV), 0040 _scHadronWtFactor(1.), _sbHadronWtFactor(1.) 0041 {} 0042 0043 public: 0044 0045 /** @name Functions used by the persistent I/O system. */ 0046 //@{ 0047 /** 0048 * Function used to write out object persistently. 0049 * @param os the persistent output stream written to. 0050 */ 0051 void persistentOutput(PersistentOStream & os) const; 0052 0053 /** 0054 * Function used to read in object persistently. 0055 * @param is the persistent input stream read from. 0056 * @param version the version number of the object when written. 0057 */ 0058 void persistentInput(PersistentIStream & is, int version); 0059 //@} 0060 0061 /** 0062 * The standard Init function used to initialize the interfaces. 0063 * Called exactly once for each class by the class description system 0064 * before the main function starts or 0065 * when this class is dynamically loaded. 0066 */ 0067 static void Init(); 0068 0069 protected: 0070 0071 /** 0072 * Weights for baryons 0073 */ 0074 virtual double baryonWeight(long id) const; 0075 0076 /** 0077 * Whether to select a meson or a baryon 0078 */ 0079 std::tuple<bool,bool,bool> selectBaryon(const Energy cluMass, tcPDPtr par1, tcPDPtr par2) const; 0080 0081 /** 0082 * Strange quark weight 0083 */ 0084 virtual double strangeWeight(const Energy cluMass, tcPDPtr par1, tcPDPtr par2) const; 0085 0086 /** 0087 * Returns the mass of the lightest pair of baryons. 0088 * @param ptr1 is the first constituent 0089 * @param ptr2 is the second constituent 0090 */ 0091 inline Energy massLightestBaryonPair(tcPDPtr ptr1, tcPDPtr ptr2) const { 0092 map<pair<long,long>,tcPDPair>::const_iterator lightest = 0093 lightestBaryons_.find(make_pair(abs(ptr1->id()),abs(ptr2->id()))); 0094 assert(lightest!=lightestBaryons_.end()); 0095 return lightest->second.first->mass()+lightest->second.second->mass(); 0096 } 0097 0098 /** 0099 * Returns the mass of the lightest pair of baryons. 0100 * @param ptr1 is the first constituent 0101 * @param ptr2 is the second constituent 0102 */ 0103 tcPDPair lightestBaryonPair(tcPDPtr ptr1, tcPDPtr ptr2) const; 0104 0105 protected: 0106 0107 /** @name Clone Methods. */ 0108 //@{ 0109 /** 0110 * Make a simple clone of this object. 0111 * @return a pointer to the new object. 0112 */ 0113 virtual IBPtr clone() const; 0114 0115 /** Make a clone of this object, possibly modifying the cloned object 0116 * to make it sane. 0117 * @return a pointer to the new object. 0118 */ 0119 virtual IBPtr fullclone() const; 0120 //@} 0121 0122 protected: 0123 0124 /** @name Standard Interfaced functions. */ 0125 //@{ 0126 /** 0127 * Initialize this object after the setup phase before saving an 0128 * EventGenerator to disk. 0129 * @throws InitException if object could not be initialized properly. 0130 */ 0131 virtual void doinit(); 0132 //@} 0133 0134 private: 0135 0136 /** 0137 * The assignment operator is private and must never be called. 0138 * In fact, it should not even be implemented. 0139 */ 0140 HwppSelector & operator=(const HwppSelector &) = delete; 0141 0142 private: 0143 0144 /** 0145 * The weights for the different quarks and diquarks 0146 */ 0147 //@{ 0148 /** 0149 * The probability of producting a down quark. 0150 */ 0151 double _pwtDquark; 0152 0153 /** 0154 * The probability of producting an up quark. 0155 */ 0156 double _pwtUquark; 0157 0158 /** 0159 * The probability of producting a strange quark. 0160 */ 0161 double _pwtSquark; 0162 0163 /** 0164 * The probability of producting a charm quark. 0165 */ 0166 double _pwtCquark; 0167 0168 /** 0169 * The probability of producting a bottom quark. 0170 */ 0171 double _pwtBquark; 0172 0173 /** 0174 * The probability of producting a diquark. 0175 */ 0176 double _pwtDIquark; 0177 //@} 0178 0179 /** 0180 * Singlet and Decuplet weights 0181 */ 0182 //@{ 0183 /** 0184 * The singlet weight 0185 */ 0186 double _sngWt; 0187 0188 /** 0189 * The decuplet weight 0190 */ 0191 double _decWt; 0192 //@} 0193 0194 private: 0195 0196 /** 0197 * Which algorithm to use 0198 */ 0199 unsigned int _mode; 0200 0201 /** 0202 * Flag that switches between no strangeness enhancement, scaling enhancement, 0203 * and exponential enhancement (in numerical order) 0204 */ 0205 int _enhanceSProb; 0206 0207 /** 0208 * Parameter that governs the strangeness enhancement scaling 0209 */ 0210 Energy _m0Decay; 0211 0212 /** 0213 * Flag that switches between mass measures used in strangeness enhancement: 0214 * cluster mass, or the lambda measure - ( m_{clu}^2 - (m_q + m_{qbar})^2 ) 0215 */ 0216 int _massMeasure; 0217 0218 /** 0219 * Constant variable that stops the scale in strangeness enhancement from 0220 * becoming too large 0221 */ 0222 const double _maxScale = 20.; 0223 0224 /** 0225 * Heavy strange-charm hadron wight coefficient 0226 */ 0227 double _scHadronWtFactor; 0228 0229 /** 0230 * Heavy strange-bottom hadron wight coefficient 0231 */ 0232 double _sbHadronWtFactor; 0233 0234 /** 0235 * Caches of lightest pairs for speed 0236 */ 0237 //@{ 0238 /** 0239 * Masses of lightest baryon pair 0240 */ 0241 map<pair<long,long>,tcPDPair> lightestBaryons_; 0242 //@} 0243 0244 }; 0245 0246 } 0247 0248 #endif /* HERWIG_HwppSelector_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|