Fork me on GitHub

source: git/external/fastjet/contribs/RecursiveTools/SoftDrop.cc@ 5862d1f

Last change on this file since 5862d1f was b7b836a, checked in by Pavel Demin <pavel-demin@…>, 6 years ago

update FastJet library to 3.3.1 and FastJet Contrib library to 1.036

  • Property mode set to 100644
File size: 2.9 KB
RevLine 
[b7b836a]1// $Id: SoftDrop.cc 1059 2017-09-07 20:48:00Z gsoyez $
[1f1f858]2//
3// Copyright (c) 2014-, Gregory Soyez, Jesse. Thaler
4// based on arXiv:1402.2657 by Andrew J. Larkoski, Simone Marzani,
5// Gregory Soyez, Jesse Thaler
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 "SoftDrop.hh"
25#include <cmath>
26#include <sstream>
27
28using namespace std;
29
30FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
31
32namespace contrib{
33
34//----------------------------------------------------------------------
35// TODO:
36//
37// - implement reclustering (at the moment we assume it's C/A as for mMDT
38//
39// - what is returned if no substructure is found? [and for negativeve
40// pt, m2 or other situations where mMDT currentlty returns an empty
41// PseudoJet]
42//
43// GS.: mMDT seeks substructure so it makes sense for it to return
44// an empry PseudoJet when no substructure is found (+ it is the
45// original behaviour). For SoftDrop, in grooming mode (beta>0), if
46// would make sense to return a jet with a single particle. In
47// tagging mode (beta<0), the situation is less clear. At the level
48// of the implementation, having a virtual function could work
49// (with a bit of care to cover the -ve pt or m2 cases)
50//
51// - Do we include Andrew and Simone in the "contrib-author" list
52// since they are on the paper? Do we include Gavin in the author's
53// list since he started this contrib?
54//
55//----------------------------------------------------------------------
56
57//----------------------------------------------------------------------
58double SoftDrop::symmetry_cut_fn(const PseudoJet & p1,
[b7b836a]59 const PseudoJet & p2,
60 void *optional_R0sqr_ptr) const{
61 double R0sqr = (optional_R0sqr_ptr == 0) ? _R0sqr : *((double*) optional_R0sqr_ptr);
62 return _symmetry_cut * pow(squared_geometric_distance(p1,p2)/R0sqr, 0.5*_beta);
[1f1f858]63}
64
65//----------------------------------------------------------------------
66string SoftDrop::symmetry_cut_description() const {
67 ostringstream ostr;
68 ostr << _symmetry_cut << " (theta/" << sqrt(_R0sqr) << ")^" << _beta << " [SoftDrop]";
69 return ostr.str();
70}
71
72} // namespace contrib
73
74FASTJET_END_NAMESPACE
Note: See TracBrowser for help on using the repository browser.