26 #define LOG std::cout << "TCS::TransverseMassInclusive1: "
61 if(parameter(
"MaxTob").
value() > 0) {
62 p_NumberLeading1 = parameter(
"MaxTob").value();
64 p_NumberLeading1 = parameter(
"InputWidth").value();
67 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
68 p_TMassMin[
i] = parameter(
"MinMTSqr",
i).value();
70 p_MinET1[
i] = parameter(
"MinET1",
i).value();
72 p_MinET2[
i] = parameter(
"MinET2",
i).value();
81 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
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);
85 bookHist(m_histAccept, hname_accept,
"MT", 100, p_TMassMin[
i], 2000);
86 bookHist(m_histReject, hname_reject,
"MT", 100, p_TMassMin[
i], 2000);
96 const std::vector<TCS::TOBArray *> &
output,
100 if(
input.size() == 2) {
111 tob2 !=
input[1]->end() ;
116 unsigned int tmass2 = calcTMassBW( *tob1, *tob2 );
119 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
121 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
122 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
123 accept = tmass2 >= p_TMassMin[
i] ;
124 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
125 const bool fillReject = fillHistos() and not fillAccept;
126 const bool alreadyFilled = decision.
bit(
i);
131 if(fillAccept and not alreadyFilled) {
132 fillHist1D(m_histAccept[
i],(
float)tmass2);
133 }
else if(fillReject) {
134 fillHist1D(m_histReject[
i],(
float)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) {
166 tob2 !=
input[1]->end() ;
171 unsigned int tmass2 = calcTMass( *tob1, *tob2 );
173 for(
unsigned int i=0;
i<numberOutputBits(); ++
i) {
175 if(
parType_t((*tob1)->Et()) <= p_MinET1[
i])
continue;
177 if(
parType_t((*tob2)->Et()) <= p_MinET2[
i])
continue;
179 accept = tmass2 >= p_TMassMin[
i] ;
180 const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(
i) :
accept);
181 const bool fillReject = fillHistos() and not fillAccept;
182 const bool alreadyFilled = decision.
bit(
i);
187 if(fillAccept and not alreadyFilled) {
188 fillHist1D(m_histAccept[
i],(
float)tmass2);
189 }
else if(fillReject) {
190 fillHist1D(m_histReject[
i],(
float)tmass2);
199 TCS_EXCEPTION(
"TransverseMassInclusive1 alg must have either 1 inputs, but got " <<
input.size());