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