Particle Guns

Complete: 1

WORK IN PROGRESS !!! INFO IS INCOMPLETE. SORRY FOR THE INCONVENIENCE.

Goal of the page

This page is intended to familiarize you with Particle Guns, that are special-purpose testing tools of the event generators family.

Contacts

Introduction

Particle Guns are a group of special-purpose testing tools, implemented within CMSSW. They are widely used in CMS for variety of specific studies or for debugging purposes. They are divided into 2 categories - Particle Guns and Pythia6-based Particle Guns, - and currently belong to 2 separate packages: IOMC/ParticleGuns and GeneratorInterface/Pythia6Interface.

Particle Guns in its simplest form are just PDG particle ID combined with a 4-momentum, which is in its turn calculated according to one of another algorithm.

Pythia6-based Particle Guns not only define PDG particle ID combined with a 4-momentum, but in addition they allow to use Pythia6 multi-purpose event generator to decay unstable resonances.

Algorithms employed to determine kinematics of particles in the Guns and some of the implementation details are given below in this document.

Each gun is implemented as a separate CMSSW plugin module.

There are certain similarities in the functionality of some of the simple Particle Guns and Pythia6-based Particle Guns, as well as in their configuration interfaces which we try to keep as uniform as possible accross these tools.

Since the Guns belong to the event generators family, their inclusion in the event processing chain follows the same rules as apply to other event generators. The rules are briefly described in the Workbook.
However, we would like to remind that there is a single label "generator" must be used in production applications, no matter what is the Gun of your choice.

The output of all the Guns is edm::HepMCProduct; detailed materials can be found in SWGuideDataFormatsGeneratorInterface.

The event loop in the case of Particle Guns is always driven by the EmptySource.

Description of the Particle Gun Modules

These tools belong to the IOMC/ParticleGuns package.

All Particle Guns can generate one or several particles, specified as their PDG ID's, coming from the same vertex (0,0,0).
Each particle can be also complemented by its anti-particle (if exists; otherwise another particle of the same ID) with the opposite (px,py,pz).
Another comonality among the Guns is that they typically generate particle that are uniformly distributed in the user-specified phi-range. The exception is the MultiParticleInConeGunProducer, which will be described separately.

A skeleton configuration for a Particle Gun is show below; here XXX stands for the type of Gun:

process.generator = cms.EDProducer("XXXGunProducer",
    PGunParameters = cms.PSet(
        PartID = cms.vint32(11),
        MaxPhi = cms.double(3.14159265359),
        MinPhi = cms.double(-3.14159265359) ## in radians
        ..........................
    ),
    Verbosity = cms.untracked.int32(0), ## set to 1 (or greater)  for printouts
    AddAntiParticle = cms.bool(True),
)

Please note that, with the exception of the verbosity key (false by default), all configuration parameters are tracked, i.e. there are NO DEFAULT's for them; a user must explicitly configure the tools for her/his specific needs.

FlatRandomEGunProducer

This Particle Gun will generate one or more particles, all coming from the same vertex (0,0,0) and uniformly distributed in the user-specified phi-, eta- and energy-range.
Example configuration will look like this:

process.generator = cms.EDProducer("FlatRandomEGunProducer",
    PGunParameters = cms.PSet(
        PartID = cms.vint32(11),
        MinPhi = cms.double(-3.14159265359),
        MaxPhi = cms.double(3.14159265359), ## in radians
        MinEta = cms.double(-2.0),
        MaxEta = cms.double(2.0),
        MinE = cms.double(1.), # in GeV
        MaxE = cms.double(20.0)
    ),
    Verbosity = cms.untracked.int32(0), ## set to 1 (or greater)  for printouts
    AddAntiParticle = cms.bool(True),
)

FlatRandomPtGunProducer

This Particle Gun will generate one or several particles, all coming from the same vertex (0,0,0) and uniformly distributed in the user-specified phi, eta-, and pt-range.
Example configuration will look like this:

process.generator = cms.EDProducer("FlatRandomPtGunProducer",
    PGunParameters = cms.PSet(
        PartID = cms.vint32(11),
        MinPhi = cms.double(-3.14159265359),
        MaxPhi = cms.double(3.14159265359), ## in radians
        MinEta = cms.double(-2.0),
        MaxEta = cms.double(2.0),
        MinPt = cms.double(1.), # in GeV
        MaxPt = cms.double(20.0)
    ),
    Verbosity = cms.untracked.int32(0), ## set to 1 (or greater)  for printouts
    AddAntiParticle = cms.bool(True),
)

FlatRandomEThetaGunProducer

FlatRandomPtThetaGunProducer

FlatRandomOneOverPtGunProducer

ExpoRandomPtGunProducer

MultiParticleInConeGunProducer

Description of the Pythia6-based Particle Gun Modules

As already mentioned above, Pythia6-based Particle Guns bear lots of similarity to the simple Guns described above. This is also reflected in their configuration interfaces.

They generate one or more particles coming from a single vertex (0,0,0). The kinematics of each particle is calculated according to the criteria specified by the user via the configuration interface (parameter set) of each tool.

The important difference is that the Guns of this group employ Pythia6 multi-purpose event generator to decay unstable particles. For this reason the configuration interface also includes parameters that are specific to Pythia6Interface. In particular, Pythia6-oriented part of the configuration parameters allows a user to select specific decay mode(s) for the gun particles; if a user does not specify her/his choice of the decay mode for a given particle, the decays will be generated in the generic way, according to Pythia6 decay tables.

With the exception of the verbosity keys (all false or zero by default), all configuration parameters are tracked, i.e. there are NO DEFAULT's, and the user must explicitly configure each tool.

The tools are located in the GeneratorInterface/Pythia6Interface package.

