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