Belle II Software  release-05-01-25
mdst_compatibility-v03-01-02.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 Test backwards compatibility for an mdst file produced with release-03-01-02.
6 
7 See https://confluence.desy.de/display/BI/Backward+Compatibility if this test fails.
8 
9 CHANGES since release-03-01-02:
10 
11 - EventMetaData:
12  + isEndOfRun
13 - EventLevelTrackingInfo:
14  + hasSVDCKFAbortionFlag/setSVDCKFAbortionFlag
15  + hasPXDCKFAbortionFlag/setPXDCKFAbortionFlag
16 - ECLCluster:
17  + hasFailedFitTime
18  + hasFailedTimeResolution
19 - TrackFitResult:
20  + ndf
21  + chi2
22 - TRGSummary:
23  + getTimQuality added
24  + isPoissonInInjectionVeto()
25  * added getters to map bit names to numbers (getInputBitNumber, getOutputBitNumber)
26  The mapping is from the database and doesn't affect mdst content and is thus not tested here.
27 - Particle masses:
28  * The particle masses have been updated to PDG 2020. As a result, the
29  energies corresponding to the measured momenta became slightly different.
30 """
31 
32 from basf2 import create_path, process, set_random_seed, find_file, LogLevel, logging
33 from b2test_utils import configure_logging_for_tests
34 from mdst import add_mdst_dump
35 
36 if __name__ == "__main__":
37  configure_logging_for_tests()
38  set_random_seed(1)
39  main = create_path()
40  main.add_module("RootInput", inputFileName=find_file("mdst/tests/mdst-v03-01-02.root"))
41  main.add_module("EventInfoPrinter")
42  add_mdst_dump(main, True)
43  process(main, 3)