107{
108 ATH_MSG_DEBUG(
"TileCondToolOfc weights, drawerIdx:" << drawerIdx
109 << " channel: " << channel
110 << " gain: " << gain
111 << " phase: " << phase );
112
113 std::fill (std::begin(weights.
g), std::end(weights.
g), 0);
114 std::fill (std::begin(weights.
dg), std::end(weights.
dg), 0);
115 std::fill (std::begin(weights.
w_a), std::end(weights.
w_a), 0);
116 std::fill (std::begin(weights.
w_b), std::end(weights.
w_b), 0);
117 std::fill (std::begin(weights.
w_c), std::end(weights.
w_c), 0);
118
119
121
124
125
126
127
128 if (msgLvl(MSG::DEBUG)) {
129 msg(MSG::DEBUG) <<
" Calculating " << (of2 ?
"OF2" :
"OF1") <<
" weights ";
130
132 msg(MSG::DEBUG) <<
"with Delta correlation matrix " <<
endmsg;
133 else
134 msg(MSG::DEBUG) <<
"with correlation matrix obtained from DB " <<
endmsg;
135
136 msg(MSG::DEBUG) <<
"for drawerIdx= " << drawerIdx
140 }
141
142 int npr = 2;
143 if (of2) npr = 3;
146
148 std::vector<float> vecAutoCr;
150
153 if (vecAutoCr[0] > -1233.){
154 if (vecAutoCr.size() == 28){
155 int AutoCrPosition = 0;
158 Correlation[
i][j] = vecAutoCr[AutoCrPosition];
159 Correlation[j][
i] = vecAutoCr[AutoCrPosition];
160 ++AutoCrPosition;
161 }
162 } else {
164 Correlation[i][i] = 1.;
167 Correlation[
i][j +
i + 1] = vecAutoCr[j];
168 Correlation[j +
i + 1][
i] = vecAutoCr[j];
169 }
170 }
171 }
172 }
173 }
174
176
178 float pdy = 0.;
179
180
181 {
184 , phase + 25 * (i -
m_t0Sample), py, pdy, ctx);
185
186
189 pdy=0;
190 }
191
192
193 PulseShape[
i][0] =
py;
194 DPulseShape[
i][0] = pdy;
195 weights.
g[
i] = PulseShape[
i][0];
196 weights.
dg[
i] = DPulseShape[
i][0];
197
199 << " phase " << phase
200 << " py " << py
201 << " pdy " << pdy );
202
203 }
204
205
206
209 CLHEP::HepVector IndependTermsAmp(
m_nSamples + npr, 0);
210 CLHEP::HepVector IndependTermsTime(
m_nSamples + npr, 0);
211 CLHEP::HepVector IndependTermsPed(
m_nSamples + npr, 0);
212
215 SystemMatrix[
i][j] = Correlation[
i][j];
216 }
217
220
223
224 if (of2) {
227 }
228 }
229
232
233 if (of2) IndependTermsPed[
m_nSamples + 2] = 1.;
234
235 Result = solve(SystemMatrix, IndependTermsAmp);
236
237 for (
int ismp = 0; ismp <
m_nSamples; ismp++) {
239
240
241 }
242
243 Result = solve(SystemMatrix, IndependTermsTime);
244
245 for (
int ismp = 0; ismp <
m_nSamples; ismp++) {
247
248 }
249
250 if (of2) {
251 Result = solve(SystemMatrix, IndependTermsPed);
252
253 for (
int ismp = 0; ismp <
m_nSamples; ismp++) {
255
256 }
257 }
258
259 }
260
261#if 0
262 else {
264 weights.
w_a[ismp] = 0.;
265 weights.
w_b[ismp] = 0.;
266 weights.
w_c[ismp] = 0.;
267 weights.
g[ismp] = 0.;
268 weights.
dg[ismp] = 0.;
269 }
270 }
271#endif
272
274
275 return StatusCode::SUCCESS;
276}
#define ATH_MSG_VERBOSE(x)
ICscStripFitter::Result Result