PYTHIA  8.303
Public Member Functions | Friends | List of all members
VinciaFSR Class Reference

#include <VinciaFSR.h>

Inheritance diagram for VinciaFSR:
TimeShower PhysicsBase

Public Member Functions

 VinciaFSR ()
 ~VinciaFSR ()
void init (BeamParticle *beamAPtrIn=0, BeamParticle *beamBPtrIn=0) override
 Initialize alphaStrong and related pTmin parameters (TimeShower). More...
bool limitPTmax (Event &event, double Q2Fac=0., double Q2Ren=0.) override
 Possible limitation of first emission (TimeShower). More...
int shower (int iBeg, int iEnd, Event &event, double pTmax, int nBranchMax=0) override
int showerQED (int iBeg, int iEnd, Event &event, double pTmax) override
 Method to add QED showers in hadron decays (TimeShower). More...
int showerQEDafterRemnants (Event &event) override
void prepare (int iSys, Event &event, bool limitPTmaxIn) override
 Prepare system for evolution (TimeShower). More...
void update (int iSys, Event &event, bool hasWeakRad=false) override
 Update antenna list after each ISR emission (TimeShower). More...
double pTnext (Event &event, double pTbegAll, double pTendAll, bool isFirstTrial=false, bool doTrialIn=false) override
 Select next pT in downwards evolution (TimeShower). More...
bool branch (Event &event, bool isInterleaved=false) override
 Branch event, including accept/reject veto (TimeShower). More...
void list () const override
 Utility to print antenna list; for debug mainly (TimeShower). More...
int system () const override
 Tell which system was the last processed one (TimeShower). More...
double enhancePTmax () override
double pTLastInShower () override
void initVinciaPtrs (Colour *colourPtrIn, shared_ptr< VinciaISR > isrPtrIn, QEDShower *qedPtrIn, MECs *mecsPtrIn, Resolution *resolutionPtrIn, VinciaCommon *vinComPtrIn, VinciaWeights *vinWeightsPtrIn)
 Initialise pointers to Vincia objects. More...
void initAntPtr (AntennaSetFSR *antSetIn)
 Initialize pointers to antenna sets.
AntennaFunctiongetAnt (int iAnt)
 Wrapper function to return a specific antenna inside an antenna set.
vector< int > getIant ()
 Wrapper to return all iAntSav that are contained in antSetPtr.
void header ()
 Print header information (version, settings, parameters, etc.). More...
void printInfo (bool pluginCall=false)
 Print final statistics information. More...
void printHistos ()
 Print internal and diagnostic histrograms.
void writeHistos (string fileName="vincia", string suffix="dat")
 Write internal and diagnostic histrograms to file.
const HistgetDiagnosticHistogram (string name)
 Get diagnostic histogram.
int getNsys ()
 Get number of systems.
int getNbranch (int iSys=-1)
double getQbranch (int iSys, int iBranch)
double getPTphys (int iSys, int iBranch)
void doforceQuit (int nBranchQuitIn)
 Force quit from shower.
void setDiagnostics (shared_ptr< VinciaDiagnostics > diagnosticsPtrIn)
 Set the diagnostics pointer.
bool check (Event &event)
 Check event.
void setVerbose (int verboseIn)
 Set verbosity level.
- Public Member Functions inherited from TimeShower
 TimeShower ()=default
virtual ~TimeShower ()
void initPtrs (MergingHooksPtr mergingHooksPtrIn, PartonVertexPtr partonVertexPtrIn, WeightContainer *weightContainerPtrIn)
void reassignBeamPtrs (BeamParticle *beamAPtrIn, BeamParticle *beamBPtrIn, int beamOffsetIn=0)
 New beams possible for handling of hard diffraction. (Not virtual.)
virtual void prepareGlobal (Event &)
virtual void rescatterUpdate (int, Event &)
virtual bool initUncertainties ()
 Initialize data members for calculation of uncertainty bands.
