Belle II Software  release-08-01-10
ImportScintillatorFEEParameters.py
1 #!/usr/bin/env python3
2 
3 
10 
11 # Create KLM scintillator FEE parameters payloads.
12 
13 from ROOT import Belle2
14 
16 data.setPedestal(3700)
17 data.setPhotoelectronAmplitude(20)
18 # ADCPedestal - 3.0 * ADCPEAmplitude = 3700 - 3.0 * 20 = 3640
19 data.setThreshold(3640)
20 data.setVoltage(72.2)
21 data.setAdjustmentVoltage(0)
22 data.setLookbackTime(0)
23 data.setLookbackWindowWidth(0)
24 
26 index = Belle2.KLMChannelIndex()
27 index2 = Belle2.KLMChannelIndex()
28 while (index != index2.end()):
29  if not (index.getSubdetector == Belle2.KLMElementNumbers.c_BKLM and
30  index.getLayer >= Belle2.BKLMElementNumbers.c_FirstRPCLayer):
31  channel = index.getKLMChannelNumber()
32  parameters.setFEEData(channel, data)
33  index.increment()
34 
36 
37 iov = Belle2.IntervalOfValidity(0, 0, 0, -1)
38 db.storeData("KLMScintillatorFEEParameters", parameters, iov)
39 
40 iov = Belle2.IntervalOfValidity(1002, 0, 1002, -1)
41 db.storeData("KLMScintillatorFEEParameters", parameters, iov)
42 
43 iov = Belle2.IntervalOfValidity(1003, 0, 1003, -1)
44 db.storeData("KLMScintillatorFEEParameters", parameters, iov)
A class that describes the interval of experiments/runs for which an object in the database is valid.
KLM channel index.
Class to store EKLM alignment data in the database.
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:42