File indexing completed on 2026-08-06 09:24:17
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef HERWIG_NBodyDecayConstructorBase_H
0010 #define HERWIG_NBodyDecayConstructorBase_H
0011
0012
0013
0014
0015 #include "ThePEG/Interface/Interfaced.h"
0016 #include "ThePEG/Utilities/Exception.h"
0017 #include "ThePEG/PDT/ParticleData.h"
0018 #include "NBodyDecayConstructorBase.fh"
0019 #include "PrototypeVertex.h"
0020 #include "DecayConstructor.fh"
0021
0022 namespace Herwig {
0023
0024 using namespace ThePEG;
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 class NBodyDecayConstructorBase: public Interfaced {
0035
0036 public:
0037
0038 struct MassOrdering {
0039 bool operator()(PDPtr p1, PDPtr p2) const {
0040 return p1->mass() < p2->mass() || (p1->mass()==p2->mass() && p1->id()>p2->id());
0041 }
0042 };
0043
0044 public:
0045
0046
0047
0048
0049 NBodyDecayConstructorBase() :
0050 init_(true),iteration_(1), points_(1000), info_(false),
0051 createModes_(true), removeOnShell_(1), excludeEffective_(true),
0052 minReleaseFraction_(1e-3), maxBoson_(1), maxList_(1),
0053 includeTopOnShell_(false ), removeFlavourChangingVertices_(false),
0054 removeSmallVertices_(false), minVertexNorm_(1e-8)
0055 {}
0056
0057
0058
0059
0060
0061
0062
0063 virtual void DecayList(const set<PDPtr,MassOrdering> & particles);
0064
0065
0066
0067
0068 virtual unsigned int numBodies() const = 0;
0069
0070
0071
0072
0073 void decayConstructor(tDecayConstructorPtr d) {
0074 decayConstructor_ = d;
0075 }
0076
0077
0078
0079
0080 bool removeFlavourChangingVertices() const {
0081 return removeFlavourChangingVertices_;
0082 }
0083
0084
0085
0086
0087 bool removeSmallVertices() const {
0088 return removeSmallVertices_;
0089 }
0090
0091
0092
0093
0094 double minVertexNorm() const {
0095 return minVertexNorm_;
0096 }
0097
0098 protected:
0099
0100
0101
0102
0103 virtual void createDecayMode(vector<NBDiagram> & mode,
0104 bool possibleOnShell,
0105 double symfac);
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115 void setBranchingRatio(tDMPtr dm, Energy pwidth);
0116
0117
0118
0119
0120
0121
0122 void setDecayerInterfaces(string name) const;
0123
0124
0125
0126
0127 bool initialize() const { return init_; }
0128
0129
0130
0131
0132 int iteration() const { return iteration_; }
0133
0134
0135
0136
0137 int points() const { return points_; }
0138
0139
0140
0141
0142 bool info() const { return info_; }
0143
0144
0145
0146
0147 bool createDecayModes() const { return createModes_; }
0148
0149
0150
0151
0152 unsigned int maximumGaugeBosons() const { return maxBoson_;}
0153
0154
0155
0156
0157 unsigned int maximumList() const { return maxList_;}
0158
0159
0160
0161
0162 double minimumReleaseFraction() const {return minReleaseFraction_;}
0163
0164
0165
0166
0167 tDecayConstructorPtr decayConstructor() const {
0168 return decayConstructor_;
0169 }
0170
0171
0172
0173
0174 unsigned int removeOnShell() const { return removeOnShell_; }
0175
0176
0177
0178
0179 bool excluded(VertexBasePtr vertex) const {
0180
0181 if( excludeEffective_ &&
0182 vertex->orderInAllCouplings() != int(vertex->getNpoint())-2)
0183 return true;
0184
0185 return excludedVerticesSet_.find(vertex)!=excludedVerticesSet_.end();
0186 }
0187
0188 public:
0189
0190
0191
0192
0193
0194
0195
0196 void persistentOutput(PersistentOStream & os) const;
0197
0198
0199
0200
0201
0202
0203 void persistentInput(PersistentIStream & is, int version);
0204
0205
0206
0207
0208
0209
0210
0211
0212 static void Init();
0213
0214 protected:
0215
0216
0217
0218
0219
0220
0221
0222
0223 virtual void doinit();
0224
0225
0226 private:
0227
0228
0229
0230
0231
0232 NBodyDecayConstructorBase & operator=(const NBodyDecayConstructorBase &) = delete;
0233
0234 private:
0235
0236
0237
0238
0239 bool init_;
0240
0241
0242
0243
0244 int iteration_;
0245
0246
0247
0248
0249 int points_;
0250
0251
0252
0253
0254 bool info_;
0255
0256
0257
0258
0259 bool createModes_;
0260
0261
0262
0263
0264 unsigned int removeOnShell_;
0265
0266
0267
0268
0269 vector<VertexBasePtr> excludedVerticesVector_;
0270
0271
0272
0273
0274 set<VertexBasePtr> excludedVerticesSet_;
0275
0276
0277
0278
0279 vector<PDPtr> excludedParticlesVector_;
0280
0281
0282
0283
0284 set<PDPtr> excludedParticlesSet_;
0285
0286
0287
0288
0289 bool excludeEffective_;
0290
0291
0292
0293
0294 tDecayConstructorPtr decayConstructor_;
0295
0296
0297
0298
0299
0300 double minReleaseFraction_;
0301
0302
0303
0304
0305 unsigned int maxBoson_;
0306
0307
0308
0309
0310 unsigned int maxList_;
0311
0312
0313
0314
0315 bool includeTopOnShell_;
0316
0317
0318
0319
0320 bool removeFlavourChangingVertices_;
0321
0322
0323
0324
0325 bool removeSmallVertices_;
0326
0327
0328
0329
0330 double minVertexNorm_;
0331 };
0332
0333
0334
0335 class NBodyDecayConstructorError : public Exception {
0336
0337 public:
0338
0339 NBodyDecayConstructorError() : Exception() {}
0340
0341 NBodyDecayConstructorError(const string & str,
0342 Severity sev) : Exception(str,sev)
0343 {}
0344 };
0345
0346 }
0347
0348 #endif