27 #define LOG std::cout << name() << ": "
53 p_NumberLeading1 = parameter(
"InputWidth").value();
54 if(parameter(
"MaxTob").
value() > 0) p_NumberLeading1 = parameter(
"MaxTob").value();
55 p_R2 = parameter(
"MaxRSqr").value();
56 p_MinET = parameter(
"MinET").value();
61 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
62 p_MinSumET[
i] = parameter(
"MinSumET",
i).value();
68 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
69 std::string hname_accept =
"hSimpleCone_accept_bit"+
std::to_string((
int)
i);
70 std::string hname_reject =
"hSimpleCone_reject_bit"+
std::to_string((
int)
i);
72 bookHist(m_histAccept, hname_accept,
"ET", 100, 0, p_MinSumET[
i]);
73 bookHist(m_histReject, hname_reject,
"ET", 100, 0, p_MinSumET[
i]);
81 const std::vector<TCS::TOBArray *> &
output,
91 const std::vector<TCS::TOBArray *> &
output,
96 TCS_EXCEPTION(
"SimpleCone alg must have exactly 1 input list, but got " <<
input.size());
99 unsigned int leadingET = 0;
106 if(
parType_t((*tob)->Et()) <= p_MinET )
continue;
110 unsigned int tmp_SumET = (*tob)->Et();
116 if( tob1 == tob )
continue;
117 if(
parType_t((*tob1)->Et()) <= p_MinET )
continue;
119 unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob );
123 tmp_SumET += (*tob1)->Et();
126 if (tmp_SumET > leadingET) leadingET = tmp_SumET;
129 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
131 bool accept = leadingET > p_MinSumET[
i];
132 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
133 const bool fillReject = fillHistos() and not fillAccept;
140 fillHist1D(m_histAccept[
i],leadingET);
142 fillHist1D(m_histReject[
i],leadingET);
145 TRG_MSG_DEBUG(
"Decision " <<
i <<
": " << (
accept?
"pass":
"fail") <<
" SimpleCone = " << leadingET);