12from ROOT
import Belle2
15def add_cdc_trigger(path, SimulationMode=1, shortTracks=False, lowPt=False,
16 thetaDef='avg', zDef='min'):
18 This function adds the CDC trigger modules to a path.
19 @path modules are added to this path
20 @SimulationMode the simulation mode in TSIM, 1: fast simulation,
21 trigger algorithm simulation only, no firmware simulation
22 2: full simulation, both trigger algorithm and firmware
24 @shortTracks the standard track finding requires hits in 4 axial super layers.
25 with the shortTracks option, tracks with hits in the innermost
26 3 super layers are also found.
27 @lowPt default threshold for track finding is 0.3Gev.
28 with the lowPt option, the threshold is 0.255GeV.
29 use together with the shortTracks option.
30 @thetaDef theta definition for the CDCTriggerTrackCombiner
31 @zDef z definition for the CDCTriggerTrackCombiner
32 (for details see module description)
35 if SimulationMode == 1:
37 path.add_module(
'CDCTriggerTSF',
42 path.add_module(
'CDCTrigger2DFinder',
46 path.add_module(
'CDCTriggerHoughETF')
49 path.add_module(
'CDCTrigger2DFitter')
50 path.add_module(
'CDCTrigger3DFitter')
53 b2.B2ERROR(
"shortTracks=True is deprecated and no longer supported! "
54 "Network weights will now be loaded from the database. "
55 "If you really want to use shorttracks, load the specific network "
56 "weights in the Neurotrigger module!")
58 path.add_module(
'CDCTriggerNeuro')
60 path.add_module(
'CDCTriggerTrackCombiner',
61 thetaDefinition=thetaDef, zDefinition=zDef)
62 elif SimulationMode == 2:
63 b2.B2WARNING(
"full simulation mode does not include all CDC trigger modules yet")
65 trgcdc = b2.register_module(
'TRGCDC')
72 'SimulationMode': SimulationMode,
73 '2DfinderCollection':
'TRGCDC2DFinderTracks',
74 '2DfitterCollection':
'TRGCDC2DFitterTracks',
75 '3DfitterCollection':
'TRGCDC3DFitterTracks'}
76 trgcdc.param(trgcdc_params)
77 path.add_module(trgcdc)
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...