Fork me on GitHub

source: git/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh@ 49234af

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 49234af was 35cdc46, checked in by Pavel Demin <demin@…>, 10 years ago

upgrade FastJet to version 3.1.0-beta.1, upgrade Nsubjettiness to version 2.1.0, add SoftKiller version 1.0.0

  • Property mode set to 100644
File size: 2.5 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// $Id: WinnerTakeAllRecombiner.hh 670 2014-06-06 01:24:42Z 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
35FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
36
37namespace contrib {
38
39//------------------------------------------------------------------------
40/// \class WinnerTakeAllRecombiner
41// WinnerTakeAllRecombiner defines a new recombination scheme by inheriting from JetDefinition::Recombiner.
42// This scheme compares the energy of two input particles, and then combines them into a particle with
43// an energy equal to the sum of the two particle energies and a direction identical to that of the harder
44// particle. This creates a jet with an axis guaranteed to align with a particle in the event.
45class WinnerTakeAllRecombiner : public fastjet::JetDefinition::Recombiner {
46public:
47 // Constructor to choose value of alpha (defaulted to 1 for normal pT sum)
48 WinnerTakeAllRecombiner(double alpha = 1.0) : _alpha(alpha) {}
49
50 virtual std::string description() const;
51
52 /// recombine pa and pb and put result into pab
53 virtual void recombine(const fastjet::PseudoJet & pa,
54 const fastjet::PseudoJet & pb,
55 fastjet::PseudoJet & pab) const;
56
57private:
58 double _alpha; //power of (pt/E) term when recombining particles
59};
60
61} //namespace contrib
62
63FASTJET_END_NAMESPACE
64
65#endif // __FASTJET_CONTRIB_WINNERTAKEALLRECOMBINER_HH__
Note: See TracBrowser for help on using the repository browser.