PYTHIA  8.303
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
PartonLevel Class Reference

#include <PartonLevel.h>

Inheritance diagram for PartonLevel:
PhysicsBase

Public Member Functions

 PartonLevel ()=default
 Constructor.
 
bool init (TimeShowerPtr timesDecPtrIn, TimeShowerPtr timesPtrIn, SpaceShowerPtr spacePtrIn, RHadrons *rHadronsPtrIn, MergingHooksPtr mergingHooksPtr, PartonVertexPtr partonVertexPtrIn, StringIntPtr stringInteractionPtrIn, bool useAsTrial)
 Initialization of all classes at the parton level. More...
 
bool next (Event &process, Event &event)
 Generate the next parton-level process. More...
 
void setupShowerSys (Event &process, Event &event)
 Perform showers in resonance decay chains. (For special cases.) More...
 
bool resonanceShowers (Event &process, Event &event, bool skipForR)
 Handle showers in successive resonance decays. More...
 
bool wzDecayShowers (Event &event)
 Perform decays and showers of W and Z emitted in shower. More...
 
bool hasVetoed () const
 Tell whether failure was due to vetoing.
 
bool hasVetoedDiff () const
 
void accumulate ()
 Accumulate, print and reset statistics.
 
void statistics (bool reset=false)
 
void resetStatistics ()
 
void resetTrial ()
 Reset PartonLevel object for trial shower usage. More...
 
double pTLastInShower ()
 Provide the pT scale of the last branching in the shower.
 
int typeLastInShower ()
 Provide the type of the last branching in the shower.
 
bool canEnhanceTrial ()
 Check of any trial emissions could have been enhanced.
 
double getEnhancedTrialPT ()
 Get enhanced trial emission evolution variable.
 
double getEnhancedTrialWeight ()
 Get enhanced trial emission weight.
 
- 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
 

Public Attributes

BeamParticlebeamHadAPtr {}
 Spare copies of normal beam pointers.
 
BeamParticlebeamHadBPtr {}
 
TimeShowerPtr timesDecPtr {}
 Pointers to timelike showers for resonance decays and the rest.
 
TimeShowerPtr timesPtr {}
 
SpaceShowerPtr spacePtr {}
 Pointer to spacelike showers.
 

Protected Member Functions

virtual void onInitInfoPtr () override
 
- Protected Member Functions inherited from PhysicsBase
 PhysicsBase ()
 Default constructor.
 
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.
 

Additional Inherited Members

- Public Types inherited from PhysicsBase
enum  Status {
  INCOMPLETE = -1, COMPLETE = 0, CONSTRUCTOR_FAILED, INIT_FAILED,
  LHEF_END, LOWENERGY_FAILED, PROCESSLEVEL_FAILED, PROCESSLEVEL_USERVETO,
  MERGING_FAILED, PARTONLEVEL_FAILED, PARTONLEVEL_USERVETO, HADRONLEVEL_FAILED,
  CHECK_FAILED, OTHER_UNPHYSICAL, HEAVYION_FAILED
}
 Enumerate the different status codes the event generation can have.
 
- 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 PartonLevel class contains the top-level routines to generate the partonic activity of an event.

Member Function Documentation

bool init ( TimeShowerPtr  timesDecPtrIn,
TimeShowerPtr  timesPtrIn,
SpaceShowerPtr  spacePtrIn,
RHadrons rHadronsPtrIn,
MergingHooksPtr  mergingHooksPtr,
PartonVertexPtr  partonVertexPtrIn,
StringIntPtr  stringInteractionPtrIn,
bool  useAsTrial 
)

Initialization of all classes at the parton level.

Main routine to initialize the parton-level generation process.

Store other input pointers.

Reference to Settings.

Min bias and diffraction processes need special treatment.

Separate low-mass (unresolved) and high-mass (perturbative) diffraction.

Set whether photon inside lepton. Mode updated event-by-event.

Simplify initialization when only unresolved photons.

Show the copies of beam photon if found in ISR.

Need MPI initialization for soft QCD processes, even if only first MPI. But no need to initialize MPI if never going to use it.

Nature of MPI matching also used here for one case.

Initialise trial shower switch.

Merging initialization.

Flags for showers: ISR and FSR.

Flags for colour reconnection.

Some other flags.

Allow R-hadron formation.

Possibility to allow user veto during evolution.

Settings for vetoing of QCD emission for Drell-Yan weak boson production.

Possibility to set maximal shower scale in resonance decays.

Possibility to reconnect specifically for resonance decays.

Done with initialization only for FSR in resonance decays.

Make sure that photons are in resolved mode when mixing with unresolved before initializing MPIs.

