PYTHIA
8.303

#include <DireMerging.h>
Public Member Functions  
DireMerging ()  
Constructor. More...  
void  setWeightsPtr (DireWeightContainer *wgtsIn) 
void  setShowerPtrs (shared_ptr< DireTimes > timesPtr, shared_ptr< DireSpace > spacePtr) 
void  initPtrs (DireWeightContainer *wgtsIn, shared_ptr< DireTimes > timesPtr, shared_ptr< DireSpace > spacePtr, DireInfo *direInfoIn) 
~DireMerging ()  
Destructor.  
virtual void  init () 
Initialisation function for internal use inside Pythia source code. More...  
void  reset () 
virtual void  statistics () 
Function to print statistics. More...  
virtual int  mergeProcess (Event &process) 
Functions that implement matrix element merging. More...  
void  getSudakovs (double &wt) const 
Return CKKWL weight.  
void  getASratios (double &wt) const 
void  getPDFratios (double &wt) const 
void  getSudakovExp (int order, double &wt) const 
void  getASratioExp (int order, double &wt) const 
void  getPDFratioExp (int order, double &wt) const 
void  clearInfos () 
void  storeInfos () 
vector< double >  getStoppingScales () 
vector< double >  getStartingScales () 
void  getStoppingInfo (double scales[100][100], double masses[100][100]) 
double  generateSingleSudakov (double pTbegAll, double pTendAll, double m2dip, int idA, int type, double s=1., double x=1.) 
vector< double >  getSignalProb (string key) 
vector< double >  getBkgrndProb (string key) 
vector< double >  getTotalProb () 
void  clearClassifier () 
Public Member Functions inherited from Merging  
Merging ()  
Constructor.  
virtual  ~Merging () 
Destructor.  
void  initPtrs (MergingHooksPtr mergingHooksPtrIn, PartonLevel *trialPartonLevelPtrIn) 
Initialisation function for internal use inside Pythia source code.  
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  
shared_ptr< DireTimes >  fsr 
shared_ptr< DireSpace >  isr 
DireInfo *  direInfoPtr 
vector< double >  stoppingScalesSave 
vector< double >  startingScalesSave 
vector< double >  mDipSave 
vector< int >  radSave 
vector< int >  emtSave 
vector< int >  recSave 
vector< double >  totalProbSave 
map< string, vector< double > >  signalProbSave 
map< string, vector< double > >  bkgrndProbSave 
Protected Member Functions  
int  mergeProcessCKKWL (Event &process) 
Function to perform CKKWL 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...  
int  calculate (Event &process) 
Function to perform CKKWL merging on the event.  
bool  generateHistories (const Event &process, bool orderedOnly=true) 
Function to set up all histories for an event. More...  
void  tagHistories () 
double  getPathIndex (bool useAll=false) 
int  calculateWeights (double RNpath, bool useAll=false) 
Function to calulate the weights used for UNLOPS merging. More...  
int  getStartingConditions (double RNpath, Event &process) 
Function to perform UNLOPS merging on this event. More...  
void  setSudakovs (double wt) 
void  setASratios (double wt) 
void  setPDFratios (double wt) 
void  setSudakovExp (vector< double > wts) 
void  setASratioExp (vector< double > wts) 
void  setPDFratiosExp (vector< double > wts) 
void  clearSubtractions () 
void  appendSubtraction (double wt, const Event &event) 
bool  calculateSubtractions () 
Function to set up all histories for an event. More...  
bool  generateUnorderedPoint (Event &process) 
Function to steer different merging prescriptions. More...  
Protected Member Functions inherited from Merging  
int  mergeProcessCKKWL (Event &process) 
Function to perform CKKWL 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...  
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  
DireHistory *  myHistory 
double  sudakovs 
double  asRatios 
double  pdfRatios 
vector< double >  sudakovsExp 
vector< double >  asRatiosExp 
vector< double >  pdfRatiosExp 
vector< pair< double, Event > >  subtractions 
DireWeightContainer *  psweights 
double  sum_time_1 
double  sum_time_2 
int  sum_paths 
bool  enforceCutOnLHE 
bool  doMOPS 
bool  applyTMSCut 
bool  doMerging 
bool  usePDF 
bool  allowReject 
bool  doMECs 
bool  doMEM 
bool  doGenerateSubtractions 
bool  doGenerateMergingWeights 
bool  doExitAfterMerging 
bool  allowIncompleteReal 
int  nQuarksMerge 
bool  first 
Protected Attributes inherited from Merging  
PartonLevel *  trialPartonLevelPtr 
Pointer to trial PartonLevel object.  
MergingHooksPtr  mergingHooksPtr 
Pointer to trial MergingHooks object.  
double  tmsNowMin 
Minimal value found for the merging scale in events. More...  
Protected Attributes inherited from PhysicsBase  
Info *  infoPtr = {} 
Settings *  settingsPtr = {} 
Pointer to the settings database.  
ParticleData *  particleDataPtr = {} 
Pointer to the particle data table.  
HadronWidths *  hadronWidthsPtr = {} 
Pointer to the hadron widths data table.  
Rndm *  rndmPtr = {} 
Pointer to the random number generator.  
CoupSM *  coupSMPtr = {} 
Pointers to SM and SUSY couplings.  
CoupSUSY *  coupSUSYPtr = {} 
BeamParticle *  beamAPtr = {} 
BeamParticle *  beamBPtr = {} 
BeamParticle *  beamPomAPtr = {} 
BeamParticle *  beamPomBPtr = {} 
BeamParticle *  beamGamAPtr = {} 
BeamParticle *  beamGamBPtr = {} 
BeamParticle *  beamVMDAPtr = {} 
BeamParticle *  beamVMDBPtr = {} 
PartonSystems *  partonSystemsPtr = {} 
Pointer to information on subcollision parton locations.  
SigmaTotal *  sigmaTotPtr = {} 
Pointer to the total/elastic/diffractive cross sections.  
set< PhysicsBase * >  subObjects 
UserHooksPtr  userHooksPtr 
Friends  
class  Pythia 
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.  
Static Protected Attributes inherited from Merging  
static const double  TMSMISMATCH = 1.5 
The Merging class. More...  

