herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
DipoleChain.h
1// -*- C++ -*-
2//
3// DipoleChain.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_DipoleChain_H
10#define HERWIG_DipoleChain_H
11//
12// This is the declaration of the DipoleChain class.
13//
14
15#include "Dipole.h"
16
17namespace Herwig {
18
19using namespace ThePEG;
20
30
31public:
32
37
41 bool circular () const;
42
43 /*
44 * Return true, if the dipole referred to
45 * has a left neighbour
46 */
47 bool hasLeftNeighbour(list<Dipole>::const_iterator dc) const;
48
49 /*
50 * Return a reference to the left neighbour,
51 * if existing
52 */
53 Dipole& leftNeighbour(list<Dipole>::iterator dc);
54
55 /*
56 * Return a const reference to the left neighbour,
57 * if existing
58 */
59 const Dipole& leftNeighbour(list<Dipole>::const_iterator dc) const;
60
64 list<Dipole>::iterator leftNeighbourIterator(list<Dipole>::iterator dc);
65
66 /*
67 * Return true, if the dipole referred to
68 * has a right neighbour
69 */
70 bool hasRightNeighbour (list<Dipole>::const_iterator dc) const;
71
72 /*
73 * Return a reference to the right neighbour,
74 * if existing
75 */
76 Dipole& rightNeighbour (list<Dipole>::iterator dc);
77
78 /*
79 * Return a const reference to the right neighbour,
80 * if existing
81 */
82 const Dipole& rightNeighbour (list<Dipole>::const_iterator dc) const;
83
87 list<Dipole>::iterator rightNeighbourIterator(list<Dipole>::iterator dc);
88
89public:
90
94 list<Dipole>& dipoles() { return theDipoles; }
95
99 const list<Dipole>& dipoles() const { return theDipoles; }
100
104 void check();
105
106public:
107
108 /*
109 * Insert the given splitting; if this contains a chain-breakup emission and
110 * the chain is circular, reshuffle the chain to make it non-circular; if it is
111 * already non-circular return the iterator starting the new chain. If no
112 * splitting is needed return the end iterator of the dipole list.
113 * Set the iterators pointing to the children dipoles.
114 */
115 list<Dipole>::iterator insertSplitting(list<Dipole>::iterator emittingDipole,
116 pair<Dipole,Dipole> children,
117 pair<list<Dipole>::iterator,list<Dipole>::iterator>& childIterators);
118
122 void updateDipole(list<Dipole>::iterator dip);
123
124public:
125
129 void print(ostream&) const;
130
131private:
132
136 list<Dipole> theDipoles;
137
143
144};
145
146inline ostream& operator << (ostream& os, const DipoleChain& di) {
147 di.print(os);
148 return os;
149}
150
151}
152
153#endif /* HERWIG_DipoleChain_H */
The DipoleChain class is used by the dipole shower to represent a chain of dipoles.
Definition: DipoleChain.h:29
void updateDipole(list< Dipole >::iterator dip)
Indicate a change in the given dipole.
bool ggSingleDipole
Switch on special treatment for gg single dipole.
Definition: DipoleChain.h:142
const list< Dipole > & dipoles() const
Return the dipole list.
Definition: DipoleChain.h:99
list< Dipole > & dipoles()
Access the dipole list.
Definition: DipoleChain.h:94
list< Dipole >::iterator leftNeighbourIterator(list< Dipole >::iterator dc)
Return an iterator to the left neighbour.
void check()
Check for gg single dipole.
bool circular() const
Return true, if this chain is circular.
list< Dipole >::iterator rightNeighbourIterator(list< Dipole >::iterator dc)
Return an iterator to the right neighbour.
DipoleChain()
Default constructor.
void print(ostream &) const
Put information to ostream.
list< Dipole > theDipoles
The dipoles contained in this chain.
Definition: DipoleChain.h:136
The Dipole class is used by the dipole shower to represent a dipole of two coloured partons.
Definition: Dipole.h:30
-*- C++ -*-
ostream & operator<<(ostream &, const Collision &)