PYTHIA  8.312
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
Merging Class Reference

#include <Merging.h>

Inheritance diagram for Merging:
PhysicsBase DireMerging VinciaMerging

Public Member Functions

 Merging ()
 Constructor.
 
virtual ~Merging ()
 Destructor.
 
void initPtrs (MergingHooksPtr mergingHooksPtrIn, PartonLevel *trialPartonLevelPtrIn)
 Initialisation function for internal use inside Pythia source code.
 
virtual void init ()
 Initialisation function for internal use inside Pythia source code. More...
 
virtual void statistics ()
 Function to print statistics. More...
 
virtual int mergeProcess (Event &process)
 Function to steer different merging prescriptions. More...
 
virtual void getStoppingInfo (double scales[100][100], double masses[100][100])
 
virtual void getDeadzones (bool dzone[100][100])
 
virtual double generateSingleSudakov (double pTbegAll, double pTendAll, double m2dip, int idA, int type, double s=-1., double x=-1.)
 Function to generate Sudakov factors for MCatNLO-Delta. More...
 
void setLHAPtr (LHEF3FromPythia8Ptr lhaUpIn)
 
- 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
 

Public Attributes

LHEF3FromPythia8Ptr lhaPtr
 

Protected Member Functions

int mergeProcessCKKWL (Event &process)
 Function to perform CKKW-L merging on the event. More...
 
int mergeProcessUMEPS (Event &process)
 Function to perform UMEPS merging on the event. More...
 
int mergeProcessNL3 (Event &process)
 Function to perform NL3 NLO merging on the event. More...
 
int mergeProcessUNLOPS (Event &process)
 Function to perform UNLOPS merging on the event. More...
 
bool cutOnProcess (Event &process)
 Function to apply the merging scale cut on an input event. More...
 
void clearInfos ()
 Clear all information stored in the runtime interface to aMCatNLO.
 
int clusterAndStore (Event &process)
 Store all information required for the runtime interface to aMCatNLO. More...
 
void getDipoles (int iRad, int colTag, int colSign, const Event &event, vector< pair< int, int > > &dipEnds)
 
- 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

PartonLeveltrialPartonLevelPtr
 Pointer to trial PartonLevel object.
 
MergingHooksPtr mergingHooksPtr
 Pointer to trial MergingHooks object.
 
double tmsNowMin
 Minimal value found for the merging scale in events.
 
vector< double > stoppingScalesSave
 
vector< double > mDipSave
 
vector< int > radSave
 
vector< int > emtSave
 
vector< int > recSave
 
vector< bool > isInDeadzone
 
- 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
 

Static Protected Attributes

static const double TMSMISMATCH = 1.5
 The Merging class. More...
 
static const double MINWGT = 1e-10
 Minimum allowed weight value to prevent division by zero.
 

Friends

class Pythia
 Make Pythia class friend.
 

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.
 

Detailed Description

Merging is a wrapper class for the interface of matrix element merging and Pythia8.

Member Function Documentation

int clusterAndStore ( Event process)
protected

Store all information required for the runtime interface to aMCatNLO.

Store all information required for the runtime interface to aMCatNLO. The method proceeds by generating all histories for the input event, then loops through the first layer of the history tree to extract all necessary information to be passed on to aMCatNLO. This function is not used internally, only when interfacing to aMCatNLO at runtime.

Clear all previous event-by-event information.

Ensure that merging hooks to not veto events in the trial showers.

For pp > h, allow cut on state, so that underlying processes can be clustered to gg > h

Avoid ordering constraints.

Prepare process record for merging. If Pythia has already decayed resonances used to define the hard process, remove resonance decay products.

Reset any incoming spins for W+-.

Store candidates for the splitting V -> qqbar'.

Get merging scale in current event.

Calculate number of clustering steps.

Store hard event cut information, reset veto information.

Get random number to choose a path.

Set dummy process scale.

Generate all histories.

Project histories onto desired branches, e.g. only ordered paths.

Setup the selected path. Needed for

Store information on every possible last clustering.

Get all clustering variables.

Only consider last event entry as allowed emission.

Save clustered event in external container, if necessary.

Loop through final state of system to find possible dipole ends.

Find dipole end formed by colour index.

Find dipole end formed by anticolour index.

Already covered clustering.

Only continue of gluon was already counted as part of two dipoles.

Function to compute "pythia pT separation" from Particle input.

Just store pT for now.

Consider cases in the dead zone that:

  • completely failed the pT reconstruction (t<=0)
  • had virtuality larer than the dipole mass
  • had negative dipole mass (measured after emission)

bool dead = (t<=0.);

Done.

bool cutOnProcess ( Event process)
protected

Function to apply the merging scale cut on an input event.

Save number of looping steps

For now, prefer construction of ordered histories.

For pp > h, allow cut on state, so that underlying processes can be clustered to gg > h

Reset any incoming spins for W+-.

Prepare process record for merging. If Pythia has already decayed resonances used to define the hard process, remove resonance decay products.

Store candidates for the splitting V -> qqbar'

Check if event passes the merging scale cut.

Get merging scale in current event.

Calculate number of clustering steps

Too few steps can be possible if a chain of resonance decays has been removed. In this case, reject this event, since it will be handled in lower-multiplicity samples.

Reset the minimal tms value, if necessary.

Potentially recluster real emission jets for powheg input containing "too many" jets, i.e. real-emission kinematics.

Get random number to choose a path.

Set dummy process scale.

Generate all histories

Project histories onto desired branches, e.g. only ordered paths.

Remove real emission events without underlying Born configuration from the loop sample, since such states will be taken care of by tree-level samples.

Cut if no history passes the cut on the lowest-multiplicity state.

Do not apply cut if the configuration could not be projected onto an underlying born configuration.

Now enfore merging scale cut if the event did not pass the merging scale criterion.

Check if more steps should be taken.

Done if no real-emission jets are present.

Now cut on events that contain an additional real-emission jet. Perform one reclustering for real emission kinematics, then apply merging scale cut on underlying Born kinematics.

Initialise temporary output of reclustering.

Recluster once.

Veto if underlying Born kinematics do not pass merging scale cut.

Done if only interested in cross section estimate after cuts.

double generateSingleSudakov ( double  pTbegAll,
double  pTendAll,
double  m2dip,
int  idA,
int  type,
double  s = -1.,
double  x = -1. 
)
virtual

Function to generate Sudakov factors for MCatNLO-Delta.

Function to generate Sudakov factors for MCatNLO-Delta. This function is not used internally, only when interfacing to aMCatNLO at runtime.

II

FF

IF

FI

Reimplemented in DireMerging.

void getDeadzones ( bool  dzone[100][100])
virtual

Function to retrieve if any of the shower scales would not have been possible to produce by Pythia.

Function to retrieve if any of the shower scales would not have been possible to produce by Pythia. This function is not used internally, only when interfacing to aMCatNLO at runtime.

In fortran we want dzone(radiator,recoiler), hence, we should take the transpose here, since 2-d arrays are treated differently in c++ and fortran.

void getDipoles ( int  iRad,
int  colTag,
int  colSign,
const Event event,
vector< pair< int, int > > &  dipEnds 
)
protected

Helper function to be able to extract all shower scales by checking all dipoles. Relevant only to runtime aMC interface.

Setup all QCD dipole end for a QCD colour charge. Helper function to be able to extract all shower scales by checking all dipoles.

Colour: other end by same index in final state or opposite in beam.

Anticolour: other end by same index in final state or opposite in beam.

Colour: other end by same index in final state or opposite in beam.

Anticolour: other end by same index in final state or opposite in beam.

Store dipole colour end(s).

void getStoppingInfo ( double  scales[100][100],
double  masses[100][100] 
)
virtual

