Difference: NewAlpgenInterface (1 vs. 7)

Revision 72009-05-25 - ThiagoTomei

Line: 1 to 1
 
META TOPICPARENT name="ThiagoTomei"

Alpgen Interface to CMSSW

%COMPLETE5%
Line: 112 to 112
 
  • compile the packages: scram b
</>
<--/twistyPlugin-->
Changed:
<
<

Links

>
>

Documentation

 
Changed:
<
<
>
>
 
  • An Alpgen tutorial. This will show you how the produce the unweighted events for further treatment by CMSSW Alpgen.
Deleted:
<
<
 

FAQ

Changed:
<
<

Why must I use Alpgen standalone code before using AlpgenInterface?

>
>
These are specific questions about CMSSW Alpgen. For general Alpgen questions, please refer to the AlpgenFAQ.

Why must I use Alpgen standalone code before using CMSSW Alpgen?

 Due to the structure of the Alpgen code, full integration with CMSSW is difficult. A "standard" Alpgen session involves (besides compilations) three different steps:
  • Running an executable with a certain flag (imode = 1) to generate weighted events, that are saved to a .wgt file.
  • Running the same executable with a different flag (imode = 2) to unweigh those events, which are then save to a .unw file.
Line: 167 to 168
  %RESPONSIBLE% Thiago Tomei, Maurizio Pierini and (ad interim) Filip Moortgat
%REVIEW% Paolo Bartalini
Deleted:
<
<

-- ThiagoTomei - 31 Mar 2009

Revision 62009-05-22 - ThiagoTomei

Line: 1 to 1
 
META TOPICPARENT name="ThiagoTomei"

Alpgen Interface to CMSSW

%COMPLETE5%
Line: 13 to 13
  To interface Alpgen to CMSSW and pass the events to Pythia, the AlpgenInterface package has been written. AlpgenInterface is a CMSSW package in the GeneratorInterface subsystem that allows the user to read in unweighted Alpgen events and generation parameters and save them in a standard format (Les Houches format) as CMSSW objects (LHEEventProduct and LHERunInfoProduct, collectively called LHE products.). It is also possible, through the use of the JetMatchingAlpgen class present in the PartonShowerVeto package, to perform the parton shower and hadronization steps from within CMSSW, writing a full-fledged edm::HepMCProduct in the event (edm::Event).
Changed:
<
<
The set (AlpgenInterface + JetMatchingAlpgen class from PartonShowerVeto), refered hereafter as CMSSW Alpgen, is essentially equivalent to the AlpgenInterface package of the previous CMSSW versions (CMSSW 1_X_Y and 2_X_Y). It must be kept in mind, however, that CMSSW Alpgen only implements the very final step of Alpgen generation - format shift, showering, matching and hadronization. In order to use CMSSW Alpgen, the user must use the Alpgen standalone code to generate unweighted Alpgen events, which will be the input to CMSSW Alpgen. For more information on the intrincacies of Alpgen, please take a look at the FAQ. Also, we strongly encourage the user to look at the Alpgen documentation - many of the concepts mentioned in this documentation are fully explained there.
>
>
The set (AlpgenInterface + JetMatchingAlpgen class from PartonShowerVeto), refered hereafter as CMSSW Alpgen, is essentially equivalent to the AlpgenInterface package of the previous CMSSW versions (CMSSW 1_X_Y and 2_X_Y). It must be kept in mind, however, that CMSSW Alpgen only implements the very final step of Alpgen generation - format shift, showering, matching and hadronization. In order to use CMSSW Alpgen, the user must use the Alpgen standalone code to generate unweighted Alpgen events, which will be the input to CMSSW Alpgen. We strongly encourage the user to look at the Alpgen documentation - many of the concepts mentioned in this documentation are fully explained there.
  In general, the components of CMSSW Alpgen (AlpgenInterface and PartonShowerVeto packages) are integrated into a CMSSW release. The goals of this page are:
  • To show the user how to use the standard CMSSW Alpgen as provided in the CMSSW release.
Line: 25 to 25
 

Generating the sample

Changed:
<
<
The sample generation must be done with Alpgen standalone. See information on https://twiki.cern.ch/twiki/bin/view/Main/CmsAlpgen.
>
>
The sample generation must be done with Alpgen standalone, as described above. See information on https://twiki.cern.ch/twiki/bin/view/Main/CmsAlpgen.
 

Using CMSSW Alpgen

Added:
>
>

Basic Example

  • checkout the test subdirectory: cd CMSSW_3_1_X/src; cvs co GeneratorInterface/AlpgenInterface/test
  • run the example: cd GeneratorInterface/AlpgenInterface/test; cmsRun testAlpgenComplete_cfg.py
  • 100 W to electron+neutrino events should have been produced
  • Check for the presence of the HepMCProduct, the LHERunInfoProduct and the LHEEventProduct in the ROOT files.

This example runs on the example input file w2j.unw (containing previously produced unweighted events) that resides in the same directory. The AlpgenSource will read in the events from this file and create the LHE products in the edm::Event. In sequence, the Pythia6HadronizerFilter will do the hadronization/showering, and will call the JetMatchingAlpgen to veto the events that don't pass the MLM procedure, according to the configurations given. Finally, the events are converted into [[HepMCFormat][HepMC format]] and an EDM ROOT output file is produced.

 

Using the AlpgenInterface package

Added:
>
>
This example shows how to use the AlpgenInterface package. It shows how to setup the AlpgenSource, read in events from an ALPGEN .unw file into the edm::Event, and write the events in LHE (XML) format.
 The AlpgenInterface package provides a facility to format shift the events produced by Alpgen standalone (unweighted events, or UNW events for short) into CMSSW objects (LHEEventProduct). By the same token, the generation parameters (usually written in the file with ending _unw.par) are packaged into a LHERunInfoProduct. This facility is implemented as an EDSource, AlpgenSource, part of the AlpgenInterface package. If you want to use the standard AlpgenInterface provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language, configuring and using the AlpgenSource. The AlpgenSource has only one configurable setting:

name type description default
Line: 40 to 52
  fileNames = cms.untracked.vstring('file:w2j')
Deleted:
<
<
This example shows how to setup the AlpgenSource, and demonstrates writing the events in LHE (XML) format.
 

Using the JetMatchingAlpgen class

Added:
>
>
This example shows how to use the Pythia6HadronizerFilter module and the JetMatchingAlpgen class to perform parton shower, hadronization and matching in events produced by the AlpgenSource.
 The JetMatchingAlpgen class, a component of the PartonShowerVeto package, provides an Alpgen-tailored interface to the Pythia 6 code already integrated in CMSSW. With the JetMatchingAlpgen class, it is possible to perform parton shower and hadronization in a collection of LHEEventProduct produced by AlpgenSource, all from within the CMSSW framework. The JetMatchingAlpgen class is designed as an auxiliary class to the Pythia6HadronizerFilter module, which provides the foundations for the communication in between Pythia 6 (FORTRAN code) and CMSSW (C++ code). If you want to use the JetMatchingAlpgen class as provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language, configuring and using the Pythia6HadronizerFilter module. The Pythia6HadronizerFilter module has the following configurable settings

