ATLAS Offline Software
|
Configuration class for Matchbox runs with Herwig7. More...
Public Member Functions | |
def | __init__ (self, genSeq, runArgs, run_name="Herwig", beams="pp") |
Initialize a generator configuration object for the Matchbox run mode. More... | |
def | local_pre_commands (self) |
def | local_post_commands (self) |
def | run (self, integration_jobs=1, gridpack=None, cleanup_herwig_scratch=True, integrate=False) |
High-level function for triggering the process setup and the event generation. More... | |
def | do_build (self, integration_jobs) |
Atomic steering function for doing the build step alone. More... | |
def | do_integrate (self, integration_job) |
Atomic steering function for doing one specific integration job. More... | |
def | do_mergegrids (self, integration_jobs, gridpack=None) |
Atomic steering function for combining the integration grids and possibly creating a gridpack. More... | |
def | do_run (self, gridpack=None, cleanup_herwig_scratch=True) |
Atomic steering function for possibly unpacking a gridpack and generating events. More... | |
def | sampler_commands (self, bin_sampler="CellGridSampler", initial_points=10000, n_iterations=1, remapper_points=50000, exploration_steps=4, exploration_points=500, alpha=0.8, grid_divisions=48) |
Configure the sampler. More... | |
Public Attributes | |
beams | |
provide variables initialized by the parent class More... | |
Private Member Functions | |
def | __configure (self) |
Configuration class for Matchbox runs with Herwig7.
Example JobOptions are available in examples/Matchbox
and tests/athenaMatchbox/jobOptions
.
To use the Matchbox run mode of Herwig7 load the corresponding modules and add Herwig7 to the generator sequence
You may specify details of the run a la
You can initialize a generator configuration object with
Please see the constructor for more information on the arguments.
You can use the functions me_alphas_commands, me_pdf_commands and tune_commands from Herwig7Config::Hw7Config to configure the strong coupling and the PDFs for the hard process and the parton shower and underlying event tunes, e.g.
You can add direct Herwig7 commands like this
Please see the Herwig7 tutorial page for in-depth information on the different settings and have a look at Herwig7ConfigMatchbox::Hw7ConfigMatchbox and Herwig7Config::Hw7Config to see if there are convenience functions that accomplish the task provided in the interface already.
To trigger the actual running of Herwig7 in Athena please end the JobOptions with
More specifically, the run()
function triggers the creation of the Herwig7 input file and the preparation of the run (i.e. the Herwig [build, integrate, mergegrids]
sequence). This means, that no Herwig7 settings should be modified after calling the run()
function because the changed settings would not be applied during the event generation.
By default the folder Herwig-scratch
which created by Herwig7 and contains the process libraries and several other files (e.g. integration grids) will be cleaned up and deleted after the event generation in order to save disk space. You can prevent this with:
Machine-local parallelization of the integration can be achieved with
Generate_tf.py
comes with the command line parameter --generatorJobNumber
that can be used to specify the number of integration jobs dynamically, instead of fixing it in the JobOptions
A gridpack can be created with
The JobOptions can be run in athena with a command such as
Generate_tf.py --jobConfig=MC15.999999.H7_MB_Int_Zee_MCatLO_QTilde_H7_UE_MMHT2014.py --runNumber=999999 --ecmEnergy=13000 --randomSeed=12011988 --maxEvents=100 --outputEVNTFile=evgen.root
If you have previously created a gridpack called gridpack.tar.gz
and want to generate events from it, specify the name of the compressed gridpack using the --inputGenConfFile
command line parameter, e.g.
Generate_tf.py --jobConfig=MC15.999999.H7_MB_Int_Zee_MCatLO_QTilde_H7_UE_MMHT2014.py --inputGenConfFile=gridpack.tar.gz --runNumber=999999 --ecmEnergy=13000 --randomSeed=12011988 --maxEvents=100 --outputEVNTFile=evgen.root
The --generatorRunMode
command line argument for Generate_tf.py
can be used to put in place a very fine-grained control over the various steps that happen before the event generation.
In the following example this is combined with the creation and use of a gridpack. This, however, doesn't have to be done and can be left out.
Please note that for the do_build()
function the same caveat applies as for the run()
function: The Herwig7 generator configuration should not be modified afterwards in the job options as the new settings would not be applied in the event generation.
Herwig-scratch
folders from a different location which will allow for a full batch parallelization of the integration in athena. Definition at line 211 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.__init__ | ( | self, | |
genSeq, | |||
runArgs, | |||
run_name = "Herwig" , |
|||
beams = "pp" |
|||
) |
Initialize a generator configuration object for the Matchbox run mode.
Definition at line 215 of file Herwig7ConfigMatchbox.py.
|
private |
Definition at line 294 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.do_build | ( | self, | |
integration_jobs | |||
) |
Atomic steering function for doing the build step alone.
[in] | integration_jobs | Number of integration jobs to be prepared |
do_build()
function as the modified settings would not be applied in the event generation Definition at line 343 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.do_integrate | ( | self, | |
integration_job | |||
) |
Atomic steering function for doing one specific integration job.
Definition at line 350 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.do_mergegrids | ( | self, | |
integration_jobs, | |||
gridpack = None |
|||
) |
Atomic steering function for combining the integration grids and possibly creating a gridpack.
[in] | integration_jobs | Number of integration jobs |
[in] | gridpack | Name of the gridpack to be created. No gridpack is created if the parameter is not specified. |
Definition at line 359 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.do_run | ( | self, | |
gridpack = None , |
|||
cleanup_herwig_scratch = True |
|||
) |
Atomic steering function for possibly unpacking a gridpack and generating events.
[in] | gridpack | Name of the gridpack to be used. No gridpack is used if the parameter is not specified. |
[in] | cleanup_herwig_scratch | Remove the Herwig-scratch folder after event generation to save disk space |
Definition at line 370 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.local_post_commands | ( | self | ) |
Definition at line 282 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.local_pre_commands | ( | self | ) |
Definition at line 227 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.run | ( | self, | |
integration_jobs = 1 , |
|||
gridpack = None , |
|||
cleanup_herwig_scratch = True , |
|||
integrate = False |
|||
) |
High-level function for triggering the process setup and the event generation.
[in] | integration_jobs | Number of threads for machine-local parallelization of the integration |
[in] | gridpack | Name of the gridpack that possibly is to be created (after the integration) or to be used (for the event generation). No gridpack is created or used if the parameter is not specified. If you have created a gridpack and would like to generate events from it, please pass the name of the gridpack to the Generate_tf.py command using the --inputGenConfFile command line argument |
[in] | cleanup_herwig_scratch | Remove the Herwig-scratch folder after event generation to save disk space |
run()
function as the modified settings would not be applied in the event generation Definition at line 324 of file Herwig7ConfigMatchbox.py.
def Herwig7ConfigMatchbox.Hw7ConfigMatchbox.sampler_commands | ( | self, | |
bin_sampler = "CellGridSampler" , |
|||
initial_points = 10000 , |
|||
n_iterations = 1 , |
|||
remapper_points = 50000 , |
|||
exploration_steps = 4 , |
|||
exploration_points = 500 , |
|||
alpha = 0.8 , |
|||
grid_divisions = 48 |
|||
) |
Configure the sampler.
Py:Herwig7Utils INFO Calculating cross section after integration
If the statistical uncertainty on this estimated total cross section is larger than 0.2% a warning is printed, encouraging you to consider increasing the statistics of the integration.
Definition at line 393 of file Herwig7ConfigMatchbox.py.
Herwig7ConfigMatchbox.Hw7ConfigMatchbox.beams |
provide variables initialized by the parent class
Definition at line 224 of file Herwig7ConfigMatchbox.py.