herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.2.1
MatrixElement
Matchbox
Base
MatchboxAmplitude.h
1
// -*- C++ -*-
2
//
3
// MatchboxAmplitude.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_MatchboxAmplitude_H
10
#define HERWIG_MatchboxAmplitude_H
11
//
12
// This is the declaration of the MatchboxAmplitude class.
13
//
14
15
#include "ThePEG/MatrixElement/Amplitude.h"
16
#include "ThePEG/Handlers/LastXCombInfo.h"
17
#include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
18
#include "Herwig/MatrixElement/Matchbox/Utility/SpinCorrelationTensor.h"
19
#include "Herwig/MatrixElement/Matchbox/Utility/LastMatchboxXCombInfo.h"
20
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxXComb.h"
21
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
22
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.fh"
23
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
24
#include "ThePEG/Persistency/PersistentOStream.h"
25
#include "ThePEG/Persistency/PersistentIStream.h"
26
27
namespace
Herwig
{
28
29
using namespace
ThePEG
;
30
37
struct
Process
{
38
39
PDVector
legs;
40
unsigned
int
orderInAlphaS;
41
unsigned
int
orderInAlphaEW;
42
43
Process
()
44
: orderInAlphaS(0), orderInAlphaEW(0) {}
45
46
Process
(
const
PDVector
& p,
47
unsigned
int
oas,
48
unsigned
int
oae)
49
: legs(p), orderInAlphaS(oas), orderInAlphaEW(oae) {}
50
51
bool
operator==
(
const
Process
& other)
const
{
52
return
53
legs == other.legs &&
54
orderInAlphaS == other.orderInAlphaS &&
55
orderInAlphaEW == other.orderInAlphaEW;
56
}
57
58
bool
operator<
(
const
Process
& other)
const
{
59
if
( orderInAlphaS != other.orderInAlphaS )
60
return
orderInAlphaS < other.orderInAlphaS;
61
if
( orderInAlphaEW != other.orderInAlphaEW )
62
return
orderInAlphaEW < other.orderInAlphaEW;
63
return
legs < other.legs;
64
}
65
66
void
persistentOutput(
PersistentOStream
& os)
const
{
67
os << legs << orderInAlphaS << orderInAlphaEW;
68
}
69
70
void
persistentInput(
PersistentIStream
& is) {
71
is >> legs >> orderInAlphaS >> orderInAlphaEW;
72
}
73
74
};
75
82
namespace
ProcessType {
83
84
enum
Types {
85
86
treeME2 = 0,
87
colourCorrelatedME2,
88
spinColourCorrelatedME2,
89
oneLoopInterference,
90
loopInducedME2,
91
spinCorrelatedME2
92
93
};
94
95
}
96
97
108
class
MatchboxAmplitude
:
109
public
Amplitude
,
110
public
LastXCombInfo
<StandardXComb>,
111
public
LastMatchboxXCombInfo
{
112
113
public
:
114
120
MatchboxAmplitude
();
121
125
virtual
~
MatchboxAmplitude
();
127
128
public
:
129
136
virtual
Complex
value(
const
tcPDVector
& particles,
137
const
vector<Lorentz5Momentum> & momenta,
138
const
vector<int> & helicities);
139
143
Ptr<MatchboxFactory>::tptr factory()
const
;
144
147
151
virtual
bool
canHandle
(
const
PDVector
& p,
152
Ptr<MatchboxFactory>::tptr,
153
bool
)
const
{
return
canHandle(p); }
154
158
virtual
bool
canHandle
(
const
PDVector
&)
const
{
return
false
; }
159
164
virtual
int
nDimAdditional
()
const
{
return
0; }
165
170
virtual
Ptr<MatchboxMEBase>::ptr makeME(
const
PDVector
&)
const
;
171
176
virtual
void
orderInGs
(
unsigned
int
) {}
177
182
virtual
unsigned
int
orderInGs()
const
= 0;
183
188
virtual
void
orderInGem
(
unsigned
int
) {}
189
194
virtual
unsigned
int
orderInGem()
const
= 0;
195
199
Ptr<StandardModel>::tcptr
standardModel
() {
200
if
( !hwStandardModel() )
201
hwStandardModel(dynamic_ptr_cast<Ptr<StandardModel>::tcptr>(
HandlerBase::standardModel
()));
202
return
hwStandardModel();
203
}
204
209
virtual
bool
hasInitialAverage
()
const
{
return
false
; }
210
215
virtual
bool
hasFinalStateSymmetry
()
const
{
return
false
; }
216
220
virtual
bool
isOLPTree
()
const
{
return
false
; }
221
225
virtual
bool
isOLPLoop
()
const
{
return
false
; }
226
231
virtual
bool
needsOLPCorrelators
()
const
{
return
true
; }
232
236
virtual
void
olpOrderFileHeader(ostream&)
const
;
237
241
virtual
void
olpOrderFileProcesses(ostream&,
242
const
map<pair<Process,int>,
int
>& procs)
const
;
243
248
virtual
void
signOLP
(
const
string
&,
const
string
&) { }
249
253
virtual
void
startOLP
(
const
string
&,
int
& status) { status = -1; }
254
259
virtual
bool
startOLP(
const
map<pair<Process,int>,
int
>& procs);
260
265
virtual
bool
isExternal
()
const
{
return
false
; }
266
270
virtual
bool
initializeExternal
() {
return
false
; }
271
275
virtual
int
externalId
(
const
cPDVector
&) {
return
0; }
276
280
const
map<long,Energy>&
reshuffleMasses
()
const
{
return
theReshuffleMasses; }
281
285
void
checkReshuffling(Ptr<MatchboxPhasespace>::tptr);
286
290
virtual
bool
hasAmplitudeMomenta
()
const
{
return
false
; }
291
293
296
300
virtual
Ptr<ColourBasis>::tptr
colourBasis
()
const
{
return
theColourBasis; }
301
306
virtual
bool
haveColourFlows
()
const
{
307
return
colourBasis() ? colourBasis()->haveColourFlows() :
false
;
308
}
309
314
virtual
Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag)
const
;
315
320
const
string
& colourOrderingString(
size_t
id
)
const
;
321
326
const
set<vector<size_t> >& colourOrdering(
size_t
id
)
const
;
327
329
332
336
virtual
void
setXComb(tStdXCombPtr xc);
337
341
Lorentz5Momentum amplitudeMomentum(
int
)
const
;
342
349
virtual
void
fillCrossingMap(
size_t
shift = 0);
350
354
virtual
set<vector<int> > generateHelicities()
const
;
355
360
virtual
vector<unsigned int> physicalHelicities(
const
vector<int>&)
const
;
361
363
366
371
virtual
void
prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
372
376
virtual
double
me2()
const
;
377
381
double
colourCharge(
tcPDPtr
)
const
;
382
386
double
largeNColourCharge(
tcPDPtr
)
const
;
387
391
virtual
double
largeNME2(Ptr<ColourBasis>::tptr largeNBasis)
const
;
392
396
virtual
double
colourCorrelatedME2(pair<int,int> ij)
const
;
397
401
virtual
double
largeNColourCorrelatedME2(pair<int,int> ij,
402
Ptr<ColourBasis>::tptr largeNBasis)
const
;
403
407
bool
trivialColourLegs
()
const
{
return
theTrivialColourLegs; }
408
413
virtual
bool
canFillRhoMatrix
()
const
{
return
false
; }
414
420
virtual
LorentzVector<Complex>
plusPolarization(
const
Lorentz5Momentum& p,
421
const
Lorentz5Momentum& n,
422
int
id
= -1)
const
;
423
427
virtual
double
spinColourCorrelatedME2(pair<int,int> emitterSpectator,
428
const
SpinCorrelationTensor
& c)
const
;
429
433
virtual
double
spinCorrelatedME2(pair<int,int> emitterSpectator,
434
const
SpinCorrelationTensor
& c)
const
;
435
436
440
virtual
bool
treeAmplitudes
()
const
{
return
true
; }
441
446
virtual
Complex
evaluate
(
size_t
,
const
vector<int>&,
Complex
&) {
return
0.; }
447
449
452
456
virtual
Ptr<MatchboxAmplitude>::tptr
oneLoopAmplitude
()
const
{
457
return
Ptr<MatchboxAmplitude>::tptr();
458
}
459
463
virtual
void
disableOneLoop
() {}
464
469
virtual
bool
haveOneLoop
()
const
{
return
false
; }
470
475
virtual
bool
onlyOneLoop
()
const
{
return
false
; }
476
480
virtual
bool
oneLoopAmplitudes
()
const
{
return
true
; }
481
488
virtual
bool
isDR
()
const
{
return
false
; }
489
494
virtual
bool
isDRbar
()
const
{
return
true
; }
495
500
virtual
bool
isCS
()
const
{
return
false
; }
501
506
virtual
bool
isBDK
()
const
{
return
false
; }
507
512
virtual
bool
isExpanded
()
const
{
return
false
; }
513
519
virtual
Energy2
mu2
()
const
{
return
0.*GeV2; }
520
524
virtual
bool
hasRunningAlphaS
()
const
{
return
false
; }
525
529
virtual
bool
hasRunningAlphaEW
()
const
{
return
false
; }
530
534
virtual
double
oneLoopDoublePole
()
const
{
return
0.; }
535
539
virtual
double
oneLoopSinglePole
()
const
{
return
0.; }
540
545
virtual
void
prepareOneLoopAmplitudes(Ptr<MatchboxMEBase>::tcptr);
546
550
virtual
double
oneLoopInterference()
const
;
551
556
virtual
Complex
evaluateOneLoop
(
size_t
,
const
vector<int>&) {
return
0.; }
557
559
562
566
virtual
void
flushCaches
() {}
567
571
Ptr<MatchboxAmplitude>::ptr
cloneMe
()
const
{
572
return
dynamic_ptr_cast<Ptr<MatchboxAmplitude>::ptr>(clone());
573
}
574
578
virtual
void
cloneDependencies(
const
std::string& prefix=
""
,
bool
slim=
false
);
579
581
582
public
:
583
590
void
persistentOutput(
PersistentOStream
& os)
const
;
591
597
void
persistentInput(
PersistentIStream
& is,
int
version);
599
606
static
void
Init();
607
608
// If needed, insert declarations of virtual function defined in the
609
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
610
611
protected
:
612
615
621
virtual
void
doinit();
622
627
virtual
void
doinitrun();
629
630
private
:
631
635
void
doGenerateHelicities(
set
<vector<int> >& res,
636
vector<int>& current,
637
size_t
pos)
const
;
638
642
Ptr<ColourBasis>::ptr
theColourBasis
;
643
648
int
theCleanupAfter
;
649
654
int
treeLevelHelicityPoints
;
655
660
int
oneLoopHelicityPoints
;
661
665
map<long,Energy>
theReshuffleMasses
;
666
670
bool
theTrivialColourLegs
;
671
675
string
doReshuffle(
string
);
676
680
string
doMassless(
string
);
681
685
string
doOnShell(
string
);
686
690
string
doClearReshuffling(
string
);
691
696
MatchboxAmplitude
& operator=(
const
MatchboxAmplitude
&) =
delete
;
697
698
};
699
700
inline
PersistentOStream
&
operator<<
(
PersistentOStream
& os,
701
const
Process
& h) {
702
h.persistentOutput(os);
703
return
os;
704
}
705
706
inline
PersistentIStream
&
operator>>
(
PersistentIStream
& is,
707
Process
& h) {
708
h.persistentInput(is);
709
return
is;
710
}
711
712
}
713
714
#endif
/* HERWIG_MatchboxAmplitude_H */
ThePEG::PersistentIStream
ThePEG::LorentzVector< Complex >
Herwig::MatchboxAmplitude::theColourBasis
Ptr< ColourBasis >::ptr theColourBasis
The colour basis implementation to be used.
Definition:
MatchboxAmplitude.h:642
Herwig::MatchboxAmplitude::oneLoopSinglePole
virtual double oneLoopSinglePole() const
If defined, return the coefficient of the pole in epsilon.
Definition:
MatchboxAmplitude.h:539
ThePEG::Complex
std::complex< double > Complex
Herwig::MatchboxAmplitude::reshuffleMasses
const map< long, Energy > & reshuffleMasses() const
Return the map with masses to be used for amplitude evaluation.
Definition:
MatchboxAmplitude.h:280
Herwig::MatchboxAmplitude::signOLP
virtual void signOLP(const string &, const string &)
Start the one loop provider, if appropriate, giving order and contract files.
Definition:
MatchboxAmplitude.h:248
Herwig::MatchboxAmplitude::canHandle
virtual bool canHandle(const PDVector &) const
Return true, if this amplitude can handle the given process.
Definition:
MatchboxAmplitude.h:158
Herwig::MatchboxAmplitude::isOLPTree
virtual bool isOLPTree() const
Return true, if this amplitude is handled by a BLHA one-loop provider.
Definition:
MatchboxAmplitude.h:220
ThePEG::PersistentOStream
ThePEG::LastXCombInfo
ThePEG::tcPDVector
vector< tcPDPtr > tcPDVector
Herwig::MatchboxAmplitude::hasFinalStateSymmetry
virtual bool hasFinalStateSymmetry() const
Return true, if this amplitude already includes symmetry factors for identical outgoing particles...
Definition:
MatchboxAmplitude.h:215
Herwig::MatchboxAmplitude::onlyOneLoop
virtual bool onlyOneLoop() const
Return true, if this amplitude only provides one-loop (QCD) corrections.
Definition:
MatchboxAmplitude.h:475
Herwig::MatchboxAmplitude::oneLoopDoublePole
virtual double oneLoopDoublePole() const
If defined, return the coefficient of the pole in epsilon^2.
Definition:
MatchboxAmplitude.h:534
Herwig::MatchboxAmplitude::mu2
virtual Energy2 mu2() const
Return the value of the dimensional regularization parameter.
Definition:
MatchboxAmplitude.h:519
Herwig::MatchboxAmplitude::colourBasis
virtual Ptr< ColourBasis >::tptr colourBasis() const
Return the colour basis.
Definition:
MatchboxAmplitude.h:300
Herwig::operator==
bool operator==(const HPDiagram &x, const HPDiagram &y)
Test whether two diagrams are identical.
Definition:
HPDiagram.h:98
Herwig::MatchboxAmplitude::evaluate
virtual Complex evaluate(size_t, const vector< int > &, Complex &)
Evaluate the amplitude for the given colour tensor id and helicity assignment.
Definition:
MatchboxAmplitude.h:446
ThePEG
ThePEG::Amplitude
Herwig::MatchboxAmplitude::isDR
virtual bool isDR() const
Return true, if one loop corrections have been calculated in dimensional reduction.
Definition:
MatchboxAmplitude.h:488
Herwig::MatchboxAmplitude::externalId
virtual int externalId(const cPDVector &)
Return a generic process id for the given process.
Definition:
MatchboxAmplitude.h:275
Herwig::MatchboxAmplitude
MatchboxAmplitude is the base class for amplitude implementations inside Matchbox.
Definition:
MatchboxAmplitude.h:108
Herwig::MatchboxAmplitude::needsOLPCorrelators
virtual bool needsOLPCorrelators() const
Return true, if colour and spin correlated matrix elements should be ordered from the OLP...
Definition:
MatchboxAmplitude.h:231
Herwig::operator<
bool operator<(const HPDiagram &x, const HPDiagram &y)
Test whether one diagram is 'less' than another.
Definition:
HPDiagram.h:163
Herwig::MatchboxAmplitude::theTrivialColourLegs
bool theTrivialColourLegs
True if trivial colour configuration.
Definition:
MatchboxAmplitude.h:670
Herwig::MatchboxAmplitude::isExpanded
virtual bool isExpanded() const
Return true, if one loop corrections are given in the conventions of everything expanded.
Definition:
MatchboxAmplitude.h:512
Herwig::MatchboxAmplitude::orderInGs
virtual void orderInGs(unsigned int)
Set the (tree-level) order in in which this matrix element should be evaluated.
Definition:
MatchboxAmplitude.h:176
Herwig::MatchboxAmplitude::startOLP
virtual void startOLP(const string &, int &status)
Start the one loop provider, if appropriate.
Definition:
MatchboxAmplitude.h:253
Herwig::operator<<
ostream & operator<<(ostream &, const DecayIntegrator &)
Output information on the DecayIntegrator for debugging purposes.
Herwig::MatchboxAmplitude::hasInitialAverage
virtual bool hasInitialAverage() const
Return true, if this amplitude already includes averaging over incoming parton's quantum numbers...
Definition:
MatchboxAmplitude.h:209
Herwig::MatchboxAmplitude::canFillRhoMatrix
virtual bool canFillRhoMatrix() const
Return true, if this amplitude is capable of consistently filling the rho matrices for the spin corre...
Definition:
MatchboxAmplitude.h:413
Herwig::MatchboxAmplitude::treeLevelHelicityPoints
int treeLevelHelicityPoints
The number of points that are calculated before a certain helicity is excluded.
Definition:
MatchboxAmplitude.h:654
Herwig::MatchboxAmplitude::nDimAdditional
virtual int nDimAdditional() const
Return the number of random numbers required to evaluate this amplitude at a fixed phase space point...
Definition:
MatchboxAmplitude.h:164
Herwig::MatchboxAmplitude::theReshuffleMasses
map< long, Energy > theReshuffleMasses
The map with masses to be used for amplitude evaluation.
Definition:
MatchboxAmplitude.h:665
Herwig::MatchboxAmplitude::isOLPLoop
virtual bool isOLPLoop() const
Return true, if this amplitude is handled by a BLHA one-loop provider.
Definition:
MatchboxAmplitude.h:225
Herwig::MatchboxAmplitude::hasRunningAlphaS
virtual bool hasRunningAlphaS() const
Indicate that this amplitude is running alphas by itself.
Definition:
MatchboxAmplitude.h:524
Herwig::Process
Process information with coupling order.
Definition:
MatchboxAmplitude.h:37
Herwig::MatchboxAmplitude::trivialColourLegs
bool trivialColourLegs() const
Return true if trivial colour configuration.
Definition:
MatchboxAmplitude.h:407
Herwig::MatchboxAmplitude::haveColourFlows
virtual bool haveColourFlows() const
Return true, if the colour basis is capable of assigning colour flows.
Definition:
MatchboxAmplitude.h:306
Herwig::LastMatchboxXCombInfo
Provide easy access to MatchboxXComb XComb extensions.
Definition:
LastMatchboxXCombInfo.h:27
Herwig::MatchboxAmplitude::oneLoopHelicityPoints
int oneLoopHelicityPoints
The number of points that are calculated before a certain helicity is excluded.
Definition:
MatchboxAmplitude.h:660
Herwig::operator>>
PersistentIStream & operator>>(PersistentIStream &is, map< ShowerInteraction, T, Cmp, A > &m)
Read a map with ShowerInteraction as the key.
Definition:
GeneralTwoBodyDecayer.h:288
Herwig::MatchboxAmplitude::theCleanupAfter
int theCleanupAfter
The number of points after which helicity combinations wil be cleaned up.
Definition:
MatchboxAmplitude.h:648
ThePEG::tcPDPtr
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
Herwig::MatchboxAmplitude::canHandle
virtual bool canHandle(const PDVector &p, Ptr< MatchboxFactory >::tptr, bool) const
Return true, if this amplitude can handle the given process.
Definition:
MatchboxAmplitude.h:151
Herwig::MatchboxAmplitude::isCS
virtual bool isCS() const
Return true, if one loop corrections are given in the conventions of the integrated dipoles...
Definition:
MatchboxAmplitude.h:500
Herwig::MatchboxAmplitude::haveOneLoop
virtual bool haveOneLoop() const
Return true, if this amplitude is capable of calculating one-loop (QCD) corrections.
Definition:
MatchboxAmplitude.h:469
Herwig::MatchboxAmplitude::flushCaches
virtual void flushCaches()
Flush all cashes.
Definition:
MatchboxAmplitude.h:566
Herwig::MatchboxAmplitude::isBDK
virtual bool isBDK() const
Return true, if one loop corrections are given in the conventions of BDK.
Definition:
MatchboxAmplitude.h:506
ThePEG::cPDVector
vector< cPDPtr > cPDVector
Herwig::MatchboxAmplitude::initializeExternal
virtual bool initializeExternal()
Initialize this amplitude.
Definition:
MatchboxAmplitude.h:270
Herwig::MatchboxAmplitude::treeAmplitudes
virtual bool treeAmplitudes() const
Return true, if tree-level contributions will be evaluated at amplitude level.
Definition:
MatchboxAmplitude.h:440
Herwig::MatchboxAmplitude::hasRunningAlphaEW
virtual bool hasRunningAlphaEW() const
Indicate that this amplitude is running alphaew by itself.
Definition:
MatchboxAmplitude.h:529
ThePEG::Selector
Herwig::MatchboxAmplitude::cloneMe
Ptr< MatchboxAmplitude >::ptr cloneMe() const
Clone this amplitude.
Definition:
MatchboxAmplitude.h:571
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::MatchboxAmplitude::orderInGem
virtual void orderInGem(unsigned int)
Set the (tree-level) order in in which this matrix element should be evaluated.
Definition:
MatchboxAmplitude.h:188
Herwig::MatchboxAmplitude::oneLoopAmplitude
virtual Ptr< MatchboxAmplitude >::tptr oneLoopAmplitude() const
Return the one-loop amplitude, if applicable.
Definition:
MatchboxAmplitude.h:456
Herwig::MatchboxAmplitude::isDRbar
virtual bool isDRbar() const
Return true, if the amplitude is DRbar renormalized, otherwise MSbar is assumed.
Definition:
MatchboxAmplitude.h:494
ThePEG::PDVector
vector< PDPtr > PDVector
Herwig::MatchboxAmplitude::evaluateOneLoop
virtual Complex evaluateOneLoop(size_t, const vector< int > &)
Evaluate the amplitude for the given colour tensor id and helicity assignment.
Definition:
MatchboxAmplitude.h:556
Herwig::MatchboxAmplitude::hasAmplitudeMomenta
virtual bool hasAmplitudeMomenta() const
Return true, if this amplitude makes use of amplitudeMomenta.
Definition:
MatchboxAmplitude.h:290
Herwig::MatchboxAmplitude::isExternal
virtual bool isExternal() const
Return true, if this amplitude needs to initialize an external code.
Definition:
MatchboxAmplitude.h:265
Herwig::MatchboxAmplitude::oneLoopAmplitudes
virtual bool oneLoopAmplitudes() const
Return true, if one-loop contributions will be evaluated at amplitude level.
Definition:
MatchboxAmplitude.h:480
HandlerBaseT< UseRandom >::standardModel
tSMPtr standardModel() const
Herwig::MatchboxAmplitude::standardModel
Ptr< StandardModel >::tcptr standardModel()
Return the Herwig StandardModel object.
Definition:
MatchboxAmplitude.h:199
Herwig::SpinCorrelationTensor
SpinCorrelationTensor represents a spin correlation tensor of the form.
Definition:
SpinCorrelationTensor.h:28
Herwig::MatchboxAmplitude::disableOneLoop
virtual void disableOneLoop()
Diasble one-loop functionality if not needed.
Definition:
MatchboxAmplitude.h:463
Generated on Sat Apr 11 2020 14:50:30 for Herwig by
1.8.13