Flag if lepton beams, and if non-resolved ones. May change main flags.

For ND events in lepton->gamma events no need to initialize MPIs for l+l-.

Set info and initialize the respective program elements.

Initialize MPIs for diffractive system, possibly photon beam from lepton, possibly VMD from photon.

Initialize hard diffraction with possible photon beams from leptons.

Initialize an MPI instance for resolved photons when necessary.

Photon-hadron.

Hadron-photon.

Photon-photon.

Succeeded, or not.

bool next ( Event process,
Event event 
)

Generate the next parton-level process.

Main routine to do the parton-level evolution.

Current event classification.

Default values for what is to come with diffraction.

Mark hard diffractive events to handle CR correctly.

The setup of the diffractive events can come after the first evolution.

Flag to check whether hard diffraction system is set up for the process.

Offset for the initiator position when photons from leptons.

Parton-level vetoes for matching and merging.

Update photon state according to beams set in processContainer.

Save if photoproduction from either side.

Save current photon mode when mixing processes.

Check if direct-photon + hadron to set hard system correctly.

Set up gamma+gamma/p subcollision. May fail due to extreme kinematics.

Prepare for a potential hard diffractive event.

Switch for the diffractive side to be considered.

Preliminary decision based on diffractive-to-inclusive PDF ratio. If Pomeron taken from side A(=1), then B is the diffractive system. If Pomeron taken from side B(=2), then A is the diffractive system. Do not check for diffraction if direct photons. Rescale the x values when photon from lepton and calculate PDFs wrt. photon beam.

No hard double diffraction yet, so randomly choose one of the sides.

Save diffractive values.

Discard all nondiffractive events if only diffractive sample is wanted.

Reset beam pointers and set event back to original frame.

Set up the diffractive system if run without MPI veto.

Allow for second loop if run with MPI veto.

Check if two subcollisions, from secondHard or Les Houches input.

nHardLoop counts how many hard-scattering subsystems are to be processed. Almost always 1, but elastic and low-mass diffraction gives 0, while double diffraction can give up to 2. Not to be confused with SecondHard.

Handle unresolved subsystems. Done if no resolved ones.

Set up the scattered photon if present before exiting.

Number of actual branchings.

Number of desired branchings, negative value means no restriction.

Store merging weight.

Reset event weight coming from enhanced branchings.

Loop to set up diffractive system if run with MPI veto.

Big outer loop to handle up to two systems (in double diffraction), but normally one. (Not indented in following, but end clearly marked.)

Classification of diffractive system: 1 = A, 2 = B, 3 = central.

Process and event records can be out of step for diffraction.

If you need to restore then do not throw existing diffractive system.

Allow special treatment of diffractive systems.

Prepare to do multiparton interactions; at new mass for diffraction.

Special case if nondiffractive: do hardest interaction.

Allow up to ten tries; failure possible for beam remnants. Main cause: inconsistent colour flow at the end of the day.

Reset flag, counters and max scales.

Reset nMPI and nISR for showers.

Reset parameters related to valence content and remnants of photon beam if ISR or MPI generated.

Identify hard interaction system for showers.

Optionally check for a veto after the hardest interaction.

Abort event if vetoed.

Check matching of process scale to maximum ISR/FSR/MPI scales.

Global recoil: reset counters and store locations of outgoing partons.

Set hard scale, maximum for showers and multiparton interactions.

Store the starting scale to use it for valence selection for gamma beam. In case of MPIs use the pT scale of the last one.

Potentially reset starting scales for matrix element merging.

Prepare the classes to begin the generation.

Impact parameter has now been chosen, but not usefully for diffraction. (Never chosen for low-mass diffraction, twice for double diffraction.)

Set up initial veto scale.

Begin evolution down in pT from hard pT scale.

Check whether the beam photon has unresolved during the evolution.

Find next pT value for FSR, MPI and ISR. Order calls to minimize time expenditure.

Potentially increase shower stopping scale for trial showers, to avoid accumulating low-pT emissions (and weights thereof)

No MPIs for unresolved photons.

Update information.

Allow a user veto. Only do it once, so remember to change pTveto.

Abort event if vetoed.

Do a multiparton interaction (if allowed).

Break for hard diffraction with MPI veto.

Reset beam pointers and set event back to original frame.

Update ISR and FSR dipoles.

Set maximal scales for next pT to pick.

Do an initial-state emission (if allowed).

If MPIs, construct the gamma->qqbar branching in beamRemnants.

Update FSR dipoles.

Rescatter: it is possible for kinematics to fail, in which case we need to restart the parton level processing.

Set maximal scales for next pT to pick.

