PYTHIA  8.311
Public Member Functions | List of all members
ProcessContainer Class Reference

#include <ProcessContainer.h>

Inheritance diagram for ProcessContainer:
PhysicsBase

Public Member Functions

 ProcessContainer (SigmaProcessPtr sigmaProcessPtrIn=0, PhaseSpacePtr phaseSpacePtrIn=0)
 Constructor.
 
bool init (bool isFirst, ResonanceDecays *resDecaysPtrIn, SLHAinterface *slhaInterfacePtr, GammaKinematics *gammaKinPtrIn)
 Initialize phase space and counters. More...
 
void setLHAPtr (LHAupPtr lhaUpPtrIn, ParticleData *particleDataPtrIn=0, Settings *settingsPtrIn=0, Rndm *rndmPtrIn=0)
 Store or replace Les Houches pointer.
 
void updateBeamIDs ()
 Switch to new beam particle identities; for similar hadrons only.
 
void newECM (double eCM)
 Update the CM energy of the event.
 
bool trialProcess ()
 Generate a trial event; accepted or not. More...
 
bool constructState ()
 Pick flavours and colour flow of process. More...
 
bool constructProcess (Event &process, bool isHardest=true)
 Give the hard subprocess (with option for a second hard subprocess). More...
 
bool constructDecays (Event &process)
 Give the Les Houches decay chain for external resonance. More...
 
bool decayResonances (Event &process)
 Do resonance decays. More...
 
void accumulate ()
 Accumulate statistics after user veto. More...
 
void reset ()
 Reset statistics on events generated so far. More...
 
void setBeamModes (bool setVMD=false, bool isSampled=true)
 Set the photon modes according to the process. More...
 
string name () const
 Process name and code, and the number of final-state particles.
 
int code () const
 
int nFinal () const
 
bool isSUSY () const
 
bool isNonDiffractive () const
 
bool isSoftQCD () const
 
bool isElastic () const
 
bool newSigmaMax () const
 Member functions for info on generation process.
 
double sigmaMax () const
 
long nTried () const
 
long nSelected () const
 
long nAccepted () const
 
double weightSum () const
 
double sigmaSelMC (bool doAccumulate=true)
 
double sigmaMC (bool doAccumulate=true)
 
double deltaMC (bool doAccumulate=true)
 
double sigmaMaxSwitch ()
 New value for switched beam identity or energy (for SoftQCD processes).
 
int id1 () const
 Some kinematics quantities.
 
int id2 () const
 
double x1 () const
 
double x2 () const
 
double Q2Fac () const
 
double mHat () const
 
double pTHat () const
 
bool isLHAContainer () const
 Tell whether container is for Les Houches events.
 
int lhaStrategy () const
 
int codeLHASize () const
 Info on Les Houches events.
 
int subCodeLHA (int i) const
 
long nTriedLHA (int i) const
 
long nSelectedLHA (int i) const
 
long nAcceptedLHA (int i) const
 
void isSame (bool isSameIn)
 When two hard processes set or get info whether process is matched.
 
bool isSame () const
 
- 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
 
vector< bool > fvec (string key) const
 
vector< int > mvec (string key) const
 
vector< double > pvec (string key) const
 
vector< string > wvec (string key) const
 

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, HADRONLEVEL_USERVETO
}
 Enumerate the different status codes the event generation can have.
 
- 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 PhysicsBase
InfoinfoPtr = {}
 
SettingssettingsPtr = {}
 Pointer to the settings database.
 
ParticleDataparticleDataPtr = {}
 Pointer to the particle data table.
 
LoggerloggerPtr = {}
 Pointer to logger.
 
HadronWidthshadronWidthsPtr = {}
 Pointer to the hadron widths data table.
 
RndmrndmPtr = {}
 Pointer to the random number generator.
 
CoupSMcoupSMPtr = {}
 Pointers to SM and SUSY couplings.
 
CoupSUSYcoupSUSYPtr = {}
 
BeamSetupbeamSetupPtr = {}
 
BeamParticlebeamAPtr = {}
 
BeamParticlebeamBPtr = {}
 
BeamParticlebeamPomAPtr = {}
 
BeamParticlebeamPomBPtr = {}
 
BeamParticlebeamGamAPtr = {}
 
BeamParticlebeamGamBPtr = {}
 
BeamParticlebeamVMDAPtr = {}
 
BeamParticlebeamVMDBPtr = {}
 
PartonSystemspartonSystemsPtr = {}
 Pointer to information on subcollision parton locations.
 
SigmaTotalsigmaTotPtr = {}
 Pointers to the total/elastic/diffractive cross sections.
 
SigmaCombinedsigmaCmbPtr = {}
 
set< PhysicsBase * > subObjects
 
UserHooksPtr userHooksPtr
 

Detailed Description

The ProcessContainer class combines pointers to matrix element and phase space generator with general generation info.

Member Function Documentation