inline 
Constructor.
= doMcAtNloDelta

protected 
Function to set up all histories for an event.
Store shower subtractions.
Need to reattach resonance decays, if necessary.
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.
Switch from 4pi to 8pi convention
Get clustering variables.
For II dipoles, scale with 1/xCS.
Multiply with ME correction.
Attach point to list of shower subtractions.
Restore stored hard process candidates
Done

protected 
Function to calulate the weights used for UNLOPS merging.
Initialise which part of UNLOPS merging is applied.
Save number of looping steps
Ensure that merging hooks to not remove emissions
Reset weight of the event.
Reset the O(alphaS)term of the UMEPS weight.
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 lowermultiplicity samples.
Reset the minimal tms value, if necessary.
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;
Potentially recluster real emission jets for powheg input containing "too many" jets, i.e. realemission kinematics.
Remove real emission events without underlying Born configuration from the loop sample, since such states will be taken care of by treelevel 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.
return 1;
Setup to choose shower starting conditions randomly.
Sum up signal and background probabilities.
New UNLOPS strategy based on UN2LOPS.
Calculate weights.
For treelevel or subtractive sammples, rescale with kFactor
Find kfactor
For NLO merging, rescale CKKWL weight with kfactor
Calculate CKKWL reweighting for all paths.
Double to access path.
Probability of path.
Calculate CKKWL weight:
Sum up signal and background probabilities separately.
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 treelevel events
Decide on which order to expand to.
Exclusive inputs: Subtract only the O(^{n+0})term from the treelevel 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 CKKWL weight.
Exclusive inputs: Subtract the O(^{n+1})term from the treelevel subtraction, not the O(^{n+0})terms.
Subtract the O()term from the CKKWL weight If PDF contributions have not been included, subtract these later New UNLOPS based on UN2LOPS.
If noemission probability is zero.
if ( wgt == 0. ) return 0;
Done

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 lowermultiplicity samples.
Reset the minimal tms value, if necessary.
Potentially recluster real emission jets for powheg input containing "too many" jets, i.e. realemission 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 treelevel samples.
Cut if no history passes the cut on the lowestmultiplicity 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 realemission jets are present.
Now cut on events that contain an additional realemission 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.

protected 
Function to set up all histories for an event.
Input not valid.
Clear previous history.
For now, prefer construction of ordered histories.
For pp > h, allow cut on state, so that underlying processes can be clustered to gg > h
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'
Calculate number of clustering steps
Set dummy process scale.
Generate all histories
Project histories onto desired branches, e.g. only ordered paths.
Done

protected 
Function to steer different merging prescriptions.
Dryrun to find overestimate enhancements if necessary.
Incoming partons to hard process are stored in slots 3 and 4.
Store participating partons as first set in list of all systems.
Add incoming hardscattering partons to list in beam remnants.
Scale. Find whether incoming partons are valence or sea. Store.
Done. Clean up event and return.
Generate arbitrary phasespace point with two additional particles.
Incoming partons to hard process are stored in slots 3 and 4.
Store participating partons as first set in list of all systems.
Add incoming hardscattering partons to list in beam remnants.
Scale. Find whether incoming partons are valence or sea. Store. When an xdependent matter profile is used with nonDiffractive, trial interactions mean that the valence/sea choice has already been made and should be restored here.
Done. Clean up event and return.
Loop through event and count.
Set number of requested partons.
Loop through event and count.
Set number of requested partons.

