Belle II Software development
cosmicdqm.py
1#!/usr/bin/env python3
2
3
10
11
12from daqdqm.commondqm import add_common_dqm
13
14
15def add_cosmic_dqm(path, components=None, dqm_environment="expressreco", dqm_mode="dont_care", create_hlt_unit_histograms=False):
16 """
17 This function adds DQMs for CRT
18
19 @param components: A list of the detector components which are available in this
20 run of basf2
21 @param dqm_environment: The environment the DQM modules are running in
22 "expressreco" (default) if running on the ExpressReco system
23 "hlt" if running on the HLT online reconstructon nodes
24 If running on the hlt, you may want to output less or other DQM plots
25 due to the limited bandwidth of the HLT nodes.
26 @param dqm_mode: How to split up the path for online/HLT.
27 For dqm_mode == "dont_care" all the DQM modules should be added.
28 For dqm_mode == "all_events" only the DQM modules which should run on all events
29 (filtered and dismissed) should be added
30 For dqm_mode == "before_filter" only the DQM modules which should run before
31 all reconstruction
32 For dqm_mode == "filtered" only the DQM modules which should run on filtered
33 events should be added
34 @param create_hlt_unit_histograms: Parameter for SoftwareTiggerHLTDQMModule.
35 Should be True only when running on the HLT servers
36 """
37 assert dqm_mode in ["dont_care", "all_events", "filtered", "before_filter"]
38
39 add_common_dqm(path, components=components, dqm_environment=dqm_environment,
40 dqm_mode=dqm_mode, create_hlt_unit_histograms=create_hlt_unit_histograms)
41
42 if dqm_environment == "expressreco" and (dqm_mode in ["dont_care"]):
43 # PXD (not useful on HLT)
44 if components is None or 'PXD' in components:
45 # need to be behind add_common_dqm as intercepts are calculated there
46 # disable d0 and z0 cut for cosmics
47 path.add_module('PXDDQMEfficiency', histogramDirectoryName='PXDEFF', z0minCut=-9999, z0maxCut=9999, d0Cut=9999)