25 #define LOG std::cout << "TCS::MinDeltaPhiIncl2: "
47 p_NumberLeading1 = parameter(
"InputWidth1").value();
48 p_NumberLeading2 = parameter(
"InputWidth2").value();
49 if(parameter(
"MaxTob1").
value() > 0) p_NumberLeading1 = parameter(
"MaxTob1").value();
50 if(parameter(
"MaxTob2").
value() > 0) p_NumberLeading2 = parameter(
"MaxTob2").value();
52 for(
unsigned int i=0;
i< numberOutputBits(); ++
i) {
53 p_DeltaPhiMin[
i] = parameter(
"DeltaPhiMin",
i).value();
55 p_MinET1 = parameter(
"MinET1").value();
56 p_MinET2 = parameter(
"MinET2").value();
59 for(
unsigned int i=0;
i< numberOutputBits(); ++
i) {
67 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
68 std::string hname_accept =
"hMinDeltaPhiIncl2_accept_bit"+
std::to_string((
int)
i);
69 std::string hname_reject =
"hMinDeltaPhiIncl2_reject_bit"+
std::to_string((
int)
i);
71 bookHist(m_histAccept, hname_accept,
"DPHI", 100, p_DeltaPhiMin[
i], 70);
72 bookHist(m_histReject, hname_reject,
"DPHI", 100, p_DeltaPhiMin[
i], 70);
82 const std::vector<TCS::TOBArray *> &
output,
87 unsigned int mindphi = *std::min_element(
std::begin(p_DeltaPhiMin),
std::end(p_DeltaPhiMin));
94 if (
input.size() == 2) {
101 if(
parType_t((*tob1)->Et()) <= p_MinET1)
continue;
107 if(
parType_t((*tob2)->Et()) <= p_MinET2)
continue;
110 unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
130 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
131 bool accept = mindphi > p_DeltaPhiMin[
i] ;
132 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
133 const bool fillReject = fillHistos() and not fillAccept;
134 const bool alreadyFilled = decision.
bit(
i);
135 if(
accept and (tobmin1!=invalidIterator and tobmin2!=invalidIterator)) {
139 if(fillAccept and not alreadyFilled){
140 fillHist1D(m_histAccept[
i],(
float)mindphi);
141 }
else if(fillReject){
142 fillHist1D(m_histReject[
i],(
float)mindphi);
155 const std::vector<TCS::TOBArray *> &
output,
160 unsigned int mindphi = *std::min_element(
std::begin(p_DeltaPhiMin),
std::end(p_DeltaPhiMin));
161 bool firstphi =
true;
166 if (
input.size() == 2) {
173 if(
parType_t((*tob1)->Et()) <= p_MinET1)
continue;
179 if(
parType_t((*tob2)->Et()) <= p_MinET2)
continue;
182 unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
202 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
203 bool accept = mindphi > p_DeltaPhiMin[
i] ;
204 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
205 const bool fillReject = fillHistos() and not fillAccept;
206 const bool alreadyFilled = decision.
bit(
i);
211 if(fillAccept and not alreadyFilled){
212 fillHist1D(m_histAccept[
i],(
float)mindphi);
213 }
else if(fillReject) {
214 fillHist1D(m_histReject[
i],(
float)mindphi);