The DECFILES Package

Automatic generation of DecFiles options for DC06 Users Guide

The goal is to generate the options for all EventType in as much a generic and flexible way as possible. The EventType is for the configuration options for the different type of events we want to simulate in Gauss.

How to get the scripts to produce the options for an eventtype from the decay file

This script can be downloaded with all the others Gen/DecFiles executing:

$ getpack Gen/DecFiles

We will take the latest version. It will create in our account a Gen/DecFiles/version directory with all the files we need.

Once the files are in our account, to create the options files, we could execute:

$ source Gen/DecFiles/v12r3/cmt/setup.csh

for the v12r3 version.

It will execute the create_options script for us without any arguments, that will generate the options files for all the decfiles found in the directory Gen/DecFiles/version/dkfiles.

There is also another way to create them, a single option file or execute with the clean argument.

The script can be executed by hand. It is placed in the Gen/DecFiles/version/cmt directory, and the way to use it is as follows:

1. $ python create_options.py
2. $ python create_options.py DECAY_NAME
3. $ python create_options.py DECAY_NAME clean

1. With this instruction the script will create the options files for all the decfiles ( .dec ) in dkfiles directory.
2. It creates the option file for the decfile given as argument.
3. It creates the option file for the decfile given as argument with the clean option.

The options files will be created if they have not been created before. If one options file exists, we should remove it before create another new one. In order to overwrite an options file, the previous one must be deleted as well.

How to write a valid decay file

As it has been mentioned before, the goal is to generate the options for all EventType in as much a generic and flexible way as possible.

For this reason some keywords have been defined, which should be found in the DecFiles ( someones are mandatory, others optional ). All the mandatory keywords have to be found, if not the generation for the corresponding dec file crashes and the options file is not created. For the optional keywords, if present they should have a valid value, to avoid problems.

These DecFiles should be present in the dkfiles directory. The script will generate the options for the given DecFile, when passed as argument of the script, if it's present there. In the case no argument was given, it will generate the options for all ones in the directory.

The DecFiles must have .dec extension.

In the DecFile, all the keywords must be written like below:

# <keyword>: <value> ( or values depending on the keyword )

For example:

# EventType: 10000000
# NickName: incl_b

Keywords rules

EventType

The value must have 8 digits, GSDCTNXU.

The GSDC digits are the only relevant for the generation of the options, the others need to be deduced or read in from special keyword relevant only for the particle gun.

Digit G cannot be 0.

If necessary, refer to Note LHCb-2005-034 for some other explanation.

Descriptor

Because of the limitations of the Book-keeping entry, cannot be longer than 256 characters.

If a descriptor longer than 256 characters is found the scripts will stop the process for the current dkfile without creating the corresponding options file. In that case a warning message will be shown.

NickName

Because of the limitations of the Book-keeping entry, cannot be longer than 256 characters. As in the descriptor rules, if the value of this keyword is longer than 256 characters the options file will not be created, and a warning message would be shown.

The NickName should be the same that the name of the DecFile.

For example:

For the DecFile D0_mumu.dec, the NickName value should be D0_mumu. That's the value will be used in the options file in the corresponding lines.

For the file Bs_cmu,mu.dec, the value will be Bs_cmu,mu.

The Nicknames follow a set of simple rules that are outlined in Note LHCb-2005-034.

Production (optional)

For the moment the default value for this keyword is Pythia, even if it is not found in the dkfile. Anyway, the keyword should be found in the DecFile.

ExtraOptions (optional)

Some other options can be added to the options file if we desire. This keyword allows us to include some others options from a file. For that purpose a file name has to be written beside the ExtraOptions keyword.

It means the options from the file beside the ExtraOptions will be available in the new one.

For example: if we write

# ExtraOptions: BeamGasVeLo

, in the new options file we will write

#include "$DECFILESROOT/options/BeamGasVeLo.opts

so the options in BeamGasVelo will be also availables for the new file.

ParticleTable (optional)

If this keyword is present, it means we want that a particle table was specified.

For example, in a dec file where we find:

# ParticleTable: mH=140GeV

in the options file will appear

ParticlePropertySvc.OtherFiles = "$DECFILESROOT/ppdata/mH=140GeV.txt";

ParticleValue (optional)

If this keyword is present, it means some particle properties are to be modified passing them as options to the ParticlePropertySvc.

For example, if a dec file has:

# ParticleValue: "H_20 88 35 0.0 120.0 9.4e-26 Higgs'0 35 0.0e+00" , "H_30 89 36 0.0 35.0 1.0e-10 A0 36 0.0e+00"

this will be translated in the options file as

ParticlePropertySvc.Particles = { "H_20 88 35 0.0 120.0 9.4e-26 Higgs'0 35 0.0e+00" , "H_30 89 36 0.0 35.0 1.0e-10 A0 36 0.0e+00" };

DecayEngine (optional)

If present it must have a value, and it means that another decay engine than EvtGen has to be used.

# DecayEngine: EvtGen

in a dec file becomes, in the options file,

Generation.DecayTool = "EvtGenDecay";

Cuts (optional)

This keyword tells us which type of tool for the cuts needs to be used. If we find in a dec file

# Cuts: DaughtersInLHCb

in the corresponding options file becomes

Generation.SignalRepeatedHadronization.CutTool = "DaughtersInLHCb";

By default in the code the LHCbAcceptance tool is applied, to remove it one can give an empty argument to the keyword

# Cuts:

that in the corresponding options file will be translated to

Generation.SignalRepeatedHadronization.CutTool = "";

FullEventCuts (optional)

The value of this keyword specifies which type of tool for the full event generator cuts needs to be used.

So, one line in a dec file as follows

# FullEventCuts: LeptonInAcceptance

will become, in the corresponding options file, as

Generation.FullEventCutTool = "LeptonInAcceptance";

Momentum

When the Event type ( GSDCTNXU ) has G=5 the options to write are special and most of the other rules doesn't applies.

For this case, there is another “special” keyword, called Momentum, which allows us to create new options files.

This keyword will be mandatory when G=5 and C=0 ( G and C values from the Event Type number ).

The Momentum keyword can take one or more values.

# Momentum: 1*GeV 10*GeV 33.8*GeV

all of them separate by one blank.

For the example above, three options files will be written: 56000001.opts, 56000010.opts and 56000034.opts, each one with differents options.

Examples

File minbias.dec:

#
# EventType: 30000000
# Descriptor: pp => ?
# Production: Pythia
# NickName: minbias
#
# Physics:
#
End

File gamma.dec:

#
# EventType: 56000000
# Descriptor: gamma => ?
# NickName: gamma
# Momentum: 5*GeV 10*GeV 33.8*GeV
#

This page was made by M Barbera on September 21, 2006

Last edited by G.Corti on February 8, 2007