25 defineParameter(
"InputWidth", 3);
26 defineParameter(
"MaxTob", 0);
27 defineParameter(
"NumResultBits", 3);
28 defineParameter(
"MinET1",1,0);
29 defineParameter(
"MinET2",1,0);
30 defineParameter(
"MinDeltaEta", 0, 0);
31 defineParameter(
"MaxDeltaEta", 49, 0);
32 defineParameter(
"MinDeltaPhi", 0, 0);
33 defineParameter(
"MaxDeltaPhi", 63, 0);
34 defineParameter(
"MinET1",1,1);
35 defineParameter(
"MinET2",1,1);
36 defineParameter(
"MinDeltaEta", 0, 1);
37 defineParameter(
"MaxDeltaEta", 49, 1);
38 defineParameter(
"MinDeltaPhi", 0, 1);
39 defineParameter(
"MaxDeltaPhi", 63, 1);
40 defineParameter(
"MinET1",1,2);
41 defineParameter(
"MinET2",1,2);
42 defineParameter(
"MinDeltaEta", 0, 2);
43 defineParameter(
"MaxDeltaEta", 49, 2);
44 defineParameter(
"MinDeltaPhi", 0, 2);
45 defineParameter(
"MaxDeltaPhi", 63, 2);
46 setNumberOutputBits(3);
55 if(parameter(
"MaxTob").
value() > 0) {
56 p_NumberLeading1 = parameter(
"MaxTob").value();
57 p_NumberLeading2 = parameter(
"MaxTob").value();
59 p_NumberLeading1 = parameter(
"InputWidth").value();
60 p_NumberLeading2 = parameter(
"InputWidth").value();
63 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
64 p_DeltaPhiMin[
i] = parameter(
"MinDeltaPhi",
i).value();
65 p_DeltaPhiMax[
i] = parameter(
"MaxDeltaPhi",
i).value();
66 p_DeltaEtaMin[
i] = parameter(
"MinDeltaEta",
i).value();
67 p_DeltaEtaMax[
i] = parameter(
"MaxDeltaEta",
i).value();
68 p_MinET1[
i] = parameter(
"MinET1",
i).value();
69 p_MinET2[
i] = parameter(
"MinET2",
i).value();
84 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
85 std::string hname_accept =
"hDeltaEtaPhiIncl1_accept_bit"+
std::to_string((
int)
i);
86 std::string hname_reject =
"hDeltaEtaPhiIncl1_reject_bit"+
std::to_string((
int)
i);
88 bookHist(m_histAccept, hname_accept,
"DETA vs DPHI", 100, p_DeltaEtaMin[
i], p_DeltaEtaMax[
i], 100, p_DeltaPhiMin[
i], p_DeltaPhiMax[
i]);
89 bookHist(m_histReject, hname_reject,
"DETA vs DPHI", 100, p_DeltaEtaMin[
i], p_DeltaEtaMax[
i], 100, p_DeltaPhiMin[
i], p_DeltaPhiMax[
i]);
99 const std::vector<TCS::TOBArray *> &
output,
102 if(
input.size() == 1) {
104 unsigned int nLeading = p_NumberLeading1;
114 unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
116 unsigned int deltaEta = calcDeltaEtaBW( *tob1, *tob2 );
119 std::stringstream msgss;
120 msgss <<
" phi1=" << (*tob1)->phi() <<
" , phi2=" << (*tob2)->phi()
122 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
128 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
129 const bool fillReject = fillHistos() and not fillAccept;
130 const bool alreadyFilled = decision.
bit(
i);
135 if(fillAccept and not alreadyFilled) {
137 }
else if(fillReject) {
140 msgss <<
"DeltaEtaPhiIncl1 alg bit" <<
i << (
accept?
" pass":
" fail") <<
"|";
153 const std::vector<TCS::TOBArray *> &
output,
156 if(
input.size() == 1) {
158 unsigned int nLeading = p_NumberLeading1;
168 unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
170 unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
173 std::stringstream msgss;
176 <<
" phi1=" << (*tob1)->phi()
177 <<
" , phi2=" << (*tob2)->phi()
179 <<
", DeltaEta = " <<
deltaEta <<
" -> ";
180 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
186 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
187 const bool fillReject = fillHistos() and not fillAccept;
188 const bool alreadyFilled = decision.
bit(
i);
193 if(fillAccept and not alreadyFilled) {
195 }
else if(fillReject) {
198 msgss <<
"DeltaEtaPhiIncl1 alg bit" <<
i << (
accept?
" pass":
" fail") <<
"|";