Belle II Software  release-08-01-10
runSVDDQM_rawData.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
22 
23 import basf2 as b2
24 from basf2 import conditions as b2conditions
25 import tracking as trk
26 import rawdata as raw
27 import daqdqm.commondqm as cdqm
28 
29 # needed for some temporary issues with BKLMDisplacement payload
30 b2conditions.override_globaltags()
31 b2conditions.globaltags = ['data_reprocessing_prompt', 'online_bucket10', 'Reco_master_patch_rel5', 'online']
32 # b2conditions.globaltags = ['online']
33 
34 # main main
35 main = b2.create_path()
36 
37 # RAW
38 files = ['/group/belle2/dataprod/Data/PromptSkim/e0012/4S/r02874/skim/hadron/raw/sub00/physics.*.root']
39 
40 # no SVD raw data in this file:
41 # files = ['/gpfs/group/belle2/fast_lane/inbox/debug.0012.01304.HLT3.f00010.root']
42 
43 
44 # read input rootfile
45 # -> can be overwritten with the -i option
46 main.add_module("RootInput", inputFileNames=files)
47 
48 # register the HistoManager and specify output file
49 main.add_module("HistoManager", histoFileName="SVDRawDQMOutput.root")
50 
51 # nee to know SVD geometry to create histograms
52 main.add_module('Gearbox')
53 main.add_module('Geometry')
54 
55 # unpack
56 raw.add_unpackers(main, components=['PXD', 'SVD', 'CDC', 'TRG'])
57 # uncomment to unpack simulating the 3-samples DAQ mode!
58 # raw.add_unpackers(main, components=['PXD', 'CDC', 'TRG'])
59 # svd.add_svd_unpacker_simulate3sampleAcquisitionMode(main)
60 
61 trk.add_tracking_reconstruction(main, components=['SVD', 'CDC'])
62 
63 # add DQM
64 cdqm.add_common_dqm(main, components=['SVD'])
65 
66 # == Show progress
67 main.add_module('Progress')
68 
69 b2.print_path(main)
70 
71 # Process events
72 b2.process(main)
73 
74 print(b2.statistics)