herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
MatrixElement
Matchbox
Utility
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
23
namespace
Herwig
{
24
25
using namespace
ThePEG
;
26
27
typedef
boost::numeric::ublas::vector<Complex>
CVector
;
28
29
30
37
class
DensityOperator
:
public
HandlerBase
{
38
39
public
:
40
44
DensityOperator
();
45
46
public
:
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
123
void
persistentOutput
(
PersistentOStream
& os)
const
;
124
130
void
persistentInput
(
PersistentIStream
& is,
int
version);
132
139
static
void
Init
();
140
141
protected
:
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
163
private
:
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
234
DensityOperator
&
operator=
(
const
DensityOperator
&) =
delete
;
235
236
};
237
238
}
239
240
#endif
/* Herwig_DensityOperator_H */
Herwig::DensityOperator
Here is the documentation of the DensityOperator class.
Definition:
DensityOperator.h:37
Herwig::DensityOperator::prepare
void prepare(const cPDVector &)
Prepare for the given sub process.
Herwig::DensityOperator::compareMomentum
bool compareMomentum(const Lorentz5Momentum &p, const Lorentz5Momentum &q)
Boosts a vector of momenta to the rest frame of the initial pair.
Herwig::DensityOperator::boostToRestFrame
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...
Herwig::DensityOperator::colourMatrixElementCorrection
double colourMatrixElementCorrection(const std::tuple< size_t, size_t, long > &ikemission, const cPDVector &particles)
Calculate the colour matrix element correction.
Herwig::DensityOperator::operator=
DensityOperator & operator=(const DensityOperator &)=delete
The assignment operator is private and must never be called.
Herwig::DensityOperator::theColourBasis
Ptr< ColourBasis >::ptr theColourBasis
Colour basis used.
Definition:
DensityOperator.h:228
Herwig::DensityOperator::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::DensityOperator::prodDenseSparse
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,...
Herwig::DensityOperator::theCorrelatorMap
map< pair< vector< PDT::Colour >, pair< size_t, size_t > >, double > theCorrelatorMap
Mapping of colour structures and legs to colour correlators.
Definition:
DensityOperator.h:217
Herwig::DensityOperator::Init
static void Init()
The standard Init function used to initialize the interfaces.
Herwig::DensityOperator::theColourBasisToColourBasisMap
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...
Definition:
DensityOperator.h:223
Herwig::DensityOperator::correlatorMap
const map< pair< vector< PDT::Colour >, pair< size_t, size_t > >, double > & correlatorMap() const
Get the correlator map.
Definition:
DensityOperator.h:113
Herwig::DensityOperator::DensityOperator
DensityOperator()
The default constructor.
Herwig::DensityOperator::theDensityOperatorMap
map< vector< PDT::Colour >, matrix< Complex > > theDensityOperatorMap
Mapping of colour structures to density operator matrices.
Definition:
DensityOperator.h:212
Herwig::DensityOperator::prodSparseDense
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...
Herwig::DensityOperator::Nc
double Nc
Number of colours used in colourNorm.
Definition:
DensityOperator.h:168
Herwig::DensityOperator::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Herwig::DensityOperator::colourNorm
double colourNorm(const cPDPtr particle)
Normalization of colour charges \mathbf{T}_{ij}^2.
Herwig::DensityOperator::evolve
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,...
Herwig::DensityOperator::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Herwig::DensityOperator::clear
void clear()
Clears theDensityOperatorMap.
Herwig::DensityOperator::TR
double TR
QCD vertex normalization.
Definition:
DensityOperator.h:173
Herwig::DensityOperator::colourBasis
Ptr< ColourBasis >::tptr colourBasis()
Get the colour basis.
Definition:
DensityOperator.h:98
Herwig::DensityOperator::colourConservation
void colourConservation(const cPDVector &particles)
Checking colour conservation for the colour matrix element corrections.
Herwig::DensityOperator::fill
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.
Herwig::DensityOperator::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::DensityOperator::colourBasis
const Ptr< ColourBasis >::tptr colourBasis() const
Get the colour basis.
Definition:
DensityOperator.h:103
Herwig::DensityOperator::colourBasis
void colourBasis(Ptr< ColourBasis >::ptr ptr)
Set the colour basis.
Definition:
DensityOperator.h:108
ThePEG::HandlerBase
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig::CVector
boost::numeric::ublas::vector< Complex > CVector
Define complex vector from boost::uBLAS.
Definition:
DensityOperator.h:27
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::Complex
std::complex< double > Complex
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::cPDPtr
ThePEG::Ptr< ParticleData >::const_pointer cPDPtr
ThePEG::cPDVector
vector< cPDPtr > cPDVector
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6