15 #include "GaudiKernel/StatusCode.h" 
   38                                                  const std::string& 
name,
 
   39                                                  const IInterface* 
parent) :
 
   53     return StatusCode::FAILURE;
 
   67         " to " << 
m_endLabelIndex << 
", the HypoTool's name must therefore start with legXXX_ rather than HLT_");
 
   68       return StatusCode::FAILURE;
 
   90   return StatusCode::SUCCESS;
 
   95   return StatusCode::SUCCESS;
 
  102                         std::vector<JetDecision>& jetHypoInputs)
 const {
 
  107              previousDecisionIDs)) {
 
  108     return StatusCode::SUCCESS;
 
  111   std::unique_ptr<ITrigJetHypoInfoCollector> infocollector(
nullptr);
 
  112   std::unique_ptr<ITrigJetHypoInfoCollector> jetdumper(
nullptr);
 
  131                 << 
" no of jets ... "  
  145     pass = 
m_helper->pass(hypoJets, jetCollector, infocollector);
 
  147     ATH_MSG_ERROR(
"Exception raised by the TrigJetHypoToolHelper: "  
  149     return StatusCode::FAILURE;
 
  162       infocollector->
collect(
"TrigJetHypoTool", 
msg);
 
  165     return StatusCode::SUCCESS;
 
  182     infocollector->
collect(
"TrigJetHypoTool", 
msg);
 
  183     infocollector->
write();
 
  185     std::stringstream 
ss;
 
  193   mon_NOutputs = hjv.size();
 
  194   for(
const auto& j : hjv) {
 
  200     float this_negLogSigma2 = 999;
 
  201     j->getAttribute(
"dipz20231122_z", this_z);
 
  202     j->getAttribute(
"dipz20231122_negLogSigma2", this_negLogSigma2);
 
  204     auto mon_dipz_negLogSigma2 = 
Monitored::Scalar( 
"dipz_negLogSigma2", this_negLogSigma2);    
 
  205     float this_GN2X_phbb{999.}, this_GN2X_phcc{999.}, this_GN2X_pqcd{999.}, this_GN2X_ptop{999.};
 
  206     j->getAttribute(
"GN2Xv01_phbb", this_GN2X_phbb);
 
  207     j->getAttribute(
"GN2Xv01_phcc", this_GN2X_phcc);
 
  208     j->getAttribute(
"GN2Xv01_ptop", this_GN2X_ptop);
 
  209     j->getAttribute(
"GN2Xv01_pqcd", this_GN2X_pqcd);
 
  214     float this_GN2X_discriminant{999.};
 
  215     if (this_GN2X_phbb > 0.){
 
  216         float top_frac{0.25};
 
  217         float denom = this_GN2X_pqcd*(1. - top_frac) + this_GN2X_ptop * top_frac;
 
  219             this_GN2X_discriminant = 
log(this_GN2X_phbb/
denom);
 
  222     auto mon_GN2X_discriminant = 
Monitored::Scalar(
"GN2Xv01_discriminant", this_GN2X_discriminant);
 
  224     float this_GN2XTrig_phbb{999.}, this_GN2XTrig_pqcd{999.}, this_GN2XTrig_ptop{999.};
 
  225     j->getAttribute(
"GN2XTrig_phbb", this_GN2XTrig_phbb);
 
  226     j->getAttribute(
"GN2XTrig_ptop", this_GN2XTrig_ptop);
 
  227     j->getAttribute(
"GN2XTrig_pqcd", this_GN2XTrig_pqcd);
 
  231     float this_GN2XTrig_discriminant{999.};
 
  232     if (this_GN2XTrig_phbb > 0.){
 
  233         float top_frac{0.25};
 
  234         float denom = this_GN2XTrig_pqcd*(1. - top_frac) + this_GN2XTrig_ptop * top_frac;
 
  236             this_GN2XTrig_discriminant = 
log(this_GN2XTrig_phbb/
denom);
 
  239     auto mon_GN2XTrig_discriminant = 
Monitored::Scalar(
"GN2XTrig_discriminant", this_GN2XTrig_discriminant);
 
  241     auto monitor_group_passingjets = 
Monitored::Group( 
m_monTool, mon_jetEt, mon_jetEta, mon_jetPhi , mon_dipz_z, mon_dipz_negLogSigma2, mon_jetMass, mon_GN2X_phbb, mon_GN2X_phcc, mon_GN2X_ptop, mon_GN2X_pqcd, mon_GN2X_discriminant, mon_GN2XTrig_phbb, mon_GN2XTrig_ptop, mon_GN2XTrig_pqcd, mon_GN2XTrig_discriminant);
 
  245   auto legInds = jetCollector.
legInds();
 
  246   for (
const auto& 
label : legInds) {
 
  250                               [](
double sum, 
const HypoJetVector::value_type jptr){return sum + jptr->et()*0.001;} ));      
 
  254   return StatusCode::SUCCESS;
 
  270                                   const std::unique_ptr<ITrigJetHypoInfoCollector>& infocollector)
 const {
 
  272   if (jetCollector.
empty()) {
 
  275       ", but did not specify which jets participated");
 
  276     return StatusCode::FAILURE;
 
  279   auto legIndices = jetCollector.
legInds();
 
  282     return StatusCode::FAILURE;
 
  286   ATH_MSG_DEBUG(
"There are some indices: " << legIndices.size());
 
  287   for(
size_t i = 0; 
i < legIndices.size(); 
i ++){
 
  294   auto participating_jets = jetCollector.
xAODJets();
 
  300     auto legInds = jetCollector.
legInds();
 
  301     std::stringstream 
ss;
 
  303     for(
const auto& 
label : legInds){
 
  306       for(
const auto& j : 
jets){
 
  307         ss << static_cast<const void*>(j) << 
'\n';
 
  314   return StatusCode::SUCCESS;
 
  319                                    const std::vector<JetDecision>& jetHypoInputs)
 const {
 
  321   auto legIndices = jetCollector.
legInds();
 
  322   for(
const auto& legInd : legIndices){
 
  323     auto participating_jets = jetCollector.
xAODJets(legInd);
 
  327   return StatusCode::SUCCESS;
 
  335                            const std::vector<JetDecision>& jetHypoInputs,
 
  340   for (
auto& pair : jetHypoInputs) {
 
  350     passingIDs.insert(
getID(legInd).numeric());
 
  357   return StatusCode::SUCCESS;