Belle II Software development
TRGValidationGen.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13<output>TRGValidationGen.root</output>
14<contact>Yun-Tsung Lai, ytlai@post.kek.jp</contact>
15<description>This steering file generates 5000 e+/e- mu+/mu- particle guns to validate the trg package.</description>
16</header>
17"""
18
19import basf2 as b2
20from simulation import add_simulation
21import reconstruction as re
22import mdst
23
24
25main = b2.create_path()
26eventinfosetter = b2.register_module('EventInfoSetter')
27eventinfosetter.param({'evtNumList': [5000], 'runList': [1]})
28main.add_module(eventinfosetter)
29
30particlegun = b2.register_module('ParticleGun')
31particlegun.param('pdgCodes', [11, -11, 13, -13])
32particlegun.param('nTracks', 1)
33particlegun.param('momentumGeneration', 'uniformPt')
34particlegun.param('momentumParams', [0.5, 3.0])
35particlegun.param('thetaParams', [35, 127])
36particlegun.param('phiGeneration', 'uniform')
37particlegun.param('phiParams', [0, 360])
38particlegun.param('vertexGeneration', 'uniform')
39particlegun.param('xVertexParams', [0, 0])
40particlegun.param('yVertexParams', [0, 0])
41particlegun.param('zVertexParams', [-20.0, 20.0])
42main.add_module(particlegun)
43
44
45# trigger simulation is included in latest basf2
46add_simulation(main)
47
48
49re.add_reconstruction(main)
50
51# output
53 path=main,
54 mc=True,
55 filename='../TRGValidationGen.root',
56 additionalBranches=[
57 "TRGKLMHits",
58 "TRGKLMTracks",
59 "KLMTrgSummary",
60 "TRGCDC2DFinderTracks",
61 "TRGCDC3DFitterTracks",
62 "TRGCDCNeuroTracks",
63 "TRGECLClusters",
64 "TRGSummary",
65 "MCInitialParticles"])
66
67
68main.add_module('Progress')
69# main
70b2.process(main)
71print(b2.statistics)
72# ===<END>
def add_mdst_output(path, mc=True, filename='mdst.root', additionalBranches=[], dataDescription=None)
Definition: mdst.py:38