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

#include <MergingHooks.h>

Inheritance diagram for HardProcess:
DireHardProcess

Public Member Functions

 HardProcess ()
 Default constructor.
 
virtual ~HardProcess ()
 Default destructor.
 
 HardProcess (const HardProcess &hardProcessIn)
 Copy constructor.
 
 HardProcess (string LHEfile, ParticleData *particleData)
 Constructor with path to LHE file.
 
virtual void initOnProcess (string process, ParticleData *particleData)
 Constructor with core process input. More...
 
void initOnLHEF (string LHEfile, ParticleData *particleData)
 Constructor with path to LHE file input. More...
 
void translateLHEFString (string LHEpath)
 Function to access the LHE file and read relevant information. More...
 
virtual void translateProcessString (string process)
 Function to translate the process string (in MG/ME notation) More...
 
void clear ()
 Function to clear hard process information. More...
 
virtual bool allowCandidates (int iPos, vector< int > Pos1, vector< int > Pos2, const Event &event)
 
virtual void storeCandidates (const Event &event, string process)
 Function to identify the hard subprocess in the current event. More...
 
virtual bool matchesAnyOutgoing (int iPos, const Event &event)
 
virtual bool findOtherCandidates (int iPos, const Event &event, bool doReplace)
 
virtual bool exchangeCandidates (vector< int > candidates1, vector< int > candidates2, unordered_map< int, int > further1, unordered_map< int, int > further2)
 Function to exchange a stored hard process candidate with another choice. More...
 
int nQuarksOut ()
 
int nLeptonOut ()
 
int nBosonsOut ()
 
int nQuarksIn ()
 
int nLeptonIn ()
 
int hasResInCurrent ()
 
int nResInCurrent ()
 
bool hasResInProc ()
 Function to report if a resonace decay was found in the 2->2 hard process. More...
 
void list () const
 Function to print the hard process (for debug)
 
void listCandidates () const
 

Public Attributes

int hardIncoming1
 Flavour of the first incoming particle.
 
int hardIncoming2
 Flavour of the second incoming particle.
 
vector< int > hardOutgoing1
 Flavours of the outgoing particles.
 
vector< int > hardOutgoing2
 
vector< int > hardIntermediate
 Flavour of intermediate bosons in the hard 2->2.
 
Event state
 Current reference event.
 
vector< int > PosOutgoing1
 Potential positions of outgoing particles in reference event.
 
vector< int > PosOutgoing2
 
vector< int > PosIntermediate
 Potential positions of intermediate bosons in reference event.
 
double tms
 Information on merging scale read from LHE file.
 

Detailed Description

Declaration of hard process class This class holds information on the desired hard 2->2 process for the merging. This class is a container class for History class use.

Member Function Documentation

bool allowCandidates ( int  iPos,
vector< int >  Pos1,
vector< int >  Pos2,
const Event event 
)
virtual

Function to check whether the sets of candidates Pos1, Pos2, together with the proposed candidate iPos give an allowed hard process state

Function to check if the candidates stored in Pos1 and Pos2, together with a proposed candidate iPos are allowed.

Find colour-partner of new candidate

Never allow equal initial partners!

Never allow equal initial partners!

Reimplemented in DireHardProcess.

void clear ( )

Function to clear hard process information.

Clear flavour of the first incoming particle

Clear outgoing particles

Clear intermediate bosons in the hard 2->2

Clear reference event

Clear potential positions of outgoing particles in reference event

Clear potential positions of intermediate bosons in reference event

Clear merging scale read from LHE file

bool exchangeCandidates ( vector< int >  candidates1,
vector< int >  candidates2,
unordered_map< int, int >  further1,
unordered_map< int, int >  further2 
)
virtual

Function to exchange a stored hard process candidate with another choice.

Function to exchange hard process candidates.

Replace, if one-to-one correspondence exists.

Else simply swap with the first candidate.

Done

Reimplemented in DireHardProcess.

bool findOtherCandidates ( int  iPos,
const Event event,
bool  doReplace 
)
virtual

Function to check if instead of the particle event[iCandidate], another particle could serve as part of the hard process. Assumes that iCandidate is already stored as part of the hard process.

Return value

Save stored candidates' properties.

If the particle's mother is an identified intermediate resonance, then do not attempt any replacement.

