Belle II Software  release-06-01-15
mdst_compatibility-v00-09-03.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """
13 Test backwards compatibility for an mdst file produced with release-00-09-03.
14 
15 See https://confluence.desy.de/display/BI/Backward+Compatibility if this test fails.
16 
17 CHANGES since release-00-09-03:
18 - EventMetaData:
19  + isEndOfRun
20 - EventLevelTrackingInfo:
21  + hasSVDCKFAbortionFlag/setSVDCKFAbortionFlag
22  + hasPXDCKFAbortionFlag/setPXDCKFAbortionFlag
23  + hasSVDSpacePointCreatorAbortionFlag/setSVDSpacePointCreatorAbortionFlag
24 - The default magnetic field is changed affecting all momentum measurements.
25 - Track:
26  * getTrackFitResult behavior changed for non-pion tracks
27  + getQualityIndicator
28 - TrackFitResult:
29  + ndf
30  + chi2
31 - TRGSummary:
32  + getTimQuality added
33  + isPoissonInInjectionVeto()
34  * added getters to map bit names to numbers (getInputBitNumber, getOutputBitNumber)
35  The mapping is from the database and doesn't affect mdst content and is thus not tested here.
36 - ECLCluster:
37  + getMinTrkDistanceID
38  + getPulseShapeDiscriminationMVA
39  + getClusterHadronIntensity
40  + getNumberOfHadronDigits
41  + hasPulseShapeDiscrimination
42  + hasTriggerClusterMatching
43  + isTriggerCluster
44  + hasFailedFitTime
45  + hasFailedTimeResolution
46  * getCovarianceMatrixAsArray removed
47 - KlIds are added
48 - SoftwareTriggerResult:
49  * getTotalResult removed
50  * non-prescaled results added
51 - Particle masses:
52  * The particle masses have been updated to PDG 2020. As a result, the
53  energies corresponding to the measured momenta became slightly different.
54 - EventLevelTriggerTimeInfo
55  * added new storage element for information from the Trigger Timing Distribution (TTD)
56 """
57 
58 from basf2 import create_path, process, set_random_seed, find_file, conditions
59 from b2test_utils import configure_logging_for_tests
60 from mdst import add_mdst_dump
61 
62 if __name__ == "__main__":
63  # there's no magnetic field in that old globaltag, disable replay
64  conditions.disable_globaltag_replay()
65  configure_logging_for_tests()
66  set_random_seed(1)
67  main = create_path()
68  main.add_module("RootInput", inputFileName=find_file("mdst/tests/mdst-v00-09-03.root"))
69  main.add_module("EventInfoPrinter")
70  add_mdst_dump(main, True)
71  process(main, 3)