herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
ColourFlowBasis.h
1 // -*- C++ -*-
2 //
3 // ColourFlowBasis.h is a part of CVolver
4 // Copyright (C) 2013-2019 Simon Platzer, The Herwig Collaboration
5 //
6 // CVolver 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 CVOLVER_ColourFlowBasis_H
10 #define CVOLVER_ColourFlowBasis_H
11 //
12 // This is the declaration of the ColourFlowBasis class.
13 //
14 
15 #include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
16 #include "ColourFlows.h"
17 
18 namespace CVolver {
19 
20 using namespace ThePEG;
21 using namespace Herwig;
22 
26 template<>
28 
32  static bool isSinglet(const ThePEG::PDT::Colour& pd) {
33  return pd == PDT::Colour0;
34  }
35 
39  static bool isAntiFundamental(const ThePEG::PDT::Colour& pd) {
40  return pd == PDT::Colour3bar;
41  }
42 
46  static bool isFundamental(const ThePEG::PDT::Colour& pd) {
47  return pd == PDT::Colour3;
48  }
49 
53  static bool isAdjoint(const ThePEG::PDT::Colour& pd) {
54  return pd == PDT::Colour8;
55  }
56 
57 };
58 
66 
67 public:
68 
75 
79  virtual ~ColourFlowBasis();
81 
82 public:
83 
87  virtual void clear();
88 
94  virtual map<size_t,vector<vector<size_t> > > basisList(const vector<PDT::Colour>&) const;
95 
100  virtual size_t prepareBasis(const vector<PDT::Colour>&);
101 
105  virtual void readBasisDetails(const vector<PDT::Colour>&);
106 
111  virtual double scalarProduct(size_t a, size_t b,
112  const vector<PDT::Colour>& abBasis) const;
113 
119  virtual double tMatrixElement(size_t i, size_t a, size_t b,
120  const vector<PDT::Colour>& aBasis,
121  const vector<PDT::Colour>& bBasis,
122  size_t k, size_t l,
123  const map<size_t,size_t>& dict) const;
124 
128  virtual bool canSplitGluons() const {
129  return false;
130  }
131 
137  virtual double sMatrixElement(size_t i, size_t a, size_t b,
138  const vector<PDT::Colour>& aBasis,
139  const vector<PDT::Colour>& bBasis,
140  size_t k, size_t l,
141  const map<size_t,size_t>& dict) const;
142 
147  virtual bool haveColourFlows() const { return true; }
148 
153  virtual bool colourConnected(const cPDVector&,
154  const vector<PDT::Colour>&,
155  const pair<int,bool>&,
156  const pair<int,bool>&,
157  size_t) const;
158 
159 public:
160 
167  void persistentOutput(PersistentOStream & os) const;
168 
174  void persistentInput(PersistentIStream & is, int version);
176 
183  static void Init();
184 
185 protected:
186 
193  virtual IBPtr clone() const;
194 
199  virtual IBPtr fullclone() const;
201 
202 
203 // If needed, insert declarations of virtual function defined in the
204 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
205 
206 private:
207 
211  map<vector<PDT::Colour>,ColourFlowCrossing> theCrossings;
212 
217  map<size_t,vector<ColourFlow> > theFlows;
218 
219 private:
220 
225  ColourFlowBasis & operator=(const ColourFlowBasis &) = delete;
226 
227 };
228 
229 }
230 
231 #endif /* CVOLVER_ColourFlowBasis_H */
ColourFlowBasis implements the colour flow basis.
map< vector< PDT::Colour >, ColourFlowCrossing > theCrossings
Map colour signatures to colour crossings.
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ParticleData traits.
Definition: ColourFlows.h:218
static bool isAntiFundamental(const ThePEG::PDT::Colour &pd)
Return true, if anti-fundamental.
static bool isFundamental(const ThePEG::PDT::Colour &pd)
Return true, if fundamental.
vector< cPDPtr > cPDVector
The crossing of a physical process to a colour flow basis.
Definition: ColourFlows.h:245
virtual bool haveColourFlows() const
Return true, if the colour basis is capable of assigning colour flows.
-*- C++ -*-
ColourBasis is an interface to a colour basis implementation.
Definition: ColourBasis.h:46
virtual bool canSplitGluons() const
Return true, if this colour basis supports gluon splittings.
static bool isSinglet(const ThePEG::PDT::Colour &pd)
Return true, if singlet.
map< size_t, vector< ColourFlow > > theFlows
Colour flows indexed by basis size; note this is a unique assignment.
static bool isAdjoint(const ThePEG::PDT::Colour &pd)
Return true, if adjoint.