PYTHIA  8.312
Public Member Functions | List of all members
Pythia8ToHepMC Class Reference

The Pythia8ToHepMC class. More...

#include <HepMC2.h>

Inheritance diagram for Pythia8ToHepMC:
Pythia8ToHepMC

Public Member Functions

 Pythia8ToHepMC ()
 Constructor and destructor.
 
bool fill_next_event (Pythia8::Pythia &pythia, GenEvent &evt, int ievnum=-1, bool append=false, GenParticle *rootParticle=0, int iBarcode=-1)
 The recommended method to convert Pythia events into HepMC ones.
 
bool fill_next_event (Pythia8::Pythia &pythia, GenEvent *evt, int ievnum=-1, bool append=false, GenParticle *rootParticle=0, int iBarcode=-1)
 
bool fill_next_event (Pythia8::Event &pyev, GenEvent &evt, int ievnum=-1, const Pythia8::Info *pyinfo=0, Pythia8::Settings *pyset=0, bool append=false, GenParticle *rootParticle=0, int iBarcode=-1)
 Alternative method to convert Pythia events into HepMC ones.
 
bool fill_next_event (Pythia8::Event &pyev, GenEvent *evt, int ievnum=-1, const Pythia8::Info *pyinfo=0, Pythia8::Settings *pyset=0, bool append=false, GenParticle *rootParticle=0, int iBarcode=-1)
 
bool print_inconsistency () const
 Read out values for some switches.
 
bool free_parton_exception () const
 
bool free_parton_warnings () const
 
bool convert_gluon_to_0 () const
 
bool store_pdf () const
 
bool store_proc () const
 
bool store_xsec () const
 
bool store_weights () const
 
void set_print_inconsistency (bool b=true)
 Set values for some switches.
 
void set_free_parton_exception (bool b=true)
 
void set_free_parton_warnings (bool b=true)
 
void set_convert_gluon_to_0 (bool b=false)
 
void set_store_pdf (bool b=true)
 
void set_store_proc (bool b=true)
 
void set_store_xsec (bool b=true)
 
void set_store_weights (bool b=true)
 

Detailed Description

The Pythia8ToHepMC class.

Member Function Documentation

bool fill_next_event ( Pythia8::Event pyev,
GenEvent *  evt,
int  ievnum = -1,
const Pythia8::Info pyinfo = 0,
Pythia8::Settings pyset = 0,
bool  append = false,
GenParticle *  rootParticle = 0,
int  iBarcode = -1 
)
inline

Main method for conversion from PYTHIA event to HepMC event. Read one event from Pythia8 and fill a new GenEvent, alternatively append to an existing GenEvent, and return T/F = success/failure.

  1. Error if no event passed.

Update event number counter.

Conversion factors from Pythia units GeV and mm to HepMC ones.

Set up for alternative to append to an existing event.

New vertex associated with appended particles.

1a. If there is a HIInfo object fill info from that.

  1. Create a particle instance for each entry and fill a map, and a vector which maps from the particle index to the GenParticle address.

Fill the particle.

Colour flow uses index 1 and 2.

Here we assume that the first two particles in the list are the incoming beam particles.

  1. Loop over particles AGAIN, this time creating vertices. We build the production vertex for each entry in hepevt. The HEPEVT pointers are bi-directional, so gives decay vertices as well.

3a. Search to see if a production vertex already exists.

note that in Pythia8 there is a particle number 0!

3b. If no suitable production vertex exists - and the particle has at least one mother or position information to store - make one.

3c. If prod_vtx doesn't already have position specified, fill it.

3d. loop over mothers to make sure their end_vertices are consistent.

If end vertex of the mother isn't specified, do it now.

Problem scenario: the mother already has a decay vertex which differs from the daughter's production vertex. Can happen with Vincia showers since antenna emissions have two parents. In that case, let vertex structure be defined by first parent, ignoring second parent.

Otherwise this means there is internal inconsistency in the HEPEVT event record. Print an error. Note: we could provide a fix by joining the two vertices with a dummy particle if the problem arises often.

End of vertex-setting loops.

If hadronization switched on then no final coloured particles.

  1. Check for particles which come from nowhere, i.e. are without mothers or daughters. These need to be attached to a vertex, or else they will never become part of the event.

Also check for free partons (= gluons and quarks; not diquarks?).

Done if only appending to already existing event.

  1. Store PDF, weight, cross section and other event information. Flavours of incoming partons.

Store PDF information.

Store process code, scale, alpha_em, alpha_s.

Store cross-section information in pb and event weight. The latter is usually dimensionless, but in units of pb for Les Houches strategies +-4.

If multiweights with possibly different xsec, overwrite central value

Done for new event.


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