1 """Contains functions that operate on populated path adjust some module parameters"""
7 """Set parameters of the module with the given type in the path to the given parameters
12 Module path to be adjusted.
14 Type of the module to adjusted as returned by Module.type()
16 Dictionary of parameters served to Module.param(params)
18 Keyword parameters served to Module.param(params)
20 for module
in path.modules():
21 if module.type() == module_type:
24 for sub_path
in module.get_all_condition_paths():
29 """Inserts a conditional path at the module of the given type such that modules after are skipped.
34 Module path to be adjusted.
36 Type of the module to adjusted as returned by Module.type()
38 for module
in path.modules():
39 if module.type() == module_type:
40 module.return_value(
False)
41 module.if_false(basf2.create_path())
46 """Disables the generation of delta electrons in FullSim
53 for module
in path.modules():
54 if module.type() ==
'FullSim':
55 module.param(
'ProductionCut', 1000000.)
59 """Keep all secondaries from the FullSim
66 for module
in path.modules():
67 if module.type() ==
'FullSim':
69 "StoreAllSecondaries":
True,
70 "SecondariesEnergyCut": 0,
76 """Enables the wire by wire material distribution in the CDC
82 for module
in path.modules():
84 if module.type() ==
'Gearbox':
85 module.param(
'override',
86 [(
"/DetectorComponent[@name='CDC']//MaterialDefinitionMode",
90 if module.type() ==
'FullSim':
92 module.param(
'deltaChordInMagneticField', 0.001)