|
|
(4 intermediate revisions by one user not shown) |
Line 1: |
Line 1: |
− | = Introduction =
| |
| | | |
− | The AuroraMaster package contains python classes providing high level interfaces to the Aurora algorithms and tools. The following tools are implemented in AuroraMaster at the moment: | + | The AuroraMaster analysis configuration system used in Aurora version 2.x has been removed in the development version (branch [https://git.inp.nsk.su/sctau/aurora/-/tree/dev-gcf1?ref_type=heads dev-gcf1]). |
− | | + | The analysis is now configured by creation of various analysis tools using usual Python functions and joining them into analysis-tool chain of AnalysisAlgorithm. |
− | * Read/write SCT EDM data
| + | Please see the page [[Use_Analysis_package]] for details. |
− | * Primary event generators
| + | |
− | ** Particle gun
| + | |
− | ** [https://evtgen.hepforge.org/ EvtGen]
| + | |
− | * Parametric simulation
| + | |
− | ** Main SCT parametric simulation
| + | |
− | ** Simple parametric simulation
| + | |
− | * Full simulation with DD4Hep and Geant4
| + | |
− | * Event analysis and selection with the Analysis package
| + | |
− | ** Access to reconstructed final-state-particles
| + | |
− | ** Reconstruction of particle decay trees
| + | |
− | ** Saving flat n-tuples for further physics analysis
| + | |
− | | + | |
− | = The AuroraMaster class =
| + | |
− | | + | |
− | Each job option employing AuroraMaster must contain one instance of the AuroraMaster class:
| + | |
− | | + | |
− | from AuroraMaster.auroramaster import AuroraMaster
| + | |
− | am = AuroraMaster(olvl='info')
| + | |
− | | + | |
− | The <code>olvl</code> argument specifies the default output level: 'debug' or 'info', where the latter is used as the default.
| + | |
− | | + | |
− | The job option logic is formed by invoking methods of the AuroraMaster instance. Each method has the 'cfg' parameter that takes an AuroraConfig object.
| + | |
− | | + | |
− | The following example shows a ready-to-use job option for event generation with [https://evtgen.hepforge.org/ EvtGen] and saving them to file in SCT EDM format:
| + | |
− | | + | |
− | from AuroraMaster.auroramaster import AuroraMaster, AuroraConfig
| + | |
− | # Instantiate AuroraMaster
| + | |
− | am = AuroraMaster('evtgen', 'info')
| + | |
− | # Plug in component for EvtGen
| + | |
− | evtgenCfg = AuroraConfig({
| + | |
− | 'root' : 'psi(3770)',
| + | |
− | 'dec': './dkpi.dec'
| + | |
− | })
| + | |
− | am.add_signal_provider('evtgen', evtgenCfg)
| + | |
− | # Plug in component for SCT EDM output
| + | |
− | edmoutputCfg = AuroraConfig{
| + | |
− | 'filename': 'parsim.root',
| + | |
− | 'commands': ['keep *'],
| + | |
− | })
| + | |
− | am.add_edmo(cfg=edmoutputCfg)
| + | |
− | am.run(evtmax=10**4)
| + | |
− | | + | |
− | The <code>run</code> method must be invoked at the end.
| + | |
− | | + | |
− | = Components =
| + | |
− | | + | |
− | All AuroraMaster class methods of the <code>add_{component}</code> format has two parameters:
| + | |
− | | + | |
− | * <code>cfg</code> - an object of the <code>AuroraConfig</code> class. Default value it None
| + | |
− | * <code>json</code> - string path to a json file with configuration. Default value it None
| + | |
− | | + | |
− | A component set up is dome with three steps:
| + | |
− | | + | |
− | # Default configuration
| + | |
− | # Configuration with passed json file. It overwrites any subset of default parameters. Parameters not specified in json keep the default values
| + | |
− | # Configuration with <code>AuroraConfig</code> object. It overrides values of the specified parameters leaving other parameters unchanged
| + | |
− | | + | |
− | If some parameter is specified in both json file and <code>AuroraConfig</code> object, the final value is taken from the <code>AuroraConfig</code> object.
| + | |
− | | + | |
− | = AuroraConfig = | + | |
− | | + | |
− | The AuroraConfig is a data structure very similar to python dict. It can contain nested lists, dicts and other AuroraConfig objects. An example below shows configuration of simple parametric simulation:
| + | |
− | | + | |
− | parsimCfg = AuroraConfig({
| + | |
− | 'Tracker' : {
| + | |
− | 'deteff': 0.99,
| + | |
− | 'ptcut': 50e-3,
| + | |
− | 'bfield': 1.5,
| + | |
− | 'maxCosth': np.cos(10./180. * np.pi),
| + | |
− | 'momentumSampler' : {
| + | |
− | 'mean' : np.zeros(3),
| + | |
− | 'covar': np.diag(np.ones(3)) * 1.e-3**2
| + | |
− | },
| + | |
− | 'vertexSampler' : {
| + | |
− | 'mean' : np.zeros(3),
| + | |
− | 'covar': np.diag(np.ones(3)) * 1.e-3**2
| + | |
− | }
| + | |
− | },
| + | |
− | 'PID' : {
| + | |
− | 'eff' : 0.95,
| + | |
− | 'sigmaKpi' : 6.,
| + | |
− | 'sigmaMupi' : 4.,
| + | |
− | 'sigmaKp' : 3.,
| + | |
− | 'sigmaE' : 3.,
| + | |
− | },
| + | |
− | 'Calorimeter' : {
| + | |
− | 'deteff': 1.0,
| + | |
− | 'energyThreshold' : 15e-3,
| + | |
− | 'maxCosth' : np.cos(10./180. * np.pi),
| + | |
− | 'sampler' : {
| + | |
− | 'mean' : np.zeros(3),
| + | |
− | 'covar': (np.diag(np.ones(3)) * 1.e-2**2).ravel()
| + | |
− | }
| + | |
− | }
| + | |
− | })
| + | |
− | | + | |
− | An AuroraConfig object can be serialized to and serialized from json with methods <code>to_json</code> and <code>from_json</code>. It is recommended to create json files with configuration using this interface, and not create json manualy.
| + | |
− | | + | |
− | [[Category:Not_public]] | + | |
The AuroraMaster analysis configuration system used in Aurora version 2.x has been removed in the development version (branch dev-gcf1).
The analysis is now configured by creation of various analysis tools using usual Python functions and joining them into analysis-tool chain of AnalysisAlgorithm.
Please see the page Use_Analysis_package for details.