name type description default
Line: 81 to 94
 
etMin double Minimum transverse energy for matched cluster 25.0
drMin double deltaR for matched clusters 0.7
Deleted:
<
<
This example shows how to use the Pythia6HadronizerFilter module and the JetMatchingAlpgen class to perform parton shower, hadronization and matching in events produced by the AlpgenSource.
 

Compiling the CMSSW Alpgen packages

If you want to change the way CMSSW Alpgen packages work, or use a different version from the one provided in your version of CMSSW, you must checkout and/or edit the source code and compile it. There are different steps to be followed in order to do that, depending on your CMSSW version.
Line: 101 to 112
 
  • compile the packages: scram b
</>
<--/twistyPlugin-->
Deleted:
<
<

Example for running CMSSW Alpgen on an input UNW events file

Instructions for CMSSW_3_1_X

  • checkout the test subdirectory: cd CMSSW_3_1_X/src; cvs co GeneratorInterface/AlpgenInterface/test
  • run the example: cd GeneratorInterface/AlpgenInterface/test; cmsRun testAlpgenComplete_cfg.py
  • 100 W to electron+neutrino events should have been produced
  • Check for the presence of the HepMCProduct, the LHERunInfoProduct and the LHEEventProduct in the ROOT files.

This example runs on the example input file w2j.unw (containing previously produced unweighted events) that resides in the same directory. The AlpgenSource will read in the events from this file and create the LHE products in the edm::Event. In sequence, the Pythia6HadronizerFilter will do the hadronization/showering, and will call the JetMatchingAlpgen to veto the events that don't pass the MLM procedure, according to the configurations given. Finally, the events are converted into HepMC format and an EDM ROOT output file is produced.

 

Links

Revision 52009-05-12 - ThiagoTomei

Line: 1 to 1
 
META TOPICPARENT name="ThiagoTomei"

Alpgen Interface to CMSSW

%COMPLETE5%
Line: 139 to 139
 
  • One LHEEventProduct per edm::Event, representing the matrix element level event produced by Alpgen.
  • One LHERunInfoProduct per edm::Run, representing the information of the "generation run".
Changed:
<
<
The LHERunInfoProduct has, within it, a copy of the _unw.par, .wgt and .par files, in the form of a trio of LHERunInfoProduct::Header. You can recover that information and regenerate those files. A possible use case would be to, given the .wgt and .par files, regenerate the .unw file and perform the matching again with different settings. A implementation of that functionality is given in the AlpgenExtractor module, and an example of its usage is given here.
>
>
The LHERunInfoProduct has, within it, a copy of the _unw.par, .wgt and .par files, in the form of a trio of LHERunInfoProduct::Header. You can recover that information and regenerate those files. A possible use case would be to, given the .wgt and .par files, regenerate the .unw file and perform the matching again with different settings. An implementation of that functionality is given in the AlpgenExtractor module, and an example of its usage is given here.
 

Why was the old AlpgenInterface functionality split over two pieces (AlpgenSource and JetMatchingAlpgen)? How do I use the two pieces?

The separation was a design decision by the CMS Generators group, documented in https://twiki.cern.ch/twiki/bin/view/CMS/GeneratorMigration. The pieces are independent in the sense that they belong to different packages (AlpgenInterface and PartonShowerVeto), but they are meant to be used together. What has become possible now, thanks to this new design, is the following workflow:

Revision 42009-03-31 - ThiagoTomei

Line: 1 to 1
 
META TOPICPARENT name="ThiagoTomei"

Alpgen Interface to CMSSW

%COMPLETE5%
Line: 34 to 34
 The AlpgenInterface package provides a facility to format shift the events produced by Alpgen standalone (unweighted events, or UNW events for short) into CMSSW objects (LHEEventProduct). By the same token, the generation parameters (usually written in the file with ending _unw.par) are packaged into a LHERunInfoProduct. This facility is implemented as an EDSource, AlpgenSource, part of the AlpgenInterface package. If you want to use the standard AlpgenInterface provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language, configuring and using the AlpgenSource. The AlpgenSource has only one configurable setting:

name type description default
Changed:
<
<
fileNames untracked vstring Names of files containing the UNW events. n/a
>
>
fileNames untracked vstring Names of files containing the UNW events. n/a
 
Changed:
<
<
CAVEAT: although the fileNames parameter is, by construction, a vector of strings, the AlpgenSource does not accept more than one file at a time. Also, that file has to be local, i.e., it has to be accessed using the file: scheme. Finally, the file name has to be given without the .unw suffix. So, if your file is called w2j.unw, the correct setting is
>
>
CAVEAT: although the fileNames parameter is, by construction, a vector of strings, the AlpgenSource does not accept more than one file at a time. Also, that file has to be local, i.e., it has to be accessed using the file: scheme. Finally, the file name has to be given without the .unw suffix. So, if your file is called w2j.unw, the correct setting is
  fileNames = cms.untracked.vstring('file:w2j')
Line: 61 to 61
 
