21 declareInterface<ICombinerTool>(
this );
29 return StatusCode::SUCCESS;
34 return StatusCode::SUCCESS;
79 std::vector<double> likelihood;
80 if (particleJet.tagInfo(infoKey) == 0)
83 likelihood.push_back(-1.);
84 likelihood.push_back(-1.);
97 const std::vector<std::string>& combineTheseTaggers )
const
100 std::vector<double> likelihood;
102 if ( particleJet.jetTagInfoVector().size() == 0 )
104 ATH_MSG_WARNING(
"#BTAG# JetTagInfoBase vector is ZERO. Nothing to combine!");
109 if ( particleJet.tagInfo(
"TruthInfo") != 0 && particleJet.jetTagInfoVector().size() == 1 )
111 ATH_MSG_DEBUG(
"#BTAG# The only object in ITagInfo vector is TruthInfo. No combine possible.");
124 bool firstValidTagger(
true);
126 for ( std::vector<std::string>::const_iterator strItr = combineTheseTaggers.begin(); strItr != combineTheseTaggers.end(); ++strItr )
128 ATH_MSG_VERBOSE(
"#BTAG# Combining likelihood from these taggers " << *strItr);
130 if ( infoObject != 0 )
134 if (firstValidTagger)
138 itr != likelihood.end() ; ++itr )
142 firstValidTagger=
false;
145 const std::vector<double>& tmpVector = infoObject->
tagLikelihood();
147 unsigned int numInputFiles( 0 );
148 for ( std::vector<double>::const_iterator tmpItr = tmpVector.begin();
149 tmpItr != tmpVector.end(); ++tmpItr )
151 if (likelihood.size()>=numInputFiles+1)
153 likelihood[ numInputFiles ] *= tmpVector[ numInputFiles ];
159 ATH_MSG_DEBUG(
"#BTAG# TagTool " << *strItr <<
" does exist but is not valid.");
162 ATH_MSG_DEBUG(
"#BTAG# TagTool " << *strItr <<
" does not exist.");
170 likelihood.resize(0);
171 likelihood.push_back(-1.);
172 likelihood.push_back(-1.);
179 lhItr != likelihood.end(); ++lhItr )
185 lhItr != likelihood.end(); ++lhItr )
194 likelihood.push_back(-1.);
195 likelihood.push_back(-1.);