PYTHIA  8.312
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TrialGenerator Class Reference

Base class for trial generators. More...

#include <VinciaTrialGenerators.h>

Inheritance diagram for TrialGenerator:
TrialGeneratorFF TrialGeneratorIF TrialGeneratorII TrialGeneratorRF

Public Member Functions

 TrialGenerator (bool isSectorIn, TrialGenType trialGenTypeIn, BranchType branchTypeIn, ZetaGeneratorSet *zetaGenSet)
 Main constructor.
 
virtual ~TrialGenerator ()=default
 Destructor.
 
void setupZetaGens (ZetaGeneratorSet *zetaGenSet)
 Set pointers to zetaGenerators. More...
 
virtual void reset (double Q2min, double s, const vector< double > &masses, enum AntFunType antFunType, double xA=1., double xB=1.)
 Re-calculate the current zeta limits and integrals. More...
 
virtual double genQ2 (double Q2MaxNow, Rndm *rndmPtr, const EvolutionWindow *evWindowPtrIn, double colFac, double wtIn, Logger *loggerPtr, int verboseIn)
 Generate the next trial scale. More...
 
virtual bool genInvariants (double sAnt, const vector< double > &masses, vector< double > &invariants, Rndm *rndmPtr, Logger *loggerPtr, int verboseIn)
 Get the invariants. More...
 
virtual double aTrial (vector< double > &invariants, const vector< double > &masses, int verboseIn)
 Calculate the trial based on invariants and saved quantities. More...
 
virtual double aTrialStrip (vector< double > &invariants, const vector< double > &masses, int verboseIn)
 Calculate the colour and coupling stripped antenna function. More...
 
virtual void resetTrial ()
 Delete the current trial. More...
 
virtual void needsNewTrial ()
 Mark trial as used.
 
int getSector ()
 Return the sector.
 

Protected Member Functions

virtual void calcKallenFac (double, const vector< double > &)
 Calculate the Kallen factor.
 
virtual void calcRpdf (const vector< double > &)
 Calculate the PDF ratio.
 
void addGenerator (ZetaGeneratorSet *zetaGenSet, Sector sector=Sector::Default)
 TrialGenerator base class functions. More...
 

Protected Attributes

bool isInit {false}
 True when init succeeds.
 
const bool isSector
 Information set at construction.
 
const TrialGenType trialGenTypeSav
 
const BranchType branchType
 
double kallenFacSav {1.}
 Common prefactors to the trial integral.
 
double Rpdf {1.}
 
double sAntSav {}
 Information about the antenna.
 
vector< double > massesSav
 
bool hasTrial {false}
 Information about the trial.
 
double q2Sav {}
 
double colFacSav {}
 
const EvolutionWindowevWindowSav {}
 
Sector sectorSav
 
map< Sector, ZetaGeneratorPtr > zetaGenPtrs
 
map< Sector, pair< double, double > > zetaLimits
 Map from sector to the corresponding zeta phase-space limits.
 
map< Sector, double > IzSav
 Save the zeta integrals.
 
map< Sector, bool > isActiveSector
 Save which sectors are currently active.
 

Detailed Description

Base class for trial generators.

Member Function Documentation

void addGenerator ( ZetaGeneratorSet zetaGenSet,
Sector  sector = Sector::Default 
)
protected

TrialGenerator base class functions.

Add a zeta generator for a given sector.

double aTrial ( vector< double > &  invariants,
const vector< double > &  masses,
int  verboseIn 
)
virtual

Calculate the trial based on invariants and saved quantities.

Fetch colour and coupling stripped antenna function.

Multiply by colour factor.

Multiply by alphaS.

Print.

double aTrialStrip ( vector< double > &  invariants,
const vector< double > &  masses,
int  verboseIn 
)
virtual

Calculate the colour and coupling stripped antenna function.

Loop over sectors.

Skip inactive sectors.

Add contribution from this sector.

bool genInvariants ( double  sAnt,
const vector< double > &  masses,
vector< double > &  invariants,
Rndm rndmPtr,
Logger loggerPtr,
int  verboseIn 
)
virtual

Get the invariants.

Retrieve limits of zeta integral.

Generate a value of zeta.

Check that it is inside the physical limits. TODO fix xA and xB;

Check if we generated a physical zeta, now that we know Q2.

Calculate invariants from q2 and zeta.

double genQ2 ( double  Q2MaxNow,
Rndm rndmPtr,
const EvolutionWindow evWindowPtrIn,
double  colFac,
double  wtIn,
Logger loggerPtr,
int  verboseIn 
)
virtual

Generate the next trial scale.

Reset.

Save common variables.

Get multiplicative prefactors to trial integral.

Possible enhancement weights.

Fetch minimum q2 for this window.

Loop over sectors (generators).

Skip inactive sectors.

Re-calculate hull of current phase space limits for this window.

Save hull of limits.

Evaluate zeta integral. Note: do not multiply by anything, since used for veto below.

Get additional factors for zeta integral.

Check if phase space is closed.

Convert to global trial.

Now generate q2.

Optimise by checking narrower (physical) zeta hull after trial.

Get log of random number.

Fixed alphaS.

Use max possible value for alphaS.

Inverse of Q2 integral for fixed alphaS.

Calculate factors for running alphas.

Inverse of Q2 integral for running alphas.

If we dropped below window edge, just accept and continue.

Else check if we are inside the narrower zeta range defined by this q2.

Accept this range with probability IzPhys/Iz:

Update saved limits.

Safety check.

Winner so far.

Save which sector.

void reset ( double  Q2min,
double  s,
const vector< double > &  masses,
enum AntFunType  antFunType,
double  xA = 1.,
double  xB = 1. 
)
virtual

Re-calculate the current zeta limits and integrals.

Re-calculate the current zeta limits using absolute minimum q2. N.B. Base class doesn't use x fractions.

Throw away any stored trials.

Calculate common factors.

Loop over sectors (generators).

Check if this sector is active and save.

Calculate hull of current phase space limits.

Save hull of zeta limits.

void resetTrial ( )
virtual

Delete the current trial.

Clear all saved trial variables.

void setupZetaGens ( ZetaGeneratorSet zetaGenSet)

Set pointers to zetaGenerators.

Initialise the zeta generators.

Check for incompatible type.

Sector shower: add one generator per sector (if it exists).

For global FF and RF only one generator needed.

For global IF need two generators (initial-state leg sectorised).

For global II need three generators (initial-state legs sectorised).

Member Data Documentation

map<Sector, ZetaGeneratorPtr> zetaGenPtrs
protected

Map from sector to the correct zeta generator. (note these live inside a ZetaGeneratorSet)


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