Compare particle properties

Find candidate amongst the already stored ME process candidates.

Check outgoing candidates

Compare particle properties

Check outgoing candidates

Compare particle properties

If more / less than one stored candidate for iPos has been found, exit.

Now check for other allowed candidates.

Do nothing if this particle has already be found, or if this particle is a jet, lepton container or lepton

Declare vector of already existing candiates.

If allowed, remember replacment parton.

Now check for other allowed candidates.

Do nothing if this particle has already be found, or if this particle is a jet, lepton container or lepton

Declare vector of already existing candidates.

If allowed, remember replacment parton.

Remove all hard process particles that would be counted twice.

Decide of a replacment candidate has been found.

Done

Reimplemented in DireHardProcess.

int hasResInCurrent ( )

Function to report if a resonace decay was found in the 2->2 sub-process of the current state

Function to report if a resonace decay was found in the 2->2 hard sub-process in the current state

Do not count final state bosons as resonaces

bool hasResInProc ( )

Function to report if a resonace decay was found in the 2->2 hard process.

Function to report if a resonace decay was found in the 2->2 hard core process

Do not count final state bosons as resonaces

void initOnLHEF ( string  LHEfile,
ParticleData particleData 
)

Constructor with path to LHE file input.

Initialisation on the path to LHE file.

void initOnProcess ( string  process,
ParticleData particleData 
)
virtual

Constructor with core process input.

The HardProcess class.

Declaration of hard process class This class holds information on the desired hard 2->2 process to be merged This class is a container class for History class use. Initialisation on the process string

Reimplemented in DireHardProcess.

void listCandidates ( ) const

Function to print the hard process candidates in the Matrix element state (for debug)

Function to list the hard process candiates in the matrix element state (for debug)

bool matchesAnyOutgoing ( int  iPos,
const Event event 
)
virtual

Function to check if the particle event[iPos] matches any of the stored outgoing particles of the hard subprocess

Match quantum numbers of any first outgoing candidate

Match quantum numbers of any second outgoing candidate

Match parton in the hard process, or parton from decay of electroweak boson in hard process, or parton from decay of electroweak boson from decay of top

Check outgoing candidates

Compare particle properties

Check outgoing candidates

Compare particle properties

Check if maps to hard process: Check that particle is in hard process

Or particle has taken recoil from first splitting

Or particle has on-shell resonace as mother

Or particle has on-shell resonace as mother, which again has and on-shell resonance as mother

Done

Reimplemented in DireHardProcess.

int nBosonsOut ( )

Function to get the number of electroweak final state bosons in the hard process

Function to get the number of uncoloured final state particles in the hard process

int nLeptonIn ( )

Function to get the number of uncoloured initial state particles in the hard process

int nLeptonOut ( )

Function to get the number of uncoloured final state particles in the hard process

Bookkeep MSSM neutralinos as leptons

Bookkeep sleptons as leptons

Bookkeep MSSM neutralinos as leptons

Bookkeep sleptons as leptons

For very loose hard process definition, check number of hard process lepton explicitly. Check lepton / neutrino containers as leptons

int nQuarksIn ( )

Function to get the number of coloured initial state partons in the hard process

int nQuarksOut ( )

Function to get the number of coloured final state partons in the hard process

For very loose hard process definition, check number of hard process b-quarks explicitly.

int nResInCurrent ( )

Function to report the number of resonace decays in the 2->2 sub-process of the current state

void storeCandidates ( const Event event,
string  process 
)
virtual

Function to identify the hard subprocess in the current event.

Store the reference event

Local copy of intermediate bosons

Local copy of outpoing partons

Clear positions of intermediate and outgoing particles

For QCD dijet or e+e- > jets hard process, do not store any candidates, as to not discriminate clusterings

Done

For inclusive merging, do not store any candidates, as to not discriminate clusterings

Done

Initialise vector of particles that were already identified as hard process particles

If the hard process is specified only by containers, then add all particles matching with the containers to the hard process.

Try to find all unmatched hard process leptons. Loop through event to find outgoing lepton

Skip non-final particles

Skip all particles that have already been identified

If the particle matches an outgoing neutrino, save it

If the particle matches an outgoing lepton, save it

