Belle II Software  release-05-01-25
mdst_compatibility-v00-09-03.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 Test backwards compatibility for an mdst file produced with release-00-09-03.
6 
7 See https://confluence.desy.de/display/BI/Backward+Compatibility if this test fails.
8 
9 CHANGES since release-00-09-03:
10 - EventMetaData:
11  + isEndOfRun
12 - EventLevelTrackingInfo:
13  + hasSVDCKFAbortionFlag/setSVDCKFAbortionFlag
14  + hasPXDCKFAbortionFlag/setPXDCKFAbortionFlag
15 - The default magnetic field is changed affecting all momentum measurements.
16 - Track:
17  * getTrackFitResult behavior changed for non-pion tracks
18  + getQualityIndicator
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 - ECLCluster:
28  + getPulseShapeDiscriminationMVA
29  + getClusterHadronIntensity
30  + getNumberOfHadronDigits
31  + hasPulseShapeDiscrimination
32  + hasTriggerClusterMatching
33  + isTriggerCluster
34  + hasFailedFitTime
35  + hasFailedTimeResolution
36  * getCovarianceMatrixAsArray removed
37 - KlIds are added
38 - SoftwareTriggerResult:
39  * getTotalResult removed
40  * non-prescaled results added
41 - Particle masses:
42  * The particle masses have been updated to PDG 2020. As a result, the
43  energies corresponding to the measured momenta became slightly different.
44 """
45 
46 from basf2 import create_path, process, set_random_seed, find_file, conditions
47 from b2test_utils import configure_logging_for_tests
48 from mdst import add_mdst_dump
49 
50 if __name__ == "__main__":
51  # there's no magnetic field in that old globaltag, disable replay
52  conditions.disable_globaltag_replay()
53  configure_logging_for_tests()
54  set_random_seed(1)
55  main = create_path()
56  main.add_module("RootInput", inputFileName=find_file("mdst/tests/mdst-v00-09-03.root"))
57  main.add_module("EventInfoPrinter")
58  add_mdst_dump(main, True)
59  process(main, 3)