FACT++  1.0
void DrsCalibrateTime::FillEmptyBins ( )
inline

Definition at line 1056 of file DrsCalib.h.

References DrsCalibrate::Step::avg, end, and DrsCalibrate::fNumEntries.

Referenced by GetComplete().

1057  {
1058  for (int ch=0; ch<160; ch++)
1059  {
1060  const auto beg = fStat.begin() + ch*1024;
1061  const auto end = beg + 1024;
1062 
1063  double avg = 0;
1064  uint32_t num = 0;
1065  for (auto it=beg; it!=end; it++)
1066  {
1067  if (it->second<fNumEntries-0.5)
1068  continue;
1069 
1070  avg += it->first / it->second;
1071  num++;
1072  }
1073  avg /= num;
1074 
1075  for (auto it=beg; it!=end; it++)
1076  {
1077  if (it->second>=fNumEntries-0.5)
1078  continue;
1079 
1080  // {
1081  // result[i+1].first = *is2;
1082  // result[i+1].second = *iw2;
1083  // }
1084  // else
1085  // {
1086  it->first = avg*fNumEntries;
1087  it->second = fNumEntries;
1088  // }
1089  }
1090  }
1091  }
std::vector< std::pair< double, double > > fStat
Definition: DrsCalib.h:938
double end
int64_t fNumEntries
Definition: DrsCalib.h:933

+ Here is the caller graph for this function: