Belle II Software  release-08-01-10
defaultPulseShapeImporter Class Reference
Inheritance diagram for defaultPulseShapeImporter:
Collaboration diagram for defaultPulseShapeImporter:

Public Member Functions

def beginRun (self)
 

Detailed Description

default pulse shape calibrations importer

Definition at line 58 of file SVDDefaultPulseShapeImporter.py.

Member Function Documentation

◆ beginRun()

def beginRun (   self)
begin run

Definition at line 61 of file SVDDefaultPulseShapeImporter.py.

61  def beginRun(self):
62  '''begin run'''
63 
65 
66  # gain, peakTime,
67  tmp_calAmp = SVDStripCalAmp()
68  tmp_calAmp.gain = 275 # set after the loop on sensors
69  tmp_calAmp.peakTime = 75 # set after the loop on sensors
70  tmp_calAmp.pulseWidth = pulseWidth
72  tmp_calAmp, "PulseShapeCalibrations_default_" + str(now.isoformat()) +
73  "_INFO:_peakTime=fromPhase3calibrations_pulseWidth=130_gain=fromPhase3calibrations")
74 
76 
77  for layer in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
78  layerNumber = layer.getLayerNumber()
79  for ladder in geoCache.getLadders(layer):
80  ladderNumber = ladder.getLadderNumber()
81  for sensor in geoCache.getSensors(ladder):
82  sensorNumber = sensor.getSensorNumber()
83  for side in (0, 1):
84  Nstrips = 768
85  print("setting PulseShape for " +
86  str(layerNumber) + "." + str(ladderNumber) + "." + str(sensorNumber) + "." + str(side))
87  if side == 0: # V
88  if layerNumber == 3: # L3 V
89  gain = gain_L3_V
90  peakTime = peakTime_L3_V
91  else:
92  Nstrips = 512
93  if sensorNumber == 1: # FW V
94  gain = gain_fwd_V
95  peakTime = peakTime_fwd_V
96  else: # BKW V
97  if sensorNumber == layerNumber - 1: # FW V
98  gain = gain_bkw_V
99  peakTime = peakTime_bkw_V
100  else: # BARREL V
101  gain = gain_origami_V
102  peakTime = peakTime_origami_V
103  if side == 1: # U
104  if layerNumber == 3: # L3 U
105  gain = gain_L3_U
106  peakTime = peakTime_L3_U
107  else:
108  if sensorNumber == 1: # FW U
109  gain = gain_fwd_U
110  peakTime = peakTime_fwd_U
111  else: # BKW U
112  if sensorNumber == layerNumber - 1: # FW U
113  gain = gain_bkw_U
114  peakTime = peakTime_bkw_U
115  else: # BARREL U
116  gain = gain_origami_U
117  peakTime = peakTime_origami_U
118 
119  tmp_calAmp.gain = 1 / gain
120  tmp_calAmp.peakTime = peakTime
121 
122  # print(str(Nstrips))
123  for strip in range(0, Nstrips):
124  # print("setting Gain for strip " + str(strip) + " to " + str(tmp_calAmp.gain))
125 
126  calAmp_payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), strip, tmp_calAmp)
127 
128  Belle2.Database.Instance().storeData(Belle2.SVDPulseShapeCalibrations.calAmp_name, calAmp_payload, iov)
129 
130 
131 b2.conditions.prepend_globaltag("svd_onlySVDinGeoConfiguration")
132 
static IntervalOfValidity always()
Function that returns an interval of validity that is always valid, c.f.
base class for calibrations classes
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:42

The documentation for this class was generated from the following file: