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 | // $Id: Nsubjettiness.cc 597 2014-04-16 23:07:55Z jthaler $
|
---|
8 | //----------------------------------------------------------------------
|
---|
9 | // This file is part of FastJet contrib.
|
---|
10 | //
|
---|
11 | // It is free software; you can redistribute it and/or modify it under
|
---|
12 | // the terms of the GNU General Public License as published by the
|
---|
13 | // Free Software Foundation; either version 2 of the License, or (at
|
---|
14 | // your option) any later version.
|
---|
15 | //
|
---|
16 | // It is distributed in the hope that it will be useful, but WITHOUT
|
---|
17 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
---|
18 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
---|
19 | // License for more details.
|
---|
20 | //
|
---|
21 | // You should have received a copy of the GNU General Public License
|
---|
22 | // along with this code. If not, see <http://www.gnu.org/licenses/>.
|
---|
23 | //----------------------------------------------------------------------
|
---|
24 |
|
---|
25 | #include "Nsubjettiness.hh"
|
---|
26 |
|
---|
27 | FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
|
---|
28 |
|
---|
29 | namespace contrib {
|
---|
30 |
|
---|
31 | //result returns tau_N with normalization dependent on what is specified in constructor
|
---|
32 | double Nsubjettiness::result(const PseudoJet& jet) const {
|
---|
33 | std::vector<fastjet::PseudoJet> particles = jet.constituents();
|
---|
34 | return _njettinessFinder.getTau(_N, particles);
|
---|
35 | }
|
---|
36 |
|
---|
37 | TauComponents Nsubjettiness::component_result(const PseudoJet& jet) const {
|
---|
38 | std::vector<fastjet::PseudoJet> particles = jet.constituents();
|
---|
39 | return _njettinessFinder.getTauComponents(_N, particles);
|
---|
40 | }
|
---|
41 |
|
---|
42 | //ratio result uses Nsubjettiness result to find the ratio tau_N/tau_M, where N and M are specified by user
|
---|
43 | double NsubjettinessRatio::result(const PseudoJet& jet) const {
|
---|
44 | double numerator = _nsub_numerator.result(jet);
|
---|
45 | double denominator = _nsub_denominator.result(jet);
|
---|
46 | return numerator/denominator;
|
---|
47 | }
|
---|
48 |
|
---|
49 | } // namespace contrib
|
---|
50 |
|
---|
51 | FASTJET_END_NAMESPACE
|
---|