Herwig 7.3.0
|
Caching for amplitudes using spinor helicity techniques. More...
#include <AmplitudeCache.h>
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< Complex > | plusCurrent (int i, int j) const |
Return <i|\gamma^\mu|j]. | |
LorentzVector< Complex > | minusCurrent (int i, int j) const |
Return [i|\gamma^\mu|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 Complex & | cachedAmplitude () 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. More... | |
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. | |
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. | |
Caching for amplitudes using spinor helicity techniques.
Definition at line 31 of file AmplitudeCache.h.
|
private |
Definition at line 33 of file AmplitudeCache.h.
|
private |
Definition at line 34 of file AmplitudeCache.h.
|
private |
Maximum N we can handle, SYM_N is storage size for a symmetric matrix of N * N elements.
Definition at line 39 of file AmplitudeCache.h.
|
inline |
Constructor.
Definition at line 152 of file AmplitudeCache.h.
|
inline |
Get the energy scale to obtain dimensionless quantities and flag all quantities to be recalculated.
Definition at line 196 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theScale.
|
inline |
Cache an amplitude.
Definition at line 300 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theLastAmplitude.
|
inline |
Cache an current.
Definition at line 327 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theLastCurrent.
|
inline |
Return a cached amplitude.
Definition at line 307 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theLastAmplitude.
|
inline |
Return a cached current.
Definition at line 334 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theLastCurrent.
|
inline |
Return the crossing sign for the i'th parton.
Definition at line 207 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theCrossingSigns.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::minusProduct(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusCurrent().
|
inline |
Return the crossing sign for the i'th and j'th parton.
Definition at line 213 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theCrossingSigns.
|
inline |
Return true, if the given amplitude needs to be recalculated.
Definition at line 288 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theCachedAmplitudes, and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theLastAmplitude.
|
inline |
Return true, if the given current needs to be recalculated.
Definition at line 315 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theCachedCurrents, and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theLastCurrent.
|
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.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::invariant(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusCurrent(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusProduct().
|
inline |
Return (ij)
Definition at line 218 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::getInvariant, Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::idx(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::momentum(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theInvariants.
|
inline |
Return the mass associated to the k'th parton.
Definition at line 201 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theMasses.
|
inline |
Return [i|\gamma^\mu|j>
Definition at line 278 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusCurrent().
|
inline |
Return [ij].
Definition at line 249 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::crossingSign(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusProduct().
|
inline |
Return the momentum for the k'th parton.
Definition at line 190 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theMomenta, and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theScale.
|
inline |
Return the number of points.
Definition at line 162 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theNPoints.
|
inline |
Return <i|\gamma^\mu|j].
Definition at line 258 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::crossingSign(), Herwig::SpinorHelicity::SpinorCurrent< Type, Value >::eval(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::getPlusCurrent, Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::idx(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::momentum(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theMomenta, Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::thePlusConjugateSpinors, Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::thePlusCurrents, and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theScale.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::minusCurrent().
|
inline |
Return <ij>
Definition at line 231 of file AmplitudeCache.h.
References Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::getPlusProduct, Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::idx(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::thePlusConjugateSpinors, Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::thePlusProducts, Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::thePlusSpinors, and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::theScale.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::minusProduct().
|
mutableprivate |
Flag products to be recalculated.
Definition at line 85 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::invariant().
|
mutableprivate |
Flag currents to be recalculated.
Definition at line 105 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusCurrent().
|
mutableprivate |
Flag products to be recalculated.
Definition at line 95 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusProduct().
|
mutableprivate |
Cache intermediate amplitudes by index.
Definition at line 110 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::getAmplitude().
|
mutableprivate |
Cache intermediate currents by index.
Definition at line 120 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::getCurrent().
|
mutableprivate |
Crossing signs indexed by partons.
Definition at line 65 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::crossingSign().
|
mutableprivate |
Invariants indexed by partons.
Definition at line 80 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::invariant().
|
mutableprivate |
The last query for a cached amplitude.
Definition at line 115 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::cacheAmplitude(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::cachedAmplitude(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::getAmplitude().
|
mutableprivate |
The last query for a cached current.
Definition at line 125 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::cacheCurrent(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::cachedCurrent(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::getCurrent().
|
mutableprivate |
Masses indexed by partons.
Definition at line 55 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::mass().
|
mutableprivate |
Momenta indexed by partons.
Definition at line 60 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::momentum(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusCurrent().
|
private |
The number of points.
Definition at line 44 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::nPoints().
|
mutableprivate |
Plus conjugate spinors indexed by partons.
Definition at line 75 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusCurrent(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusProduct().
|
mutableprivate |
Spinor currents indexed by partons.
Definition at line 100 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusCurrent().
|
mutableprivate |
Spinor products indexed by partons.
Definition at line 90 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusProduct().
|
mutableprivate |
Plus spinors indexed by partons.
Definition at line 70 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusProduct().
|
mutableprivate |
The energy scale to obtain dimensionless quantities.
Definition at line 50 of file AmplitudeCache.h.
Referenced by Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::amplitudeScale(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::momentum(), Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusCurrent(), and Herwig::SpinorHelicity::AmplitudeCache< AmplitudeKey >::plusProduct().