thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
EventRecord
ColourSinglet.h
1
// -*- C++ -*-
2
//
3
// ColourSinglet.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_ColourSinglet_H
10
#define ThePEG_ColourSinglet_H
11
12
#include "
ThePEG/EventRecord/EventConfig.h
"
13
14
namespace
ThePEG
{
15
31
class
ColourSinglet
{
32
33
public
:
34
36
typedef
deque<tcPPtr>
StringPiece
;
38
typedef
StringPiece::size_type
Index
;
40
typedef
pair<Index,Index>
Junction
;
41
42
public
:
43
47
ColourSinglet
() {}
48
53
ColourSinglet
(
tcColinePtr
cl,
tcParticleSet
&
left
);
54
55
protected
:
56
62
ColourSinglet
(
const
ColourSinglet
& cs,
Index
si);
63
64
public
:
65
69
tcPVector
&
partons
() {
return
thePartons
; }
70
74
const
tcPVector
&
partons
()
const
{
return
thePartons
; }
75
79
tcPPtr
parton
(tcPVector::size_type i)
const
{
return
thePartons
[i]; }
80
84
LorentzMomentum
momentum
()
const
;
85
89
Index
nPieces
()
const
{
return
thePieces
.size(); }
90
95
StringPiece
&
piece
(
Index
i) {
return
thePieces
[i - 1]; }
96
101
const
StringPiece
&
piece
(
Index
i)
const
{
return
thePieces
[i - 1]; }
102
107
Junction
&
junction
(
Index
i,
bool
forward) {
108
return
forward ?
sink
(i) :
source
(i);
109
}
110
115
const
Junction
&
junction
(
Index
i,
bool
forward)
const
{
116
return
forward ?
sink
(i) :
source
(i);
117
}
118
123
Junction
&
sink
(
Index
i) {
return
theSinks
[i - 1]; }
124
129
const
Junction
&
sink
(
Index
i)
const
{
return
theSinks
[i - 1]; }
130
135
Junction
&
source
(
Index
i) {
return
theSources
[i - 1]; }
140
const
Junction
&
source
(
Index
i)
const
{
return
theSources
[i - 1]; }
141
147
static
vector<ColourSinglet>
getSinglets
(
tcParticleSet
&
left
);
148
153
template
<
typename
Iterator>
154
static
vector<ColourSinglet>
155
getSinglets
(Iterator first, Iterator last) {
156
tcParticleSet
pset(first, last);
157
return
getSinglets
(pset);
158
}
159
164
tcPDVector
getTripletData
()
const
;
165
175
ColourSinglet
splitInternal
(
Index
sp = 0);
176
186
ColourSinglet
splitInternal
(
Index
sp,
Index
sa,
Index
sc,
187
const
vector<bool> & assing);
188
199
ColourSinglet
200
splitDiQuarkJunction
(
Index
sp,
tcPPtr
diq,
tcPPair
qq,
201
const
vector<bool> & assign = vector<bool>());
202
214
ColourSinglet
splitDiDiQuark
(
tcPPair
qq1,
tcPPair
qq2,
215
const
vector<bool> & assign = vector<bool>());
216
220
void
swap
(
ColourSinglet
& x) {
221
thePartons
.swap(x.
thePartons
);
222
thePieces
.swap(x.
thePieces
);
223
theSources
.swap(x.
theSources
);
224
theSinks
.swap(x.
theSinks
);
225
}
226
227
private
:
228
236
bool
fill
(
Index
s0,
bool
forward,
tcColinePtr
first,
tcParticleSet
&
left
);
237
243
void
fill
(
Index
i0,
bool
forward,
const
ColourSinglet
& cs,
Index
i1);
244
248
Index
addPiece
() {
249
thePieces
.push_back(
StringPiece
());
250
theSinks
.push_back(
Junction
());
251
theSources
.push_back(
Junction
());
252
return
nPieces
();
253
}
254
260
Junction
addJunction
(
Index
s0,
bool
forward);
261
262
public
:
263
267
class
ColourSingletException:
public
Exception
{};
270
private
:
271
275
tcPVector
thePartons
;
276
280
vector<StringPiece>
thePieces
;
281
285
vector<Junction>
theSources
;
286
290
vector<Junction>
theSinks
;
291
292
};
293
294
}
295
296
#endif
/* ThePEG_ColourSinglet_H */
EventConfig.h
This is the main config header file for the Event classes.
ThePEG::ColourSinglet
A ColourSinglet object represents a set of colour-connected partons in a total colour-singlet state.
Definition:
ColourSinglet.h:31
ThePEG::ColourSinglet::sink
Junction & sink(Index i)
Return the sink or source neighbors of a string piece with index i (note that the indices starts with...
Definition:
ColourSinglet.h:123
ThePEG::ColourSinglet::sink
const Junction & sink(Index i) const
Return the sink or source neighbors of a string piece with index i (note that the indices starts with...
Definition:
ColourSinglet.h:129
ThePEG::ColourSinglet::splitInternal
ColourSinglet splitInternal(Index sp, Index sa, Index sc, const vector< bool > &assing)
Split a junction string.
ThePEG::ColourSinglet::splitDiDiQuark
ColourSinglet splitDiDiQuark(tcPPair qq1, tcPPair qq2, const vector< bool > &assign=vector< bool >())
Split a di-quark string.
ThePEG::ColourSinglet::junction
Junction & junction(Index i, bool forward)
Return the sink (or source if forward is false) neighbors of a string piece with index i (note that t...
Definition:
ColourSinglet.h:107
ThePEG::ColourSinglet::source
const Junction & source(Index i) const
Return the sink or source neighbors of a string piece with index i (note that the indices starts with...
Definition:
ColourSinglet.h:140
ThePEG::ColourSinglet::thePieces
vector< StringPiece > thePieces
The different string pieces.
Definition:
ColourSinglet.h:280
ThePEG::ColourSinglet::Junction
pair< Index, Index > Junction
Representaion of a junction.
Definition:
ColourSinglet.h:40
ThePEG::ColourSinglet::theSinks
vector< Junction > theSinks
The sink neighbours of the string pieces.
Definition:
ColourSinglet.h:290
ThePEG::ColourSinglet::partons
const tcPVector & partons() const
Access the vector of partons.
Definition:
ColourSinglet.h:74
ThePEG::ColourSinglet::splitDiQuarkJunction
ColourSinglet splitDiQuarkJunction(Index sp, tcPPtr diq, tcPPair qq, const vector< bool > &assign=vector< bool >())
Split a junction string.
ThePEG::ColourSinglet::parton
tcPPtr parton(tcPVector::size_type i) const
Access a parton giving an index.
Definition:
ColourSinglet.h:79
ThePEG::ColourSinglet::StringPiece
deque< tcPPtr > StringPiece
A piece of string.
Definition:
ColourSinglet.h:36
ThePEG::ColourSinglet::Index
StringPiece::size_type Index
An integer type used as index in a string pieece.
Definition:
ColourSinglet.h:38
ThePEG::ColourSinglet::ColourSinglet
ColourSinglet(tcColinePtr cl, tcParticleSet &left)
Constructor taking an initial colour line and a set of partons to select from.
ThePEG::ColourSinglet::addJunction
Junction addJunction(Index s0, bool forward)
Add a junction which is a source (or sink if forward) to the string piece s0.
ThePEG::ColourSinglet::partons
tcPVector & partons()
Access the vector of partons.
Definition:
ColourSinglet.h:69
ThePEG::ColourSinglet::junction
const Junction & junction(Index i, bool forward) const
Return the sink (or source if forward is false) neighbors of a string piece with index i (note that t...
Definition:
ColourSinglet.h:115
ThePEG::ColourSinglet::getSinglets
static vector< ColourSinglet > getSinglets(tcParticleSet &left)
Extract colour-singlet strings/clusters of partons from the given set.
ThePEG::ColourSinglet::piece
const StringPiece & piece(Index i) const
Return the partons belonging to string piece with index i (note that the indices starts with 1).
Definition:
ColourSinglet.h:101
ThePEG::ColourSinglet::momentum
LorentzMomentum momentum() const
Return the total momentum for the partons in the colour singlet.
ThePEG::ColourSinglet::ColourSinglet
ColourSinglet(const ColourSinglet &cs, Index si)
Internal constructor.
ThePEG::ColourSinglet::source
Junction & source(Index i)
Return the sink or source neighbors of a string piece with index i (note that the indices starts with...
Definition:
ColourSinglet.h:135
ThePEG::ColourSinglet::nPieces
Index nPieces() const
Return the number of string pieces.
Definition:
ColourSinglet.h:89
ThePEG::ColourSinglet::fill
void fill(Index i0, bool forward, const ColourSinglet &cs, Index i1)
Fill a string piece.
ThePEG::ColourSinglet::swap
void swap(ColourSinglet &x)
Swap this colour singlet for the argument.
Definition:
ColourSinglet.h:220
ThePEG::ColourSinglet::piece
StringPiece & piece(Index i)
Return the partons belonging to string piece with index i (note that the indices starts with 1).
Definition:
ColourSinglet.h:95
ThePEG::ColourSinglet::thePartons
tcPVector thePartons
The vector of all partons.
Definition:
ColourSinglet.h:275
ThePEG::ColourSinglet::ColourSinglet
ColourSinglet()
Default constructor.
Definition:
ColourSinglet.h:47
ThePEG::ColourSinglet::addPiece
Index addPiece()
Add a new string piece and return its index.
Definition:
ColourSinglet.h:248
ThePEG::ColourSinglet::getTripletData
tcPDVector getTripletData() const
Return a vector with data objects corresponding to all triplet partons in this singlet.
ThePEG::ColourSinglet::getSinglets
static vector< ColourSinglet > getSinglets(Iterator first, Iterator last)
Extract colour-singlet strings/clusters of partons from the given range of particles.
Definition:
ColourSinglet.h:155
ThePEG::ColourSinglet::theSources
vector< Junction > theSources
The source neighbours of the string pieces.
Definition:
ColourSinglet.h:285
ThePEG::ColourSinglet::fill
bool fill(Index s0, bool forward, tcColinePtr first, tcParticleSet &left)
Fill a string piece.
ThePEG::ColourSinglet::splitInternal
ColourSinglet splitInternal(Index sp=0)
Split a junction string.
ThePEG::Exception
Exception is the base class for all exceptions to be used in ThePEG.
Definition:
Exception.h:44
ThePEG::LorentzVector< Energy >
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
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::tcParticleSet
set< tcPPtr, less< tcPPtr > > tcParticleSet
A set of transient pointers to const Particle.
Definition:
EventConfig.h:80
ThePEG::tcPPair
pair< tcPPtr, tcPPtr > tcPPair
A pair of transient pointers to const Particle objects.
Definition:
Containers.h:136
ThePEG::left
ostream & left(ostream &os)
Stream manipulator setting an ostream to left-adjust its ouput.
Definition:
std.h:161
ThePEG::tcPVector
vector< tcPPtr > tcPVector
A vector of transient pointers to const Particle objects.
Definition:
Containers.h:85
ThePEG::tcPDVector
vector< tcPDPtr > tcPDVector
A vector of transient pointers to const ParticleData objects.
Definition:
Containers.h:42
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6