73 if (!jets.isValid()) {
75 return StatusCode::FAILURE;
77 unsigned int nJets(jets->size());
78 std::vector<const xAOD::Jet*> jetToCheck; jetToCheck.clear();
82 std::vector<int>
entries = m_parser->evaluateAsVector();
83 unsigned int nEntries =
entries.size();
85 if (nJets != nEntries ) {
86 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used jets??");
87 return StatusCode::FAILURE;
90 for (
unsigned int i=0; i<nJets; ++i)
if (
entries[i]==1) jetToCheck.push_back((*jets)[i]);
93 for (
unsigned int i=0; i<nJets; ++i) jetToCheck.push_back((*jets)[i]);
120 std::vector<const xAOD::IParticle*> mergedGhostConstits;
121 std::vector<const xAOD::IParticle*> ghosts;
122 std::vector<fastjet::PseudoJet> constituents;
127 mergedGhostConstits.clear();
130 ATH_CHECK(
jet->getAssociatedObjects(ghostName, ghosts));
131 mergedGhostConstits.insert(mergedGhostConstits.end(), ghosts.begin(), ghosts.end());
135 constituents.clear();
138 for (
auto constit : mergedGhostConstits){
139 if (constit==
nullptr) {
144 if (constit->e()<0) {
ATH_MSG_INFO(
"################## Negative energy cluster");
continue;}
145 constituents.push_back( fastjet::PseudoJet(constit->p4()) );
150 double eConstit = caloConstit->e()* caloConstit->e();
151 time += caloConstit->time()* eConstit;
158 dec_timing(*
jet) = 0;
160 dec_timing(*
jet) = time/eTot;
164 int nConstits = constituents.size();
167 fastjet::PseudoJet groomed_jet;
169 auto jet_def = fastjet::JetDefinition(fastjet::antikt_algorithm, 1.5);
170 fastjet::ClusterSequence cs(constituents, jet_def);
171 fastjet::PseudoJet recluster_jet = cs.inclusive_jets(0.0).front();
175 groomed_jet =
m_trimmer->result(recluster_jet);
179 ATH_MSG_DEBUG(
" No grooming requested or wrong one, will not apply grooming");
180 groomed_jet = recluster_jet;
184 nConstits = groomed_jet.constituents().size();
191 dec_Tau1(*
jet) = -999;
192 dec_Tau2(*
jet) = -999;
193 dec_Tau3(*
jet) = -999;
194 dec_Tau4(*
jet) = -999;
196 dec_Tau21(*
jet) = -999;
197 dec_Tau32(*
jet) = -999;
199 dec_Split12(*
jet) = -999;
200 dec_Split23(*
jet) = -999;
201 dec_Split34(*
jet) = -999;
203 dec_ECF1(*
jet) = -999;
204 dec_ECF2(*
jet) = -999;
205 dec_ECF3(*
jet) = -999;
206 dec_ECF4(*
jet) = -999;
213 dec_NConstits(*
jet) = 0;
214 dec_eta(*
jet) = -999;
215 dec_phi(*
jet) = -999;
217 return StatusCode::SUCCESS;
221 dec_pT(*
jet) = groomed_jet.pt();
222 dec_m(*
jet) = groomed_jet.m();
223 dec_NConstits(*
jet) = nConstits;
224 dec_eta(*
jet) = groomed_jet.eta();
225 dec_phi(*
jet) = groomed_jet.phi() -
M_PI;
229 dec_Qw(*
jet) = qw.result(groomed_jet);
232 fastjet::contrib::WTA_KT_Axes wta_kt_axes;
233 fastjet::contrib::NormalizedCutoffMeasure normalized_measure(1.0, 1.0, 1000000);
238 float tau1_wta = Tau1_wta.
result(groomed_jet);
239 float tau2_wta = Tau2_wta.
result(groomed_jet);
240 float tau3_wta = Tau3_wta.
result(groomed_jet);
241 float tau4_wta = Tau4_wta.
result(groomed_jet);
242 float tau21_wta = -999;
243 float tau32_wta = -999;
245 if( tau1_wta > 1e-8 ) {
246 tau21_wta = tau2_wta / tau1_wta;
248 if( tau2_wta > 1e-8 ) {
249 tau32_wta = tau3_wta / tau2_wta;
252 dec_Tau1(*
jet) = tau1_wta;
253 dec_Tau2(*
jet) = tau2_wta;
254 dec_Tau3(*
jet) = tau3_wta;
255 dec_Tau4(*
jet) = tau4_wta;
256 dec_Tau21(*
jet) = tau21_wta;
257 dec_Tau32(*
jet) = tau32_wta;
263 float split12 = Split12.
result(groomed_jet);
264 float split23 = Split23.
result(groomed_jet);
265 float split34 = Split34.
result(groomed_jet);
267 dec_Split12(*
jet) = split12;
268 dec_Split23(*
jet) = split23;
269 dec_Split34(*
jet) = split34;
276 float ecf1 = ECF1.
result(groomed_jet);
277 float ecf2 = ECF2.
result(groomed_jet);
278 float ecf3 = ECF3.
result(groomed_jet);
279 float ecf4 = ECF4.
result(groomed_jet);
284 c2 = ecf3 * ecf1 /
pow( ecf2, 2.0 );
285 d2 = ecf3 *
pow( ecf1, 3.0 ) /
pow( ecf2, 3.0 );
288 dec_ECF1(*
jet) = ecf1;
289 dec_ECF2(*
jet) = ecf2;
290 dec_ECF3(*
jet) = ecf3;
291 dec_ECF4(*
jet) = ecf4;
297 return StatusCode::SUCCESS;