Do a final-state emission (if allowed).

Update ISR dipoles.

Set maximal scales for next pT to pick.

If no pT scales above zero then nothing to be done.

Check for double counting for Drell-Yan weak production. Only look at the second emission.

Make sure id1 is weak boson, and check that there only is a single weak boson and no photons.

Check for angle between weak boson and quarks. (require final state particle to be a fermion)

Check for angle between recoiler and radiator, if it is a quark anti-quark pair or if the recoiler is a gluon.

Veto event if it does not belong to Drell-Yan production.

Optionally check for a veto after the first few interactions, or after the first few emissions, ISR or FSR, in the hardest system.

Abort event if vetoed.

Keep on evolving until nothing is left to be done.

Handle potential merging veto.

Simply check, and possibly reset weights.

End loop evolution down in pT from hard pT scale.

Do all final-state emissions if not already considered above.

Find largest scale for final partons.

Prepare all subsystems for evolution.

Set up initial veto scale.

Begin evolution down in pT from hard pT scale.

Allow a user veto. Only do it once, so remember to change pTveto.

Abort event if vetoed.

Do a final-state emission (if allowed).

If no pT scales above zero then nothing to be done.

Optionally check for a veto after the first few emissions.

Abort event if vetoed.

Handle potential merging veto.

Simply check, and possibly reset weights.

Keep on evolving until nothing is left to be done.

Handle veto after ISR + FSR + MPI, but before beam remnants and resonance decays, e.g. for MLM matching.

Perform showers in resonance decay chains before beams & reconnection.

Abort event if vetoed.

Reassign new decay products to original system, or else beam remnant handling would be confused by systems without incoming partons.

Perform decays and showers of W and Z emitted in shower. To do: check if W/Z emission is on in ISR or FSR??

User hook to reconnect colours specifically in resonance decays.

Find the first particle in the current diffractive system.

Change the first particle for hard diffraction.

Add beam remnants, including primordial kT kick and colour tracing.

If no problems then done.

Else restore and loop, but do not throw existing diffractive system.

Restore also the lepton beams if include photons.

End loop over ten tries. Restore from diffraction. Hopefully it worked.

Leave hard diffractive system properly if beam remnant failed.

Leave also photon from lepton framework.

End big outer loop to handle two systems in double diffraction.

If no additional MPI has been found then set up the diffractive system the first time around.

Do colour reconnection for non-diffractive events before resonance decays.

Perform showers in resonance decay chains after beams & reconnection.

Abort event if vetoed.

Perform decays and showers of W and Z emitted in shower. To do:check if W/Z emission is on in ISR or FSR??

User hook to reconnect colours specifically in resonance decays.

Store event properties. Not available for diffraction.

Do colour reconnection for resonance decays.

Leave diffractive events.

If inclusive sample wanted for MPI veto and nMPI > 1 then event is non-diffractive and we can break the loop.

Leave diffractive system properly.

End big outer loop to handle the setup of the diffractive system.

If beam photon unresolved during evolution remove the copies of the beam particle from the event record.

After parton level generation, add scattered leptons, restore the event.

Allow option for QED shower phase after remnants but before hadronisation Note: incoming leptons or photons may evolve as part of this phase.

Done.

virtual void onInitInfoPtr ( )
inlineoverrideprotectedvirtual

If an object needs to set up infoPtr for sub objects, override this and call registerSubObject for each object in question.

Reimplemented from PhysicsBase.

void resetTrial ( )

Reset PartonLevel object for trial shower usage.

Function to reset PartonLevel object for trial shower usage.

Clear input pointers.

Clear last branching return values.

bool resonanceShowers ( Event process,
Event event,
bool  skipForR 
)

Handle showers in successive resonance decays.

Prepare to start over from beginning for R-hadron decays.

Isolate next system to be processed, if anything remains.

Number of desired branchings, negative value means no restriction.

Vector to tell which junctions have already been copied

In first call (skipForR = true) skip over daughters of resonances that should form R-hadrons

In optional second call (skipForR = false) process decay chains inside R-hadrons.

Mother in hard process and in complete event (after shower).

Possibly trace across intermediate R-hadron state.

From now on mother counts as decayed.

Mother can have been moved by showering (in any of previous steps), so prepare to update colour and momentum information for system.

New colour reconnection can not handle late resonance decay of coloured particles so abort event.

Extract next partons from hard event into normal event record.

Currently outgoing ones should not count as decayed.

Update daughter and mother information.

Check if this parton came from a BNV (junction) decay in hard event.

Skip if we already decided we're going to copy this junction

Only consider junctions that can appear in decays.

Junction Kinds 1 and 2: all legs in final state

