How to use the HydjetInterface in CMSSW

Complete: 5

Goal of this page

The aim of this page is to document the CMSSW interface to the Hydjet Monte-Carlo generator—where the code lives, how to run it, and details of the implementation.

General Info

CMSSW Release Status

HydjetInterface is fully integrated into CMSSW as of release CMSSW_2_1_0.

Ongoing developments



The HydjetInterface code lives in the package GeneratorInterface/HydjetInterface.

Original Generator

The present version of Hydjet used in CMSSW is version 1.6, which was released on March 19th 2009 on the Hydjet webpage.

Running Instructions

There is an example configuration file, in the test directory of the HydjetInterface package, which can be run with the following commands:

cd $CMSSW_BASE/src
cvs co GeneratorInterface/HydjetInterface
cd GeneratorInterface/HydjetInterface/test

To customise the level of output messages, you may need to check the MessageLogger documentation at SWGuideMessageLogger.

Official Configurations (Used in Production and CMS.RelVal)

Some configuration files containing pre-defined Hydjet settings exist. These are used for official Monte-Carlo production, and for producing Release Validation (CMS.RelVal) samples. These cfi files are listed in the table below.

Configuration file Description
Configuration/Generator/python/ Quenched Pb+Pb events with impact parameter = 0 fm
Configuration/Generator/python/ Quenched Min Bias Pb+Pb events.

The cmsDriver command can be used to generate full configuration files from the above cfi's as in the following example: \
--scenario CMS.HeavyIons -n 10 --conditions MC_31X_V9::All \
--datatier GEN-SIM-RAW --eventcontent RAWDEBUGHLT  --no_exec

In addition common settings for Pythia, Pyquen and Hydjet are defined in Configuration/Generator/python/

Physics settings

The following sections describe which parameters need to be modified in your configuration file for various physics scenarios.

Impact parameter

  • Fixed impact parameter example
process.generator.cFlag = 0
process.generator.bFixed = 0.2

Parameters bMin and bMax are irrelevant when cFlag = 0.

  • Varying impact parameter example

process.generator.cFlag = 1
process.generator.bMin = 4.2
process.generator.bMax = 7.3

Parameter bFixed is irrelevant when cFlag != 0.

  • Min Bias example

process.generator.cFlag = 1
process.generator.bMin = 0
process.generator.bMax = 30

Parameter bFixed is irrelevant when cFlag != 0.


  • Quenching completely OFF
process.generator.doQuench = False

  • Only radiative energy loss (sometimes abbreviated noColl)
process.generator.doQuench = True
process.generator.doRadiativeEnLoss = True
process.generator.doCollisionalEnLoss = False

  • Only collisional energy loss
process.generator.doQuench = True
process.generator.doCollisionalEnLoss = True
process.generator.doRadiativeEnLoss = False

  • Both collisional and radiative energy loss (denoted simply as Quenched)
process.generator.doQuench = True
process.generator.doCollisionalEnLoss = True
process.generator.doRadiativeEnLoss = True

Implementation details

HYDJET (HYDro + JETs) is an event generator that runs a sequence of Pyquen or Pythia events and adds an extra number of soft (low-pt) particles to simulate hydrodynamic and soft effects such as elliptic flow and charged multiplicity. It is not possible to use the same interface as Pythia or Pyquen because one has to explicitly determine mother-daughter relations in separate Pythia/Pyquen runs within a Heavy Ion event. For this, the interface itself runs over the commonblock that carries the particle information in Pythia/Pyquen for each event and builds the corresponding HepMC::GenParticles and GenVertices .

HYHARD & modifications to preserve sub-event info

The Fortran subroutine HYHARD in Hydjet is nothing but a consequent running of several Pyquen (Pythia) events being merged into one event. For each heavy ion event hyhard is called njet times where njet is the number of binary collisions in the ion+ion collision. The parameters in the common block PYJETS; k(ip,j), p(ip,j) and v(ip,j), where ip runs over the entries of a single pp event, are basically merged into arrays in common block HYJETS; khj(i,j), phj(i,j), vhj(i,j) where i runs over all the entries of the heavy ion event.

What we do to keep track of which particle belongs to which pp collision is that we add a big number to the parameter k(ip,3) which originally gives the line number of the entry that particle in line ip originates from. The number we add is 10000 times the index of the subevent, making sure 10000 is a number which is always definitely greater than possible number of particles of a pp event.

Reading HYJETS in CMSSW interface

When reading the particles in the interface, we read take care of each sub pp-event separately. The particles are read in order, they are converted into hepmc objects, and by looking at khj(i,3) we decide when to jump to the next sub-event, then we continue reading the particles from where we had left.

The offset added to khj(i,3) is same through the sub-event. For each particle, we subtract this number and get back what line number we had in the original pp event, and using this information we build the particle-vertex relations. When building the vertices, the "id" of the vertices are defined to be the index of the sub-event that the vertex belongs to, thus one can separate these sub-events when analyzing the HepMCProduct by looking at vertex ids.

Further information


Any questions, suggestions, complaints you have, please send email to the CMS-HI software list (

Review status

Reviewer/Editor and Date Comments
YetkinYilmaz - 24 Nov 2009 updated page as part of documentation review
PhilipAllfrey - 25 Nov 2009 expanded some sections

Responsible: YetkinYilmaz

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2009-11-25 - PhilipAllfrey
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback