52 if (
m_BFKey.initialize().isFailure()) {
59 return StatusCode::SUCCESS;
66 return StatusCode::SUCCESS;
80 return StatusCode::FAILURE;
85 ATH_MSG_INFO (
" Got computed Autocorrelation from physics " );
89 ATH_MSG_INFO (
" Got electronics noise autocorrelation from database " );
101 if ( bfCont ==
nullptr) {
109 for (;
it!=it_e;++
it) {
114 if (!(
cabling->isOnlineConnected(hwid)))
continue;
140 ATH_MSG_VERBOSE (
" sigma0_elec " << sigma0_elec <<
" corr0_ele.size() " << corr0_elec.size() );
141 if (corr0_elec.size()==0) {
149 for (;ii<corr0_elec.size();ii++)
154 float sigma0_elec2 = sigma0_elec*sigma0_elec;
157 std::vector<float> corr2;
158 bool recovered=
false;
159 if (corr.size()==0) {
161 if (
m_useBad && (!bfCont->status(febId).good()) ) {
166 if (corr0_elec.size()==0) {
171 if (corr0_elec.size()<(
unsigned int)(
n-1))
n = corr0_elec.size()+1;
172 unsigned int size =
n*(
n+1)/2;
173 std::vector<float> corr2;
174 corr2.resize(
size,0.);
176 for (
int i=0;
i<
n;
i++) {
177 for (
int j=
i;j<
n;j++,
k++) {
178 if (
i==j) corr2[
k]=sigma0_elec2;
179 else corr2[
k]=corr0_elec[j-
i-1]*sigma0_elec2;
182 larAutoCorrComplete->
set(hwid,
gain0,corr2);
195 if (corr_elec.size()==0) {
202 for (;ii<corr_elec.size();ii++)
216 ATH_MSG_VERBOSE (
" sigma_elec " << sigma_elec <<
" corr_elec.size() " << corr_elec.size() );
217 float sigma_elec2 = sigma_elec*sigma_elec;
224 if (rampcoeff.size()>1 && rampcoeff0.size()>1) {
225 float ramp1 = rampcoeff[1];
226 float ramp0 = rampcoeff0[1];
227 if (ramp1>0.01 && ramp0>0.01 && ramp1<1
e4 && ramp0<1
e4)
ratio = ramp0/ramp1;
234 std::vector<float> new_corr;
235 if (!recovered) new_corr.reserve(corr.size());
236 else new_corr.reserve(corr2.size());
243 if (
k<corr.size()) rij_0 = corr[
k];
246 if (
k<corr2.size()) rij_0 = corr2[
k];
256 unsigned int index = j-
i-1;
257 if (
index<corr0_elec.size()) corre0=corr0_elec[
index];
258 if (
index<corr_elec.size()) corre=corr_elec[
index];
260 float rij_tot = rij_0*
ratio - sigma0_elec2*corre0*
ratio + sigma_elec2*corre;
261 new_corr.push_back(rij_tot);
287 larAutoCorrComplete->
set(hwid,
gain,new_corr);
294 return StatusCode::SUCCESS;