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