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 algoritm 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',
45 path.add_module(
'CDCTrigger2DFinder',
47 minHits=16, minHitsShort=16, minPt=minPt)
52 path.add_module(
'CDCTriggerHoughETF')
55 path.add_module(
'CDCTrigger2DFitter')
56 path.add_module(
'CDCTrigger3DFitter')
59 b2.B2ERROR(
"shortTracks=True is deprecated and no longer supported! "
60 "Network weights will now be loaded from the database. "
61 "If you really want to use shorttracks, load the specific network "
62 "weights in the Neurotrigger module!")
64 path.add_module(
'CDCTriggerNeuro')
66 path.add_module(
'CDCTriggerTrackCombiner',
67 thetaDefinition=thetaDef, zDefinition=zDef)
68 elif SimulationMode == 2:
69 b2.B2WARNING(
"full simulation mode does not include all CDC trigger modules yet")
71 trgcdc = b2.register_module(
'TRGCDC')
78 'SimulationMode': SimulationMode,
79 '2DfinderCollection':
'TRGCDC2DFinderTracks',
80 '2DfitterCollection':
'TRGCDC2DFitterTracks',
81 '3DfitterCollection':
'TRGCDC3DFitterTracks'}
82 trgcdc.param(trgcdc_params)
83 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...