26 #define LOG std::cout << "TCS::DisambiguationInvmIncl2: "
52 p_NumberLeading1 = parameter(
"InputWidth1").value();
53 p_NumberLeading2 = parameter(
"InputWidth2").value();
54 if(parameter(
"MaxTob1").
value() > 0) p_NumberLeading1 = parameter(
"MaxTob1").value();
55 if(parameter(
"MaxTob2").
value() > 0) p_NumberLeading2 = parameter(
"MaxTob2").value();
57 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
58 p_MinET1[
i] = parameter(
"MinET1",
i).value();
59 p_MinET2[
i] = parameter(
"MinET2",
i).value();
60 p_InvMassMin[
i] = parameter(
"MinMSqr",
i).value();
61 p_InvMassMax[
i] = parameter(
"MaxMSqr",
i).value();
73 const std::vector<TCS::TOBArray *> & output,
76 if(input.size() == 2) {
78 tob1 != input[0]->end() &&
distance(input[0]->
begin(), tob1) < p_NumberLeading1;
81 tob2 != input[1]->end() &&
distance(input[1]->
begin(), tob2) < p_NumberLeading2;
83 unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 );
84 unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 );
85 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
87 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
88 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
90 invmass2 >= p_InvMassMin[
i] &&
91 invmass2 <= p_InvMassMax[
i] );
98 <<
" invmass2 = " << invmass2);
102 for (
unsigned int i=0;
i < numberOutputBits(); ++
i) {
105 output[
i]->setAmbiguityFlag(hasAmbiguousInputs);
108 TCS_EXCEPTION(
"DisambiguationInvmIncl2 alg must have 2 inputs, but got " << input.size());
115 const std::vector<TCS::TOBArray *> & output,
118 if( input.size() == 2) {
120 tob1 != input[0]->end() &&
distance(input[0]->
begin(), tob1) < p_NumberLeading1;
123 tob2 != input[1]->end() &&
distance(input[1]->
begin(), tob2) < p_NumberLeading2;
125 unsigned int invmass2 = calcInvMass( *tob1, *tob2 );
126 unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 );
127 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
129 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
130 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
132 invmass2 >= p_InvMassMin[
i] &&
133 invmass2 <= p_InvMassMax[
i] );
143 TCS_EXCEPTION(
"DisambiguationInvmIncl2 alg must have 2 inputs, but got " << input.size());