PythiaParameters = cms.PSet(
        pythiaUESettingsBlock,
Changed:
<
<
processParameters = cms.vstring('MSEL=0 ! User defined processes',
>
>
processParameters = cms.vstring( 'MSEL=0 ! User defined processes',
  'MSTJ(1)=1 ! Fragmentation/hadronization on or off', 'MSTJ(11)=3 ! Choice of the fragmentation function'), # This is a vector of ParameterSet names to be read, in this order
Changed:
<
<
parameterSets = cms.vstring('pythiaUESettings',
>
>
parameterSets = cms.vstring( 'pythiaUESettings',
  'processParameters') ),
Line: 79 to 81
 
etMin double Minimum transverse energy for matched cluster 25.0
drMin double deltaR for matched clusters 0.7
Changed:
<
<
This example shows how to use the Pythia6HadronizerFilter module and the JetMatchingAlpgen class to perform parton shower, hadronization and matching in events produced by the AlpgenSource.
>
>
This example shows how to use the Pythia6HadronizerFilter module and the JetMatchingAlpgen class to perform parton shower, hadronization and matching in events produced by the AlpgenSource.
 

Compiling the CMSSW Alpgen packages

If you want to change the way CMSSW Alpgen packages work, or use a different version from the one provided in your version of CMSSW, you must checkout and/or edit the source code and compile it. There are different steps to be followed in order to do that, depending on your CMSSW version.
Line: 108 to 110
 
  • Check for the presence of the HepMCProduct, the LHERunInfoProduct and the LHEEventProduct in the ROOT files.

This example runs on the example input file w2j.unw (containing previously produced unweighted events) that resides in the same directory.

Changed:
<
<
The AlpgenSource will read in the events from this file and create the LHE products in the edm::Event. In sequence, the Pythia6HadronizerFilter will do the hadronization/showering, and will call the JetMatchingAlpgen to veto the events that don't pass the MLM procedure, according to the configurations given. Finally, the events are converted into HepMC format and an EDM ROOT output file is produced.
>
>
The AlpgenSource will read in the events from this file and create the LHE products in the edm::Event. In sequence, the Pythia6HadronizerFilter will do the hadronization/showering, and will call the JetMatchingAlpgen to veto the events that don't pass the MLM procedure, according to the configurations given. Finally, the events are converted into HepMC format and an EDM ROOT output file is produced.
 

Links

Revision 32009-03-31 - ThiagoTomei

Line: 1 to 1
 
META TOPICPARENT name="ThiagoTomei"

Alpgen Interface to CMSSW

%COMPLETE5%
Line: 11 to 11
 It produces matrix element (ME) level events which are consecutively passed to a parton shower (PS) / hadronization code (like Pythia or HERWIG) for further event development. Using the MLM ME/PS matching procedure, one can combine the matrix element calculations with parton showers while avoiding double-counting. This allows for the best Monte Carlo prediction of multi-jet final states at this moment.
Changed:
<
<
To interface Alpgen to CMSSW and pass the events to Pythia, the AlpgenInterface package has been written. AlpgenInterface is a CMSSW package in the GeneratorInterface subsystem that allows the user to read in unweighted Alpgen events and generation parameters and save them in a standard format (Les Houches format) as CMSSW objects (LHEEventProduct and LHERunInfoProduct). It is also possible, through the use of the JetMatchingAlpgen module present in the PartonShowerVeto package, to perform the parton shower and hadronization steps from within CMSSW, writing a full-fledged edm::HepMCProduct in the event (edm::Event).
>
>
To interface Alpgen to CMSSW and pass the events to Pythia, the AlpgenInterface package has been written. AlpgenInterface is a CMSSW package in the GeneratorInterface subsystem that allows the user to read in unweighted Alpgen events and generation parameters and save them in a standard format (Les Houches format) as CMSSW objects (LHEEventProduct and LHERunInfoProduct, collectively called LHE products.). It is also possible, through the use of the JetMatchingAlpgen class present in the PartonShowerVeto package, to perform the parton shower and hadronization steps from within CMSSW, writing a full-fledged edm::HepMCProduct in the event (edm::Event).
 
Changed:
<
<
The set (AlpgenInterface + JetMatchingAlpgen code from PartonShowerVeto), refered hereafter as CMSSW Alpgen, is essentially equivalent to the AlpgenInterface package of the previous CMSSW versions (CMSSW 1_X_Y and 2_X_Y). It must be kept in mind, however, that CMSSW Alpgen only implements the very final step of Alpgen generation - format shift, showering, matching and hadronization. In order to use CMSSW Alpgen, the user must use the Alpgen standalone code to generate unweighted Alpgen events, which will be the input to CMSSW Alpgen. For more information on the intrincacies of Alpgen, please take a look at the FAQ. Also, we strongly encourage the user to look at the Alpgen documentation.
>
>
The set (AlpgenInterface + JetMatchingAlpgen class from PartonShowerVeto), refered hereafter as CMSSW Alpgen, is essentially equivalent to the AlpgenInterface package of the previous CMSSW versions (CMSSW 1_X_Y and 2_X_Y). It must be kept in mind, however, that CMSSW Alpgen only implements the very final step of Alpgen generation - format shift, showering, matching and hadronization. In order to use CMSSW Alpgen, the user must use the Alpgen standalone code to generate unweighted Alpgen events, which will be the input to CMSSW Alpgen. For more information on the intrincacies of Alpgen, please take a look at the FAQ. Also, we strongly encourage the user to look at the Alpgen documentation - many of the concepts mentioned in this documentation are fully explained there.
  In general, the components of CMSSW Alpgen (AlpgenInterface and PartonShowerVeto packages) are integrated into a CMSSW release. The goals of this page are:
  • To show the user how to use the standard CMSSW Alpgen as provided in the CMSSW release.
Line: 21 to 21
 
  • To show the user how to run the AlpgenInterface on a set of unweighted events produced by Alpgen.
  • To show the user how to run the PartonShowerVeto package on a set of LHE Events produced by AlpgenInterface
  • To provide answers to some Frequently Asked Questions.
Changed:
<
<
  • To provide an entry point for the CMSSW Alpgen documentation.
>
>
  • To provide an entry point for documentation of usage of the Alpgen generator in CMS.
 

Generating the sample

Line: 29 to 29
 

Using CMSSW Alpgen

Changed:
<
<

Using the AlpgenInterface package

>
>

Using the AlpgenInterface package

The AlpgenInterface package provides a facility to format shift the events produced by Alpgen standalone (unweighted events, or UNW events for short) into CMSSW objects (LHEEventProduct). By the same token, the generation parameters (usually written in the file with ending _unw.par) are packaged into a LHERunInfoProduct. This facility is implemented as an EDSource, AlpgenSource, part of the AlpgenInterface package. If you want to use the standard AlpgenInterface provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language, configuring and using the AlpgenSource. The AlpgenSource has only one configurable setting:

name type description default
fileNames untracked vstring Names of files containing the UNW events. n/a

CAVEAT: although the fileNames parameter is, by construction, a vector of strings, the AlpgenSource does not accept more than one file at a time. Also, that file has to be local, i.e., it has to be accessed using the file: scheme. Finally, the file name has to be given without the .unw suffix. So, if your file is called w2j.unw, the correct setting is

fileNames = cms.untracked.vstring('file:w2j')

This example shows how to setup the AlpgenSource, and demonstrates writing the events in LHE (XML) format.

Using the JetMatchingAlpgen class

The JetMatchingAlpgen class, a component of the PartonShowerVeto package, provides an Alpgen-tailored interface to the Pythia 6 code already integrated in CMSSW. With the JetMatchingAlpgen class, it is possible to perform parton shower and hadronization in a collection of LHEEventProduct produced by AlpgenSource, all from within the CMSSW framework. The JetMatchingAlpgen class is designed as an auxiliary class to the Pythia6HadronizerFilter module, which provides the foundations for the communication in between Pythia 6 (FORTRAN code) and CMSSW (C++ code). If you want to use the JetMatchingAlpgen class as provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language, configuring and using the Pythia6HadronizerFilter module. The Pythia6HadronizerFilter module has the following configurable settings

 
Deleted:
<
<
The AlpgenInterface package provides a facility to format shift the events produced by Alpgen standalone (unweighted events, UNW events for short) into CMSSW objects (LHEEventProduct). By the same token, the generation parameters (usually written in the file with suffix .unw) are made into a LHERunInfoProduct. This facility is implemented as a an EDSource, AlpgenSource, part of the AlpgenInterface package. If you want to use the standard AlpgenInterface provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language and use the AlpgenSource. The AlpgenSource has only one setting the following settings:
 
name type description default
pythiaPylistVerbosity untracked int32 Verbosity level of Pythia PYLIST calls 0
Changed:
<
<
pythiaHepMCVerbosity untracked bool Verbosity for HepMC false
>
>
pythiaHepMCVerbosity untracked bool Verbosity for HepMC False
 
maxEventsToPrint untracked int32 Number of events to print, if verbose 1
Changed:
<
<
fileNames untracked vstring Alpgen file names, minus the extensions (Required)
>
>
comEnergy double Center of mass energy (See below)
 
PythiaParameters edm::ParameterSet (See below) (See below)
Changed:
<
<
GeneratorParameters edm::ParameterSet (See below) (See below)
>
>
jetMatching edm::ParameterSet (See below) (See below)
 
Changed:
<
<
The PythiaParameters and GeneratorParameters are wrappers around vectors of strings that are passed to Pythia and Alpgen, respectively.
  • The PythiaParameters must have a single parameter set, which is a vector of strings named pythia. Inside that vector of strings are the strings that are passed to Pythia via the PYGIVE call.
  • The GeneratorParameters must have a single parameter set, which is a vector of strings name generator. Inside that vector of strings are the strings that are passed to Alpgen.

Some particular strings that are useful:

string passed to description
"MSTP(143)=1" Pythia Call the MLM matching routine in Alpgen. Use it if you generated your sample with ickkw=1.
"IXPAR(2)=1" Alpgen Set it to 1 if you're generating an exclusive sample. Set it to 0 otherwise.
"RXPAR(1)=X" Alpgen Choose the value of X to be the minimum cluster Et for matching.
"RXPAR(2)=X" Alpgen Choose the value of X to be the maximum delta R for matching.
>
>
The comEnergy parameter is, as of the time of this writing, completely dummy. You may setup it to whatever you wish - the real center of mass energy is taken from the LHERunInfoProduct. The user is, naturally, advised to keep the values consistent.
 
Changed:
<
<
>
>
The PythiaParameters parameter set is a wrapper around vectors of vectors of strings that are passed to Pythia 6, via PYGIVE calls. It is equivalent to the PythiaParameter commonly found in other generator interfaces. Here, it is usually used for two purposes: to setup the underlying event tunings, and to setup Pythia to work the way we want it to - full user control of processes, fragmentation and hadronization processes, etc. An example PythiaParameters:
 
Changed:
<
<

Compiling the AlpgenInterface package

If you want to change the way the AlpgenInterface works, or use a different version from the one provided in your version of CMSSW, you must checkout and/or edit the source code and compile it. There are different steps o be followed in order to do that, depending on your CMSSW version.
>
>
PythiaParameters = cms.PSet(
        pythiaUESettingsBlock,
        processParameters = cms.vstring('MSEL=0          ! User defined processes',
                                        'MSTJ(1)=1       ! Fragmentation/hadronization on or off',
                                        'MSTJ(11)=3      ! Choice of the fragmentation function'),
        # This is a vector of ParameterSet names to be read, in this order
        parameterSets = cms.vstring('pythiaUESettings',
                                    'processParameters')
        ),
 
Changed:
<
<

Setting up the environment

>
>
The jetMatching parameter set controls the setup of the MLM ME/PS matching procedure. It has the following configurable settings:
 
Changed:
<
<
The environmental setup depends on the CMSSW version you're using. Currently, the following versions of CMSSW have been tested:
  • CMSSW_1_6_12 (for analyzing CSA07 Monte Carlo samples)
  • CMSSW_2_1_X (for analyzing Monte Carlo Samples produced with CMSSW_2_1_X) (other than 2_1_17)
  • CMSSW_2_1_17 and CMSSW_2_2_X

WARNING

  • The AlpgenInterface has gone through a complete refactoring in the 1_6_X to 2_1_x transition. It has undergone basic validation for a subset of the processes in Alpgen - but, as in any piece of software, bugs may still lurk around, so always check your results for consistency. New bugs discovered will be fixed as soon as possible - so always check this Twiki for updated instructions. The latest tag (V00-03-00-01) is up-to-date with the latest original Alpgen code (v213, as of the time of this writing). It has undergone basic validation for the following processes:
    • W + jets
    • Z + jets
    • ttbar + jets
    • W + QQbar + jets, where Q = charm or bottom.
    • Z + QQbar + jets, where Q = charm or bottom.
    • W + charm + jets
    • Njets
  • Also, please refrain from using the EDProducer version of the code (file AlpgenProducer.cc). It is still under development, and should be ready for CMSSW 3. Use the AlpgenInterface in the "traditional" way, i.e., as a source (EDSource, file AlpgenSource.cc).
>
>
name type description default
scheme string Method used for matching - don't change! "Alpgen"
applyMatching bool Controls if matching is to be applied in this sample True
exclusive bool Controls if matching is to be done in an exclusive way True
etMin double Minimum transverse energy for matched cluster 25.0
drMin double deltaR for matched clusters 0.7
 
Changed:
<
<

Instructions for CMSSW_1_6_12

<--/twistyPlugin twikiMakeVisibleInline-->
  • make your local release, for example scramv1 project CMSSW CMSSW_1_6_12
  • go to the source directory of your release: cd CMSSW_1_6_12/src
  • set the cvs root: project CMSSW
  • set the shell environment: eval `scramv1 runtime -sh` (or for cshell/tcshell: eval `scramv1 runtime -csh`)
  • check out the package directory: cvs co -r CMSSW_1_6_12 GeneratorInterface/AlpgenInterface
  • check out a bugfix: cvs co -r V00-02-20 GeneratorInterface/AlpgenInterface/src/AlpgenEmptyEventFilter.cc
  • compile the bugfix: scramv1 b
>
>
This example shows how to use the Pythia6HadronizerFilter module and the JetMatchingAlpgen class to perform parton shower, hadronization and matching in events produced by the AlpgenSource.
 
Changed:
<
<
In this release, the Generator information is saved in the ROOT file by means of the AlpgenInfoProduct object (source and header files).
<--/twistyPlugin-->
>
>

Compiling the CMSSW Alpgen packages

If you want to change the way CMSSW Alpgen packages work, or use a different version from the one provided in your version of CMSSW, you must checkout and/or edit the source code and compile it. There are different steps to be followed in order to do that, depending on your CMSSW version.
 
Changed:
<
<

Instructions for CMSSW_2_1_X, other than 2_1_17

<--/twistyPlugin twikiMakeVisibleInline-->
  • make your local release, for example cmsrel CMSSW_2_1_12
  • go to the source directory of your release: cd CMSSW_2_1_12/src
  • set the shell environment and cvsroot: cmsenv; project CMSSW
  • check out the package directory: addpkg GeneratorInterface/AlpgenInterface V00-03-00-01
  • check out the new version for ExternalInputSource: addpkg FWCore/Sources V00-15-01-01
  • check out a bugfix: cvs co -r 1.1.2.3 GeneratorInterface/AlpgenInterface/src/AlpgenExtractor.cc
  • compile the packages: scram b In this release, the Generator information is saved in the ROOT file by means of the LHEEventProduct object (source and header files).
<--/twistyPlugin-->
>
>

Setting up the environment

 
Changed:
<
<

Instructions for CMSSW_2_2_X and 2_1_17

>
>
The environmental setup depends on the CMSSW version you're using. Currently, the following versions of CMSSW have been tested:
  • CMSSW_3_1_0 (initial release for the CMSSW 3 series)

Instructions for CMSSW_3_1_0

 
<--/twistyPlugin twikiMakeVisibleInline-->
Changed:
<
<
  • make your local release, for example cmsrel CMSSW_2_2_0
  • go to the source directory of your release: cd CMSSW_2_2_0/src
>
>
  • make your local release, for example cmsrel CMSSW_3_1_0
  • go to the source directory of your release: cd CMSSW_3_1_0/src
 
  • set the shell environment and cvsroot: cmsenv; project CMSSW
Changed:
<
<
  • check out the package directory: addpkg GeneratorInterface/AlpgenInterface V00-03-00-01
  • ONLY if you're using 2_1_17, check out a bugfix: cvs co -r 1.1.2.3 GeneratorInterface/AlpgenInterface/src/AlpgenExtractor.cc
>
>
  • check out the package directories: addpkg GeneratorInterface/AlpgenInterface; addpkg GeneratorInterface/PartonShowerVeto
  • change the code the way you see fit.
 
  • compile the packages: scram b
Deleted:
<
<
In this release, the Generator information is saved in the ROOT file by means of the LHEEventProduct object (source and header files).
 
<--/twistyPlugin-->
Changed:
<
<

Example for running the AlpgenInterface on an input Alpgen .unw file

>
>

Example for running CMSSW Alpgen on an input UNW events file

 
Changed:
<
<

Instructions for CMSSW_1_6_12

  • checkout the test subdirectory: cd CMSSW_1_6_12/src; cvs co -r V00-02-19 GeneratorInterface/AlpgenInterface/test
  • run the example: cd GeneratorInterface/AlpgenInterface/test; cmsRun Alpgen.cfg
  • 100 W to electron+neutrino events should have been produced
  • Check for the presence of the HepMCProduct and the AlpgenInfoProduct

Instructions for CMSSW_2_1_X and 2_2_X

  • checkout the test subdirectory: cd CMSSW_2_X_Y/src; cvs co -r V00-03-00-01 GeneratorInterface/AlpgenInterface/test
  • run the example: cd GeneratorInterface/AlpgenInterface/test; cmsRun Alpgen_cfg.py
>
>

Instructions for CMSSW_3_1_X

  • checkout the test subdirectory: cd CMSSW_3_1_X/src; cvs co GeneratorInterface/AlpgenInterface/test
  • run the example: cd GeneratorInterface/AlpgenInterface/test; cmsRun testAlpgenComplete_cfg.py
 
  • 100 W to electron+neutrino events should have been produced
Changed:
<
<
  • Check for the presence of the HepMCProduct, the LHERunInfoProduct and the LHEEventProduct
>
>
  • Check for the presence of the HepMCProduct, the LHERunInfoProduct and the LHEEventProduct in the ROOT files.
 
Changed:
<
<
This example runs on the input example file alpgen.unw (containing previously produced unweighted events) that resides in the same directory. The AlpgenInterface will read in the events from this file, and use Pythia to do the hadronization/showering. Then, the matching routine will be invoked (UPVETO routine) using the parameters given in the cfg, which will veto events for which a hard, non-collinear jet is also produced in the parton shower. Finally, the events are converted into HepMC format and an EDM root output file is produced. The number of events that is run can be changed in the parameter maxEvents in the cfg file. If that parameter is set to '-1' it will run over all events of the input file.
>
>
This example runs on the example input file w2j.unw (containing previously produced unweighted events) that resides in the same directory. The AlpgenSource will read in the events from this file and create the LHE products in the edm::Event. In sequence, the Pythia6HadronizerFilter will do the hadronization/showering, and will call the JetMatchingAlpgen to veto the events that don't pass the MLM procedure, according to the configurations given. Finally, the events are converted into HepMC format and an EDM ROOT output file is produced.
 

Links

Changed:
<
<
  • An Alpgen tutorial. This will show you how the produce the unweighted events for further treatment by AlpgenInterface.
>
>
  • An Alpgen tutorial. This will show you how the produce the unweighted events for further treatment by CMSSW Alpgen.
 
Deleted:
<
<
 
Added:
>
>
 

FAQ

Line: 152 to 129
 
  • Running a parton shower code (like Pythia or Herwig) with subroutines (PYVETO and UPVETO) that implement the matching.
Notice that the first two steps involve full-fledged executable files, as opposed to simple code libraries. On top of that, each different process (W+jets, Z+jets, ttbar+jets, etc...) involves a different executable file. Those facts make full Alpgen integration into CMSSW very difficult at the present moment.
Changed:
<
<

I don't see my particles (GenParticles / GenParticleCandidates) after using AlpgenInterface.

The AlpgenInterface delivers, as every MC Generator in CMSSW, a collection of generator-level particles in the edm::HepMCProduct format. To convert these into the more standard GenParticles / GenParticleCandidates present in the AOD, we point you to this section of the Workbook.
>
>

I don't see my particles (GenParticles / GenParticleCandidates) after using CMSSW Alpgen.

CMSSW Alpgen delivers, as every MC Generator in CMSSW, a collection of generator-level particles in the edm::HepMCProduct format. To convert these into the more standard GenParticles / GenParticleCandidates present in the AOD, we point you to this section of the Workbook.
 
Changed:
<
<

The last event in my Run has non-hadronized quarks and gluons.

Due to a bug in AlpgenInterface, if the last event read from the unweighted events file was vetoed by the matching, it would nonetheless stay on memory. Then it would be passed to the Framework, be converted to an edm::Event and written to disk. Tags V00-03-00-01 and above solve this problem, but only if you're using the EDSource version of the code (as opposed to the EDProducer version). Also, as a side effect, this tag solves the problem with having a large number of empty events at the end of the Run.

There is a large number of empty events at the end of my Run.

Due to a bug in AlpgenInterface, if one asks for more events to be produced by AlpgenInterface than the number that can be obtained from the unweighted events file (taking into account the matching efficiency), it will complete the production with empty events. The AlpgenEmptyEventFilter module was created to deal with this situation, discarding these empty events, and should be used with AlpgenInterface every time. Alternatively, the tags V00-03-00-01 solve this problem, but only if you're using the EDSource version of the code (as opposed to the EDProducer version).

What extra information is produced by the AlpgenInterface beyond the edm::HepMCProduct? How do I recover it?

>
>

What extra information is produced by CMSSW Alpgen beyond the edm::HepMCProduct? How do I recover it?

 The following information is produced:
  • One LHEEventProduct per edm::Event, representing the matrix element level event produced by Alpgen.
  • One LHERunInfoProduct per edm::Run, representing the information of the "generation run".

The LHERunInfoProduct has, within it, a copy of the _unw.par, .wgt and .par files, in the form of a trio of LHERunInfoProduct::Header. You can recover that information and regenerate those files. A possible use case would be to, given the .wgt and .par files, regenerate the .unw file and perform the matching again with different settings. A implementation of that functionality is given in the AlpgenExtractor module, and an example of its usage is given here.

Changed:
<
<
CAVEAT This functionality depends on the EDM file being produced with AlpgenSource, tag version V00-03-00-01 or later later to work.
>
>

Why was the old AlpgenInterface functionality split over two pieces (AlpgenSource and JetMatchingAlpgen)? How do I use the two pieces?

The separation was a design decision by the CMS Generators group, documented in https://twiki.cern.ch/twiki/bin/view/CMS/GeneratorMigration. The pieces are independent in the sense that they belong to different packages (AlpgenInterface and PartonShowerVeto), but they are meant to be used together. What has become possible now, thanks to this new design, is the following workflow:
  1. Generate UNW events using Alpgen standalone.
  2. Format shift them to LHE products, with AlpgenSource.
  3. Serialize them into EDM ROOT files.
  4. Load them (with a standard PoolSource), at a different time and place, back into a CMSSW job.
  5. Create full fledged HepMCProduct events, with Pythia6HadronizerFilter.

Notice that, after step 2, the original UNW events are not needed anymore - the LHE products completely supersede them. That means that, from step 3 onwards, the full chain is completely contained within CMSSW, with all the advantages that situation brings.

 

Contact

Changed:
<
<
The AlpgenInterface package was developed by Sergey Slabospitsky. The MLM matching was initially ported and maintained by Filippo Ambroglini and Susanna Cucciarelli (INFN, Perugia). Since CMSSW Thiago Tomei (SPRACE), Maurizio Pierini, Maria Spiropulu (CERN) and Filip Moortgat (ETH) ported, tested, validated and extended the code (e.g to keep the info of the weighted and unweighted event, extract the weights per process etc). The contacts with MLM are M. Pierini and M. Spiropulu.
>
>
The AlpgenInterface package was developed by Sergey Slabospitsky. The MLM matching was initially ported and maintained by Filippo Ambroglini and Susanna Cucciarelli (INFN, Perugia). Since CMSSW Thiago Tomei (SPRACE), Maurizio Pierini, Maria Spiropulu (CERN), Filip Moortgat (ETH) and Cristophe Saout ported, tested, validated and extended the code (e.g to keep the info of the weighted and unweighted event, extract the weights per process, the many rewritings of the interface etc). The contacts with MLM are M. Pierini and M. Spiropulu.
 

Review Status

Editor/Review and date Comments
Added:
>
>
-- ThiagoTomei - 31 Mar 2009 Updated documentation for 3_1_X
 
-- ThiagoTomei - 26 Jan 2009 Documentation on AlpgenExtractor
-- ThiagoTomei - 22 Jan 2009 Documentation on parameters and LHEProducts
-- ThiagoTomei - 16 Dec 2008 Twiki fully updated for new version
Line: 187 to 167
 %REVIEW% Paolo Bartalini
Deleted:
<
<
-- ThiagoTomei - 30 Mar 2009
 \ No newline at end of file
Added:
>
>
-- ThiagoTomei - 31 Mar 2009

Revision 22009-03-31 - ThiagoTomei

Line: 1 to 1
 
META TOPICPARENT name="ThiagoTomei"

Alpgen Interface to CMSSW

%COMPLETE5%
Line: 11 to 11
 It produces matrix element (ME) level events which are consecutively passed to a parton shower (PS) / hadronization code (like Pythia or HERWIG) for further event development. Using the MLM ME/PS matching procedure, one can combine the matrix element calculations with parton showers while avoiding double-counting. This allows for the best Monte Carlo prediction of multi-jet final states at this moment.
Changed:
<
<
To interface Alpgen to CMSSW and pass the events to Pythia, the AlpgenInterface package has been written. AlpgenInterface is a CMSSW package in the GeneratorInterface subsystem that allows the user to read in unweighted Alpgen events and save them in a standard format (Les Houches format) as CMSSW objects (LHEEventProduct and LHERunInfoProduct). It is also possible, through the use of the JetMatchingAlpgen module present in the PartonShowerVeto package, to perform the parton shower and hadronization steps from within CMSSW, writing a full-fledged edm::HepMCProduct in the event (edm::Event).
>
>
To interface Alpgen to CMSSW and pass the events to Pythia, the AlpgenInterface package has been written. AlpgenInterface is a CMSSW package in the GeneratorInterface subsystem that allows the user to read in unweighted Alpgen events and generation parameters and save them in a standard format (Les Houches format) as CMSSW objects (LHEEventProduct and LHERunInfoProduct). It is also possible, through the use of the JetMatchingAlpgen module present in the PartonShowerVeto package, to perform the parton shower and hadronization steps from within CMSSW, writing a full-fledged edm::HepMCProduct in the event (edm::Event).
  The set (AlpgenInterface + JetMatchingAlpgen code from PartonShowerVeto), refered hereafter as CMSSW Alpgen, is essentially equivalent to the AlpgenInterface package of the previous CMSSW versions (CMSSW 1_X_Y and 2_X_Y). It must be kept in mind, however, that CMSSW Alpgen only implements the very final step of Alpgen generation - format shift, showering, matching and hadronization. In order to use CMSSW Alpgen, the user must use the Alpgen standalone code to generate unweighted Alpgen events, which will be the input to CMSSW Alpgen. For more information on the intrincacies of Alpgen, please take a look at the FAQ. Also, we strongly encourage the user to look at the Alpgen documentation.
Line: 31 to 31
 

Using the AlpgenInterface package

Changed:
<
<
The AlpgenInterface package provides a facility to format shift the events produced by Alpgen standalone (unweighted events, UNW events for short) into CMSSW If you want to use the standard AlpgenInterface provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language and use as EDSource the AlpgenSource. The AlpgenSource has the following settings:
>
>
The AlpgenInterface package provides a facility to format shift the events produced by Alpgen standalone (unweighted events, UNW events for short) into CMSSW objects (LHEEventProduct). By the same token, the generation parameters (usually written in the file with suffix .unw) are made into a LHERunInfoProduct. This facility is implemented as a an EDSource, AlpgenSource, part of the AlpgenInterface package. If you want to use the standard AlpgenInterface provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language and use the AlpgenSource. The AlpgenSource has only one setting the following settings:
 
name type description default
pythiaPylistVerbosity untracked int32 Verbosity level of Pythia PYLIST calls 0
pythiaHepMCVerbosity untracked bool Verbosity for HepMC false

Revision 12009-03-30 - ThiagoTomei

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="ThiagoTomei"

Alpgen Interface to CMSSW

%COMPLETE5%

Introduction

Alpgen is a generator for hard multiparton processes in hadronic collisions. It produces matrix element (ME) level events which are consecutively passed to a parton shower (PS) / hadronization code (like Pythia or HERWIG) for further event development. Using the MLM ME/PS matching procedure, one can combine the matrix element calculations with parton showers while avoiding double-counting. This allows for the best Monte Carlo prediction of multi-jet final states at this moment.

To interface Alpgen to CMSSW and pass the events to Pythia, the AlpgenInterface package has been written. AlpgenInterface is a CMSSW package in the GeneratorInterface subsystem that allows the user to read in unweighted Alpgen events and save them in a standard format (Les Houches format) as CMSSW objects (LHEEventProduct and LHERunInfoProduct). It is also possible, through the use of the JetMatchingAlpgen module present in the PartonShowerVeto package, to perform the parton shower and hadronization steps from within CMSSW, writing a full-fledged edm::HepMCProduct in the event (edm::Event).

The set (AlpgenInterface + JetMatchingAlpgen code from PartonShowerVeto), refered hereafter as CMSSW Alpgen, is essentially equivalent to the AlpgenInterface package of the previous CMSSW versions (CMSSW 1_X_Y and 2_X_Y). It must be kept in mind, however, that CMSSW Alpgen only implements the very final step of Alpgen generation - format shift, showering, matching and hadronization. In order to use CMSSW Alpgen, the user must use the Alpgen standalone code to generate unweighted Alpgen events, which will be the input to CMSSW Alpgen. For more information on the intrincacies of Alpgen, please take a look at the FAQ. Also, we strongly encourage the user to look at the Alpgen documentation.

In general, the components of CMSSW Alpgen (AlpgenInterface and PartonShowerVeto packages) are integrated into a CMSSW release. The goals of this page are:

  • To show the user how to use the standard CMSSW Alpgen as provided in the CMSSW release.
  • To show the user how to checkout and compile the components of CMSSW Alpgen from source (not needed if you're running the version from the release).
  • To show the user how to run the AlpgenInterface on a set of unweighted events produced by Alpgen.
  • To show the user how to run the PartonShowerVeto package on a set of LHE Events produced by AlpgenInterface
  • To provide answers to some Frequently Asked Questions.
  • To provide an entry point for the CMSSW Alpgen documentation.

Generating the sample

The sample generation must be done with Alpgen standalone. See information on https://twiki.cern.ch/twiki/bin/view/Main/CmsAlpgen.

Using CMSSW Alpgen

Using the AlpgenInterface package

The AlpgenInterface package provides a facility to format shift the events produced by Alpgen standalone (unweighted events, UNW events for short) into CMSSW If you want to use the standard AlpgenInterface provided in CMSSW, you must prepare a configuration file as described in the CMSSW configuration file language and use as EDSource the AlpgenSource. The AlpgenSource has the following settings:

name type description default
pythiaPylistVerbosity untracked int32 Verbosity level of Pythia PYLIST calls 0
pythiaHepMCVerbosity untracked bool Verbosity for HepMC false
maxEventsToPrint untracked int32 Number of events to print, if verbose 1
fileNames untracked vstring Alpgen file names, minus the extensions (Required)
PythiaParameters edm::ParameterSet (See below) (See below)
GeneratorParameters edm::ParameterSet (See below) (See below)

The PythiaParameters and GeneratorParameters are wrappers around vectors of strings that are passed to Pythia and Alpgen, respectively.

  • The PythiaParameters must have a single parameter set, which is a vector of strings named pythia. Inside that vector of strings are the strings that are passed to Pythia via the PYGIVE call.
  • The GeneratorParameters must have a single parameter set, which is a vector of strings name generator. Inside that vector of strings are the strings that are passed to Alpgen.

Some particular strings that are useful:

string passed to description
"MSTP(143)=1" Pythia Call the MLM matching routine in Alpgen. Use it if you generated your sample with ickkw=1.
"IXPAR(2)=1" Alpgen Set it to 1 if you're generating an exclusive sample. Set it to 0 otherwise.
"RXPAR(1)=X" Alpgen Choose the value of X to be the minimum cluster Et for matching.
"RXPAR(2)=X" Alpgen Choose the value of X to be the maximum delta R for matching.

Compiling the AlpgenInterface package

If you want to change the way the AlpgenInterface works, or use a different version from the one provided in your version of CMSSW, you must checkout and/or edit the source code and compile it. There are different steps o be followed in order to do that, depending on your CMSSW version.

Setting up the environment

The environmental setup depends on the CMSSW version you're using. Currently, the following versions of CMSSW have been tested:

  • CMSSW_1_6_12 (for analyzing CSA07 Monte Carlo samples)
  • CMSSW_2_1_X (for analyzing Monte Carlo Samples produced with CMSSW_2_1_X) (other than 2_1_17)
  • CMSSW_2_1_17 and CMSSW_2_2_X

WARNING

  • The AlpgenInterface has gone through a complete refactoring in the 1_6_X to 2_1_x transition. It has undergone basic validation for a subset of the processes in Alpgen - but, as in any piece of software, bugs may still lurk around, so always check your results for consistency. New bugs discovered will be fixed as soon as possible - so always check this Twiki for updated instructions. The latest tag (V00-03-00-01) is up-to-date with the latest original Alpgen code (v213, as of the time of this writing). It has undergone basic validation for the following processes:
    • W + jets
    • Z + jets
    • ttbar + jets
    • W + QQbar + jets, where Q = charm or bottom.
    • Z + QQbar + jets, where Q = charm or bottom.
    • W + charm + jets
    • Njets
  • Also, please refrain from using the EDProducer version of the code (file AlpgenProducer.cc). It is still under development, and should be ready for CMSSW 3. Use the AlpgenInterface in the "traditional" way, i.e., as a source (EDSource, file AlpgenSource.cc).

Instructions for CMSSW_1_6_12

<--/twistyPlugin twikiMakeVisibleInline-->
  • make your local release, for example scramv1 project CMSSW CMSSW_1_6_12
  • go to the source directory of your release: cd CMSSW_1_6_12/src
  • set the cvs root: project CMSSW
  • set the shell environment: eval `scramv1 runtime -sh` (or for cshell/tcshell: eval `scramv1 runtime -csh`)
  • check out the package directory: cvs co -r CMSSW_1_6_12 GeneratorInterface/AlpgenInterface
  • check out a bugfix: cvs co -r V00-02-20 GeneratorInterface/AlpgenInterface/src/AlpgenEmptyEventFilter.cc
  • compile the bugfix: scramv1 b

In this release, the Generator information is saved in the ROOT file by means of the AlpgenInfoProduct object (source and header files).

<--/twistyPlugin-->

Instructions for CMSSW_2_1_X, other than 2_1_17

<--/twistyPlugin twikiMakeVisibleInline-->
  • make your local release, for example cmsrel CMSSW_2_1_12
  • go to the source directory of your release: cd CMSSW_2_1_12/src
  • set the shell environment and cvsroot: cmsenv; project CMSSW
  • check out the package directory: addpkg GeneratorInterface/AlpgenInterface V00-03-00-01
  • check out the new version for ExternalInputSource: addpkg FWCore/Sources V00-15-01-01
  • check out a bugfix: cvs co -r 1.1.2.3 GeneratorInterface/AlpgenInterface/src/AlpgenExtractor.cc
  • compile the packages: scram b In this release, the Generator information is saved in the ROOT file by means of the LHEEventProduct object (source and header files).
<--/twistyPlugin-->

Instructions for CMSSW_2_2_X and 2_1_17

<--/twistyPlugin twikiMakeVisibleInline-->
  • make your local release, for example cmsrel CMSSW_2_2_0
  • go to the source directory of your release: cd CMSSW_2_2_0/src
  • set the shell environment and cvsroot: cmsenv; project CMSSW
  • check out the package directory: addpkg GeneratorInterface/AlpgenInterface V00-03-00-01
  • ONLY if you're using 2_1_17, check out a bugfix: cvs co -r 1.1.2.3 GeneratorInterface/AlpgenInterface/src/AlpgenExtractor.cc
  • compile the packages: scram b

In this release, the Generator information is saved in the ROOT file by means of the LHEEventProduct object (source and header files).

<--/twistyPlugin-->

Example for running the AlpgenInterface on an input Alpgen .unw file

Instructions for CMSSW_1_6_12

  • checkout the test subdirectory: cd CMSSW_1_6_12/src; cvs co -r V00-02-19 GeneratorInterface/AlpgenInterface/test
  • run the example: cd GeneratorInterface/AlpgenInterface/test; cmsRun Alpgen.cfg
  • 100 W to electron+neutrino events should have been produced
  • Check for the presence of the HepMCProduct and the AlpgenInfoProduct

Instructions for CMSSW_2_1_X and 2_2_X

  • checkout the test subdirectory: cd CMSSW_2_X_Y/src; cvs co -r V00-03-00-01 GeneratorInterface/AlpgenInterface/test
  • run the example: cd GeneratorInterface/AlpgenInterface/test; cmsRun Alpgen_cfg.py
  • 100 W to electron+neutrino events should have been produced
  • Check for the presence of the HepMCProduct, the LHERunInfoProduct and the LHEEventProduct

This example runs on the input example file alpgen.unw (containing previously produced unweighted events) that resides in the same directory. The AlpgenInterface will read in the events from this file, and use Pythia to do the hadronization/showering. Then, the matching routine will be invoked (UPVETO routine) using the parameters given in the cfg, which will veto events for which a hard, non-collinear jet is also produced in the parton shower. Finally, the events are converted into HepMC format and an EDM root output file is produced. The number of events that is run can be changed in the parameter maxEvents in the cfg file. If that parameter is set to '-1' it will run over all events of the input file.

Links

FAQ

Why must I use Alpgen standalone code before using AlpgenInterface?

Due to the structure of the Alpgen code, full integration with CMSSW is difficult. A "standard" Alpgen session involves (besides compilations) three different steps:
  • Running an executable with a certain flag (imode = 1) to generate weighted events, that are saved to a .wgt file.
  • Running the same executable with a different flag (imode = 2) to unweigh those events, which are then save to a .unw file.
  • Running a parton shower code (like Pythia or Herwig) with subroutines (PYVETO and UPVETO) that implement the matching.
Notice that the first two steps involve full-fledged executable files, as opposed to simple code libraries. On top of that, each different process (W+jets, Z+jets, ttbar+jets, etc...) involves a different executable file. Those facts make full Alpgen integration into CMSSW very difficult at the present moment.

I don't see my particles (GenParticles / GenParticleCandidates) after using AlpgenInterface.

The AlpgenInterface delivers, as every MC Generator in CMSSW, a collection of generator-level particles in the edm::HepMCProduct format. To convert these into the more standard GenParticles / GenParticleCandidates present in the AOD, we point you to this section of the Workbook.

The last event in my Run has non-hadronized quarks and gluons.

Due to a bug in AlpgenInterface, if the last event read from the unweighted events file was vetoed by the matching, it would nonetheless stay on memory. Then it would be passed to the Framework, be converted to an edm::Event and written to disk. Tags V00-03-00-01 and above solve this problem, but only if you're using the EDSource version of the code (as opposed to the EDProducer version). Also, as a side effect, this tag solves the problem with having a large number of empty events at the end of the Run.

There is a large number of empty events at the end of my Run.

Due to a bug in AlpgenInterface, if one asks for more events to be produced by AlpgenInterface than the number that can be obtained from the unweighted events file (taking into account the matching efficiency), it will complete the production with empty events. The AlpgenEmptyEventFilter module was created to deal with this situation, discarding these empty events, and should be used with AlpgenInterface every time. Alternatively, the tags V00-03-00-01 solve this problem, but only if you're using the EDSource version of the code (as opposed to the EDProducer version).

What extra information is produced by the AlpgenInterface beyond the edm::HepMCProduct? How do I recover it?

The following information is produced:
  • One LHEEventProduct per edm::Event, representing the matrix element level event produced by Alpgen.
  • One LHERunInfoProduct per edm::Run, representing the information of the "generation run".

The LHERunInfoProduct has, within it, a copy of the _unw.par, .wgt and .par files, in the form of a trio of LHERunInfoProduct::Header. You can recover that information and regenerate those files. A possible use case would be to, given the .wgt and .par files, regenerate the .unw file and perform the matching again with different settings. A implementation of that functionality is given in the AlpgenExtractor module, and an example of its usage is given here.

CAVEAT This functionality depends on the EDM file being produced with AlpgenSource, tag version V00-03-00-01 or later later to work.

Contact

The AlpgenInterface package was developed by Sergey Slabospitsky. The MLM matching was initially ported and maintained by Filippo Ambroglini and Susanna Cucciarelli (INFN, Perugia). Since CMSSW Thiago Tomei (SPRACE), Maurizio Pierini, Maria Spiropulu (CERN) and Filip Moortgat (ETH) ported, tested, validated and extended the code (e.g to keep the info of the weighted and unweighted event, extract the weights per process etc). The contacts with MLM are M. Pierini and M. Spiropulu.

Review Status

Editor/Review and date Comments
-- ThiagoTomei - 26 Jan 2009 Documentation on AlpgenExtractor
-- ThiagoTomei - 22 Jan 2009 Documentation on parameters and LHEProducts
-- ThiagoTomei - 16 Dec 2008 Twiki fully updated for new version
-- ThiagoTomei - 13 Dec 2008 page author (Filip Moortgat)

%RESPONSIBLE% Thiago Tomei, Maurizio Pierini and (ad interim) Filip Moortgat
%REVIEW% Paolo Bartalini

-- ThiagoTomei - 30 Mar 2009

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

antalya escort bursa escort eskisehir escort istanbul escort izmir escort