AuroraMaster
From Charm-Tau Detector
(Difference between revisions)
V.S.Vorobev (Talk | contribs) (Created page with "= Introduction = The AuroraMaster package contains a set of python classes providing high level interfaces to Aurora algorithms and tools.") |
V.S.Vorobev (Talk | contribs) |
||
Line 1: | Line 1: | ||
= Introduction = | = Introduction = | ||
− | The AuroraMaster package contains | + | The AuroraMaster package contains python classes providing high level interfaces to the Aurora algorithms and tools. To begin working with AuroraMaster you need to instantiate the AuroraMaster class: |
+ | |||
+ | from AuroraMaster.auroramaster import AuroraMaster | ||
+ | am = AuroraMaster(purpose='parsim', olvl='info') | ||
+ | |||
+ | The first argument specifies purpose of the job option. Possible values are: <code>'parsim'</code>, <code>'fullsim'</code>, <code>'evtgen'</code>, and <code>'analysis'</code>. AuroraMaster initializes | ||
+ | Aurora services corresponding to the job option purpose. The second argument specifies general output level (<code>'debug'</code> or <code>'info'</code>). | ||
+ | |||
+ | A job option is formed by a stack of predefined components. Each component has corresponding method in the AuroraMaster class. Let's begin with an example. The following code snippet is a complete job option for event generation and saving them to ROOT file: | ||
+ | |||
+ | from AuroraMaster.auroramaster import AuroraMaster, AuroraConfig | ||
+ | # Instantiate AuroraMaster | ||
+ | am = AuroraMaster('evtgen', 'info') | ||
+ | # Plug EvtGen generator with specified root particle and user | ||
+ | evtgenCfg = { | ||
+ | 'root' : 'psi(3770)', | ||
+ | 'dec': './dkpi.dec' | ||
+ | } | ||
+ | am.add_evtgen(cfg=evtgenCfg) | ||
+ | edmoutputCfg = { | ||
+ | 'filename': 'parsim.root', | ||
+ | 'commands': ['keep *'], | ||
+ | } | ||
+ | am.add_edmo(cfg=edmoutputCfg) | ||
+ | am.run(evtmax=10**4) |
Revision as of 15:37, 3 February 2021
Introduction
The AuroraMaster package contains python classes providing high level interfaces to the Aurora algorithms and tools. To begin working with AuroraMaster you need to instantiate the AuroraMaster class:
from AuroraMaster.auroramaster import AuroraMaster am = AuroraMaster(purpose='parsim', olvl='info')
The first argument specifies purpose of the job option. Possible values are: 'parsim'
, 'fullsim'
, 'evtgen'
, and 'analysis'
. AuroraMaster initializes
Aurora services corresponding to the job option purpose. The second argument specifies general output level ('debug'
or 'info'
).
A job option is formed by a stack of predefined components. Each component has corresponding method in the AuroraMaster class. Let's begin with an example. The following code snippet is a complete job option for event generation and saving them to ROOT file:
from AuroraMaster.auroramaster import AuroraMaster, AuroraConfig # Instantiate AuroraMaster am = AuroraMaster('evtgen', 'info') # Plug EvtGen generator with specified root particle and user evtgenCfg = { 'root' : 'psi(3770)', 'dec': './dkpi.dec' } am.add_evtgen(cfg=evtgenCfg) edmoutputCfg = { 'filename': 'parsim.root', 'commands': ['keep *'], } am.add_edmo(cfg=edmoutputCfg) am.run(evtmax=10**4)