Loop over resonance-decay daughters

Must have at least 3 decay products

If three legs match

Junction Kinds 3 and 4: copy if initial-state leg matches this resonance.

Extra safety: Check if this junction has already been copied (e.g., in setupHardSys). If so, do not copy again.

Update colour and momentum information.

Sextet mothers have additional (negative) tag

Update vertex information.

Complete task of copying next subsystem into event record.

Copy down junctions from hard event into normal event record.

Check if this junction was already copied

Skip if not doing anything

Check for changed colors and update as necessary.

Mark junction as copied (to avoid later recopying)

Reset pT of last branching

Add new resonance-decay system (with empty beam slots).

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

Do parton showers inside subsystem: maximum scale by mother mass.

Set correct scale for trial showers.

Set correct scale for showers off multi-parton events when merging e+e- -> V -> jets.

Let prepare routine do the setup.

Number of actual branchings

Set up initial veto scale.

Begin evolution down in pT from hard pT scale.

Allow a user veto. Only do it once, so remember to change pTveto.

Abort event if vetoed.

Do a final-state emission (if allowed).

If no pT scales above zero then nothing to be done.

Optionally check for a veto after the first few emissions.

Abort event if vetoed.

Handle potential merging veto.

Simply check, and possibly reset weights.

Keep on evolving until nothing is left to be done.

No more systems to be processed. Set total number of emissions.

void setupShowerSys ( Event process,
Event event 
)

Perform showers in resonance decay chains. (For special cases.)

Set up the event for subsequent resonance decays and showers.

Reset event record to only contain line 0.

Initialize info needed for subsequent sequential decays + showers.

Add the hard subprocess partons to the event record.

Currently outgoing ones should not count as decayed.

Complete task of copying hard subsystem into event record.

Store participating partons as first set in list of all systems.

Copy junctions from process to event.

Resonance decay products may not have been copied from process to event yet. If so, do not add junctions associated with decays yet.

For junction types <= 4, check if final-state legs were copied.

Done.

bool wzDecayShowers ( Event event)

Perform decays and showers of W and Z emitted in shower.

Identify W/Z produced by a parton shower.

Do nothing if particle should not be decayed.

Map id_Z = 23 -> 93 and id_W = 24 -> 94, for separate decay settings. Let W/Z resonance decay. Restore correct identity and status codes.

FSR decays.

Identify fermion after W/Z emission.

Boosts to study decay in W/Z rest frame.

Emitter and recoiler in W/Z rest frame.

Always choose p4 as the particle and p5 as the anti-particle.

Decay daughters in W/Z rest frame. Always choose pDec1 as the particle and p2Dec as the anti-particle.

Couplings.

Z couplings: make use of initial fermion polarization if set.

W couplings.

Different needed kinematic variables.

Calculate constants needed in correction.

Find maximum value: try pDec1 and pDec2 = -pDec1 along +-x, +-y, +-z.

Evaluate matrix element and compare with current maximum.

Multiply by four to ensure maximum is an overestimate.

Iterate with new angles until weighting succeeds.

p2 is decay product, p3 is anti decay product, p4 is dipole particle, p5 is dipole anti particle. So far assumed that we always have qQ-dipole.

Calculate weight and compare with maximum weight.

If momenta rotated then store new ones.

ISR decays.

Identify mother of W/Z emission.

Boosts to study decay in W/Z rest frame.

Find recoiler.

Emitter and recoiler in W/Z rest frame.

Always choose p1 as the particle and p2 as the anti-particle. If no anti-particles just continue.

Decay daughters in W/Z rest frame. Always choose pDec1 as the particle and p2Dec as the anti-particle.

Couplings.

Z couplings: make use of initial fermion polarization if set.

W couplings.

Different needed kinematic variables.

Calculate constants needed in correction.

Find maximum value: try pDec1 and pDec2 = -pDec1 along +-x, +-y, +-z.

Evaluate matrix element and compare with current maximum.

Multiply by four to ensure maximum is an overestimate.

Iterate with new angles until weighting succeeds.

p2 is decay product, p3 is anti decay product, p4 is dipole particle, p5 is dipole anti particle. So far assumed that we always have qQ-dipole.

Calculate weight and compare with maximum weight.

If momenta rotated then store new ones.

Add new resonance-decay system (with empty beam slots).

Maximum shower scale set by mother mass.

Do parton showers inside subsystem.

Let prepare routine do the setup.

Begin evolution down in pT from hard pT scale.

Do a final-state emission (if allowed).

If no pT scales above zero then nothing to be done.

Keep on evolving until nothing is left to be done.

End loop over event to find W/Z gauge bosons.

Done.


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