Belle II Software  release-08-01-10
grltrigger.py
1 # !/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 
14 
15 def add_grl_trigger(path, SimulationMode=1):
16  """
17  do match and produce the objects on grl
18  @path modules are added to this path
19  @SimulationMode 0: fast simulation 1:full simulation
20  """
21  match = b2.register_module('TRGGRLMatch')
22  match.param('SimulationMode', SimulationMode)
23  path.add_module(match)
24 
25  grl = b2.register_module('GRLNeuro')
26  grl.param('nMLP', 1)
27  grl.param('multiplyHidden', False)
28  grl.param('nHidden', [[20, 20]])
29  grl.param('n_cdc_sector', 0)
30  grl.param('n_ecl_sector', 1)
31  grl.param('i_cdc_sector', [0*35*3])
32  grl.param('i_ecl_sector', [1*6*3+1])
33  grl.param('weightFiles', [b2.find_file("data/trg/grl/weights.dat")])
34  grl.param('biasFiles', [b2.find_file("data/trg/grl/bias.dat")])
35  path.add_module(grl)
36 
37  objects = b2.register_module('TRGGRLProjects')
38  objects.param('SimulationMode', SimulationMode)
39  path.add_module(objects)