Belle II Software  release-05-01-25
mdst_compatibility-v01-00-04.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 Test backwards compatibility for an mdst file produced with release-01-00-04.
6 
7 See https://confluence.desy.de/display/BI/Backward+Compatibility if this test fails.
8 
9 CHANGES since release-01-00-04:
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  + getQualityIndicator
18 - TrackFitResult:
19  + ndf
20  + chi2
21 - TRGSummary:
22  + getTimQuality added
23  + isPoissonInInjectionVeto()
24  * added getters to map bit names to numbers (getInputBitNumber, getOutputBitNumber)
25  The mapping is from the database and doesn't affect mdst content and is thus not tested here.
26 - ECLCluster:
27  + getPulseShapeDiscriminationMVA
28  + getClusterHadronIntensity
29  + getNumberOfHadronDigits
30  + hasPulseShapeDiscrimination
31  + hasTriggerClusterMatching
32  + isTriggerCluster
33  + hasFailedFitTime
34  + hasFailedTimeResolution
35  * getCovarianceMatrixAsArray removed
36 - KlIds are added
37 - TRGSummary:
38  * getTimTypeBits is replaced by getTimType
39  * getTimQuality added
40 - SoftwareTriggerResult:
41  * non-prescaled results added
42 - Particle masses:
43  * The particle masses have been updated to PDG 2020. As a result, the
44  energies corresponding to the measured momenta became slightly different.
45 """
46 
47 from basf2 import create_path, process, set_random_seed, find_file, LogLevel, logging
48 from b2test_utils import configure_logging_for_tests
49 from mdst import add_mdst_dump
50 
51 if __name__ == "__main__":
52  configure_logging_for_tests()
53  set_random_seed(1)
54  main = create_path()
55  main.add_module("RootInput", inputFileName=find_file("mdst/tests/mdst-v01-00-04.root"))
56  main.add_module("EventInfoPrinter")
57  add_mdst_dump(main, True)
58  process(main, 5)