93 std::string hname_accept =
"hExclusiveJets_accept_bit"+std::to_string((
int)i);
94 std::string hname_reject =
"hExclusiveJets_reject_bit"+std::to_string((
int)i);
108 const std::vector<TCS::TOBArray *> & output,
111 if(input.size() == 1) {
114 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) <
p_NumberLeading1;
120 tob2 != input[0]->end() && distance( input[0]->begin(), tob2) <
p_NumberLeading1;
128 const int eta1 = (*tob1)->eta();
129 const int eta2 = (*tob2)->eta();
130 const unsigned int aeta1 = std::abs(eta1);
131 const unsigned int aeta2 = std::abs(eta2);
143 const bool fillReject =
fillHistos() and not fillAccept;
144 const bool alreadyFilled = decision.
bit(i);
149 if(fillAccept and not alreadyFilled) {
152 }
else if(fillReject) {
156 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail") <<
" xi_1 = " << xi_1);
162 TCS_EXCEPTION(
"ExclusiveJets alg must have 1 input list, but got " << input.size());
168 const std::vector<TCS::TOBArray *> & output,
171 if(input.size() == 1) {
174 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) <
p_NumberLeading1;
180 tob2 != input[0]->end() && distance( input[0]->begin(), tob2) <
p_NumberLeading1;
185 double xi_1 = (1.4*
parType_t((*tob1)->Et())+20.)*exp((*tob1)->etaDouble())+(1.4*
parType_t((*tob2)->Et())+20.)*exp((*tob2)->etaDouble());
186 double xi_2 = (1.4*
parType_t((*tob1)->Et())+20.)*exp(-1.*(*tob1)->etaDouble())+(1.4*
parType_t((*tob2)->Et())+20.)*exp(-1.*(*tob2)->etaDouble());
188 const int eta1 = (*tob1)->eta();
189 const int eta2 = (*tob2)->eta();
190 const unsigned int aeta1 = std::abs(eta1);
191 const unsigned int aeta2 = std::abs(eta2);
202 const bool fillReject =
fillHistos() and not fillAccept;
203 const bool alreadyFilled = decision.
bit(i);
208 if(fillAccept and not alreadyFilled) {
211 }
else if(fillReject) {
215 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail") <<
" xi_1 = " << xi_1);
221 TCS_EXCEPTION(
"ExclusiveJets alg must have 1 input list, but got " << input.size());
#define REGISTER_ALG_TCS(CLASS)
#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)
void defineParameter(const std::string &name, TCS::parType_t value)
void fillHist2D(const std::string &histName, double x, double y)
data_t::const_iterator const_iterator
std::vector< std::string > m_histAcceptEta1Eta2
void setNumberOutputBits(unsigned int numberOutputBits)
DecisionAlg(const std::string &name)
std::vector< std::string > m_histRejectEta1Eta2
bool fillHistosBasedOnHardware() const
! getter
bool fillHistos() const
whether the monitoring histograms should be filled
std::vector< std::string > m_histRejectX
std::vector< std::string > m_histAcceptX
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) override final
virtual StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison) override final
ExclusiveJets(const std::string &name)
parType_t p_ApplyEtaCut[6]
parType_t p_NumberLeading1
virtual StatusCode initialize() override final
static unsigned int calcXi1(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2, unsigned ptShift, unsigned ptScale)
static unsigned int calcXi2(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2, unsigned ptShift, unsigned ptScale)