Belle II Software  release-08-01-10
gdltrigger.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 emptypath = b2.create_path()
14 
15 
16 def add_gdl_trigger(path, SimulationMode=1, FilterEvents=False, simulateT0jitter=False, Belle2Phase="Phase2"):
17  """
18  add the gdl module to path
19  @param path module is added to this path
20  @param SimulationMode the simulation mode in TSIM, 1: fast simulation,
21  trigger algoritm simulation only, no firmware simulation
22  2: full simulation, both trigger algorithm and firmware
23  are simulated
24  @param FilterEvents if True only the events that pass the L1 trigger will
25  survive simulation, the other are discarded.
26  Make sure you do need to filter events before you set
27  the value to True.
28  """
29  trggdl = b2.register_module('TRGGDL')
30  trggdl.param('SimulationMode', SimulationMode)
31  trggdl.param('Belle2Phase', Belle2Phase)
32  trggdl.param('simulateT0jitter', simulateT0jitter)
33  if FilterEvents:
34  trggdl.if_value('<1', emptypath)
35  path.add_module(trggdl)