ATLAS Offline Software
Loading...
Searching...
No Matches
KtDeltaR.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"
9#include <math.h>
10#include <cmath>
11using namespace std;
12using namespace JetSubStructureUtils;
13
14double KtDeltaR::result(const fastjet::PseudoJet &jet) const
15{
16 vector<fastjet::PseudoJet> constit_pseudojets = jet.constituents();
17 if ( constit_pseudojets.size() < 2 ) {
18 //Jet has fewer than 2 constituents.
19 return 0.0;
20 }
21
22 fastjet::JetDefinition jetdef = fastjet::JetDefinition(fastjet::kt_algorithm, m_jetrad);
23 fastjet::ClusterSequence cs(constit_pseudojets, jetdef);
24 std::vector<fastjet::PseudoJet> outjets = cs.exclusive_jets(2);
25 if ( outjets.size() < 2 ) {
26 //"Fewer than two subjets found.
27 return 0.0;
28 }
29
30 return xAOD::P4Helpers::deltaR(outjets[0].eta(), outjets[0].phi(),
31 outjets[1].eta(), outjets[1].phi());
32}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
virtual double result(const fastjet::PseudoJet &jet) const
Definition KtDeltaR.cxx:14
STL namespace.
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi