1 |
ntran |
1.1.2.1 |
// Njettiness Package
|
2 |
|
|
// Version 0.4.1 (January 22, 2012)
|
3 |
|
|
// Questions/Comments? jthaler@jthaler.net
|
4 |
|
|
|
5 |
|
|
// Copyright (c) 2011-12, Jesse Thaler, Ken Van Tilburg, and Christopher K.
|
6 |
|
|
// Vermilion
|
7 |
|
|
//
|
8 |
|
|
//----------------------------------------------------------------------
|
9 |
|
|
// This file is part of the N-jettiness package ("N-jettiness").
|
10 |
|
|
//
|
11 |
|
|
// N-jettiness is free software; you can redistribute it and/or modify
|
12 |
|
|
// it under the terms of the GNU General Public License as published by
|
13 |
|
|
// the Free Software Foundation; either version 3 of the License, or
|
14 |
|
|
// (at your option) any later version.
|
15 |
|
|
//
|
16 |
|
|
// SpartyJet is distributed in the hope that it will be useful,
|
17 |
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
|
|
// GNU General Public License for more details.
|
20 |
|
|
//
|
21 |
|
|
// You should have received a copy of the GNU General Public License
|
22 |
|
|
// along with SpartyJet; if not, write to the Free Software
|
23 |
|
|
// Foundation, Inc.:
|
24 |
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
25 |
|
|
//----------------------------------------------------------------------
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
#ifndef __NSUBJETTINESS_HH__
|
29 |
|
|
#define __NSUBJETTINESS_HH__
|
30 |
|
|
|
31 |
|
|
#include "Njettiness.hh"
|
32 |
|
|
|
33 |
|
|
#include "fastjet/FunctionOfPseudoJet.hh"
|
34 |
|
|
|
35 |
|
|
#include <string>
|
36 |
|
|
#include <climits>
|
37 |
|
|
|
38 |
|
|
#ifndef G__DICTIONARY
|
39 |
|
|
typedef double Double32_t; // ROOT will store as 32-bit, but in code is double
|
40 |
|
|
#endif
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
|
44 |
|
|
|
45 |
|
|
/// Nsubjettiness extends the concept of Njettiness to a jet shape, but other
|
46 |
|
|
/// than the set of particles considered, they are identical. This class
|
47 |
|
|
/// wraps the core Njettiness code to provide the fastjet::FunctionOfPseudoJet
|
48 |
|
|
/// interface for convenience in larger analyses. See NjettinessPlugin.hh for
|
49 |
|
|
/// definitions of tau_N and the constructor options.
|
50 |
|
|
|
51 |
|
|
class Nsubjettiness : public FunctionOfPseudoJet<Double32_t> {
|
52 |
|
|
public:
|
53 |
|
|
|
54 |
|
|
Nsubjettiness(int N, Njettiness::AxesMode mode, double beta, double R0, double Rcutoff=std::numeric_limits<double>::max());
|
55 |
|
|
|
56 |
|
|
/// returns tau_N, measured on the constituents of this jet
|
57 |
|
|
Double32_t result(const PseudoJet& jet) const;
|
58 |
|
|
|
59 |
|
|
private:
|
60 |
|
|
|
61 |
|
|
int _N;
|
62 |
|
|
mutable Njettiness _njettinessFinder; // should muck with this so result can be const without this mutable
|
63 |
|
|
|
64 |
|
|
};
|
65 |
|
|
|
66 |
|
|
inline Nsubjettiness::Nsubjettiness(int N, Njettiness::AxesMode mode, double beta, double R0, double Rcutoff)
|
67 |
|
|
: _N(N), _njettinessFinder(mode, NsubParameters(beta, R0, Rcutoff))
|
68 |
|
|
{}
|
69 |
|
|
|
70 |
|
|
inline Double32_t Nsubjettiness::result(const PseudoJet& jet) const
|
71 |
|
|
{
|
72 |
|
|
std::vector<fastjet::PseudoJet> particles = jet.constituents();
|
73 |
|
|
return _njettinessFinder.getTau(_N, particles);
|
74 |
|
|
}
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
|
78 |
|
|
|
79 |
|
|
#endif // __NSUBJETTINESS_HH__
|