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

Public Member Functions

def beginRun (self)
 

Detailed Description

 default coupling constants importer

Definition at line 89 of file SVDChargeSimulationImporter.py.

Member Function Documentation

◆ beginRun()

def beginRun (   self)
begin run

Definition at line 92 of file SVDChargeSimulationImporter.py.

92  def beginRun(self):
93  '''begin run'''
94 
96 
97  chargeSimCal = SVDChargeSimCal()
98 
99  payload = Belle2.SVDChargeSimulationCalibrations.t_payload(chargeSimCal, "ChargeSimulationCalibrations_default_" +
100  str(now.isoformat()) + "_INFO:release-06_APVCouplings=0")
101 
103 
104  for layer in geoCache.getLayers(Belle2.VXD.SensorInfoBase.SVD):
105  layerNumber = layer.getLayerNumber()
106  for ladder in geoCache.getLadders(layer):
107  ladderNumber = ladder.getLadderNumber()
108  for sensor in geoCache.getSensors(ladder):
109  sensorNumber = sensor.getSensorNumber()
110  for side in (0, 1):
111  print("setting ChargeSimulation for " +
112  str(layerNumber) + "." + str(ladderNumber) + "." + str(sensorNumber) + "." + str(side))
113  if side == 0: # V
114  if layerNumber == 3: # L3 V
115  apvCoupling = apvCoupling_L3_V
116  c0 = c0_L3_V
117  c1 = c1_L3_V
118  c2 = c2_L3_V
119  c3 = c3_L3_V
120  ew = ew_L3_V
121  else:
122  if sensorNumber == 1: # FW V
123  apvCoupling = apvCoupling_fw_V
124  c0 = c0_fw_V
125  c1 = c1_fw_V
126  c2 = c2_fw_V
127  c3 = c3_fw_V
128  ew = ew_fw_V
129  else:
130  if sensorNumber == layerNumber - 1: # BK V
131  apvCoupling = apvCoupling_bk_V
132  c0 = c0_bk_V
133  c1 = c1_bk_V
134  c2 = c2_bk_V
135  c3 = c3_bk_V
136  ew = ew_bk_V
137  else: # BARREL V
138  apvCoupling = apvCoupling_or_V
139  c0 = c0_or_V
140  c1 = c1_or_V
141  c2 = c2_or_V
142  c3 = c3_or_V
143  ew = ew_or_V
144  if side == 1: # U
145  if layerNumber == 3: # L3 U
146  apvCoupling = apvCoupling_L3_U
147  c0 = c0_L3_U
148  c1 = c1_L3_U
149  c2 = c2_L3_U
150  c3 = c3_L3_U
151  ew = ew_L3_U
152  else:
153  if sensorNumber == 1: # FW U
154  apvCoupling = apvCoupling_fw_U
155  c0 = c0_fw_U
156  c1 = c1_fw_U
157  c2 = c2_fw_U
158  c3 = c3_fw_U
159  ew = ew_fw_U
160  else: # BKW U
161  if sensorNumber == layerNumber - 1: # BK U
162  apvCoupling = apvCoupling_bk_U
163  c0 = c0_bk_U
164  c1 = c1_bk_U
165  c2 = c2_bk_U
166  c3 = c3_bk_U
167  ew = ew_bk_U
168  else: # BARREL U
169  apvCoupling = apvCoupling_or_U
170  c0 = c0_or_U
171  c1 = c1_or_U
172  c2 = c2_or_U
173  c3 = c3_or_U
174  ew = ew_or_U
175  # this insert does not work
176  chargeSimCal.couplingConstant['C0'] = c0
177  chargeSimCal.couplingConstant['C1'] = c1
178  chargeSimCal.couplingConstant['C2'] = c2
179  chargeSimCal.couplingConstant['C3'] = c3
180  chargeSimCal.couplingConstant['APVCoupling'] = apvCoupling
181  chargeSimCal.electronWeight = ew
182  payload.set(layerNumber, ladderNumber, sensorNumber, bool(side), 1, chargeSimCal)
183 
184  Belle2.Database.Instance().storeData(Belle2.SVDChargeSimulationCalibrations.name, payload, iov)
185 
186 
187 b2conditions.prepend_globaltag("svd_onlySVDinGeoConfiguration")
188 
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: