87 std::string hname_accept =
"hDeltaEtaPhiIncl2_accept_bit"+std::to_string((
int)i);
88 std::string hname_reject =
"hDeltaEtaPhiIncl2_reject_bit"+std::to_string((
int)i);
101 const std::vector<TCS::TOBArray *> & output,
104 if(input.size() == 2) {
108 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading;
112 tob2 != input[1]->end() && distance( input[1]->begin(), tob2) <
p_NumberLeading2;
120 std::stringstream msgss;
121 msgss <<
" phi1=" << (*tob1)->phi() <<
" , phi2=" << (*tob2)->phi()
122 <<
", DeltaPhi = " <<
deltaPhi <<
", DeltaEta = " << deltaEta <<
" -> ";
129 const bool fillReject =
fillHistos() and not fillAccept;
130 const bool alreadyFilled = decision.
bit(i);
135 if(fillAccept and not alreadyFilled) {
137 }
else if(fillReject) {
140 msgss <<
"DeltaRApproxBoxCutIncl2 alg bit" << i << (accept?
" pass":
" fail") <<
"|";
148 output[i]->setAmbiguityFlag(hasAmbiguousInputs);
151 TCS_EXCEPTION(
"DeltaEtaPhiIncl2 alg must have 2 inputs, but got " << input.size());
159 const std::vector<TCS::TOBArray *> & output,
162 if(input.size() == 2) {
166 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading;
170 tob2 != input[1]->end() && distance( input[1]->begin(), tob2) <
p_NumberLeading2;
178 std::stringstream msgss;
179 msgss <<
" Combination : " << distance( input[0]->begin(), tob1) <<
" x " << distance( input[1]->begin(), tob2) <<
" phi1=" << (*tob1)->phi() <<
" , phi2=" << (*tob2)->phi()
180 <<
", DeltaPhi = " <<
deltaPhi <<
", DeltaEta = " << deltaEta <<
" -> ";
187 const bool fillReject =
fillHistos() and not fillAccept;
188 const bool alreadyFilled = decision.
bit(i);
193 if(fillAccept and not alreadyFilled) {
195 }
else if(fillReject) {
198 msgss <<
"DeltaRApproxBoxCutIncl2 alg bit" << i << (accept?
" pass":
" fail") <<
"|";
204 TCS_EXCEPTION(
"DeltaEtaPhiIncl2 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 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)
parType_t p_DeltaEtaMax[3]
virtual StatusCode initialize()
parType_t p_NumberLeading2
parType_t p_DeltaEtaMin[3]
parType_t p_NumberLeading1
DeltaEtaPhiIncl2(const std::string &name)
parType_t p_DeltaPhiMax[3]
virtual ~DeltaEtaPhiIncl2()
virtual StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
parType_t p_DeltaPhiMin[3]
bool isAmbiguousTruncation(TCS::TOBArray const *tobs, size_t pos, unsigned minEt=0)