26#define LOG std::cout << "TCS::TransverseMassInclusive1: "
82 std::string hname_accept =
"hTransverseMassInclusive1_accept_bit"+std::to_string((
int)i);
83 std::string hname_reject =
"hTransverseMassInclusive1_reject_bit"+std::to_string((
int)i);
96 const std::vector<TCS::TOBArray *> & output,
100 if(input.size() == 2) {
105 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) <
p_NumberLeading1;
111 tob2 != input[1]->end() ;
125 const bool fillReject =
fillHistos() and not fillAccept;
126 const bool alreadyFilled = decision.
bit(i);
131 if(fillAccept and not alreadyFilled) {
133 }
else if(fillReject) {
136 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail") <<
" tmass2 = " << tmass2);
142 TCS_EXCEPTION(
"TransverseMassInclusive1 alg must have either 1 inputs, but got " << input.size());
151 const std::vector<TCS::TOBArray *> & output,
155 if(input.size() == 2) {
160 tob1 != input[0]->end() && distance( input[0]->begin(), tob1) <
p_NumberLeading1;
166 tob2 != input[1]->end() ;
171 unsigned int tmass2 =
calcTMass( *tob1, *tob2 );
181 const bool fillReject =
fillHistos() and not fillAccept;
182 const bool alreadyFilled = decision.
bit(i);
187 if(fillAccept and not alreadyFilled) {
189 }
else if(fillReject) {
192 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail") <<
" tmass2 = " << tmass2);
199 TCS_EXCEPTION(
"TransverseMassInclusive1 alg must have either 1 inputs, but got " << input.size());
#define REGISTER_ALG_TCS(CLASS)
#define TCS_EXCEPTION(MSG)
const Parameter & parameter(const std::string ¶meterName) const
unsigned int calcTMass(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
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)
unsigned int calcTMassBW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
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_NumberLeading1
TransverseMassInclusive1(const std::string &name)
virtual StatusCode initialize()
virtual ~TransverseMassInclusive1()
virtual StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)