Belle II Software development
defaultChargeSimulationImporter Class Reference
Inheritance diagram for defaultChargeSimulationImporter:

Public Member Functions

def beginRun (self)
 

Detailed Description

 default coupling constants importer

Definition at line 88 of file SVDChargeSimulationImporter.py.

Member Function Documentation

◆ beginRun()

def beginRun (   self)
begin run

Definition at line 91 of file SVDChargeSimulationImporter.py.

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