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