50 for(
int i=0; i<3; ++i) {
80 std::string hname_accept =
"hDeltaRApproxBoxCutIncl1_accept_bit"+std::to_string((
int)i);
81 std::string hname_reject =
"hDeltaRApproxBoxCutIncl1_reject_bit"+std::to_string((
int)i);
93 const std::vector<TCS::TOBArray *> & output,
97 return process(input,output,decision);
103 const std::vector<TCS::TOBArray *> & output,
106 if(input.size() == 1) {
110 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading;
116 tob2 != input[0]->end() && distance( input[0]->begin(), tob2) <
p_NumberLeading2;
126 std::stringstream msgss;
127 msgss <<
" Combination : " << distance( input[0]->begin(), tob1)
128 <<
" x " << distance( input[0]->begin(), tob2)
129 <<
" phi1=" << (*tob1)->phi()
130 <<
" , phi2=" << (*tob2)->phi()
132 <<
", DeltaEta = " << deltaEta <<
" -> ";
137 const bool fillReject =
fillHistos() and not fillAccept;
138 const bool alreadyFilled = decision.
bit(i);
143 if(fillAccept and not alreadyFilled) {
145 }
else if(fillReject) {
148 msgss <<
"DeltaRApproxBoxCutIncl1 alg bit" << i << (accept?
" pass":
" fail") <<
"|";
154 TCS_EXCEPTION(
"DeltaRApproxBoxCutIncl1 alg must have 1 input, but got " << input.size());
#define REGISTER_ALG_TCS(CLASS)
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
#define TCS_EXCEPTION(MSG)
const Parameter & parameter(const std::string ¶meterName) const
const std::string & name() const
void bookHist(std::vector< std::string > ®Name, const std::string &name, const std::string &title, const int binx, const int xmin, const int xmax)
unsigned int calcDeltaEta(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
void defineParameter(const std::string &name, TCS::parType_t value)
unsigned int calcDeltaPhi(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
void fillHist2D(const std::string &histName, double x, double y)
data_t::const_iterator const_iterator
void setNumberOutputBits(unsigned int numberOutputBits)
DecisionAlg(const std::string &name)
bool fillHistosBasedOnHardware() const
! getter
bool fillHistos() const
whether the monitoring histograms should be filled
std::vector< std::string > m_histAccept
std::vector< std::string > m_histReject
unsigned int numberOutputBits() const
bool getDecisionHardwareBit(const unsigned int &bitNumber) const
! get one hardware decision bit from this algo
bool bit(unsigned int index) const
void setBit(unsigned int index, bool value)
virtual StatusCode initialize()
parType_t p_DeltaEtaMin[3]
parType_t p_DeltaPhiMax[3]
parType_t p_DeltaPhiMin[3]
parType_t p_NumberLeading2
DeltaRApproxBoxCutIncl1(const std::string &name)
virtual StatusCode process(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
virtual StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
parType_t p_NumberLeading1
virtual ~DeltaRApproxBoxCutIncl1()
parType_t p_DeltaEtaMax[3]
const std::string process