Belle II Software development
SVDValidationSteering.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <input>EvtGenSimRec.root</input>
14 <output>SVDValidationTTree.root</output>
15 <output>SVDValidationTTreeStrip.root</output>
16 <output>SVDValidationTTreeSpacePoint.root</output>
17 <output>SVDValidationTTreeSimhit.root</output>
18 <output>SVDValidationTTreeRecoTrack.root</output>
19 <output>SVDValidationTTreeRecoDigit.root</output>
20 <output>SVDValidationTTreeTrueHit.root</output>
21 <output>SVDValidationTTreeCluster.root</output>
22 <contact>SVD Software Group, svd-software@belle2.org</contact>
23 <description>This is the SVD validation steering file.</description>
24</header>
25"""
26
27import basf2 as b2
28# from basf2 import conditions as b2c
29# Individual validation packages
30from SVDValidationTTreeStrip import SVDValidationTTreeStrip
31from SVDValidationTTreeSimhit import SVDValidationTTreeSimhit
32from SVDValidationTTreeSpacePoint import SVDValidationTTreeSpacePoint
33from SVDValidationTTreeRecoTrack import SVDValidationTTreeRecoTrack
34from SVDValidationTTreeRecoDigit import SVDValidationTTreeRecoDigit
35from SVDValidationTTreeTrueHit import SVDValidationTTreeTrueHit
36from SVDValidationTTreeCluster import SVDValidationTTreeCluster
37
38b2.set_random_seed(12345)
39
40# b2c.prepend_globaltag("svd_onlySVDinGeoConfiguration")
41
42main = b2.create_path()
43
44# Using 1000 EvtGen events already simulated and reconstructed
45input = b2.register_module('RootInput')
46input.param('inputFileName', '../EvtGenSimRec.root')
47main.add_module(input)
48
49# Gearbox and Geometry modules need to be registered anyway
50
51# Load parameters
52gearbox = b2.register_module('Gearbox')
53main.add_module(gearbox)
54
55# Create geometry
56main.add_module("Geometry")
57
58# Show progress of processing
59progress = b2.register_module('Progress')
60main.add_module(progress)
61
62# SVD validation modules
63svdvalidationstrip = SVDValidationTTreeStrip()
64main.add_module(svdvalidationstrip)
65svdvalidationspacepoint = SVDValidationTTreeSpacePoint()
66main.add_module(svdvalidationspacepoint)
67svdvalidationsimhit = SVDValidationTTreeSimhit()
68main.add_module(svdvalidationsimhit)
69svdvalidationtrack = SVDValidationTTreeRecoTrack()
70main.add_module(svdvalidationtrack)
71svdvalidationdigit = SVDValidationTTreeRecoDigit()
72main.add_module(svdvalidationdigit)
73svdvalidationtruehit = SVDValidationTTreeTrueHit()
74main.add_module(svdvalidationtruehit)
75svdvalidationcluster = SVDValidationTTreeCluster()
76main.add_module(svdvalidationcluster)
77
78
79main.add_module('Progress')
80b2.process(main)
81
82# Print call statistics
83print(b2.statistics)