5 from ROOT
import Belle2
8 def add_cdc_trigger(path, SimulationMode=1, shortTracks=False, lowPt=False,
9 thetaDef='avg', zDef='min'):
11 This function adds the CDC trigger modules to a path.
12 @path modules are added to this path
13 @SimulationMode the simulation mode in TSIM, 1: fast simulation,
14 trigger algoritm simulation only, no firmware simulation
15 2: full simulation, both trigger algorithm and firmware
17 @shortTracks the standard track finding requires hits in 4 axial super layers.
18 with the shortTracks option, tracks with hits in the innermost
19 3 super layers are also found.
20 @lowPt default threshold for track finding is 0.3Gev.
21 with the lowPt option, the threshold is 0.255GeV.
22 use together with the shortTracks option.
23 @thetaDef theta definition for the CDCTriggerTrackCombiner
24 @zDef z definition for the CDCTriggerTrackCombiner
25 (for details see module description)
28 if SimulationMode == 1:
30 path.add_module(
'CDCTriggerTSF',
42 path.add_module(
'CDCTrigger2DFinder',
43 minHits=4, minHitsShort=minHitsShort, minPt=minPt)
48 path.add_module(
'CDCTriggerHoughETF')
51 path.add_module(
'CDCTrigger2DFitter')
52 path.add_module(
'CDCTrigger3DFitter')
55 B2ERROR(
"shortTracks=True is deprecated and no longer supported! "
56 "Network weights will now be loaded from the database. "
57 "If you really want to use shorttracks, load the specific network "
58 "weights in the Neurotrigger module!")
60 path.add_module(
'CDCTriggerNeuro')
62 path.add_module(
'CDCTriggerTrackCombiner',
63 thetaDefinition=thetaDef, zDefinition=zDef)
64 elif SimulationMode == 2:
65 B2WARNING(
"full simulation mode does not include all CDC trigger modules yet")
67 trgcdc = register_module(
'TRGCDC')
74 'SimulationMode': SimulationMode,
75 '2DfinderCollection':
'TRGCDC2DFinderTracks',
76 '2DfitterCollection':
'TRGCDC2DFitterTracks',
77 '3DfitterCollection':
'TRGCDC3DFitterTracks'}
78 trgcdc.param(trgcdc_params)
79 path.add_module(trgcdc)