herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
DensityOperator.h
1// -*- C++ -*-
2//
3// DensityOperator.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 2 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef Herwig_DensityOperator_H
10#define Herwig_DensityOperator_H
11//
12// This is the declaration of the DensityOperator class.
13//
14
15#include "ThePEG/Handlers/HandlerBase.h"
16
17#include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
18
19#include <tuple>
20#include <boost/numeric/ublas/matrix.hpp>
21#include <boost/numeric/ublas/vector.hpp>
22
23namespace Herwig {
24
25using namespace ThePEG;
26
27typedef boost::numeric::ublas::vector<Complex> CVector;
28
29
30
38
39public:
40
45
46public:
47
51 void clear();
52
56 void prepare(const cPDVector&);
57
62 void fill(const Ptr<MatchboxXComb>::ptr,
63 const cPDVector&, const vector<Lorentz5Momentum>& momenta);
64
71 void evolve(const map<pair<size_t,size_t>,Complex>& Vijk,
72 const cPDVector& before,
73 const cPDVector& after,
74 const map<std::tuple<size_t,size_t,size_t>,map<size_t,size_t> >& emissionsMap,
75 const bool splitAGluon,
76 const bool initialGluonSplitting);
77
87 double colourMatrixElementCorrection(const std::tuple<size_t,size_t,long>& ikemission,
88 const cPDVector& particles);
89
93 void colourConservation(const cPDVector& particles);
94
98 Ptr<ColourBasis>::tptr colourBasis() { return theColourBasis; }
99
103 const Ptr<ColourBasis>::tptr colourBasis() const { return theColourBasis; }
104
108 void colourBasis(Ptr<ColourBasis>::ptr ptr) { theColourBasis = ptr; }
109
113 const map<pair<vector<PDT::Colour>,pair<size_t,size_t> >,double>& correlatorMap() const {
114 return theCorrelatorMap;
115 }
116
124
130 void persistentInput(PersistentIStream & is, int version);
132
139 static void Init();
140
141protected:
142
149 virtual IBPtr clone() const;
150
155 virtual IBPtr fullclone() const;
157
158
159// If needed, insert declarations of virtual function defined in the
160// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
161
162
163private:
164
168 double Nc;
169
173 double TR;
174
178 double colourNorm(const cPDPtr particle);
179
185 matrix<Complex> prodSparseDense(const compressed_matrix<double>&,
186 const matrix<Complex>&);
193 matrix<Complex> prodDenseSparse(const matrix<Complex>&,
194 const compressed_matrix<double>&);
195
201 vector<Lorentz5Momentum> boostToRestFrame(const vector<Lorentz5Momentum>& momenta);
202
206 bool compareMomentum(const Lorentz5Momentum& p, const Lorentz5Momentum& q);
207
212 map<vector<PDT::Colour>,matrix<Complex> > theDensityOperatorMap;
213
217 map<pair<vector<PDT::Colour>,pair<size_t,size_t> >,double> theCorrelatorMap;
218
223 map<cPDVector, map<size_t,size_t> > theColourBasisToColourBasisMap;
224
228 Ptr<ColourBasis>::ptr theColourBasis;
229
235
236};
237
238}
239
240#endif /* Herwig_DensityOperator_H */
Here is the documentation of the DensityOperator class.
void prepare(const cPDVector &)
Prepare for the given sub process.
bool compareMomentum(const Lorentz5Momentum &p, const Lorentz5Momentum &q)
Boosts a vector of momenta to the rest frame of the initial pair.
vector< Lorentz5Momentum > boostToRestFrame(const vector< Lorentz5Momentum > &momenta)
Boosts a vector of momenta to the rest frame of the initial pair of particles (the first 2 elements o...
double colourMatrixElementCorrection(const std::tuple< size_t, size_t, long > &ikemission, const cPDVector &particles)
Calculate the colour matrix element correction.
DensityOperator & operator=(const DensityOperator &)=delete
The assignment operator is private and must never be called.
Ptr< ColourBasis >::ptr theColourBasis
Colour basis used.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
matrix< Complex > prodDenseSparse(const matrix< Complex > &, const compressed_matrix< double > &)
Fast evaluation of TijMn*Tkdagger, where a TijMn is the result from the method prodSparseDense,...
map< pair< vector< PDT::Colour >, pair< size_t, size_t > >, double > theCorrelatorMap
Mapping of colour structures and legs to colour correlators.
static void Init()
The standard Init function used to initialize the interfaces.
map< cPDVector, map< size_t, size_t > > theColourBasisToColourBasisMap
A map from the hard subprocess particles to a map of amplitude colour basis order to the normal order...
const map< pair< vector< PDT::Colour >, pair< size_t, size_t > >, double > & correlatorMap() const
Get the correlator map.
DensityOperator()
The default constructor.
map< vector< PDT::Colour >, matrix< Complex > > theDensityOperatorMap
Mapping of colour structures to density operator matrices.
matrix< Complex > prodSparseDense(const compressed_matrix< double > &, const matrix< Complex > &)
Fast evaluation of Tij*Mn, where a Tij is the matrix from ColourBasis::charge, which is a sparse matr...
double Nc
Number of colours used in colourNorm.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
double colourNorm(const cPDPtr particle)
Normalization of colour charges \mathbf{T}_{ij}^2.
void evolve(const map< pair< size_t, size_t >, Complex > &Vijk, const cPDVector &before, const cPDVector &after, const map< std::tuple< size_t, size_t, size_t >, map< size_t, size_t > > &emissionsMap, const bool splitAGluon, const bool initialGluonSplitting)
Evolve the density operator, by M_{n+1} = -\sum_{i,k}{-4*pi*alpha_s/Ti2*V_{ij,k} T_{i,...
virtual IBPtr clone() const
Make a simple clone of this object.
void clear()
Clears theDensityOperatorMap.
double TR
QCD vertex normalization.
Ptr< ColourBasis >::tptr colourBasis()
Get the colour basis.
void colourConservation(const cPDVector &particles)
Checking colour conservation for the colour matrix element corrections.
void fill(const Ptr< MatchboxXComb >::ptr, const cPDVector &, const vector< Lorentz5Momentum > &momenta)
Fill the density operator for the given hard subprocess, summing over all helicity configurations.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
const Ptr< ColourBasis >::tptr colourBasis() const
Get the colour basis.
void colourBasis(Ptr< ColourBasis >::ptr ptr)
Set the colour basis.
boost::numeric::ublas::vector< Complex > CVector
Define complex vector from boost::uBLAS.
-*- C++ -*-
std::complex< double > Complex
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::Ptr< ParticleData >::const_pointer cPDPtr
vector< cPDPtr > cPDVector