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