thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
MatrixElement
DiagramBase.h
1
// -*- C++ -*-
2
//
3
// DiagramBase.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 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_DiagramBase_H
10
#define ThePEG_DiagramBase_H
11
// This is the declaration of the DiagramBase class.
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
#include "ThePEG/PDT/ParticleData.h"
15
#include "ThePEG/MatrixElement/ColourLines.h"
16
#include "ThePEG/Handlers/StandardXComb.fh"
17
#include "DiagramBase.fh"
18
#include "DiagramBase.xh"
19
20
namespace
ThePEG
{
21
41
class
DiagramBase
:
public
Base
{
42
43
public
:
44
50
DiagramBase
() :
theNIncoming
(-1),
theId
(0) {}
51
55
virtual
~DiagramBase
();
57
58
public
:
59
69
virtual
tPVector
construct
(
SubProPtr
sb,
const
StandardXComb
&,
70
const
ColourLines
&)
const
= 0;
72
79
int
nIncoming
()
const
{
return
theNIncoming
; }
80
85
const
cPDVector
&
partons
()
const
{
return
thePartons
; }
86
90
int
id
()
const
{
return
theId
; }
91
96
string
getTag
()
const
;
97
102
virtual
bool
isSame
(tcDiagPtr other)
const
{
103
return
104
nIncoming
() == other->nIncoming() &&
105
partons
() == other->partons();
106
}
108
109
protected
:
110
123
void
partons
(
int
ninc,
const
cPDVector
& parts,
int
newId) {
124
theNIncoming
= ninc;
125
thePartons
= parts;
126
theId
= newId;
127
}
128
133
void
diagramInfo
(
int
ninc,
int
newId) {
134
theNIncoming
= ninc;
135
theId
= newId;
136
}
137
142
bool
done
()
const
{
return
nIncoming
() >= 0; }
143
147
void
addParton
(
tcPDPtr
pd) {
thePartons
.push_back(pd); }
148
149
public
:
150
157
void
persistentOutput
(
PersistentOStream
& os)
const
;
158
164
void
persistentInput
(
PersistentIStream
& is,
int
version);
166
170
static
void
Init
();
171
172
private
:
173
177
int
theNIncoming
;
178
183
cPDVector
thePartons
;
184
188
int
theId
;
189
190
private
:
191
195
static
AbstractClassDescription<DiagramBase>
initDiagramBase
;
196
200
DiagramBase
&
operator=
(
const
DiagramBase
&) =
delete
;
201
202
};
203
204
}
205
206
207
namespace
ThePEG
{
208
215
template
<>
216
struct
BaseClassTrait<DiagramBase,1>:
public
ClassTraitsType {
218
typedef
Base
NthBase
;
219
};
220
225
template
<>
226
struct
ClassTraits<DiagramBase>:
public
ClassTraitsBase<DiagramBase> {
228
static
string
className
() {
return
"ThePEG::DiagramBase"
; }
229
};
230
233
}
234
235
#endif
/* ThePEG_DiagramBase_H */
ThePEG.h
This is the main config header file for ThePEG.
ThePEG::AbstractClassDescription
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data.
Definition:
ClassDescription.h:282
ThePEG::ColourLines
The ColourLines class defines the colour flow in a SubProcess.
Definition:
ColourLines.h:23
ThePEG::DiagramBase
DiagramBase is the base class of all classes which describes Feynman diagrams which can be generated ...
Definition:
DiagramBase.h:41
ThePEG::DiagramBase::nIncoming
int nIncoming() const
Return the number of incoming partons for this diagram.
Definition:
DiagramBase.h:79
ThePEG::DiagramBase::addParton
void addParton(tcPDPtr pd)
Add to the partons.
Definition:
DiagramBase.h:147
ThePEG::DiagramBase::theNIncoming
int theNIncoming
The number of incoming partons for this diagram.
Definition:
DiagramBase.h:177
ThePEG::DiagramBase::~DiagramBase
virtual ~DiagramBase()
Destructor.
ThePEG::DiagramBase::isSame
virtual bool isSame(tcDiagPtr other) const
Compare this diagram to another one modulo the ids of the diagrams.
Definition:
DiagramBase.h:102
ThePEG::DiagramBase::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::DiagramBase::partons
void partons(int ninc, const cPDVector &parts, int newId)
To be used by sub classes to report the incoming and outgoing particle types, and an id number.
Definition:
DiagramBase.h:123
ThePEG::DiagramBase::getTag
string getTag() const
Generate a tag which is unique for diagrams with the same type of incoming and outgoing partons.
ThePEG::DiagramBase::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::DiagramBase::id
int id() const
Return the id number of this diagram.
Definition:
DiagramBase.h:90
ThePEG::DiagramBase::diagramInfo
void diagramInfo(int ninc, int newId)
Complete the missing information, provided partons() has already been filled.
Definition:
DiagramBase.h:133
ThePEG::DiagramBase::thePartons
cPDVector thePartons
The incoming, followed by the outgoing partons for this diagram.
Definition:
DiagramBase.h:183
ThePEG::DiagramBase::theId
int theId
The id number of this diagram.
Definition:
DiagramBase.h:188
ThePEG::DiagramBase::partons
const cPDVector & partons() const
Return the incoming, followed by the outgoing partons for this diagram.
Definition:
DiagramBase.h:85
ThePEG::DiagramBase::initDiagramBase
static AbstractClassDescription< DiagramBase > initDiagramBase
Describe an abstract base class with persistent data.
Definition:
DiagramBase.h:195
ThePEG::DiagramBase::construct
virtual tPVector construct(SubProPtr sb, const StandardXComb &, const ColourLines &) const =0
Construct a sub process corresponding to this diagram.
ThePEG::DiagramBase::done
bool done() const
Returns true if the partons(int, const cPDVector &, int) function has been called properly from the s...
Definition:
DiagramBase.h:142
ThePEG::DiagramBase::Init
static void Init()
Standard Init function.
ThePEG::DiagramBase::DiagramBase
DiagramBase()
Default constructor.
Definition:
DiagramBase.h:50
ThePEG::DiagramBase::operator=
DiagramBase & operator=(const DiagramBase &)=delete
Private and non-existent assignment operator.
ThePEG::PersistentIStream
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Definition:
PersistentIStream.h:48
ThePEG::PersistentOStream
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Definition:
PersistentOStream.h:51
ThePEG::Pointer::RCPtr
RCPtr is a reference counted (smart) pointer.
Definition:
RCPtr.h:60
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::StandardXComb
The StandardXComb class inherits from the more general XComb class which stores all information about...
Definition:
StandardXComb.h:53
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::tPVector
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition:
Containers.h:82
ThePEG::cPDVector
vector< cPDPtr > cPDVector
A vector of pointers to const ParticleData objects.
Definition:
Containers.h:36
ThePEG::BaseClassTrait::NthBase
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition:
ClassTraits.h:161
ThePEG::Base
Define the base class from which all (polymorphic) classes in ThePEG are derived.
Definition:
ThePEG.h:54
ThePEG::ClassTraitsBase::className
static string className()
Return the name of class T.
Definition:
ClassTraits.h:66
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6