24 #define LOG std::cout << "TCS::DisambiguationDetaDPhiIncl3: "
60 p_NumberLeading1 = parameter(
"InputWidth1").value();
61 p_NumberLeading2 = parameter(
"InputWidth2").value();
62 p_NumberLeading3 = parameter(
"InputWidth3").value();
64 if(parameter(
"MaxTob1").
value() > 0) p_NumberLeading1 = parameter(
"MaxTob1").value();
65 if(parameter(
"MaxTob2").
value() > 0) p_NumberLeading2 = parameter(
"MaxTob2").value();
66 if(parameter(
"MaxTob3").
value() > 0) p_NumberLeading3 = parameter(
"MaxTob3").value();
69 p_MinET1 = parameter(
"MinET1").value();
70 p_MinET2 = parameter(
"MinET2").value();
71 p_MinET3 = parameter(
"MinET3").value();
72 p_EtaMin1 = parameter(
"EtaMin1").value();
73 p_EtaMax1 = parameter(
"EtaMax1").value();
74 p_EtaMin2 = parameter(
"EtaMin2").value();
75 p_EtaMax2 = parameter(
"EtaMax2").value();
76 p_EtaMin3 = parameter(
"EtaMin3").value();
77 p_EtaMax3 = parameter(
"EtaMax3").value();
78 p_DeltaPhiMin = parameter(
"DeltaPhiMin").value();
79 p_DeltaPhiMax = parameter(
"DeltaPhiMax").value();
80 p_DeltaEtaMin = parameter(
"DeltaEtaMin").value();
81 p_DeltaEtaMax = parameter(
"DeltaEtaMax").value();
84 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
85 p_DisambDR[
i] = parameter(
"DisambDR",
i).value();
116 const std::vector<TCS::TOBArray *> &
output,
121 if(
input.size() == 3) {
129 if(
parType_t((*tob1)->Et()) <= p_MinET1)
continue;
130 if(
parType_t(std::abs((*tob1)->eta())) > p_EtaMax1 )
continue;
131 if(
parType_t(std::abs((*tob1)->eta())) < p_EtaMin1 )
continue;
137 if(
parType_t((*tob2)->Et()) <= p_MinET2)
continue;
138 if(
parType_t(std::abs((*tob2)->eta())) > p_EtaMax2 )
continue;
139 if(
parType_t(std::abs((*tob2)->eta())) < p_EtaMin2 )
continue;
142 unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
144 unsigned int deltaEta = calcDeltaEtaBW( *tob1, *tob2 );
150 tob3 !=
input[2]->end() ;
152 if(
parType_t((*tob3)->Et()) <= p_MinET3)
continue;
153 if(
parType_t(std::abs((*tob3)->eta())) > p_EtaMax3 )
continue;
154 if(
parType_t(std::abs((*tob3)->eta())) < p_EtaMin3 )
continue;
155 unsigned int deltaR13 = calcDeltaR2BW( *tob1, *tob3 );
156 unsigned int deltaR23 = calcDeltaR2BW( *tob2, *tob3 );
157 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
159 accept = deltaR13 > p_DisambDR[
i] && deltaR23 > p_DisambDR[
i] ;
164 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" deltaR13 = " << deltaR13 <<
" deltaR23 = " << deltaR23);
170 TCS_EXCEPTION(
"DisambiguationDetaDPhiIncl3 alg must have 3 inputs, but got " <<
input.size());
178 const std::vector<TCS::TOBArray *> &
output,
183 if(
input.size() == 3) {
191 if(
parType_t((*tob1)->Et()) <= p_MinET1)
continue;
192 if(
parType_t(std::abs((*tob1)->eta())) > p_EtaMax1 )
continue;
193 if(
parType_t(std::abs((*tob1)->eta())) < p_EtaMin1 )
continue;
199 if(
parType_t((*tob2)->Et()) <= p_MinET2)
continue;
200 if(
parType_t(std::abs((*tob2)->eta())) > p_EtaMax2 )
continue;
201 if(
parType_t(std::abs((*tob2)->eta())) < p_EtaMin2 )
continue;
204 unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
206 unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
212 tob3 !=
input[2]->end() ;
214 if(
parType_t((*tob3)->Et()) <= p_MinET3)
continue;
215 if(
parType_t(std::abs((*tob3)->eta())) > p_EtaMax3 )
continue;
216 if(
parType_t(std::abs((*tob3)->eta())) < p_EtaMin3 )
continue;
217 unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 );
218 unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 );
219 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
221 accept = deltaR13 > p_DisambDR[
i] && deltaR23 > p_DisambDR[
i] ;
226 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" deltaR13 = " << deltaR13 <<
" deltaR23 = " << deltaR23);
232 TCS_EXCEPTION(
"DisambiguationDetaDPhiIncl3 alg must have 3 inputs, but got " <<
input.size());