How to use the PyquenInterface in CMSSW

Goal of this page

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

General Info

CMSSW Release Status

The PyquenInterface is fully integrated into CMSSW as of release CMSSW_2_1_0.

Ongoing developments



The PyquenInterface code lives in the package GeneratorInterface/PyquenInterface.

Original Generator

The present version of Pyquen used in CMSSW is version 1.5, which was released on December 19th 2007 on the Pyquen webpage.

Running Instructions

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

cd $CMSSW_BASE/src
cvs co GeneratorInterface/PyquenInterface
cd GeneratorInterface/PyquenInterface/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 Pyquen settings for various scenarios 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/ Dijets with 80 < pT < 120 GeV
Configuration/Generator/python/ Gamma + jet events
Configuration/Generator/python/ Events with Z→μμ, Z→ee, Z→jets

The cmsDriver command can be used to generate full configuration files from the above cfi's which mix/embed a "signal" Pyquen event into a "background" Hydjet event as in the following example: \
--himix --scenario CMS.HeavyIons \
--conditions FrontierConditions_CMS.GlobalTag,MC_31X_V9::All \
--datatier 'GEN-SIM-RAW-RECO' --eventcontent=RAWDEBUGHLT \
--processName 'HISIGNAL' \
--filein=inputfile.root --fileout=outputfile.root \
 -n 1 \
See SWGuideHeavyIonEvtMixing for more details.

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

(Note that although the nucleon-nucleon collisions that Pyquen generates do not have an impact parameter, the heavy-ion Hydjet events into which they are often embedded do. The correct description of centrality-dependent effects (eg quenching) requires the Pyquen event to have an impact parameter specified as well.)

  • Embedding example
process.generator.embeddingMode = True
This mode will pick up the impact parameter from the input background event. Parameters cFlag, bFixed, bMin and bMax are irrelevant when embeddingMode = True.

  • Fixed impact parameter example
process.generator.embeddingMode = False
process.generator.cFlag = 0
process.generator.bFixed = 0.2
Parameters bMin and bMax are irrelevant when cFlag = 0.

  • Varying impact parameter example
process.generator.embeddingMode = False
process.generator.cFlag = 1
process.generator.bMin = 4.2
process.generator.bMax = 7.3

Please remember that the variation of impact parameter in Pyquen is not the same as that of Hydjet, in fact the distribution is scaled by Ncoll. Therefore there is no such thing as "Min Bias Pyquen events". 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

PYQUEN (PYthia - QUENched) is a Fortran sub-routine that applies re-scattering and energy loss to Pythia generated partons in order to simulate Quark-Gluon-Plasma induced effects. For this to work one has to set hadronization off in a Pythia run. The interface for Pyquen in CMSSW is the same as the one for Pythia, making use of HepMC::IO_HEPEVT class.

Further information


Any questions, suggestions, complains 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: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 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-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback