13 from beamparameters
import add_beamparameters
18 b2.set_log_level(b2.LogLevel.ERROR)
19 b2.set_random_seed(initialValue)
21 eventinfosetter = b2.register_module(
'EventInfoSetter')
22 eventinfosetter.param(
'expList', [0])
23 eventinfosetter.param(
'runList', [1])
24 eventinfosetter.param(
'evtNumList', [numEvents])
26 eventinfoprinter = b2.register_module(
'EventInfoPrinter')
28 gearbox = b2.register_module(
'Gearbox')
30 pxdDigitizer = b2.register_module(
'PXDDigitizer')
31 svdDigitizer = b2.register_module(
'SVDDigitizer')
32 pxdClusterizer = b2.register_module(
'PXDClusterizer')
33 svdClusterizer = b2.register_module(
'SVDClusterizer')
34 evtgeninput = b2.register_module(
'EvtGenInput')
35 evtgeninput.logging.log_level = b2.LogLevel.WARNING
37 geometry = b2.register_module(
'Geometry')
38 geometry.param(
'components', [
'BeamPipe',
'MagneticFieldConstant4LimitedRSVD',
41 g4sim = b2.register_module(
'FullSim')
42 g4sim.param(
'StoreAllSecondaries',
True)
44 spCreatorSingle = b2.register_module(
'SVDSpacePointCreator')
45 spCreatorSingle.logging.log_level = b2.LogLevel.INFO
46 spCreatorSingle.logging.debug_level = 1
47 spCreatorSingle.param(
'OnlySingleClusterSpacePoints',
True)
48 spCreatorSingle.param(
'NameOfInstance',
'singlesOnly')
49 spCreatorSingle.param(
'SpacePoints',
'singlesOnly')
51 spCreatorCombi = b2.register_module(
'SVDSpacePointCreator')
52 spCreatorCombi.logging.log_level = b2.LogLevel.DEBUG
53 spCreatorCombi.logging.debug_level = 1
54 spCreatorCombi.param(
'OnlySingleClusterSpacePoints',
False)
55 spCreatorCombi.param(
'NameOfInstance',
'couplesAllowed')
56 spCreatorCombi.param(
'SpacePoints',
'couplesAllowed')
58 spCreatorPXD = b2.register_module(
'PXDSpacePointCreator')
59 spCreatorPXD.logging.log_level = b2.LogLevel.INFO
60 spCreatorPXD.logging.debug_level = 1
61 spCreatorPXD.param(
'NameOfInstance',
'pxdOnly')
62 spCreatorPXD.param(
'SpacePoints',
'pxdOnly')
64 spCreatorTest = b2.register_module(
'SpacePointCreatorTest')
65 spCreatorTest.logging.log_level = b2.LogLevel.DEBUG
66 spCreatorTest.logging.debug_level = 20
67 spCreatorTest.param(
'NameOfInstance',
'SPTester')
70 spCreatorTest.param(
'AllSpacePointContainers', [
'singlesOnly',
'couplesAllowed',
'pxdOnly'])
73 main = b2.create_path()
77 beamparameters = add_beamparameters(main,
"Y4S")
85 main.add_module(eventinfosetter)
86 main.add_module(eventinfoprinter)
87 main.add_module(gearbox)
88 main.add_module(geometry)
89 main.add_module(evtgeninput)
90 main.add_module(g4sim)
91 main.add_module(pxdDigitizer)
92 main.add_module(pxdClusterizer)
93 main.add_module(svdDigitizer)
94 main.add_module(svdClusterizer)
95 main.add_module(spCreatorSingle)
96 main.add_module(spCreatorCombi)
97 main.add_module(spCreatorPXD)
98 main.add_module(spCreatorTest)
103 print(
'Event Statistics :')