29 defineParameter(
"InputWidth", 3);
30 defineParameter(
"MaxTob", 0);
31 defineParameter(
"NumResultBits", 6);
32 setNumberOutputBits(6);
34 defineParameter(
"PtScale",0);
35 defineParameter(
"PtShift",0);
36 for (
unsigned int i=0;
i<numberOutputBits();
i++){
37 defineParameter(
"MinXi", 0,
i);
38 defineParameter(
"MaxXi", 999,
i);
39 defineParameter(
"MinET1",0,
i);
40 defineParameter(
"ApplyEtaCut",0,
i);
41 defineParameter(
"MinEta1",0,
i);
42 defineParameter(
"MaxEta1",999,
i);
43 defineParameter(
"MinEta2",0,
i);
44 defineParameter(
"MaxEta2",999,
i);
51 if(parameter(
"MaxTob").
value() > 0) {
52 p_NumberLeading1 = parameter(
"MaxTob").value();
54 p_NumberLeading1 = parameter(
"InputWidth").value();
56 p_PtScale = parameter(
"PtScale").value();
57 p_PtShift = parameter(
"PtShift").value();
58 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
60 p_XiMin[
i] = parameter(
"MinXi",
i).value();
61 p_XiMax[
i] = parameter(
"MaxXi",
i).value();
63 p_MinET1[
i] = parameter(
"MinET1",
i).value();
65 p_ApplyEtaCut[
i] = parameter(
"ApplyEtaCut",
i).value();
66 p_MinEta1[
i] = parameter(
"MinEta1" ,
i).value();
67 p_MaxEta1[
i] = parameter(
"MaxEta1" ,
i).value();
68 p_MinEta2[
i] = parameter(
"MinEta2" ,
i).value();
69 p_MaxEta2[
i] = parameter(
"MaxEta2" ,
i).value();
74 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
92 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
93 std::string hname_accept =
"hExclusiveJets_accept_bit"+
std::to_string((
int)
i);
94 std::string hname_reject =
"hExclusiveJets_reject_bit"+
std::to_string((
int)
i);
96 bookHist(m_histAcceptX, hname_accept,
"Xi1 vs Xi2", 100, p_XiMin[
i], p_XiMax[
i], 100, p_XiMin[
i], p_XiMax[
i]);
97 bookHist(m_histRejectX, hname_reject,
"Xi1 vs Xi2", 100, p_XiMin[
i], p_XiMax[
i], 100, p_XiMin[
i], p_XiMax[
i]);
99 bookHist(m_histAcceptEta1Eta2, hname_accept,
"ETA vs ETA", 100, p_MinEta1[
i], p_MaxEta1[
i], 100, p_MinEta2[
i], p_MaxEta2[
i]);
100 bookHist(m_histRejectEta1Eta2, hname_reject,
"ETA vs ETA", 100, p_MinEta1[
i], p_MaxEta1[
i], 100, p_MinEta2[
i], p_MaxEta2[
i]);
108 const std::vector<TCS::TOBArray *> &
output,
111 if(
input.size() == 1) {
128 const int eta1 = (*tob1)->eta();
129 const int eta2 = (*tob2)->eta();
130 const unsigned int aeta1 = std::abs(
eta1);
131 const unsigned int aeta2 = std::abs(
eta2);
132 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
134 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
135 if(
parType_t((*tob2)->Et()) <= p_MinET1[
i])
continue;
136 if(p_ApplyEtaCut[
i] &&
137 ((aeta1 < p_MinEta1[
i] || aeta1 >= p_MaxEta1[
i] ) ||
138 (aeta2 < p_MinEta2[
i] || aeta2 >= p_MaxEta2[
i] ) ))
continue;
141 accept = (xi_1 >= p_XiMin[
i]) && (xi_1 <= p_XiMax[
i]) && (xi_2 >= p_XiMin[
i]) && (xi_2 <= p_XiMax[
i]);
142 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
143 const bool fillReject = fillHistos() and not fillAccept;
144 const bool alreadyFilled = decision.
bit(
i);
149 if(fillAccept and not alreadyFilled) {
150 fillHist2D(m_histAcceptX[
i],xi_1,xi_2);
151 fillHist2D(m_histAcceptEta1Eta2[
i],
eta1,
eta2);
152 }
else if(fillReject) {
153 fillHist2D(m_histRejectX[
i],xi_1,xi_2);
154 fillHist2D(m_histRejectEta1Eta2[
i],
eta1,
eta2);
168 const std::vector<TCS::TOBArray *> &
output,
171 if(
input.size() == 1) {
185 double xi_1 = (1.4*
parType_t((*tob1)->Et())+20.)*
exp((*tob1)->etaDouble())+(1.4*
parType_t((*tob2)->Et())+20.)*
exp((*tob2)->etaDouble());
186 double xi_2 = (1.4*
parType_t((*tob1)->Et())+20.)*
exp(-1.*(*tob1)->etaDouble())+(1.4*
parType_t((*tob2)->Et())+20.)*
exp(-1.*(*tob2)->etaDouble());
188 const int eta1 = (*tob1)->eta();
189 const int eta2 = (*tob2)->eta();
190 const unsigned int aeta1 = std::abs(
eta1);
191 const unsigned int aeta2 = std::abs(
eta2);
192 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
194 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
195 if(
parType_t((*tob2)->Et()) <= p_MinET1[
i])
continue;
196 if(p_ApplyEtaCut[
i] &&
197 ((aeta1 < p_MinEta1[
i] || aeta1 > p_MaxEta1[
i] ) ||
198 (aeta2 < p_MinEta2[
i] || aeta2 > p_MaxEta2[
i] ) ))
continue;
200 accept = (xi_1 >p_XiMin[
i]) && (xi_1 < p_XiMax[
i]) && (xi_2 > p_XiMin[
i]) && (xi_2 < p_XiMax[
i]);
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 fillHist2D(m_histAcceptX[
i],xi_1,xi_2);
210 fillHist2D(m_histAcceptEta1Eta2[
i],
eta1,
eta2);
211 }
else if(fillReject) {
212 fillHist2D(m_histRejectX[
i],xi_1,xi_2);
213 fillHist2D(m_histRejectEta1Eta2[
i],
eta1,
eta2);