herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
ColourFlowBasis.h
1 // -*- C++ -*-
2 //
3 // ColourFlowBasis.h is a part of CVolver
4 // Copyright (C) 2013-2017 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) const;
122 
127  virtual bool haveColourFlows() const { return true; }
128 
133  virtual bool colourConnected(const cPDVector&,
134  const vector<PDT::Colour>&,
135  const pair<int,bool>&,
136  const pair<int,bool>&,
137  size_t) const;
138 
139 public:
140 
147  void persistentOutput(PersistentOStream & os) const;
148 
154  void persistentInput(PersistentIStream & is, int version);
156 
163  static void Init();
164 
165 protected:
166 
173  virtual IBPtr clone() const;
174 
179  virtual IBPtr fullclone() const;
181 
182 
183 // If needed, insert declarations of virtual function defined in the
184 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
185 
186 private:
187 
191  map<vector<PDT::Colour>,ColourFlowCrossing> theCrossings;
192 
197  map<size_t,vector<ColourFlow> > theFlows;
198 
199 private:
200 
205  ColourFlowBasis & operator=(const ColourFlowBasis &) = delete;
206 
207 };
208 
209 }
210 
211 #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:45
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.