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