23 #define LOG std::cout << "TCS::DisambiguationIncl3: "
51 p_NumberLeading1 = parameter(
"InputWidth1").value();
52 p_NumberLeading2 = parameter(
"InputWidth2").value();
53 p_NumberLeading3 = parameter(
"InputWidth3").value();
55 if(parameter(
"MaxTob1").
value() > 0) p_NumberLeading1 = parameter(
"MaxTob1").value();
56 if(parameter(
"MaxTob2").
value() > 0) p_NumberLeading2 = parameter(
"MaxTob2").value();
57 if(parameter(
"MaxTob3").
value() > 0) p_NumberLeading3 = parameter(
"MaxTob3").value();
60 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
61 p_MinET1[
i] = parameter(
"MinET1",
i).value();
62 p_MinET2[
i] = parameter(
"MinET2",
i).value();
63 p_MinET3[
i] = parameter(
"MinET3",
i).value();
65 p_DisambDR[
i] = parameter(
"DisambDRSqr",
i).value();
89 const std::vector<TCS::TOBArray *> &
output,
94 if(
input.size() == 3) {
110 if (((*tob1)->eta() == (*tob2)->eta()) && ((*tob1)->phi() == (*tob2)->phi()) )
continue;
113 tob3 !=
input[2]->end() ;
117 unsigned int deltaR13 = calcDeltaR2BW( *tob1, *tob3 );
118 unsigned int deltaR23 = calcDeltaR2BW( *tob2, *tob3 );
120 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
122 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
123 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
124 if(
parType_t((*tob3)->Et()) <= p_MinET3[
i])
continue;
126 accept = deltaR13 > p_DisambDR[
i] && deltaR23 > p_DisambDR[
i] ;
131 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" deltaR13 = " << deltaR13 <<
" deltaR23 = " << deltaR23);
145 TCS_EXCEPTION(
"DisambiguationIncl3 alg must have 3 inputs, but got " <<
input.size());
154 const std::vector<TCS::TOBArray *> &
output,
159 if(
input.size() == 3) {
175 if (((*tob1)->etaDouble() == (*tob2)->etaDouble()) && ((*tob1)->phiDouble() == (*tob2)->phiDouble()) )
continue;
178 tob3 !=
input[2]->end() ;
182 unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 );
183 unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 );
185 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
187 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
188 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
189 if(
parType_t((*tob3)->Et()) <= p_MinET3[
i])
continue;
190 accept = deltaR13 > p_DisambDR[
i] && deltaR23 > p_DisambDR[
i] ;
195 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" deltaR13 = " << deltaR13 <<
" deltaR23 = " << deltaR23);
208 TCS_EXCEPTION(
"DisambiguationIncl3 alg must have 3 inputs, but got " <<
input.size());