79 inputDoubleList_ = inputList;
84 orderTestDoubleList();
86 switch(blockingMethod){
91 cout <<
"[L1TLSBlock::doBlocking()]: Blocking method does not exist or is not implemented" << endl;
103 inputIntList_ = inputList;
110 switch(blockingMethod){
112 cout <<
"[L1TLSBlock::doBlocking()]: Blocking by statistics require doubles as inputs for test variable and threshold" << endl;
115 cout <<
"[L1TLSBlock::doBlocking()]: Blocking method does not exist or is not implemented" << endl;
126 inputIntList_.clear();
127 inputDoubleList_.clear();
152 double currentError(0);
153 bool resetFlag(
true);
155 for(LumiTestDoubleList::iterator
i=inputDoubleList_.begin();
i!=inputDoubleList_.end();
i++){
157 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);
172 std::vector<double> errorList;
175 for(
size_t i=0;
i < inputDoubleList_.size();
i++){
176 if(inputDoubleList_[
i].
first>lumiRange.first && inputDoubleList_[
i].first<lumiRange.second)
177 errorList.push_back(inputDoubleList_[
i].
second);
181 for(
size_t i=0;
i<errorList.size();
i++)
182 error += 1 / (errorList[
i] * errorList[
i] );
std::vector< LumiRange > LumiRangeList
U second(std::pair< T, U > const &p)
std::pair< int, int > LumiRange
LumiRangeList doBlocking(const LumiTestDoubleList &, double, BLOCKBY)
std::vector< std::pair< int, double > > LumiTestDoubleList
double computeErrorFromRange(LumiRange &)
std::vector< std::pair< int, double > > LumiTestIntList
void orderTestDoubleList()