void accumulate ( )

Accumulate statistics after user veto.

Accumulate statistics after user veto, including LHA code.

Only update for non-vanishing weight - vanishing weight means event should not count as accepted.

infoPtr->weight() performs coversion to pb if lhaStratAbs = 4

bool constructDecays ( Event process)

Give the Les Houches decay chain for external resonance.

Give the hard resonance decay chain from Les Houches input. Note: mildly modified copy of some constructProcess code; to streamline.

Let hard process record begin with the event as a whole.

Since LHA partons may be out of order, determine correct one. (Recall that zeroth particle is empty.)

For iNew == 0 look for the two incoming partons, then for partons having them as mothers, and so on layer by layer.

Find scale from which to begin MPI/ISR/FSR evolution.

Copy over info from LHA event to process, in proper order.

Translate from LHA status codes.

Find where mothers have been moved by reordering.

Ensure that second mother = 0 except for bona fide carbon copies.

Find daughters and where they have been moved by reordering.

For 2 -> 1 hard scatterings reset second daughter to 0.

Colour trivial, except reset irrelevant colour indices.

Momentum trivial.

Polarization.

For resonance decay products use resonance mass as scale.

Store Les Houches Accord partons.

Check if need to store lifetime.

Update four-momentum of system as a whole.

Loop through decay chains and set secondary vertices when needed.

If sister to already assigned vertex then assign same.

Else if mother already has vertex and/or lifetime then assign.

Done.

bool constructProcess ( Event process,
bool  isHardest = true 
)

Give the hard subprocess (with option for a second hard subprocess).

Give the hard subprocess with kinematics.

Construct kinematics from selected phase space point.

Basic info on process.

Save sampled values for further use, requires info stored by setType.

Rescale the momenta again when unresolved photons after finalKin.

Let hard process record begin with the event as a whole and the two incoming beam particles.

Add intermediate gammas for lepton -> gamma -> parton processes for both non-diffractive and hard processes, including direct-resolved. Add a copy of hadron beam when e->gamma + p.

For nondiffractive process no interaction selected so far, so done.

Entries 3 and 4, now to be added, come from 1 and 2. Offset from normal locations possible due to intermediate photons.

For DiffC entries 3 - 5 come jointly from 1 and 2 (to keep HepMC happy).

Insert the subprocess partons - resolved processes.

NOAM: Mothers and daughters without/with intermediate state.

Find scale from which to begin MPI/ISR/FSR evolution.

Loop over incoming and outgoing partons.

Read out particle info from SigmaProcess object.

If extra photons in event record, offset the mother/daughter list.

Append to process record.

NOAM: If there is an intermediate state, insert the it in the process record after the two incoming particles.

Sign of intermediate state: go by charge.

The colour configuration of the intermediate state has to be resolved separately.

Insert the intermediate state into the event record.

Pick lifetime where relevant, else not.

Insert the outgoing particles - unresolved processes.

COR: Special handling of soft QCD with photons. If VMD states, then outgoing photon has to be changed to VMD

For central diffraction: two scattered protons inserted so far, but modify mothers, add also centrally-produced hadronic system.

Insert the outgoing particles - Les Houches Accord processes.

Check if second process; if so partons must be in order.

Since LHA partons may be out of order, determine correct one. (Recall that zeroth particle is empty.)

Simple copy in unchanged order for two hard interactions.

For iNew == 0 look for the two incoming partons, then for partons having them as mothers, and so on layer by layer.

Find scale from which to begin MPI/ISR/FSR evolution.

Copy over info from LHA event to process, in proper order.

Translate from LHA status codes.

Find where mothers have been moved by reordering.

Ensure that second mother = 0 except for bona fide carbon copies.

Find daughters and where they have been moved by reordering. (Values shifted two steps to account for inserted beams.)

For 2 -> 1 hard scatterings reset second daughter to 0.

Colour trivial, except reset irrelevant colour indices.

Copy momentum and ensure consistent (E, p, m) set.

Polarization.

Allow scale setting for generic partons.

For resonance decay products use resonance mass as scale.

Store Les Houches Accord partons. Boost to CM frame if not already. Possibly an offset for mother/daugther list in photoproduction.

Check if need to store lifetime.

Track outgoing final particles.

Second pass to catch vanishing final lepton and quark masses.

Find partner to exchange energy and momentum with: general.

Find partner to exchange energy and momentum with: lepton.

Find partner to exchange energy and momentum with: quark.

Find partner to exchange energy and momentum with: largest mass.

Carry out exchange of energy and momentum, if possible.

Recursive boost of recoiler decay products, if necessary.

Emergency solution: just add energy as needed, => new incoming.

Reassign momenta and masses for incoming partons. Possible offset in photoproduction.

Loop through decay chains and set secondary vertices when needed.

If sister to already assigned vertex then assign same.

Else if mother already has vertex and/or lifetime then assign.

