Belle II Software development
miscalibT0.py
1#!/usr/bin/env python3
2
3
10
11from ROOT import Belle2
12
13payload = Belle2.CDCTimeZeros()
14
15wires_in_layer = [
16 160, 160, 160, 160, 160, 160, 160, 160,
17 160, 160, 160, 160, 160, 160,
18 192, 192, 192, 192, 192, 192,
19 224, 224, 224, 224, 224, 224,
20 256, 256, 256, 256, 256, 256,
21 288, 288, 288, 288, 288, 288,
22 320, 320, 320, 320, 320, 320,
23 352, 352, 352, 352, 352, 352,
24 384, 384, 384, 384, 384, 384]
25
26for layer in range(0, 56):
27 for wire in range(0, wires_in_layer[layer]):
28 wireid = Belle2.WireID(layer, wire).getEWire()
29
30 deltaT0 = 0 # T0 miscalibration in ns
31
32 # only miscalibrate each second wire
33 if wire % 2 == 1:
34 deltaT0 = 2 # ns
35
36 # We have to use global param access, because TimeZeros do
37 # not have a real setter
38 payload.setT0(layer, wire, 4900 + deltaT0)
39
40iov = Belle2.IntervalOfValidity(0, 0, -1, -1)
41Belle2.Database.Instance().storeData('CDCTimeZeros', payload, iov)
Database object for timing offset (t0).
Definition: CDCTimeZeros.h:26
A class that describes the interval of experiments/runs for which an object in the database is valid.
Class to identify a wire inside the CDC.
Definition: WireID.h:34
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:42