herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
MatrixElement
Matchbox
External
MadGraph
MadGraphAmplitude.h
1
// -*- C++ -*-
2
//
3
// MadGraphAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4
// Copyright (C) 2002-2019 The Herwig Collaboration
5
//
6
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef Herwig_MadGraphAmplitude_H
10
#define Herwig_MadGraphAmplitude_H
11
//
12
// This is the declaration of the MadGraphAmplitude class.
13
//
14
15
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
16
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
17
#include "ThePEG/Utilities/DynamicLoader.h"
18
19
namespace
Herwig
{
20
21
22
using namespace
ThePEG
;
23
30
class
MadGraphAmplitude
:
31
public
MatchboxAmplitude
{
32
33
public
:
34
40
MadGraphAmplitude
();
41
45
virtual
~MadGraphAmplitude
();
47
48
public
:
49
53
virtual
bool
canHandle
(
const
PDVector
&,
54
Ptr<MatchboxFactory>::tptr,
55
bool
)
const
;
56
61
virtual
bool
hasFinalStateSymmetry
()
const
{
return
false
; }
62
67
virtual
void
orderInGs
(
unsigned
int
ogs) {
theOrderInGs
= ogs; }
68
73
virtual
unsigned
int
orderInGs
()
const
{
return
theOrderInGs
; }
74
79
virtual
void
orderInGem
(
unsigned
int
oge) {
theOrderInGem
= oge; }
80
85
virtual
unsigned
int
orderInGem
()
const
{
return
theOrderInGem
; }
86
91
virtual
bool
haveOneLoop
()
const
{
return
true
; }
92
97
virtual
void
prepareAmplitudes
(Ptr<MatchboxMEBase>::tcptr);
98
103
virtual
void
prepareOneLoopAmplitudes
(Ptr<MatchboxMEBase>::tcptr);
104
109
virtual
Complex
evaluate
(
size_t
,
const
vector<int>&,
Complex
&);
110
114
virtual
bool
oneLoopAmplitudes
()
const
{
return
false
; }
115
119
virtual
double
oneLoopInterference
()
const
;
120
121
void
evaloneLoopInterference()
const
;
122
123
129
virtual
bool
isCS
()
const
{
return
false
; }
130
virtual
bool
isExpanded
()
const
{
return
true
; }
131
virtual
bool
isBDK
()
const
{
return
false
; }
132
virtual
bool
isDR
()
const
{
return
false
; }
133
virtual
bool
isDRbar
()
const
{
return
false
;}
134
140
virtual
Energy2
mu2
()
const
{
return
sqr
(91.18800000000*GeV);}
141
//virtual Energy2 mu2() const { return lastSHat(); }
142
143
144
virtual
LorentzVector<Complex>
plusPolarization
(
const
Lorentz5Momentum& p,
145
const
Lorentz5Momentum& n,
146
int
id
= -1)
const
;
150
virtual
double
spinColourCorrelatedME2
(pair<int,int> emitterSpectator,
151
const
SpinCorrelationTensor
& c)
const
;
152
156
vector<size_t>
gluonsFirst
(vector<size_t> i);
157
161
virtual
void
flushCaches
() {
162
MatchboxAmplitude::flushCaches
();
163
}
164
169
virtual
bool
isExternal
()
const
{
return
true
; }
170
174
virtual
bool
initializeExternal
();
175
179
virtual
int
externalId
(
const
cPDVector
&);
180
181
187
virtual
bool
writeAmplitudesDat
();
188
193
virtual
bool
checkAmplitudes
();
194
195
196
string
mgProcLibPath();
197
202
virtual
bool
canFillRhoMatrix
()
const
{
return
true
; }
203
208
virtual
vector<unsigned int>
physicalHelicities
(
const
vector<int>&)
const
;
209
210
public
:
211
218
void
persistentOutput
(
PersistentOStream
& os)
const
;
219
225
void
persistentInput
(
PersistentIStream
& is,
int
version);
227
234
static
void
Init
();
235
236
protected
:
237
244
virtual
IBPtr
clone
()
const
;
245
250
virtual
IBPtr
fullclone
()
const
;
252
253
254
// If needed, insert declarations of virtual function defined in the
255
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
256
257
protected
:
258
266
virtual
void
doinit
();
267
272
virtual
void
doinitrun
();
273
278
unsigned
int
theOrderInGs
;
279
284
unsigned
int
theOrderInGem
;
285
289
static
string
theProcessPath
;
290
294
static
string
theMGmodel
;
295
296
bool
keepinputtopmass;
297
298
302
void
initProcess
(
const
cPDVector
&);
303
304
308
static
vector<string>
BornAmplitudes
,VirtAmplitudes;
309
313
mutable
vector<int>
colourindex
, crossing;
314
315
320
static
bool
ranMadGraphInitializeExternal
;
321
static
bool
initializedMad;
322
323
324
326
327
protected
:
328
332
static
string
bindir_
;
333
337
static
string
includedir_
;
338
342
static
string
pkgdatadir_
;
343
347
static
string
madgraphPrefix_
;
348
353
void
setProcessPath
(
string
);
354
string
getProcessPath()
const
;
355
356
void
setBinDir(
string
p);
357
string
getBinDir()
const
;
358
359
void
setDataDir(
string
p);
360
string
getDataDir()
const
;
361
362
void
setModel(
string
p);
363
string
getModel()
const
;
364
365
void
setMadgraphPrefix(
string
p);
366
string
getMadgraphPrefix()
const
;
367
368
private
:
369
374
MadGraphAmplitude
&
operator=
(
const
MadGraphAmplitude
&) =
delete
;
375
376
377
};
378
379
}
380
381
#endif
/* Herwig_MadGraphAmplitude_H */
Herwig::MadGraphAmplitude
MadGraphAmplitude implements an interface to MadGraph.
Definition:
MadGraphAmplitude.h:31
Herwig::MadGraphAmplitude::physicalHelicities
virtual vector< unsigned int > physicalHelicities(const vector< int > &) const
Return the helicity combination of the physical process in the conventions used by the spin correlati...
Herwig::MadGraphAmplitude::haveOneLoop
virtual bool haveOneLoop() const
Return true, if this amplitude is capable of calculating one-loop (QCD) corrections.
Definition:
MadGraphAmplitude.h:91
Herwig::MadGraphAmplitude::externalId
virtual int externalId(const cPDVector &)
Return a generic process id for the given process.
Herwig::MadGraphAmplitude::includedir_
static string includedir_
Location of the installed include files.
Definition:
MadGraphAmplitude.h:337
Herwig::MadGraphAmplitude::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Herwig::MadGraphAmplitude::bindir_
static string bindir_
Location of the installed executables.
Definition:
MadGraphAmplitude.h:332
Herwig::MadGraphAmplitude::isDR
virtual bool isDR() const
Return true, if one loop corrections have been calculated in dimensional reduction.
Definition:
MadGraphAmplitude.h:132
Herwig::MadGraphAmplitude::initializeExternal
virtual bool initializeExternal()
Initialize this amplitude.
Herwig::MadGraphAmplitude::hasFinalStateSymmetry
virtual bool hasFinalStateSymmetry() const
Return true, if this amplitude already includes symmetry factors for identical outgoing particles.
Definition:
MadGraphAmplitude.h:61
Herwig::MadGraphAmplitude::orderInGem
virtual unsigned int orderInGem() const
Return the (tree-level) order in in which this matrix element is given.
Definition:
MadGraphAmplitude.h:85
Herwig::MadGraphAmplitude::isDRbar
virtual bool isDRbar() const
Return true, if the amplitude is DRbar renormalized, otherwise MSbar is assumed.
Definition:
MadGraphAmplitude.h:133
Herwig::MadGraphAmplitude::evaluate
virtual Complex evaluate(size_t, const vector< int > &, Complex &)
Evaluate the amplitude for the given colour tensor id and helicity assignment.
Herwig::MadGraphAmplitude::madgraphPrefix_
static string madgraphPrefix_
Location of MADGRAPH.
Definition:
MadGraphAmplitude.h:347
Herwig::MadGraphAmplitude::plusPolarization
virtual LorentzVector< Complex > plusPolarization(const Lorentz5Momentum &p, const Lorentz5Momentum &n, int id=-1) const
Return a positive helicity polarization vector for a gluon of momentum p (with reference vector n) to...
Herwig::MadGraphAmplitude::BornAmplitudes
static vector< string > BornAmplitudes
Storage for Amplitudes.
Definition:
MadGraphAmplitude.h:308
Herwig::MadGraphAmplitude::doinitrun
virtual void doinitrun()
Initialize this object.
Herwig::MadGraphAmplitude::pkgdatadir_
static string pkgdatadir_
Location of the data files.
Definition:
MadGraphAmplitude.h:342
Herwig::MadGraphAmplitude::theProcessPath
static string theProcessPath
The path for the process libraries.
Definition:
MadGraphAmplitude.h:289
Herwig::MadGraphAmplitude::mu2
virtual Energy2 mu2() const
Return the value of the dimensional regularization parameter.
Definition:
MadGraphAmplitude.h:140
Herwig::MadGraphAmplitude::~MadGraphAmplitude
virtual ~MadGraphAmplitude()
The destructor.
Herwig::MadGraphAmplitude::doinit
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
Herwig::MadGraphAmplitude::isBDK
virtual bool isBDK() const
Return true, if one loop corrections are given in the conventions of BDK.
Definition:
MadGraphAmplitude.h:131
Herwig::MadGraphAmplitude::theOrderInGs
unsigned int theOrderInGs
The (tree-level) order in in which this matrix element is given.
Definition:
MadGraphAmplitude.h:278
Herwig::MadGraphAmplitude::setProcessPath
void setProcessPath(string)
Helper functions to make long strings static.
Herwig::MadGraphAmplitude::prepareAmplitudes
virtual void prepareAmplitudes(Ptr< MatchboxMEBase >::tcptr)
Calculate the tree level amplitudes for the phasespace point stored in lastXComb.
Herwig::MadGraphAmplitude::checkAmplitudes
virtual bool checkAmplitudes()
CHeck if all amplitudes are in the Libary.
Herwig::MadGraphAmplitude::isCS
virtual bool isCS() const
Return true, if one loop corrections are given in the conventions of BDK.
Definition:
MadGraphAmplitude.h:129
Herwig::MadGraphAmplitude::operator=
MadGraphAmplitude & operator=(const MadGraphAmplitude &)=delete
The assignment operator is private and must never be called.
Herwig::MadGraphAmplitude::theMGmodel
static string theMGmodel
The path to generate amplitudes in.
Definition:
MadGraphAmplitude.h:294
Herwig::MadGraphAmplitude::spinColourCorrelatedME2
virtual double spinColourCorrelatedME2(pair< int, int > emitterSpectator, const SpinCorrelationTensor &c) const
Return the colour and spin correlated matrix element.
Herwig::MadGraphAmplitude::flushCaches
virtual void flushCaches()
Flush all cashes.
Definition:
MadGraphAmplitude.h:161
Herwig::MadGraphAmplitude::canHandle
virtual bool canHandle(const PDVector &, Ptr< MatchboxFactory >::tptr, bool) const
Return true, if this amplitude can handle the given process.
Herwig::MadGraphAmplitude::prepareOneLoopAmplitudes
virtual void prepareOneLoopAmplitudes(Ptr< MatchboxMEBase >::tcptr)
Calculate the one-loop amplitudes for the phasespace point stored in lastXComb, if provided.
Herwig::MadGraphAmplitude::initProcess
void initProcess(const cPDVector &)
Initialize the given process.
Herwig::MadGraphAmplitude::MadGraphAmplitude
MadGraphAmplitude()
The default constructor.
Herwig::MadGraphAmplitude::orderInGs
virtual void orderInGs(unsigned int ogs)
Set the (tree-level) order in in which this matrix element should be evaluated.
Definition:
MadGraphAmplitude.h:67
Herwig::MadGraphAmplitude::Init
static void Init()
The standard Init function used to initialize the interfaces.
Herwig::MadGraphAmplitude::gluonsFirst
vector< size_t > gluonsFirst(vector< size_t > i)
Order process in MadGraph conventions.
Herwig::MadGraphAmplitude::writeAmplitudesDat
virtual bool writeAmplitudesDat()
Write out BornAmplitudes.dat and VirtualAmplitudes.dat, return true if new files are written.
Herwig::MadGraphAmplitude::orderInGs
virtual unsigned int orderInGs() const
Return the (tree-level) order in in which this matrix element is given.
Definition:
MadGraphAmplitude.h:73
Herwig::MadGraphAmplitude::orderInGem
virtual void orderInGem(unsigned int oge)
Set the (tree-level) order in in which this matrix element should be evaluated.
Definition:
MadGraphAmplitude.h:79
Herwig::MadGraphAmplitude::oneLoopAmplitudes
virtual bool oneLoopAmplitudes() const
Return true, if one-loop contributions will be evaluated at amplitude level.
Definition:
MadGraphAmplitude.h:114
Herwig::MadGraphAmplitude::theOrderInGem
unsigned int theOrderInGem
The (tree-level) order in in which this matrix element is given.
Definition:
MadGraphAmplitude.h:284
Herwig::MadGraphAmplitude::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::MadGraphAmplitude::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::MadGraphAmplitude::oneLoopInterference
virtual double oneLoopInterference() const
Return the one-loop/tree interference.
Herwig::MadGraphAmplitude::colourindex
vector< int > colourindex
Helper for color and crossing handling.
Definition:
MadGraphAmplitude.h:313
Herwig::MadGraphAmplitude::isExpanded
virtual bool isExpanded() const
Return true, if one loop corrections are given in the conventions of everything expanded.
Definition:
MadGraphAmplitude.h:130
Herwig::MadGraphAmplitude::ranMadGraphInitializeExternal
static bool ranMadGraphInitializeExternal
Static Variables to handle initialization.
Definition:
MadGraphAmplitude.h:320
Herwig::MadGraphAmplitude::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Herwig::MadGraphAmplitude::isExternal
virtual bool isExternal() const
Return true, if this amplitude needs to initialize an external code.
Definition:
MadGraphAmplitude.h:169
Herwig::MadGraphAmplitude::canFillRhoMatrix
virtual bool canFillRhoMatrix() const
Return true, if this amplitude is capable of consistently filling the rho matrices for the spin corre...
Definition:
MadGraphAmplitude.h:202
Herwig::MatchboxAmplitude
MatchboxAmplitude is the base class for amplitude implementations inside Matchbox.
Definition:
MatchboxAmplitude.h:111
Herwig::MatchboxAmplitude::flushCaches
virtual void flushCaches()
Flush all cashes.
Definition:
MatchboxAmplitude.h:558
Herwig::SpinCorrelationTensor
SpinCorrelationTensor represents a spin correlation tensor of the form.
Definition:
SpinCorrelationTensor.h:28
ThePEG::LorentzVector
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::PDVector
vector< PDPtr > PDVector
ThePEG::Complex
std::complex< double > Complex
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
ThePEG::cPDVector
vector< cPDPtr > cPDVector
Generated on Thu Jun 20 2024 17:50:52 for Herwig by
1.9.6