PYTHIA  8.312
Public Member Functions | Public Attributes | Protected Attributes | List of all members
VinciaMergingHooks Class Reference

Class for Vincia to perform merging. More...

#include <VinciaMergingHooks.h>

Inheritance diagram for VinciaMergingHooks:
MergingHooks PhysicsBase

Public Member Functions

 VinciaMergingHooks ()
 Constructor.
 
 ~VinciaMergingHooks ()
 Destructor.
 
void init () override
 Initialise. More...
 
bool setShowerStartingScales (bool isTrial, bool, double &pTscaleIn, const Event &event, double &pTmaxFSRIn, bool &, double &pTmaxISRIn, bool &, double &pTmaxMPIIn, bool &) override
 Set starting scales.
 
virtual bool usesVincia () override
 This MergingHooks is for Vincia only.
 
virtual double tmsNow (const Event &event) override
 Calculate merging scale of current state. More...
 
virtual bool canVetoStep () override
 Check whether an event should be vetoed due to branching above tMS. More...
 
virtual bool doVetoStep (const Event &process, const Event &event, bool) override
 Check if step is vetoed. More...
 
virtual bool doVetoEmission (const Event &) override
 Overridden base class methods.
 
virtual bool canVetoEmission () override
 Function to allow not counting a trial emission.
 
virtual double dampenIfFailCuts (const Event &) override
 
virtual int getNumberOfClusteringSteps (const Event &, bool) override
 Function to return the number of clustering steps for the current event. More...
 
virtual bool canCutOnRecState () override
 
virtual bool doCutOnRecState (const Event &) override
 
virtual bool canVetoTrialEmission () override
 Function to allow not counting a trial emission.
 
virtual bool doVetoTrialEmission (const Event &, const Event &) override
 Function to check if trial emission should be rejected.
 
virtual bool useShowerPlugin () override
 
virtual double hardProcessME (const Event &) override
 Function to calculate the hard process matrix element. More...
 
virtual double tmsDefinition (const Event &) override
 Others.
 
void setVerbose (int verboseIn)
 Set and get verbosity.
 
int getVerbose ()
 
bool initSuccess ()
 Check if initialisation succeeded.
 
vector< HardProcessParticle * > getLeptons ()
 Get list of leptons in the hard process.
 
int getNResPlusUndecayed ()
 Get number of undecayed resonances.
 
int getNResMinusUndecayed ()
 
int getNResNeutralUndecayed ()
 
vector< int > getResPlusUndecayed ()
 Get list of undecayed resonances in the hard process.
 
vector< int > getResMinusUndecayed ()
 
vector< int > getResNeutralUndecayed ()
 
vector< int > getResPlusLep ()
 Get list of leptonically decaying resonances in the hard process.
 
vector< int > getResMinusLep ()
 
vector< int > getResNeutralFCLep ()
 
vector< int > getResNeutralFNLep ()
 
vector< int > getResPlusHad ()
 Get list of hadronically decaying resonances in the hard process.
 
vector< int > getResMinusHad ()
 
vector< int > getResNeutralFCHad ()
 
vector< int > getResNeutralFNHad ()
 
int getNResPlusHad ()
 Get number of hadronically decaying resonances in the hard process.
 
int getNResMinusHad ()
 
int getNResNeutralFCHad ()
 
int getNResNeutralFNHad ()
 
int getNResHad ()
 
int getNResPlus ()
 
int getNResMinus ()
 
int getNResNeutralFC ()
 
int getNResNeutralFN ()
 
int getNChainsMin ()
 Get information about the beam chains.
 
int getNChainsMax ()
 
int getNPartons ()
 
int getNQPairs ()
 
bool hasSetColourStructure ()
 Get informations about whether colour structure has been set yet.
 
bool canMergeRes ()
 Check if we are merging in resonance systems.
 
bool doMergeInVBF ()
 Check if we are merging in VBF system.
 
bool allowHEFT ()
 Check if we are allowing HEFT couplings.
 
int nMaxJetsRes ()
 Get maximum number of additional jets from resonance decay systems.
 
void setScaleRes (int iRes, double scale)
 Fetch shower restarting scale for resonances.
 
double getScaleRes (int iRes, const Event &)
 Fetch shower starting scale for resonances.
 
bool canClusFF ()
 Check if clusterings are allowed.
 
bool canClusRF ()
 
bool canClusII ()
 
bool canClusIF ()
 
