Belle II Software development
KLMDQM2Test.py
1#!/usr/bin/env python3
2
3
10
11import modularAnalysis as ma
12import rawdata as raw
13import reconstruction as re
14from daqdqm.commondqm import add_common_dqm
15import basf2 as b2
16
17# Set the log level to show only error and fatal messages
18# set_log_level(LogLevel.ERROR)
19b2.set_log_level(b2.LogLevel.INFO)
20
21path = "/group/belle2/dataprod/Data/Raw/e0018/r01553/sub00/"
22files = path+"physics.0018.01553.HLT8.f0000*.root"
23
24# Create main path
25main = b2.create_path()
26
27# useful tags for release-06
28b2.conditions.globaltags = ['online',
29 'dp_recon_release6_patch',
30 'ecl_release06_forOnline']
31
32main.add_module("RootInput", inputFileNames=files)
33main.add_module("HistoManager", histoFileName="KLMDQMHistograms.root")
34main.add_module('Gearbox')
35main.add_module('Geometry')
36raw.add_unpackers(main)
37re.add_reconstruction(main, add_muid_hits=True)
38
39software_trigger = "software_trigger_cut&skim&accept_mumutight"
40cut_string = f'SoftwareTriggerResult({software_trigger})>0'
41
42add_common_dqm(main, dqm_environment='HLT', dqm_mode='dont_care')
43ma.fillParticleList('mu+:all', cut="", path=main)
44ma.cutAndCopyList("mu+:cut", "mu+:all", cut_string, path=main)
45
46collector = b2.register_module('KLMStripEfficiencyCollector')
47collector.param('Debug', True)
48collector.param('DebugFileName', 'KLMStripEffCollector_debugFile.root')
49collector.param('MuonListName', 'mu+:cut') # to be consistent with KLMDQM2
50main.add_module(collector)
51
52klm2 = b2.register_module('KLMDQM2')
53main.add_module(klm2)
54
55main.add_module('Progress')
56b2.print_path(main)
57
58
59# Process all events
60b2.process(main, max_event=1000)
61print(b2.statistics)