@@ -383,15 +383,17 @@ struct HfFilter { // Main struct for HF triggers
383383 onnxFileXicToPiKPConf};
384384
385385 for (auto iCharmPart{0 }; iCharmPart < kNCharmParticles ; ++iCharmPart) {
386- sessionML[iCharmPart].reset (new Ort::Experimental::Session{env[iCharmPart], onnxFiles[iCharmPart], sessionOptions[iCharmPart]});
387- inputNamesML[iCharmPart] = sessionML[iCharmPart]->GetInputNames ();
388- inputShapesML[iCharmPart] = sessionML[iCharmPart]->GetInputShapes ();
389- if (inputShapesML[iCharmPart][0 ][0 ] < 0 ) {
390- LOGF (warning, Form (" Model for %s with negative input shape likely because converted with ummingbird, setting it to 1." , charmParticleNames[iCharmPart].data ()));
391- inputShapesML[iCharmPart][0 ][0 ] = 1 ;
386+ if (onnxFiles[iCharmPart] != " " ) {
387+ sessionML[iCharmPart].reset (new Ort::Experimental::Session{env[iCharmPart], onnxFiles[iCharmPart], sessionOptions[iCharmPart]});
388+ inputNamesML[iCharmPart] = sessionML[iCharmPart]->GetInputNames ();
389+ inputShapesML[iCharmPart] = sessionML[iCharmPart]->GetInputShapes ();
390+ if (inputShapesML[iCharmPart][0 ][0 ] < 0 ) {
391+ LOGF (warning, Form (" Model for %s with negative input shape likely because converted with ummingbird, setting it to 1." , charmParticleNames[iCharmPart].data ()));
392+ inputShapesML[iCharmPart][0 ][0 ] = 1 ;
393+ }
394+ outputNamesML[iCharmPart] = sessionML[iCharmPart]->GetOutputNames ();
395+ outputShapesML[iCharmPart] = sessionML[iCharmPart]->GetOutputShapes ();
392396 }
393- outputNamesML[iCharmPart] = sessionML[iCharmPart]->GetOutputNames ();
394- outputShapesML[iCharmPart] = sessionML[iCharmPart]->GetOutputShapes ();
395397 }
396398 }
397399 }
@@ -708,7 +710,7 @@ struct HfFilter { // Main struct for HF triggers
708710 assert (typeInfo.GetElementCount () == 3 ); // we need multiclass
709711 auto scores = outputTensorD0[1 ].GetTensorMutableData <float >();
710712
711- if (applyML) {
713+ if (applyML && activateQA ) {
712714 hBDTScoreBkg[kD0 ]->Fill (scores[0 ]);
713715 hBDTScorePrompt[kD0 ]->Fill (scores[1 ]);
714716 hBDTScoreNonPrompt[kD0 ]->Fill (scores[2 ]);
@@ -836,7 +838,7 @@ struct HfFilter { // Main struct for HF triggers
836838 assert (typeInfo.GetElementCount () == 3 ); // we need multiclass
837839 auto scores = outputTensor[1 ].GetTensorMutableData <float >();
838840
839- if (applyML) {
841+ if (applyML && activateQA ) {
840842 hBDTScoreBkg[iCharmPart]->Fill (scores[0 ]);
841843 hBDTScorePrompt[iCharmPart]->Fill (scores[1 ]);
842844 hBDTScoreNonPrompt[iCharmPart]->Fill (scores[2 ]);
0 commit comments