Runtime interface functions for communication with aMCatNLO Function to retrieve shower scale information (to be used to set scales in aMCatNLO-LHEF-production.

Function to retrieve shower scale information (to be used to set scales in aMCatNLO-LHEF-production. This function is not used internally, only when interfacing to aMCatNLO at runtime.

In fortran we want scales(radiator,recoiler), hence, we should take the transpose here, since 2-d arrays are treated differently in c++ and fortran.

Reimplemented in DireMerging.

void init ( )
virtual

Initialisation function for internal use inside Pythia source code.

Initialise Merging class.

Reimplemented in DireMerging, and VinciaMerging.

int mergeProcess ( Event process)
virtual

Function to steer different merging prescriptions.

Reinitialise hard process.

Ensure that merging weight is not counted twice.

Possibility to apply merging scale to an input event.

Done if only a cut should be applied.

For the runtime interface between aMCatNLO and Pythia, simply reconstruct scale and dead zone information and exit.

Possibility to perform CKKW-L merging on this event.

Possibility to perform UMEPS merging on this event.

Possibility to perform NL3 NLO merging on this event.

Possibility to perform UNLOPS merging on this event.

Reimplemented in DireMerging, and VinciaMerging.

int mergeProcessCKKWL ( Event process)
protected

Function to perform CKKW-L merging on the event.

Function to perform CKKW-L merging on this event.

Ensure that merging hooks to not veto events in the trial showers.

For pp > h, allow cut on state, so that underlying processes can be clustered to gg > h

For now, prefer construction of ordered histories.

Ensure that merging weight is not counted twice.

Reset weight of the event.

Prepare process record for merging. If Pythia has already decayed resonances used to define the hard process, remove resonance decay products.

Reset any incoming spins for W+-.

Store candidates for the splitting V -> qqbar'.

Check if event passes the merging scale cut.

Get merging scale in current event.

Calculate number of clustering steps.

Check if hard event cut should be applied later.

Too few steps can be possible if a chain of resonance decays has been removed. In this case, reject this event, since it will be handled in lower-multiplicity samples.

Store hard event cut information, reset veto information.

Reset the minimal tms value, if necessary.

Get random number to choose a path.

Set dummy process scale.

Generate all histories.

Project histories onto desired branches, e.g. only ordered paths.

Setup the selected path. Needed for

Do not apply cut if the configuration could not be projected onto an underlying born configuration.

Enfore merging scale cut if the event did not pass the merging scale criterion.

return -1;

Check if more steps should be taken.

Calculate CKKWL weight: Perform reweighting with Sudakov factors, save alpha_s ratios and PDF ratio weights.

Event with production scales set for further (trial) showering and starting conditions for the shower.

If necessary, reattach resonance decay products.

Allow to dampen histories in which the lowest multiplicity reclustered state does not pass the lowest multiplicity cut of the matrix element.

Save the weight of the event for histogramming. Only change the event weight after trial shower on the matrix element multiplicity event (= in doVetoStep).

Save the weight of the event for histogramming.

Update the event weight.

In this case, central merging weight goes into nominal weight, all variations are saved relative to central merging weight

Allow merging hooks to veto events from now on.

If no-emission probability is zero.

Done

int mergeProcessNL3 ( Event process)
protected

Function to perform NL3 NLO merging on the event.

Function to perform NL3 NLO merging on this event.

Initialise which part of NL3 merging is applied.

Ensure that hooks (NL3 part) to not remove emissions.

Ensure that hooks (CKKWL part) to not veto events in trial showers.

For pp > h, allow cut on state, so that underlying processes can be clustered to gg > h

For now, prefer construction of ordered histories.

Reset weight of the event

Reset the O(alphaS)-term of the CKKW-L weight.

Prepare process record for merging. If Pythia has already decayed resonances used to define the hard process, remove resonance decay products.

Store candidates for the splitting V -> qqbar'

Check if event passes the merging scale cut.

Get merging scale in current event.

Calculate number of clustering steps

Too few steps can be possible if a chain of resonance decays has been removed. In this case, reject this event, since it will be handled in lower-multiplicity samples.

Reset the minimal tms value, if necessary.

Enfore merging scale cut if the event did not pass the merging scale criterion.

Get random number to choose a path.

Set dummy process scale.

Generate all histories

Project histories onto desired branches, e.g. only ordered paths.

Discard states that cannot be projected unto a state with one less jet.

Potentially recluster real emission jets for powheg input containing "too many" jets, i.e. real-emission kinematics.

Perform one reclustering for real emission kinematics, then apply merging scale cut on underlying Born kinematics.

Initialise temporary output of reclustering.

Recluster once.

Veto if underlying Born kinematics do not pass merging scale cut.

Remember number of jets, to include correct MPI no-emission probabilities.

Calculate weight Do LO or first part of NLO tree-level reweighting

Perform reweighting with Sudakov factors, save as ratios and PDF ratio weights

No reweighting, just set event scales properly and incorporate MPI no-emission probabilities.

Event with production scales set for further (trial) showering and starting conditions for the shower

For sutraction of nSteps-additional resolved partons from the nSteps-1 parton phase space, recluster the last parton in nSteps-parton events, and sutract later

Function to return the reclustered event

Allow to dampen histories in which the lowest multiplicity reclustered state does not pass the lowest multiplicity cut of the matrix element

Save the weight of the event for histogramming. Only change the event weight after trial shower on the matrix element multiplicity event (= in doVetoStep)

For tree level samples in NL3, rescale with k-Factor

Find k-factor

For NLO merging, rescale CKKW-L weight with k-factor

Save the weight of the event for histogramming

Check if we need to subtract the O()-term. If the number of additional partons is larger than the number of jets for which loop matrix elements are available, do standard CKKW-L

Now begin NLO part for tree-level events

Calculate the O()-term of the CKKWL weight

If necessary, also dampen the O()-term

Set the subtractive weight to the value calculated so far

Subtract the O()-term from the CKKW-L weight If PDF contributions have not been included, subtract these later

Set qcd 2->2 starting scale different from arbirtrary scale in LHEF! –> Set to pT of partons

For pure QCD dijet events (only!), set the process scale to the transverse momentum of the outgoing partons.

Reset hard process candidates (changed after clustering a parton).

If necessary, reattach resonance decay products.

Allow merging hooks (NL3 part) to remove emissions from now on.

Allow merging hooks (CKKWL part) to veto events from now on.

Done

int mergeProcessUMEPS ( Event process)
protected

Function to perform UMEPS merging on the event.

Function to perform UMEPS merging on this event.

Initialise which part of UMEPS merging is applied.

Save number of looping steps

Ensure that merging hooks does not remove emissions.

For pp > h, allow cut on state, so that underlying processes can be clustered to gg > h

For now, prefer construction of ordered histories.

Ensure that merging weight is not counted twice.

Reset any incoming spins for W+-.

Reset weights of the event.

Prepare process record for merging. If Pythia has already decayed resonances used to define the hard process, remove resonance decay products.

Store candidates for the splitting V -> qqbar'.

Check if event passes the merging scale cut.

Get merging scale in current event.

Calculate number of clustering steps.

Check if hard event cut should be applied later.

Too few steps can be possible if a chain of resonance decays has been removed. In this case, reject this event, since it will be handled in lower-multiplicity samples.

Reset the minimal tms value, if necessary.

Get random number to choose a path.

Set dummy process scale.

Generate all histories.

Project histories onto desired branches, e.g. only ordered paths.

Do not apply cut if the configuration could not be projected onto an underlying born configuration.

Enfore merging scale cut if the event did not pass the merging scale criterion.

Check reclustering steps to correctly apply MPI.

Discard if the state could not be reclustered to a state above TMS.

Calculate CKKWL weight: Perform reweighting with Sudakov factors, save alpha_s ratios and PDF ratio weights.

Event with production scales set for further (trial) showering and starting conditions for the shower.

Do reclustering (looping) steps.

Allow to dampen histories in which the lowest multiplicity reclustered state does not pass the lowest multiplicity cut of the matrix element

Save the weight of the event for histogramming. Only change the event weight after trial shower on the matrix element multiplicity event (= in doVetoStep)

Save the weight of the event for histogramming.

Update the event weight.

In this case, central merging weight goes into nominal weight, all variations are saved relative to central merging weight

Set QCD 2->2 starting scale different from arbitrary scale in LHEF! –> Set to minimal mT of partons.

For pure QCD dijet events (only!), set the process scale to the transverse momentum of the outgoing partons. Calculate number of clustering steps.

Reset hard process candidates (changed after clustering a parton).

If necessary, reattach resonance decay products.

Allow merging hooks to remove emissions from now on.

If no-emission probability is zero.

Done

int mergeProcessUNLOPS ( Event process)
protected

Function to perform UNLOPS merging on the event.

Function to perform UNLOPS merging on this event.

Initialise which part of UNLOPS merging is applied.

Save number of looping steps

Ensure that merging hooks to not remove emissions

For now, prefer construction of ordered histories.

For pp > h, allow cut on state, so that underlying processes can be clustered to gg > h

Reset weight of the event.

Reset the O(alphaS)-term of the UMEPS weight.

Vectors for UNLOPS-P and UNLOPS-PC weights

Check if scheme variations activated, and if so, reset

Prepare process record for merging. If Pythia has already decayed resonances used to define the hard process, remove resonance decay products.

Store candidates for the splitting V -> qqbar'

Check if event passes the merging scale cut.

Get merging scale in current event.

Calculate number of clustering steps

Check if hard event cut should be applied later.

Too few steps can be possible if a chain of resonance decays has been removed. In this case, reject this event, since it will be handled in lower-multiplicity samples.

Reset the minimal tms value, if necessary.

Get random number to choose a path.

Set dummy process scale.

Generate all histories

Project histories onto desired branches, e.g. only ordered paths.

Do not apply cut if the configuration could not be projected onto an underlying born configuration.

Enfore merging scale cut if the event did not pass the merging scale criterion.

Potentially recluster real emission jets for powheg input containing "too many" jets, i.e. real-emission kinematics.

Remove real emission events without underlying Born configuration from the loop sample, since such states will be taken care of by tree-level samples.

Discard if the state could not be reclustered to any state above TMS.

Check reclustering steps to correctly apply MPI.

Perform one reclustering for real emission kinematics, then apply merging scale cut on underlying Born kinematics.

Initialise temporary output of reclustering.

Recluster once.

Veto if underlying Born kinematics do not pass merging scale cut.

New UNLOPS strategy based on UN2LOPS.

Calculate weights. Do LO or first part of NLO tree-level reweighting

Perform reweighting with Sudakov factors, save as ratios and PDF ratio weights

Set event scales properly, reweight for new UNLOPS

Set event scales properly, reweight for new UNLOPS

Perform reweighting with Sudakov factors, save as ratios and PDF ratio weights

Set weights for UNLOPS-P and UNLOPS-PC

Event with production scales set for further (trial) showering and starting conditions for the shower.

Do reclustering (looping) steps.

Allow to dampen histories in which the lowest multiplicity reclustered state does not pass the lowest multiplicity cut of the matrix element

Save the weight of the event for histogramming. Only change the event weight after trial shower on the matrix element multiplicity event (= in doVetoStep)

For tree-level or subtractive samples, rescale with k-Factor

Find k-factor

For NLO merging, rescale CKKW-L weight with k-factor

Save the weight of the event for histogramming

Check if we need to subtract the O()-term. If the number of additional partons is larger than the number of jets for which loop matrix elements are available, do standard UMEPS.

Now begin NLO part for tree-level events

Decide on which order to expand to.

Exclusive inputs: Subtract only the O(^{n+0})-term from the tree-level subtraction, if we're at the highest NLO multiplicity (nMaxNLO).

Exclusive inputs: Do not remove the O(as)-term if the number of reclusterings exceeds the number of NLO jets, or if more clusterings have been performed.

Calculate terms in expansion of the CKKW-L weight.

Exclusive inputs: Subtract the O(^{n+1})-term from the tree-level subtraction, not the O(^{n+0})-terms.

If necessary, also dampen the O()-term

Set the subtractive weight to the value calculated so far

Subtract the O()-term from the CKKW-L weight If PDF contributions have not been included, subtract these later New UNLOPS based on UN2LOPS. if (doUNLOPS2 && order > -1) wgt = -wgt*(wgtFIRST-1.); else if (order > -1) wgt = wgt - wgtFIRST;

If no first order weight needs to be subtracted, set it anyway

Set QCD 2->2 starting scale different from arbitrary scale in LHEF! –> Set to minimal mT of partons.

For pure QCD dijet events (only!), set the process scale to the transverse momentum of the outgoing partons.

Reset hard process candidates (changed after clustering a parton).

Check if resonance structure has been changed (e.g. because of clustering W/Z/gluino)

Compare old and new resonances

If necessary, reattach resonance decay products.

Allow merging hooks to remove emissions from now on.

If no-emission probability is zero.

If the resonance structure of the process has changed due to reclustering, redo the resonance decays in Pythia::next()

Done

void statistics ( )
virtual

Function to print statistics.

Function to print information.

Recall switch to enfore merging scale cut.

Recall merging scale value.

Reset minimal tms value.

Header.

Print warning if the minimal tms value of any event was significantly above the desired merging scale value.

Listing finished.

Reimplemented in DireMerging, and VinciaMerging.

Member Data Documentation

vector<double> stoppingScalesSave
protected

Saved information about shower stopping scales, dipole masses, dipole ends, and whether or not a clustering is in the shower deadzone. Relevant only to runtime aMC interface.

const double TMSMISMATCH = 1.5
staticprotected

The Merging class.

Factor by which the maximal value of the merging scale can deviate before a warning is printed.


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