27 #define LOG cout << fullname() << ": "
62 if(parameter(
"MaxTob").
value() > 0) {
63 p_NumberLeading1 = parameter(
"MaxTob").value();
64 p_NumberLeading2 = parameter(
"MaxTob").value();
66 p_NumberLeading1 = parameter(
"InputWidth").value();
67 p_NumberLeading2 = parameter(
"InputWidth").value();
70 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
71 p_DeltaEtaMin[
i] = parameter(
"MinDeltaEta",
i).value();
72 p_DeltaEtaMax[
i] = parameter(
"MaxDeltaEta",
i).value();
74 p_MinET1[
i] = parameter(
"MinET1",
i).value();
75 p_MinET2[
i] = parameter(
"MinET2",
i).value();
80 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
89 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
90 std::string hname_accept =
"hDeltaEtaIncl1_accept_bit"+
std::to_string((
int)
i);
91 std::string hname_reject =
"hDeltaEtaIncl1_reject_bit"+
std::to_string((
int)
i);
93 bookHist(m_histAccept, hname_accept,
"DETA", 100, p_DeltaEtaMin[
i], p_DeltaEtaMax[
i]);
94 bookHist(m_histReject, hname_reject,
"DETA", 100, p_DeltaEtaMin[
i], p_DeltaEtaMax[
i]);
104 const std::vector<TCS::TOBArray *> &
output,
108 if(
input.size() == 1) {
109 unsigned int nLeading = p_NumberLeading1;
110 unsigned int nLeading2 = p_NumberLeading2;
120 for(
unsigned int i=0;
i < numberOutputBits(); ++
i) {
123 if ((*tob2)->Et() == (*tob3)->Et() &&
distance(
input[0]->
begin(), tob2) == nLeading2 - 1) {
124 output[0]->setAmbiguityFlag(
true);
132 unsigned int deltaEta = calcDeltaEtaBW( *tob1, *tob2 );
133 std::stringstream msgss;
136 <<
" eta=" << (*tob1)->eta()
137 <<
" , eta=" << (*tob2)->eta()
138 <<
", DeltaEta = " <<
deltaEta <<
" -> ";
140 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
141 const bool fillReject = fillHistos() and not fillAccept;
142 const bool alreadyFilled = decision.
bit(
i);
147 if(fillAccept and not alreadyFilled) {
148 fillHist1D(m_histAccept[
i],(
float)
deltaEta);
149 }
else if(fillReject) {
150 fillHist1D(m_histReject[
i],(
float)
deltaEta);
152 msgss << (
accept?
"pass":
"fail") <<
"|";
165 const std::vector<TCS::TOBArray *> &
output,
168 if(
input.size() == 1) {
170 unsigned int nLeading = p_NumberLeading1;
171 unsigned int nLeading2 = p_NumberLeading2;
181 for(
unsigned int i=0;
i < numberOutputBits(); ++
i) {
184 if ((*tob2)->Et() == (*tob3)->Et() &&
distance(
input[0]->
begin(), tob2) == nLeading2 - 1) {
185 output[0]->setAmbiguityFlag(
true);
193 unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
194 std::stringstream msgss;
197 <<
" eta=" << (*tob1)->eta()
198 <<
" , eta=" << (*tob2)->eta()
199 <<
", DeltaEta = " <<
deltaEta <<
" -> ";
201 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
202 const bool fillReject = fillHistos() and not fillAccept;
203 const bool alreadyFilled = decision.
bit(
i);
208 if(fillAccept and not alreadyFilled) {
209 fillHist1D(m_histAccept[
i],(
float)
deltaEta);
210 }
else if(fillReject) {
211 fillHist1D(m_histReject[
i],(
float)
deltaEta);
213 msgss << (
accept?
"pass":
"fail") <<
"|";