Belle II Software development
IPDQM.py
1# !/usr/bin/env python3
2
3
10
11"""
12This module defines functions to add the interaction point montitor to DQM modules.
13"""
14
15import basf2
16import modularAnalysis as ma
17import vertex as vx
18
19
20def add_IP_dqm(path, dqm_environment='expressreco'):
21 '''
22 This function adds the IPDQM module to the path.
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 '''
27
28 mySelection = '[p > 1.0] and [abs(dz) < 2.0] and [dr < 0.5]'
29 if dqm_environment == 'expressreco':
30 ma.fillParticleList('mu+:DQM', mySelection, path=path)
31 ma.reconstructDecay('Upsilon(4S):IPDQM -> mu+:DQM mu-:DQM', '9.5<M<11.5', path=path)
32 vx.kFit('Upsilon(4S):IPDQM', conf_level=0, path=path)
33
34 dqm = basf2.register_module('IPDQM')
35 dqm.set_log_level(basf2.LogLevel.INFO)
36 dqm.param('Y4SPListName', 'Upsilon(4S):IPDQM')
37 dqm.param('onlineMode', dqm_environment)
38 path.add_module(dqm)
39
40 elif dqm_environment == 'hlt':
41 # In order to save computing time, we fill the ParticleList only if the event passes the dimuon skim.
42 mySelection += ' and [SoftwareTriggerResult(software_trigger_cut&skim&accept_mumu_tight_or_highm) > 0]'
43 ma.fillParticleList('mu+:DQM_HLT', mySelection, path=path)
44 ma.reconstructDecay('Upsilon(4S):IPDQM_HLT -> mu+:DQM_HLT mu-:DQM_HLT', '9.5<M<11.5', path=path)
45 vx.kFit('Upsilon(4S):IPDQM_HLT', conf_level=0, path=path)
46
47 dqm = basf2.register_module('IPDQM')
48 dqm.set_log_level(basf2.LogLevel.INFO)
49 dqm.param('Y4SPListName', 'Upsilon(4S):IPDQM_HLT')
50 dqm.param('onlineMode', dqm_environment)
51 path.add_module(dqm)