37 return StatusCode::SUCCESS;
42 if (fullPathToFile.empty()) {
44 <<
"'. Please check if the "
46 return StatusCode::FAILURE;
49 std::unique_ptr<TFile>
rootFile(TFile::Open(fullPathToFile.c_str(),
"READ"));
53 <<
"'. Please check if the file "
54 "exists and is not corrupted.");
56 return StatusCode::FAILURE;
61 << fullPathToFile <<
"'.");
65 << fullPathToFile <<
"'.");
66 m_bdt = std::make_unique<MVAUtils::BDT>(
tree.get());
68 return StatusCode::SUCCESS;
75 if (pointingVertexContainer->size() != 1) {
77 << pointingVertexContainer->size()
81 const xAOD::Vertex* pointingVertex = pointingVertexContainer->front();
83 const float zcommon = pointingVertex->
z();
84 const float zcommon_error =
85 std::sqrt(pointingVertex->covariancePosition()(2, 2));
88 const float nph_good = acc_nph_good(*pointingVertex);
91 const float vtx_z =
vertex.z();
93 const float deltaz_sig_photons = std::abs(vtx_z - zcommon) / zcommon_error;
98 TVector3 photon_sump(acc_photons_px(*pointingVertex),
99 acc_photons_py(*pointingVertex),
100 acc_photons_pz(*pointingVertex));
102 const float deltaphi_sig_photons = vertex_p4.Vect().DeltaPhi(photon_sump);
105 << nph_good <<
", vtx_sumpt: " << vtx_sumpt
106 <<
", vtx_sumpt2: " << vtx_sumpt2
107 <<
", deltaz_sig_photons: " << deltaz_sig_photons
108 <<
", deltaphi_sig_photons: " << deltaphi_sig_photons);
110 return {nph_good, vtx_sumpt, vtx_sumpt2, deltaz_sig_photons,
111 deltaphi_sig_photons};
121 if (input_values.empty()) {
return 0.; }
122 return m_bdt->GetClassification(input_values);
127 float best_score = std::numeric_limits<float>::lowest();
138 if (
score > best_score) {