Page MenuHomeHEPForge

No OneTemporary

Index: contrib/contribs/RecursiveTools/trunk/RecursiveSymmetryCutBase.cc
===================================================================
--- contrib/contribs/RecursiveTools/trunk/RecursiveSymmetryCutBase.cc (revision 1027)
+++ contrib/contribs/RecursiveTools/trunk/RecursiveSymmetryCutBase.cc (revision 1028)
@@ -1,281 +1,309 @@
// $Id$
//
// Copyright (c) 2014-, Gavin P. Salam, Gregory Soyez, Jesse Thaler
//
//----------------------------------------------------------------------
// This file is part of FastJet contrib.
//
// It is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// It is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this code. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------
#include "RecursiveSymmetryCutBase.hh"
#include "fastjet/JetDefinition.hh"
#include "fastjet/ClusterSequenceAreaBase.hh"
#include <algorithm>
#include <cstdlib>
using namespace std;
FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
namespace contrib{
LimitedWarning RecursiveSymmetryCutBase::_negative_mass_warning;
LimitedWarning RecursiveSymmetryCutBase::_mu2_gt1_warning;
//LimitedWarning RecursiveSymmetryCutBase::_nonca_warning;
LimitedWarning RecursiveSymmetryCutBase::_explicit_ghost_warning;
bool RecursiveSymmetryCutBase::_verbose = false;
//----------------------------------------------------------------------
PseudoJet RecursiveSymmetryCutBase::result(const PseudoJet & jet) const {
// construct the input jet (by default, recluster with C/A)
-
if (! jet.has_constituents()){
throw Error("RecursiveSymmetryCutBase can only be applied to jets with constituents");
}
PseudoJet j =
_do_reclustering
? _recluster ? (*_recluster)(jet)
: Recluster(cambridge_algorithm, JetDefinition::max_allowable_R)(jet)
: jet;
-
- // issue a warning if the jet is not obtained through a C/A
- // clustering
- // if ((! j.has_associated_cluster_sequence()) ||
- // (j.validated_cs()->jet_def().jet_algorithm() != cambridge_algorithm))
- // _nonca_warning.warn("RecursiveSymmetryCutBase is designed to be applied on jets from a Cambridge/Aachen clustering; use it with other algorithms at your own risk.");
+ // sanity check: the jet must have a valid CS
if (! j.has_valid_cluster_sequence()){
throw Error("RecursiveSymmetryCutBase can only be applied to jets associated to a (valid) cluster sequence");
}
+ // check that area information is there in case we have a subtractor
+ // GS: do we really need this since subtraction may not require areas?
if (_subtractor) {
const ClusterSequenceAreaBase * csab =
dynamic_cast<const ClusterSequenceAreaBase *>(j.associated_cs());
if (csab == 0 || (!csab->has_explicit_ghosts()))
_explicit_ghost_warning.warn("RecursiveSymmetryCutBase: there is no clustering sequence, or it lacks explicit ghosts: subtraction is not guaranteed to function properly");
}
// establish the first subjet and optionally subtract it
PseudoJet subjet = j;
if (_subtractor && (!_input_jet_is_subtracted)) {
subjet = (*_subtractor)(subjet);
}
- bool use_mu_cut = (_mu_cut != numeric_limits<double>::infinity());
-
// variables for tracking what will happen
PseudoJet piece1, piece2;
// vectors for storing optional verbose structure
// these hold the deltaR, symmetry, and mu values of dropped branches
std::vector<double> dropped_delta_R;
std::vector<double> dropped_symmetry;
std::vector<double> dropped_mu;
+
+ double sym, mu2;
// now recurse into the jet's structure
- while (subjet.has_parents(piece1, piece2)) {
-
- // first sanity check:
- // - zero or negative pts are not allowed for the input subjet
- // - zero or negative masses are not allowed for configurations
- // in which the mass will effectively appear in a denominator
- // (The masses will be checked later)
- if (subjet.pt2() <= 0) return PseudoJet();
-
- if (_subtractor) {
- piece1 = (*_subtractor)(piece1);
- piece2 = (*_subtractor)(piece2);
- }
-
- // determine the symmetry parameter
- double sym;
-
- if (_symmetry_measure == y) {
- // the original d_{ij}/m^2 choice from MDT
- // first make sure the mass is sensible
- if (subjet.m2() <= 0) {
- _negative_mass_warning.warn("RecursiveSymmetryCutBase: cannot calculate y, because (sub)jet mass is negative; bailing out");
- return _result_no_substructure(subjet); //TBC: do we return the hardest parent? A NULL PseudoJet?
+ while (!recurse_one_step(subjet, piece1, piece2, sym, mu2)) {
+ // start with sanity checks:
+ if (piece1==0){
+ // we should return piece2 by our convention for recurse_one_step
+ PseudoJet result = piece2;
+
+ if (_verbose) cout << "reached end; returning null jet " << endl;
+
+ if (result != 0) {
+ // if in grooming mode, add dummy structure information
+ StructureType * structure = new StructureType(result);
+ structure->_symmetry = 0.0;
+ structure->_mu = 0.0;
+ structure->_delta_R = 0.0;
+ if (_verbose_structure) { // still want to store verbose information about dropped branches
+ structure->_has_verbose = true;
+ structure->_dropped_symmetry = dropped_symmetry;
+ structure->_dropped_mu = dropped_mu;
+ structure->_dropped_delta_R = dropped_delta_R;
+ }
+ result.set_structure_shared_ptr(SharedPtr<PseudoJetStructureBase>(structure));
}
- sym = piece1.kt_distance(piece2) / subjet.m2();
-
- } else if (_symmetry_measure == vector_z) {
- // min(pt1, pt2)/(pt), where the denominator is a vector sum
- // of the two subjets
- sym = min(piece1.pt(), piece2.pt()) / subjet.pt();
-
- } else if (_symmetry_measure == scalar_z) {
- // min(pt1, pt2)/(pt1+pt2), where the denominator is a scalar sum
- // of the two subjets
- double pt1 = piece1.pt();
- double pt2 = piece2.pt();
- // make sure denominator is non-zero
- sym = pt1 + pt2;
- if (sym == 0) return PseudoJet();
- sym = min(pt1, pt2) / sym;
-
- } else {
- throw Error ("Unrecognized choice of symmetry_measure");
+
+ return result;
}
- // determine the symmetry cut
- // (This function is specified in the derived classes)
- double this_symmetry_cut = symmetry_cut_fn(piece1, piece2);
-
- // and make a first tagging decision based on symmetry cut
- bool tagged = (sym > this_symmetry_cut);
-
- // if tagged based on symmetry cut, then check the mu cut (if relevant)
- // and update the tagging decision. Calculate mu^2 regardless, for cases
- // of users not cutting on mu2, but still interested in its value.
- double mu2 = max(piece1.m2(), piece2.m2())/subjet.m2();
- if (tagged && use_mu_cut) {
- // first a sanity check -- mu2 won't be sensible if the subjet mass
- // is negative, so we can't then trust the mu cut - bail out
- if (subjet.m2() <= 0) {
- _negative_mass_warning.warn("RecursiveSymmetryCutBase: cannot trust mu, because (sub)jet mass is negative; bailing out");
- return PseudoJet();
- }
- if (mu2 > 1) _mu2_gt1_warning.warn("RecursiveSymmetryCutBase encountered mu^2 value > 1");
- if (mu2 > pow(_mu_cut,2)) tagged = false;
+ if (piece2==0){
+ // end of the recursion
+ return _result_no_substructure(piece1);
}
-
- // if we've tagged the splitting, return the jet with its substructure
- if (tagged) {
- // record relevant information
- StructureType * structure = new StructureType(subjet);
- structure->_symmetry = sym;
- structure->_mu = (mu2 >= 0) ? sqrt(mu2) : -sqrt(-mu2);
- structure->_delta_R = piece1.delta_R(piece2);
- if (_verbose_structure) {
- structure->_has_verbose = true;
- structure->_dropped_symmetry = dropped_symmetry;
- structure->_dropped_mu = dropped_mu;
- structure->_dropped_delta_R = dropped_delta_R;
- }
- subjet.set_structure_shared_ptr(SharedPtr<PseudoJetStructureBase>(structure));
- return subjet;
- }
-
// if desired, store information about dropped branches before recursing
if (_verbose_structure) {
dropped_delta_R.push_back(piece1.delta_R(piece2));
dropped_symmetry.push_back(sym);
dropped_mu.push_back((mu2 >= 0) ? sqrt(mu2) : -sqrt(-mu2));
}
-
- // otherwise continue unclustering, allowing for the different
- // ways of choosing which parent to look into
- int choice;
- if (_recursion_choice == larger_mt) {
- choice = piece1.mt2() > piece2.mt2() ? 1 : 2;
-
- } else if (_recursion_choice == larger_pt) {
- choice = piece1.pt2() > piece2.pt2() ? 1 : 2;
-
- } else if (_recursion_choice == larger_m) {
- choice = piece1.m2() > piece2.m2() ? 1 : 2;
-
- } else {
- throw Error ("Unrecognized value for recursion_choice");
- }
- if (_verbose) cout << "choice is " << choice << endl;;
- subjet = (choice == 1) ? piece1 : piece2;
- } // (subjet.has_parents(...))
- if (_verbose) cout << "reached end; returning null jet " << endl;
+ subjet = piece1;
+ }
- // decide on tagging versus grooming mode here
- PseudoJet result = _result_no_substructure(subjet);
+
+ // we've tagged the splitting, return the jet with its substructure
+ StructureType * structure = new StructureType(subjet);
+ structure->_symmetry = sym;
+ structure->_mu = (mu2 >= 0) ? sqrt(mu2) : -sqrt(-mu2);
+ structure->_delta_R = piece1.delta_R(piece2);
+ if (_verbose_structure) {
+ structure->_has_verbose = true;
+ structure->_dropped_symmetry = dropped_symmetry;
+ structure->_dropped_mu = dropped_mu;
+ structure->_dropped_delta_R = dropped_delta_R;
+ }
+ subjet.set_structure_shared_ptr(SharedPtr<PseudoJetStructureBase>(structure));
+ return subjet;
+}
+
+
- if (result != 0) {
- // if in grooming mode, add dummy structure information
- StructureType * structure = new StructureType(result);
- structure->_symmetry = 0.0;
- structure->_mu = 0.0;
- structure->_delta_R = 0.0;
- if (_verbose_structure) { // still want to store verbose information about dropped branches
- structure->_has_verbose = true;
- structure->_dropped_symmetry = dropped_symmetry;
- structure->_dropped_mu = dropped_mu;
- structure->_dropped_delta_R = dropped_delta_R;
+//----------------------------------------------------------------------
+// convention:
+// - if we return true, piece1 and piece2 have the final result
+// - if we return false and we've had a normal "groomin" process,
+// piece1 has the leading piece and piece2 the gromed one
+// - if piece2 is NULL, it means we've reached the bottom of the recursion
+// - if piece1 is NULL, an issue has been met and piece2 should be returned
+//
+bool RecursiveSymmetryCutBase::recurse_one_step(const PseudoJet & subjet,
+ PseudoJet &piece1, PseudoJet &piece2,
+ double &sym, double &mu2) const {
+ bool use_mu_cut = (_mu_cut != numeric_limits<double>::infinity());
+
+ if (!subjet.has_parents(piece1, piece2)){
+ piece1 = subjet;
+ piece2 = PseudoJet();
+ return false;
+ }
+
+ // first sanity check:
+ // - zero or negative pts are not allowed for the input subjet
+ // - zero or negative masses are not allowed for configurations
+ // in which the mass will effectively appear in a denominator
+ // (The masses will be checked later)
+ if (subjet.pt2() <= 0){ // this is a critical problem, return an empty PJ
+ piece1 = piece2 = PseudoJet();
+ return false;
+ }
+
+ if (_subtractor) {
+ piece1 = (*_subtractor)(piece1);
+ piece2 = (*_subtractor)(piece2);
+ }
+
+ // determine the symmetry parameter
+ if (_symmetry_measure == y) {
+ // the original d_{ij}/m^2 choice from MDT
+ // first make sure the mass is sensible
+ if (subjet.m2() <= 0) {
+ _negative_mass_warning.warn("RecursiveSymmetryCutBase: cannot calculate y, because (sub)jet mass is negative; bailing out");
+ piece1 = PseudoJet();
+ // since rounding errors can give -ve masses, be a it more
+ // tolerant and consider that no substructure has been found
+ piece2 = _result_no_substructure(subjet);
+ return false;
+ }
+ sym = piece1.kt_distance(piece2) / subjet.m2();
+
+ } else if (_symmetry_measure == vector_z) {
+ // min(pt1, pt2)/(pt), where the denominator is a vector sum
+ // of the two subjets
+ sym = min(piece1.pt(), piece2.pt()) / subjet.pt();
+ } else if (_symmetry_measure == scalar_z) {
+ // min(pt1, pt2)/(pt1+pt2), where the denominator is a scalar sum
+ // of the two subjets
+ double pt1 = piece1.pt();
+ double pt2 = piece2.pt();
+ // make sure denominator is non-zero
+ sym = pt1 + pt2;
+ if (sym == 0){ // this is a critical problem, return an empty PJ
+ piece1 = piece2 = PseudoJet();
+ return false;
}
- result.set_structure_shared_ptr(SharedPtr<PseudoJetStructureBase>(structure));
+ sym = min(pt1, pt2) / sym;
+
+ } else {
+ throw Error ("Unrecognized choice of symmetry_measure");
}
- return result;
-}
+ // determine the symmetry cut
+ // (This function is specified in the derived classes)
+ double this_symmetry_cut = symmetry_cut_fn(piece1, piece2);
+
+ // and make a first tagging decision based on symmetry cut
+ bool tagged = (sym > this_symmetry_cut);
+
+ // if tagged based on symmetry cut, then check the mu cut (if relevant)
+ // and update the tagging decision. Calculate mu^2 regardless, for cases
+ // of users not cutting on mu2, but still interested in its value.
+ mu2 = max(piece1.m2(), piece2.m2())/subjet.m2();
+ if (tagged && use_mu_cut) {
+ // first a sanity check -- mu2 won't be sensible if the subjet mass
+ // is negative, so we can't then trust the mu cut - bail out
+ if (subjet.m2() <= 0) {
+ _negative_mass_warning.warn("RecursiveSymmetryCutBase: cannot trust mu, because (sub)jet mass is negative; bailing out");
+ piece1 = piece2 = PseudoJet();
+ return false;
+ }
+ if (mu2 > 1) _mu2_gt1_warning.warn("RecursiveSymmetryCutBase encountered mu^2 value > 1");
+ if (mu2 > pow(_mu_cut,2)) tagged = false;
+ }
+
+ // we'll continue unclustering, allowing for the different
+ // ways of choosing which parent to look into
+ if (_recursion_choice == larger_pt) {
+ if (piece1.pt2() < piece2.pt2()) std::swap(piece1, piece2);
+ } else if (_recursion_choice == larger_mt) {
+ if (piece1.mt2() < piece2.mt2()) std::swap(piece1, piece2);
+ } else if (_recursion_choice == larger_m) {
+ if (piece1.m2() < piece2.m2()) std::swap(piece1, piece2);
+ } else {
+ throw Error ("Unrecognized value for recursion_choice");
+ }
+ return tagged;
+}
+
//----------------------------------------------------------------------
string RecursiveSymmetryCutBase::description() const {
ostringstream ostr;
ostr << "Recursive " << (_grooming_mode ? "Groomer" : "Tagger") << " with a symmetry cut ";
switch(_symmetry_measure) {
case y:
ostr << "y"; break;
case scalar_z:
ostr << "scalar_z"; break;
case vector_z:
ostr << "vector_z"; break;
default:
cerr << "failed to interpret symmetry_measure" << endl; exit(-1);
}
ostr << " > " << symmetry_cut_description();
if (_mu_cut != numeric_limits<double>::infinity()) {
ostr << ", mass-drop cut mu=max(m1,m2)/m < " << _mu_cut;
} else {
ostr << ", no mass-drop requirement";
}
ostr << ", recursion into the subjet with larger ";
switch(_recursion_choice) {
case larger_pt:
ostr << "pt"; break;
case larger_mt:
ostr << "mt(=sqrt(m^2+pt^2))"; break;
case larger_m:
ostr << "mass"; break;
default:
cerr << "failed to interpret recursion_choice" << endl; exit(-1);
}
if (_subtractor) {
ostr << " and subtractor: " << _subtractor->description();
if (_input_jet_is_subtracted) {ostr << " (input jet is assumed already subtracted)";}
}
return ostr.str();
}
// decide what to return when no substructure has been found
PseudoJet RecursiveSymmetryCutBase::_result_no_substructure(const PseudoJet &last_parent) const{
if (_grooming_mode){
// in grooming mode, return the last parent
return last_parent;
} else {
// in tagging mode, return an empty PseudoJet
return PseudoJet();
}
}
} // namespace contrib
FASTJET_END_NAMESPACE
Index: contrib/contribs/RecursiveTools/trunk/Makefile
===================================================================
--- contrib/contribs/RecursiveTools/trunk/Makefile (revision 1027)
+++ contrib/contribs/RecursiveTools/trunk/Makefile (revision 1028)
@@ -1,98 +1,104 @@
# If you are using this Makefile standalone and fastjet-config is not
# in your path, edit this line to specify the full path
FASTJETCONFIG=fastjet-config
PREFIX=`$(FASTJETCONFIG) --prefix`
CXX=g++
CXXFLAGS= -O3 -Wall -g
install_script = $(SHELL) ../utils/install-sh
check_script = ../utils/check.sh
# global contrib-wide Makefile include may override some of the above
# variables (leading "-" means don't give an error if you can't find
# the file)
-include ../.Makefile.inc
#------------------------------------------------------------------------
# things that are specific to this contrib
NAME=RecursiveTools
-SRCS=Recluster.cc RecursiveSymmetryCutBase.cc ModifiedMassDropTagger.cc SoftDrop.cc IteratedSoftDrop.cc
-EXAMPLES=example_mmdt example_mmdt_sub example_recluster example_softdrop example_advanced_usage example_isd
-INSTALLED_HEADERS=Recluster.hh RecursiveSymmetryCutBase.hh ModifiedMassDropTagger.hh SoftDrop.hh IteratedSoftDrop.hh
+SRCS=Recluster.cc RecursiveSymmetryCutBase.cc ModifiedMassDropTagger.cc SoftDrop.cc IteratedSoftDrop.cc RecursiveSoftDrop.cc
+EXAMPLES=example_mmdt example_mmdt_sub example_recluster example_softdrop example_recursive_softdrop example_advanced_usage example_isd
+INSTALLED_HEADERS=Recluster.hh RecursiveSymmetryCutBase.hh ModifiedMassDropTagger.hh SoftDrop.hh IteratedSoftDrop.hh RecursiveSoftDrop.hh
#------------------------------------------------------------------------
CXXFLAGS+= $(shell $(FASTJETCONFIG) --cxxflags)
LDFLAGS += -lm $(shell $(FASTJETCONFIG) --libs)
OBJS = $(SRCS:.cc=.o)
EXAMPLES_SRCS = $(EXAMPLES:=.cc)
install_HEADER = $(install_script) -c -m 644
install_LIB = $(install_script) -c -m 644
install_DIR = $(install_script) -d
install_DATA = $(install_script) -c -m 644
install_PROGRAM = $(install_script) -c -s
install_SCRIPT = $(install_script) -c
.PHONY: clean distclean examples check install
# compilation of the code (default target)
all: lib$(NAME).a
lib$(NAME).a: $(OBJS)
ar cru lib$(NAME).a $(OBJS)
ranlib lib$(NAME).a
# building the examples
examples: $(EXAMPLES)
# the following construct makes it possible to automatically build
# each of the examples listed in $EXAMPLES
$(EXAMPLES): % : %.o all
$(CXX) -o $@ $< -L. -l$(NAME) $(LDFLAGS)
# check that everything went fine
check: examples
@$(check_script) example_mmdt ../data/single-event.dat || exit 1
@$(check_script) example_mmdt_sub ../data/Pythia-Zp2jets-lhc-pileup-1ev.dat || exit 1
@$(check_script) example_recluster ../data/single-event.dat || exit 1
@$(check_script) example_softdrop ../data/single-event.dat || exit 1
@$(check_script) example_advanced_usage ../data/single-event.dat || exit 1
@$(check_script) example_isd ../data/single-event.dat || exit 1
# @for prog in $(EXAMPLES); do\
# $(check_script) $${prog} ../data/single-event.dat || exit 1; \
# done
@echo "All tests successful"
# cleaning the directory
clean:
rm -f *~ *.o
distclean: clean
rm -f lib$(NAME).a $(EXAMPLES)
# install things in PREFIX/...
install: all
$(install_DIR) $(PREFIX)/include/fastjet/contrib
for header in $(INSTALLED_HEADERS); do\
$(install_HEADER) $$header $(PREFIX)/include/fastjet/contrib/;\
done
$(install_DIR) $(PREFIX)/lib
$(install_LIB) lib$(NAME).a $(PREFIX)/lib
depend:
makedepend -Y -- -- $(SRCS) $(EXAMPLES_SRCS)
# DO NOT DELETE
Recluster.o: Recluster.hh
RecursiveSymmetryCutBase.o: RecursiveSymmetryCutBase.hh Recluster.hh
ModifiedMassDropTagger.o: ModifiedMassDropTagger.hh
ModifiedMassDropTagger.o: RecursiveSymmetryCutBase.hh Recluster.hh
SoftDrop.o: SoftDrop.hh RecursiveSymmetryCutBase.hh Recluster.hh
-IteratedSoftDrop.o: IteratedSoftDrop.hh SoftDrop.hh RecursiveSymmetryCutBase.hh Recluster.hh
+IteratedSoftDrop.o: IteratedSoftDrop.hh
+RecursiveSoftDrop.o: RecursiveSoftDrop.hh Recluster.hh
+RecursiveSoftDrop.o: RecursiveSymmetryCutBase.hh
example_mmdt.o: ModifiedMassDropTagger.hh RecursiveSymmetryCutBase.hh
example_mmdt.o: Recluster.hh
example_mmdt_sub.o: ModifiedMassDropTagger.hh RecursiveSymmetryCutBase.hh
example_mmdt_sub.o: Recluster.hh
example_recluster.o: Recluster.hh
example_softdrop.o: SoftDrop.hh RecursiveSymmetryCutBase.hh Recluster.hh
-example_isd.o: IteratedSoftDrop.hh SoftDrop.hh RecursiveSymmetryCutBase.hh Recluster.hh
\ No newline at end of file
+example_recursive_softdrop.o: RecursiveSoftDrop.hh Recluster.hh
+example_recursive_softdrop.o: RecursiveSymmetryCutBase.hh
+example_advanced_usage.o: SoftDrop.hh RecursiveSymmetryCutBase.hh
+example_advanced_usage.o: Recluster.hh
+example_isd.o: IteratedSoftDrop.hh
Index: contrib/contribs/RecursiveTools/trunk/SoftDrop.hh
===================================================================
--- contrib/contribs/RecursiveTools/trunk/SoftDrop.hh (revision 1027)
+++ contrib/contribs/RecursiveTools/trunk/SoftDrop.hh (revision 1028)
@@ -1,139 +1,139 @@
// $Id$
//
// Copyright (c) 2014-, Gregory Soyez, Jesse Thaler
// based on arXiv:1402.2657 by Andrew J. Larkoski, Simone Marzani,
// Gregory Soyez, Jesse Thaler
//
//----------------------------------------------------------------------
// This file is part of FastJet contrib.
//
// It is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// It is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this code. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------
#ifndef __FASTJET_CONTRIB_SOFTDROP_HH__
#define __FASTJET_CONTRIB_SOFTDROP_HH__
#include "RecursiveSymmetryCutBase.hh"
FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
namespace contrib{
//------------------------------------------------------------------------
/// \class SoftDrop
/// An implementation of the SoftDrop from arXiv:1402.2657.
///
/// For the basic functionalities, we refer the reader to the
/// documentation of the RecursiveSymmetryCutBase from which SoftDrop
/// inherits. Here, we mostly put the emphasis on things specific to
/// SoftDrop:
///
/// - the cut applied recursively is
/// \f[
/// z > z_{\rm cut} (\theta/R0)^\beta
/// \f]
/// with z the asymmetry measure and \f$\theta\f$ the geometrical
/// distance between the two subjets. R0 is set to 1 by default.
///
/// - by default, we work in "grooming mode" i.s. if no substructure
/// is found, we return a jet made of a single parton. Note that
/// this behaviour differs from the mMDT (and can be a source of
/// differences when running SoftDrop with beta=0.)
///
class SoftDrop : public RecursiveSymmetryCutBase {
public:
/// Simplified constructor. This takes the value of the "beta"
/// parameter and the symmetry cut (applied by default on the
/// scalar_z variable, as for the mMDT). It also takes an optional
/// subtractor.
///
/// If the (optional) pileup subtractor can be supplied, then see
/// also the documentation for the set_input_jet_is_subtracted() member
/// function.
///
/// \param beta the value of the beta parameter
/// \param symmetry_cut the value of the cut on the symmetry measure
/// \param R0 the angular distance normalisation [1 by default]
SoftDrop(double beta,
double symmetry_cut,
double R0 = 1,
const FunctionOfPseudoJet<PseudoJet> * subtractor = 0) :
RecursiveSymmetryCutBase(scalar_z, // the default SymmetryMeasure
std::numeric_limits<double>::infinity(), // default is no mass drop
larger_pt, // the default RecursionChoice
subtractor),
_beta(beta), _symmetry_cut(symmetry_cut), _R0sqr(R0*R0) {
// change the default: use grooming mode
set_grooming_mode();
}
/// Full constructor, which takes the following parameters:
///
/// \param beta the value of the beta parameter
/// \param symmetry_cut the value of the cut on the symmetry measure
/// \param symmetry_measure the choice of measure to use to estimate the symmetry
/// \param R0 the angular distance normalisation [1 by default]
/// \param mu_cut the maximal allowed value of mass drop variable mu = m_heavy/m_parent
/// \param recursion_choice the strategy used to decide which subjet to recurse into
/// \param subtractor an optional pointer to a pileup subtractor (ignored if zero)
///
/// The default values provided for this constructor are suited to
/// obtain the SoftDrop as discussed in arXiv:1402.2657:
/// - no mass drop is requested
/// - recursion follows the branch with the largest pt
/// The symmetry measure has to be specified (scalar_z is the recommended value)
///
/// Notes:
///
/// - by default, SoftDrop will recluster the jet with the
/// Cambridge/Aachen algorithm if it is not already the case. This
/// behaviour can be changed using the "set_reclustering" method
/// defined below
///
SoftDrop(double beta,
double symmetry_cut,
SymmetryMeasure symmetry_measure,
double R0 = 1.0,
double mu_cut = std::numeric_limits<double>::infinity(),
RecursionChoice recursion_choice = larger_pt,
const FunctionOfPseudoJet<PseudoJet> * subtractor = 0) :
RecursiveSymmetryCutBase(symmetry_measure, mu_cut, recursion_choice, subtractor),
_beta(beta), _symmetry_cut(symmetry_cut), _R0sqr(R0*R0)
{}
/// default destructor
virtual ~SoftDrop(){}
protected:
// Unlike MMDT, the SoftDrop symmetry_cut_fn depends on the subjet kinematics
// since the symmetry condition depends on the DeltaR between subjets.
virtual double symmetry_cut_fn(const PseudoJet & /* p1 */,
const PseudoJet & /* p2 */) const;
virtual std::string symmetry_cut_description() const;
-private:
+ //private:
double _beta; ///< the power of the angular distance to be used
///< in the symmetry condition
double _symmetry_cut; ///< the value of zcut (the prefactor in the asymmetry cut)
double _R0sqr; ///< normalisation of the angular distance
///< (typically set to the jet radius, 1 by default)
};
} // namespace contrib
FASTJET_END_NAMESPACE
#endif // __FASTJET_CONTRIB_SOFTDROP_HH__
Index: contrib/contribs/RecursiveTools/trunk/RecursiveSymmetryCutBase.hh
===================================================================
--- contrib/contribs/RecursiveTools/trunk/RecursiveSymmetryCutBase.hh (revision 1027)
+++ contrib/contribs/RecursiveTools/trunk/RecursiveSymmetryCutBase.hh (revision 1028)
@@ -1,300 +1,313 @@
// $Id$
//
// Copyright (c) 2014-, Gavin P. Salam, Gregory Soyez, Jesse Thaler
//
//----------------------------------------------------------------------
// This file is part of FastJet contrib.
//
// It is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// It is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this code. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------
#ifndef __FASTJET_CONTRIB_RECURSIVESYMMETRYCUTBASE_HH__
#define __FASTJET_CONTRIB_RECURSIVESYMMETRYCUTBASE_HH__
#include <limits>
#include <fastjet/internal/base.hh>
#include "fastjet/tools/Transformer.hh"
#include "fastjet/WrappedStructure.hh"
#include "Recluster.hh"
/** \mainpage RecursiveTools contrib
The RecursiveTools contrib provides a set of tools for
recursive investigation jet substructure. Currently it includes:
- fastjet::contrib::ModifiedMassDropTagger
- fastjet::contrib::SoftDrop
- fastjet::contrib::RecursiveSymmetryCutBase (from which the above two classes derive)
- fastjet::contrib::Recluster (provides a reclustering transformer)
- fastjet::contrib::IteratedSoftDropSymmetryFactors (defines ISD procedure)
- fastjet::contrib::IteratedSoftDropMultiplicity (defines a useful observable using ISD)
- example*.cc provides usage examples
*/
FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
namespace contrib{
//------------------------------------------------------------------------
/// \class RecursiveSymmetryCutBase
/// A base class for all the tools that de-cluster a jet until a
/// sufficiently symmetric configuration if found.
///
/// Derived classes (so far, ModifiedMassDropTagger and SoftDrop) have to
/// implement the symmetry cut and its description
///
/// Note that by default, the jet will be reculstered with
/// Cambridge/Aachen before applying the de-clustering procedure. This
/// behaviour can be changed using set_clustering (see below).
///
/// By default, this class behaves as a tagger, i.e. returns an empty
/// PseudoJet if no substructure is found. While the derived
/// ModifiedMassDropTagger is a tagger, the derived SoftDrop is a groomer
/// (i.e. it returns a non-zero jet even if no substructure is found).
///
/// This class provides support for
/// - an optional mass-drop cut (see ctor)
/// - options to select which symmetry measure should be used (see ctor)
/// - options to select how the recursion proceeds (see ctor)
/// - options for reclustering the jet before running the de-clustering
/// (see set_reclustering)
/// - an optional subtractor (see ctor and other methods below)
class RecursiveSymmetryCutBase : public Transformer {
public:
// ctors and dtors
//----------------------------------------------------------------------
/// an enum of the different (a)symmetry measures that can be used
enum SymmetryMeasure{scalar_z, ///< \f$ \min(p_{ti}, p_{tj})/(p_{ti} + p_{tj}) \f$
vector_z, ///< \f$ \min(p_{ti}, p_{tj})/p_{t(i+j)} \f$
y /// \f$ \min(p_{ti}^2,p_{tj}^2) \Delta R_{ij}^2 / m_{ij}^2 \f$
};
/// an enum for the options of how to choose which of two subjets to recurse into
enum RecursionChoice{larger_pt, ///< choose the subjet with larger \f$ p_t \f$
larger_mt, ///< choose the subjet with larger \f$ m_t \equiv (m^2+p_t^2)^{\frac12}] \f$
larger_m /// choose the subjet with larger mass (deprecated)
};
/// Full constructor, which takes the following parameters:
///
/// \param symmetry_measure the choice of measure to use to estimate the symmetry
/// \param mu_cut the maximal allowed value of mass drop variable mu = m_heavy/m_parent
/// \param recursion_choice the strategy used to decide which subjet to recurse into
/// \param subtractor an optional pointer to a pileup subtractor (ignored if zero)
///
/// If the (optional) pileup subtractor is supplied, then, by
/// default, the input jet is assumed unsubtracted and the
/// RecursiveSymmetryCutBase returns a subtracted 4-vector. [see
/// also the set_input_jet_is_subtracted() member function].
///
RecursiveSymmetryCutBase(SymmetryMeasure symmetry_measure = scalar_z,
double mu_cut = std::numeric_limits<double>::infinity(),
RecursionChoice recursion_choice = larger_pt,
const FunctionOfPseudoJet<PseudoJet> * subtractor = 0
) :
_symmetry_measure(symmetry_measure),
_mu_cut(mu_cut),
_recursion_choice(recursion_choice),
_subtractor(subtractor), _input_jet_is_subtracted(false),
_do_reclustering(true), _recluster(0),
_grooming_mode(false),
_verbose_structure(false) // by default, don't story verbose information
{}
/// default destructor
virtual ~RecursiveSymmetryCutBase(){}
// internal subtraction configuration
//----------------------------------------------------------------------
/// This tells the tagger whether to assume that the input jet has
/// already been subtracted. This is relevant only if a non-null
/// subtractor pointer has been supplied, and the default assymption
/// is that the input jet is passed unsubtracted.
///
/// Note: given that subtractors usually change the momentum of the
/// main jet, but not that of the subjets, subjets will continue to
/// have subtraction applied to them.
void set_input_jet_is_subtracted(bool is_subtracted) {_input_jet_is_subtracted = is_subtracted;}
/// returns a bool to indicate if the input jet is assumed already subtracted
bool input_jet_is_subtracted() const {return _input_jet_is_subtracted;}
/// an alternative way to set the subtractor
///
/// Note that when a subtractor is provided, the result of the
/// RecursiveSymmetryCutBase will be a subtracted jet.
void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor_) {_subtractor = subtractor_;}
/// returns a pointer to the subtractor
const FunctionOfPseudoJet<PseudoJet> * subtractor() const {return _subtractor;}
// reclustering behaviour
//----------------------------------------------------------------------
/// configure the reclustering prior to the SoftDrop de-clustering
/// \param do_reclustering recluster the jet or not?
/// \param recluster how to recluster the jet
/// (only if do_recluster is true;
/// Cambridge/Aachen used if NULL)
///
/// Note that the ModifiedMassDropTagger and SoftDrop are designed
/// to work with a Cambridge/Aachen clustering. Use any other option
/// at your own risk!
void set_reclustering(bool do_reclustering=true, const Recluster *recluster=0){
_do_reclustering = do_reclustering;
_recluster = recluster;
}
// what to do when no substructure is found
//----------------------------------------------------------------------
/// specify the behaviour adopted when no substructure is found
/// - in tagging mode, an empty PseudoJet will be returned
/// - in grooming mode, a single particle is returned
/// for clarity, we provide both function although they are redundant
void set_grooming_mode(bool enable=true){ _grooming_mode = enable;}
void set_tagging_mode(bool enable=true){ _grooming_mode = !enable;}
/// Allows access to verbose information about recursive declustering,
/// in particular values of symmetry, delta_R, and mu of dropped branches
void set_verbose_structure(bool enable=true) { _verbose_structure = enable; }
// inherited from the Transformer base
//----------------------------------------------------------------------
/// the function that carries out the tagging; if a subtractor is
/// being used, then this function assumes that input jet is
/// unsubtracted (unless set_input_jet_is_subtracted(true) has been
/// explicitly called before) and the result of the MMDT will be a
/// subtracted jet.
virtual PseudoJet result(const PseudoJet & j) const;
/// description of the tool
virtual std::string description() const;
/// the type of the associated structure
//typedef RecursiveSymmetryCutBaseStructure StructureType;
class StructureType;
/// for testing
static bool _verbose;
protected:
// the methods below have to be defined by deerived classes
//----------------------------------------------------------------------
/// the cut on the symmetry measure (typically z) that one need to
/// apply for a given pair of subjets p1 and p2
virtual double symmetry_cut_fn(const PseudoJet & /* p1 */,
const PseudoJet & /* p2 */) const = 0;
/// the associated dwescription
virtual std::string symmetry_cut_description() const = 0;
+ // the method below is the one actually performing one step of the
+ // recursion
+ //----------------------------------------------------------------------
+ bool recurse_one_step(const PseudoJet & subjet,
+ PseudoJet &piece1, PseudoJet &piece2,
+ double &sym, double &mu2) const;
+
+
private:
SymmetryMeasure _symmetry_measure;
double _mu_cut;
RecursionChoice _recursion_choice;
const FunctionOfPseudoJet<PseudoJet> * _subtractor;
bool _input_jet_is_subtracted;
bool _do_reclustering; ///< start with a reclustering
const Recluster *_recluster; ///< how to recluster the jet
bool _grooming_mode; ///< grooming or tagging mode
static LimitedWarning _negative_mass_warning;
static LimitedWarning _mu2_gt1_warning;
//static LimitedWarning _nonca_warning;
static LimitedWarning _explicit_ghost_warning;
// additional verbose structure information
bool _verbose_structure;
/// decide what to return when no substructure has been found
PseudoJet _result_no_substructure(const PseudoJet &last_parent) const;
};
//----------------------------------------------------------------------
/// class to hold the structure of a jet tagged by RecursiveSymmetryCutBase.
class RecursiveSymmetryCutBase::StructureType : public WrappedStructure {
public:
StructureType(const PseudoJet & j) :
- WrappedStructure(j.structure_shared_ptr()),
+ WrappedStructure(j.structure_shared_ptr()), _delta_R(-1.0), _symmetry(-1.0), _mu(-1.0),
+ _has_verbose(false) // by default, do not store verbose structure
+ {}
+
+ StructureType(const PseudoJet & j, double delta_R_in, double symmetry_in, double mu_in=-1.0) :
+ WrappedStructure(j.structure_shared_ptr()), _delta_R(delta_R_in), _symmetry(symmetry_in), _mu(mu_in),
_has_verbose(false) // by default, do not store verbose structure
{}
// information about kept branch
double delta_R() const {return _delta_R;};
double symmetry() const {return _symmetry;};
double mu() const {return _mu;};
// additional verbose information about dropped branches
bool has_verbose() const { return _has_verbose;}
// number of dropped branches
int dropped_count() const {
if (!_has_verbose) throw Error("RecursiveSymmetryCutBase::StructureType: Verbose structure must be turned on to get dropped_count() values.");
return _dropped_delta_R.size();
}
// delta_R of dropped branches
std::vector<double> dropped_delta_R() const {
if (!_has_verbose) throw Error("RecursiveSymmetryCutBase::StructureType: Verbose structure must be turned on to get dropped_delta_R() values.");
return _dropped_delta_R;
}
// symmetry values of dropped branches
std::vector<double> dropped_symmetry() const {
if (!_has_verbose) throw Error("RecursiveSymmetryCutBase::StructureType: Verbose structure must be turned on to get dropped_symmetry() values.");
return _dropped_symmetry;
}
// mass drop values of dropped branches
std::vector<double> dropped_mu() const {
if (!_has_verbose) throw Error("RecursiveSymmetryCutBase::StructureType: Verbose structure must be turned on to get dropped_mu() values.");
return _dropped_mu;
}
// maximum symmetry value dropped
double max_dropped_symmetry() const {
if (!_has_verbose) throw Error("RecursiveSymmetryCutBase::StructureType: Verbose structure must be turned on to get max_dropped_symmetry().");
if (_dropped_symmetry.size() == 0) return 0.0;
return *std::max_element(_dropped_symmetry.begin(),_dropped_symmetry.end());
}
private:
double _delta_R, _symmetry, _mu;
friend class RecursiveSymmetryCutBase;
// additional verbose information
bool _has_verbose;
// information about dropped values
std::vector<double> _dropped_delta_R;
std::vector<double> _dropped_symmetry;
std::vector<double> _dropped_mu;
};
} // namespace contrib
FASTJET_END_NAMESPACE
#endif // __FASTJET_CONTRIB_RECURSIVESYMMETRYCUTBASE_HH__
Index: contrib/contribs/RecursiveTools/trunk/example_recursive_softdrop.cc
===================================================================
--- contrib/contribs/RecursiveTools/trunk/example_recursive_softdrop.cc (revision 0)
+++ contrib/contribs/RecursiveTools/trunk/example_recursive_softdrop.cc (revision 1028)
@@ -0,0 +1,143 @@
+//----------------------------------------------------------------------
+/// \file example_recursive_softdrop.cc
+///
+/// This example program is meant to illustrate how the
+/// fastjet::contrib::RecursiveSoftDrop class is used.
+///
+/// Run this example with
+///
+/// \verbatim
+/// ./example_recursive_softdrop < ../data/single-event.dat
+/// \endverbatim
+//----------------------------------------------------------------------
+
+// $Id: example_softdrop.cc 705 2014-07-07 14:37:03Z gsoyez $
+//
+// Copyright (c) 2014, Gavin P. Salam
+//
+//----------------------------------------------------------------------
+// This file is part of FastJet contrib.
+//
+// It is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2 of the License, or (at
+// your option) any later version.
+//
+// It is distributed in the hope that it will be useful, but WITHOUT
+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+// License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this code. If not, see <http://www.gnu.org/licenses/>.
+//----------------------------------------------------------------------
+
+#include <iostream>
+#include <sstream>
+
+#include <sstream>
+#include <iomanip>
+#include <cmath>
+#include "fastjet/ClusterSequence.hh"
+#include "RecursiveSoftDrop.hh" // In external code, this should be fastjet/contrib/SoftDrop.hh
+
+using namespace std;
+using namespace fastjet;
+
+// forward declaration to make things clearer
+void read_event(vector<PseudoJet> &event);
+void print_prongs(const PseudoJet &jet, const string &pprefix);
+ostream & operator<<(ostream &, const PseudoJet &);
+
+//----------------------------------------------------------------------
+int main(){
+
+ //----------------------------------------------------------
+ // read in input particles
+ vector<PseudoJet> event;
+ read_event(event);
+ cout << "# read an event with " << event.size() << " particles" << endl;
+
+ // first get some anti-kt jets
+ double R = 1.0, ptmin = 20.0;
+ JetDefinition jet_def(antikt_algorithm, R);
+ ClusterSequence cs(event, jet_def);
+ vector<PseudoJet> jets = sorted_by_pt(cs.inclusive_jets(ptmin));
+
+ // give the soft drop groomer a short name
+ // Use a symmetry cut z > z_cut R^beta
+ // By default, there is no mass-drop requirement
+ double z_cut = 0.20;
+ double beta = 1.0;
+ int n=4;
+
+ contrib::RecursiveSoftDrop sd(beta, z_cut, n);
+ cout << "------------------------------------------------------------------------" << endl;
+ cout << "RecursiveSoftDrop groomer is: " << sd.description() << endl;
+
+ for (unsigned ijet = 0; ijet < jets.size(); ijet++) {
+ // Run SoftDrop and examine the output
+ PseudoJet sd_jet = sd(jets[ijet]);
+ cout << endl;
+ cout << "original jet: " << jets[ijet] << endl;
+ cout << "RecursiveSoftDropped jet: " << sd_jet << endl;
+
+ assert(sd_jet != 0); //because soft drop is a groomer (not a tagger), it should always return a soft-dropped jet
+
+ // print the prong structure of the jet
+ print_prongs(sd_jet, " ");
+
+ cout << " delta_R between subjets: " << sd_jet.structure_of<contrib::RecursiveSoftDrop>().delta_R() << endl;
+ cout << " symmetry measure(z): " << sd_jet.structure_of<contrib::RecursiveSoftDrop>().symmetry() << endl;
+ cout << " mass drop(mu): " << sd_jet.structure_of<contrib::RecursiveSoftDrop>().mu() << endl;
+ }
+
+ return 0;
+}
+
+//----------------------------------------------------------------------
+void print_prongs(const PseudoJet &jet, const string &prefix){
+ double dR = jet.structure_of<contrib::RecursiveSoftDrop>().delta_R();
+ cout << " " << prefix.substr(0, prefix.size()-1)
+ << "+--> pt=" << jet.pt() << ", m=" << jet.m()
+ << ", dR=" << dR << ", " << "<unimplemented>" << " groomed" << endl;
+ if (dR>=0){
+ vector<PseudoJet> pieces = jet.pieces();
+ assert(pieces.size()==2);
+ print_prongs(pieces[0], prefix+" |");
+ print_prongs(pieces[1], prefix+" ");
+ }
+}
+
+//----------------------------------------------------------------------
+/// read in input particles
+void read_event(vector<PseudoJet> &event){
+ string line;
+ while (getline(cin, line)) {
+ istringstream linestream(line);
+ // take substrings to avoid problems when there are extra "pollution"
+ // characters (e.g. line-feed).
+ if (line.substr(0,4) == "#END") {return;}
+ if (line.substr(0,1) == "#") {continue;}
+ double px,py,pz,E;
+ linestream >> px >> py >> pz >> E;
+ PseudoJet particle(px,py,pz,E);
+
+ // push event onto back of full_event vector
+ event.push_back(particle);
+ }
+}
+
+//----------------------------------------------------------------------
+/// overloaded jet info output
+ostream & operator<<(ostream & ostr, const PseudoJet & jet) {
+ if (jet == 0) {
+ ostr << " 0 ";
+ } else {
+ ostr << " pt = " << jet.pt()
+ << " m = " << jet.m()
+ << " y = " << jet.rap()
+ << " phi = " << jet.phi();
+ }
+ return ostr;
+}
Index: contrib/contribs/RecursiveTools/trunk/ChangeLog
===================================================================
--- contrib/contribs/RecursiveTools/trunk/ChangeLog (revision 1027)
+++ contrib/contribs/RecursiveTools/trunk/ChangeLog (revision 1028)
@@ -1,340 +1,364 @@
+2017-07-26 Gregory Soyez <soyez@fastjet.fr>
+
+ * example_recursive_softdrop.cc: *** ADDED ***
+ added a draft example for the use of RecursiveSoftDrop
+
+ * RecursiveSoftDrop.{hh,cc}: *** ADDED ***
+ added a first pass at an implementation of RecursiveSoftDrop.
+
+ This is based on Frederic's initial version but keeps the
+ branching structure of the jet. Some of the features, like
+ dynamical R0, direct access to the substructure or the same depth
+ variant, are still unsupported.
+
+ * SoftDrop.hh:
+ declared _beta, _symmetry_cut and _R0sqr as protected (was
+ private) so they ca n be used by RecursiveSoftDrop
+
+ * RecursiveSymmetryCutBase.{hh,cc}:
+ extracted from result() the part that performs one step of the
+ resursion (implemented as recurse_one_step()). This is repeatedly
+ called by result(). It has specific conventions to indicate
+ whether or not some substructure has been found or if one ran into
+ some issue.
+
2017-04-25 Kevin Zhou <knzhou@mit.edu>
- * IteratedSoftDrop.hh
+ * IteratedSoftDrop.hh
. Added Doxygen documentation
* RecursiveSymmetryCutBase.hh
. Added references to ISD
2017-04-25 Jesse Thaler <jthaler@jthaler.net>
* AUTHORS, COPYING:
. Added ISD arXiv number
* example_isd.{cc,ref}
. Added ISD arXiv number
. Changing z_cut to be optimal value (with Lambda = 1 GeV)
. Tweaked formatting
* IteratedSoftDrop.{hh,cc}
. Added ISD arXiv number
. Assert added if recluster does not return one jet.
* README
. Added ISD arXiv number and tweaked wording
2017-04-20 Kevin Zhou <knzhou@mit.edu>
* example_isd.{cc,ref} ** ADDED **
* IteratedSoftDrop.{cc,hh} ** ADDED **
* Makefile
. Added IteratedSoftDrop (ISD) as appropriate
* AUTHORS
. Added myself to author list
. Added placeholder for ISD paper
* COPYING
. Added placeholder for ISD paper
* README
. Added description of ISD
* TODO
. Added tasks to integrate ISD with other classes, e.g. SD,
Recluster, and the future RecursiveSoftDrop (RSD)
* NEWS
. Added dummy for release of 1.1.0
* VERSION:
. Switched version number to 1.1.0-dev
* example_advanced_usage.cc:
. Added $Id$ tag, didn't change anything else
2014-07-30 Gregory Soyez <soyez@fastjet.fr>
* Recluster.hh: fixed the name of the #define for the header
2014-07-09 Gregory Soyez <soyez@fastjet.fr> + Jesse
* NEWS:
release of RecursiveTools v1.0.0
* VERSION:
switched version number to 1.0.0
2014-07-08 Gavin Salam <gavin.salam@cern.ch>
* README (RecursionChoice):
added ref to .hh for constness specs of virtual functions (to
reduce risk of failed overloading due to wrong constness).
2014-07-08 Gregory Soyez <soyez@fastjet.fr> + Jesse
* README:
partially rewrote the description of set_subtractor
2014-07-07 Gregory Soyez <soyez@fastjet.fr> + Jesse
* example_advanced_usage.cc:
* example_softdrop.cc:
a few small fixed in the header of the files
* VERSION:
switched over to 1.0.0-alpha2-devel
* README:
Reordered a few things and added a few details.
* Makefile (check):
Be quiter during "make check"
* Recluster.cc (contrib):
Documented the "single" ctor argument
* RecursiveSymmetryCutBase.cc (contrib):
If the user sets himself the reclustering, disable the "non-CA"
warning (we assume that he knows what he is doing). Mentioned in
the comments that non-CA reclustering has to be used at the user's
risk. Also throw when th input jet has no constituents or when
there is no cluster sequence after reclustering.
* Recluster.cc (contrib):
replaced a remaining mention to "filtering" by reclustering
2014-07-04 Jesse Thaler <jthaler@jthaler.net>
* VERSION
. Ready for alpha release
2014-06-17 Jesse Thaler <jthaler@jthaler.net>
* example_advanced_usage.{cc,ref} ** ADDED **
* Makefile
. New example file to test a bunch of soft drop options
. Put in makefile as well
. Fixed nasty memory bug with pointers to Recluster
* RecursiveSymmetryCutBase.cc
* example_softdrop.ref
. description() now says Groomer vs. Tagger
* RecursiveSymmetryCutBase.{cc,hh}
. Added optional verbose logging information about
kinematics of dropped branches
* example_softdrop.cc
* example_advanced_usage.cc
. Fixed
2014-06-16 Gregory Soyez <soyez@fastjet.fr>
* Makefile:
also install the RecursiveSymmetryuCutBase.hh header
2014-06-13 Jesse Thaler <jthaler@jthaler.net>
* AUTHORS
. Added myself to author list
. Put complete bibliographic details on papers
* COPYING
. Added boilerplate MC/GPLv2 statement
* example.cc: ** REMOVED ** renamed to...
* example_mmdt.cc ** ADDED **
* Makefile
. Made name change for consistency
. Made corresponding changes in Makefile
* example_mmdt_sub.cc:
* example_mmdt.cc:
* example_recluster.cc:
. light editing of comments
* example_softdrop.cc:
. light editing of comments
. added assert for sdjet != 0, since SoftDrop is a groomer
* ModifiedMassDropTagger.hh
* Recluster.{cc,hh}
* RecursiveSymmetryCutBase.{cc,hh}
* SoftDrop.hh
. Updated some comments
* README
. Updated to include basic usage description and some
technical details
* TODO:
. Added some discussion points.
2014-06-13 Gregory Soyez <soyez@fastjet.fr>
* example_softdrop.{cc,ref}:
added an example for SoftDrop
* SoftDrop.{hh,cc}:
* ModifiedMassDropTagger.{hh,cc}:
* RecursiveSymmetryCutBase.{hh,cc}: *** ADDED ***
. added a base class for both the mMDT and SoftDrop
. made mMDT and SoftDrop inherit from RecursiveSymmetryCutBase
. moved the reclustering to the base class. By default, both
mMDT and SoftDrop now recluster the jet with C/A
. added set_grooming_mode and set_tagging_mode methods to the
base class
* Merging the development branch 1.0-beta1-softdrop-addition back
into the trunk (will correspond to revision 682)
* VERSION:
switched back to 1.0.0-devel
* SoftDrop.{hh,cc}:
added support for re-clustering through set_reclustering(bool,
Recluster*). By default, reclustering is done with
Cambridge/Aachen.
* example_recluster.{cc,ref}: *** ADDED ***
added an example of reclustering
* Recluster.{hh,cc}:
added a 'single' ctor argument [true by default]. When true, the
hardest jet after reclustering is returned, otherwise, the result
is a composite jet with all the subjets as its pieces.
2014-05-15 Gregory Soyez <soyez@fastjet.fr>
* VERSION:
set version number to 1.0-alpha-PUWS14.1 in preparation for a
fastjet-contrib release for the pileup-workshop at CERN on May
2014.
2014-04-25 Gregory Soyez <soyez@fastjet.fr>
* ModifiedMassDropTagger.hh:
* ModifiedMassDropTagger.cc:
Added comments at various places
* AUTHORS:
* README:
Updated info about what is now included in this contrib
* SoftDrop.hh: *** ADDED ***
* SoftDrop.cc: *** ADDED ***
* Recluster.hh: *** ADDED ***
* Recluster.cc; *** ADDED ***
Added tools for reclustering and softDrop
2014-04-25 Gregory Soyez <soyez@fastjet.fr>
branch started at revision 611 to start including SoftDrop in the
Recursivetols contrib
2014-04-24 Gregory Soyez <soyez@fastjet.fr>
* ModifiedMassDropTagger.hh:
added a mention of the fact that when result is called in the
presence of a subtractor, then the output is a subtracted
PseudoJet.
* ModifiedMassDropTagger.hh:
declared _symmetry_cut as protected (rather than provate) so it
can be accessed if symmetry_cut_description() is overloaded.
* example.cc:
trivial typo fixed in a comment
2014-02-04 Gavin Salam <gavin.salam@cern.ch>
* VERSION:
upped it to 1.0-beta1
* example_mmdt_sub.cc (main):
added an #if to make sure FJ3.1 features are only used if FJ3.1
is available. (Currently FJ3.1 is only available to FJ developers).
2014-01-26 Gavin Salam <gavin.salam@cern.ch>
* VERSION:
renamed to 1.0-beta0
* ModifiedMassDropTagger.hh:
* README:
added info on author names
* example_mmdt_sub.ref: *** ADDED ***
added reference output for the pileup test.
2014-01-25 Gavin Salam <gavin.salam@cern.ch>
* example_mmdt_sub.cc:
* Makefile:
added an extra example illustrating functionality with pileup
subtraction.
2014-01-24 Gavin Salam <gavin.salam@cern.ch>
* ModifiedMassDropTagger.cc:
Reorganised code so that (sub)jet.m2()>0 check is only used when
absolutely necessary: so if using a scalar_z symmetry measure,
whenever scalar_z < zcut, then there is no point checking the mu
condition. This means that there's no issue if the (sub)jet mass
is negative, and one simply recurses down into the jet. (Whereas
before it would bail out, reducing the tagging efficiency).
Also removed the verbose code.
2014-01-23 Gavin Salam <gavin.salam@cern.ch>
* ModifiedMassDropTagger.cc|hh:
* example.cc
replaced "asymmetry" with "symmetry" in a number of places;
implemented the structural information and added it to the example;
added a new simplified constructor;
improved doxygen documentation;
started renaming -> RecursiveTools
* README
some tidying
* VERSION
1.0-b0
2014-01-22 Gavin Salam <gavin.salam@cern.ch>
* ModifiedMassDropTagger.cc (contrib):
-ve mass now bails out also when using the "y" asymmetry measure.
Also, default my is now infinite.
2014-01-20 Gavin Salam <gavin.salam@cern.ch> + Gregory
* ModifiedMassDropTagger.cc|hh:
introduced a virtual asymmetry_cut_fn (essentially a
dummy function returning a constant), to allow for derived classes
to do fancier things.
added warning about non-C/A clustering.
explicitly labelled some (inherited) virtual functions as
virtual.
2014-01-20 Gavin Salam <gavin.salam@cern.ch>
* example.ref:
* example.cc (main):
got a first working example and make check setup.
* ModifiedMassDropTagger.cc|hh:
improved doxygen comments;
added option whereby input jet is assumed already subtracted
2014-01-19 Gavin Salam <gavin.salam@cern.ch>
* ModifiedMassDropTagger.cc|hh:
* many other files
Initial creation, with basic code for MMDT

File Metadata

Mime Type
text/x-diff
Expires
Wed, May 14, 10:27 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111141
Default Alt Text
(57 KB)

Event Timeline