10 #include "fastjet/contrib/Nsubjettiness.hh"
11 #include "fastjet/contrib/AxesDefinition.hh"
30 if( std::abs(
m_Alpha-1.0) > 1.0
e-5 ) {
33 ATH_MSG_WARNING(
"The Alpha property is deprecated, please use the AlphaList property to provide a list of values" );
44 float alphaFix =
round( alpha * 10.0 ) / 10.0;
45 if( std::abs(alpha-alphaFix) > 1.0
e-5 )
ATH_MSG_DEBUG(
"alpha = " << alpha <<
" has been rounded to " << alphaFix );
48 if( alphaFix < 0.0 ) {
49 ATH_MSG_WARNING(
"alpha must be positive. Skipping alpha = " << alpha );
62 return StatusCode::SUCCESS;
68 fastjet::PseudoJet
jet;
69 fastjet::PseudoJet jet_ungroomed;
75 bool calculate_ungroomed =
false;
85 ATH_MSG_ERROR(
"Parent element link is not valid. Aborting" );
89 const xAOD::Jet* parentJet = *(parentLink);
99 []() { fastjet::contrib::WTA_KT_Axes
x; });
103 float alpha = moment.first;
106 fastjet::contrib::NormalizedCutoffMeasure normalized_measure(alpha, injet.
getSizeParameter(), 1000000);
108 float Tau1_value = -999;
109 float Tau2_value = -999;
110 float Tau3_value = -999;
111 float Tau4_value = -999;
113 float Tau2_ungroomed_value = -999;
114 float Tau3_ungroomed_value = -999;
115 float Tau4_ungroomed_value = -999;
117 float Tau1_wta_value = -999;
118 float Tau2_wta_value = -999;
119 float Tau3_wta_value = -999;
120 float Tau4_wta_value = -999;
122 float Tau2_wta_ungroomed_value = -999;
123 float Tau3_wta_ungroomed_value = -999;
124 float Tau4_wta_ungroomed_value = -999;
130 fastjet::contrib::KT_Axes kt_axes;
141 if( calculate_ungroomed ) {
142 Tau2_ungroomed_value = tau2.
result(jet_ungroomed);
143 Tau3_ungroomed_value = tau3.
result(jet_ungroomed);
144 Tau4_ungroomed_value = tau4.
result(jet_ungroomed);
149 fastjet::contrib::WTA_KT_Axes wta_kt_axes;
160 if( calculate_ungroomed ) {
161 Tau2_wta_ungroomed_value = tau2_wta.
result(jet_ungroomed);
162 Tau3_wta_ungroomed_value = tau3_wta.
result(jet_ungroomed);
163 Tau4_wta_ungroomed_value = tau4_wta.
result(jet_ungroomed);
168 (*moment.second.dec_Tau1)(injet) = Tau1_value;
169 (*moment.second.dec_Tau2)(injet) = Tau2_value;
170 (*moment.second.dec_Tau3)(injet) = Tau3_value;
171 (*moment.second.dec_Tau4)(injet) = Tau4_value;
173 (*moment.second.dec_Tau2_ungroomed)(injet) = Tau2_ungroomed_value;
174 (*moment.second.dec_Tau3_ungroomed)(injet) = Tau3_ungroomed_value;
175 (*moment.second.dec_Tau4_ungroomed)(injet) = Tau4_ungroomed_value;
177 (*moment.second.dec_Tau1_wta)(injet) = Tau1_wta_value;
178 (*moment.second.dec_Tau2_wta)(injet) = Tau2_wta_value;
179 (*moment.second.dec_Tau3_wta)(injet) = Tau3_wta_value;
180 (*moment.second.dec_Tau4_wta)(injet) = Tau4_wta_value;
182 (*moment.second.dec_Tau2_wta_ungroomed)(injet) = Tau2_wta_ungroomed_value;
183 (*moment.second.dec_Tau3_wta_ungroomed)(injet) = Tau3_wta_ungroomed_value;
184 (*moment.second.dec_Tau4_wta_ungroomed)(injet) = Tau4_wta_ungroomed_value;