Page MenuHomeHEPForge

No OneTemporary

This document is not UTF8. It was detected as ISO-8859-1 (Latin 1) and converted to UTF8 for display.
Index: tags/siscone-3.0.2/Makefile.am
===================================================================
--- tags/siscone-3.0.2/Makefile.am (revision 399)
+++ tags/siscone-3.0.2/Makefile.am (revision 400)
@@ -1,2 +1,14 @@
SUBDIRS = siscone examples
EXTRA_DIST = makefile.static Doxyfile
+
+# local macros for aclocal
+ACLOCAL_AMFLAGS = -I m4
+
+# AX_PREFIX_CONFIG_H leaves some files undeleted after a make distclean
+#
+# we could use DISTCLEAN=... here but this would also overwrite the defaults
+# So, instead, we use the (apparently recommended) -local target to extend
+# the default behaviour
+distclean-local: distclean-ax-prefix-config-h
+distclean-ax-prefix-config-h:
+ rm -f _configs.sed siscone/config.h
Index: tags/siscone-3.0.2/setversion.sh
===================================================================
--- tags/siscone-3.0.2/setversion.sh (revision 399)
+++ tags/siscone-3.0.2/setversion.sh (revision 400)
@@ -1,27 +1,27 @@
#!/bin/bash
#
# Script to update the version number in the locations where it is
# hard-coded. Note that this happens only in the situations where no
# config.h file is present, i.e. in SISCone builds that do not use
# autotools.
#
# Usage:
# ./setversion.sh
# The version number will be read from configure.ac
# get the version number from configure.ac
version=`grep '^ *AC_INIT' configure.ac`
version=${version##*[}
version=${version%]*}
echo "Using version number '"$version"' from configure.ac."
-for file in `grep -l -r "#define VERSION" siscone/*.{h,cpp} siscone/spherical/*.{h,cpp} examples/*.{h,cpp} | grep -v "config.h"`; do
+for file in `grep -l -r "#define SISCONE_VERSION" siscone/*.{h,cpp} siscone/spherical/*.{h,cpp} examples/*.{h,cpp} | grep -v "config.h"`; do
echo "Performing replacement in '"${file}"'"
- current_definition=`grep -h "#define VERSION" ${file}`
+ current_definition=`grep -h "#define SISCONE_VERSION" ${file}`
current_version=${current_definition#*\"}
current_version=${current_version%*\"}
echo " replacing '"${current_version}"' with '"${version}"'"
sed -e"s/$current_version/$version/" ${file} > ./tmp.tmp
mv ./tmp.tmp ${file}
done
Index: tags/siscone-3.0.2/autogen.sh
===================================================================
--- tags/siscone-3.0.2/autogen.sh (revision 399)
+++ tags/siscone-3.0.2/autogen.sh (revision 400)
@@ -1,137 +1,138 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
PKG_NAME="SISCone"
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AC_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
(((libtool --version) < /dev/null > /dev/null 2>&1) ||
((libtool -V) < /dev/null > /dev/null 2>&1)) ||
{
echo
echo "**Error**: You must have \`libtool' installed."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
(gettext --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`gettext' installed."
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
for coin in `find $srcdir -name configure.ac -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
- macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
+ #macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
+ macrodirs="m4"
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS -I ."
for k in $macrodirs; do
if test -d $k; then
aclocalinclude="$aclocalinclude -I $k"
##else
## echo "**Warning**: No such directory \`$k'. Ignored."
fi
done
if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
if grep "sed.*POTFILES" configure.ac >/dev/null; then
: do nothing -- we still have an old unmodified configure.ac
else
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running gettextize... Ignore non-fatal messages."
echo "no" | gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
fi
if grep "^AM_GNOME_GETTEXT" configure.ac >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running gettextize... Ignore non-fatal messages."
echo "no" | gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude
#if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
# echo "Running autoheader..."
- autoheader
+ # autoheader
#fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME
else
echo Skipping configure process.
fi
Index: tags/siscone-3.0.2/ChangeLog
===================================================================
--- tags/siscone-3.0.2/ChangeLog (revision 399)
+++ tags/siscone-3.0.2/ChangeLog (revision 400)
@@ -1,1554 +1,1578 @@
+2016-03-29 Gregory Soyez <soyez@fastjet.fr>
+
+ * siscone/split_merge.h:
+ * siscone/spherical/split_merge.h:
+ used SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR from config.h
+
+ * configure.ac:
+ put (SISCONE_)USES_UNIQUE_PTR_AS_AUTO_PTR in config.h
+
+ * siscone/siscone.{h,cpp}:
+ * siscone/spherical/siscone.{h,cpp}:
+ * siscone/defines.h:
+ PACKAGE_NAME -> SISCONE_PACKAGE_NAME
+ VERSION -> SISCONE_VERSION
+
+ * siscone/Makefile.am:
+ included config.h in the list of distributed headers.
+
+ * configure.ac:
+ * Makefile.am:
+ * m4/ax_config_header_h.m4: *** ADDED ***
+ prefixed the entries in config.h by SISCONE_ to avoid conflicts
+ with other packages if we want to include it in a header file.
+
2016-03-16 Gregory Soyez <soyez@fastjet.fr>
Release of SISCone 3.0.2
* NEWS:
tweaked as suggested by Gavin
* doc/html/usage.html:
* doc/html/index.html:
backported a change done on the Hepforge pages
* doc/html/algorithm.html:
* doc/html/index.html:
* doc/html/sm_issue.html:
* doc/html/download.html:
* doc/html/perfs.html:
* doc/html/usage.html:
set version number to 3.0.2; updated a few links and mention the
new release
* Doxyfile:
* siscone/siscone.cpp:
* siscone/spherical/siscone.cpp:
* configure.ac:
set version number to 3.0.2
* NEWS:
drafted for v3.0.2
2016-03-10 Gregory Soyez <soyez@fastjet.fr>
* siscone/split_merge.h:
* siscone/spherical/split_merge.h:
switched the auto_ptr into unique_ptr when
SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR is defined
* configure.ac:
fine-tuned the configure test for auto-ptr deprecation [for god
knows what reason, -Werror does not turn -Wdeprecated-declarations
into errors for gcc-5.2.1... so I replaced it with
-Werror=deprecated-declarations which does]
* configure.ac:
added a series of tests to check if the compiler considers
auto_ptr as deprecated and, if yes, supports unique_ptr
2016-03-03 Gregory Soyez <soyez@fastjet.fr>
* siscone/spherical/siscone.cpp:
* siscone/siscone.cpp:
restored the original _banner_ostr stream format flags after
printing out the banner
* siscone/spherical/split_merge.cpp:
* siscone/split_merge.cpp:
removed unnecessary (dead) code at the end of get_sm_var2()
* siscone/spherical/split_merge.h:
* siscone/spherical/split_merge.cpp:
* siscone/split_merge.h:
* siscone/split_merge.cpp:
initialised pass to CJET_INEXISTENT_PASS by default
* siscone/vicinity.cpp:
initialised ve_list before calling set_particle_list
2016-02-29 Gregory Soyez <soyez@fastjet.fr>
* doc/html/download.html:
updated link to html browsing og the svn repo
* doc/html/usage.html:
updated a couple of links to the FJ doxygen pages
* configure.ac:
* siscone/siscone.cpp:
* siscone/spherical/siscone.cpp:
* Doxyfile:
switched version number over to 3.0.2-devel
2016-02-29 Gregory Soyez <soyez@fastjet.fr>
Release of SISCone 3.0.1
* NEWS:
* CHECKLIST:
* Doxyfile:
* configure.ac:
* doc/html/*.html:
* siscone/siscone.cpp:
* siscone/spherical/siscone.cpp:
prepared for the release of SISCone 3.0.1
2016-02-24 Gregory Soyez <soyez@fastjet.fr>
* siscone/spherical/geom_2d.h:
get_theta_cell(...): fixed rounding issue for theta==pi
[Bug reported by Andrii Verbytskyi, see
2016-02-SphericalSISCone-throws in the FastJet issue tracker]
* siscone/spherical/geom_2d.cpp:
add_particle(...): made sure the full phi range is included for
theta=0 or theta=pi
* siscone/spherical/geom_2d.h:
fixed typo in comment:
* siscone/spherical/split_merge.cpp:
* siscone/split_merge.cpp:
fixed bad variale in debugging outpout and added debugging info
2014-09-10 Gregory Soyez <soyez@fastjet.fr>
* Doxyfile:
* configure.ac:
* siscone/siscone.cpp:
* siscone/spherical/siscone.cpp:
set version number to 3.0.1-devel
2014-09-09 Gregory Soyez <soyez@fastjet.fr>
* SISCone 3.0.0
* doc/html/usage.html:
* doc/html/perfs.html:
added a brief discussion about the algogithm complexity.
2014-09-09 Gavin Salam <gavin.salam@cern.ch>
* NEWS:
* doc/html/index.html:
* doc/html/usage.html:
small phrasing changes
2014-09-09 Gregory Soyez <soyez@fastjet.fr>
* configure.ac:
* NEWS:
* siscone/siscone.cpp:
* siscone/spherical/siscone.cpp:
* Doxyfile:
preparing for the release of SISCone 3.0.0
* doc/html/*.html:
changed the version number to 3.0.0
included the release information
updated Gavin's email address
* doc/html/usage.html:
added a description of SISCone with progressive removal
* Doxyfile:
Updated for more recent versions of doxygen [ran doxygen -u from
doxygen 1.8.8]
2014-09-04 Gregory Soyez <soyez@fastjet.fr>
* siscone/split_merge.cpp:
* siscone/spherical/split_merge.cpp:
in progressive removal mode, set the 'pass' index associated to
each jet to the index of the iteration at which it has been
obtained
* siscone/siscone.h:
* siscone/siscone.cpp:
* siscone/spherical/siscone.h:
* siscone/spherical/siscone.cpp:
put the duplicated code for initialisation in a spearate method
* siscone/split_merge.cpp:
fixed a bug introduced in a recent commit: jet_candidate.sm_var2
was not assigned prolperly for non-user-defined scales
* siscone/spherical/split_merge.cpp:
* siscone/spherical/split_merge.h:
propagated recent modifications of SISCone to the spherical
version:
. reworked some comments (including the misplaced one about
collinear-safety)
. default for SM_var2_hardest_cut_off changed from -1 to
-numeric_limits<double>::max() [largely redundant]
. added support for user-defined scale when run in
"progressive-removal mode"
* siscone/split_merge.h:
. removed temporary comments at the top of the file
. added a dummy virtual dtor to Csplit_merge::Cuser_scale_base
2014-09-04 Gavin SALAM <gavin.salam@cern.ch> + Gregory
* siscone/split_merge.cpp:
SM_var2_hardest_cutoff no longer applied to PR case.
Modified sm_var2 in (PR) _user_scale case to now be the signed
square of the scale variable (to properly handle negative values
of the scale).
default for SM_var2_hardest_cut_off changed from -1 to
-numeric_limits<double>::max(); (this change is largely redundant,
given that SM_var2_hardest_cutoff is no longer used for PR, while
the SM case only allows default scale choices, which are all
positive definite).
replaced <math.h> with <cmath>;
* siscone/split_merge.h:
default Cuser_scale_base::is_larger(...) now uses cached values of
scale in Cjet.
small fixes to a number of comments, including misplaced warning
about collinear unsafety.
* siscone/siscone.h:
small changes to comments to clarify situation of an unused
variable in progressive removal
2014-09-04 Gregory Soyez <soyez@fastjet.fr>
* siscone/split_merge.cpp:
* siscone/siscone/split_merge.h:
added material to support user-defined scale choices in
progressive-removal mode.
One needs to overload the Csplit_merge::Cuser_scale_base class and
pass a pointer to the split-merge using set_user_scale().
2014-09-03 Gregory Soyez <soyez@fastjet.fr>
* siscone/spherical/siscone.h:
* siscone/spherical/siscone.cpp:
* siscone/spherical/split_merge.h:
* siscone/spherical/split_merge.cpp:
ported "siscone with progressive removal" to the spherical
coordinates version
* siscone/siscone.h:
fixed typo in variable name
* siscone/split_merge.cpp:
imposed the SM_var2_hardest_cut_off in the progressive case too
+ made sure at least one candidate jet was found
* siscone/siscone.h:
* siscone/siscone.cpp:
added compute_jets_progressive_removal(...) which implements a
"progressive removal" version of SISCone. This successively
computes stable cones and removes the hardest stable cone as a jet
until no particles are left or no stable cones are found.
Question: what do we do with 'protocones_list'? [for the time
being, it's left empty]
* siscone/split_merge.h:
* siscone/split_merge.cpp:
added 'add_hardest_protocones_to_jets' which computes the hardest
of the stable cones passed as arguments, declares it as a jet and
removes its content from the remaining list of particles. This
should be used instead of add_protocones()+perform() if one wants a
progressive-removal version of SISCone.
2013-04-09 Gregory Soyez <soyez@fastjet.fr>
* doc/html/index.html:
fixed trivial typo (developper -> developer)
* switched version number to 2.0.7-devel
2013-04-09 Gregory Soyez <soyez@fastjet.fr>
* Release of SISCone 2.0.6
* NEWS, doc/html/index.html
set the release date to April 9th
* Doxyfile
Set version number to 2.0.6
2013-04-08 Gregory Soyez <soyez@fastjet.fr>
* doc/html/*.html:
* configure.ac:
switched version number to 2.0.6
* NEWS:
preparing for SISCone 2.0.6
* setversion.sh: minor fix (used bash instead of sh)
* CHECKLIST: *** ADDED ***
helper checklist for the release process
2013-04-06 Gavin Salam <gavin.salam@cern.ch>
* configure.ac:
updated minimal required autotools version to 2.63
2013-02-05 Gavin Salam <gavin.salam@cern.ch>
* autogen.sh: tried to be more tolerant of different libtool
versions (some take --version, others -V). Still have problems
on OS X 10.8 with macports , but autoreconf works fine.
* configure.ac:
replaced AM_CONFIG_HEADER with with AC_CONFIG_HEADERS, following
error with autoconf 2.69 on OS X 10.8 with macports.
2013-02-04 Gregory Soyez <soyez@fastjet.fr>
* siscone/Makefile.am:
do not install config.h
* siscone/spherical/Makefile.am:
fixed directory for headers installation for the spherical
version of SISCone
2012-01-17 Gregory Soyez <soyez@fastjet.fr>
* NEWS:
SISCone 2.0.5
* NEWS:
* configure.ac:
* Doxyfile:
prepared for the release of SISCone 2.0.5
* siscone/spherical/Makefile.qm:
used $(includedir) instead of $(prefix)/include
2012-01-13 Gregory Soyez <soyez@fastjet.fr>
* siscone/Makefile.am:
used $(includedir) instead of $(prefix)/include
2011-11-25 Gregory Soyez <soyez@fastjet.fr>
* NEWS:
SISCone 2.0.4
* NEWS:
updated in preparation for the 2.0.4 release
* doc/html/home.png: *** ADDED ***
* doc/html/usage.html:
* siscone/siscone_error.h:
* doc/html/index.html:
fixed typos; updated html links.
* configure.ac:
* Doxyfile:
* doc/html/*.html:
updated the version number to 2.0.4 and the release information
* siscone/spherical/siscone.cpp:
* siscone/spherical/siscone.h:
* siscone/siscone.cpp:
* siscone/siscone.h:
allowed to redirect the banner to a different stream than cout
2011-11-16 Gregory Soyez <soyez@fastjet.fr>
* examples/test.cpp:
cast a vector size (of type size_t) onto unsigned int to avoid a
compiler warning (on either 32 or 64-bit machines)
2011-11-15 Gavin Salam <salam@lpthe.jussieu.fr>
* AUTHORS:
updated my address.
2011-11-15 Gregory Soyez <soyez@fastjet.fr>
* siscone/protocones.cpp (is_inside, proceed_with_stability):
* siscone/spherical/split_merge.cpp (init):
* siscone/split_merge.cpp (init):
* siscone/siscone_error.h:
* siscone/area.cpp (compute*_areas):
renamed or commented out a few local variables and method
arguments to avoid shadowing class members (gcc -Wshadow)
* examples/spherical.cpp:
* examples/sample.cpp:
removed unused argc, argv parameters
* examples/spherical.cpp:
* examples/sample.cpp:
* examples/times.cpp:
* examples/test.cpp:
* examples/area.cpp:
* examples/main.cpp:
* siscone/spherical/split_merge.cpp (save_contents, show):
* siscone/split_merge.cpp (save_contents, show):
* siscone/quadtree.cpp (save, save_leaves):
got rid of a few format warnings by replacing %le and %lf by %e
and %f (the l prefix applying to int and unsigned int) + a couple
of signed/unsigned mismatches (%d -> %u)
* configure.ac:
switched version number to 2.0.4-devel
2011-10-05 Gregory Soyez <soyez@fastjet.fr>
* NEWS:
SISCone 2.0.3
* AUTHORS:
updated addresses and phone numbers
* configure.ac:
* Doxyfile:
* doc/html/*.html:
updated the version number and the release information
* Doxyfile:
removed the treeview
* siscone/reference.cpp:
removed redundant operator + (following a gcc warning)
Checked with FastJet's regression check that it was indeed not
used
* siscone/spherical/protocones.cpp:
removed an unused variable
2011-08-09 Gregory Soyez <soyez@fastjet.fr>
* siscone/spherical/split_merge.h:
fixed the description of E_tilde. It was
sum of E_i [ 1 + sin^2(theta_iJ) ]
but in practice we used
sum of E_i [ 1 +|p_i x p_J|^2/(|p_i|^2 E_J^2)]
as mentioned further down in the ChangeLog (that avoids
potential issues when a protojet has a zero 3-momentum)
2011-05-17 Gregory Soyez <soyez@fastjet.fr>
* configure.ac, Doxyfile & NEWS:
SISCone 2.0.2
2010-10-27 Gregory Soyez <soyez@cern.ch>
* siscone/makefile.static:
recursed make clean in the spherical dir
* siscone/spherical/makefile.static:
included main siscone header directory
* siscone/siscone.cpp, siscone/spherical/siscone.cpp:
The config.h header should be present from autoheader in the
autotools build and from the sed command in the main
makefile.static for build using the static makefiles.
2009-05-29 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* configure.ac & NEWS:
SISCone 2.0.1
2009-05-28 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* Doxyfile (PROJECT_NUMBER):
doc/html/*.html:
switched the version number to 2.0.1
* INSTALL (Notes):
fixed the comment on the static/shared default build
* configure.ac:
enabled shared libs by defaut (following a long discussion
regarding static vs. shared libraries, we finally decided to
make a minimal modification compared to the previous release,
i.e. keep shared libraries on)
2009-05-25 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* configure.ac:
switched back to static libraries
* siscone/Makefile.am:
examples/Makefile.am:
siscone/spherical/Makefile.am:
replace a few ${var} by $(var) to be more compatible
with Makefile rules
2009-05-01 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/spherical/hash.cpp (siscone_spherical):
renamed _R into _radius (problem with some Mac systems).
Note: some of the comments were mentioning R2 as a parameter
rather than R, so this has been fixed at the same time.
* configure.ac:
build shared libs by default
This is a bug-fix for FastJet that now uses shared libs by
default too
* configure.ac & Doxyfile:
switched version number to 2.0.1-devel
2009-04-17 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* NEWS & configure.ac:
SISCone 2.0.0
* doc/html/index.html:
Doxyfile:
configure.ac:
switched the version number to 2.0.0
2009-03-17 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/split_merge.cpp (siscone):
moved the computation of the rapidity limits AFTER the
exclusion of the particles with pz>=E
2009-03-12 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* configure.ac:
switched version to 2.0-devel
* NEWS:
updated to include the new things in the upcoming release
* Doxyfile:
updated together with an additional bunch of doxygen-compliant
comments in the source files
2008-08-06 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/siscone.cpp (siscone):
make sure that the full 4-vector information is included in the
protocones list.
2008-07-29 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/siscone.cpp:
siscone/spherical/siscone.cpp:
check that the config.h file is available.
Otherwise, use fixed values for PACKAGE and VERSION.
2008-07-23 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/spherical/siscone.h (siscone_spherical):
set E_tilde as the default SM variable.
* siscone/spherical/split_merge.{h,cpp} (siscone_spherical):
addressed the issue of IRC safety related to the choice of the
split-merge ordering variable. We kept E (an unsafe choice) for
its simplicity and added E_tilde defined as
/ |p_i X p_J|^2 \
\sum_{i\in J} E_i | 1 + --------------- |
\ |p_i|^2 E_J^2 /
The use of E_J instead of p_J in the denominator prevents the
case where jets have zero momentum (e.g. monster jets with
momentum conservation)
Note that this variable is only used for the ordering; the
computation of the overlap is always using the energy.
2008-07-18 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/siscone.cpp (siscone)
siscone/spherical/siscone.cpp (siscone_spherical):
package_name() returns PACKAGE_NAME, not VERSION!
* siscone/spherical/Makefile.am:
added a path for siscone/config.h to be correctly included
* siscone/Makefile.am:
prevent config.h from being shipped with the distribution
2008-07-07 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/spherical/split_merge.cpp (siscone_spherical):
transformed the pt2 cut-off on particles into an
energy (squared) cut-off.
2008-07-07 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* Spherical version included in the main trunk
(see below for details)
* Copied the 'spherical branch' into the siscone/spherical
folder.
Copied the sample program into the example folder.
Imported the ChangeLog from the branch
Steps remaining in the main trunk: (. = todo, - = done)
- updating the makefiles
- deleted the "defines.h" file in the subdir
the main one is used.
- tested (make distcheck + sample running)
Questions:
- do we also copy the unchanged files? (It will mess a bit the
filenames but they concerns material hidden to the end-user,
so I'd keep them in the trunk
It concerns circulator, reference, ranlux and siscone_error.
- do we remove the quadtree in the spherical dir?
(I'd say 'yes', not done currently)
- keep the "unused" files in the branch? (area, quadtree, ...)
2008-07-02 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* started the process of merging the spherical version of SISCone
into the main trunk. The new version will be inserted in the
"siscone/spherical" directory. We shall put it under the
'siscone_spherical' namespace and rename the relevant classes
using a 'CSph' prefic instead of the 'C' prefix used in the main
trunk.
Steps to be done in the branch: (. = todo, - = done)
- move the relevant files in a 'siscone/spherical' directory
- add a siscone/Makefile.am in the branch (+small updates)
- change the namespace
- rename the classes and update the names in the code
Note that some of the classes have been kept from the main
version (e.g. everything in reference.h, siscone_error.h +
isolated classes like circulator, two_vector). This should
not affect the end-user.
- in the examples, move the main sample into a 'spherical' one
- test on the branch
DONE.
2008-06-16 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/vicinity.cpp (siscone): revised the normalisation of the
cocircular range.
* siscone/split_merge.cpp (siscone): recomputed the norm of
the result of a collinear merging. This is required as
the norm is used in stable-cone search and not recomputed
automatically.
* siscone/protocones.cpp (siscone): normalised directions
used to determine the angles. This might well be the reason
of the co-circular problem.
* siscone/geom_2d.cpp (siscone): removed an unused variable
2008-06-14 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* Note: this version passed ~3e8 safety tests (including arcs,
soft particles, reordering and single/multi-pass).
* siscone/vicinity.cpp (siscone): added cocirc-tests
WARNING: this is a naive adaptation from the cylindrical case.
* siscone/momentum.h (siscone): reverted most of the last
modification: since the simple computation using a cos()
requires the computation of the norm (not its squared because
the sign of the cos matters) it is most complicated than the one
with the tangent. Note that we're free of the problem mentionned
below as the only place where it can happen is in the
computation of the vicinity and there we compute distances
internally rather than calling is_closer.
Finally, we've added a is_closer_safe with the computation
using te cosine.
2008-06-13 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/vicinity.cpp (siscone):
pre-added co-circularity management
* siscone/momentum.h (siscone):
replaced the tangent used in distances comparison by
a cosine (the tangent is more precise at small R but
we'll probably never get down to that small values of R).
The reason for the replacement is that it gives wrong
results for vicinity computation for 2R>pi/2.
This present computation is also faster (no x-product).
All calls to that function have been updated too.
2008-06-12 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* Description: this is the first complete adaptation to the
SISCone jet-search using spherical coordinatee.
This branch is motivated by potential applications to
cosmic-rays and follows a request by Yvonne Küssel
<Yvonne.Kuessel@gmx.de>
* Summary of modifications:
- use the distance on a sphere instead of the eta-phi one This
is the most important change and comes with
modifications... well... ... everywhere. Most of the infos
about the distance are in the momentum.{h,cpp} files. There
are other important pieces when computing the candidate
centres (in vicinity.cpp). And the theta_phi range (previously
eta_phi!) in geom2d.cpp has also been relooked.
- The spit--merge(SM) uses the energy instead of pttilde by
default for the ordering
- The final jets ae ordered in E instead of pt.
- we don't remove particles with infinite rapidity (both in SC
search and SM)
- for the cone consistency tests, we use |px|+|py|+|pz| instead
of |px|+|py|
- we have removed the cut on soft particles in
Csplit_merge::merge_collinear_and_remove_soft() since it was
mainly used for area speed up.
- Csplit_merge::use_pt_weighted_splitting is replaced by
Csplit_merge::use_E_weighted_splitting when it is defined, the
weight is of course 1/E^2 instead of 1/pt^2
- To emphasise the fact that this is not the main SISCone trunk,
we've added one sentence in the header of every file and a
WARNING in the SISCone banner.
* Still to be done
- implement co-circularity (currently the range is set to 0)
- in the split--merge, check the precision of the collinearity
test?
* Other points to think about
- for the split of 2 protojets, we're currently making many
calls to a full distance computation. This can surely be
improved when no weighting is asked...
- completely remove the quadtree?
- remove the area support?
- remove the Ctheta_phi range?
or improve it (the cell initialisation assume a square shape,
not a circle, but already with a square, the geometry is
rather involved)
* Final word: still need a whole bunch of tests (noticeably IRC
safety, speed). Note that the stable-cone search has been
checked "graphically".
2008-05-20 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/hash.cpp (siscone):
Adapted the size of the hash to scale like Nn(=N^2R^2) instead
of N^2. This allows to save a fair amount of memory.
2008-05-16 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* siscone/defines.h
siscone/hash.{h,cpp} (siscone)
siscone/protocones.{h,cpp} (siscone):
siscone/siscone.{h,cpp} (siscone):
add some debug information about the occupancy of the hash
when DEBUG_STABLE_CONES is defined
* examples/test.cpp: update the code to use Csiscone directly
instead of separate calls to stable cone search and split--merge
stage. This should be less confusing for end-users.
2008-05-15 Gregory Soyez <gsoyez@quark.phy.bnl.gov>
* configure.ac:
in the last CXXFLAGS fix, the default has been set at a wrong
place (practically, CXXFLAGS was set to the system default value
-O2 -g and thus not replaced with our local default).
This is fixed now.
2008-03-24 Gregory Soyez <g.soyez@ulg.ac.be>
* configure.ac:
fix CXXFLAGS in such a way as to allow the user to set their own
default.
2008-03-17 Gregory Soyez <g.soyez@ulg.ac.be>
* siscone/defines.h:
siscone/siscone.h/cpp
examples/option.cpp
BUGS:
Because of potentil conflicts with other packages, the
tags defined in config.h are no longer included in
defines.h but only in SISCone source files.
As a practical consequence, the program name and version
number are now accessed through siscone_package_name() and
siscone_version() both defined in siscone.h and inside
the siscone namespace. See examples/options.cpp for
an example.
This solves the corresponding bug reported by Seuster.
2008-03-15 Gavin Salam <salam@lpthe.jussieu.fr>
* BUGS:
added entry related to PACKAGE/VERSION/etc reported by Seuster.
2008-03-12 Gregory Soyez <g.soyez@ulg.ac.be>
* siscone/split_merge.h/cpp (siscone):
This is a non-negligible modification: we have added the
possibility to modify the way particles are split during the
split-merge step.
Assume one has to split protojets 1 and 2. The standard split
associates a common particle j to the closest centre
i.e. compares the distances D_{1j} vs. D_{2j}.
Now, by calling Csplit_merge::set_pt_weighted_splitting(true),
it is possible to perform the splitting according to the anti-kt
distance i.e. comparing D_{1j}/k_{t1} vs. D_{2j}/k_{t2}.
This new option should allow to produce more
rigid (soft-resilient) jets.
Note that the default is to use the standard distance comparison
so backward compatibility is not broken.
2008-03-11 Gregory Soyez <g.soyez@ulg.ac.be>
* siscone/area.cpp (siscone):
the jet+area finding now really returns the number of jets
as does the standard clustering
* siscone/area.cpp (siscone):
don't include ghosts in stable-cone search when only the
passive area is requested.
This is a huge speed improvement as the execution time (when
only passive area is requested) is now (with Ntot = N+Nghosts)
O(N^2 log(N) + Ntot^2)
instead of
O(Ntot^2 log(Ntot) + Ntot^2)
* configure.ac:
switched the main trunk to SISCone-1.4.0-devel
2008-03-07 Gavin SALAM <salam@lpthe.jussieu.fr>
* configure.ac:
switched version to 1.3.1
2008-01-17 Gavin Salam <salam@lpthe.jussieu.fr>
* configure.ac:
switched version number over to 1.3.1-devel
2008-01-15 Gregory Soyez <g.soyez@ulg.ac.be>
* siscone/geom_2d.h (M_PI):
added definition of M_PI if needed (VC compilation)
* siscone/protocones.cpp (siscone):
added the algorithm header (VC compilation)
2007-11-12 Gregory Soyez <g.soyez@ulg.ac.be>
* NEWS & configure.ac:
SISCone 1.3.0
2007-11-10 Gavin Salam <salam@lpthe.jussieu.fr>
* configure.ac:
* examples/Makefile.am:
* examples/events/Makefile.am:
made sure some sample events were included in the dist
2007-11-07 Gavin SALAM <salam@lpthe.jussieu.fr>
* configure.ac:
switched +="" to A=A"" to eliminate an error on mac
2007-10-24 Gregory Soyez <g.soyez@ulg.ac.be>
* examples/options.cpp: fix a missing "siscone/" in header include
* examples/Makefile.am: fix a problem with make distcheck
* configure.ac: the --enable-shared cmd-line option is already
handled by libtool. We just need to add AM_DISABLE_SHARED to
disable the shared lib by default (can still be changed by using
--enable-shared)
Also, we set the minimal version of autoconf to 2.57.
* examples/Makefile.am: do not install anything (just build
examples locally)
* examples/main.cpp (main): print a more specific error message
when the event file cannot be opened
2007-10-03 Gregory Soyez <g.soyez@ulg.ac.be>
* siscone/defines.h: read available information from config.h
* In examples, include headers from the 'siscone' folder
* Move the src folder into a new 'siscone' folder
2007-10-02 Gregory Soyez <g.soyez@ulg.ac.be>
* add configure script for the build process. This comes with a
bunch of new files: autogen.sh, configure.ac, and a Makefile.am
in each directory. See the INSTALL files for more details
* replace each Makefile by makefile.static
Makefile-based build is now made through
make -f makefile.static
* examples/area.cpp: add a sample program for SISCone jet area
computation
2007-06-24 Gregory Soyez <g.soyez@ulg.ac.be>
* src/defines.h: SISCone 1.2.0
2007-06-15 Gregory Soyez <g.soyez@ulg.ac.be>
* src/geom_2d.h/cpp: use a 32x32 eta-phi-plane tiling. The range
is then defined by two binary fields. This allows easy overlap
test and merging. For protojets splitting, the new ranges are
built by adding particles one-by-one.
* src/split_merge.cpp (siscone):
- align code with the modifications in geom_2d.h/cpp
- the output of save_contents has slightly been improved
* src/area.h/cpp: add methods to compute only the active or passive
area
* examples/main.cpp: add pass-by-pass statistics in the verbose
output
* examples/options.cpp: fix bug when passing an unknown long
option to getopt_long
2007-06-02 Gregory Soyez <g.soyez@ulg.ac.be>
* examples/sample.cpp: add a few lines to show how one can browse
the output jets of compute_jets.
* examples/times.cpp: only save runtime using the siscone class
instead of a separate determination.
2007-05-09 Gavin Salam <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
soft_pt2_cutoff -> stable_cone_soft_pt2_cutoff
fixed infinite loop for non-zero stable_cone_soft_pt2_cutoff
2007-05-09 Gregory Soyez <g.soyez@ulg.ac.be>
* src/split_merge.cpp|h:
When building the list of particles to be passed to stable-cone
search, allow to remove particles below a pt2 threshold
soft_pt2_cutoff.
2007-04-27 Gavin SALAM <salam@lpthe.jussieu.fr>
* src/geom_2d.cpp:
corrected bugs in range_union -- now passes test that 1000
events are identical to what we had previously.
2007-04-26 Gregory Soyez <g.soyez@ulg.ac.be>
* src/split_merge.cpp (siscone): add range support to the
split--merge. When computing overlap, we first check that the
two ranges overlap. In splitting, ranges are set to the parent
ranges. In merging, range is set as the union of the parent
ranges.
* src/split_merge.h: add a range variable to the Cjet class
* src/geom_2d.cpp/h (siscone): add the Ceta_phi_range to handle
covering ranges in the ete-phi plane. This goes with a function
to test overlap and another to compute union.
* src/momentum.h: Move geometry tools into geom_2d.h (new file)
2007-04-24 Gavin SALAM <salam@lpthe.jussieu.fr> + Matteo
* src/defines.h (VERSION):
updated version number to 1.1.2-devel
* src/split_merge.cpp (include):
moved test on SM_var2_hardest_cut_off to beginning of loop, to
ensure that we don't get a first jet that's below the cutoff.
2007-04-20 Gregory Soyez <g.soyez@ulg.ac.be>
* src/split_merge.h: remove the "protected" attribute for
'SM_var2_hardest_cut_off' for easier inclusion in fastjet. Note
however that the 'protected' declaration in the previous version
was used to prevent from dangerous usage of the variable. This
is still applicable now!
2007-04-18 Gregory Soyez <g.soyez@ulg.ac.be>
* src/area.cpp: Add a parameter '_hard_only' which allow to
compute only the hard jets area (without the purely ghosted
ones.
* src/split_merge.h/cpp: Add a cut-off on the SM_var of the
hardest protojet. This is useful for computation of the area of
the hard jets without computing the purel ghosted ones. Note
that this cut-off is colinear-unsafe so has to be used with
great care.
2007-04-13 Gregory Soyez <g.soyez@ulg.ac.be>
* src/area.cpp: add Carea, the class to compute jet area
2007-03-16 Gregory Soyez <g.soyez@ulg.ac.be>
* SISCone 1.1.1 (tags/siscone-1.1.1)
2007-03-15 Gregory Soyez <g.soyez@ulg.ac.be>
* doc/html/usage.html: update the html doc for the recent
modifications of the split-merge algorithm.
* src/split_merge.cpp: improve the recomputation method when two
jets are very close in the ordering when SM var is set to SM_Et
2007-03-15 Gavin SALAM <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
modified fix to multiple-pass bug, in hope of being minimally
sensitive to rounding errors
2007-03-15 Gregory Soyez <g.soyez@ulg.ac.be>
* src/siscone.h: set the default number of passes to 0
* examples/main.cpp: adding two command line parameters to the
siscone application:
- npass controls the number of passes (0 by default)
- sm controls the choice for the split--merge variable
2007-03-14 Gregory Soyez <g.soyez@ulg.ac.be>
* src/momentum.h: add Et (inline) member function
* src/siscone.h: remove backward-compatibility computation members to
make things more clear.
* src/split_merge.cpp:
- fix multiple-pass bug
- add Et SM variable management
2007-03-14 Gavin Salam <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
put an assert for zero-size jets (common sign of a bug...);
ensured that "recomputed" protocones (with full momentum) also
have their eta-phi recalculated.
2007-03-12 Gavin SALAM <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
added some more debugging output.
2007-03-10 Gavin Salam <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
fixed some typos and a bug in the EPSILON_SPLITMERGE case for
pt-tilde.
2007-03-09 Gregory Soyez <g.soyez@ulg.ac.be>
* src/siscone.h: The default value for the SM variable is set to
pttilde
* src/split_merge.h/cpp: Update the split--merge procedure so that
it takes into account the choice for the split--merge
variable. Among the four choices, (pt_tilde, mt, pt and Et),
pt_tilde is the default (mt and pt can lead to IR unsafety). Et
is not yet implemented. We strongly advise to keep default value.
2007-03-09 Gavin Salam <salam@lpthe.jussieu.fr>
* src/siscone.h|cpp:
* src/split_merge.h|cpp:
introduced an enum, Esplit_merge_scale (naming convention in
analogy with the leading "C" for classes), which contains values
SM_pt, SM_Et, SM_mt, SM_pttilde, and put in routines that take
the enum (as well as leaving in old ones)
2007-03-06 Gavin SALAM <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
added transverse mass to info printed out about protojets with
the debug mode on (helpful in investigating limiting IR cases)
2007-03-02 Gregory Soyez <g.soyez@ulg.ac.be>
* SISCone 1.1.0 (tags/siscone-1.1.0)
2007-03-02 Gavin Salam <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
transformed a quiet error on illegal f values into a throw.
* src/siscone.cpp:
throw an error on illegal R values.
2007-03-01 Gavin Salam <salam@lpthe.jussieu.fr>
* src/split_merge.cpp|h:
added a new member variable, most_ambiguous_split, which records
the degree of ambiguity of the most ambiguous decision about
attributing a particle to one or other jet during a split step.
Useful for testing purposes.
2007-03-01 Gregory Soyez <g.soyez@ulg.ac.be>
* src/split_merge.cpp: set the full momentum
information on stable cones when we add them
to the protojet list
* src/siscone.h,cpp: add comments concerning the
split_merge_on_transverse_mass parameter
* src/defines.h (VERSION): set to 1.1.0beta
* src/split_merge.cpp (siscone):
- set ptmin as a real pt cut-off (independent on the
choice of variable for the SM)
- code cleaned (involves other files e.g. defines.h
momentum.h/cpp, siscone.h/cpp)
* set the website to the HEPForge one in headers
* replaced 'content' by 'contents' everywhere
WARNING: it implies Cjet::contents and
Csplit_merge::save_contents
* src/quadtree.cpp (siscone): replace 'childs' with 'children'
2007-02-21 Gregory Soyez <g.soyez@ulg.ac.be>
* src/protocones.cpp (siscone):
- remove all functions that are no longer necessary and replace
them by their new version. This includes the computatin of the
cone content, its re-computation, the check for co-circularity
and the test for stable cones in the co-circular situations.
- add a few comments of potentially tricky points.
- remove "cout" statements.
- remove 'largest_cocircular_range' which is no longer used
* src/vicinity.h:
- "largest_cocircular_range" removed.
- quadtree related stuff removed. As a consequence,
'build_from_list' is renamed 'build'. The usage of the
quadtree can now only be used in
'Cstable_cone::proceed_with_stability' hence, the USE_QUADTREE
define has been renamed USE_QUADTREE_FOR_STABILITY_TEST.
- Comments aligned to make the code clearer.
* src/momentum.h: Add mass() and mass2() member functions to
Cmomentum().
Put inline functions in the header rather than in the source
file.
* add C++ mark ("// -*- C++ -*-") in the headers where it was
missing
2007-02-20 Gavin Salam <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
enhanced check on infinite rapidities to include also
meaningless rapidities.
* src/split_merge.cpp|h:
* src/siscone.cpp:
sorted out an issue on multi-pass runs caused by earlier fix for
transverse mass ordering.
2007-02-20 [am-pm] Gavin Salam <salam@lpthe.jussieu.fr>
* src/split_merge.cpp:
fixed a bug that appeared once split_merge_on_transverse_mass
got moved into the Csplit_merge_ptcomparison class
* src/protocones.cpp|h:
introduced compute_cone_contents_nodist(), which calculates the
initial cone contents by circulating around all in/out
operations and collecting the net result --- this avoids any
distance calculations and so removes a potential source of
rounding error. (Any remaining rounding error is dealt with by
cocircularity tests).
* src/defines.h
added more info about the meaning of the different EPSILON
scales.
2007-02-19 [evening] Gavin Salam <salam@lpthe.jussieu.fr>
* src/defines.h:
introduced const bool split_merge_on_transverse_mass, which
determines whether the split merge occurs on transverse mass
instead of pt -- the latter turns out to be IR unsafe in
mom-conserving events for moderately large values of R (R>1)
* src/split_merge.cpp:
implemented the split-merge ordering on transverse masses,
including the limit of there being small differences.
* src/momentum.h:
introduced perpmass2() which returns the transverse mass,
pt^2+m^2
2007-02-19 [pm] Gavin Salam <salam@lpthe.jussieu.fr>
NB: seg-faults are being seen sporadically when fastjet writes its
description & need to be understood (but very rare and valgrind
gives nothing on small numbers of events...)
* src/defines.h:
added optional #define EPSILON_SPLITMERGE, which if defined,
sets a threshold for pt differences below which the ordering is
determined from the explicit particle content...
* src/split_merge.cpp|h:
trying to introduce more "exact" pt comparison in split merge to
deal with multiple scales -- this involves a new
Csplit_merge_ptcomparison class which allows the set to carry
out comparisons while making use of knowledge about the particle
momenta inside the split_merge class.
* src/circulator.h:
added != and == comparison operators.
* src/protocones.h|cpp:
added Cstable_cones::test_cone_cocircular_p3() for carrying out
a p^3 check of stability -- NB seems a bit slower for small p,
but obviously much better for large p... Tests of 2*10^5
particles show no errors, longer tests to be done later...
2007-02-19 [am, early pm] Gavin Salam <salam@lpthe.jussieu.fr>
* src/vicinity.h|cpp:
introduced the Cvicinity_inclusion class to allow one to carry
out checks both on the inclusion in the cone and in its
"cocircular" border. Made corresponding changes elsewhere.
* src/protocones.h|cpp:
wrote new_cocircular_check() and ran a certain number of tests
on it; currently it is this one that is being called from
update_cone(), but it still uses the original 2^p routine for
actually checking the cone status.
* src/[elsewhere]
added a lot of (now commented) debugging statements to help fix
bugs in the new_cocircular_check().
2007-02-18 [pm - later] Gavin Salam <salam@lpthe.jussieu.fr>
* src/circulator.h: *** ADDED ***
class for a circulator, used below.
* src/protocones.(h|cpp):
wrote prepare_cocircular_lists(), and checked that it's working
sensibly on some simple test events; also added code for
esetablishing the largest cocircular range among the children of
the current parent (should be used later to establish a more
reliable in/out status).
NB: the call to this function has added another 1-2% slowdown,
and we're now about 3-4% slower than before starting this
morning. But this should be the last of the changes that adds
significant extra time use?
* src/vicinity.(h|cpp):
support code for the protocones modification
2007-02-18 [pm] Gavin Salam <salam@lpthe.jussieu.fr>
* src/defines.h:
changed default EPSILON values to reflect what will be needed
with the new approach.
* src/vicinity.cpp:
carried out the calculation of cocircular_range inside the
append_to_vicinity member function; the extra
calculations/storage etc lead to a 2-3% slow-down for the
standard fastjet (354 particle) test event with R=1.
* src/momentum.h:
added a small 2-vector class, needed as a shorthand in
vicinity.cpp, plus various small utility routines.
* src/vicinity.h:
introduced cocircular_range and cocircular (list) as members of
Cvicinity_elm
* src/momentum.h:
introduced phi_in_range, dphi and abs_dphi inline functions.
2007-02-18 [am] Gavin Salam <salam@lpthe.jussieu.fr>
* src/vicinity.cpp (include):
switched to twopi from defines.h instead of the pi2 class member
* src/siscone_error.(cpp|h): *** ADDED ***
this is a simple class for throwing errors.
* src/protocones.cpp:
caused test_cone cocircular to throw errors when it receives
more than 32 points
carried out replacement client -> candidate
* src/defines.h:
introduced definition of twopi, which is used in many place (only
some usage instances have been replaced for now).
2007-02-16 Gregory Soyez <g.soyez@ulg.ac.be>
* src/defines.h: consider the limit on cocircularity and
collinearity as different ones. This introduces the
EPSILON_COCIRCULAR definition.
* src/protocones.cpp (siscone):
1. the list of cocircular situations already encountered is
maintained with a pair of references (the cone contents and
its border) instead of its coordinates.
2. we have improved the recomputation of the cone contents by
dynamically tracking he particles inside of the cone. This
adds a list of included particles in Cvicinity as well as a
pointer to elements of that list in vicinity elements.
2007-02-15 Gregory Soyez <g.soyez@ulg.ac.be>
* src/protocones.cpp: Code has been restructured to clearly
separate the cocircular case
* dealt woth cocircularity and 2\pi periodicity and added
an inline fction
2007-02-14 Gregory Soyez <g.soyez@ulg.ac.be>
* src/reference.cpp (siscone): ensures that the reference is not
zero
* src/protocones.cpp (siscone): Fix a bug with the interference
between the recomputation of jets and the update of cocircular
points
* src/protocones.cpp (siscone): add tests for recomputation of the
cone content for the case of cocircular points
* src/protocones.cpp (siscone): when testing the threshold for
recomputation of te cone content, we add a test putting
automatically the cone to 0 when it is empty.
2007-02-13 Gregory Soyez <g.soyez@ulg.ac.be>
* We add a test of cocircularity: when more the p>2 particles are
found on the same circle, we branch to a different test of cone
stability. This new part of the algorithm tests all possible
inclusions/exclusions of the particles along the circle in a
2^p-type algorithm. Note that findling large values of p is
highly improbable !
2007-02-12 Gregory Soyez <g.soyez@ulg.ac.be>
* when traversing the centre list (in stable cones search), we
start with the centre which is the most separated from its
neighbours. This allows to minimize the possibility that we
miscomputed the computation of the initial cone content due to
possible rounding errors when two centres are too close.
2007-02-12 Gregory Soyez <g.soyez@ulg.ac.be>
* in collinear merging, take care of the periodicity in phi
* put the threshold for collinear merging in defines.h
(EPSILON_COLLINEAR)
2007-02-12 Gregory Soyez <g.soyez@ulg.ac.be>
* undo the previous modification and use another approach to deal
with collinear particles: we keep the p_remain list as it was
before (see revision 84). Instead, after computing p_remain, we
compute p_uncol which is obtained from p_remain by merging
collinear particles. In the siscone main loop, we then use
p_uncol instead of p_remain for the search for stable
cones. Note that with this modification, the 'parent_index'
field of Cmomentum is back to its original definition as a
'int'.
2007-02-12 Gregory Soyez <g.soyez@ulg.ac.be>
* remove initialisation of parent_index in momentum.cpp and
vicinity.cpp This is allowed because of the Npass loop in
siscone. Indeed, parent_index is only used internally in
split_merge and init at the very beginning of the loop by a call
to init_pleft
* replaced "int parent_index" by "vector<int> parent_index" and
align the code in split_merge.cpp
* add a few lines off code in split_merge.cpp to account for
collinear particles.
* Note concerning the previous update: the change has been
validated and is no longer considered as temporary
2007-02-12 Gregory Soyez <g.soyez@ulg.ac.be>
* Changed the test for recomputation of cone content in Cstable_cones
see defines.h for details
(this change may be temporary)
2007-02-10 Gregory Soyez <g.soyez@ulg.ac.be>
* fixed doxygen documentation issues:
- undocumented or renamed parameters
- include various links into a custom html footer
2007-01-25 Gregory Soyez <g.soyez@ulg.ac.be>
* fixed memory leak for Cvicinity::ve_list
in Cvicinity::set_particle_list()
2007-01-23 Gavin SALAM <salam@lpthe.jussieu.fr>
* added _ptmin argument to Csiscone::recompute_jets(...)
2007-01-22 Gregory Soyez <g.soyez@ulg.ac.be>
* add ptmin threshold on protojets during split-merge
* modify example program to allow for the --ptmin option
2007-01-20 Gregory Soyez <g.soyez@ulg.ac.be>
* fix typo mistake in split_merge.cpp
2007-01-18 Gregory Soyez <g.soyez@ulg.ac.be>
* insert a header on top of each source files to give brief information
about its content, the SISCone project and copyright
2007-01-03 Gregory Soyez <g.soyez@ulg.ac.be>
* remove the usage of the quadtree in stable cones detection.
Usage of the quadtree in vicinity list creation and final stability
tests can be switched on buy defining USE_QUADTREE in defines.h.
This step was not fully achieved in the last update.
2006-12-28 Gregory Soyez <g.soyez@ulg.ac.be>
* remove the usage of the quadtree in stable cones detection.
Usage of the quadtree in vicinity list creation and final stability
tests can be switched on by defining USE_QUADTREE in defines.h
2006-12-28 Gavin Salam <salam@lpthe.jussieu.fr>
* commented out various "template std::vector<...>" lines to solve
compilation problem on Macs.
* modified the make depend targets so that they do not include
"standard" include files (which differ from one system to
another).
* fixed log(_Np) bug pointed out by Matteo; fixed program name in
defines.h
2006-12-28 Gregory Soyez <g.soyez@ulg.ac.be>
* replace variables with name being "underscore" followed by
a single letter by longer names since they lead to compilation
problems under Mac. In practice, we renamed _N with _Np in hash.cpp/h
and _R by _radius in protocones.cpp/h and siscone.cpp/h
2006-12-27 Gregory Soyez <g.soyez@ulg.ac.be>
* arranged for "make dist" to create a file with the same version
name in the directory and the tar file; made the tar-file
read-only (to avoid involuntarily overwrite); removed svn file
from the examples/events subdirectory.
2006-12-26 Gregory Soyez <g.soyez@ulg.ac.be>
* updated the 'dist' target in the Makefile: include mem_check
with the correct path and build archive so that it unpacks into
a siscone-1.0-beta directory
* fix typos in INSTALL
2006-12-26 Gavin Salam <salam@lpthe.jussieu.fr>
* Changed banner so that first char is # (to allow the rest of the
line to be considered a comment by things like gnuplot).
* moved scones -> siscone (and sorted out various "ignores")
* Reordered changelog so that later stuff appears first (I think
this is standard? Makes it easier to see what's been happening
recently...)
* Tidying up: moved jets.gri and mem_check into the examples
directory; added -f to "rm" command in make clean to avoid
errors; modified siscones->siscone in a couple of places in
doc.
* Brought the README and INSTALL files up to date
* set some svn:ignore property so as to ignore .dat files (to
reduce "noise" with svn status).
* added #!/bin/bash to head of examples/mem_check
2006-12-22 Gregory Soyez <g.soyez@ulg.ac.be>
* rename scones namespace into siscone
* put ranlux stuff into the namespace (we don't want to
pollute the gobal namespace
* add doc/devel as directory for developer's documentation
(using Doxygen)
* scones.h/cpp is renamed siscone.h/cpp
* creation of an 'examples' directory for various programs
only the library libsiscone.a is left in the src dir
Malefiles are modified accordingly
2006-12-21 Gavin Salam <salam@lpthe.jussieu.fr>
* added the MERGE_IDENTICAL_PROTOCONES_DEFAULT_TRUE define to
allow one to make MERGE_IDENTICAL_PROTOCONES to be set true by
default if need be. (This makes it a bit easier to make a quick
modification to run a test).
* changed some of the related comments
* replaced occurrences of "extensive" with "multipass"
* Added the ChangeLog file!
2006-12-21 START OF CHANGELOG
Index: tags/siscone-3.0.2/config.h.in
===================================================================
--- tags/siscone-3.0.2/config.h.in (revision 399)
+++ tags/siscone-3.0.2/config.h.in (revision 400)
@@ -1,65 +1,67 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* use unique_ptr instead of auto_ptr */
+#undef USES_UNIQUE_PTR_AS_AUTO_PTR
+
/* Version number of package */
#undef VERSION
Index: tags/siscone-3.0.2/siscone/siscone.cpp
===================================================================
--- tags/siscone-3.0.2/siscone/siscone.cpp (revision 399)
+++ tags/siscone-3.0.2/siscone/siscone.cpp (revision 400)
@@ -1,301 +1,295 @@
///////////////////////////////////////////////////////////////////////////////
// File: siscone.cpp //
// Description: source file for the main SISCone class //
// This file is part of the SISCone project. //
// For more details, see http://projects.hepforge.org/siscone //
// //
// Copyright (c) 2006 Gavin Salam and Gregory Soyez //
// //
// This program 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. //
// //
// This program 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 program; if not, write to the Free Software //
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
// //
// $Revision:: $//
// $Date:: $//
///////////////////////////////////////////////////////////////////////////////
-//#ifdef HAVE_CONFIG_H
#include "config.h"
-//#else
-//#define PACKAGE_NAME "SISCone"
-//#define VERSION "3.0.2"
-//#warning "No config.h file available, using preset values"
-//#endif
#include "ranlux.h"
#include "momentum.h"
#include "defines.h"
#include "siscone.h"
#include "siscone_error.h"
#include <iostream>
#include <sstream>
#include <iomanip>
namespace siscone{
using namespace std;
/***************************************************************
* Csiscone implementation *
* final class: gather everything to compute the jet contents. *
* *
* This is the class user should use. *
* It computes the jet contents of a list of particles *
* given a cone radius and a threshold for splitting/merging. *
***************************************************************/
// default ctor
//--------------
Csiscone::Csiscone(){
rerun_allowed = false;
}
// default dtor
//--------------
Csiscone::~Csiscone(){
rerun_allowed = false;
}
bool Csiscone::init_done=false;
std::ostream* Csiscone::_banner_ostr = &cout;
/*
* compute the jets from a given particle set doing multiple passes
* such pass N looks for jets among all particles not put into jets
* during previous passes.
* - _particles list of particles
* - _radius cone radius
* - _f shared energy threshold for splitting&merging
* - _n_pass_max maximum number of runs
* - _ptmin minimum pT of the protojets
* - _split_merge_scale the scale choice for the split-merge procedure
* NOTE: using pt leads to IR unsafety for some events with momentum
* conservation. So we strongly advise not to change the default
* value.
* return the number of jets found.
**********************************************************************/
int Csiscone::compute_jets(vector<Cmomentum> &_particles, double _radius, double _f,
int _n_pass_max, double _ptmin,
Esplit_merge_scale _split_merge_scale){
_initialise_if_needed();
// run some general safety tests (NB: f will be checked in split-merge)
if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
ostringstream message;
message << "Illegal value for cone radius, R = " << _radius
<< " (legal values are 0<R<pi/2)";
throw Csiscone_error(message.str());
}
ptcomparison.split_merge_scale = _split_merge_scale;
partial_clear(); // make sure some things are initialised properly
// init the split_merge algorithm with the initial list of particles
// this initialises particle list p_left of remaining particles to deal with
init_particles(_particles);
bool finished = false;
rerun_allowed = false;
protocones_list.clear();
#ifdef DEBUG_STABLE_CONES
nb_hash_cones_total = 0;
nb_hash_occupied_total = 0;
#endif
do{
// initialise stable_cone finder
// here we use the list of remaining particles
// AFTER COLLINEAR CLUSTERING !!!!!!
Cstable_cones::init(p_uncol_hard);
// get stable cones
if (get_stable_cones(_radius)){
// we have some new protocones; add them to candidates
// Note that add_protocones has to be called first
// if we want the 4-vect components to be available
// on top of eta and phi.
add_protocones(&protocones, R2, _ptmin);
protocones_list.push_back(protocones);
#ifdef DEBUG_STABLE_CONES
nb_hash_cones_total += nb_hash_cones;
nb_hash_occupied_total += nb_hash_occupied;
#endif
} else {
// no new protocone: leave
finished=true;
}
_n_pass_max--;
} while ((!finished) && (n_left>0) && (_n_pass_max!=0));
rerun_allowed = true;
// split & merge
return perform(_f, _ptmin);
}
/*
* compute the jets from a given particle set doing multiple passes
* such pass N looks for jets among all particles not put into jets
* during previous passes.
* - _particles list of particles
* - _radius cone radius
* - _n_pass_max maximum number of runs
* - _ptmin minimum pT of the protojets
* - _ordering_scale the ordering scale to decide which stable
* cone is removed
* return the number of jets found.
**********************************************************************/
int Csiscone::compute_jets_progressive_removal(vector<Cmomentum> &_particles, double _radius,
int _n_pass_max, double _ptmin,
Esplit_merge_scale _ordering_scale){
_initialise_if_needed();
// run some general safety tests (NB: f will be checked in split-merge)
if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
ostringstream message;
message << "Illegal value for cone radius, R = " << _radius
<< " (legal values are 0<R<pi/2)";
throw Csiscone_error(message.str());
}
ptcomparison.split_merge_scale = _ordering_scale;
partial_clear(); // make sure some things are initialised properly
// init the split_merge algorithm with the initial list of particles
// this initialises particle list p_left of remaining particles to deal with
//
// this stores the "processed" particles in p_uncol_hard
init_particles(_particles);
jets.clear();
bool unclustered_left;
rerun_allowed = false;
protocones_list.clear();
do{
//cout << n_left << " particle left" << endl;
// initialise stable_cone finder
// here we use the list of remaining particles
// AFTER COLLINEAR CLUSTERING !!!!!!
Cstable_cones::init(p_uncol_hard);
// get stable cones (stored in 'protocones')
unclustered_left = get_stable_cones(_radius);
// add the hardest stable cone to the list of jets
if (add_hardest_protocone_to_jets(&protocones, R2, _ptmin)) break;
_n_pass_max--;
} while ((unclustered_left) && (n_left>0) && (_n_pass_max!=0));
// split & merge
return jets.size();
}
/*
* recompute the jets with a different overlap parameter.
* we use the same particles and R as in the preceeding call.
* - _f shared energy threshold for splitting&merging
* - _ptmin minimum pT of the protojets
* - _split_merge_scale the scale choice for the split-merge procedure
* NOTE: using pt leads to IR unsafety for some events with momentum
* conservation. So we strongly advise not to change the default
* value.
* return the number of jets found, -1 if recomputation not allowed.
********************************************************************/
int Csiscone::recompute_jets(double _f, double _ptmin,
Esplit_merge_scale _split_merge_scale){
if (!rerun_allowed)
return -1;
ptcomparison.split_merge_scale = _split_merge_scale;
// restore particle list
partial_clear();
init_pleft();
// initialise split/merge algorithm
unsigned int i;
for (i=0;i<protocones_list.size();i++)
add_protocones(&(protocones_list[i]), R2, _ptmin);
// split & merge
return perform(_f, _ptmin);
}
// ensure things are initialised
void Csiscone::_initialise_if_needed(){
// initialise random number generator
if (init_done) return;
// initialise random number generator
ranlux_init();
// do not do this again
init_done=true;
// print the banner
if (_banner_ostr != 0){
ios::fmtflags flags_to_restore(_banner_ostr->flags());
(*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
(*_banner_ostr) << "# SISCone version " << setw(28) << left << siscone_version() << "o" << endl;
(*_banner_ostr) << "# http://projects.hepforge.org/siscone o" << endl;
(*_banner_ostr) << "# o" << endl;
(*_banner_ostr) << "# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm o" << endl;
(*_banner_ostr) << "# SISCone was written by Gavin Salam and Gregory Soyez o" << endl;
(*_banner_ostr) << "# It is released under the terms of the GNU General Public License o" << endl;
(*_banner_ostr) << "# o" << endl;
(*_banner_ostr) << "# A description of the algorithm is available in the publication o" << endl;
(*_banner_ostr) << "# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o" << endl;
(*_banner_ostr) << "# Please cite it if you use SISCone. o" << endl;
(*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
(*_banner_ostr) << endl;
_banner_ostr->flush();
_banner_ostr->flags(flags_to_restore);
}
}
// finally, a bunch of functions to access to
// basic information (package name, version)
//---------------------------------------------
/*
* return SISCone package name.
* This is nothing but "SISCone", it is a replacement to the
- * PACKAGE_NAME string defined in config.h and which is not
- * public by default.
+ * SISCONE_PACKAGE_NAME string defined in config.h and which is not
+ * guaranteed to be public.
* return the SISCone name as a string
*/
string siscone_package_name(){
- return PACKAGE_NAME;
+ return SISCONE_PACKAGE_NAME;
}
/*
* return SISCone version number.
* return a string of the form "X.Y.Z" with possible additional tag
* (alpha, beta, devel) to mention stability status
*/
string siscone_version(){
- return VERSION;
+ return SISCONE_VERSION;
}
}
Index: tags/siscone-3.0.2/siscone/siscone.h
===================================================================
--- tags/siscone-3.0.2/siscone/siscone.h (revision 399)
+++ tags/siscone-3.0.2/siscone/siscone.h (revision 400)
@@ -1,176 +1,176 @@
// -*- C++ -*-
///////////////////////////////////////////////////////////////////////////////
// File: siscone.h //
// Description: header file for the main SISCone class //
// This file is part of the SISCone project. //
// For more details, see http://projects.hepforge.org/siscone //
// //
// Copyright (c) 2006 Gavin Salam and Gregory Soyez //
// //
// This program 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. //
// //
// This program 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 program; if not, write to the Free Software //
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
// //
// $Revision:: $//
// $Date:: $//
///////////////////////////////////////////////////////////////////////////////
#ifndef __SISCONE_H__
#define __SISCONE_H__
#include "protocones.h"
#include "split_merge.h"
namespace siscone{
/**
* \class Csiscone
* final class: gather everything to compute the jet contents.
*
* This is the class user should use.
* It computes the jet contents of a list of particles
* given a cone radius and a threshold for splitting/merging.
*
* After the call to 'perform', the vector jets is filled with
* the jets found. the 'contents' field of each jets contains
* the indices of the particles included in that jet.
*/
class Csiscone : public Cstable_cones, public Csplit_merge{
public:
/// default ctor
Csiscone();
/// default dtor
~Csiscone();
/**
* compute the jets from a given particle set.
* We are doing multiple passes such pass n_pass looks for jets among
* all particles not put into jets during previous passes.
* By default the number of passes is infinite (0).
* \param _particles list of particles
* \param _radius cone radius
* \param _f shared energy threshold for splitting&merging
* \param _n_pass_max maximum number of passes (0=full search)
* \param _ptmin minimum pT of the protojets
* \param _split_merge_scale the scale choice for the split-merge procedure
* NOTE: SM_pt leads to IR unsafety for some events with momentum conservation.
* SM_Et is IR safe but not boost invariant and not implemented(!)
* SM_mt is IR safe for hadronic events, but not for decays of two
* back-to-back particles of identical mass
* SM_pttilde
* is always IR safe, and also boost invariant (default)
*
* \return the number of jets found.
*/
int compute_jets(std::vector<Cmomentum> &_particles, double _radius, double _f,
int _n_pass_max=0, double _ptmin=0.0,
Esplit_merge_scale _split_merge_scale=SM_pttilde);
/**
* compute the jets from a given particle set.
* We are doing multiple passes such pass n_pass looks for jets among
* all particles not put into jets during previous passes.
* By default the number of passes is infinite (0).
* \param _particles list of particles
* \param _radius cone radius
* \param _n_pass_max maximum number of passes (0=full search)
* \param _ptmin minimum pT of the protojets
* \param _ordering_scale the ordering scale to decide which stable
* cone is removed
*
* Note that the Csplit_merge::SM_var2_hardest_cut_off cut is not
* used in the progressive removal variant.
*
* \return the number of jets found.
*/
int compute_jets_progressive_removal(std::vector<Cmomentum> &_particles, double _radius,
int _n_pass_max=0, double _ptmin=0.0,
Esplit_merge_scale _ordering_scale=SM_pttilde);
/**
* recompute the jets with a different overlap parameter.
* we use the same particles and R as in the preceeding call.
* \param _f shared energy threshold for splitting&merging
* \param _ptmin minimum pT of the protojets
* \param _split_merge_scale the scale choice for the split-merge procedure
* split--merge variable
* NOTE: using pt leads to IR unsafety for some events with momentum
* conservation. So we strongly advise not to change the default
* value.
* \return the number of jets found, -1 if recomputation not allowed.
*/
int recompute_jets(double _f, double _ptmin = 0.0,
Esplit_merge_scale _split_merge_scale=SM_pttilde);
/// list of protocones found pass-by-pass (not filled by compute_jets_progressive_removal)
std::vector<std::vector<Cmomentum> > protocones_list;
// random number initialisation
static bool init_done; ///< check random generator initialisation
#ifdef DEBUG_STABLE_CONES
int nb_hash_cones_total, nb_hash_occupied_total;
#endif
/**
* A call to this function modifies the stream
* used to print banners (by default cout).
*
* Please note that if you distribute 3rd party code
* that links with SISCone, that 3rd party code must not
* use this call turn off the printing of thw banner
* by default. This requirement reflects the spirit of
* clause 2c of the GNU Public License (v2), under which
* SISCone is distributed.
*/
static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}
/**
* returns a pointer to the stream to be used to print banners
* (cout by default)
*/
static std::ostream * banner_stream() {return _banner_ostr;}
private:
bool rerun_allowed; ///< is recompute_jets allowed ?
static std::ostream * _banner_ostr; ///< stream to use for banners
/// ensure things are initialised
void _initialise_if_needed();
};
// finally, a bunch of functions to access to
// basic information (package name, version)
//---------------------------------------------
/**
* return SISCone package name.
* This is nothing but "SISCone", it is a replacement to the
- * PACKAGE_NAME string defined in config.h and which is not
- * public by default.
+ * SISCONE_PACKAGE_NAME string defined in config.h and which is not
+ * guaranteed to be public.
* \return the SISCone name as a string
*/
std::string siscone_package_name();
/**
* return SISCone version number.
* \return a string of the form "X.Y.Z" with possible additional tag
* (alpha, beta, devel) to mention stability status
*/
std::string siscone_version();
}
#endif
Index: tags/siscone-3.0.2/siscone/split_merge.h
===================================================================
--- tags/siscone-3.0.2/siscone/split_merge.h (revision 399)
+++ tags/siscone-3.0.2/siscone/split_merge.h (revision 400)
@@ -1,476 +1,477 @@
// -*- C++ -*-
///////////////////////////////////////////////////////////////////////////////
// File: split_merge.h //
// Description: header file for splitting/merging (contains the CJet class) //
// This file is part of the SISCone project. //
// For more details, see http://projects.hepforge.org/siscone //
// //
// Copyright (c) 2006 Gavin Salam and Gregory Soyez //
// //
// This program 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. //
// //
// This program 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 program; if not, write to the Free Software //
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
// //
// $Revision:: $//
// $Date:: $//
///////////////////////////////////////////////////////////////////////////////
#ifndef __SPLIT_MERGE_H__
#define __SPLIT_MERGE_H__
#include "defines.h"
#include "geom_2d.h"
#include "momentum.h"
#include <stdio.h>
#include <vector>
#include <set>
#include <memory>
#include <string>
+#include "config.h"
namespace siscone{
const int CJET_INEXISTENT_PASS = -2;
/**
* \class Cjet
* real Jet information.
*
* This class contains information for one single jet.
* That is, first, its momentum carrying information
* about its centre and pT, and second, its particle
* contents
*/
class Cjet{
public:
/// default ctor
Cjet();
/// default dtor
~Cjet();
Cmomentum v; ///< jet momentum
double pt_tilde; ///< p-scheme pt
int n; ///< number of particles inside
std::vector<int> contents; ///< particle contents (list of indices)
/// ordering variable used for ordering and overlap in the
/// split--merge. This variable is automatically set either to
/// pt_tilde, or to mt or to pt, depending on the siscone
/// parameter. Note that the default behaviour is pt_tilde and that
/// other chices may lead to infrared unsafe situations.
/// Note: we use the square of the varible rather than the variable itself
double sm_var2;
/// covered range in eta-phi
Ceta_phi_range range;
/// pass at which the jet has been found
/// It starts at 0 (first pass), -1 means infinite rapidity
/// (it will be initialised to "CJET_INEXISTENT_PASS" which should
/// never appear after clustering)
int pass;
};
/// ordering of jets in pt (e.g. used in final jets ordering)
bool jets_pt_less(const Cjet &j1, const Cjet &j2);
/// the choices of scale variable that can be used in the split-merge
/// step, both for ordering the protojets and for measuing their
/// overlap; pt, Et and mt=sqrt(pt^2+m^2) are all defined in E-scheme
/// (4-momentum) recombination; pttilde = \sum_{i\in jet} |p_{t,i}|
///
/// NB: if one changes the order here, one _MUST_ also change the order
/// in the SISCone plugin
enum Esplit_merge_scale {
SM_pt, ///< transverse momentum (E-scheme), IR unsafe
SM_Et, ///< transverse energy (E-scheme), not long. boost inv.
///< original run-II choice [may not be implemented]
SM_mt, ///< transverse mass (E-scheme), IR safe except
///< in decays of two identical narrow heavy particles
SM_pttilde ///< pt-scheme pt = \sum_{i in jet} |p_{ti}|, should
///< be IR safe in all cases
};
/// return the name of the split-merge scale choice
std::string split_merge_scale_name(Esplit_merge_scale sms);
/**
* \class Csplit_merge_ptcomparison
* comparison of jets for split--merge ordering
*
* a class that allows us to carry out comparisons of pt of jets, using
* information from exact particle contents where necessary.
*/
class Csplit_merge_ptcomparison{
public:
/// default ctor
Csplit_merge_ptcomparison() :
particles(0), split_merge_scale(SM_pttilde){};
/// return the name corresponding to the SM scale variable
std::string SM_scale_name() const {
return split_merge_scale_name(split_merge_scale);}
std::vector<Cmomentum> * particles; ///< pointer to the list of particles
std::vector<double> * pt; ///< pointer to the pt of the particles
/// comparison between 2 jets
bool operator()(const Cjet &jet1, const Cjet &jet2) const;
/**
* get the difference between 2 jets, calculated such that rounding
* errors will not affect the result even if the two jets have
* almost the same content (so that the difference is below the
* rounding errors)
*
* \param j1 first jet
* \param j2 second jet
* \param v jet1-jet2
* \param pt_tilde jet1-jet2 pt_tilde
*/
void get_difference(const Cjet &j1, const Cjet &j2, Cmomentum *v, double *pt_tilde) const;
/// the following parameter controls the variable we're using for
/// the split-merge process i.e. the variable we use for
/// 1. ordering jet candidates;
/// 2. computing the overlap fraction of two candidates.
/// The default value uses pttile (p-scheme pt). Other alternatives are
/// pt, mt=sqrt(pt^2+m^2)=sqrt(E^2-pz^2) or Et.
/// NOTE: Modifying the default choice can have nasty effects:
/// - using pt leads to some IR unsafety when we have two jets,
/// e.g. back-to-back, with the same pt. In that case, their ordering
/// in pt is random and can be affected by the addition of a
/// soft particle. Hence, we highly recommand to keep this to
/// the default value i.e. to use pt only for the purpose of
/// investigating the IR issue
/// - using Et is safe but does not respect boost invariance
/// - using mt solves the IR unsafety issues with the pt variable
/// for QCD jets but the IR unsafety remains for nack-to-back
/// jets of unstable narrow-width particles (e.g. Higgs).
/// Therefore, keeping the default value is strongly advised.
Esplit_merge_scale split_merge_scale;
};
// iterator types
/// iterator definition for the jet candidates structure
typedef std::multiset<siscone::Cjet,Csplit_merge_ptcomparison>::iterator cjet_iterator;
/// iterator definition for the jet structure
typedef std::vector<siscone::Cjet>::iterator jet_iterator;
/**
* \class Csplit_merge
* Class used to split and merge jets.
*/
class Csplit_merge{
public:
/// default ctor
Csplit_merge();
/// default dtor
~Csplit_merge();
//////////////////////////////
// initialisation functions //
//////////////////////////////
/**
* initialisation function
* \param _particles list of particles
* \param protocones list of protocones (initial jet candidates)
* \param R2 cone radius (squared)
* \param ptmin minimal pT allowed for jets
* \return 0 on success, 1 on error
*/
int init(std::vector<Cmomentum> &_particles, std::vector<Cmomentum> *protocones, double R2, double ptmin=0.0);
/**
* initialisation function for particle list
* \param _particles list of particles
* \return 0 on success, 1 on error
*/
int init_particles(std::vector<Cmomentum> &_particles);
/**
* build initial list of left particles
*/
int init_pleft();
/**
* use a pt-dependent boundary for splitting
* When called with true, the criterium for splitting two protojets
* will be to compare D1^2/kt1^2 vs. D2^2/kt2^2, the (anti-)kt-weighted
* distance instead of the plain distance D1^2 vs. D2^2.
* This can be set in order to produce more circular hard jets,
* with the same underlying philosophy as for the anti-kt algorithm.
* We thus expect a behaviour closer to the IterativeCone one.
* By default, we use the standard D1^2 vs. D2^2 comparison and this
* function is not called.
*/
inline int set_pt_weighted_splitting(bool _use_pt_weighted_splitting){
use_pt_weighted_splitting = _use_pt_weighted_splitting;
return 0;
}
////////////////////////
// cleaning functions //
////////////////////////
/// partial clearance
int partial_clear();
/// full clearance
int full_clear();
///////////////////////////////////////
// user-defined stable-cone ordering //
///////////////////////////////////////
/// \class Cuser_scale_base
/// base class for user-defined ordering of stable cones
///
/// derived classes have to implement the () operator that returns
/// the scale associated with a given jet.
class Cuser_scale_base{
public:
/// empty virtual dtor
virtual ~Cuser_scale_base(){}
/// the scale associated with a given jet
///
/// "progressive removal" iteratively removes the stable cone with
/// the largest scale
virtual double operator()(const Cjet & jet) const = 0;
/// returns true when the scale associated with jet a is larger than
/// the scale associated with jet b
///
/// By default this does a simple direct comparison but it can be
/// overloaded for higher precision [recommended if possible]
///
/// This function assumes that a.sm_var2 and b.sm_var2 have been
/// correctly initialised with the signed squared output of
/// operator(), as is by default the case when is_larger is called
/// from within siscone.
virtual bool is_larger(const Cjet & a, const Cjet & b) const{
return (a.sm_var2 > b.sm_var2);
}
};
/// associate a user-defined scale to order the stable cones
///
/// Note that this is only used in "progressive-removal mode",
/// e.g. in add_hardest_protocone_to_jets().
void set_user_scale(const Cuser_scale_base * user_scale_in){
_user_scale = user_scale_in;
}
/// return the user-defined scale (NULL if none)
const Cuser_scale_base * user_scale() const { return _user_scale; }
/////////////////////////////////
// main parts of the algorithm //
/////////////////////////////////
/**
* build the list 'p_uncol_hard' from p_remain by clustering
* collinear particles and removing particles softer than
* stable_cone_soft_pt2_cutoff
* note that thins in only used for stable-cone detection
* so the parent_index field is unnecessary
*/
int merge_collinear_and_remove_soft();
/**
* add a list of protocones
* \param protocones list of protocones (initial jet candidates)
* \param R2 cone radius (squared)
* \param ptmin minimal pT allowed for jets
* \return 0 on success, 1 on error
*/
int add_protocones(std::vector<Cmomentum> *protocones, double R2, double ptmin=0.0);
/**
* remove the hardest protocone and declare it a jet
* \param protocones list of protocones (initial jet candidates)
* \param R2 cone radius (squared)
* \param ptmin minimal pT allowed for jets
* \return 0 on success, 1 on error
*
* The list of remaining particles (and the uncollinear-hard ones)
* is updated.
*/
int add_hardest_protocone_to_jets(std::vector<Cmomentum> *protocones, double R2, double ptmin=0.0);
/**
* really do the splitting and merging
* At the end, the vector jets is filled with the jets found.
* the 'contents' field of each jets contains the indices
* of the particles included in that jet.
* \param overlap_tshold threshold for splitting/merging transition
* \param ptmin minimal pT allowed for jets
* \return the number of jets is returned
*/
int perform(double overlap_tshold, double ptmin=0.0);
//////////////////////////////
// save and debug functions //
//////////////////////////////
/// save final jets
/// \param flux stream to save the jet contentss
int save_contents(FILE *flux);
/// show jets/candidates status
int show();
// particle information
int n; ///< number of particles
std::vector<Cmomentum> particles; ///< list of particles
std::vector<double> pt; ///< list of particles' pt
int n_left; ///< numer of particles that does not belong to any jet
std::vector<Cmomentum> p_remain; ///< list of particles remaining to deal with
std::vector<Cmomentum> p_uncol_hard; ///< list of particles remaining with collinear clustering
int n_pass; ///< index of the run
/// minimal difference in squared distance between a particle and
/// two overlapping protojets when doing a split (useful when
/// testing approx. collinear safety)
double most_ambiguous_split;
// jets information
std::vector<Cjet> jets; ///< list of jets
// working entries
int *indices; ///< maximal size array for indices works
int idx_size; ///< number of elements in indices1
/// The following flag indicates that identical protocones
/// are to be merged automatically each time around the split-merge
/// loop and before anything else happens.
///
/// This flag is only effective if ALLOW_MERGE_IDENTICAL_PROTOCONES
/// is set in 'defines.h'
/// Note that this lead to infrared-unsafety so it is disabled
/// by default
bool merge_identical_protocones;
/// member used for detailed comparisons of pt's
Csplit_merge_ptcomparison ptcomparison;
/// stop split--merge or progressive-removal when the squared SM_var
/// of the hardest protojet is below this cut-off. Note that this is
/// a signed square (ie SM_var*|SM_var|) to be able to handle
/// negative values.
///
/// Note that the cut-off is set on the variable squared.
double SM_var2_hardest_cut_off;
/// pt cutoff for the particles to put in p_uncol_hard
/// this is meant to allow removing soft particles in the
/// stable-cone search.
///
/// This is not collinear-safe so you should not use this
/// variable unless you really know what you are doing
/// Note that the cut-off is set on the variable squared.
double stable_cone_soft_pt2_cutoff;
private:
/**
* get the overlap between 2 jets
* \param j1 first jet
* \param j2 second jet
* \param v returned overlap^2 (determined by the choice of SM variable)
* \return true if overlapping, false if disjoint
*/
bool get_overlap(const Cjet &j1, const Cjet &j2, double *v);
/**
* split the two given jets.
* during this procedure, the jets j1 & j2 are replaced
* by 2 new jets. Common particles are associted to the
* closest initial jet.
* \param it_j1 iterator of the first jet in 'candidates'
* \param it_j2 iterator of the second jet in 'candidates'
* \param j1 first jet (Cjet instance)
* \param j2 second jet (Cjet instance)
* \return true on success, false on error
*/
bool split(cjet_iterator &it_j1, cjet_iterator &it_j2);
/**
* merge the two given jet.
* during this procedure, the jets j1 & j2 are replaced
* by 1 single jets containing both of them.
* \param it_j1 iterator of the first jet in 'candidates'
* \param it_j2 iterator of the second jet in 'candidates'
* \return true on success, false on error
*/
bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2);
/**
* Check whether or not a jet has to be inserted in the
* list of protojets. If it has, set its sm_variable and
* insert it to the list of protojets.
* \param jet jet to insert
*/
bool insert(Cjet &jet);
/**
* given a 4-momentum and its associated pT, return the
* variable tht has to be used for SM
* \param v 4 momentum of the protojet
* \param pt_tilde pt_tilde of the protojet
*/
double get_sm_var2(Cmomentum &v, double &pt_tilde);
// jet information
/// list of jet candidates
#ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR
std::unique_ptr<std::multiset<Cjet,Csplit_merge_ptcomparison> > candidates;
#else
std::auto_ptr<std::multiset<Cjet,Csplit_merge_ptcomparison> > candidates;
#endif
/// minimal pt2
double pt_min2;
/**
* do we have or not to use the pt-weighted splitting
* (see description for set_pt_weighted_splitting)
* This will be false by default
*/
bool use_pt_weighted_splitting;
/// use a user-defined scale to order the stable cones and jet
/// candidates
const Cuser_scale_base *_user_scale;
#ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES
/// checkxor for the candidates (to avoid having twice the same contents)
std::set<Creference> cand_refs;
#endif
};
}
#endif
Index: tags/siscone-3.0.2/siscone/defines.h
===================================================================
--- tags/siscone-3.0.2/siscone/defines.h (revision 399)
+++ tags/siscone-3.0.2/siscone/defines.h (revision 400)
@@ -1,128 +1,128 @@
// -*- C++ -*-
///////////////////////////////////////////////////////////////////////////////
// File: defines.h //
// Description: header file for generic parameters definitions //
// This file is part of the SISCone project. //
// For more details, see http://projects.hepforge.org/siscone //
// //
// Copyright (c) 2006 Gavin Salam and Gregory Soyez //
// //
// This program 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. //
// //
// This program 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 program; if not, write to the Free Software //
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
// //
// $Revision:: $//
// $Date:: $//
///////////////////////////////////////////////////////////////////////////////
//! \file defines.h
#ifndef __DEFINES_H__
#define __DEFINES_H__
/// program name
// we get "SISCone" by calling
// siscone::siscone_package_name
// defined in siscone.h
// Otherwise, config.h
-// It is also defined as "PACKAGE_NAME" in config.h but this method
+// It is also defined as "SISCONE_PACKAGE_NAME" in config.h but this method
// might lead to conflicts
-//#define PROGRAM PACKAGE_NAME
+//#define PROGRAM SISCONE_PACKAGE_NAME
// program version
// we get it from
// siscone::siscone_version
// defined in siscone.h
-// It is also defined as "VERSION" in config.h but this method
+// It is also defined as "SISCONE_VERSION" in config.h but this method
// might lead to conflicts
/// perform final stability check using the quadtree
/// With the following define enabled, the final check for stability
/// is performed using the quadtree rather than the explicit list of
/// particles (see Cstable_cone::proceed_with_stability())
//#define USE_QUADTREE_FOR_STABILITY_TEST
/// threshold for recomoutation of the cone (see Cstable_cones::update_cone())
/// When traversing cone candidates along the angular ordering,
/// the momentum of the protojet candidate is computed incrementally
/// from the particles that enter and leave the cone.
/// When the cumulative change in "|px|+|py|" exceeds the cone "|px|+|py|"
/// we explicitely recompute the cone contents
#define PT_TSHOLD 1000.0
/// The following parameter controls collinear safety. For the set of
/// particles used in the search of stable cones, we gather particles
/// if their distance in eta and phi is smaller than EPSILON_COLLINEAR.
///
/// NB: for things to behave sensibly one requires
/// 1e-15 << EPSILON_COCIRCULAR << EPSILON_COLLINEAR << 1
///
/// among the scales that appear in practice (e.g. in deciding to use
/// special strategies), we have EPSILON_COLLINEAR, EPSILON_COCIRCULAR,
/// sqrt(EPSILON_COCIRCULAR) and EPSILON_COLLINEAR / EPSILON_COCIRCULAR.
///
#define EPSILON_COLLINEAR 1e-8
/// The following parameter controls cocircular situations.
/// When consecutive particles in the ordered vicinity list are separated
/// (in angle) by less that that limit, we consider that we face a situation
/// of cocircularity.
#define EPSILON_COCIRCULAR 1e-12
/// The following define enables you to allow for identical protocones
/// to be merged automatically after each split-merge step before
/// anything else happens. Whether this happens depends on teh value
/// of the merge_identical_protocones flag in Csplit_merge.
///
/// It we allow such a merging and define allow
/// MERGE_IDENTICAL_PROTOCONES_DEFAULT_TRUE then the
/// 'merge_identical_protocones' flag in Csplit_merge to be set to
/// 'true'. It may be manually reset to false in which case the
/// merging of identical protocones (protojets) will be turned off.
///
/// Note that this merging identical protocones makes the algorithm
/// infrared-unsafe, so it should be disabled except for testing
/// purposes.
//#define ALLOW_MERGE_IDENTICAL_PROTOCONES
//#define MERGE_IDENTICAL_PROTOCONES_DEFAULT_TRUE
/// if EPSILON_SPLITMERGE is defined then, during the split-merge
/// step, when two jets are found with PTs that are identical to
/// within a relative difference of EPSILON_SPLITMERGE they are
/// compared element-by-element to see where the differences are, and
/// one then uses pt1^2-pt2^2 = (pt1-pt2).(pt1+pt2) as an estimator of
/// which is harder. NB: in unfortunate cases, this can take the split
/// merge step up to N n * ln N time, though on normal events there
/// don't seem to have been any major problems yet.
#define EPSILON_SPLITMERGE 1e-12
/// definition of 2*M_PI which is useful a bit everyhere!
const double twopi = 6.283185307179586476925286766559005768394;
/// debugging information
//#define DEBUG_STABLE_CONES ///< debug messages in stable cones search
//#define DEBUG_SPLIT_MERGE ///< debug messages in split-merge
//#define DEBUG ///< all debug messages !
// in case all debug massages allowed, allow them in practice !
#ifdef DEBUG
#define DEBUG_STABLE_CONES
#define DEBUG_SPLIT_MERGE
#endif
#endif // __DEFINES_H__
Index: tags/siscone-3.0.2/siscone/Makefile.am
===================================================================
--- tags/siscone-3.0.2/siscone/Makefile.am (revision 399)
+++ tags/siscone-3.0.2/siscone/Makefile.am (revision 400)
@@ -1,31 +1,32 @@
SUBDIRS = . spherical
# build information for the SISCone library
# this is built as a libtool lib.
lib_LTLIBRARIES = libsiscone.la
libsiscone_la_SOURCES = ranlux.cpp reference.cpp geom_2d.cpp\
momentum.cpp hash.cpp quadtree.cpp vicinity.cpp\
protocones.cpp split_merge.cpp siscone.cpp\
siscone_error.cpp area.cpp
EXTRA_DIST = makefile.static
# install the SISCone headers
sisconeincludedir = $(includedir)/siscone
sisconeinclude_HEADERS = area.h\
circulator.h\
defines.h\
geom_2d.h\
hash.h\
momentum.h\
protocones.h\
quadtree.h\
ranlux.h\
reference.h\
siscone_error.h\
siscone.h\
split_merge.h\
vicinity.h
-# Don't distribute config.h. Note that it'll be accessible through -I.
-nodist_noinst_HEADERS = config.h
+# distribute config.h but do not include it in the tarball (will be
+# generated by configure)
+nodist_sisconeinclude_HEADERS = config.h
Index: tags/siscone-3.0.2/siscone/spherical/split_merge.h
===================================================================
--- tags/siscone-3.0.2/siscone/spherical/split_merge.h (revision 399)
+++ tags/siscone-3.0.2/siscone/spherical/split_merge.h (revision 400)
@@ -1,476 +1,477 @@
// -*- C++ -*-
///////////////////////////////////////////////////////////////////////////////
// File: split_merge.h //
// Description: header file for splitting/merging (contains the CJet class) //
// This file is part of the SISCone project. //
// WARNING: this is not the main SISCone trunk but //
// an adaptation to spherical coordinates //
// For more details, see http://projects.hepforge.org/siscone //
// //
// Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez //
// //
// This program 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. //
// //
// This program 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 program; if not, write to the Free Software //
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
// //
// $Revision:: $//
// $Date:: $//
///////////////////////////////////////////////////////////////////////////////
#ifndef __SPH_SPLIT_MERGE_H__
#define __SPH_SPLIT_MERGE_H__
#include <siscone/defines.h>
#include "geom_2d.h"
#include "momentum.h"
#include <stdio.h>
#include <vector>
#include <set>
#include <memory>
#include <string>
+#include "../config.h"
namespace siscone_spherical{
const int CJET_INEXISTENT_PASS = -2;
/**
* \class CSphjet
* real Jet information.
*
* This class contains information for one single jet.
* That is, first, its momentum carrying information
* about its centre and pT, and second, its particle
* contents
*/
class CSphjet{
public:
/// default ctor
CSphjet();
/// default dtor
~CSphjet();
CSphmomentum v; ///< jet momentum
double E_tilde; ///< sum of E_i [ 1 +|p_i x p_J|^2/(|p_i|^2 E_J^2)]
int n; ///< number of particles inside
std::vector<int> contents; ///< particle contents (list of indices)
/// ordering variable used for ordering and overlap in the
/// split--merge. This variable is automatically set either to
/// E_tilde or E depending on the siscone parameter.
///
/// Note that the default behaviour is E_tilde and that other
/// choices may lead to infrared unsafe situations.
///
/// Note: we use the square of the varible rather than the variable
/// itself
///
/// Note 2: for the overlap computation, we shall use the jet energy!
double sm_var2;
/// covered range in eta-phi
CSphtheta_phi_range range;
/// pass at which the jet has been found
/// It starts at 0 (first pass), -1 means infinite rapidity
/// (it will be initialised to "CJET_INEXISTENT_PASS" which should
/// never appear after clustering)
int pass;
};
/// ordering of jets in pt
///bool jets_pt_less(const CSphjet &j1, const CSphjet &j2);
/// ordering of jets in energy (e.g. used in final jets ordering)
bool jets_E_less(const CSphjet &j1, const CSphjet &j2);
/// the choices of scale variable that can be used in the split-merge
/// step, both for ordering the protojets and for measuing their
/// overlap; E is defined in E-scheme (4-momentum) recombination;
/// Etilde = \sum_{i\in jet} E_i [1+sin^2(theta_{i,jet})]
///
/// NB: if one changes the order here, one _MUST_ also change the order
/// in the SISCone plugin
enum Esplit_merge_scale {
SM_E, ///< Energy (IR unsafe with momentum conservation)
SM_Etilde ///< sum_{i \in jet} E_i [1+sin^2(theta_iJ)]
};
/// return the name of the split-merge scale choice
std::string split_merge_scale_name(Esplit_merge_scale sms);
/**
* \class CSphsplit_merge_ptcomparison
* a class that allows us to carry out comparisons of pt of jets, using
* information from exact particle contents where necessary.
*/
class CSphsplit_merge_ptcomparison{
public:
/// default ctor
CSphsplit_merge_ptcomparison() :
particles(0), split_merge_scale(SM_Etilde){};
/// return the name corresponding to the SM scale variable
std::string SM_scale_name() const {
return split_merge_scale_name(split_merge_scale);}
std::vector<CSphmomentum> * particles; ///< pointer to the list of particles
std::vector<double> * particles_norm2; ///< pointer to the particles's norm^2
/// comparison of 2 CSphjet
bool operator()(const CSphjet &jet1, const CSphjet &jet2) const;
/**
* get the difference between 2 jets, calculated such that rounding
* errors will not affect the result even if the two jets have
* almost the same content (so that the difference is below the
* rounding errors)
*
* \param j1 first jet
* \param j2 second jet
* \param v jet1-jet2
* \param E_tilde jet1-jet2 E_tilde
*/
void get_difference(const CSphjet &j1, const CSphjet &j2, CSphmomentum *v, double *E_tilde) const;
/// the following parameter controls the variable we're using for
/// the split-merge process i.e. the variable we use for
/// 1. ordering jet candidates;
/// 2. computing the overlap fraction of two candidates.
/// The default value uses Etilde. The other alternative is E
/// NOTE: Modifying the default choice can have nasty effects:
/// - using E is IR-safe for QCD jets but the IR unsafety remains
/// for back-to-back jets of unstable narrow-width particles
/// (e.g. Higgs).
/// Therefore, keeping the default value is strongly advised.
Esplit_merge_scale split_merge_scale;
};
// iterator types
/// iterator definition for the jet candidates structure
typedef std::multiset<siscone_spherical::CSphjet,CSphsplit_merge_ptcomparison>::iterator cjet_iterator;
/// iterator definition for the jet structure
typedef std::vector<siscone_spherical::CSphjet>::iterator jet_iterator;
/**
* \class CSphsplit_merge
* Class used to split and merge jets.
*/
class CSphsplit_merge{
public:
/// default ctor
CSphsplit_merge();
/// default dtor
~CSphsplit_merge();
//////////////////////////////
// initialisation functions //
//////////////////////////////
/**
* initialisation function
* \param _particles list of particles
* \param protocones list of protocones (initial jet candidates)
* \param R2 cone radius (squared)
* \param Emin minimal energy allowed for jets
* \return 0 on success, 1 on error
*/
int init(std::vector<CSphmomentum> &_particles, std::vector<CSphmomentum> *protocones, double R2, double Emin=0.0);
/**
* initialisation function for particle list
* \param _particles list of particles
* \return 0 on success, 1 on error
*/
int init_particles(std::vector<CSphmomentum> &_particles);
/**
* build initial list of left particles
*/
int init_pleft();
/**
* use an energy-dependent boundary for splitting
* When called with true, the criterium for splitting two protojets
* will be to compare D1^2/kt1^2 vs. D2^2/kt2^2, the (anti-)kt-weighted
* distance instead of the plain distance D1^2 vs. D2^2.
* This can be set in order to produce more circular hard jets,
* with the same underlying philosophy as for the anti-kt algorithm.
* We thus expect a behaviour closer to the IterativeCone one.
* By default, we use the standard D1^2 vs. D2^2 comparison and this
* function is not called.
*/
inline int set_E_weighted_splitting(bool _use_E_weighted_splitting){
use_E_weighted_splitting = _use_E_weighted_splitting;
return 0;
}
////////////////////////
// cleaning functions //
////////////////////////
/// partial clearance
int partial_clear();
/// full clearance
int full_clear();
///////////////////////////////////////
// user-defined stable-cone ordering //
///////////////////////////////////////
/// \class Cuser_scale_base
/// base class for user-defined ordering of stable cones
///
/// derived classes have to implement the () operator that returns
/// the scale associated with a given jet.
class Cuser_scale_base{
public:
/// empty virtual dtor
virtual ~Cuser_scale_base(){}
/// the scale associated with a given jet
///
/// "progressive removal" iteratively removes the stable cone with
/// the largest scale
virtual double operator()(const CSphjet & jet) const = 0;
/// returns true when the scale associated with jet a is larger than
/// the scale associated with jet b
///
/// By default this does a simple direct comparison but it can be
/// overloaded for higher precision [recommended if possible]
///
/// This function assumes that a.sm_var2 and b.sm_var2 have been
/// correctly initialised with the signed squared output of
/// operator(), as is by default the case when is_larger is called
/// from within siscone.
virtual bool is_larger(const CSphjet & a, const CSphjet & b) const{
return (a.sm_var2 > b.sm_var2);
}
};
/// associate a user-defined scale to order the stable cones
///
/// Note that this is only used in "progressive-removal mode",
/// e.g. in add_hardest_protocone_to_jets().
void set_user_scale(const Cuser_scale_base * user_scale_in){
_user_scale = user_scale_in;
}
/// return the user-defined scale (NULL if none)
const Cuser_scale_base * user_scale() const { return _user_scale; }
/////////////////////////////////
// main parts of the algorithm //
/////////////////////////////////
/**
* build the list 'p_uncol_hard' from p_remain by clustering
* collinear particles
* note that thins in only used for stable-cone detection
* so the parent_index field is unnecessary
*
* Note that soft particles are not removed here
* This is just a remnant from the trunk version
*/
int merge_collinear_and_remove_soft();
/**
* add a list of protocones
* \param protocones list of protocones (initial jet candidates)
* \param R2 cone radius (squared)
* \param Emin minimal emergy allowed for jets
* \return 0 on success, 1 on error
*/
int add_protocones(std::vector<CSphmomentum> *protocones, double R2, double Emin=0.0);
/**
* remove the hardest protocone and declare it a a jet
* \param protocones list of protocones (initial jet candidates)
* \param R2 cone radius (squared)
* \param Emin minimal emergy allowed for jets
* \return 0 on success, 1 on error
*
* The list of remaining particles (and the uncollinear-hard ones)
* is updated.
*/
int add_hardest_protocone_to_jets(std::vector<CSphmomentum> *protocones, double R2, double Emin=0.0);
/**
* really do the splitting and merging
* At the end, the vector jets is filled with the jets found.
* the 'contents' field of each jets contains the indices
* of the particles included in that jet.
* \param overlap_tshold threshold for splitting/merging transition
* \param Emin minimal energy allowed for jets
* \return the number of jets is returned
*/
int perform(double overlap_tshold, double Emin=0.0);
//////////////////////////////
// save and debug functions //
//////////////////////////////
/// save final jets
/// \param flux stream to save the jet contentss
int save_contents(FILE *flux);
/// show jets/candidates status
int show();
// particle information
int n; ///< number of particles
std::vector<CSphmomentum> particles; ///< list of particles
std::vector<double> particles_norm2; ///< norm^2 of the particle (3-vect part)
int n_left; ///< numer of particles that does not belong to any jet
std::vector<CSphmomentum> p_remain; ///< list of particles remaining to deal with
std::vector<CSphmomentum> p_uncol_hard; ///< list of particles remaining with collinear clustering
int n_pass; ///< index of the run
/// minimal difference in squared distance between a particle and
/// two overlapping protojets when doing a split (useful when
/// testing approx. collinear safety)
double most_ambiguous_split;
// jets information
std::vector<CSphjet> jets; ///< list of jets
// working entries
int *indices; ///< maximal size array for indices works
int idx_size; ///< number of elements in indices1
/// The following flag indicates that identical protocones
/// are to be merged automatically each time around the split-merge
/// loop and before anything else happens.
///
/// This flag is only effective if ALLOW_MERGE_IDENTICAL_PROTOCONES
/// is set in 'defines.h'
/// Note that this lead to infrared-unsafety so it is disabled
/// by default
bool merge_identical_protocones;
/// member used for detailed comparisons of pt's
CSphsplit_merge_ptcomparison ptcomparison;
/// stop split--merge or progressive-removal when the squared SM_var
/// of the hardest protojet is below this cut-off. Note that this is
/// a signed square (ie SM_var*|SM_var|) to be able to handle
/// negative values.
///
/// Note that the cut-off is set on the variable squared.
double SM_var2_hardest_cut_off;
/// Energy cutoff for the particles to put in p_uncol_hard
/// this is meant to allow removing soft particles in the
/// stable-cone search.
///
/// This is not collinear-safe so you should not use this
/// variable unless you really know what you are doing
/// Note that the cut-off is set on the variable squared.
double stable_cone_soft_E2_cutoff;
private:
/**
* get the overlap between 2 jets
* \param j1 first jet
* \param j2 second jet
* \param v returned overlap^2 (determined by the choice of SM variable)
* \return true if overlapping, false if disjoint
*/
bool get_overlap(const CSphjet &j1, const CSphjet &j2, double *v);
/**
* split the two given jets.
* during this procedure, the jets j1 & j2 are replaced
* by 2 new jets. Common particles are associted to the
* closest initial jet.
* \param it_j1 iterator of the first jet in 'candidates'
* \param it_j2 iterator of the second jet in 'candidates'
* \param j1 first jet (CSphjet instance)
* \param j2 second jet (CSphjet instance)
* \return true on success, false on error
*/
bool split(cjet_iterator &it_j1, cjet_iterator &it_j2);
/**
* merge the two given jet.
* during this procedure, the jets j1 & j2 are replaced
* by 1 single jets containing both of them.
* \param it_j1 iterator of the first jet in 'candidates'
* \param it_j2 iterator of the second jet in 'candidates'
* \return true on success, false on error
*/
bool merge(cjet_iterator &it_j1, cjet_iterator &it_j2);
/**
* Check whether or not a jet has to be inserted in the
* list of protojets. If it has, set its sm_variable and
* insert it to the list of protojets.
* \param jet jet to insert
*/
bool insert(CSphjet &jet);
/**
* given a 4-momentum and its associated pT, return the
* variable tht has to be used for SM
* \param v 4 momentum of the protojet
* \param E_tilde E_tilde of the protojet
*/
double get_sm_var2(CSphmomentum &v, double &E_tilde);
/// compute Etilde for a given jet
void compute_Etilde(CSphjet &j);
// jet information
/// list of jet candidates
#ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR
std::unique_ptr<std::multiset<CSphjet,CSphsplit_merge_ptcomparison> > candidates;
#else
std::auto_ptr<std::multiset<CSphjet,CSphsplit_merge_ptcomparison> > candidates;
#endif
/// minimal E
double E_min;
/**
* do we have or not to use the energy-weighted splitting
* (see description for set_E_weighted_splitting)
* This will be false by default
*/
bool use_E_weighted_splitting;
/// use a user-defined scale to order the stable cones and jet
/// candidates
const Cuser_scale_base *_user_scale;
#ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES
/// checkxor for the candidates (to avoid having twice the same contents)
std::set<siscone::Creference> cand_refs;
#endif
};
}
#endif
Index: tags/siscone-3.0.2/siscone/spherical/siscone.cpp
===================================================================
--- tags/siscone-3.0.2/siscone/spherical/siscone.cpp (revision 399)
+++ tags/siscone-3.0.2/siscone/spherical/siscone.cpp (revision 400)
@@ -1,304 +1,298 @@
///////////////////////////////////////////////////////////////////////////////
// File: siscone.cpp //
// Description: source file for the main SISCone class //
// This file is part of the SISCone project. //
// WARNING: this is not the main SISCone trunk but //
// an adaptation to spherical coordinates //
// For more details, see http://projects.hepforge.org/siscone //
// //
// Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez //
// //
// This program 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. //
// //
// This program 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 program; if not, write to the Free Software //
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
// //
// $Revision:: $//
// $Date:: $//
///////////////////////////////////////////////////////////////////////////////
-//#ifdef HAVE_CONFIG_H
#include <siscone/config.h>
-//#else
-//#define PACKAGE_NAME "SISCone"
-//#define VERSION "3.0.2"
-//#warning "No config.h file available, using preset values"
-//#endif
#include <siscone/ranlux.h>
#include <siscone/siscone_error.h>
#include <siscone/defines.h>
#include "momentum.h"
#include "siscone.h"
#include <iostream>
#include <sstream>
#include <iomanip>
namespace siscone_spherical{
using namespace std;
/***************************************************************
* CSphsiscone implementation *
* final class: gather everything to compute the jet contents. *
* *
* This is the class user should use. *
* It computes the jet contents of a list of particles *
* given a cone radius and a threshold for splitting/merging. *
***************************************************************/
// default ctor
//--------------
CSphsiscone::CSphsiscone(){
rerun_allowed = false;
}
// default dtor
//--------------
CSphsiscone::~CSphsiscone(){
rerun_allowed = false;
}
bool CSphsiscone::init_done=false;
std::ostream* CSphsiscone::_banner_ostr=&cout;
/*
* compute the jets from a given particle set doing multiple passes
* such pass N looks for jets among all particles not put into jets
* during previous passes.
* - _particles list of particles
* - _radius cone radius
* - _f shared energy threshold for splitting&merging
* - _n_pass_max maximum number of runs
* - _Emin minimum energy of the protojets
* - _split_merge_scale the scale choice for the split-merge procedure
* NOTE: using pt leads to IR unsafety for some events with momentum
* conservation. So we strongly advise not to change the default
* value.
* return the number of jets found.
**********************************************************************/
int CSphsiscone::compute_jets(vector<CSphmomentum> &_particles, double _radius, double _f,
int _n_pass_max, double _Emin,
Esplit_merge_scale _split_merge_scale){
// make sure things are initialised
_initialise_if_needed();
// run some general safety tests (NB: f will be checked in split-merge)
if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
ostringstream message;
message << "Illegal value for cone radius, R = " << _radius
<< " (legal values are 0<R<pi/2)";
throw siscone::Csiscone_error(message.str());
}
ptcomparison.split_merge_scale = _split_merge_scale;
partial_clear(); // make sure some things are initialised properly
// init the split_merge algorithm with the initial list of particles
// this initialises particle list p_left of remaining particles to deal with
init_particles(_particles);
bool finished = false;
rerun_allowed = false;
protocones_list.clear();
#ifdef DEBUG_STABLE_CONES
nb_hash_cones_total = 0;
nb_hash_occupied_total = 0;
#endif
do{
// initialise stable_cone finder
// here we use the list of remaining particles
// AFTER COLLINEAR CLUSTERING !!!!!!
CSphstable_cones::init(p_uncol_hard);
// get stable cones
if (get_stable_cones(_radius)){
// we have some new protocones.
// add them to candidates
protocones_list.push_back(protocones);
add_protocones(&protocones, R2, _Emin);
#ifdef DEBUG_STABLE_CONES
nb_hash_cones_total += nb_hash_cones;
nb_hash_occupied_total += nb_hash_occupied;
#endif
} else {
// no new protocone: leave
finished=true;
}
_n_pass_max--;
} while ((!finished) && (n_left>0) && (_n_pass_max!=0));
rerun_allowed = true;
// split & merge
return perform(_f, _Emin);
}
/*
* compute the jets from a given particle set doing multiple passes
* such pass N looks for jets among all particles not put into jets
* during previous passes.
* - _particles list of particles
* - _radius cone radius
* - _n_pass_max maximum number of runs
* - _Emin minimum energy of the protojets
* - _ordering_scale the ordering scale to decide which stable
* cone is removed
* return the number of jets found.
**********************************************************************/
int CSphsiscone::compute_jets_progressive_removal(vector<CSphmomentum> &_particles, double _radius,
int _n_pass_max, double _Emin,
Esplit_merge_scale _ordering_scale){
// make sure things are initialised
_initialise_if_needed();
// run some general safety tests (NB: f will be checked in split-merge)
if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
ostringstream message;
message << "Illegal value for cone radius, R = " << _radius
<< " (legal values are 0<R<pi/2)";
throw siscone::Csiscone_error(message.str());
}
ptcomparison.split_merge_scale = _ordering_scale;
partial_clear(); // make sure some things are initialised properly
// init the split_merge algorithm with the initial list of particles
// this initialises particle list p_left of remaining particles to deal with
//
// this stores the "processed" particles in p_uncol_hard
init_particles(_particles);
jets.clear();
bool unclustered_left;
rerun_allowed = false;
protocones_list.clear();
do{
//cout << n_left << " particle left" << endl;
// initialise stable_cone finder
// here we use the list of remaining particles
// AFTER COLLINEAR CLUSTERING !!!!!!
CSphstable_cones::init(p_uncol_hard);
// get stable cones (stored in 'protocones')
unclustered_left = get_stable_cones(_radius);
// add the hardest stable cone to the list of jets
if (add_hardest_protocone_to_jets(&protocones, R2, _Emin)) break;
_n_pass_max--;
} while ((unclustered_left) && (n_left>0) && (_n_pass_max!=0));
// split & merge
return jets.size();
}
/*
* recompute the jets with a different overlap parameter.
* we use the same particles and R as in the preceeding call.
* - _f shared energy threshold for splitting&merging
* - _Emin minimum Energy of the protojets
* - _split_merge_scale the scale choice for the split-merge procedure
* NOTE: using pt leads to IR unsafety for some events with momentum
* conservation. So we strongly advise not to change the default
* value.
* return the number of jets found, -1 if recomputation not allowed.
********************************************************************/
int CSphsiscone::recompute_jets(double _f, double _Emin,
Esplit_merge_scale _split_merge_scale){
if (!rerun_allowed)
return -1;
ptcomparison.split_merge_scale = _split_merge_scale;
// restore particle list
partial_clear();
init_pleft();
// initialise split/merge algorithm
unsigned int i;
for (i=0;i<protocones_list.size();i++)
add_protocones(&(protocones_list[i]), R2, _Emin);
// split & merge
return perform(_f, _Emin);
}
// make sure things are initialised
void CSphsiscone::_initialise_if_needed(){
// initialise random number generator
if (init_done) return;
// initialise random number generator
siscone::ranlux_init();
// do not do this again
init_done=true;
// print the banner
if (_banner_ostr != 0){
ios::fmtflags flags_to_restore(_banner_ostr->flags());
(*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
(*_banner_ostr) << "# SISCone version " << setw(28) << left << siscone_version() << "o" << endl;
(*_banner_ostr) << "# http://projects.hepforge.org/siscone o" << endl;
(*_banner_ostr) << "# o" << endl;
(*_banner_ostr) << "# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm o" << endl;
(*_banner_ostr) << "# SISCone was written by Gavin Salam and Gregory Soyez o" << endl;
(*_banner_ostr) << "# It is released under the terms of the GNU General Public License o" << endl;
(*_banner_ostr) << "# o" << endl;
(*_banner_ostr) << "# !!! WARNING !!! o" << endl;
(*_banner_ostr) << "# This is the version of SISCone using spherical coordinates o" << endl;
(*_banner_ostr) << "# o" << endl;
(*_banner_ostr) << "# A description of the algorithm is available in the publication o" << endl;
(*_banner_ostr) << "# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)]. o" << endl;
(*_banner_ostr) << "# Please cite it if you use SISCone. o" << endl;
(*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
(*_banner_ostr) << endl;
_banner_ostr->flush();
_banner_ostr->flags(flags_to_restore);
}
}
// finally, a bunch of functions to access to
// basic information (package name, version)
//---------------------------------------------
/*
* return SISCone package name.
* This is nothing but "SISCone", it is a replacement to the
- * PACKAGE_NAME string defined in config.h and which is not
- * public by default.
+ * SISCONE_PACKAGE_NAME string defined in config.h and which is not
+ * guaranteed to be public.
* return the SISCone name as a string
*/
string siscone_package_name(){
- return PACKAGE_NAME;
+ return SISCONE_PACKAGE_NAME;
}
/*
* return SISCone version number.
* return a string of the form "X.Y.Z" with possible additional tag
* (alpha, beta, devel) to mention stability status
*/
string siscone_version(){
- return VERSION;
+ return SISCONE_VERSION;
}
}
Index: tags/siscone-3.0.2/siscone/spherical/siscone.h
===================================================================
--- tags/siscone-3.0.2/siscone/spherical/siscone.h (revision 399)
+++ tags/siscone-3.0.2/siscone/spherical/siscone.h (revision 400)
@@ -1,173 +1,173 @@
// -*- C++ -*-
///////////////////////////////////////////////////////////////////////////////
// File: siscone.h //
// Description: header file for the main SISCone class //
// This file is part of the SISCone project. //
// WARNING: this is not the main SISCone trunk but //
// an adaptation to spherical coordinates //
// For more details, see http://projects.hepforge.org/siscone //
// //
// Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez //
// //
// This program 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. //
// //
// This program 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 program; if not, write to the Free Software //
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
// //
// $Revision:: $//
// $Date:: $//
///////////////////////////////////////////////////////////////////////////////
#ifndef __SPH_SISCONE_H__
#define __SPH_SISCONE_H__
#include "protocones.h"
#include "split_merge.h"
namespace siscone_spherical{
/**
* \class CSphsiscone
* final class: gather everything to compute the jet contents.
*
* This is the class user should use.
* It computes the jet contents of a list of particles
* given a cone radius and a threshold for splitting/merging.
*
* After the call to 'perform', the vector jets is filled with
* the jets found. the 'contents' field of each jets contains
* the indices of the particles included in that jet.
*/
class CSphsiscone : public CSphstable_cones, public CSphsplit_merge{
public:
/// default ctor
CSphsiscone();
/// default dtor
~CSphsiscone();
/**
* compute the jets from a given particle set.
* We are doing multiple passes such pass n_pass looks for jets among
* all particles not put into jets during previous passes.
* By default the number of passes is infinite (0).
* \param _particles list of particles
* \param _radius cone radius
* \param _f shared energy threshold for splitting&merging
* \param _n_pass_max maximum number of passes (0=full search)
* \param _Emin minimum energy of the protojets
* \param _split_merge_scale the scale choice for the split-merge procedure
* NOTE: SM_Etilde
* is always IR safe
* SM_E
* is IR unsafe for events with mom. conservation
*
* \return the number of jets found.
*/
int compute_jets(std::vector<CSphmomentum> &_particles, double _radius, double _f,
int _n_pass_max=0, double _Emin=0.0,
Esplit_merge_scale _split_merge_scale=SM_Etilde);
/**
* compute the jets from a given particle set.
* We are doing multiple passes such pass n_pass looks for jets among
* all particles not put into jets during previous passes.
* By default the number of passes is infinite (0).
* \param _particles list of particles
* \param _radius cone radius
* \param _n_pass_max maximum number of passes (0=full search)
* \param _Emin minimum energy of the protojets
* \param _ordering_scale the ordering scale to decide which stable
* cone is removed
*
* \return the number of jets found.
*/
int compute_jets_progressive_removal(std::vector<CSphmomentum> &_particles, double _radius,
int _n_pass_max=0, double _Emin=0.0,
Esplit_merge_scale _ordering_scale=SM_Etilde);
/**
* recompute the jets with a different overlap parameter.
* we use the same particles and R as in the preceeding call.
* \param _f shared energy threshold for splitting&merging
* \param _Emin minimum energy of the protojets
* \param _split_merge_scale the scale choice for the split-merge procedure
* split--merge variable
* NOTE: using pt leads to IR unsafety for some events with momentum
* conservation. So we strongly advise not to change the default
* value.
* \return the number of jets found, -1 if recomputation not allowed.
*/
int recompute_jets(double _f, double _Emin = 0.0,
Esplit_merge_scale _split_merge_scale=SM_Etilde);
/// list of protocones found pass-by-pass
std::vector<std::vector<CSphmomentum> > protocones_list;
// random number initialisation
static bool init_done; ///< check random generator initialisation
#ifdef DEBUG_STABLE_CONES
int nb_hash_cones_total, nb_hash_occupied_total;
#endif
/**
* A call to this function modifies the stream
* used to print banners (by default cout).
*
* Please note that if you distribute 3rd party code
* that links with SISCone, that 3rd party code must not
* use this call turn off the printing of thw banner
* by default. This requirement reflects the spirit of
* clause 2c of the GNU Public License (v2), under which
* SISCone is distributed.
*/
static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}
/**
* returns a pointer to the stream to be used to print banners
* (cout by default)
*/
static std::ostream * banner_stream() {return _banner_ostr;}
private:
bool rerun_allowed; ///< is recompute_jets allowed ?
static std::ostream * _banner_ostr; ///< stream to use for banners
/// ensure things are initialised
void _initialise_if_needed();
};
// finally, a bunch of functions to access to
// basic information (package name, version)
//---------------------------------------------
/**
* return SISCone package name.
* This is nothing but "SISCone", it is a replacement to the
- * PACKAGE_NAME string defined in config.h and which is not
- * public by default.
+ * SISCONE_PACKAGE_NAME string defined in config.h and which is not
+ * guaranteed to be public.
* \return the SISCone name as a string
*/
std::string siscone_package_name();
/**
* return SISCone version number.
* \return a string of the form "X.Y.Z" with possible additional tag
* (alpha, beta, devel) to mention stability status
*/
std::string siscone_version();
}
#endif
Index: tags/siscone-3.0.2/configure.ac
===================================================================
--- tags/siscone-3.0.2/configure.ac (revision 399)
+++ tags/siscone-3.0.2/configure.ac (revision 400)
@@ -1,95 +1,98 @@
AC_INIT([SISCone], [3.0.2])
AC_CONFIG_SRCDIR([siscone/siscone.cpp])
AM_INIT_AUTOMAKE
-dnl uncomment the following line if you want to use autoheader
-AC_CONFIG_HEADERS(siscone/config.h:config.h.in)
+
+dnl (un)comment the following lines if you want to use autoheader
+dnl and also (un)comment the call to autoheader in autogen.sh
+dnl
+dnl Notes:
+dnl - the first macro needs to place the files in the correct
+dnl dir in order to have the correct -I options for the remote build
+dnl - see Makefile.am for distcleaning AX_PREFIX_CONFIG_H leftovers
+AC_CONFIG_HEADERS(siscone/config_raw.h:config.h.in)
+AX_PREFIX_CONFIG_H(siscone/config.h,SISCONE,siscone/config_raw.h)
+
dnl and also uncomment the call to autoheader in autogen.sh
dnl check autoconf version
AC_PREREQ(2.63)
dnl check basic types
AC_CHECK_TYPE(int)
AC_CHECK_TYPE(long)
dnl set default compilation and link flags
dnl those can be changed at configure time so we don't use AM_CXXFLAGS here
test "x${CXXFLAGS+yes}" = xyes || CXXFLAGS="-O3 -Wall -ffast-math"
dnl CXXFLAGS=" -Wall -O3 -ffast-math "
dnl check useful programs
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl check standard C headers
AC_STDC_HEADERS
dnl set the default destination directory
AC_PREFIX_DEFAULT(/usr/local)
dnl if the debug flag is set, build with -g
dnl default is "yes"
AC_ARG_ENABLE(debug,
[ --enable-debug Turn on debug compiler information],
[ENABLE_DEBUG_FLAG="$enableval"],
[ENABLE_DEBUG_FLAG="yes"])
if [[ "x$ENABLE_DEBUG_FLAG" == "xyes" ]] ; then
CXXFLAGS=${CXXFLAGS}" -g "
fi
dnl uncomment the next line not to build the shared lib by default
dnl AM_DISABLE_SHARED
dnl-----------------
dnl check libraries
dnl ----------------
dnl math lib
AC_CHECK_LIB(m, cos)
dnl already included into LIBS by the previous check
dnl AM_LDFLAGS=" -lm "
dnl if the debug flags are on, check if we can also use
dnl some profiling tools
dnl COMMENTED: Pass LDFLAGS to configure instead
dnl if [[ "x$ENABLE_DEBUG_FLAG" == "xyes" ]] ; then
dnl AC_CHECK_LIB(profiler, google_initializer_module_profiler)
dnl AC_CHECK_LIB(pthread, pthread_create)
dnl AC_CHECK_LIB(tcmalloc, malloc)
dnl fi
dnl enable libtool
AC_PROG_LIBTOOL
dnl chceck if auto_ptr is deprecated
dnl if yes, see if unique_ptr is supported
AC_MSG_CHECKING([[if $CXX $CXXFLAGS considers atd::auto_ptr as deprecated]])
AC_LANG_PUSH(C++)
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror=deprecated-declarations"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <memory>]],[[int *a= new int(1); std::auto_ptr<int> b; b.reset(a);]])],
[ac_compilation_deprecated="no"],[ac_compilation_deprecated="yes"])
AC_MSG_RESULT([$ac_compilation_deprecated])
if [[ "$ac_compilation_deprecated" == "yes" ]] ; then
AC_MSG_CHECKING([[if $CXX $CXXFLAGS supports atd::unique_ptr]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <memory>]],[[int *a= new int(1); std::unique_ptr<int> b; b.reset(a);]])],
[ac_supports_unique_ptr="yes"],[as_supports_unique_ptr="no"])
if [[ "$ac_supports_unique_ptr" == "yes" ]] ; then
-
- dnl it is tempting to define something in the config.h header
- dnl but it is only used internally (to avoid unleashing things
- dnl like PACKAGE_NAME in the public interface
- dnl AC_DEFINE(HAVE_UNIQUE_PTR_AS_AUTO_PTR, [], [use unique_ptr instead of auto_ptr])
- dnl So we go via the compiler flags
- save_CXXFLAGS="$save_CXXFLAGS -DSISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR"
+ AC_DEFINE(USES_UNIQUE_PTR_AS_AUTO_PTR, [], [use unique_ptr instead of auto_ptr])
fi
AC_MSG_RESULT([$ac_supports_unique_ptr])
fi
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_POP(C++)
AC_OUTPUT( Makefile siscone/Makefile siscone/spherical/Makefile examples/Makefile examples/events/Makefile )

File Metadata

Mime Type
text/x-diff
Expires
Wed, May 14, 11:21 AM (17 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111410
Default Alt Text
(147 KB)

Event Timeline