thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
MatrixElement
Tree2toNDiagram.h
1
// -*- C++ -*-
2
//
3
// Tree2toNDiagram.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_Tree2toNDiagram_H
10
#define ThePEG_Tree2toNDiagram_H
11
// This is the declaration of the Tree2toNDiagram class.
12
13
#include "ThePEG/MatrixElement/DiagramBase.h"
14
#include "ThePEG/MatrixElement/ColourLines.h"
15
#include "ThePEG/Handlers/StandardXComb.fh"
16
#include "Tree2toNDiagram.xh"
17
18
namespace
ThePEG
{
19
60
class
Tree2toNDiagram
:
public
DiagramBase
{
61
62
public
:
63
65
typedef
cPDVector::size_type
size_type
;
67
typedef
multiset<tcPDPtr>
PDMSet
;
68
69
public
:
70
76
Tree2toNDiagram
()
77
:
theNSpace
(0),
theNOutgoing
(0),
nextOrig
(0) {}
78
82
~Tree2toNDiagram
();
83
88
explicit
Tree2toNDiagram
(
int
space)
89
:
theNSpace
(space),
theNOutgoing
(0),
nextOrig
(-1) {}
91
92
public
:
93
98
Tree2toNDiagram
&
operator,
(
int
o) {
99
nextOrig
= o - 1;
100
if
( o < 0 )
check
();
101
return
*
this
;
102
}
103
107
Tree2toNDiagram
&
operator,
(
PDPtr
pd) {
return
add
(pd); }
108
112
Tree2toNDiagram
&
operator,
(
cPDPtr
pd) {
return
add
(pd); }
113
117
Tree2toNDiagram
&
operator,
(
tPDPtr
pd) {
return
add
(pd); }
118
122
Tree2toNDiagram
&
operator,
(
tcPDPtr
pd) {
return
add
(pd); }
123
131
virtual
tPVector
construct
(
SubProPtr
sb,
const
StandardXComb
&,
132
const
ColourLines
&)
const
;
133
137
tcPDPair
incoming
()
const
;
138
142
const
cPDVector
&
allPartons
()
const
{
return
thePartons
; }
143
147
tcPDVector
outgoing
()
const
;
148
153
tcPDVector
external
()
const
;
154
158
int
parent
(
int
i)
const
{
return
theParents
[i]; }
159
163
pair<int,int>
children
(
int
)
const
;
164
168
int
nSpace
()
const
{
return
theNSpace
; }
169
173
void
resize
(
size_type
nSpace
) {
174
theNSpace
= max(
nSpace
,
theNSpace
);
175
}
176
180
int
nOutgoing
()
const
{
return
theNOutgoing
; }
181
182
private
:
183
187
void
check
();
188
192
void
addSpacelike
(
tcPDPtr
pd) {
193
if
(
thePartons
.size() >=
theNSpace
)
throw
Tree2toNDiagramError();
194
theParents
.push_back(
thePartons
.size() - 1);
195
thePartons
.push_back(pd);
196
}
200
void
addTimelike
(
tcPDPtr
);
201
205
void
addTimelike
(
tcPDPtr
,
size_type
origin);
206
210
Tree2toNDiagram
&
add
(
tcPDPtr
);
211
212
public
:
213
217
virtual
bool
isSame
(tcDiagPtr)
const
;
218
224
virtual
bool
isSame
(tcDiagPtr, map<int,int>&)
const
;
225
229
bool
equals
(
Ptr<Tree2toNDiagram>::tcptr
,
int
start=0,
int
startCmp=0)
const
;
230
234
bool
equals
(
Ptr<Tree2toNDiagram>::tcptr
,
235
map<int,int>&,
236
int
start=0,
int
startCmp=0)
const
;
237
248
int
mergeEmission
(
int
emitter,
int
id
, map<int,int>& remap);
249
254
int
externalId
(
int
id
)
const
;
255
260
int
diagramId
(
int
id
)
const
;
261
262
public
:
263
270
void
persistentOutput
(
PersistentOStream
& os)
const
;
271
277
void
persistentInput
(
PersistentIStream
& is,
int
version);
279
280
private
:
281
285
size_type
theNSpace
;
286
290
int
theNOutgoing
;
291
295
int
nextOrig
;
296
300
cPDVector
thePartons
;
301
305
vector<int>
theParents
;
306
307
private
:
308
312
static
ClassDescription<Tree2toNDiagram>
initTree2toNDiagram
;
313
317
Tree2toNDiagram
&
operator=
(
const
Tree2toNDiagram
&) =
delete
;
318
319
};
320
321
}
322
323
namespace
ThePEG
{
324
331
template
<>
332
struct
BaseClassTrait<Tree2toNDiagram,1>:
public
ClassTraitsType {
334
typedef
DiagramBase
NthBase
;
335
};
336
341
template
<>
342
struct
ClassTraits<Tree2toNDiagram>:
public
ClassTraitsBase<Tree2toNDiagram> {
344
static
string
className
() {
return
"ThePEG::Tree2toNDiagram"
; }
345
};
346
349
}
350
351
#endif
/* ThePEG_Tree2toNDiagram_H */
ThePEG::ClassDescription
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
Definition:
ClassDescription.h:333
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::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::ConstRCPtr
ConstRCPtr is a reference counted (smart) const pointer.
Definition:
RCPtr.h:320
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::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::StandardXComb
The StandardXComb class inherits from the more general XComb class which stores all information about...
Definition:
StandardXComb.h:53
ThePEG::Tree2toNDiagram
The Tree2toNDiagram class inherits from DiagramBase and represents a Feynman tree diagram.
Definition:
Tree2toNDiagram.h:60
ThePEG::Tree2toNDiagram::theParents
vector< int > theParents
The index of the parents.
Definition:
Tree2toNDiagram.h:305
ThePEG::Tree2toNDiagram::children
pair< int, int > children(int) const
Return the indices of the children of the given parton.
ThePEG::Tree2toNDiagram::theNOutgoing
int theNOutgoing
The number of outgoing partons.
Definition:
Tree2toNDiagram.h:290
ThePEG::Tree2toNDiagram::operator,
Tree2toNDiagram & operator,(int o)
If less than zero indicate that this tree is competed.
Definition:
Tree2toNDiagram.h:98
ThePEG::Tree2toNDiagram::addSpacelike
void addSpacelike(tcPDPtr pd)
Add a space-like parton to this diagram.
Definition:
Tree2toNDiagram.h:192
ThePEG::Tree2toNDiagram::nOutgoing
int nOutgoing() const
Return the number of outgoing partons.
Definition:
Tree2toNDiagram.h:180
ThePEG::Tree2toNDiagram::add
Tree2toNDiagram & add(tcPDPtr)
Add a parton to this diagram.
ThePEG::Tree2toNDiagram::~Tree2toNDiagram
~Tree2toNDiagram()
Destructor.
ThePEG::Tree2toNDiagram::Tree2toNDiagram
Tree2toNDiagram(int space)
The standard constructor giving the number of space-like propagators.
Definition:
Tree2toNDiagram.h:88
ThePEG::Tree2toNDiagram::thePartons
cPDVector thePartons
The complete vector of partons in this tree diagram.
Definition:
Tree2toNDiagram.h:300
ThePEG::Tree2toNDiagram::operator,
Tree2toNDiagram & operator,(PDPtr pd)
Add a space- or time-like parton.
Definition:
Tree2toNDiagram.h:107
ThePEG::Tree2toNDiagram::operator,
Tree2toNDiagram & operator,(cPDPtr pd)
Add a space- or time-like parton.
Definition:
Tree2toNDiagram.h:112
ThePEG::Tree2toNDiagram::allPartons
const cPDVector & allPartons() const
Return the complete vector of partons in this tree diagram.
Definition:
Tree2toNDiagram.h:142
ThePEG::Tree2toNDiagram::operator,
Tree2toNDiagram & operator,(tPDPtr pd)
Add a space- or time-like parton.
Definition:
Tree2toNDiagram.h:117
ThePEG::Tree2toNDiagram::parent
int parent(int i) const
Return the index of the parent of the given parton.
Definition:
Tree2toNDiagram.h:158
ThePEG::Tree2toNDiagram::theNSpace
size_type theNSpace
The number of space-like partons.
Definition:
Tree2toNDiagram.h:285
ThePEG::Tree2toNDiagram::diagramId
int diagramId(int id) const
Translate a parton's id in a vector of incoming followed by outgoing partons to a parton's id in the ...
ThePEG::Tree2toNDiagram::check
void check()
Check the consistency of this tree diagram.
ThePEG::Tree2toNDiagram::addTimelike
void addTimelike(tcPDPtr, size_type origin)
Add a time-like parton to this diagram indicating its origin.
ThePEG::Tree2toNDiagram::nextOrig
int nextOrig
The parent of the next added parton.
Definition:
Tree2toNDiagram.h:295
ThePEG::Tree2toNDiagram::Tree2toNDiagram
Tree2toNDiagram()
Default constructor.
Definition:
Tree2toNDiagram.h:76
ThePEG::Tree2toNDiagram::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::Tree2toNDiagram::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::Tree2toNDiagram::equals
bool equals(Ptr< Tree2toNDiagram >::tcptr, int start=0, int startCmp=0) const
Check for equality.
ThePEG::Tree2toNDiagram::resize
void resize(size_type nSpace)
Extend this diagram to accomodate the given number of space-like lines.
Definition:
Tree2toNDiagram.h:173
ThePEG::Tree2toNDiagram::equals
bool equals(Ptr< Tree2toNDiagram >::tcptr, map< int, int > &, int start=0, int startCmp=0) const
Check for equality modulo permutations of external legs.
ThePEG::Tree2toNDiagram::initTree2toNDiagram
static ClassDescription< Tree2toNDiagram > initTree2toNDiagram
Describe a concrete class with persistent data.
Definition:
Tree2toNDiagram.h:312
ThePEG::Tree2toNDiagram::mergeEmission
int mergeEmission(int emitter, int id, map< int, int > &remap)
Merge the two external partons referred to by indices as in the partons() vector returned by DiagramB...
ThePEG::Tree2toNDiagram::size_type
cPDVector::size_type size_type
The integer type reresenting vector sizes.
Definition:
Tree2toNDiagram.h:65
ThePEG::Tree2toNDiagram::isSame
virtual bool isSame(tcDiagPtr) const
Compare this diagram's topology to another one.
ThePEG::Tree2toNDiagram::operator=
Tree2toNDiagram & operator=(const Tree2toNDiagram &)=delete
Private and non-existent assignment operator.
ThePEG::Tree2toNDiagram::outgoing
tcPDVector outgoing() const
Return the outgoing parton types of this tree diagram.
ThePEG::Tree2toNDiagram::isSame
virtual bool isSame(tcDiagPtr, map< int, int > &) const
Compare this diagram's topology to another one modulo permutations of external legs; provide a map of...
ThePEG::Tree2toNDiagram::construct
virtual tPVector construct(SubProPtr sb, const StandardXComb &, const ColourLines &) const
Construct a sub process corresponding to this diagram.
ThePEG::Tree2toNDiagram::addTimelike
void addTimelike(tcPDPtr)
Add a time-like parton to this diagram.
ThePEG::Tree2toNDiagram::PDMSet
multiset< tcPDPtr > PDMSet
A multi-set of particle data objects.
Definition:
Tree2toNDiagram.h:67
ThePEG::Tree2toNDiagram::external
tcPDVector external() const
Return the incoming followed by the outgoing parton types of this tree diagram.
ThePEG::Tree2toNDiagram::nSpace
int nSpace() const
Return the number of space-like partons.
Definition:
Tree2toNDiagram.h:168
ThePEG::Tree2toNDiagram::operator,
Tree2toNDiagram & operator,(tcPDPtr pd)
Add a space- or time-like parton.
Definition:
Tree2toNDiagram.h:122
ThePEG::Tree2toNDiagram::incoming
tcPDPair incoming() const
Return the types of the incoming partons.
ThePEG::Tree2toNDiagram::externalId
int externalId(int id) const
Translate a parton's id in the diagram to a parton's id in a vector of incoming followed by outgoing ...
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::tcPDPair
pair< tcPDPtr, tcPDPtr > tcPDPair
A pair of transient pointers to const ParticleData objects.
Definition:
Containers.h:124
ThePEG::tcPDVector
vector< tcPDPtr > tcPDVector
A vector of transient pointers to const ParticleData objects.
Definition:
Containers.h:42
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::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