12from cdctrigger
import add_cdc_trigger
15generate tracks with particle gun, simulate CDC and CDC trigger, save the output.
26 'pdgCodes': [-13, 13],
28 'momentumGeneration':
'inversePt',
29 'momentumParams': [0.3, 10.],
30 'thetaGeneration':
'uniform',
31 'thetaParams': [35, 123],
32 'phiGeneration':
'uniform',
33 'phiParams': [0, 360],
34 'vertexGeneration':
'uniform',
35 'xVertexParams': [0, 0.0],
36 'yVertexParams': [0, 0.0],
37 'zVertexParams': [-50.0, 50.0]}
44basf2.set_random_seed(seed)
46basf2.set_log_level(basf2.LogLevel.ERROR)
48main = basf2.create_path()
50main.add_module(
'EventInfoSetter', evtNumList=evtnum)
51main.add_module(
'Progress')
52main.add_module(
'Gearbox')
53main.add_module(
'Geometry', components=[
'BeamPipe',
55 'MagneticFieldConstant4LimitedRCDC'])
56particlegun = basf2.register_module(
'ParticleGun')
57particlegun.param(particlegun_params)
58main.add_module(particlegun)
59main.add_module(
'FullSim')
60main.add_module(
'CDCDigitizer')
67main.add_module(
'RootOutput', outputFileName=
'cdctrigger.root')
73print(basf2.statistics)