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