bool isAboveMS (const Event &event)
 Veto showered event if branching is above merging scale. More...
 
- Public Member Functions inherited from MergingHooks
 MergingHooks ()
 Constructor.
 
virtual ~MergingHooks ()
 Destructor. More...
 
double tms ()
 Function returning the value of the merging scale. More...
 
double tmsCut ()
 
void tms (double tmsIn)
 
double dRijMS ()
 
double pTiMS ()
 
double QijMS ()
 
int nMaxJets ()
 Function returning the value of the maximal number of merged jets.
 
int nMaxJetsNLO ()
 
string getProcessString ()
 Function to return hard process string.
 
int nHardOutPartons ()
 Function to return the number of outgoing partons in the core process.
 
int nHardOutLeptons ()
 Function to return the number of outgoing leptons in the core process.
 
int nHardOutBosons ()
 
int nHardInPartons ()
 
int nHardInLeptons ()
 Function to return the number of incoming leptons in the core process.
 
int nResInCurrent ()
 
bool doUserMerging ()
 Function to determine if user defined merging should be applied.
 
bool doMGMerging ()
 Function to determine if automated MG/ME merging should be applied.
 
bool doKTMerging ()
 Function to determine if KT merging should be applied.
 
bool doPTLundMerging ()
 Function to determine if PTLund merging should be applied.
 
bool doCutBasedMerging ()
 Function to determine if cut based merging should be applied.
 
bool doCKKWLMerging ()
 
bool doUMEPSTree ()
 
bool doUMEPSSubt ()
 
bool doUMEPSMerging ()
 
bool doNL3Tree ()
 
bool doNL3Loop ()
 
bool doNL3Subt ()
 
bool doNL3Merging ()
 
bool doUNLOPSTree ()
 
bool doUNLOPSLoop ()
 
bool doUNLOPSSubt ()
 
bool doUNLOPSSubtNLO ()
 
bool doUNLOPSMerging ()
 
bool doRuntimeAMCATNLOInterface ()
 Function to determine if we have a runtime interface to aMC.
 
int nRecluster ()
 Return the number clustering steps that have actually been done.
 
int nRequested ()
 Return number of requested additional jets on top of the Born process.
 
bool isFirstEmission (const Event &event)
 Output functions to analyse/prepare event for merging. More...
 
bool hasEffectiveG2EW ()
 Function to allow effective gg -> EW boson couplings.
 
bool allowEffectiveVertex (vector< int > in, vector< int > out)
 Function to allow effective gg -> EW boson couplings.
 
Event bareEvent (const Event &inputEventIn, bool storeInputEvent)
 Return event stripped from decay products. More...
 
bool reattachResonanceDecays (Event &process)
 Write event with decay products attached to argument. More...
 
bool isInHard (int iPos, const Event &event)
 Check if particle at position iPos is part of the hard sub-system. More...
 
void orderHistories (bool doOrderHistoriesIn)
 Functions to steer construction of histories. More...
 
void allowCutOnRecState (bool doCutOnRecStateIn)
 
void doWeakClustering (bool doWeakClusteringIn)
 Function to allow final state clusterings of weak bosons.
 
bool checkAgainstCut (const Particle &particle)
 Functions used as default merging scales. More...
 
double rhoms (const Event &event, bool withColour)
 Find the minimal Lund pT between coloured partons in the event. More...
 
double kTms (const Event &event)
 Function to calculate the minimal kT in the event. More...
 
double cutbasedms (const Event &event)
 
void doIgnoreEmissions (bool doIgnoreIn)
 Functions to steer shower evolution (public to allow for PS plugin) More...
 
bool includeWGTinXSEC ()
 
int nHardNow ()
 Functions to retrieve event veto information.
 
double tmsHardNow ()
 
int nJetsNow ()
 
double tmsNow ()
 
void setHardProcessPtr (HardProcess *hardProcIn)
 
int nMuRVar ()
 Functions related to renormalization scale variations.
 
void printIndividualWeights ()
 Function to print individual merging weight components, for debugging.
 
void setShowerPointer (PartonLevel *psIn)
 
void storeHardProcessCandidates (const Event &event)
 Generic setup functions. More...
 
void setLHEInputFile (string lheFile)
 
AlphaStrongAlphaS_FSR ()
 Functions for output of class members. More...
 
AlphaStrongAlphaS_ISR ()
 
AlphaEMAlphaEM_FSR ()
 
