86 const std::vector<TCS::TOBArray *> & output,
89 if( input.size() == 2) {
91 unsigned int deltaR2= 999;
93 bool all_unmatched =
true;
94 std::vector<GenericTOB*> unmatched_tobs;
96 tob1 != input[0]->end() && distance(input[0]->begin(), tob1) <
p_NumberLeading1;
101 if ((*tob1)->Et() == (*tob1_plus1)->Et() && distance(input[0]->begin(), tob1) ==
p_NumberLeading1 - 1) {
103 output[i]->setAmbiguityFlag(
true);
113 tob2 != input[1]->end() && distance(input[1]->begin(), tob2) <
p_NumberLeading2 && matched !=
true ;
120 if (deltaR2 <=
p_DRCut[i]) matched =
true;
123 if (deltaR2 == 999) matched =
true;
124 if(not matched) unmatched_tobs.push_back(*tob1);
125 all_unmatched = all_unmatched and not matched;
127 const bool accept = all_unmatched and unmatched_tobs.size()>0;
130 for(
const auto tob : unmatched_tobs)
133 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail"));
136 TCS_EXCEPTION(
"NotMatch alg must have 2 inputs, but got " << input.size());
144 const std::vector<TCS::TOBArray *> & output,
147 if( input.size() == 2) {
148 bool matched =
false;
149 unsigned int deltaR2= 999;
151 bool all_unmatched =
true;
152 std::vector<GenericTOB*> unmatched_tobs;
154 tob1 != input[0]->end() && distance(input[0]->begin(), tob1) <
p_NumberLeading1;
163 tob2 != input[1]->end() && distance(input[1]->begin(), tob2) <
p_NumberLeading2 && matched !=
true ;
170 if (deltaR2 <=
p_DRCut[i]) matched =
true;
173 if (deltaR2 == 999) matched =
true;
174 if(not matched) unmatched_tobs.push_back(*tob1);
175 all_unmatched = all_unmatched and not matched;
177 const bool accept = all_unmatched and unmatched_tobs.size()>0;
180 for(
const auto tob : unmatched_tobs)
183 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail"));
186 TCS_EXCEPTION(
"NotMatch alg must have 2 inputs, but got " << input.size());