thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.2.1
Helicity
Vertex
VertexBase.h
1
// -*- C++ -*-
2
//
3
// VertexBase.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 2003-2019 Peter Richardson, Leif Lonnblad
5
//
6
// ThePEG 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 ThePEG_VertexBase_H
10
#define ThePEG_VertexBase_H
11
//
12
// This is the declaration of the VertexBase class.
13
14
#include <ThePEG/Interface/Interfaced.h>
15
#include <ThePEG/PDT/ParticleData.h>
16
#include <
ThePEG/Helicity/HelicityDefinitions.h
>
17
#include <ThePEG/Repository/EventGenerator.h>
18
#include "ThePEG/StandardModel/StandardModelBase.h"
19
#include "VertexBase.fh"
20
#include <array>
21
22
23
namespace
ThePEG
{
24
namespace
Helicity {
25
30
namespace
VertexType {
31
typedef
unsigned
T;
35
const
T
UNDEFINED
= 0;
36
}
37
41
namespace
ColourStructure {
42
typedef
unsigned
T;
43
const
T
UNDEFINED
= 0;
44
const
T SINGLET = 1;
45
const
T SU3TFUND = 2;
46
const
T SU3F = 3;
47
const
T SU3T6 = 4;
48
const
T SU3K6 = 5;
49
const
T EPS = 6;
50
const
T DELTA = 7;
51
const
T SU3FF = 8;
52
const
T SU3TTFUNDS = 9;
53
const
T SU3TTFUNDD = 10;
54
const
T SU3TT6 = 11;
55
const
T SU3I12I34 = 12;
56
const
T SU3I14I23 = 13;
57
const
T SU3T21T43 = 14;
58
const
T SU3T23T41 = 15;
59
}
60
64
namespace
CouplingType {
65
typedef
unsigned
T;
66
const
T
UNDEFINED
= 0;
67
const
T QED = 1;
68
const
T QCD = 2;
69
}
83
class
VertexBase
:
public
Interfaced
{
87
friend
ostream &
operator<<
(ostream &,
const
VertexBase
&);
88
89
public
:
90
98
VertexBase
(VertexType::T name,
bool
kine=
false
);
100
101
public
:
102
109
void
persistentOutput(
PersistentOStream
& os)
const
;
110
116
void
persistentInput(
PersistentIStream
& is,
int
version);
118
122
static
void
Init();
123
124
public
:
125
133
unsigned
int
size
()
const
{
return
_particles.size(); }
134
135
public
:
140
bool
isIncoming
(
tPDPtr
p)
const
{
141
return
_inpart.find(p) != _inpart.end();
142
}
143
148
bool
isOutgoing
(
tPDPtr
p)
const
{
149
return
_outpart.find(p) != _outpart.end();
150
}
151
155
const
set<tPDPtr> &
incoming
()
const
{
return
_inpart; }
156
160
const
set<tPDPtr> &
outgoing
()
const
{
return
_outpart; }
161
165
Complex
norm
()
const
{
return
_norm; }
166
172
vector<long> search(
unsigned
int
ilist,
long
id
)
const
;
173
179
vector<tPDPtr> search(
unsigned
int
ilist,
tcPDPtr
id
)
const
;
180
188
bool
allowed(
long
id1,
long
id2,
long
id3,
long
id4 = 0)
const
;
189
193
VertexType::T
getName
()
const
{
return
_theName; }
194
198
unsigned
int
getNpoint
()
const
{
return
_npoint; }
199
203
int
orderInGem
()
const
{
return
couplingOrders_.at(CouplingType::QED); }
204
208
int
orderInGs
()
const
{
return
couplingOrders_.at(CouplingType::QCD); }
209
213
int
orderInCoupling
(CouplingType::T cType)
const
{
214
if
(couplingOrders_.find(cType) !=couplingOrders_.end())
215
return
couplingOrders_.at(cType);
216
else
217
return
0;
218
}
219
223
int
orderInAllCouplings
()
const
{
224
int
output(0);
225
for
(
auto
& p : couplingOrders_)
226
output += p.second;
227
return
output;
228
}
229
233
ColourStructure::T
colourStructure
()
const
{
return
colourStructure_;}
235
236
public
:
237
245
double
strongCoupling
(
Energy2
q2)
const
{
246
if
(_coupopt==0) {
247
double
val = 4.0*
Constants::pi
*generator()->standardModel()->alphaS(q2);
248
assert(val>=0.);
249
return
sqrt(val);
250
}
251
else
if
(_coupopt==1)
252
return
sqrt(4.0*
Constants::pi
*generator()->standardModel()->alphaS());
253
else
254
return
_gs;
255
}
256
260
double
electroMagneticCoupling
(
Energy2
q2)
const
{
261
if
(_coupopt==0)
262
return
sqrt(4.0*
Constants::pi
*generator()->standardModel()->alphaEMME(q2));
263
else
if
(_coupopt==1)
264
return
sqrt(4.0*
Constants::pi
*generator()->standardModel()->alphaEMMZ());
265
else
266
return
_ee;
267
}
268
272
double
weakCoupling
(
Energy2
q2)
const
{
273
if
( _coupopt == 0 )
274
return
sqrt(4.0*
Constants::pi
*generator()->standardModel()->alphaEMME(q2)/
275
generator()->standardModel()->sin2ThetaW());
276
else
if
( _coupopt == 1 )
277
return
sqrt(4.0*
Constants::pi
*generator()->standardModel()->alphaEMMZ()/
278
generator()->standardModel()->sin2ThetaW());
279
else
280
return
_ee/_sw;
281
}
282
283
double
sin2ThetaW()
const
{
284
if
( _coupopt == 0 || _coupopt == 1)
285
return
generator()->standardModel()->sin2ThetaW();
286
else
287
return
sqr
(_sw);
288
}
290
291
public
:
292
306
virtual
void
setCoupling(
Energy2
q2,
tcPDPtr
part1,
307
tcPDPtr
part2,
tcPDPtr
part3)=0;
308
319
virtual
void
setCoupling(
Energy2
q2,
tcPDPtr
part1,
tcPDPtr
part2,
tcPDPtr
part3,
320
tcPDPtr
part4)=0;
322
323
protected
:
324
332
virtual
void
doinit();
333
343
virtual
void
rebind(
const
TranslationMap
& trans);
344
350
virtual
IVector
getReferences();
352
353
protected
:
362
void
addToList(
const
vector<long> & ids);
363
372
void
addToList(
long
ida,
long
idb,
long
idc,
long
idd = 0);
374
375
protected
:
384
void
norm
(
const
Complex
& coup) { _norm = coup; }
385
394
virtual
Complex
propagator(
int
iopt,
Energy2
q2,
tcPDPtr
part,
395
complex<Energy> mass=-GeV,
396
complex<Energy> width=-GeV);
397
406
Complex
normPropagator
(
int
iopt,
Energy2
q2,
tcPDPtr
part,
407
complex<Energy> mass=-GeV,
408
complex<Energy> width=-GeV) {
409
return
_norm*propagator(iopt,q2,part,mass,width);
410
}
412
413
public
:
416
420
bool
kinematics
()
const
{
return
_calckinematics; }
421
425
void
kinematics
(
bool
kine ) { _calckinematics=kine; }
426
430
void
calculateKinematics
(
const
Lorentz5Momentum
& p0,
431
const
Lorentz5Momentum
& p1,
432
const
Lorentz5Momentum
& p2) {
433
_kine[0][0]=p0*p0;
434
_kine[1][1]=p1*p1;
435
_kine[2][2]=p2*p2;
436
_kine[0][1]=p0*p1;_kine[1][0]=_kine[0][1];
437
_kine[0][2]=p0*p2;_kine[2][0]=_kine[0][2];
438
_kine[1][2]=p1*p2;_kine[2][1]=_kine[1][2];
439
}
440
444
void
calculateKinematics
(
const
Lorentz5Momentum
& p0,
445
const
Lorentz5Momentum
& p1,
446
const
Lorentz5Momentum
& p2,
447
const
Lorentz5Momentum
& p3) {
448
_kine[0][0]=p0*p0;
449
_kine[1][1]=p1*p1;
450
_kine[2][2]=p2*p2;
451
_kine[3][3]=p3*p3;
452
_kine[0][1]=p0*p1;_kine[1][0]=_kine[0][1];
453
_kine[0][2]=p0*p2;_kine[2][0]=_kine[0][2];
454
_kine[0][3]=p0*p3;_kine[3][0]=_kine[0][3];
455
_kine[1][2]=p1*p2;_kine[2][1]=_kine[1][2];
456
_kine[1][3]=p1*p3;_kine[3][1]=_kine[1][3];
457
_kine[2][3]=p2*p3;_kine[3][2]=_kine[2][3];
458
}
459
463
void
calculateKinematics
(
const
vector<Lorentz5Momentum> & p) {
464
for
(
size_t
ix=0;ix<p.size();++ix) {
465
for
(
size_t
iy=0;iy<=ix;++ix) {
466
_kine[ix][iy]=p[ix]*p[iy];
467
_kine[iy][ix]=_kine[ix][iy];
468
}
469
}
470
}
471
475
Energy2
invariant
(
unsigned
int
ix ,
unsigned
int
iy)
const
{
476
assert ( ix < _npoint && iy < _npoint );
477
return
_kine[ix][iy];
478
}
480
481
protected
:
482
487
void
orderInGem
(
int
order) { couplingOrders_[CouplingType::QED] = order; }
488
493
void
orderInGs
(
int
order) { couplingOrders_[CouplingType::QCD] = order; }
494
498
void
orderInCoupling
(CouplingType::T cType,
int
order) {
499
couplingOrders_[cType] = order;
500
}
501
505
void
colourStructure
(ColourStructure::T structure) {
506
colourStructure_ = structure;
507
}
508
509
private
:
510
514
VertexBase
& operator=(
const
VertexBase
&) =
delete
;
515
516
private
:
517
525
vector<vector<PDPtr> >
_particles
;
526
530
unsigned
int
_npoint
;
531
535
set<tPDPtr>
_inpart
;
536
540
set<tPDPtr>
_outpart
;
542
546
Complex
_norm
;
547
551
bool
_calckinematics
;
552
556
std::array<std::array<Energy2,5>,5>
_kine
;
557
561
VertexType::T
_theName
;
562
566
ColourStructure::T
colourStructure_
;
567
571
map<CouplingType::T,int>
couplingOrders_
;
572
576
unsigned
int
_coupopt
;
577
581
double
_gs
;
582
586
double
_ee
;
587
591
double
_sw
;
592
};
593
597
ostream &
operator<<
(ostream &,
const
VertexBase
&);
598
599
}
600
}
601
602
#endif
/* ThePEG_VertexBase_H */
ThePEG::Helicity::VertexBase::kinematics
bool kinematics() const
Whether or not to calculate the kinematics invariants.
Definition:
VertexBase.h:420
ThePEG::Helicity::VertexBase::_theName
VertexType::T _theName
Name of vertex.
Definition:
VertexBase.h:561
ThePEG::PersistentIStream
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Definition:
PersistentIStream.h:48
ThePEG::Helicity::VertexBase::orderInGs
int orderInGs() const
Get the order in .
Definition:
VertexBase.h:208
ThePEG::Helicity::VertexBase::orderInCoupling
int orderInCoupling(CouplingType::T cType) const
Get the order in a specific coupling.
Definition:
VertexBase.h:213
ThePEG::Complex
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition:
Complex.h:23
ThePEG::Helicity::VertexBase::weakCoupling
double weakCoupling(Energy2 q2) const
Weak coupling.
Definition:
VertexBase.h:272
ThePEG::Helicity::VertexBase::getNpoint
unsigned int getNpoint() const
Get number of lines on Vertex.
Definition:
VertexBase.h:198
ThePEG::Helicity::VertexBase::_sw
double _sw
Fixed value of to use.
Definition:
VertexBase.h:591
ThePEG::Helicity::VertexBase::colourStructure
void colourStructure(ColourStructure::T structure)
Set the colour structure.
Definition:
VertexBase.h:505
ThePEG::PersistentOStream
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Definition:
PersistentOStream.h:51
HelicityDefinitions.h
This file contains enumerations used by LorentzSpinor and LorentzSpinorBar classes.
ThePEG::Pointer::TransientConstRCPtr
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition:
RCPtr.h:696
ThePEG::Helicity::VertexBase::_kine
std::array< std::array< Energy2, 5 >, 5 > _kine
Kinematica quantities needed for loop vertices.
Definition:
VertexBase.h:556
ThePEG::Constants::pi
constexpr double pi
Good old .
Definition:
Constants.h:54
ThePEG::Pointer::TransientRCPtr
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition:
RCPtr.h:519
ThePEG::sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
The square function should really have been included in the standard C++ library. ...
Definition:
ThePEG.h:117
ThePEG::Helicity::VertexBase::_particles
vector< vector< PDPtr > > _particles
Storage of the particles.
Definition:
VertexBase.h:525
ThePEG::Rebinder
Rebinder is a class associating pairs of pointers to objects.
Definition:
Rebinder.h:27
ThePEG::Helicity::VertexBase::_outpart
set< tPDPtr > _outpart
ParticleData pointers for the allowed outgoing particles.
Definition:
VertexBase.h:540
ThePEG::Helicity::VertexBase::outgoing
const set< tPDPtr > & outgoing() const
Get the list of outgoing particles.
Definition:
VertexBase.h:160
ThePEG::Helicity::VertexBase::orderInGs
void orderInGs(int order)
Set the order in .
Definition:
VertexBase.h:493
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::Helicity::VertexBase::size
unsigned int size() const
Access to the particle information.
Definition:
VertexBase.h:133
ThePEG::Helicity::VertexBase::_coupopt
unsigned int _coupopt
option for the coupling
Definition:
VertexBase.h:576
ThePEG::Helicity::VertexBase::_inpart
set< tPDPtr > _inpart
ParticleData pointers for the allowed incoming particles.
Definition:
VertexBase.h:535
ThePEG::Helicity::VertexBase::getName
VertexType::T getName() const
Get name of Vertex.
Definition:
VertexBase.h:193
ThePEG::Helicity::VertexBase::_norm
Complex _norm
The overall coupling.
Definition:
VertexBase.h:546
ThePEG::Helicity::VertexBase::electroMagneticCoupling
double electroMagneticCoupling(Energy2 q2) const
Electromagnetic coupling.
Definition:
VertexBase.h:260
ThePEG::Helicity::VertexBase::_ee
double _ee
Fixed value of the electromagentic coupling to use.
Definition:
VertexBase.h:586
ThePEG::Helicity::VertexBase
The VertexBase class is the base class for all helicity amplitude vertices.
Definition:
VertexBase.h:83
ThePEG::Helicity::VertexBase::strongCoupling
double strongCoupling(Energy2 q2) const
Strong coupling.
Definition:
VertexBase.h:245
ThePEG::Helicity::VertexBase::orderInGem
int orderInGem() const
Get the order in .
Definition:
VertexBase.h:203
ThePEG::Helicity::VertexBase::_gs
double _gs
Fixed value of strong coupling to use.
Definition:
VertexBase.h:581
ThePEG::Helicity::VertexBase::colourStructure_
ColourStructure::T colourStructure_
Colour structure of the vertex.
Definition:
VertexBase.h:566
ThePEG::Helicity::VertexBase::_calckinematics
bool _calckinematics
Whether or not to calculate the kinematic invariants for the vertex.
Definition:
VertexBase.h:551
ThePEG::Helicity::VertexBase::colourStructure
ColourStructure::T colourStructure() const
Get the colour structure.
Definition:
VertexBase.h:233
ThePEG::Helicity::VertexType::UNDEFINED
const T UNDEFINED
Undefined Enum for the Lorentz structures.
Definition:
VertexBase.h:35
ThePEG::Helicity::operator<<
ostream & operator<<(ostream &, const VertexBase &)
Output the information on the vertex.
ThePEG::Lorentz5Vector< Energy >
ThePEG::Helicity::VertexBase::orderInCoupling
void orderInCoupling(CouplingType::T cType, int order)
Set the order in a specifc type of coupling.
Definition:
VertexBase.h:498
ThePEG::Helicity::VertexBase::calculateKinematics
void calculateKinematics(const vector< Lorentz5Momentum > &p)
Calculate the kinematics for a n-point vertex.
Definition:
VertexBase.h:463
ThePEG::Interfaced
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
Definition:
Interfaced.h:38
ThePEG::Helicity::VertexBase::orderInGem
void orderInGem(int order)
Set the order in .
Definition:
VertexBase.h:487
ThePEG::Helicity::VertexBase::calculateKinematics
void calculateKinematics(const Lorentz5Momentum &p0, const Lorentz5Momentum &p1, const Lorentz5Momentum &p2, const Lorentz5Momentum &p3)
Calculate the kinematics for a 4-point vertex.
Definition:
VertexBase.h:444
ThePEG::Helicity::VertexBase::_npoint
unsigned int _npoint
Number of particles at the vertex.
Definition:
VertexBase.h:530
ThePEG::Helicity::VertexBase::norm
Complex norm() const
Get the coupling.
Definition:
VertexBase.h:165
ThePEG::Helicity::VertexBase::kinematics
void kinematics(bool kine)
Set whether or not to calculate the kinematics invariants.
Definition:
VertexBase.h:425
ThePEG::Helicity::VertexBase::calculateKinematics
void calculateKinematics(const Lorentz5Momentum &p0, const Lorentz5Momentum &p1, const Lorentz5Momentum &p2)
Calculate the kinematics for a 3-point vertex.
Definition:
VertexBase.h:430
ThePEG::Helicity::VertexBase::invariant
Energy2 invariant(unsigned int ix, unsigned int iy) const
Get one of the kinematic invariants.
Definition:
VertexBase.h:475
ThePEG::Helicity::VertexBase::isOutgoing
bool isOutgoing(tPDPtr p) const
Is a particle allowed as an outgoing particle?
Definition:
VertexBase.h:148
ThePEG::Qty< 0, 2, 0 >
ThePEG::Helicity::VertexBase::isIncoming
bool isIncoming(tPDPtr p) const
Is a particle allowed as an incoming particle?
Definition:
VertexBase.h:140
ThePEG::Helicity::VertexBase::norm
void norm(const Complex &coup)
Members for the amplitude calculations.
Definition:
VertexBase.h:384
ThePEG::IVector
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
Definition:
Containers.h:67
ThePEG::Helicity::VertexBase::normPropagator
Complex normPropagator(int iopt, Energy2 q2, tcPDPtr part, complex< Energy > mass=-GeV, complex< Energy > width=-GeV)
Calculate propagator multiplied by coupling.
Definition:
VertexBase.h:406
ThePEG::Helicity::VertexBase::couplingOrders_
map< CouplingType::T, int > couplingOrders_
The order of the vertex in specific couplings.
Definition:
VertexBase.h:571
ThePEG::Helicity::VertexBase::orderInAllCouplings
int orderInAllCouplings() const
Get the total order of the vertex.
Definition:
VertexBase.h:223
ThePEG::Helicity::VertexBase::incoming
const set< tPDPtr > & incoming() const
Get the list of incoming particles.
Definition:
VertexBase.h:155
Generated on Sat Apr 11 2020 14:31:18 for ThePEG by
1.8.13