If the particle matches an outgoing b-quark, save it

Skip all particles that have already been identified

If the particle matches an outgoing neutrino, save it

If the particle matches an outgoing lepton, save it

If the particle matches an outgoing b-quark, save it

Done

Now begin finding candidates when not only containers are used.

First try to find final state bosons

Do nothing if the intermediate boson is absent

Do nothing if this boson does not match any final state boson

Loop through event

Skip all particles that have already been identified

If the particle has a requested intermediate id, check if if is a final state boson

Be careful only to replace one index at a time!

Check for W-boson container

Second try to find particles coupled to intermediate bosons

Do nothing if the intermediate boson is absent

Loop through event

If the particle has a requested intermediate id, check if daughters are hard process particles

If this particle is a potential intermediate

If id's of daughters are good, store position

Loop through daughters to check if these contain some hard outgoing particles

Skip all particles that have already been identified

Check if daughter is hard outgoing particle

Found particle id

Found jet

Store position

Remove the matched particle from the list

Check if daughter is hard outgoing antiparticle

Found particle id

Found jet

Store position

Remove the matched particle from the list

End loop through daughters

End if ids match

End loop through event

End loop though requested intermediates

If all outgoing particles were found, done

Return

Leptons not associated with resonance are allowed. Try to find all unmatched hard process leptons. Loop through event to find outgoing lepton

Skip non-final particles and final partons

Skip all particles that have already been identified

Check if any hard outgoing leptons remain

Do nothing if this particle has already be found, or if this particle is a jet or quark

If the particle matches an outgoing lepton, save it

Check if any hard outgoing antileptons remain

Do nothing if this particle has already be found, or if this particle is a jet or quark

If the particle matches an outgoing lepton, save it

Do nothing if this particle has already be found, or if this particle is a jet.

Do nothing if this particle has already be found, or if this particle is a jet.

In case the index of the multimap is filled twice, make sure not to arbitrarily overwrite set values.

Skip all particles that have already been identified

Skip all indices that have already been identified

Save parton

remove entry form lists

Skip all particles that have already been identified

Skip all indices that have already been identified

Save parton

remove entry form lists

In case the index of the multimap is filled twice, make sure not to arbitraryly overwrite set values.

Skip all particles that have already been identified

Skip all indices that have already been identified

Save parton

remove entry form lists

Skip all particles that have already been identified

Skip all indices that have already been identified

Save parton

remove entry form lists

It sometimes happens that MadEvent does not put a heavy coloured resonance into the LHE file, even if requested. This means that the decay products of this resonance need to be found separately. Loop through event to find hard process (anti)quarks

Skip non-final particles and final partons

Skip all particles that have already been identified

Check if any hard outgoing quarks remain

Do nothing if this particle has already be found, or if this particle is a jet, lepton container or lepton

If the particle matches an outgoing quark, save it

Save parton

remove entry form lists

Check if any hard outgoing antiquarks remain

Do nothing if this particle has already be found, or if this particle is a jet, lepton container or lepton

If the particle matches an outgoing antiquark, save it

Save parton

Remove parton from list

Done

Reimplemented in DireHardProcess.

void translateLHEFString ( string  LHEpath)

Function to access the LHE file and read relevant information.

Function to access the LHE file and read relevant information. The merging scale will be read from the +1 jet sample, called LHEpath_1.lhe while the hard process will be read from LHEpath_0.lhe Currently, only read from MadEvent- or Sherpa-generated LHE files is automatic, else the user is asked to supply the necessary information.

Open path to LHEF and extract merging scale

Check with ME generator has been used

Particle identifiers, ordered in such a way that e.g. the "u" in a mu is not mistaken for an u quark

Leptons

Jet container

Quarks

Leptons

Jet container

Quarks

Leptons

Jet container

Quarks

Declare intermediate particle identifiers

Electroweak gauge bosons

Top quarks

Dummy index as back-up

All squarks

Declare names of intermediate particles

Electroweak gauge bosons

Top quarks

Dummy index as back-up

All squarks

Declare final state particle identifiers

Leptons

Jet container and lepton containers

Quarks

SM uncoloured bosons

Neutralino in SUSY

All squarks

Declare names of final state particles

Leptons

Jet container and lepton containers

Quarks

SM uncoloured bosons

