24#define LOG std::cout << "TCS::DisambiguationIncl3: "
90 const std::vector<TCS::TOBArray *> & output,
95 if( input.size() == 3) {
99 tob1 != input[0]->end() && distance(input[0]->begin(), tob1) <
p_NumberLeading1;
105 tob2 != input[1]->end() && distance(input[1]->begin(), tob2) <
p_NumberLeading2;
111 if (((*tob1)->eta() == (*tob2)->eta()) && ((*tob1)->phi() == (*tob2)->phi()) )
continue;
114 tob3 != input[2]->end() ;
132 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail") <<
" deltaR13 = " << deltaR13 <<
" deltaR23 = " << deltaR23);
147 output[i]->setAmbiguityFlag(hasAmbiguousInputs);
152 TCS_EXCEPTION(
"DisambiguationIncl3 alg must have 3 inputs, but got " << input.size());
161 const std::vector<TCS::TOBArray *> & output,
166 if( input.size() == 3) {
170 tob1 != input[0]->end() && distance(input[0]->begin(), tob1) <
p_NumberLeading1;
176 tob2 != input[1]->end() && distance(input[1]->begin(), tob2) <
p_NumberLeading2;
182 if (((*tob1)->etaDouble() == (*tob2)->etaDouble()) && ((*tob1)->phiDouble() == (*tob2)->phiDouble()) )
continue;
185 tob3 != input[2]->end() ;
189 unsigned int deltaR13 =
calcDeltaR2( *tob1, *tob3 );
190 unsigned int deltaR23 =
calcDeltaR2( *tob2, *tob3 );
202 TRG_MSG_DEBUG(
"Decision " << i <<
": " << (accept?
"pass":
"fail") <<
" deltaR13 = " << deltaR13 <<
" deltaR23 = " << deltaR23);
215 TCS_EXCEPTION(
"DisambiguationIncl3 alg must have 3 inputs, 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
unsigned int calcDeltaR2BW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
void defineParameter(const std::string &name, TCS::parType_t value)
unsigned int calcDeltaR2(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
data_t::const_iterator const_iterator
void setNumberOutputBits(unsigned int numberOutputBits)
DecisionAlg(const std::string &name)
unsigned int numberOutputBits() const
void setBit(unsigned int index, bool value)
parType_t p_NumberLeading3
virtual StatusCode initialize()
parType_t p_NumberLeading2
virtual StatusCode process(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
virtual StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
parType_t p_NumberLeading1
DisambiguationIncl3(const std::string &name)
virtual ~DisambiguationIncl3()
bool isAmbiguousTruncation(TCS::TOBArray const *tobs, size_t pos, unsigned minEt=0)