13 from ROOT
import Belle2
16 def add_cdc_trigger(path, SimulationMode=1, shortTracks=False, lowPt=False,
17 thetaDef='avg', zDef='min'):
19 This function adds the CDC trigger modules to a path.
20 @path modules are added to this path
21 @SimulationMode the simulation mode in TSIM, 1: fast simulation,
22 trigger algoritm simulation only, no firmware simulation
23 2: full simulation, both trigger algorithm and firmware
25 @shortTracks the standard track finding requires hits in 4 axial super layers.
26 with the shortTracks option, tracks with hits in the innermost
27 3 super layers are also found.
28 @lowPt default threshold for track finding is 0.3Gev.
29 with the lowPt option, the threshold is 0.255GeV.
30 use together with the shortTracks option.
31 @thetaDef theta definition for the CDCTriggerTrackCombiner
32 @zDef z definition for the CDCTriggerTrackCombiner
33 (for details see module description)
36 if SimulationMode == 1:
38 path.add_module(
'CDCTriggerTSF',
50 path.add_module(
'CDCTrigger2DFinder',
51 minHits=4, minHitsShort=minHitsShort, minPt=minPt)
56 path.add_module(
'CDCTriggerHoughETF')
59 path.add_module(
'CDCTrigger2DFitter')
60 path.add_module(
'CDCTrigger3DFitter')
63 b2.B2ERROR(
"shortTracks=True is deprecated and no longer supported! "
64 "Network weights will now be loaded from the database. "
65 "If you really want to use shorttracks, load the specific network "
66 "weights in the Neurotrigger module!")
68 path.add_module(
'CDCTriggerNeuro')
70 path.add_module(
'CDCTriggerTrackCombiner',
71 thetaDefinition=thetaDef, zDefinition=zDef)
72 elif SimulationMode == 2:
73 b2.B2WARNING(
"full simulation mode does not include all CDC trigger modules yet")
75 trgcdc = b2.register_module(
'TRGCDC')
82 'SimulationMode': SimulationMode,
83 '2DfinderCollection':
'TRGCDC2DFinderTracks',
84 '2DfitterCollection':
'TRGCDC2DFitterTracks',
85 '3DfitterCollection':
'TRGCDC3DFitterTracks'}
86 trgcdc.param(trgcdc_params)
87 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...