80 const std::string& collectorName,
82 const std::string& logname,
87 std::unique_ptr<ITrigJetHypoInfoCollector> debugInfoCollector(
nullptr);
92 if (debugInfoCollector){
93 std::stringstream ss0;
94 ss0 <<
"n jets " << jv.size() <<
'\n';
95 debugInfoCollector-> collect(
"JetHypoExerciserCompareAlg", ss0.str());
98 std::stringstream ss1;
100 for(
const auto& j : jv){
101 ss1 <<
"e: " << j->e() <<
" et " << j->et() <<
" eta " << j->eta()
104 debugInfoCollector-> collect(
"JetHypoExerciserCompareAlg", ss1.str());
108 pass = helper->pass(jv, jetCollector, debugInfoCollector);
110 std::stringstream
ss;
111 ss <<
"========= ncall: "<<
m_ncall <<
"==========\n";
112 if(debugInfoCollector){
113 std::stringstream ss1;
115 for(
const auto& j : jetCollector.
hypoJets()){
116 ss1 <<
"e: " << j->e() <<
" et " << j->et() <<
" eta " << j->eta()
119 debugInfoCollector-> collect(
"JetHypoExerciserCompareAlg", ss1.str());
120 debugInfoCollector-> collect(
"JetHypoExerciserCompareAlg collectedJets",
123 ss << debugInfoCollector->toString() +
'\n';
126 std::ofstream outfile;
128 outfile.open(logname);
131 return StatusCode::SUCCESS;
147 std::string collectorName = name() +
"debugInfoCollector0";
148 std::string logname =
m_logname +
"_ev_" + std::to_string(
m_ncall) +
"tool0";
158 std::stringstream
ss;
159 ss << timer.elapsed_to_update()
160 <<
" tool0 " << std::boolalpha << pass0 <<
'\n';
162 std::ofstream outfile;
163 outfile.open(logname);
168 collectorName = name() +
"debugInfoCollector1";
180 std::stringstream
ss;
181 ss << timer.elapsed_to_update()
182 <<
" tool1 "<< std::boolalpha << pass1 <<
'\n';
184 std::ofstream outfile;
185 outfile.open(logname);
191 std::string spass0 = (pass0 ?
"True":
"False");
192 std::string spass1 = (pass1 ?
"True":
"False");
196 <<
"pass 0 "<< spass0 <<
" pass 1 " << spass1);
204 ATH_MSG_INFO (
"hypo helper tools agree on result which is: " << spass0);
209 std::size_t njets = collected0.size();
211 if (njets == collected1.size()) {
212 std::sort(collected0.begin(), collected0.end());
213 std::sort(collected1.begin(), collected1.end());
216 for (std::size_t i = 0; i < njets; i++) {
217 ATH_MSG_INFO(
" jet 0 : " <<
static_cast<const void*
>(collected0.at(i).get()) <<
218 " jet 1 : " <<
static_cast<const void*
>(collected1.at(i).get()));
220 if (collected0.at(i) != collected1.at(i)) {
233 ATH_MSG_INFO(
" no of jets 0 : " << collected0.size() <<
" "
234 " no of jets 1 : " << collected1.size() <<
" "
235 " no of jets differ ");
239 return StatusCode::SUCCESS;
StatusCode execute_(ToolHandle< ITrigJetHypoToolHelper > &, HypoJetVector &, const std::string &collectorName, xAODJetCollector &jetCollector, const std::string &logname, bool &pass)