24 #define LOG std::cout << "TCS::DisambiguationDRIncl3: "
56 p_NumberLeading1 = parameter(
"InputWidth1").value();
57 p_NumberLeading2 = parameter(
"InputWidth2").value();
58 p_NumberLeading3 = parameter(
"InputWidth3").value();
60 if(parameter(
"MaxTob1").
value() > 0) p_NumberLeading1 = parameter(
"MaxTob1").value();
61 if(parameter(
"MaxTob2").
value() > 0) p_NumberLeading2 = parameter(
"MaxTob2").value();
62 if(parameter(
"MaxTob3").
value() > 0) p_NumberLeading3 = parameter(
"MaxTob3").value();
66 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
67 p_MinET1[
i] = parameter(
"MinET1",
i).value();
68 p_MinET2[
i] = parameter(
"MinET2",
i).value();
69 p_MinET3[
i] = parameter(
"MinET3",
i).value();
71 p_DRCutMin[
i] = parameter(
"DisambDRSqrMin",
i).value();
72 p_DRCutMax[
i] = parameter(
"DisambDRSqrMax",
i).value();
74 p_DisambDR[
i] = parameter(
"DisambDRSqr",
i).value();
98 const std::vector<TCS::TOBArray *> &
output,
103 if(
input.size() == 3) {
118 unsigned int deltaR2Cut = calcDeltaR2BW( *tob1, *tob2 );
121 tob3 !=
input[2]->end() ;
123 unsigned int deltaR13 = calcDeltaR2BW( *tob1, *tob3 );
124 unsigned int deltaR23 = calcDeltaR2BW( *tob2, *tob3 );
125 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
127 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
128 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
129 if(
parType_t((*tob3)->Et()) <= p_MinET3[
i])
continue;
131 if (deltaR2Cut > p_DRCutMax[
i])
continue;
132 if (deltaR2Cut <= p_DRCutMin[
i])
continue;
134 accept = deltaR13 > p_DisambDR[
i] && deltaR23 > p_DisambDR[
i] ;
139 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" deltaR13 = " << deltaR13 <<
" deltaR23 = " << deltaR23);
145 TCS_EXCEPTION(
"DisambiguationDRIncl3 alg must have 3 inputs, but got " <<
input.size());
152 const std::vector<TCS::TOBArray *> &
output,
157 if(
input.size() == 3) {
172 unsigned int deltaR2Cut = calcDeltaR2( *tob1, *tob2 );
175 tob3 !=
input[2]->end() ;
177 unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 );
178 unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 );
179 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
181 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
182 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
183 if(
parType_t((*tob3)->Et()) <= p_MinET3[
i])
continue;
185 if (deltaR2Cut > p_DRCutMax[
i])
continue;
186 if (deltaR2Cut <= p_DRCutMin[
i])
continue;
188 accept = deltaR13 > p_DisambDR[
i] && deltaR23 > p_DisambDR[
i] ;
193 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" deltaR13 = " << deltaR13 <<
" deltaR23 = " << deltaR23);
199 TCS_EXCEPTION(
"DisambiguationDRIncl3 alg must have 3 inputs, but got " <<
input.size());