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