Further info on process. Reset quantities that may or may not be known.

Internally generated and stored information.

Les Houches Accord process partly available, partly to be constructed.

Read info on parton densities if provided.

Reconstruct kinematics of 2 -> 2 processes from momenta.

Store information.

For Les Houches event store subprocess classification.

Done.

bool constructState ( )

Pick flavours and colour flow of process.

Construct flavour and colours for selected event.

Set beam modes correctly for given process. Propagate the sampled VM states to beams as they are now sampled.

Done.

bool decayResonances ( Event process)

Do resonance decays.

Handle resonance decays.

Save current event-record size and status codes.

Do loop over user veto.

Do sequential chain of uncorrelated isotropic decays.

Check whether flavours should be correlated. (Currently only relevant for f fbar -> gamma

Reset the decay chains if have to redo.

Loop back where required to generate new decays with new flavours.

Correct to nonisotropic decays.

Optionally user hooks check/veto on decay chain.

Reset the decay chains if have to redo.

Loop back where required to generate new decay chain.

Done.

bool init ( bool  isFirst,
ResonanceDecays resDecaysPtrIn,
SLHAinterface slhaInterfacePtr,
GammaKinematics gammaKinPtrIn 
)

Initialize phase space and counters.

Initialize phase space and counters. Argument isFirst distinguishes two hard processes in same event.

Extract info about current process from SigmaProcess object.

Switch to ensure that the scales set in a LH input event are respected, even in resonance showers.

Maximal number of events for more in-depth control of how many events are selected/tried/accepted.

Flag for maximum violation handling.

Store whether beam particle has a photon and save the mode.

Use external photon flux.

Check whether photon sub-beams present.

Pick and create phase space generator. Send pointers where required.

Store pointers and perform simple initialization.

Check if beams asymmetric and define a boost to CM frame if yes.

Store the state of photon beams using inFlux: 0 = not a photon beam; 1 = resolved photon; 2 = unresolved photon. Resolved photon unless expcilitly an initiator or if beam unresolved and in-state not defined. In case of externally provided Les Houches events rely currently on flag for the process type as not expected to be mixed between different event classes.

Save the photon modes and propagate further. For soft processes set possible VM states.

Save the state of photon beams.

Initialize also phaseSpace pointer.

Send the pointer to gammaKinematics for sampling of soft QCD processes.

Reset cross section statistics.

Reset temporary cross section summand.

Set up normalized variance for lhaStratAbs = 3.

Initialize process and allowed incoming partons.

Find maximum of differential cross section * phasespace.

Separate signed maximum needed for LHA with negative weight.

Check maximum by a few events, and extrapolate a further increase.

Allow Pythia to overwrite incoming beams or parts of Les Houches input.

Done.

void reset ( )

Reset statistics on events generated so far.

Reset event generation statistics; but NOT maximum of cross section.

void setBeamModes ( bool  setVMD = false,
bool  isSampled = true 
)

Set the photon modes according to the process.

Set whether (photon) beam is resolved or unresolved. Method propagates the choice of photon process type to beam pointers.

Set the modes for the current beams.

Set the gammaMode for given process.

Propagate gammaMode and VMD state to info pointer.

Check whether explicit VMD sampling is required later on.

Propagate the sampled VMD states to beams.

bool trialProcess ( )

Generate a trial event; accepted or not.

Generate a trial event; selected or not.

Weights for photon flux oversampling with external flux.

For photon beams set PDF pointer to resolved or unresolved. Do not reset VM states since they will be sampled in phaseSpace->trialKin.

Loop over tries only occurs for Les Houches strategy = +-2.

Generate a trial phase space point, if meaningful.

For acceptable kinematics sample also kT for photons from leptons.

Save the x_gamma values for unresolved photons.

Sample the kinematics of virtual photons.

Processes with direct photons rescale momenta and cross section.

With external photon flux calculate weight wrt. approximated fluxes. No reweighting with externally generated events.

Flag to check if more events should be generated.

Note if at end of Les Houches file, else do statistics.

Check if the number of selected events should be limited.

Only add to counter if event should count towards cross section.

Statistics for separate Les Houches process codes. Insert new codes.

Only add to counter if event should count towards cross section.

Incoming top beams will not be handled, although allowed by LHAPDF.

Possibly fail, else cross section.

For photons with external flux correct the cross section but not if event externally generated as then cross section fixed.

Tell if this event comes with weight from cross section.

Also compensating weight from biased phase-space selection.

Set event weight to zero if this event should not count.

Check that not negative cross section when not allowed.

Cross section of process may come with a weight. Update sum.

Do not add event weight to the cross section if it should not count.

Reset stored weight.

Only update once an event is accepted, as is needed if the event weight can still change by a finite amount due to reweighting.

Check if maximum violated.

Select or reject trial point. Statistics.

Only add to counter if event should count towards cross section.

Only add to counter if event should count towards cross section.


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