AlphaEMAlphaEM_ISR ()
 
bool includeMassive ()
 
bool enforceStrongOrdering ()
 Prefer strongly ordered histories.
 
bool orderInRapidity ()
 Prefer histories ordered in rapidity and evolution pT.
 
bool pickByFull ()
 Pick history probabilistically by full (correct) splitting probabilities.
 
bool pickByPoPT2 ()
 Pick history probabilistically, with easier form of probabilities.
 
bool includeRedundant ()
 Include redundant terms (e.g. PDF ratios) in the splitting probabilities.
 
bool pickBySumPT ()
 Pick by winner-takes-it-all, with minimum sum of scalar evolution pT.
 
int unorderedScalePrescip ()
 
int unorderedASscalePrescip ()
 
int unorderedPDFscalePrescip ()
 
int incompleteScalePrescip ()
 
bool allowColourShuffling ()
 Allow swapping one colour index while reclustering.
 
bool resetHardQRen ()
 Allow use of dynamical renormalisation scale of the core 2-> 2 process.
 
bool resetHardQFac ()
 Allow use of dynamical factorisation scale of the core 2-> 2 process.
 
double scaleSeparationFactor ()
 
double nonJoinedNorm ()
 
double fsrInRecNorm ()
 
double herwigAcollFSR ()
 
double herwigAcollISR ()
 
double pT0ISR ()
 ISR regularisation scale.
 
double pTcut ()
 Shower cut-off scale.
 
void muMI (double mu)
 MI starting scale.
 
double muMI ()
 
double kFactor (int njet=0)
 Full k-Factor for current event.
 
double k1Factor (int njet=0)
 O()-term of the k-Factor for current event.
 
bool orderHistories ()
 
bool allowCutOnRecState ()
 
bool doWeakClustering ()
 INTERNAL Hooks to allow clustering W bosons.
 
bool doSQCDClustering ()
 INTERNAL Hooks to allow clustering clustering of gluons to squarks.
 
double muF ()
 Store / get first scale in PDF's that Pythia should have used.
 
double muR ()
 
double muFinME ()
 Store / get factorisation scale used in matrix element calculation. More...
 
double muRinME ()
 
void doIgnoreStep (bool doIgnoreIn)
 Functions to steer merging code. More...
 
void storeWeights (vector< double > weight)
 Stored weights in case veto needs to be revoked.
 
void setShowerStoppingScale (double scale=0.)
 
double getShowerStoppingScale ()
 
void nMinMPI (int nMinMPIIn)
 
int nMinMPI ()
 
double kTdurham (const Particle &RadAfterBranch, const Particle &EmtAfterBranch, int Type, double D)
 Functions for internal merging scale definions. More...
 
double rhoPythia (const Event &event, int rad, int emt, int rec, int ShowerType)
 Function to compute "pythia pT separation" from Particle input. More...
 
int findColour (int col, int iExclude1, int iExclude2, const Event &event, int type, bool isHardIn)
 
double deltaRij (Vec4 jet1, Vec4 jet2)
 Function to compute Delta R separation from 4-vector input. More...
 
double getWeightNLO (int i=0)
 Functions for weight management. More...
 
vector< double > getWeightCKKWL ()
 Return CKKW-L weight.
 
vector< double > getWeightFIRST ()
 Return O() weight.
 
void setWeightCKKWL (vector< double > weightIn)
 Set CKKW-L weight.
 
void setWeightFIRST (vector< double > weightIn)
 Set O() weight.
 
vector< double > getSudakovWeight ()
 
vector< double > getCouplingWeight ()
 Function to return coupling weight.
 
void setEventVetoInfo (int nJetNowIn, double tmsNowIn)
 Functions and members to store the event veto information. More...
 
void setHardProcessInfo (int nHardNowIn, double tmsHardNowIn)
 Set the hard process information.
 
void addVetoInMainShower ()
 
int getNumberVetoedInMainShower ()
 
- 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

VinciaHardProcessvinHardProcessPtr {}
 
- Public Attributes inherited from MergingHooks
bool useShowerPluginSave
 Functions used as clusterings / probabilities.
 
bool useOwnHardProcess
 The members, switches etc. More...
 
HardProcesshardProcess
 
PartonLevelshowers
 
AlphaStrong AlphaS_FSRSave
 AlphaS objects for alphaS reweighting use.
 
AlphaStrong AlphaS_ISRSave
 
