herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
ColourReconnector.h
1 // -*- C++ -*-
2 //
3 // ColourReconnector.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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_ColourReconnector_H
10 #define HERWIG_ColourReconnector_H
11 
12 #include <ThePEG/Interface/Interfaced.h>
13 #include "CluHadConfig.h"
14 #include "ColourReconnector.fh"
15 
16 namespace Herwig {
17 
18 
19 using namespace ThePEG;
20 
37 
38 public:
39 
46  void rearrange(ClusterVector & clusters);
47 
48  using CluVecIt = ClusterVector::iterator;
49 
50 private:
51 
59  Energy2 _clusterMassSum(const PVector & q, const PVector & aq) const;
60 
61 
69  bool _containsColour8(const ClusterVector & cv, const vector<size_t> & P) const;
70 
76  void _doRecoStatistical(ClusterVector & cv) const;
77 
82  void _doRecoPlain(ClusterVector & cv) const;
83 
84 
88  void _doRecoBaryonic(ClusterVector & cv) const;
89 
90 
91  void _makeBaryonicClusters(ClusterPtr &c1, ClusterPtr &c2, ClusterPtr &c3,
92  ClusterPtr &newcluster1, ClusterPtr &newcluster2) const;
93 
94 
107  CluVecIt _findRecoPartner(CluVecIt cl, ClusterVector & cv) const;
108 
109  CluVecIt _findPartnerRapidity(CluVecIt cl, ClusterVector & cv) const;
110 
111  CluVecIt _findPartnerBaryonic(CluVecIt cl, ClusterVector & cv,
112  bool & tetraCand,
113  const ClusterVector& a,
114  CluVecIt &baryonic1,
115  CluVecIt &baryonic2 ) const;
116 
117 
118 
119 
125  pair <ClusterPtr,ClusterPtr> _reconnect(ClusterPtr &c1, ClusterPtr &c2) const;
126 
130  pair <ClusterPtr,ClusterPtr> _reconnectBaryonic(ClusterPtr &c1, ClusterPtr &c2) const;
131 
132 
143  pair <int,int>
144  _shuffle(const PVector & q, const PVector & aq, unsigned maxtries = 10) const;
145 
146 
152  int _algorithm = 0;
153 
158  double _annealingFactor = 0.9;
159 
163  unsigned int _annealingSteps = 50;
164 
168  int _clreco = 0;
169 
175  double _initTemp = 0.1;
176 
180  double _preco = 0.5;
181 
182 
183  double _precoBaryonic = 0.5;
184 
189  double _triesPerStepFactor = 5.0;
197  Length _maxDistance = picometer;
198 
203  bool _isColour8(tcPPtr p, tcPPtr q) const;
204 
208  unsigned int _octetOption = 0;
209 
210 public:
211 
218  void persistentOutput(PersistentOStream & os) const;
219 
225  void persistentInput(PersistentIStream & is, int version);
227 
231  static void Init();
232 
233 protected:
234 
241  virtual IBPtr clone() const;
242 
247  virtual IBPtr fullclone() const;
249 
250 
251 private:
252 
256  ColourReconnector & operator=(const ColourReconnector &) = delete;
257 
258 
259 };
260 
261 
262 }
263 
264 #endif /* HERWIG_ColourReconnector_H */
265 
Class for changing colour reconnections of partons.
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< ClusterPtr > ClusterVector
This file contains the typedef declarations used in Hadronization.
Definition: CluHadConfig.h:38
ThePEG::Ptr< Particle >::transient_const_pointer tcPPtr
-*- C++ -*-
vector< PPtr > PVector