ATLAS Offline Software
KtMassDrop.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "fastjet/ClusterSequence.hh"
7 #include "fastjet/JetDefinition.hh"
8 #include <math.h>
9 #include <float.h>
10 
11 using namespace std;
12 using namespace JetSubStructureUtils;
13 
14 double KtMassDrop::result(const fastjet::PseudoJet &jet) const
15 {
16  if(jet.m() == 0 ) return -1;
17  if(jet.constituents().empty()) return -1;
18 
19  fastjet::JetDefinition jet_def = fastjet::JetDefinition(fastjet::kt_algorithm, 1.5,
20  fastjet::E_scheme, fastjet::Best);
21  fastjet::ClusterSequence kt_clust_seq(jet.constituents(), jet_def);
22  fastjet::PseudoJet kt_jet = fastjet::sorted_by_pt(kt_clust_seq.inclusive_jets()).front();
23 
24  fastjet::PseudoJet p1, p2;
25  if(kt_jet.has_parents(p1, p2)) {
26  return fmax(p1.m(), p2.m()) / jet.m();
27  }
28 
29  // No parents
30  return -1;
31 }
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::JetAlgorithmType::kt_algorithm
@ kt_algorithm
Definition: JetContainerInfo.h:31
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
KtMassDrop.h
JetSubStructureUtils
Definition: Angularity.h:10
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::ClusterSequence
fastjet::ClusterSequence ClusterSequence
Definition: ClusterSequence.h:21