Pythia6EGun

In terms of specifying gun particles and their kinematics, this tool does exactly the same thing as FlatRandomEGunProducer (described above): eta, phi and energy of each particle are uniformly generated in the user-specified range. This information is then passed to the Pythia6 generator, which forms the initial event record and models the decays (if applicable).

Example configuration for the Pythia6-based flat-energy particle gun is shown below. This example illustrates not only how to define gun particles (J/psi in this case) of certain kinematics, but also how to configure Pythia6 to decay the gun particles in a specific way: note pythiaJpsiDecays subset of configuration cards within the PythiaParameters PSet.

process.generator = cms.EDProducer("Pythia6EGun",
    maxEventsToPrint = cms.untracked.int32(5),
    pythiaPylistVerbosity = cms.untracked.int32(1),
    pythiaHepMCVerbosity = cms.untracked.bool(True),
    PGunParameters = cms.PSet(
       ParticleID = cms.vint32(443,443),
       AddAntiParticle = cms.bool(False),
       MinPhi = cms.double(-3.14159265359),
       MaxPhi = cms.double(3.14159265359),
       MinE = cms.double(0.0),
       MaxE = cms.double(50.0),
       MinEta = cms.double(0.0),
       MaxEta = cms.double(2.4)
    ),
    PythiaParameters = cms.PSet(
        process.pythiaUESettingsBlock,
        pythiaJpsiDecays = cms.vstring('MDME(858,1)=1                 ! J/psi -> ee turned ON', 
            'MDME(859,1)=1                 ! J/psi -> mumu turned ON', 
            'MDME(860,1)=0                 ! J/psi -> random turned OFF'),
        # This is a vector of ParameterSet names to be read, in this order
        parameterSets = cms.vstring('pythiaUESettings', 
            'pythiaJpsiDecays')
    )
)

Pythia6PtGun

This tool defines the gun particles and their kinematics in the same way as FlatRandomPtGunProducer: eta, phi and pt of each particle are uniformly generated in the user-specified range. In order to calculate energy of the particle, the particle mass is retrieved from the Pythia6 table. The kinematics is passed back to the Pythia6, together with the particle ID's, the initial event record is formed, and decays of the unstable particles are modeled with Pythia6.

Example configuration is shown below. Please note that this example aims at generating tau-jets; you may note that in the pythiaTauJets subset of configuration cards within PythiaParameters PSet the decays of tau's to muons or electrons are turned off.

process.generator = cms.EDProducer("Pythia6PtGun",
    maxEventsToPrint = cms.untracked.int32(5),
    pythiaPylistVerbosity = cms.untracked.int32(1),
    pythiaHepMCVerbosity = cms.untracked.bool(True),    
    PGunParameters = cms.PSet(
        ParticleID = cms.vint32(-15),
        AddAntiParticle = cms.bool(False),
        MinPhi = cms.double(-3.14159265359),
        MaxPhi = cms.double(3.14159265359),
        MinPt = cms.double(50.0),
        MaxPt = cms.double(50.0001),
        MinEta = cms.double(-2.4),
        MaxEta = cms.double(2.4)
    ),
    PythiaParameters = cms.PSet(
        pythiaTauJets = cms.vstring(
            'MDME(89,1)=0      ! no tau->electron',
            'MDME(90,1)=0      ! no tau->muon'
        ),
        pythiaUESettings = cms.vstring(
            'MSTJ(11)=3     ! Choice of the fragmentation function',
            'MSTJ(22)=2     ! Decay those unstable particles',
            'PARJ(71)=10 .  ! for which ctau  10 mm',
            'MSTP(2)=1      ! which order running alphaS',
            'MSTP(33)=0     ! no K factors in hard cross sections',
            'MSTP(51)=7     ! structure function chosen',
            'MSTP(81)=1     ! multiple parton interactions 1 is Pythia default',
            'MSTP(82)=4     ! Defines the multi-parton model',
            'MSTU(21)=1     ! Check on possible errors during program execution',
            'PARP(82)=1.9409   ! pt cutoff for multiparton interactions',
            'PARP(89)=1960. ! sqrts for which PARP82 is set',
            'PARP(83)=0.5   ! Multiple interactions: matter distrbn parameter',
            'PARP(84)=0.4   ! Multiple interactions: matter distribution parameter',
            'PARP(90)=0.16  ! Multiple interactions: rescaling power',
            'PARP(67)=2.5    ! amount of initial-state radiation',
            'PARP(85)=1.0  ! gluon prod. mechanism in MI',
            'PARP(86)=1.0  ! gluon prod. mechanism in MI',
            'PARP(62)=1.25   ! ',
            'PARP(64)=0.2    ! ',
            'MSTP(91)=1     !',
            'PARP(91)=2.1   ! kt distribution',
            'PARP(93)=15.0  ! '
        ),
        parameterSets = cms.vstring(
            'pythiaUESettings',
            'pythiaTauJets'
        )
    )
)

Example configuration for the Pythia6-based flat-energy particle gun is shown below.

Pythia6PtYDistGun

Pythia6JetGun

Pythia6PartonEGun

Pythia6PartonPtGun

Explain what a user needs to know when using the algorithm:

  • when to use this algorithm
  • configuration sequences
  • default parameters
  • how (and why) to change the default parameters
  • products

Algorithm documentation or Implementation details

Explain the design of the algorithm to ensure that the software can be maintained once the existing authors have left:
  • design arguments - why this is done as it is done
  • description of algorithm.

Testing

Review status

Reviewer/Editor and Date (copy from screen) Comments
KatiLassilaPerini - 06 Feb 2007 created template page

Responsible: FabioCossutti, FabianStoeckli, JuliaYarba

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2010-02-18 - JuliaYarba
 
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback