thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ThePEG::RhoDMatrix Class Reference

The RhoDMatrix class is designed to implement the storage of the rho and D matrices which are required for the spin correlation algorithm. More...

#include <RhoDMatrix.h>

Public Member Functions

Standard constructors and destructors.
 RhoDMatrix ()=default
 Default constructor with undefined spin.
 
 RhoDMatrix (PDT::Spin inspin, bool average=true)
 Standard constructor giving the spin as 2s+1.
 
Access matrix elements.
Complex operator() (size_t ix, size_t iy) const
 Return an element of the matrix.
 
Complexoperator() (size_t ix, size_t iy)
 Set an element of the matrix.
 
void normalize ()
 renormalise the matrix so it has unit trace
 
void reset (bool average=true)
 Reset.
 

Access the spin.

enum  { MAXSPIN = 7 }
 Spin matrix size. More...
 
PDT::Spin _spin
 2s+1 for the particle.
 
size_t _ispin
 Storage of 2s+1 for speed.
 
std::array< std::array< Complex, MAXSPIN >, MAXSPIN > _matrix
 Storage for the matrix allowing up to spin 2 particles.
 
PDT::Spin iSpin () const
 Get the spin.
 
ostream & operator<< (ostream &os, const RhoDMatrix &rd)
 Output the spin density matrix for debugging purposes.
 

Detailed Description

The RhoDMatrix class is designed to implement the storage of the rho and D matrices which are required for the spin correlation algorithm.

The matrix stores the spin as 2s+1.

Author
Peter Richardson

Definition at line 28 of file RhoDMatrix.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Spin matrix size.

Definition at line 135 of file RhoDMatrix.h.

Constructor & Destructor Documentation

◆ RhoDMatrix()

ThePEG::RhoDMatrix::RhoDMatrix ( PDT::Spin  inspin,
bool  average = true 
)
inline

Standard constructor giving the spin as 2s+1.

The matrix starts out averaged, unless the second argument is false, when it is zeroed.

Definition at line 43 of file RhoDMatrix.h.

References _ispin, and _matrix.

Member Function Documentation

◆ iSpin()

PDT::Spin ThePEG::RhoDMatrix::iSpin ( ) const
inline

Get the spin.

The spin is returned as 2J+1 in units of hbar/2.

Definition at line 112 of file RhoDMatrix.h.

References _spin.

◆ normalize()

void ThePEG::RhoDMatrix::normalize ( )
inline

renormalise the matrix so it has unit trace

Definition at line 78 of file RhoDMatrix.h.

References _ispin, and _matrix.

◆ operator()() [1/2]

Complex & ThePEG::RhoDMatrix::operator() ( size_t  ix,
size_t  iy 
)
inline

Set an element of the matrix.

Definition at line 69 of file RhoDMatrix.h.

References _ispin, and _matrix.

◆ operator()() [2/2]

Complex ThePEG::RhoDMatrix::operator() ( size_t  ix,
size_t  iy 
) const
inline

Return an element of the matrix.

Definition at line 60 of file RhoDMatrix.h.

References _ispin, and _matrix.

◆ reset()

void ThePEG::RhoDMatrix::reset ( bool  average = true)
inline

Reset.

Definition at line 97 of file RhoDMatrix.h.

References _ispin, and _matrix.

Friends And Related Function Documentation

◆ operator<<

ostream & operator<< ( ostream &  os,
const RhoDMatrix rd 
)
friend

Output the spin density matrix for debugging purposes.

Definition at line 147 of file RhoDMatrix.h.

Member Data Documentation

◆ _ispin

size_t ThePEG::RhoDMatrix::_ispin
private

Storage of 2s+1 for speed.

Definition at line 130 of file RhoDMatrix.h.

Referenced by normalize(), operator()(), reset(), and RhoDMatrix().

◆ _matrix

std::array<std::array<Complex,MAXSPIN>,MAXSPIN> ThePEG::RhoDMatrix::_matrix
private

Storage for the matrix allowing up to spin 2 particles.

Definition at line 142 of file RhoDMatrix.h.

Referenced by normalize(), operator()(), reset(), and RhoDMatrix().

◆ _spin

PDT::Spin ThePEG::RhoDMatrix::_spin
private

2s+1 for the particle.

Definition at line 125 of file RhoDMatrix.h.

Referenced by iSpin().


The documentation for this class was generated from the following file: