ATLAS Offline Software
Loading...
Searching...
No Matches
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
11using namespace std;
12using namespace JetSubStructureUtils;
13
14double 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}
virtual double result(const fastjet::PseudoJet &jet) const
STL namespace.