Belle II Software development
SVDLocalCalibrationsCheck.py
1#!/usr/bin/env python
2
3
10
11"""
12SVD Local Calibration CHECK Script
13usage:
14> basf2 SVDLOcalCalibrationsCheck.py -- --ref REF --check CHECK
15where:
16"""
17
18import basf2 as b2
19
20import argparse
21
22parser = argparse.ArgumentParser(description="SVD Calibration Check against a Reference")
23parser.add_argument('--ref', metavar='reference', dest='ref', type=str, nargs=1, help='Reference rootfile')
24parser.add_argument('--check', metavar='check', dest='check', type=str, nargs=1, help='Calibration to check rootfile')
25
26args = parser.parse_args()
27
28main = b2.create_path()
29
30the_ref = args.ref[0]
31the_check = args.check[0]
32
33eventinfosetter = b2.register_module('EventInfoSetter')
34eventinfosetter.param({'evtNumList': [1], 'expList': 0, 'runList': 0})
35main.add_module(eventinfosetter)
36main.add_module("Gearbox")
37main.add_module("Geometry")
38
39mod = b2.register_module("SVDLocalCalibrationsCheck")
40# mod.param('plotGoodAPVs', True) #default is false
41mod.param('reference_root', str(the_ref))
42mod.param('check_root', str(the_check))
43mod.param('outputPdfName', 'SVDLocalCalibrationsCheck.pdf')
44mod.param('cutN_outliers', 5)
45mod.param('cutNoise_average', 0.1)
46mod.param('cutNoise_outliers', 0.3)
47mod.param('cutCalPeakADC_average', 0.015) # 0.025
48mod.param('cutCalPeakADC_outliers', 0.3)
49mod.param('cutPedestal_average', 0.02)
50mod.param('cutPedestal_outliers', 0.3)
51main.add_module(mod)
52
53# process single event
54b2.print_path(main)
55b2.process(main)