Belle II Software development
KLMEventT0WithValidation.py
1#!/usr/bin/env python3
2
3
10
11# KLM event T0 with its validation: KLMEventT0Estimator computes the KLM event T0 and
12# KLMEventT0ValidationModule fills the validation histograms from the estimator's results.
13# Usage: basf2 KLMEventT0WithValidation.py -i <cdst file(s)>
14# The global tags must provide the KLM time calibration payloads, including KLMEventT0HitResolution.
15
16import basf2
17import modularAnalysis as ma
18from reconstruction import prepare_cdst_analysis
19from KLMEventT0Validation import KLMEventT0ValidationModule
20
21muon_list = 'mu+:forT0'
22
23main = basf2.create_path()
24main.add_module('RootInput')
25main.add_module('HistoManager', histoFileName='KLMEventT0Estimator.root')
26main.add_module('Gearbox')
27main.add_module('Geometry')
28prepare_cdst_analysis(path=main)
29ma.fillParticleList(muon_list, 'p > 1.5 and abs(d0) < 2 and abs(z0) < 4', path=main)
30main.add_module('KLMEventT0Estimator', MuonListName=muon_list)
31main.add_module(KLMEventT0ValidationModule(muon_list_name=muon_list, output_file='KLMEventT0Validation.root'))
32
33basf2.process(main, calculateStatistics=True)
34print(basf2.statistics)