AlphaEM AlphaEM_FSRSave
 
AlphaEM AlphaEM_ISRSave
 
string lheInputFile
 Saved path to LHE file for more automated merging.
 
bool doUserMergingSave
 Flags for merging procedure definition.
 
bool doMGMergingSave
 
bool doKTMergingSave
 
bool doPTLundMergingSave
 
bool doCutBasedMergingSave
 
bool includeMassiveSave
 
bool enforceStrongOrderingSave
 
bool orderInRapiditySave
 
bool pickByFullPSave
 
bool pickByPoPT2Save
 
bool includeRedundantSave
 
bool pickBySumPTSave
 
bool allowColourShufflingSave
 
bool resetHardQRenSave
 
bool resetHardQFacSave
 
int unorderedScalePrescipSave
 
int unorderedASscalePrescipSave
 
int unorderedPDFscalePrescipSave
 
int incompleteScalePrescipSave
 
int ktTypeSave
 
int nReclusterSave
 
int nQuarksMergeSave
 
int nRequestedSave
 
double scaleSeparationFactorSave
 
double nonJoinedNormSave
 
double fsrInRecNormSave
 
double herwigAcollFSRSave
 
double herwigAcollISRSave
 
double pT0ISRSave
 
double pTcutSave
 
double pTminISRSave
 
double pTminFSRSave
 
bool doNL3TreeSave
 
bool doNL3LoopSave
 
bool doNL3SubtSave
 
bool doUNLOPSTreeSave
 
bool doUNLOPSLoopSave
 
bool doUNLOPSSubtSave
 
bool doUNLOPSSubtNLOSave
 
bool doUMEPSTreeSave
 
bool doUMEPSSubtSave
 
bool doEstimateXSection
 Flag to only do phase space cut, rejecting events below the tms cut.
 
bool doRuntimeAMCATNLOInterfaceSave
 Flag for runtime aMC interface. Needed for aMC-Delta.
 
bool applyVeto
 
Event inputEvent
 Save input event in case decay products need to be detached.
 
vector< pair< int, int > > resonances
 
bool doRemoveDecayProducts
 
double muMISave
 Starting scale for attaching MPI.
 
double kFactor0jSave
 Precalculated K-factors.
 
double kFactor1jSave
 
double kFactor2jSave
 
double tmsValueSave
 Saved members.
 
double tmsValueNow
 
double DparameterSave
 
int nJetMaxSave
 
int nJetMaxNLOSave
 
string processSave
 
string processNow
 
vector< double > tmsListSave
 
bool doOrderHistoriesSave
 
bool doCutOnRecStateSave
 
bool doWeakClusteringSave
 INTERNAL Hooks to allow clustering W bosons.
 
bool doSQCDClusteringSave
 
double muFSave
 Store / get first scale in PDF's that Pythia should have used.
 
double muRSave
 
double muFinMESave
 Store / get factorisation scale used in matrix element calculation.
 
double muRinMESave
 
bool doIgnoreEmissionsSave
 Flag to indicate trial shower usage.
 
bool doIgnoreStepSave
 Flag to indicate if events should be vetoed.
 
double pTsave
 Stored weights in case veot needs to be revoked.
 
vector< double > weightCKKWL1Save
 
vector< double > weightCKKWL2Save
 
int nMinMPISave
 
vector< double > weightCKKWLSave
 Save CKKW-L weight / O() weight.
 
vector< double > weightFIRSTSave
 
IndividualWeights individualWeights
 
bool doVariations
 Flag to indicate whether renormalization scale variations are performed.
 
vector< double > muRVarFactors
 Vector of variation factors applied to renormalization scale.
 
int nWgts
 Number of weights, nominal + variations.
 
int nJetMaxLocal
 Local copies of nJetMax inputs, if recalculation is necessary.
 
int nJetMaxNLOLocal
 
bool hasJetMaxLocal
 
bool includeWGTinXSECSave
 
int nHardNowSave
 
int nJetNowSave
 
double tmsHardNowSave
 
double tmsNowSave
 
double stopScaleSave
 
int nVetoedInMainShower
 Statistics.
 

Protected Attributes

int nJetMaxResSave
 Maximal number of additional jets per resonance system.
 
int nMergeResSys
 Number of resonance systems allowed to produce additional jets.
 
bool doMergeRes
 Flag to decide if we can merge in resonance systems.
 
