Fork me on GitHub

source: git/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.cc@ 6519cfb

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 6519cfb was 9687203, checked in by mselvaggi <mselvaggi@…>, 11 years ago

added nsubjettiness

  • Property mode set to 100644
File size: 1.9 KB
Line 
1// Nsubjettiness Package
2// Questions/Comments? jthaler@jthaler.net
3//
4// Copyright (c) 2011-14
5// Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
6//
7//----------------------------------------------------------------------
8// This file is part of FastJet contrib.
9//
10// It is free software; you can redistribute it and/or modify it under
11// the terms of the GNU General Public License as published by the
12// Free Software Foundation; either version 2 of the License, or (at
13// your option) any later version.
14//
15// It is distributed in the hope that it will be useful, but WITHOUT
16// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18// License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with this code. If not, see <http://www.gnu.org/licenses/>.
22//----------------------------------------------------------------------
23
24#include "Nsubjettiness.hh"
25
26FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
27
28namespace contrib {
29
30//result returns tau_N with normalization dependent on what is specified in constructor
31double Nsubjettiness::result(const PseudoJet& jet) const {
32 std::vector<fastjet::PseudoJet> particles = jet.constituents();
33 return _njettinessFinder.getTau(_N, particles);
34}
35
36TauComponents Nsubjettiness::component_result(const PseudoJet& jet) const {
37 std::vector<fastjet::PseudoJet> particles = jet.constituents();
38 return _njettinessFinder.getTauComponents(_N, particles);
39}
40
41//ratio result uses Nsubjettiness result to find the ratio tau_N/tau_M, where N and M are specified by user
42double NsubjettinessRatio::result(const PseudoJet& jet) const {
43 double numerator = _nsub_numerator.result(jet);
44 double denominator = _nsub_denominator.result(jet);
45 return numerator/denominator;
46}
47
48} // namespace contrib
49
50FASTJET_END_NAMESPACE
Note: See TracBrowser for help on using the repository browser.