protected 
Setup to choose shower starting conditions randomly.
Store a double with which to access each of the paths.
Double to access path.
Randomly pick path.

protected 
Function to perform UNLOPS merging on this event.
Initialise which part of UNLOPS merging is applied.
Save number of looping steps
Calculate number of clustering steps
Potentially recluster real emission jets for powheg input containing "too many" jets, i.e. realemission kinematics.
Event with production scales set for further (trial) showering and starting conditions for the shower.
Do reclustering (looping) steps.
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 the resonance structure of the process has changed due to reclustering, redo the resonance decays in Pythia::next()
Done

virtual 

virtual 
Functions that implement matrix element merging.
Function to steer different merging prescriptions.
Clear all previous eventbyevent information.
Reinitialise hard process.
Remove whitespace from process string
Reset to default merging scale.
Ensure that merging weight is not counted twice.
Directly retrive Sudakov w/o PDF factors from showers and exit. if (doMcAtNloDelta && !usePDF) return genSud(process);
Possibility to apply merging scale to an input event.
Done if only a cut should be applied.
Do not include resonance decay products in the counting.
Loop through event and count.
Set number of requested partons.
Reset to default merging scale.
For ME corrections, only do mergingHooksPtr reinitialization here, and do not perform any veto.
For interative resummed matrix element method, tag histories and exit.
Ensure that merging weight is not counted twice.
Store information before leaving.
Veto if we do not want to do event generation.
Possibility to perform CKKWL 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 from Merging.

protected 
Function to perform CKKWL merging on the event.
Function to perform CKKWL 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
Construct all histories. This needs to be done because MECs can depend on unordered paths if these unordered paths are ordered up to some point.
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.
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 lowermultiplicity samples.
Store hard event cut information, reset veto information.
Reset the minimal tms value, if necessary.
Set dummy process scale.
Generate all histories.
Project histories onto desired branches, e.g. only ordered paths.
Setup to choose shower starting conditions randomly.
Store a double with which to access each of the paths.
Double to access path.
Randomly pick path.
Setup the selected path. Needed for
Do not apply cut if the configuration could not be projected onto an underlying born configuration.
Set eventspecific merging scale cut. Q2dependent for DIS.
Set dynamical merging scale for DIS
Enfore merging scale cut if the event did not pass the merging scale criterion.
Check if more steps should be taken.
Calculate CKKWL reweighting for all paths.
Double to access path.
Probability of path.
Calculate CKKWL weight:
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.
Allow merging hooks to veto events from now on.
If noemission probability is zero.
Done

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 CKKWL 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 lowermultiplicity 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. realemission 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 noemission probabilities.
Calculate weight Do LO or first part of NLO treelevel reweighting
Perform reweighting with Sudakov factors, save as ratios and PDF ratio weights
No reweighting, just set event scales properly and incorporate MPI noemission probabilities.
Event with production scales set for further (trial) showering and starting conditions for the shower
For sutraction of nStepsadditional resolved partons from the nSteps1 parton phase space, recluster the last parton in nStepsparton 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 kFactor
Find kfactor
For NLO merging, rescale CKKWL weight with kfactor
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 CKKWL
Now begin NLO part for treelevel 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 CKKWL 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

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.
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 lowermultiplicity 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.
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 noemission probability is zero.
Done

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.
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 lowermultiplicity 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. realemission kinematics.
Remove real emission events without underlying Born configuration from the loop sample, since such states will be taken care of by treelevel 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 treelevel 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
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 treelevel or subtractive sammples, rescale with kFactor
Find kfactor
For NLO merging, rescale CKKWL weight with kfactor
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 treelevel events
Decide on which order to expand to.
Exclusive inputs: Subtract only the O(^{n+0})term from the treelevel 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 CKKWL weight.
Exclusive inputs: Subtract the O(^{n+1})term from the treelevel 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 CKKWL weight If PDF contributions have not been included, subtract these later New UNLOPS based on UN2LOPS.
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 noemission probability is zero.
If the resonance structure of the process has changed due to reclustering, redo the resonance decays in Pythia::next()
Done

inlineprotected 
Clear previous results.
Store coefficients of Sudakov expansion.

inlineprotected 
Clear previous results.
Store coefficients of Sudakov expansion.

inlineprotected 
Clear previous results.
Store coefficients of Sudakov expansion.

virtual 
Function to print statistics.
Function to print information.
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 from Merging.
void storeInfos  (  ) 
Clear previous information.
Store information on every possible last clustering.
Just store pT and mass for now.

protected 
Tag history paths as "signal" or "background"
Sum up signal and background probabilities.
Get ME weight.
Reweight with Sudakovs, couplings and PDFs.