78 inputDoubleList_ = inputList;
83 orderTestDoubleList();
85 switch (blockingMethod) {
90 cout <<
"[L1TLSBlock::doBlocking()]: Blocking method does not exist or is not implemented" << endl;
102 inputIntList_ = inputList;
109 switch (blockingMethod) {
111 cout <<
"[L1TLSBlock::doBlocking()]: Blocking by statistics require doubles as inputs for test variable and " 116 cout <<
"[L1TLSBlock::doBlocking()]: Blocking method does not exist or is not implemented" << endl;
127 inputIntList_.clear();
128 inputDoubleList_.clear();
153 double currentError(0);
154 bool resetFlag(
true);
156 for (LumiTestDoubleList::iterator
i = inputDoubleList_.begin();
i != inputDoubleList_.end();
i++) {
158 currentRange = std::make_pair(
i->first,
i->first);
161 currentRange = std::make_pair(currentRange.first,
i->first);
162 currentError = computeErrorFromRange(currentRange);
163 if (currentError < thresholdD_) {
164 outputList_.push_back(currentRange);
171 std::vector<double> errorList;
174 for (
size_t i = 0;
i < inputDoubleList_.size();
i++) {
176 errorList.push_back(inputDoubleList_[
i].
second);
180 for (
size_t i = 0;
i < errorList.size();
i++)
181 error += 1 / (errorList[
i] * errorList[
i]);
std::vector< LumiRange > LumiRangeList
std::vector< std::pair< int, double > > LumiTestIntList
U second(std::pair< T, U > const &p)
LumiRangeList doBlocking(const LumiTestDoubleList &, double, BLOCKBY)
std::pair< int, int > LumiRange
double computeErrorFromRange(LumiRange &)
void orderTestDoubleList()
std::vector< std::pair< int, double > > LumiTestDoubleList