Belle II Software light-2406-ragdoll
test_trackSystematics.py
1
8
9import basf2 as b2
10import modularAnalysis as ma
11import b2test_utils
12
13"""The unit test case for track momentum scaling"""
14
15path = b2.create_path()
16
18b2.set_random_seed("1103")
19
20ma.inputMdstList(filelist=[b2test_utils.require_file("mdst14.root", "validation")],
21 entrySequences=["0:5"],
22 path=path)
23
24ma.fillParticleList('pi+:sig', "pt > 0.1", path=path)
25
26# print variables before momentum scaling
27ma.printVariableValues('pi+:sig', ['p', 'px', 'py', 'pz', 'M', 'E', 'theta', 'phi'], path=path)
28
29
30# print variables after momentum scaling
31ma.scaleTrackMomenta(['pi+:sig'], scale=1.01, path=path)
32ma.printVariableValues('pi+:sig', ['p', 'px', 'py', 'pz', 'M', 'E', 'theta', 'phi'], path=path)
33
35 with b2test_utils.set_loglevel(b2.LogLevel.INFO):
36 b2.process(path)
def require_file(filename, data_type="", py_case=None)
Definition: __init__.py:54
def clean_working_directory()
Definition: __init__.py:189
def configure_logging_for_tests(user_replacements=None)
Definition: __init__.py:106
def set_loglevel(loglevel)
Definition: __init__.py:77