herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 
17 namespace Herwig {
18 
19 using namespace ThePEG;
20 
29 class DipoleChain {
30 
31 public:
32 
36  DipoleChain();
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 
89 public:
90 
94  list<Dipole>& dipoles() { return theDipoles; }
95 
99  const list<Dipole>& dipoles() const { return theDipoles; }
100 
104  void check();
105 
106 public:
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 
124 public:
125 
129  void print(ostream&) const;
130 
131 private:
132 
136  list<Dipole> theDipoles;
137 
143 
144 };
145 
146 inline ostream& operator << (ostream& os, const DipoleChain& di) {
147  di.print(os);
148  return os;
149 }
150 
151 }
152 
153 #endif /* HERWIG_DipoleChain_H */
bool ggSingleDipole
Switch on special treatment for gg single dipole.
Definition: DipoleChain.h:142
list< Dipole > & dipoles()
Access the dipole list.
Definition: DipoleChain.h:94
const list< Dipole > & dipoles() const
Return the dipole list.
Definition: DipoleChain.h:99
void print(ostream &) const
Put information to ostream.
ostream & operator<<(ostream &, const DecayIntegrator &)
Output information on the DecayIntegrator for debugging purposes.
The Dipole class is used by the dipole shower to represent a dipole of two coloured partons...
Definition: Dipole.h:30
-*- C++ -*-
list< Dipole > theDipoles
The dipoles contained in this chain.
Definition: DipoleChain.h:136
The DipoleChain class is used by the dipole shower to represent a chain of dipoles.
Definition: DipoleChain.h:29