herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey > Class Template Reference

Caching for amplitudes using spinor helicity techniques. More...

#include <AmplitudeCache.h>

Inheritance diagram for Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >:

Classes

struct  boolResetter
 Helper to reset flags. More...
 

Public Member Functions

 AmplitudeCache ()
 Constructor.
 
void nPoints (int n)
 Prepare for n-point amplitude.
 
int nPoints () const
 Return the number of points.
 
void amplitudeScale (Energy s) const
 Set the energy scale to obtain dimensionless quantities and flag all quantities to be recalculated.
 
void momentum (int k, const LorentzMomentum &p, bool getSpinors=true, Energy mass=ZERO) const
 Set the momentum for the k'th parton and its associated mass.
 
void reset () const
 Reset flags.
 
LorentzVector< double > momentum (int k) const
 Return the momentum for the k'th parton.
 
Energy amplitudeScale () const
 Get the energy scale to obtain dimensionless quantities and flag all quantities to be recalculated.
 
double mass (int k) const
 Return the mass associated to the k'th parton.
 
int crossingSign (int i) const
 Return the crossing sign for the i'th parton.
 
double crossingSign (int i, int j) const
 Return the crossing sign for the i'th and j'th parton.
 
double invariant (int i, int j) const
 Return (ij)
 
Complex plusProduct (int i, int j) const
 Return <ij>
 
Complex minusProduct (int i, int j) const
 Return [ij].
 
LorentzVector< ComplexplusCurrent (int i, int j) const
 Return <i|^|j].
 
LorentzVector< ComplexminusCurrent (int i, int j) const
 Return [i|^|j>
 
bool getAmplitude (const AmplitudeKey &key) const
 Return true, if the given amplitude needs to be recalculated.
 
void cacheAmplitude (Complex amp) const
 Cache an amplitude.
 
const ComplexcachedAmplitude () const
 Return a cached amplitude.
 
bool getCurrent (const AmplitudeKey &key) const
 Return true, if the given current needs to be recalculated.
 
void cacheCurrent (const LorentzVector< Complex > &curr) const
 Cache an current.
 
const LorentzVector< Complex > & cachedCurrent () const
 Return a cached current.
 

Private Types

enum  { MAX_N = 7, SYM_N = MAX_N*(MAX_N+1)/2 }
 Maximum N we can handle, SYM_N is storage size for a symmetric matrix of N * N elements.
 
typedef map< AmplitudeKey, pair< bool, Complex > > AmplitudeCacheMap
 
typedef map< AmplitudeKey, pair< bool, LorentzVector< Complex > > > CurrentCacheMap
 

Private Member Functions

size_t idx (size_t i, size_t j) const
 Helper function to index symmetric arrays, assumes i <= j. More...
 

Private Attributes

int theNPoints
 The number of points.
 
Energy theScale
 The energy scale to obtain dimensionless quantities.
 
array< double, MAX_N > theMasses
 Masses indexed by partons.
 
array< LorentzMomentum, MAX_N > theMomenta
 Momenta indexed by partons.
 
array< int, MAX_N > theCrossingSigns
 Crossing signs indexed by partons.
 
array< PlusSpinor, MAX_N > thePlusSpinors
 Plus spinors indexed by partons.
 
array< PlusConjugateSpinor, MAX_N > thePlusConjugateSpinors
 Plus conjugate spinors indexed by partons.
 
array< double, SYM_N > theInvariants
 Invariants indexed by partons.
 
array< bool, SYM_N > getInvariant
 Flag products to be recalculated.
 
array< Complex, SYM_N > thePlusProducts
 Spinor products indexed by partons.
 
array< bool, SYM_N > getPlusProduct
 Flag products to be recalculated.
 
array< LorentzVector< Complex >, SYM_N > thePlusCurrents
 Spinor currents indexed by partons.
 
array< bool, SYM_N > getPlusCurrent
 Flag currents to be recalculated.
 
AmplitudeCacheMap theCachedAmplitudes
 Cache intermediate amplitudes by index.
 
AmplitudeCacheMap::iterator theLastAmplitude
 The last query for a cached amplitude.
 
CurrentCacheMap theCachedCurrents
 Cache intermediate currents by index.
 
CurrentCacheMap::iterator theLastCurrent
 The last query for a cached current.
 

Detailed Description

template<typename AmplitudeKey>
class Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >

Caching for amplitudes using spinor helicity techniques.

Author
Simon Platzer

Definition at line 31 of file AmplitudeCache.h.

Member Function Documentation

◆ idx()

template<typename AmplitudeKey>
size_t Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::idx ( size_t  i,
size_t  j 
) const
inlineprivate

Helper function to index symmetric arrays, assumes i <= j.

Usual indexing function (N*i + j) corrected by triangle number for i-th row.

Definition at line 131 of file AmplitudeCache.h.


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