22. TRG

This package contains code relevant for the L1 trigger.

22.1. Functions in mdst.py

L1trigger.add_grl_gdl_tsim(path, SimulationMode=1, FilterEvents=False, Belle2Phase='Phase3', simulateT0jitter=False, components=['GRL', 'GDL'])[source]

Add GRL and GDL modules to the TSIM with no subdetectors. The function have to applied based on the dataobjects produced by add_subdetector_tsim.

Parameters
  • SimulationMode – The simulation mode in TSIM: 1) fast simulation, trigger algoritm simulation only, no firmware simulation; 2) full simulation, both trigger algorithm and firmware are simulated.

  • FilterEvents – if True only the events that pass the L1 trigger will survive simulation, the other are discarded. Make sure you do need to filter events before you set the value to True.

  • Belle2Phase – The trigger menu at the given Phase is applied. Available options: Phase2, Phase3.

  • simulateT0jitter – if True L1 trigger jitter is simulated by EventT0Generator.

  • components – List of logic components to be included in TSIM.

L1trigger.add_subdetector_tsim(path, SimulationMode=1, shortTracks=False, components=['CDC', 'ECL', 'KLM'])[source]

Add subdetector modules to the TSIM with no GRL and no GDL.

Parameters
  • path – Modules are added to this path.

  • SimulationMode – The simulation mode in TSIM: 1) fast simulation, trigger algoritm simulation only, no firmware simulation; 2) full simulation, both trigger algorithm and firmware are simulated.

  • shortTracks – The standard CDC track finding requires hits in 4 axial super layers. With the shortTracks option, tracks with hits in the 3 innermost super layers are also found.

  • components – List of subdetector components to be included in TSIM.

L1trigger.add_trigger_simulation(path, SimulationMode=1, shortTracks=False, FilterEvents=False, Belle2Phase='Phase3', components=['CDC', 'ECL', 'KLM', 'GRL', 'GDL'], simulateT0jitter=False, PrintInfo=False)[source]

Add the L1 trigger simulation (TSIM) modules to path.

Parameters
  • path – Modules are added to this path.

  • SimulationMode – The simulation mode in TSIM: 1) fast simulation, trigger algoritm simulation only, no firmware simulation; 2) full simulation, both trigger algorithm and firmware are simulated.

  • shortTracks – The standard CDC track finding requires hits in 4 axial super layers. With the shortTracks option, tracks with hits in the 3 innermost super layers are also found.

  • FilterEvents – if True only the events that pass the L1 trigger will survive simulation, the other are discarded. Make sure you do need to filter events before you set the value to True.

  • Belle2Phase – The trigger menu at the given Phase is applied. Available options: Phase2, Phase3.

  • components – List of sub-trigger components to be included in TSIM.

  • simulateT0jitter – if True L1 trigger jitter is simulated by EventT0Generator.

L1trigger.add_tsim(path, SimulationMode=1, shortTracks=False, FilterEvents=False, Belle2Phase='Phase3', components=['CDC', 'ECL', 'KLM', 'GRL', 'GDL'], PrintInfo=False)[source]

This convenience function is DEPRECATED!

The L1 trigger simulation (TSIM) is now included in add_simulation.

If you already have a add_simulation in your path, you already get L1 trigger simulation.

If you do not have add_simulation, and you need the L1 trigger simulation, please use add_trigger_simulation().