23 #define LOG std::cout << "TCS::DeltaRSqrIncl2: "
53 p_NumberLeading1 = parameter(
"InputWidth1").value();
54 p_NumberLeading2 = parameter(
"InputWidth2").value();
55 if(parameter(
"MaxTob1").
value() > 0) p_NumberLeading1 = parameter(
"MaxTob1").value();
56 if(parameter(
"MaxTob2").
value() > 0) p_NumberLeading2 = parameter(
"MaxTob2").value();
58 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
59 p_DeltaRMin[
i] = parameter(
"DeltaRMin",
i).value();
60 p_DeltaRMax[
i] = parameter(
"DeltaRMax",
i).value();
61 p_MinET1[
i] = parameter(
"MinET1",
i).value();
62 p_MinET2[
i] = parameter(
"MinET2",
i).value();
77 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
78 std::string hname_accept =
"hDeltaRSqrIncl2_accept_bit"+
std::to_string((
int)
i);
79 std::string hname_reject =
"hDeltaRSqrIncl2_reject_bit"+
std::to_string((
int)
i);
81 bookHist(m_histAccept, hname_accept,
"DR", 100, sqrt(p_DeltaRMin[
i]), sqrt(p_DeltaRMax[
i]));
82 bookHist(m_histReject, hname_reject,
"DR", 100, sqrt(p_DeltaRMin[
i]), sqrt(p_DeltaRMax[
i]));
91 const std::vector<TCS::TOBArray *> &
output,
95 if(
input.size() == 2) {
105 unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 );
107 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
109 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
110 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
112 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
113 const bool fillReject = fillHistos() and not fillAccept;
114 const bool alreadyFilled = decision.
bit(
i);
119 if(fillAccept and not alreadyFilled) {
120 fillHist1D(m_histAccept[
i],sqrt((
float)
deltaR2));
121 }
else if(fillReject) {
122 fillHist1D(m_histReject[
i],sqrt((
float)
deltaR2));
136 const std::vector<TCS::TOBArray *> &
output,
140 if(
input.size() == 2) {
152 unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 );
155 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
157 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
158 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
160 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
161 const bool fillReject = fillHistos() and not fillAccept;
162 const bool alreadyFilled = decision.
bit(
i);
167 if(fillAccept and not alreadyFilled) {
168 fillHist1D(m_histAccept[
i],sqrt((
float)
deltaR2));
169 }
else if(fillReject) {
170 fillHist1D(m_histReject[
i],sqrt((
float)
deltaR2));