bool doVetoNotInResSav
 Tell Vincia whether to veto emissions from non-resonance systems.
 
map< int, double > resSysRestartScale
 Saved information about resonance restart scales.
 
- 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
 

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.
 

Detailed Description

Class for Vincia to perform merging.

Member Function Documentation

virtual bool canCutOnRecState ( )
inlineoverridevirtual

Hooks to disallow states in the construction of all histories, e.g. because jets are below the merging scale or fail the matrix element cuts Function to allow interference in the construction of histories

Reimplemented from MergingHooks.

bool canVetoStep ( )
overridevirtual

Check whether an event should be vetoed due to branching above tMS.

Check if can veto step.

We only veto events in the shower if we don't use the evolution variable as merging variable. Otherwise, we perform the last trial step in VinciaMerging already.

Reimplemented from MergingHooks.

virtual double dampenIfFailCuts ( const Event inEvent)
inlineoverridevirtual

Function to dampen weights calculated from histories with lowest multiplicity reclustered events that do not pass the ME cuts

Dummy statement to avoid compiler warnings

Reimplemented from MergingHooks.

virtual bool doCutOnRecState ( const Event event)
inlineoverridevirtual

Function to check reclustered state while generating all possible histories Function implementing check of reclustered events while constructing all possible histories

Dummy statement to avoid compiler warnings.

Count number of final state partons.

For gg -> h, allow only histories with gluons in initial state

Reimplemented from MergingHooks.

bool doVetoStep ( const Event process,
const Event event,
bool   
)
overridevirtual

Check if step is vetoed.

Check whether we could in principle veto the event due to this branching. If so, veto if the event is above the merging scale.

If we veto the event, update weights.

Reimplemented from MergingHooks.

int getNResPlus ( )
inline

Get numbers of (either hadronically or leptonically decaying) resonances in the hard process.

virtual int getNumberOfClusteringSteps ( const Event event,
bool  resetNjetMax 
)
inlineoverridevirtual

Function to return the number of clustering steps for the current event.

Count the number of final state partons

Count the number of final state leptons

Add neutralinos to number of leptons

Add sleptons to number of leptons

Count the number of final state electroweak bosons

Save sum of all final state particles

Return the difference to the core process outgoing particles

For inclusive handling, the number of reclustering steps can be different within a single sample.

Final particle counters

Set steps for QCD or QCD+QED events: Need at least two massless particles at lowest multiplicity.

Set steps for events containing heavy bosons. Need at least one massive particle at lowest multiplicity.

dynamical handling of steps

Return the difference to the core process outgoing particles

Reimplemented from MergingHooks.

virtual double hardProcessME ( const Event inEvent)
inlineoverridevirtual

Function to calculate the hard process matrix element.

Dummy statement to avoid compiler warnings.

Reimplemented from MergingHooks.

void init ( )
overridevirtual

Initialise.

The VinciaMergingHooks class.

Initialise.

Safety check.

Extract settings.

Showers on/off.

Merging settings.

Currently pTLund merging not supported.

TODO: for now can't invert FF splitter map = 2.

TODO: for now can't do merging for polarised.

Information on renormalisation scale variations. TODO: not yet implemented in Vincia merging.

Initialise CKKWL weight.

Initialize merging weights in weight container.

Other members to be initialised.

Do not allow events to be vetoed by parton level.

Do not allow emissions to be removed by merging hooks.

Initialise hard process.

Extract the colour structure of the hard process

  • the main thing we actually care about!

Initialise input event.

Successfully completed initialisation.

Reimplemented from MergingHooks.

bool isAboveMS ( const Event event)

Veto showered event if branching is above merging scale.

Check if an event is above the merging scale.

Merging according to cuts.

Fetch cuts in event. Order is pT, DeltRjj, Qjj.

Fetch minimal values.

Check cuts.

If we have only one jet, we disregard the two-particle cuts.

Otherwise check whether we are above the merging scale.

double tmsNow ( const Event event)
overridevirtual

Calculate merging scale of current state.

Calculate merging scale according to scale definition.

Merging according to a cut in kT.

Merging according to a cut in pTLund. TODO check implementation of rhoms().

If nothing is enabled, use evolution variable, indicated by -1 here.

Reimplemented from MergingHooks.

Member Data Documentation

VinciaHardProcess* vinHardProcessPtr {}

Same as HardProcess, but explicitly of VinciaHardProcess type. Note both point to the same object.


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