herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
SimpleColourBasis.h
1 // -*- C++ -*-
2 //
3 // SimpleColourBasis.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_SimpleColourBasis_H
10 #define Herwig_SimpleColourBasis_H
11 //
12 // This is the declaration of the SimpleColourBasis class.
13 //
14 
15 #include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
16 
17 namespace Herwig {
18 
19 using namespace ThePEG;
20 
31 
32 public:
33 
40 
44  virtual ~SimpleColourBasis();
46 
47 public:
48 
53  virtual size_t prepareBasis(const vector<PDT::Colour>&);
54 
59  virtual double scalarProduct(size_t a, size_t b,
60  const vector<PDT::Colour>& abBasis) const;
61 
67  virtual double tMatrixElement(size_t i, size_t a, size_t b,
68  const vector<PDT::Colour>& aBasis,
69  const vector<PDT::Colour>& bBasis,
70  size_t k, size_t l,
71  const map<size_t,size_t>& dict
72  ) const;
73 
74  virtual double sMatrixElement(size_t, size_t, size_t,
75  const vector<PDT::Colour>&,
76  const vector<PDT::Colour>&,
77  size_t, size_t,
78  const map<size_t,size_t>&
79  ) const {
80  assert( 0 == 1 );
81  return 0;
82  }
83 
87  virtual bool canSplitGluons() const {
88  return false;
89  }
90 
95  virtual bool colourConnected(const cPDVector&,
96  const vector<PDT::Colour>&,
97  const pair<int,bool>&,
98  const pair<int,bool>&,
99  size_t) const;
100 
105  virtual bool haveColourFlows() const { return true; }
106 
110  void makeIds() const;
111 
112 public:
113 
120  void persistentOutput(PersistentOStream & os) const;
121 
127  void persistentInput(PersistentIStream & is, int version);
129 
136  static void Init();
137 
138 protected:
139 
146  virtual IBPtr clone() const;
147 
152  virtual IBPtr fullclone() const;
154 
155 
156 // If needed, insert declarations of virtual function defined in the
157 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
158 
159 
160 private:
161 
165  mutable vector<PDT::Colour> id88;
166 
170  mutable vector<PDT::Colour> id33bar;
171 
175  mutable vector<PDT::Colour> id888;
176 
180  mutable vector<PDT::Colour> id33bar8;
181 
185  mutable vector<PDT::Colour> id8888;
186 
190  mutable vector<PDT::Colour> id33bar88;
191 
195  mutable vector<PDT::Colour> id33bar33bar;
196 
197 private:
198 
203  SimpleColourBasis & operator=(const SimpleColourBasis &) = delete;
204 
205 };
206 
207 }
208 
209 #endif /* Herwig_SimpleColourBasis_H */
vector< PDT::Colour > id8888
id for 8888
vector< PDT::Colour > id888
id for 888
virtual bool canSplitGluons() const
Return true, if this colour basis supports gluon splittings.
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< PDT::Colour > id33bar8
id for 33bar8
vector< PDT::Colour > id33bar88
id for 33bar88
vector< PDT::Colour > id33bar33bar
id for 33bar33bar
virtual bool haveColourFlows() const
Return true, if the colour basis is capable of assigning colour flows.
SimpleColourBasis implements the colour algebra needed for electroweak boson and electroweak boson + ...
vector< cPDPtr > cPDVector
vector< PDT::Colour > id88
id for 88
-*- C++ -*-
ColourBasis is an interface to a colour basis implementation.
Definition: ColourBasis.h:46
vector< PDT::Colour > id33bar
id for 33bar