Belle II Software  light-2212-foldex
mdst_compatibility-v01-00-04.py
1 #!/usr/bin/env python3
2 
3 
10 
11 """
12 Test backwards compatibility for an mdst file produced with release-01-00-04.
13 
14 See https://confluence.desy.de/display/BI/Backward+Compatibility if this test fails.
15 
16 CHANGES since release-01-00-04:
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  + getQualityIndicator
26  + statusBitmap and getStatusBit
27  + getTrackTime added
28  + wasRefined
29  + isFlippedAndRefitted
30  + getTrackFitResultByName
31  + getTrackFitResultsByName
32  + getTrackFitResultWithClosestMassByName
33 - TrackFitResult:
34  + ndf
35  + chi2
36  + remove the const classifier of TrackFitResults and add a function to update the contents
37  + updateTrackFitResult
38  + mask
39 - TRGSummary:
40  + getTimQuality added
41  + isPoissonInInjectionVeto()
42  * added getters to map bit names to numbers (getInputBitNumber, getOutputBitNumber)
43  The mapping is from the database and doesn't affect mdst content and is thus not tested here.
44 - ECLCluster:
45  + getMinTrkDistanceID
46  + getPulseShapeDiscriminationMVA
47  + getClusterHadronIntensity
48  + getNumberOfHadronDigits
49  + hasPulseShapeDiscrimination
50  + hasTriggerClusterMatching
51  + isTriggerCluster
52  + hasFailedFitTime
53  + hasFailedTimeResolution
54  * getCovarianceMatrixAsArray removed
55 - KlIds are added
56 - TRGSummary:
57  * getTimTypeBits is replaced by getTimType
58  * getTimQuality added
59 - SoftwareTriggerResult:
60  * non-prescaled results added
61 - Particle masses:
62  * The particle masses have been updated to PDG 2020. As a result, the
63  energies corresponding to the measured momenta became slightly different.
64 - EventLevelTriggerTimeInfo
65  * added new storage element for information from the Trigger Timing Distribution (TTD)
66 """
67 
68 from basf2 import create_path, process, set_random_seed, find_file
69 from b2test_utils import configure_logging_for_tests
70 from mdst import add_mdst_dump
71 
72 if __name__ == "__main__":
73  configure_logging_for_tests()
74  set_random_seed(1)
75  main = create_path()
76  main.add_module("RootInput", inputFileName=find_file("mdst/tests/mdst-v01-00-04.root"))
77  main.add_module("EventInfoPrinter")
78  add_mdst_dump(main, True)
79  process(main, 5)