50 for(
int i=0; i<3; ++i) {
82 std::string hname_accept =
"hDeltaRApproxBoxCutIncl2_accept_bit"+std::to_string((
int)i);
83 std::string hname_reject =
"hDeltaRApproxBoxCutIncl2_reject_bit"+std::to_string((
int)i);
94 const std::vector<TCS::TOBArray *> & output,
98 return process(input,output,decision);
105 const std::vector<TCS::TOBArray *> & output,
108 if(input.size() == 2) {
112 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading;
117 tob2 != input[1]->end() && distance( input[1]->begin(), tob2) <
p_NumberLeading2;
126 std::stringstream msgss;
127 msgss <<
" Combination : " << distance( input[0]->begin(), tob1)
128 <<
" x " << distance( input[1]->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 <<
"DeltaRApproxBoxCutIncl2 alg bit" << i << (accept?
" pass":
" fail") <<
"|";
154 TCS_EXCEPTION(
"DeltaRApproxBoxCutIncl2 alg must have 2 inputs, 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 ~DeltaRApproxBoxCutIncl2()
virtual StatusCode initialize()
parType_t p_DeltaEtaMin[3]
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)
DeltaRApproxBoxCutIncl2(const std::string &name)
parType_t p_DeltaEtaMax[3]
parType_t p_NumberLeading1
parType_t p_DeltaPhiMax[3]
parType_t p_NumberLeading2
parType_t p_DeltaPhiMin[3]
const std::string process