virtual bool getHasWeaklyRadiated ()
 Tell whether FSR has done a weak emission.
virtual Event clustered (const Event &, int, int, int, string)
 Return clustering kinematics - as needed for merging. More...
virtual map< string, double > getStateVariables (const Event &, int, int, int, string)
virtual bool isTimelike (const Event &, int, int, int, string)
virtual vector< string > getSplittingName (const Event &, int, int, int)
virtual double getSplittingProb (const Event &, int, int, int, string)
virtual bool allowedSplitting (const Event &, int, int)
virtual vector< int > getRecoilers (const Event &, int, int, string)
- Public Member Functions inherited from PhysicsBase
void initInfoPtr (Info &infoPtrIn)
 This function is called from above for physics objects used in a run. More...
virtual ~PhysicsBase ()
 Empty virtual destructor.
bool flag (string key) const
 Shorthand to read settings values.
int mode (string key) const
double parm (string key) const
string word (string key) const


class VinciaISR
 Allow VinciaISR to access private information.

Additional Inherited Members

- Public Types inherited from PhysicsBase
enum  Status {
 Enumerate the different status codes the event generation can have.
- Public Attributes inherited from TimeShower
MergingHooksPtr mergingHooksPtr {}
 Pointer to MergingHooks object for NLO merging.
WeightContainerweightContainerPtr {}
- Protected Member Functions inherited from PhysicsBase
 PhysicsBase ()
 Default constructor.
virtual void onInitInfoPtr ()
virtual void onBeginEvent ()
 This function is called in the very beginning of each Pythia::next call.
virtual void onEndEvent (Status)
virtual void onStat ()
 This function is called from the Pythia::stat() call.
void registerSubObject (PhysicsBase &pb)
 Register a sub object that should have its information in sync with this.
- Protected Attributes inherited from TimeShower
int beamOffset {}
 Beam location offset in event.
PartonVertexPtr partonVertexPtr {}
 Pointer to assign space-time vertices during parton evolution.
bool doUncertainties {}
 Store uncertainty variations relevant to TimeShower.
bool uVarMuSoftCorr {}
bool uVarMPIshowers {}
bool noResVariations {}
bool noProcVariations {}
int nUncertaintyVariations {}
int nVarQCD {}
int uVarNflavQ {}
double dASmax {}
double cNSpTmin {}
double uVarpTmin2 {}
double overFactor {}
map< int, double > varG2GGmuRfac
map< int, double > varQ2QGmuRfac
map< int, double > varG2QQmuRfac
map< int, double > varX2XGmuRfac
map< int, double > varG2GGcNS
map< int, double > varQ2QGcNS
map< int, double > varG2QQcNS
map< int, double > varX2XGcNS
map< int, double > * varPDFplus
map< int, double > * varPDFminus
map< int, double > * varPDFmember
- Protected Attributes inherited from PhysicsBase
InfoinfoPtr = {}
SettingssettingsPtr = {}
 Pointer to the settings database.
ParticleDataparticleDataPtr = {}
 Pointer to the particle data table.
HadronWidthshadronWidthsPtr = {}
 Pointer to the hadron widths data table.
RndmrndmPtr = {}
 Pointer to the random number generator.
CoupSMcoupSMPtr = {}
 Pointers to SM and SUSY couplings.
CoupSUSYcoupSUSYPtr = {}
BeamParticlebeamAPtr = {}
BeamParticlebeamBPtr = {}
BeamParticlebeamPomAPtr = {}
BeamParticlebeamPomBPtr = {}
BeamParticlebeamGamAPtr = {}
BeamParticlebeamGamBPtr = {}
BeamParticlebeamVMDAPtr = {}
BeamParticlebeamVMDBPtr = {}
PartonSystemspartonSystemsPtr = {}
 Pointer to information on subcollision parton locations.
SigmaTotalsigmaTotPtr = {}
 Pointer to the total/elastic/diffractive cross sections.
set< PhysicsBase * > subObjects
UserHooksPtr userHooksPtr

Detailed Description

The VinciaFSR class for resonant decays. Inherits from TimeShower in Pythia 8 so can be used as alternative to TimeShower. Methods that must replace ones in TimeShower are marked with override.

Member Function Documentation

bool branch ( Event event,
bool  isInterleaved = false 

Branch event, including accept/reject veto (TimeShower).

Verbose output.

Hand off QED branchings to QED brancher.

Now handle QCD branchings.

Mark this trial as used so we do not risk reusing it.

Find out which branching type we are doing.

Count up global number of attempted trials.

Decide whether to accept the trial. Store new particles in pNew if keeping.

Update event record, add new daughters. Make a copy of the event to update (may want to veto)! Make a copy of junction info.

Possibility to allow user veto of emission step.

Everything accepted -> overwrite original event.

Update partonSystems.

Check momentum conservation.

Update antennae.

If diagnostic histograms are on, write in the branching scale.

Count the number of branchings in the system.

Do user-defined diagnostics.

Check the event after each branching.

Statistics for first 10 branchings in first 4 systems

Force stop by user (debugging only).


Reimplemented from TimeShower.

double enhancePTmax ( )

Potential enhancement factor of pTmax scale for hardest emission. Used if limitPTmax = true (TimeShower).

Reimplemented from TimeShower.

int getNbranch ( int  iSys = -1)

Get number of branchings in a system (return -1 if no such system). If iSys < 0, sum over all.

double getQbranch ( int  iSys,
int  iBranch 

Get scale of branchings; use (0,1) for first branching in 1st system. Could be extended so (i,0) would return starting scale for system i.

void header ( )

Print header information (version, settings, parameters, etc.).

Must be initialised before printing header.

Avoid printing header several times.

Print header information about shower.

Print header information about alphaS

Print header information about IR regularization.

Information about QED shower, so far main switches only.

Print header information about antenna functions.

FF and RF antennae.

Print antenna name.

Print colour/charge factor.

Put asterisk next to QG colour factor if using -1/NC2 correction.

II and IF antennae.

Print antenna name.

Print colour/charge factor.

Print header information about matrix-element Corrections.

Print references.

void init ( BeamParticle beamAPtrIn = 0,
BeamParticle beamBPtrIn = 0 

Initialize alphaStrong and related pTmin parameters (TimeShower).

The VinciaFSR class for resonant decays.

The following methods control main flow of shower and are inherited from TimeShower. Any method re-implementing a TimeShower method is appended with (TimeShower).

Initialize alphaStrong and related pTmin parameters (TimeShower).

Check if already initialized.

Event counters and debugging. Set nAccepted to -1, so prepare works properly.

Showers on/off.

TODO: everything is evolved in PT in this version of VINCIA.

Store input pointers for future use.

Assume all events in same run have same beam-beam ECM.

Possibility to allow user veto of emission step.

Number of active quark flavours

Number of flavours to be treated as massless (can be made user-specifiable in future if desired).

Global flag for helicity dependence.

Global flag for sector showers on/off.

Perturbative cutoff. Since emissions and splittings can have different evolution measures, in principle allow for different cutoff scales, for now forced same.

Allow perturbative g->qq splittings to lower scales.

Set shower alphaS pointer.

Currently, CMW is applied to both emissions and splittings.

AlphaS parameters.

Smallest allowed scale for running alphaS.

For constant alphaS, set max = value (for efficiency).

Settings for enhanced (biased) kernels.

Explicitly allow heavy-quark enhancements only, not suppression

Resize pAccept to the maximum number of elements.


Initialize parameters for shower starting scale.

Initialize the FSR antenna functions.

Initialise the QED shower module if not done already.


Reimplemented from TimeShower.

void initVinciaPtrs ( Colour colourPtrIn,
shared_ptr< VinciaISR isrPtrIn,
QEDShower qedPtrIn,
MECs mecsPtrIn,
Resolution resolutionPtrIn,
VinciaCommon vinComPtrIn,
VinciaWeights vinWeightsPtrIn 

Initialise pointers to Vincia objects.

The following methods for merging not yet implemented in Vincia: Event clustered() map<string, double> getStateVariables (const Event &, int, int, int, string) bool isTimelike() vector<string> getSplittingName() double getSplittingProb() bool allowedSplitting() vector<int> getRecoilers() The remaining public functions Vincia only, i.e. not inherited from Pythia 8.

bool limitPTmax ( Event event,
double  Q2Fac = 0.,
double  Q2Ren = 0. 

Possible limitation of first emission (TimeShower).

Possible limitation of first emission (TimeShower, last two arguments purely dummy in Vincia implementation). Determines if max pT limit should be imposed on first emission. Note, not set up to handle Pythia's explicit DPS processes yet.

Check if limiting pT of first emission.

Always restrict SoftQCD processes.

Look if jets or photons in final state of hard system (iSys = 0).

If no QCD/QED partons detected, allow to go to phase-space maximum

Reimplemented from TimeShower.

void list ( ) const

Utility to print antenna list; for debug mainly (TimeShower).

Loop over antenna list and print it.

Reimplemented from TimeShower.

void prepare ( int  iSys,
Event event,
bool  limitPTmaxIn 

Prepare system for evolution (TimeShower).

Used for global recoil scheme (TimeShower, no Vincia implementation yet). void prepareGlobal(Event&);

Set isPrepared to false every time prepare is called. Only reset back to true if method executes successfully.

Check if we are supposed to do anything

Last chance to print header if not done already.

Statistics (zero info on qBranch scales).

Counter for accepted events.

First time prepare is called for an event.

getCounter(3), number of times a Pythia::next() call has been begun.

Last event got accepted.

getCounter(10), number of times the selection of a new hard process has been begun. = 1 if no user hooks veto, > 1 if user hooks veto.

getCounter(14), number of times loop over parton- and hadron-level processing has begun for a hard process. = 1 if everything after user hooks veto is succesful, > 1 eg if hadron level fails.

Resetting for first time in new event.

Reset counters, weights in new events, and clear system information.

Allow to quit after a certain number of emissions per event (just for testing).

Sanity check: at least two particles in system.

Reset antenna list for first interaction and for resonance decays. We don't have a starting scale for this system yet.

After prepare we always have zero branchings.

Initialize polarisation flag (only consider final-state partons).

Note that we have not yet binned the first branching scale.

We are not creating new copies of the particles. Colour and polarization information may be changed or added, respectively, and masses may be set to zero for partons VINCIA wants to treat as massless.

Note, for 2->2 systems, ISR::prepare() is called before FRS::prepare() (if doISR) so ISR may already have done everything.

Ensure consistency between ISR + FSR lists.

If ISR::prepare() not called for this system, prepare it now.

Since ISR::prepare() not called, this will normally be a resonance decay system, but still no harm in checking explicitly.

Make sure iAncestor is recorded as iInA in the parton system (not standard usage in PYTHIA but useful in VINCIA).

Make light quarks (and initial-state partons) explicitly massless.

Then see if we know how to compute matrix elements for this conf.

Then see if and whether we can assign helicities.

Decide if we should be doing ME corrections for next order.

Then see if we should colourise this conf.

Find antennae.

Set starting scale for this system.

Let others know we got to the end.

Reimplemented from TimeShower.

void printInfo ( bool  pluginCall = false)

Print final statistics information.

Weight info.

double pTLastInShower ( )

Provide the pT scale of the last branching in the above shower (TimeShower).

Reimplemented from TimeShower.

double pTnext ( Event event,
double  pTbegAll,
double  pTendAll,
bool  isFirstTrial = false,
bool  doTrialIn = false 

Select next pT in downwards evolution (TimeShower).

Check if we are supposed to do anything.

Denote VINCIA scales by "q", PYTHIA ones by "pTevol".


Generate next gluon-emission trial scale (above qEndAll).

Generate next gluon-splitting trial scale and compare to current qWin.

Generate next resonance gluon-emission trial and compare to current qWin.

Generate nex resonance gluon-splitting trial and compare to current qWin.

Generate next QED trial scale and compare to current qWin.

Check for winning condition.

If non-zero branching scale found: continue.

No more branchings. Finalize.

TODO: add back. Need to make sure this is only done once per event. FSR is done; set the weights. weightsPtr->doWeighting();

If we have not yet binned a branching scale, bin 0 as the first branching scale.

Reimplemented from TimeShower.

int shower ( int  iBeg,
int  iEnd,
Event event,
double  pTmax,
int  nBranchMax = 0 

Top-level routine to do a full time-like shower in resonance decay (TimeShower).

Verbose output.

Add new system, automatically with two empty beam slots.

Verbose output.

Loop over allowed range to find all final-state particles.

Now need to clear all systems of antennae. Should be fine because shower() is only called in two cases: (1) showering off hadronic resonances as they decay (e.g. upsilon) (2) by user, in which case there should not be pre-existing systems.

Let prepare routine do the setup.

Begin evolution down in pT from hard pT scale.

Do a final-state emission (if allowed).

Keep on evolving until nothing is left to be done.

Return number of emissions that were performed.

Reimplemented from TimeShower.

int showerQED ( int  iBeg,
int  iEnd,
Event event,
double  pTmax 

Method to add QED showers in hadron decays (TimeShower).

Verbose output

Construct a little QED system out of the given particles.

We could check if they all have the same mother and treat as resonance decay, but currently do not.

Reimplemented from TimeShower.

int showerQEDafterRemnants ( Event event)

Method to add QED showers to partons below colour resolution scale (TimeShower).

Check if we are supposed to do anything.

Prepare for showering below hadronisation scale. Include partons from all current systems (pass iSys = -1).

Retrieve actual iSys.

Reimplemented from TimeShower.

int system ( ) const

Tell which system was the last processed one (TimeShower).

Initialize data members for calculation of uncertainty bands (TimeShower, no Vincia implementation yet). virtual bool initUncertainties(); Tell whether FSR has done a weak emission (TimeShower, no Vincia implementation yet.) virtual bool getHasWeaklyRadiated() {return hasWeaklyRadiated;}

Reimplemented from TimeShower.

void update ( int  iSys,
Event event,
bool  hasWeakRad = false 

Update antenna list after each ISR emission (TimeShower).

Update antenna list after a multiple interactions rescattering (TimeShower, no Vincia implementation yet). void rescatterUpdate( int iSys, Event& event);

Do nothing if not prepared for FSR.

Update QED system.

Count number of branches.

Particles in the list are already updated by ISR. Find and save all colours and anticolours; find all FF antennae.

In principle, the colour maps could here be used to look for any unmatched tags -> junctions.

Sanity check: can only shower QCD systems with more than 1 FF connection.

Update any final-state antennae with partons changed by ISR branching.

Update any antennae with legs that were modified by the ISR branching, i.e. whose current legs have been marked with status < 0.

Get new positions from indexOfCol, indexOfAcol (could also use daughter information from old i0, i1).

Update emitter.

Update lookup map and erase old keys.

Add new keys.

Update splitters.

Remove the antennae out of the list. This way we can check later if ISR added a new FF antenna i0/i1 is colour/anticolour.

Is there a FF connection left?

i0/iNew[0] is colour.

i1/iNew[2] is anticolour.

Don't include II or IF antennae.

Store new trial QCD gluon emission antenna.

Store new trial QCD gluon splitting antenna(e).

Sanity check.

Reimplemented from TimeShower.

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