27#define LOG std::cout << name() << ": "
72 std::string hname_accept =
"hJetHT_accept_bit"+std::to_string((
int)i);
73 std::string hname_reject =
"hJetHT_reject_bit"+std::to_string((
int)i);
84 const std::vector<TCS::TOBArray *> & output,
88 return process(input,output,decision);
94 const std::vector<TCS::TOBArray *> & output,
99 TCS_EXCEPTION(
"JetHT alg must have exactly 1 input list, but got " << input.size());
102 unsigned int sumET = 0;
104 if (
p_NumberLeading1 < input[0]->size()) { output[0]->setAmbiguityFlag(
false); }
108 tob != input[0]->end() && distance(input[0]->begin(), tob) <
p_NumberLeading1;
114 if ((*tob)->Et() == (*tob2)->Et() && distance(input[0]->begin(), tob) ==
p_NumberLeading1 - 1) {
115 output[0]->setAmbiguityFlag(
true);
125 sumET += (*tob)->Et();
130 bool accept = sumET >
p_HT[i];
132 const bool fillReject =
fillHistos() and not fillAccept;
133 const bool alreadyFilled = decision.
bit(i);
134 decision.
setBit( i, accept );
139 if(fillAccept and not alreadyFilled) {
141 }
else if(fillReject) {
145 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail") <<
" HT = " << sumET);
#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 fillHist1D(const std::string &histName, double x)
void defineParameter(const std::string &name, TCS::parType_t value)
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)
static GenericTOB * createOnHeap(const GenericTOB &)
virtual StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
virtual StatusCode process(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
parType_t p_NumberLeading1
JetHT(const std::string &name)
virtual StatusCode initialize()
const std::string process