Neutralino in SUSY

All squarks

Leptons

Jet container and lepton containers

Quarks

SM uncoloured bosons

Neutralino in SUSY

All squarks

Declare size of particle name arrays

Save type of the generator, in order to be able to extract the tms definition

Now read merging scale Open path to LHEF and extract merging scale

Remove whitespaces

Replace d with e

Now read hard process Open path to LHEF and extract hard process

Cut string into incoming and outgoing pieces

Do not count additional final jets

Get incoming particles

Get intermediate particles If intermediates are still empty, fill intermediate with default value

Get final particles

Now read merging scale

Open path to LHEF and extract merging scale

Remove whitespaces

Replace d with e

Now read hard process Open path to LHEF and extract hard process

Count number of resonances

Cut string in incoming, resonance+decay and outgoing pieces

Cut last resonance from rest

If the string was not cut into pieces, i.e. no resonance was required, cut string using '>' as delimiter

Cut string in incoming and outgoing pieces

Get incoming particles

Check intermediate resonances and decay products

Seperate strings into intermediate and outgoing, if not already done

Get intermediate particles

Get outgoing particles

For arbitrary or non-existing intermediate, remember zero for each two outgoing particles, without bosons.

For final state bosons, bookkeep the final state boson as intermediate as well.

For final state bosons, bookkeep the final state boson as intermediate as well.

Now store incoming, intermediate and outgoing Set intermediate tags

Set the incoming particle tags

Remember final state bosons

Remember b-quark container

Remember jet container

Remember lepton container

Remember lepton container

Set final particle identifiers

Push back particles / antiparticles

Save final state W-boson container as particle

Push back jets, distribute evenly amongst particles / antiparticles Push back majorana particles, distribute evenly

Done

void translateProcessString ( string  process)
virtual

Function to translate the process string (in MG/ME notation)

Function to translate a string specitying the core process into the internal notation Currently, the input string has to be in MadEvent notation

Particle identifiers, ordered in such a way that e.g. the "u" in a mu is not mistaken for an u quark

Leptons

Jet container

Quarks

Leptons

Jet container

Quarks

Declare intermediate particle identifiers

Electroweak gauge bosons

All squarks

Top quarks

Dummy index as back-up

Declare names of intermediate particles

Electroweak gauge bosons

All squarks

Top quarks

Dummy index as back-up

Declare final state particle identifiers

Leptons

Jet container and lepton containers

Containers for inclusive handling for weak bosons and jets

All squarks

Quarks

SM uncoloured bosons

Neutralino in SUSY

Declare names of final state particles

Leptons

Jet container and lepton containers

Containers for inclusive handling for weak bosons and jets

All squarks

Quarks

SM uncoloured bosons

Neutralino in SUSY

Declare size of particle name arrays

Start mapping user-defined particles onto particle ids.

Remove whitespaces

Find user-defined hard process content Count number of user particles

Cut user-defined particles from remaining process

Cut remaining process string from rest

Remove curly brackets and whitespace

Convert particle numbers in user particle to integers

Save remaining process string

Remove curly brackets and whitespace

Start mapping residual process string onto particle IDs. Declare leftover process after user-defined particles have been converted

Remove comma separation

Count number of resonances

Cut string in incoming, resonance+decay and outgoing pieces

Cut last resonance from rest

If the string was not cut into pieces, i.e. no resonance was required, cut string using '>' as delimiter

Cut string in incoming and outgoing pieces

Get incoming particles

Check intermediate resonances and decay products

Seperate strings into intermediate and outgoing, if not already done

Get intermediate particles

Get outgoing particles

For arbitrary or non-existing intermediate, remember zero for each two outgoing particles, without bosons.

For final state bosons, bookkeep the final state boson as intermediate as well.

For final state bosons, bookkeep the final state boson as intermediate as well.

Now store incoming, intermediate and outgoing Set intermediate tags

Set the incoming particle tags

Now store final particle identifiers Start with user-defined particles.

For non-existing intermediate, remember zero.

For non-existing intermediate, remember zero.

Push back particles / antiparticles

Save final state W-boson container as particle

Push back jets, distribute evenly among particles / antiparticles Push back majorana particles, distribute evenly

Done

Reimplemented in DireHardProcess.


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