11 from ROOT
import Belle2
15 toleranceZ: float = 0.5,
16 tolerancePhi: float = 0.15,
17 sigmaSystU: float = 0.02,
18 sigmaSystV: float = 0.0,
19 numSigmaTotU: float = 10,
20 numSigmaTotV: float = 10,
21 maxWidthU: float = 0.5,
22 maxWidthV: float = 0.5,) ->
None:
24 run this script to create db file storing the payload information of the ROICalculationParameters
25 see `tracking/dbobjects/include/ROICalculationParameters.h` for definition of the parameters
27 :param IoV: IoV for the parameters
28 :param toleranceZ: Tolerance for finding sensor in Z coordinate (cm)
29 :param m_tolerancePhi: Tolerance for finding sensor in phi coordinate (radians)
30 :param sigmaSystU: Fixed width to add in quadrature to the extrapolation error and obtain the ROI U width
31 :param sigmaSystV: Fixed width to add in quadrature to the extrapolation error and obtain the ROI V width
32 :param numSigmaTotU: Number of sigma (stat+syst) determining the U width of the ROI
33 :param numSigmaTotV: Number of sigma (stat+syst) determining the V width of the ROI
34 :param maxWidthU: Maximum U width of the ROI
35 :param maxWidthV: Maximum V width of the ROI
43 if toleranceZ <= 0
or tolerancePhi <= 0
or sigmaSystU <= 0
or sigmaSystV <= 0
or \
44 numSigmaTotU <= 0
or numSigmaTotV <= 0
or maxWidthU <= 0
or maxWidthV <= 0:
45 print(
"Can't use negative parameters for any of the parameters except for disableROIforEveryNth.")
46 print(f
"The values set are\n\
62 dbobj.setToleranceZ(toleranceZ)
63 dbobj.setTolerancePhi(tolerancePhi)
64 dbobj.setSigmaSystU(sigmaSystU)
65 dbobj.setSigmaSystV(sigmaSystV)
66 dbobj.setNumSigmaTotU(numSigmaTotU)
67 dbobj.setNumSigmaTotV(numSigmaTotV)
68 dbobj.setMaxWidthU(maxWidthU)
69 dbobj.setMaxWidthV(maxWidthV)
74 print(f
"Successfully wrote payload ROI parameters with {IoV=} and parameters\n\
75 {toleranceZ=}, {tolerancePhi=}, {sigmaSystU=}, {sigmaSystV=},\n\
76 {numSigmaTotU=}, {numSigmaTotV=}, {maxWidthU=}, {maxWidthV=}")
79 if __name__ ==
"__main__":
81 writeROICalculationParametersToDB((0, 0, 0, -1), 0.5, 0.15, 0.02, 0.02, 10, 10, 0.5, 0.5)
83 writeROICalculationParametersToDB((1003, 0, 1003, -1), 0.5, 0.15, 0.02, 0.02, 10, 10, 0.5, 0.5)
85 writeROICalculationParametersToDB((1004, 0, 1004, -1), 0.5, 0.15, 0.02, 0.02, 10, 10, 0.5, 0.5)
A class that describes the interval of experiments/runs for which an object in the database is valid.
The payload containing all PXD ROI parameters.
static Database & Instance()
Instance of a singleton Database.