File indexing completed on 2026-08-06 09:24:13
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef Herwig_MadGraphAmplitude_H
0010 #define Herwig_MadGraphAmplitude_H
0011
0012
0013
0014
0015 #include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
0016 #include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
0017 #include "ThePEG/Utilities/DynamicLoader.h"
0018
0019 namespace Herwig {
0020
0021
0022 using namespace ThePEG;
0023
0024
0025
0026
0027
0028
0029
0030 class MadGraphAmplitude:
0031 public MatchboxAmplitude {
0032
0033 public:
0034
0035
0036
0037
0038
0039
0040 MadGraphAmplitude();
0041
0042
0043
0044
0045 virtual ~MadGraphAmplitude();
0046
0047
0048 public:
0049
0050
0051
0052
0053 virtual bool canHandle(const PDVector&,
0054 Ptr<MatchboxFactory>::tptr,
0055 bool) const;
0056
0057
0058
0059
0060
0061 virtual bool hasFinalStateSymmetry() const { return false; }
0062
0063
0064
0065
0066
0067 virtual void orderInGs(unsigned int ogs) { theOrderInGs = ogs; }
0068
0069
0070
0071
0072
0073 virtual unsigned int orderInGs() const { return theOrderInGs; }
0074
0075
0076
0077
0078
0079 virtual void orderInGem(unsigned int oge) { theOrderInGem = oge; }
0080
0081
0082
0083
0084
0085 virtual unsigned int orderInGem() const { return theOrderInGem; }
0086
0087
0088
0089
0090
0091 virtual bool haveOneLoop() const { return true; }
0092
0093
0094
0095
0096
0097 virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
0098
0099
0100
0101
0102
0103 virtual void prepareOneLoopAmplitudes(Ptr<MatchboxMEBase>::tcptr);
0104
0105
0106
0107
0108
0109 virtual Complex evaluate(size_t, const vector<int>&, Complex&);
0110
0111
0112
0113
0114 virtual bool oneLoopAmplitudes() const { return false; }
0115
0116
0117
0118
0119 virtual double oneLoopInterference() const;
0120
0121 void evaloneLoopInterference() const;
0122
0123
0124
0125
0126
0127
0128
0129 virtual bool isCS() const { return false; }
0130 virtual bool isExpanded() const { return true; }
0131 virtual bool isBDK() const { return false; }
0132 virtual bool isDR() const { return false; }
0133 virtual bool isDRbar() const {return false;}
0134
0135
0136
0137
0138
0139
0140 virtual Energy2 mu2() const { return sqr(91.18800000000*GeV);}
0141
0142
0143
0144 virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
0145 const Lorentz5Momentum& n,
0146 int id = -1) const;
0147
0148
0149
0150 virtual double spinColourCorrelatedME2(pair<int,int> emitterSpectator,
0151 const SpinCorrelationTensor& c) const;
0152
0153
0154
0155
0156 vector<size_t> gluonsFirst(vector<size_t> i);
0157
0158
0159
0160
0161 virtual void flushCaches() {
0162 MatchboxAmplitude::flushCaches();
0163 }
0164
0165
0166
0167
0168
0169 virtual bool isExternal() const { return true; }
0170
0171
0172
0173
0174 virtual bool initializeExternal();
0175
0176
0177
0178
0179 virtual int externalId(const cPDVector&);
0180
0181
0182
0183
0184
0185
0186
0187 virtual bool writeAmplitudesDat();
0188
0189
0190
0191
0192
0193 virtual bool checkAmplitudes();
0194
0195
0196 string mgProcLibPath();
0197
0198
0199
0200
0201
0202 virtual bool canFillRhoMatrix() const { return true; }
0203
0204
0205
0206
0207
0208 virtual vector<unsigned int> physicalHelicities(const vector<int>&) const;
0209
0210 public:
0211
0212
0213
0214
0215
0216
0217
0218 void persistentOutput(PersistentOStream & os) const;
0219
0220
0221
0222
0223
0224
0225 void persistentInput(PersistentIStream & is, int version);
0226
0227
0228
0229
0230
0231
0232
0233
0234 static void Init();
0235
0236 protected:
0237
0238
0239
0240
0241
0242
0243
0244 virtual IBPtr clone() const;
0245
0246
0247
0248
0249
0250 virtual IBPtr fullclone() const;
0251
0252
0253
0254
0255
0256
0257 protected:
0258
0259
0260
0261
0262
0263
0264
0265
0266 virtual void doinit();
0267
0268
0269
0270
0271
0272 virtual void doinitrun();
0273
0274
0275
0276
0277
0278 unsigned int theOrderInGs;
0279
0280
0281
0282
0283
0284 unsigned int theOrderInGem;
0285
0286
0287
0288
0289 static string theProcessPath;
0290
0291
0292
0293
0294 static string theMGmodel;
0295
0296 bool keepinputtopmass;
0297
0298
0299
0300
0301
0302 void initProcess(const cPDVector&);
0303
0304
0305
0306
0307
0308 static vector<string> BornAmplitudes,VirtAmplitudes;
0309
0310
0311
0312
0313 mutable vector<int> colourindex, crossing;
0314
0315
0316
0317
0318
0319
0320 static bool ranMadGraphInitializeExternal;
0321 static bool initializedMad;
0322
0323
0324
0325
0326
0327 protected:
0328
0329
0330
0331
0332 static string bindir_;
0333
0334
0335
0336
0337 static string includedir_;
0338
0339
0340
0341
0342 static string pkgdatadir_;
0343
0344
0345
0346
0347 static string madgraphPrefix_;
0348
0349
0350
0351
0352
0353 void setProcessPath(string );
0354 string getProcessPath() const;
0355
0356 void setBinDir(string p);
0357 string getBinDir() const;
0358
0359 void setDataDir(string p);
0360 string getDataDir() const;
0361
0362 void setModel(string p);
0363 string getModel() const;
0364
0365 void setMadgraphPrefix(string p);
0366 string getMadgraphPrefix() const ;
0367
0368 private:
0369
0370
0371
0372
0373
0374 MadGraphAmplitude & operator=(const MadGraphAmplitude &) = delete;
0375
0376
0377 };
0378
0379 }
0380
0381 #endif