23 #define LOG std::cout << "TCS::DeltaRSqrIncl1: "
47 if(parameter(
"MaxTob").
value() > 0) {
48 p_NumberLeading1 = parameter(
"MaxTob").value();
49 p_NumberLeading2 = parameter(
"MaxTob").value();
51 p_NumberLeading1 = parameter(
"InputWidth").value();
52 p_NumberLeading2 = parameter(
"InputWidth").value();
54 p_OneBarrel = parameter(
"RequireOneBarrel").value();
56 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
57 p_DeltaRMin[
i] = parameter(
"DeltaRMin",
i).value();
58 p_DeltaRMax[
i] = parameter(
"DeltaRMax",
i).value();
60 p_MinET1 = parameter(
"MinET1").value();
61 p_MinET2 = parameter(
"MinET2").value();
67 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
77 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
78 std::string hname_accept =
"hDeltaRSqrIncl1_accept_bit"+
std::to_string((
int)
i);
79 std::string hname_reject =
"hDeltaRSqrIncl1_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]));
92 const std::vector<TCS::TOBArray *> &
output,
95 if(
input.size() == 1) {
108 if (p_OneBarrel &&
parType_t(abs((*tob1)->eta())) > 10 &&
parType_t(abs((*tob2)->eta())) > 10 )
continue;
110 unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 );
111 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
114 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
115 const bool fillReject = fillHistos() and not fillAccept;
116 const bool alreadyFilled = decision.
bit(
i);
121 if(fillAccept and not alreadyFilled) {
122 fillHist1D(m_histAccept[
i],sqrt((
float)
deltaR2));
123 }
else if(fillReject) {
124 fillHist1D(m_histReject[
i],sqrt((
float)
deltaR2));
131 TCS_EXCEPTION(
"DeltaRSqrIncl1 alg must have either 1 input, but got " <<
input.size());
138 const std::vector<TCS::TOBArray *> &
output,
141 if(
input.size() == 1) {
154 if (p_OneBarrel &&
parType_t(abs((*tob1)->eta())) > 10 &&
parType_t(abs((*tob2)->eta())) > 10 )
continue;
156 unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 );
157 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
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));
177 TCS_EXCEPTION(
"DeltaRSqrIncl1 alg must have either 1 input, but got " <<
input.size());