8 #include "AthLinks/ElementLink.h"
23 DiTauDiscriminantTool::DiTauDiscriminantTool(
const std::string&
name )
27 declareProperty(
"WeightsFile", m_sWeightsFile =
"tauRecTools/R22_preprod/DiTau_JetBDT_winter2024.weights.root");
28 declareProperty(
"BDTScoreName", m_sBDTScoreName =
"JetBDT");
32 DiTauDiscriminantTool::~DiTauDiscriminantTool( )
42 {
"ditau_pt",
new float(0)},
44 {
"pt_weight",
new float(0)},
45 {
"isSignal",
new float(0)}
49 {
"f_core_lead",
new float(0)},
50 {
"f_core_subl",
new float(0)},
51 {
"f_subjet_lead",
new float(0)},
52 {
"f_subjet_subl",
new float(0)},
53 {
"f_subjets",
new float(0)},
54 {
"f_track_lead",
new float(0)},
55 {
"f_track_subl",
new float(0)},
56 {
"R_max_lead",
new float(0)},
57 {
"R_max_subl",
new float(0)},
58 {
"n_Subjets",
new float(0)},
59 {
"n_track",
new float(0)},
60 {
"n_tracks_lead",
new float(0)},
61 {
"n_tracks_subl",
new float(0)},
62 {
"n_isotrack",
new float(0)},
63 {
"R_track",
new float(0)},
64 {
"R_track_core",
new float(0)},
65 {
"R_track_all",
new float(0)},
66 {
"R_isotrack",
new float(0)},
67 {
"R_core_lead",
new float(0)},
68 {
"R_core_subl",
new float(0)},
69 {
"R_tracks_lead",
new float(0)},
70 {
"R_tracks_subl",
new float(0)},
71 {
"m_track",
new float(0)},
72 {
"m_track_core",
new float(0)},
73 {
"m_core_lead",
new float(0)},
74 {
"log(m_core_lead)",
new float(0)},
75 {
"m_core_subl",
new float(0)},
76 {
"log(m_core_subl)",
new float(0)},
77 {
"m_track_all",
new float(0)},
78 {
"m_tracks_lead",
new float(0)},
79 {
"log(m_tracks_lead)",
new float(0)},
80 {
"m_tracks_subl",
new float(0)},
81 {
"log(m_tracks_subl)",
new float(0)},
82 {
"E_frac_subl",
new float(0)},
83 {
"E_frac_subsubl",
new float(0)},
84 {
"R_subjets_subl",
new float(0)},
85 {
"R_subjets_subsubl",
new float(0)},
86 {
"d0_leadtrack_lead",
new float(0)},
87 {
"log(abs(d0_leadtrack_lead))",
new float(0)},
88 {
"d0_leadtrack_subl",
new float(0)},
89 {
"log(abs(d0_leadtrack_subl))",
new float(0)},
90 {
"f_isotracks",
new float(0)},
91 {
"log(f_isotracks)",
new float(0)},
97 return StatusCode::SUCCESS;
105 setIDVariables(xDiTau);
107 double bdtScore = m_bdt->GetClassification();
110 decBDTScore(xDiTau) = bdtScore;
113 return StatusCode::SUCCESS;
128 return StatusCode::FAILURE;
130 return StatusCode::SUCCESS;
173 setVar(
"f_core_lead") = f_core_leadAcc(xDiTau);
174 setVar(
"f_core_subl") = f_core_sublAcc(xDiTau);
175 setVar(
"f_subjet_lead") = f_subjet_leadAcc(xDiTau);
176 setVar(
"f_subjet_subl") = f_subjet_sublAcc(xDiTau);
177 setVar(
"f_subjets") = f_subjetsAcc(xDiTau);
178 setVar(
"f_track_lead") = f_track_leadAcc(xDiTau);
179 setVar(
"f_track_subl") = f_track_sublAcc(xDiTau);
180 setVar(
"R_max_lead") = R_max_leadAcc(xDiTau);
181 setVar(
"R_max_subl") = R_max_sublAcc(xDiTau);
182 setVar(
"n_Subjets") = (
float) n_subjetsAcc(xDiTau);
183 setVar(
"n_track") = (
float) n_trackAcc(xDiTau);
184 setVar(
"n_tracks_lead") = (
float) n_tracks_leadAcc(xDiTau);
185 setVar(
"n_tracks_subl") = (
float) n_tracks_sublAcc(xDiTau);
186 setVar(
"n_isotrack") = (
float) n_isotrackAcc(xDiTau);
187 setVar(
"R_track") = R_trackAcc(xDiTau);
188 setVar(
"R_track_core") = R_track_coreAcc(xDiTau);
189 setVar(
"R_track_all") = R_track_allAcc(xDiTau);
190 setVar(
"R_isotrack") = R_isotrackAcc(xDiTau);
191 setVar(
"R_core_lead") = R_core_leadAcc(xDiTau);
192 setVar(
"R_core_subl") = R_core_sublAcc(xDiTau);
193 setVar(
"R_tracks_lead") = R_tracks_leadAcc(xDiTau);
194 setVar(
"R_tracks_subl") = R_tracks_sublAcc(xDiTau);
195 setVar(
"m_track") = M_trackAcc(xDiTau);
196 setVar(
"m_track_core") = M_track_coreAcc(xDiTau);
197 setVar(
"m_core_lead") = M_core_leadAcc(xDiTau);
198 setVar(
"log(m_core_lead)") =
log(*m_mIDVariables[
"m_core_lead"]);
199 setVar(
"m_core_subl") = M_core_sublAcc(xDiTau);
200 setVar(
"log(m_core_subl)") =
log(*m_mIDVariables[
"m_core_subl"]);
201 setVar(
"m_track_all") = M_track_allAcc(xDiTau);
202 setVar(
"m_tracks_lead") = M_tracks_leadAcc(xDiTau);
203 setVar(
"log(m_tracks_lead)") =
log(*m_mIDVariables[
"m_tracks_lead"]);
204 setVar(
"m_tracks_subl") = M_tracks_sublAcc(xDiTau);
205 setVar(
"log(m_tracks_subl)") =
log(*m_mIDVariables[
"m_tracks_subl"]);
206 setVar(
"E_frac_subl") = E_frac_sublAcc(xDiTau);
207 setVar(
"E_frac_subsubl") = E_frac_subsublAcc(xDiTau);
208 setVar(
"R_subjets_subl") = R_subjets_sublAcc(xDiTau);
209 setVar(
"R_subjets_subsubl") = R_subjets_subsublAcc(xDiTau);
210 setVar(
"d0_leadtrack_lead") = d0_leadtrack_leadAcc(xDiTau);
211 setVar(
"log(abs(d0_leadtrack_lead))") =
log(fabs(*m_mIDVariables[
"d0_leadtrack_lead"]));
212 setVar(
"d0_leadtrack_subl") = d0_leadtrack_sublAcc(xDiTau);
213 setVar(
"log(abs(d0_leadtrack_subl))") =
log(fabs(*m_mIDVariables[
"d0_leadtrack_subl"]));
214 setVar(
"f_isotracks") = f_isotracksAcc(xDiTau);
215 setVar(
"log(f_isotracks)") =
log(*m_mIDVariables[
"f_isotracks"]);
217 for (
const auto &
var: m_vVarNames)