86 std::string hname_accept =
"hDeltaEtaPhiIncl1_accept_bit"+std::to_string((
int)i);
87 std::string hname_reject =
"hDeltaEtaPhiIncl1_reject_bit"+std::to_string((
int)i);
100 const std::vector<TCS::TOBArray *> & output,
103 if(input.size() == 1) {
107 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading;
112 tob2 != input[0]->end() && distance( input[0]->begin(), tob2) <
p_NumberLeading2;
120 std::stringstream msgss;
121 msgss <<
" phi1=" << (*tob1)->phi() <<
" , phi2=" << (*tob2)->phi()
122 <<
", DeltaPhi = " <<
deltaPhi <<
", DeltaEta = " << deltaEta <<
" -> ";
130 const bool fillReject =
fillHistos() and not fillAccept;
131 const bool alreadyFilled = decision.
bit(i);
136 if(fillAccept and not alreadyFilled) {
138 }
else if(fillReject) {
141 msgss <<
"DeltaEtaPhiIncl1 alg bit" << i << (accept?
" pass":
" fail") <<
"|";
149 output[i]->setAmbiguityFlag(hasAmbiguousInputs);
152 TCS_EXCEPTION(
"DeltaEtaPhiIncl1 alg must have 1 input, but got " << input.size());
159 const std::vector<TCS::TOBArray *> & output,
162 if(input.size() == 1) {
166 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading;
171 tob2 != input[0]->end() && distance( input[0]->begin(), tob2) <
p_NumberLeading2;
179 std::stringstream msgss;
180 msgss <<
" Combination : " << distance( input[0]->begin(), tob1)
181 <<
" x " << distance( input[0]->begin(), tob2)
182 <<
" phi1=" << (*tob1)->phi()
183 <<
" , phi2=" << (*tob2)->phi()
185 <<
", DeltaEta = " << deltaEta <<
" -> ";
193 const bool fillReject =
fillHistos() and not fillAccept;
194 const bool alreadyFilled = decision.
bit(i);
199 if(fillAccept and not alreadyFilled) {
201 }
else if(fillReject) {
204 msgss <<
"DeltaEtaPhiIncl1 alg bit" << i << (accept?
" pass":
" fail") <<
"|";
210 TCS_EXCEPTION(
"DeltaEtaPhiIncl1 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 calcDeltaPhiBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaEta(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
unsigned int calcDeltaEtaBW(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 process(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
DeltaEtaPhiIncl1(const std::string &name)
virtual StatusCode initialize()
parType_t p_DeltaPhiMax[3]
virtual ~DeltaEtaPhiIncl1()
parType_t p_NumberLeading1
parType_t p_NumberLeading2
parType_t p_DeltaPhiMin[3]
virtual StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
parType_t p_DeltaEtaMin[3]
parType_t p_DeltaEtaMax[3]
bool isAmbiguousTruncation(TCS::TOBArray const *tobs, size_t pos, unsigned minEt=0)