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