26 #define LOG std::cout << name() << ": "
59 p_NumberLeading1 = parameter(
"InputWidth1").value();
60 p_NumberLeading2 = parameter(
"InputWidth2").value();
61 p_NumberLeading3 = parameter(
"InputWidth3").value();
63 if(parameter(
"MaxTob1").
value() > 0) p_NumberLeading1 = parameter(
"MaxTob1").value();
64 if(parameter(
"MaxTob2").
value() > 0) p_NumberLeading2 = parameter(
"MaxTob2").value();
65 if(parameter(
"MaxTob3").
value() > 0) p_NumberLeading3 = parameter(
"MaxTob3").value();
74 p_MinMET = parameter(
"MinMET").value();
75 p_MinET2 = parameter(
"MinET2").value();
76 p_MinET3 = parameter(
"MinET3").value();
78 p_EtaMin2 = parameter(
"EtaMin2").value();
79 p_EtaMax2 = parameter(
"EtaMax2").value();
80 p_EtaMin3 = parameter(
"EtaMin3").value();
81 p_EtaMax3 = parameter(
"EtaMax3").value();
96 p_HT = parameter(
"HT").value();
97 p_SUM = parameter(
"SUM").value();
98 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
99 p_Ratio[
i] = parameter(
"Ratio",
i).value();
106 TRG_MSG_INFO(
"nummber output : " << numberOutputBits());
112 const std::vector<TCS::TOBArray *> &
output,
121 if(
input.size()!=3) {
122 TCS_EXCEPTION(
"RatioSum alg must have exactly 3 input lists, but got " <<
input.size());
126 unsigned int sumET = 0;
127 unsigned int sumET2 = 0;
128 unsigned int nLeadingele = p_NumberLeading3;
133 unsigned int objC(0);
136 if(
parType_t(abs(tob->eta())) > p_EtaMax2 )
continue;
137 if(
parType_t(abs(tob->eta())) < p_EtaMin2 )
continue;
138 if( tob->Et() <= p_MinET2 )
continue;
154 if(
parType_t(abs((*tob1)->eta())) > p_EtaMax3 )
continue;
155 if(
parType_t(abs((*tob1)->eta())) < p_EtaMin3 )
continue;
156 if( (*tob1)->Et() <= p_MinET3 )
continue;
157 sumET += (*tob1)->Et() ;
161 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
163 bool accept = (objC!=0 &&
met.Et() > p_MinMET &&
167 10*
met.Et() >= p_Ratio[
i]*sumET);
174 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" HT = " << sumET2 <<
" SUM = " << sumET);
183 const std::vector<TCS::TOBArray *> &
output,
187 if(
input.size()!=3) {
188 TCS_EXCEPTION(
"RatioSum alg must have exactly 3 input lists, but got " <<
input.size());
192 unsigned int sumET = 0;
193 unsigned int sumET2 = 0;
194 unsigned int nLeadingele = p_NumberLeading3;
199 unsigned int objC(0);
202 if(
parType_t(std::abs(tob->eta())) > p_EtaMax2 )
continue;
203 if(
parType_t(std::abs(tob->eta())) < p_EtaMin2 )
continue;
204 if( tob->Et() <= p_MinET2 )
continue;
219 if(
parType_t(std::abs((*tob1)->eta())) > p_EtaMax3 )
continue;
220 if(
parType_t(std::abs((*tob1)->eta())) < p_EtaMin3 )
continue;
221 if( (*tob1)->Et() <= p_MinET3 )
continue;
222 sumET += (*tob1)->Et() ;
226 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
228 bool accept = (objC!=0 &&
met.Et() > p_MinMET &&
232 10*
met.Et() >= p_Ratio[
i]*sumET);
239 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" HT = " << sumET2 <<
" SUM = " << sumET);