[b7b836a] | 1 | // $Id: IteratedSoftDrop.cc 1084 2017-10-10 20:36:50Z gsoyez $
|
---|
| 2 | //
|
---|
| 3 | // Copyright (c) 2017-, Jesse Thaler, Kevin Zhou, Gavin P. Salam
|
---|
| 4 | // andGregory Soyez
|
---|
| 5 | //
|
---|
| 6 | // based on arXiv:1704.06266 by Christopher Frye, Andrew J. Larkoski,
|
---|
| 7 | // Jesse Thaler, Kevin Zhou
|
---|
| 8 | //
|
---|
| 9 | //----------------------------------------------------------------------
|
---|
| 10 | // This file is part of FastJet contrib.
|
---|
| 11 | //
|
---|
| 12 | // It is free software; you can redistribute it and/or modify it under
|
---|
| 13 | // the terms of the GNU General Public License as published by the
|
---|
| 14 | // Free Software Foundation; either version 2 of the License, or (at
|
---|
| 15 | // your option) any later version.
|
---|
| 16 | //
|
---|
| 17 | // It is distributed in the hope that it will be useful, but WITHOUT
|
---|
| 18 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
---|
| 19 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
---|
| 20 | // License for more details.
|
---|
| 21 | //
|
---|
| 22 | // You should have received a copy of the GNU General Public License
|
---|
| 23 | // along with this code. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 24 | //----------------------------------------------------------------------
|
---|
| 25 |
|
---|
| 26 | #include "IteratedSoftDrop.hh"
|
---|
| 27 | #include <sstream>
|
---|
| 28 | #include <cmath>
|
---|
| 29 | #include <fastjet/ClusterSequence.hh>
|
---|
| 30 |
|
---|
| 31 | using namespace std;
|
---|
| 32 |
|
---|
| 33 | FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
|
---|
| 34 |
|
---|
| 35 | namespace contrib{
|
---|
| 36 |
|
---|
| 37 | //========================================================================
|
---|
| 38 | // implementation of IteratedSoftDropInfo
|
---|
| 39 | //========================================================================
|
---|
| 40 |
|
---|
| 41 | // returns the angularity with angular exponent alpha and z
|
---|
| 42 | // exponent kappa calculated on the zg's and thetag's found by
|
---|
| 43 | // iterated SoftDrop
|
---|
| 44 | //
|
---|
| 45 | // returns 0 if no substructure was found
|
---|
| 46 | double IteratedSoftDropInfo::angularity(double alpha, double kappa) const{
|
---|
| 47 | double sum = 0.0;
|
---|
| 48 | for (unsigned int i=0; i< _all_zg_thetag.size(); ++i)
|
---|
| 49 | sum += pow(_all_zg_thetag[i].first, kappa) * pow(_all_zg_thetag[i].second, alpha);
|
---|
| 50 | return sum;
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | //========================================================================
|
---|
| 54 | // implementation of IteratedSoftDrop
|
---|
| 55 | //========================================================================
|
---|
| 56 |
|
---|
| 57 | // Constructor. Takes in the standard Soft Drop parameters, an angular cut \f$\theta_{\rm cut}\f$,
|
---|
| 58 | // and a choice of angular and symmetry measure.
|
---|
| 59 | //
|
---|
| 60 | // - beta the Soft Drop beta parameter
|
---|
| 61 | // - symmetry_cut the Soft Drop symmetry cut
|
---|
| 62 | // - angular_cut the angular cutoff to halt Iterated Soft Drop
|
---|
| 63 | // - R0 the angular distance normalization
|
---|
| 64 | IteratedSoftDrop::IteratedSoftDrop(double beta, double symmetry_cut, double angular_cut, double R0,
|
---|
| 65 | const FunctionOfPseudoJet<PseudoJet> * subtractor) :
|
---|
| 66 | _rsd(beta, symmetry_cut, -1, R0, subtractor){
|
---|
| 67 | _rsd.set_hardest_branch_only(true);
|
---|
| 68 | if (angular_cut>0)
|
---|
| 69 | _rsd.set_min_deltaR_squared(angular_cut*angular_cut);
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 |
|
---|
| 73 | // Full constructor, which takes the following parameters:
|
---|
| 74 | //
|
---|
| 75 | // \param beta the value of the beta parameter
|
---|
| 76 | // \param symmetry_cut the value of the cut on the symmetry measure
|
---|
| 77 | // \param symmetry_measure the choice of measure to use to estimate the symmetry
|
---|
| 78 | // \param angular_cut the angular cutoff to halt Iterated Soft Drop
|
---|
| 79 | // \param R0 the angular distance normalisation [1 by default]
|
---|
| 80 | // \param mu_cut the maximal allowed value of mass drop variable mu = m_heavy/m_parent
|
---|
| 81 | // \param recursion_choice the strategy used to decide which subjet to recurse into
|
---|
| 82 | // \param subtractor an optional pointer to a pileup subtractor (ignored if zero)
|
---|
| 83 | IteratedSoftDrop::IteratedSoftDrop(double beta,
|
---|
| 84 | double symmetry_cut,
|
---|
| 85 | RecursiveSoftDrop::SymmetryMeasure symmetry_measure,
|
---|
| 86 | double angular_cut,
|
---|
| 87 | double R0,
|
---|
| 88 | double mu_cut,
|
---|
| 89 | RecursiveSoftDrop::RecursionChoice recursion_choice,
|
---|
| 90 | const FunctionOfPseudoJet<PseudoJet> * subtractor)
|
---|
| 91 | : _rsd(beta, symmetry_cut, symmetry_measure, -1, R0, mu_cut, recursion_choice, subtractor){
|
---|
| 92 | _rsd.set_hardest_branch_only(true);
|
---|
| 93 | if (angular_cut>0)
|
---|
| 94 | _rsd.set_min_deltaR_squared(angular_cut*angular_cut);
|
---|
| 95 | }
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 | // returns vector of ISD symmetry factors and splitting angles
|
---|
| 99 | IteratedSoftDropInfo IteratedSoftDrop::result(const PseudoJet& jet) const{
|
---|
| 100 | PseudoJet rsd_jet = _rsd(jet);
|
---|
| 101 | if (! rsd_jet.has_structure_of<RecursiveSoftDrop>())
|
---|
| 102 | return IteratedSoftDropInfo();
|
---|
| 103 | return IteratedSoftDropInfo(rsd_jet.structure_of<RecursiveSoftDrop>().sorted_zg_and_thetag());
|
---|
| 104 | }
|
---|
| 105 |
|
---|
| 106 |
|
---|
| 107 | std::string IteratedSoftDrop::description() const{
|
---|
| 108 | std::ostringstream oss;
|
---|
| 109 | oss << "IteratedSoftDrop with beta =" << _rsd.beta()
|
---|
| 110 | << ", symmetry_cut=" << _rsd.symmetry_cut()
|
---|
| 111 | << ", R0=" << _rsd.R0();
|
---|
| 112 |
|
---|
| 113 | if (_rsd.min_deltaR_squared() >= 0){
|
---|
| 114 | oss << " and angular_cut=" << sqrt(_rsd.min_deltaR_squared());
|
---|
| 115 | } else {
|
---|
| 116 | oss << " and no angular_cut";
|
---|
| 117 | }
|
---|
| 118 |
|
---|
| 119 | if (_rsd.subtractor()){
|
---|
| 120 | oss << ", and with internal subtraction using [" << _rsd.subtractor()->description() << "]";
|
---|
| 121 | }
|
---|
| 122 | return oss.str();
|
---|
| 123 | }
|
---|
| 124 |
|
---|
| 125 |
|
---|
| 126 | } // namespace contrib
|
---|
| 127 |
|
---|
| 128 | FASTJET_END_NAMESPACE
|
---|