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