Belle II Software  release-05-01-25
runSVDDQM_rawData.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
17 
18 import os
19 from basf2 import *
20 from basf2 import conditions as b2conditions
21 import tracking as trk
22 import rawdata as raw
23 import daqdqm.commondqm as cdqm
24 
25 # needed for some temporary issues with BKLMDisplacement payload
26 b2conditions.override_globaltags()
27 b2conditions.globaltags = ['klm_alignment_testing', 'online']
28 # b2conditions.globaltags = ['online']
29 
30 # main main
31 main = create_path()
32 
33 # RAW
34 files = [' /group/belle2/dataprod/Data/Raw/e0010/r04295/sub00/physics.0010.04295.HLT1*.root']
35 # no SVD raw data in this file:
36 # files = ['/gpfs/group/belle2/fast_lane/inbox/debug.0012.01304.HLT3.f00010.root']
37 
38 
39 # read input rootfile
40 # -> can be overwritten with the -i option
41 main.add_module("RootInput", inputFileNames=files)
42 
43 # register the HistoManager and specify output file
44 main.add_module("HistoManager", histoFileName="SVDRawDQMOutput.root")
45 
46 # nee to know SVD geometry to create histograms
47 main.add_module('Gearbox')
48 main.add_module('Geometry')
49 
50 # unpack and reconstruct
51 raw.add_unpackers(main, components=['PXD', 'SVD', 'CDC'])
52 trk.add_tracking_reconstruction(main, components=['SVD', 'CDC'])
53 
54 # add DQM
55 cdqm.add_common_dqm(main, components=['SVD'])
56 
57 # == Show progress
58 main.add_module('Progress')
59 
60 print_path(main)
61 
62 # Process events
63 process(main)
64 
65 print(statistics)