Fork me on GitHub

source: git/external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.hh@ 36fb740

ImprovedOutputFile
Last change on this file since 36fb740 was 973b92a, checked in by Pavel Demin <pavel.demin@…>, 9 years ago

update FastJet library to 3.1.3 and Nsubjettiness library to 2.2.1

  • Property mode set to 100644
File size: 4.1 KB
RevLine 
[973b92a]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: ExtraRecombiners.hh 828 2015-07-20 14:52:06Z 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#ifndef __FASTJET_CONTRIB_WINNERTAKEALLRECOMBINER_HH__
26#define __FASTJET_CONTRIB_WINNERTAKEALLRECOMBINER_HH__
27
28#include "fastjet/PseudoJet.hh"
29#include "fastjet/JetDefinition.hh"
30
31#include <cmath>
32#include <vector>
33#include <list>
34#include <limits>
35#include <stdio.h>
36#include <string.h>
37#include <errno.h>
38
39FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
40
41namespace contrib {
42
43///------------------------------------------------------------------------
44/// \class GeneralEtSchemeRecombiner
45/// \brief Recombination scheme with generalized Et weighting
46///
47/// GeneralEtSchemeRecombiner defines a new recombination scheme by inheriting from JetDefinition::Recombiner.
48/// This scheme compares the pT of two input particles, and then combines them into a particle with
49/// a pT equal to the sum of the two particle pTs and a direction (in rapidity/phi) weighted by the respective momenta of the
50/// particle. The weighting is dependent on the power delta. For delta = infinity, this should return the same result as the
51/// WinnerTakeAllRecombiner.
52///------------------------------------------------------------------------
53class GeneralEtSchemeRecombiner : public fastjet::JetDefinition::Recombiner {
54public:
55
56 /// Constructor takes delta weighting
57 /// (delta = 1.0 for Et-scheme, delta = infinity for winner-take-all scheme)
58 GeneralEtSchemeRecombiner(double delta) : _delta(delta) {}
59
60 /// Description
61 virtual std::string description() const;
62
63 /// Recombine pa and pb and put result into pab
64 virtual void recombine(const fastjet::PseudoJet & pa,
65 const fastjet::PseudoJet & pb,
66 fastjet::PseudoJet & pab) const;
67
68private:
69 double _delta; ///< Weighting exponent
70};
71
72///------------------------------------------------------------------------
73/// \class WinnerTakeAllRecombiner
74/// \brief Recombination scheme with winner-take-all weighting
75///
76/// WinnerTakeAllRecombiner defines a new recombination scheme by inheriting from JetDefinition::Recombiner.
77/// This scheme compares the pT of two input particles, and then combines them into a particle with
78/// a pT equal to the sum of the two particle pTs and a direction (in rapidity/phi) identical to that of the harder
79/// particle. This creates a jet with an axis guaranteed to align with a particle in the event.
80///------------------------------------------------------------------------
81class WinnerTakeAllRecombiner : public fastjet::JetDefinition::Recombiner {
82public:
83
84 /// Constructor to choose value of alpha (defaulted to 1 for normal pT sum)
85 WinnerTakeAllRecombiner(double alpha = 1.0) : _alpha(alpha) {}
86
87 /// Description
88 virtual std::string description() const;
89
90 /// recombine pa and pb and put result into pab
91 virtual void recombine(const fastjet::PseudoJet & pa,
92 const fastjet::PseudoJet & pb,
93 fastjet::PseudoJet & pab) const;
94
95private:
96 double _alpha; //power of (pt/E) term when recombining particles
97};
98
99} //namespace contrib
100
101FASTJET_END_NAMESPACE
102
103#endif // __FASTJET_CONTRIB_WINNERTAKEALLRECOMBINER_HH__
Note: See TracBrowser for help on using the repository browser.