Belle II Software development
collisiondqm.py
1#!/usr/bin/env python3
2
3
10
11
12from daqdqm.commondqm import add_common_dqm
13from IPDQM import add_IP_dqm
14from V0DQM import add_V0_dqm
15
16
17def add_collision_dqm(path, components=None, dqm_environment="expressreco", dqm_mode="dont_care", create_hlt_unit_histograms=False):
18 """
19 This function adds DQMs for collisions
20
21 @param components: A list of the detector components which are available in this
22 run of basf2
23 @param dqm_environment: The environment the DQM modules are running in
24 "expressreco" (default) if running on the ExpressReco system
25 "hlt" if running on the HLT online reconstructon nodes
26 If running on the hlt, you may want to output less or other DQM plots
27 due to the limited bandwidth of the HLT nodes.
28 @param dqm_mode: How to split up the path for online/HLT.
29 For dqm_mode == "dont_care" all the DQM modules should be added.
30 For dqm_mode == "all_events" only the DQM modules which should run on all events
31 (filtered and dismissed) should be added
32 For dqm_mode == "before_filter" only the DQM modules which should run before
33 the hlt filter
34 For dqm_mode == "filtered" only the DQM modules which should run on filtered
35 events should be added
36 @param create_hlt_unit_histograms: Parameter for SoftwareTiggerHLTDQMModule.
37 Should be True only when running on the HLT servers
38 """
39
40 assert dqm_mode in ["dont_care", "all_events", "filtered", "before_filter"]
41
42 add_common_dqm(path, components=components, dqm_environment=dqm_environment,
43 dqm_mode=dqm_mode, create_hlt_unit_histograms=create_hlt_unit_histograms)
44
45 if dqm_environment == "expressreco" and (dqm_mode in ["dont_care"]):
46
47 # PXD (not useful on HLT)
48 if components is None or 'PXD' in components:
49 # need to be behind add_common_dqm as intercepts are calculated there
50 path.add_module('PXDDQMEfficiency', histogramDirectoryName='PXDEFF')
51
52 if dqm_mode in ["dont_care", "filtered"]:
53
54 # IP DQM (when run on HLT, less plots are produced)
55 if components is None or ('CDC' in components and 'SVD' in components):
56 add_IP_dqm(path, dqm_environment=dqm_environment)
57
58 # the following makes only sense in collisions
59 if dqm_environment == "expressreco" and (dqm_mode in ["dont_care"]):
60
61 # V0 DQM
62 if components is None or 'CDC' in components:
63 add_V0_dqm(path)