Page MenuHomeHEPForge

No OneTemporary

Index: contrib/contribs/Nsubjettiness/trunk/ChangeLog
===================================================================
--- contrib/contribs/Nsubjettiness/trunk/ChangeLog (revision 1315)
+++ contrib/contribs/Nsubjettiness/trunk/ChangeLog (revision 1316)
@@ -1,335 +1,339 @@
+2022-06-13 <jthaler>
+ Removed -std=c++11 flag from makefile
+ Updated MeasureDefinition.cc to remove "static thread_local" (since it
+ doesn't really seem to help with timing.
2022-06-10 <jthaler>
Updated makefile with -std=c++11 flag
Updated MeasureDefinition.cc with thread_local for thread safety
2018-07-06 <jthaler>
Updated comments in AxesDefinition.hh about role of JetDefinitionWrapper
Updated AUTHORS with JHEP publication information for XCone
Prepared VERSION and NEWS for 2.2.5 release
2018-07-05 <jthaler>
Fixed bug in AxesDefinition.hh where _recomb was used before it was declared.
2016-06-08 <jthaler>
Fixed bug in MeasureDefinition.cc where axes were not completely defined,
leading to problems with multi-pass axes
2016-04-04 <jthaler>
Fixed Njettiness.cc to give value of _current_tau_components even if less
than N constituents
Delete extraneous code in example_advanced_usage.cc
2016-03-29 <jthaler>
Update for FJ 3.2.0 to deal with SharedPtr () deprecation
2015-09-28 <jthaler>
Updated NEWS for 2.2.1 release.
2015-09-18 <jthaler>
Fixed duplicate XConePlugin entry in Makefile.
2015-08-20 <jthaler>
Trying to fix "abs" bug in ExtraRecombiners.cc
2015-08-19 <jthaler>
Adding arXiv numbers to XCone papers
Used this_jet in example_basic_usage.
Fixed typo in example_advanced_usage header.
Added copy/paste code in README file.
2015-08-13 <jthaler>
Ready for 2.2.0 release
2015-07-23 <jthaler>
Fixed typo in GenET_GenKT_Axes error message
Added _too_few_axes_warning to ExclusiveJetAxes and ExclusiveCombinatorialJetAxes
Switched to ../data/single_event_ee.dat for make check
2015-07-20 <jthaler>
Renamed WinnerTakeAllRecombiner.hh/cc to ExtraRecombiners.hh/cc
Added _too_few_axes_warning to HardestJetAxes
Added GenKT_Axes and OnePass_GenKT_Axes and Comb_GenKT_Axes (using E-scheme recombination).
Added warning about p < 0 or delta <=0 in GenKT axes finders.
Added warning about beta <= 0 in all measures.
2015-07-10 <jthaler>
Putting in small tweaks in documentation to get ready for 2.2 release candidate 1.
2015-06-15 <jthaler>
Starting doxygen file for eventual improved documentation.
Starting long process of improving documentation throughout.
Made the basic usage file a bit easier to read.
Adding in LimitedWarnings for old style constructors
2015-06-12 <jthaler>
Synchronized definition of new measures with XCone paper.
In MeasureDefinition, added default values of jet_distance_squared and beam_distance_squared for cases where we don't want to optimize specifically.
Fixed bug in OriginalGeometricMeasure and ModifiedGeometric Measure
Commented out DeprecatedGeometricMeasure and DeprecatedGeometricCutoffMeasure since they were only causing confusion
2015-05-26 <TJW>
Removed axis_scale_factor(), added bool to calculate this value if needed to save computation time
Defined small offset in denominator of axis scaling according to accuracy of refinement
Updated advanced examples to include tau values and number of jet constituents
2015-05-25 <jthaler>
Clean up of AxesDefinition
Splitting get_axes into get_starting_axes and get_refined axes
Putting in proper noise ranges (hopefully) for MultiPass
Clean up of MeasureDefinition, rename jet_gamma to beam_gamma
Put in zero checking for jet_distance in ConicalGeometricMeasure
Added in ConicalMeasure for consistency
Changing OnePass Minimization to allow for temporary uphill
2015-05-24 <TJW>
Added Combinatorial GenET_GenKT_Axes and MultiPass_Manual_Axes
Moved Axes refining information into MeasureDefinition, associated each measure with corresponding axes refiner
Moved get_one_pass_axes into MeasureDefinition, removed any mention of Npass
Moved all information on number of passes to AxesDefinition
Made AxesRefiner.hh/.cc into defunct files
2015-05-22 <jthaler>
Cleaning out commented text. Renaming classes to be consistent with recommended usage.
2015-05-22 <TJW>
Added XConePlugin as a specific implementation of NjettinessPlugin
Added usage of XCone beta = 1.0 and beta = 2.0 to both basic and advanced example files
Added OriginalGeometric, ModifiedGeometric, ConicalGeometric, and XCone measures to list of test measures
Added OnePass_GenRecomb_GenKT_Axes to list of test axes
Added description to XCone measure in MeasureDefinition
2015-05-21 <TJW>
Updated minimization scheme to avoid divide-by-zero errors
Fixed various factors of 2 in the definition of the measures
2015-04-19 <TJW>
Fixed bug in minimization scheme for GeneralAxesRefiner
Moved measure_type to DefaultMeasure, removed geometric measure from e+e- example file
2015-03-22 <TJW>
Added OriginalGeometricMeasure and ModifiedGeometricMeasure definitions
Changed all instances of GeometricMeasure to DeprecatedGeometricMeasure, and added error statements
Made GeneralAxesRefiner the default axes refiner for Measure Definition, overwritten by DefaultMeasure and GeometricMeasure
Created DefaultMeasure class for all the conical measure subclasses
Separated out e+e- and pp measures into separate example files
2015-03-09 <TJW>
Added ConicalGeometric measures with jet_beta and jet_gamma definitions
Added XCone measures derived from ConicalGeometric with jet_gamma = 1.0
Added GeneralAxesRefiner for use with any measure (currently defined with XCone measure)
Added axes_numerator in MeasureDefinition to define the momentum scaling for minimization (currently only defined for Conical Geometric measure)
2014-11-28 <TJW>
Minor change to default parameters in axes definition
2014-10-08 <TJW>
Updated example file with new e+e- measure definitions
Added measure type to measure definition descriptions
Changed order of parameters in new axes definitions
Added standard C++ epsilon definition to GeneralERecombiner
2014-10-07 <TJW>
Updated example_advanced_usage with new axes choices
Reversed inheritance of NormalizedMeasure and NormalizedCutoffMeasure (and Geometric) back to original
Storing _RcutoffSq as separate variable, and recalculating it in NormalizedMeasure
Cleaning up ExclusiveCombinatorialJetAxes and added comments to explain the process
Fixed memory leaks using delete_recombiner_when_unused()
Fixed manual axes bug in Njettiness
Cleaned up enum definitions
2014-10-01 <TJW>
Added new parameterized recombination scheme to Winner-Take-All recombiner
Created Winner-Take-All GenKT and general Recomb GenKT axes finders and onepass versions
Created new N choose M minimization axis finder, created N choose M WTA GenKT axis finder as example
Removed NPass as constructor argument in AxesDefinition, made it set through protected method
Removed TauMode as constructor argument in MeasureDefinition, made it set through protected method
Flipped inheritance of NormalizedMeasure and NormalizedCutoffMeasure (same for Geometric) to remove error of squaring the integer maximum
Created new MeasureType enum to allow user to choose between pp and ee variables (ee variables need testing)
Updated MeasureDefinition constructors to take in extra MeasureType parameter (but defaulted to pp variables)
Added new Default TauMode argument
Fixed unsigned integers in various places
Added setAxes method to NjettinessPlugin
2014-08-26 <JDT>
Enhanced TauComponents to include more infomation
NjettinessExtras now inherits from TauComponents
Removed getPartition from Njettiness, to avoid code duplication
Fixed double calculating issue in NjettinessPlugin::run_clustering()
Now AxesDefinition can use measure information without running AxesRefiner
Added TauStructure so the jets returned by TauComponents can know their tau value.
2014-08-25 <JDT>
Merged MeasureDefinition and MeasureFunction into new MeasureDefinition.
Merged StartingAxesFinder and AxesDefinition into new AxesDefinition.
Renamed AxesFinder.cc/hh to AxesRefiner.cc/hh
Renamed NjettinessDefinition.cc/hh to AxesDefinition.cc/hh
Renamed MeasureFunction.cc/hh to MeasureDefinition.cc/hh
Renaming result() function in MeasureDefinition to be consistent with Nsubjettiness interface.
Split off TauComponents into separate header
Added TauPartition class for readability of partitioning
Moved NjettinessExtras into TauComponents, as this will eventually be the logical location
Added cross check of new MeasureDefinition and AxesDefinition in example_advanced_usage.
Lots of comments updated.
Changed version number to 2.2.0-alpha-dev, since this is going to be a bigger update than I had originally thought
2014-08-20 <JDT>
Incorporated code in NjettinessPlugin to handle FJ3.1 treatment of auto_ptr (thanks Gregory)
Changed version number to 2.1.1-alpha-dev
Split AxesFinder into StartingAxesFinder and RefiningAxesFinder for clarity.
Manual axes mode now corresponds to a NULL StartingAxesFinder in Njettiness (so removed AxesFinderFromUserInput)
Added AxesRefiningMode to make selection of minimization routine more transparent in Njettiness
Moved sq() to more appropriate place in AxesFinder.hh
Rearranged Nsubjettiness.hh to make the old code less visible.
Renamed AxesFinderFromOnePassMinimization -> AxesFinderFromConicalMinimization
Renamed DefaultUnnormalizedMeasureFunction -> ConicalUnnormalizedMeasureFunction
Removed supportsMultiPassMinimization() from MeasureDefinition since any One Pass algorithm can be multipass.
2014-07-09 <JDT>
Changed version for 2.1.0 release.
Updated NEWS to reflect 2.1.0 release
2014-07-07 <JDT>
Added forward declaration of options in NjettinessDefinition for readability.
Updated README with some clarifications
Added usage information in the example file
Reran svn propset svn:keywords Id *.cc *.hh
2014-06-25 <JDT>
Declaring release candidate of 2.1
2014-06-11 <JDT>
Fixed virtual destructor issue in AxesFinder
Changing copy() to create() in NjettinessDefinition for "new" clarity
Converted some SharedPtr to regular pointers in NjettinessDefinition to be consistent on meaning of "create" commands.
2014-06-10 <JDT>
Slight modification of example_advanced_usage
Fixed bug in GeometricCutoffMeasure (incorrect denominator setting)
2014-06-05 <JDT>
Moved public before private in the .hh files for readability
Starting process of switching to SharedPtr internally
Clean up of AxesFinderFromGeometricMinimization
Simplified AxesFinder interface such that it doesn't know about starting axes finders (this is now handled in Njettiness).
Added const qualifiers in Njettiness
2014-06-04 <JDT>
Implemented AxesDefinition class
Added descriptions to AxesDefinition and MeasureDefinition
Simplified example_advanced_usage with new Definitions
Made copy constructor private for Njettiness, to avoid copying
2014-06-03 <JDT>
Implemented remaining suggestions from FJ authors (Thanks!)
Fixed bug in example_advanced_usage where wrong beta value was used for NjettinessPlugin tests.
Removed NANs as signals for number of parameters in Nsubjettiness and NjettinessPlugin
Reduced the number of allowed parameters from 4 to 3.
Wrapped NEWS to 80 characters
Added MeasureDefinition as way to safely store information about the measures used
Converted a few NANs to std::numeric_limits<double>::quiet_NaN() when a parameter shouldn't be used.
Added AxesStruct and MeasureStruct to simplify the form of example_advanced_usage
Added example_v1p0p3 to check for backwards compatibility with v1.0.3
Changed the names of the MeasureFunctions in order to avoid conflicts with the new MeasureDefinitions
Fixed bug in correlation between subjets and tau values in NjettinessPlugin
Added currentTauComponents to Nsubjettiness
Added subTau information to example_basic_usage
Added file NjettinessDefinition to hold MeasureDefinition
Changed Njettiness constructors to treat MeasureSpecification as primary object
Fixed segmentation fault with ClusterSequenceAreas
2014-06-02 <JDT>
Implemented many suggestions from FJ authors (Thanks!)
Removed FastJet 2 specific code
Made sq() function into internal namespace (as "inline static" to avoid conflicts with other packages)
Made setAxes() take const reference argument
Rewrapped README to 80 characters and updated/improved some of the descriptions
Clarified NEWS about what parts of the Nsubjettiness code is backwards compatible with v1.0.3
Clarified the para choices in Nsubjettiness constructor
2014-04-30 <JDT>
Added (void)(n_jets) in AxesFinder.hh to fix unused-parameter warning
2014-04-29 <JDT>
Added manual definition of NAN for compilers that don't have it.
Removed a few more unused parameters for compilation
2014-04-22 <JDT>
Turned on -Wunused-parameter compiler flag to fix ATLAS compile issues.
2014-04-18 <JDT>
Tweaks to NEWS and README. Preparing for 2.0.0-rc1 release.
2014-04-16 <JDT>
Decided that enough has changed that this should be v2.0
Added Id tags
2014-04-14 <JDT>
Added get_partition_list to MeasureFunction
Removed do_cluster from MeasureFunction (no longer needed)
Fixed bug with NjettinessPlugin where jets were listed in backwards order from axes.
Removed various commented out pieces of code.
2014-03-16 <JDT>
Added partitioning information to Nsubjettiness
Partitioning is now calculated in MeasureFunction and stored by Njettiness.
Rewrote MeasureFunction result() to call result_from_partition()
Added subjet (and constituent counting) information to example_basic_usage
Commented out redundant "getJets" function
2014-02-25 <JDT>
Added access to seedAxes used for one-pass minimization routines.
Added axes print out to example_basic_usage, and fixed too many PrintJets declarations
2014-02-24 <JDT>
Fixed embarrassing bug with min_axes (error introduced after v1.0 to make it the same as onepass_kt)
Simplified GeometricMeasure and added possibility of beta dependence
Commented out WTA2 options, since those have not been fully tested (nor do they seem particularly useful at the moment). They can be reinstated if the physics case can be made to use them.
Split example into example_basic_usage and example_advanced_usage
2014-01-28 <TJ>
Added new options in WinnerTakeAllRecombiner to use either pT or pT^2/E to recombine particles
2014-01-24 <JDT>
Added access to currentAxes from Nsubjettiness.
2014-01-18 <JDT>
Added beam regions to MeasureFunction, correspondingly renamed functions to have jet and beam regions
Renamed functions in TauComponents for consistency with MeasureFunction
Adding debugging code to AxesFinderFromOnePassMinimization::getAxes
Worked extensively on example.cc to make sure that it tests all available options.
Rewrote PrintJets command in example.cc for later improvements
Converted some magic numbers to std::numeric_limits<double>::max()
2014-01-17 <JDT>
Rewrote KMeansMinimization to call OnePassMinimization, adding noise explicitly.
Removed any nothing of noise from OnePassMinimization
Removed Double32_t for root usage is Nsubjettiness
Clean up of many comments throughout the code, updating of README file
Removed unnecessary establishAxes in Njettiness
Removed bare constructor for Njettiness to avoid incompatibility with enum choices, may reinstate later. Also removed setMeasureFunction, setAxesFinder for same reason
NjettinessExtras now calls TauComponents
2014-01-16 <TJ>
Moved minimization functions to OnePassMinimization, changed KMeansMinimization class to simply call OnePassMinimization a specified number of times
Added extra tau function in TauComponents for users to get tau directly
Changed radius parameter in AxesFinderFromExclusiveJet subclasses to use max_allowable_R
Updated example.ref to account for changes due to change in radius parameter
2014-01-15 <TJ>
Changed NjettinessComponents to TauComponents
Updated MeasureFunction with "result" function that returns TauComponents object
TauComponents changed to calculate all tau components given subtaus_numerator and tau_denominator
Njettiness updated to return TauComponents object rather than individual components
Nsubjettiness and NjettinessPlugin updated to have option for 4th parameter
2014-01-14 <TJ>
Added NjettinessComponents class so Njettiness does not recalculate tau values
Removed old Njettiness constructors, updated Nsubjettiness and NjettinessPlugin constructors to use new constructor
Added geometric minimization to OnePassAxesFinders
Created new Njettiness function to set OnePassAxesFinders to reduce code
Updated LightLikeAxis with ConvertToPseudoJet function
Updated README with new functionality of code
2014-01-12 <TJ>
Removed NsubGeometricParameters in all functions/constructors, replaced with Rcutoff double
Added three new measure mode options where Rcutoff is declared explicitly in parameters
Added checks so minimization axes finders are not used for geometric measures
AxesFinderFromOnePassMinimization class created as child of AxesFinderFromKmeansMinimization
Added new NsubjettinessRatio constructor to include MeasureMode option
Moved AxesFinder and MeasureFunction declarations from AxesMode and MeasureMode into separate Njettiness function
Removed R0 from AxesFinderFromKmeansMinimization
Changed example.cc to get rid of use of NsubGeometricParameters
2014-01-9 <TJ>
Removed NsubParameters in all functions/constructors, replaced with three separate parameters
Added checks for correct number of parameters in Njettiness constructor
2014-01-8 <TJ>
Removed normalization information from Nsubjettiness
Added flag to MeasureFunction to give option of using the denominator
Split DefaultMeasure into separate normalized and unnormalized classes
2014-01-7 <TJ>
Added capability of choosing a specific Measure in Njettiness
Added new Nsubjettiness constructor to allow choice of both AxesMode and MeasureMode
2014-01-6 <TJ>
Updated copyright information
Fixed bug in WinnerTakeAllRecombiner
Moved KMeansParameters to AxesFinder
Updated README with descriptions of new header files
2013-12-30 <TJ>
Changed name of MeasureFunctor to MeasureFunction
Created separate .hh/.cc files for MeasureFunction, AxesFinder, and WinnerTakeAllRecombiner
Updated Makefile to account for new files
Removed getMinimumAxes in AxesFinderFromKMeansMinimization, consolidated with getAxes
Updated comments on classes and major functions
2013-12-22 <TJ>
Created .cc files and moved all function definitions into .cc files
Updated Makefile to account for new .cc files
2013-11-12 <TJ>
Added to fjcontrib svn
2013-11-12 <jthaler>
Debugging svn
2013-11-11 <TJ>
Changed MeasureFunctor to separately treat tau numerator and denominator
Changed some of the function names in MeasureFunctor. Should not affect users
Added more informative function names to Njettiness.
Njettiness now allows finding unnormalized tau values
Added WTARecombiner to define winner-take-all axes
Added various WTA options to AxesMode
Added setAxes to Nsubjettiness
Added NsubjettinessRatio function
2013-08-26 <jthaler>
Added inlines to fix compile issue
Put some of the minimization code inside of the AxesFinderFromKmeansMinimization class
2013-02-23 <jthaler>
Fixed dependency issue (now using make depend)
2013-02-22 <jthaler>
Fixed memory management and failed make check issues.
2013-02-21 <jthaler>
First version submitted to fjcontrib
2013-02-20 <jthaler>
Initial creation based on previous plugin hosted at http://www.jthaler.net/jets/
Index: contrib/contribs/Nsubjettiness/trunk/MeasureDefinition.cc
===================================================================
--- contrib/contribs/Nsubjettiness/trunk/MeasureDefinition.cc (revision 1315)
+++ contrib/contribs/Nsubjettiness/trunk/MeasureDefinition.cc (revision 1316)
@@ -1,628 +1,627 @@
// Nsubjettiness Package
// Questions/Comments? jthaler@jthaler.net
//
// Copyright (c) 2011-14
// Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
//
// $Id$
//----------------------------------------------------------------------
// This file is part of FastJet contrib.
//
// It is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// It is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this code. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------
// #include "AxesRefiner.hh"
#include "MeasureDefinition.hh"
#include <iomanip>
FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
namespace contrib {
///////
//
// Measure Function
//
///////
//descriptions updated to include measure type
std::string DefaultMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Default Measure (should not be used directly)";
return stream.str();
};
std::string NormalizedMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Normalized Measure (beta = " << _beta << ", R0 = " << _R0 << ")";
return stream.str();
};
std::string UnnormalizedMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Unnormalized Measure (beta = " << _beta << ", in GeV)";
return stream.str();
};
std::string NormalizedCutoffMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Normalized Cutoff Measure (beta = " << _beta << ", R0 = " << _R0 << ", Rcut = " << _Rcutoff << ")";
return stream.str();
};
std::string UnnormalizedCutoffMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Unnormalized Cutoff Measure (beta = " << _beta << ", Rcut = " << _Rcutoff << ", in GeV)";
return stream.str();
};
//std::string DeprecatedGeometricMeasure::description() const {
// std::stringstream stream;
// stream << std::fixed << std::setprecision(2)
// << "Deprecated Geometric Measure (beta = " << _jet_beta << ", in GeV)";
// return stream.str();
//};
//std::string DeprecatedGeometricCutoffMeasure::description() const {
// std::stringstream stream;
// stream << std::fixed << std::setprecision(2)
// << "Deprecated Geometric Cutoff Measure (beta = " << _jet_beta << ", Rcut = " << _Rcutoff << ", in GeV)";
// return stream.str();
//};
std::string ConicalMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Conical Measure (beta = " << _beta << ", Rcut = " << _Rcutoff << ", in GeV)";
return stream.str();
};
std::string OriginalGeometricMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Original Geometric Measure (Rcut = " << _Rcutoff << ", in GeV)";
return stream.str();
};
std::string ModifiedGeometricMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Modified Geometric Measure (Rcut = " << _Rcutoff << ", in GeV)";
return stream.str();
};
std::string ConicalGeometricMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "Conical Geometric Measure (beta = " << _jet_beta << ", gamma = " << _beam_gamma << ", Rcut = " << _Rcutoff << ", in GeV)";
return stream.str();
};
std::string XConeMeasure::description() const {
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
<< "XCone Measure (beta = " << _jet_beta << ", Rcut = " << _Rcutoff << ", in GeV)";
return stream.str();
};
// Return all of the necessary TauComponents for specific input particles and axes
TauComponents MeasureDefinition::component_result(const std::vector<fastjet::PseudoJet>& particles,
const std::vector<fastjet::PseudoJet>& axes) const {
// first find partition
TauPartition partition = get_partition(particles,axes);
// then return result calculated from partition
return component_result_from_partition(partition,axes);
}
TauPartition MeasureDefinition::get_partition(const std::vector<fastjet::PseudoJet>& particles,
const std::vector<fastjet::PseudoJet>& axes) const {
TauPartition myPartition(axes.size());
// Figures out the partiting of the input particles into the various jet pieces
// Based on which axis the parition is closest to
for (unsigned i = 0; i < particles.size(); i++) {
// find minimum distance; start with beam (-1) for reference
int j_min = -1;
double minRsq;
if (has_beam()) minRsq = beam_distance_squared(particles[i]);
else minRsq = std::numeric_limits<double>::max(); // make it large value
// check to see which axis the particle is closest to
for (unsigned j = 0; j < axes.size(); j++) {
double tempRsq = jet_distance_squared(particles[i],axes[j]); // delta R distance
if (tempRsq < minRsq) {
minRsq = tempRsq;
j_min = j;
}
}
if (j_min == -1) {
assert(has_beam()); // should have beam for this to make sense.
myPartition.push_back_beam(particles[i],i);
} else {
myPartition.push_back_jet(j_min,particles[i],i);
}
}
return myPartition;
}
// Uses existing partition and calculates result
// TODO: Can we cache this for speed up when doing area subtraction?
TauComponents MeasureDefinition::component_result_from_partition(const TauPartition& partition,
const std::vector<fastjet::PseudoJet>& axes) const {
std::vector<double> jetPieces(axes.size(), 0.0);
double beamPiece = 0.0;
double tauDen = 0.0;
if (!has_denominator()) tauDen = 1.0; // if no denominator, then 1.0 for no normalization factor
// first find jet pieces
for (unsigned j = 0; j < axes.size(); j++) {
std::vector<PseudoJet> thisPartition = partition.jet(j).constituents();
for (unsigned i = 0; i < thisPartition.size(); i++) {
jetPieces[j] += jet_numerator(thisPartition[i],axes[j]); //numerator jet piece
if (has_denominator()) tauDen += denominator(thisPartition[i]); // denominator
}
}
// then find beam piece
if (has_beam()) {
std::vector<PseudoJet> beamPartition = partition.beam().constituents();
for (unsigned i = 0; i < beamPartition.size(); i++) {
beamPiece += beam_numerator(beamPartition[i]); //numerator beam piece
if (has_denominator()) tauDen += denominator(beamPartition[i]); // denominator
}
}
// create jets for storage in TauComponents
std::vector<PseudoJet> jets = partition.jets();
return TauComponents(_tau_mode, jetPieces, beamPiece, tauDen, jets, axes);
}
// new methods added to generalize energy and angle squared for different measure types
double DefaultMeasure::energy(const PseudoJet& jet) const {
double energy;
switch (_measure_type) {
case pt_R :
case perp_lorentz_dot :
energy = jet.perp();
break;
case E_theta :
case lorentz_dot :
energy = jet.e();
break;
default : {
assert(_measure_type == pt_R || _measure_type == E_theta || _measure_type == lorentz_dot || _measure_type == perp_lorentz_dot);
energy = std::numeric_limits<double>::quiet_NaN();
break;
}
}
return energy;
}
double DefaultMeasure::angleSquared(const PseudoJet& jet1, const PseudoJet& jet2) const {
double pseudoRsquared;
switch(_measure_type) {
case pt_R : {
pseudoRsquared = jet1.squared_distance(jet2);
break;
}
case E_theta : {
// doesn't seem to be a fastjet built in for this
double dot = jet1.px()*jet2.px() + jet1.py()*jet2.py() + jet1.pz()*jet2.pz();
double norm1 = sqrt(jet1.px()*jet1.px() + jet1.py()*jet1.py() + jet1.pz()*jet1.pz());
double norm2 = sqrt(jet2.px()*jet2.px() + jet2.py()*jet2.py() + jet2.pz()*jet2.pz());
double costheta = dot/(norm1 * norm2);
if (costheta > 1.0) costheta = 1.0; // Need to handle case of numerical overflow
double theta = acos(costheta);
pseudoRsquared = theta*theta;
break;
}
case lorentz_dot : {
double dotproduct = dot_product(jet1,jet2);
pseudoRsquared = 2.0 * dotproduct / (jet1.e() * jet2.e());
break;
}
case perp_lorentz_dot : {
PseudoJet lightJet = lightFrom(jet2); // assuming jet2 is the axis
double dotproduct = dot_product(jet1,lightJet);
pseudoRsquared = 2.0 * dotproduct / (lightJet.pt() * jet1.pt());
break;
}
default : {
assert(_measure_type == pt_R || _measure_type == E_theta || _measure_type == lorentz_dot || _measure_type == perp_lorentz_dot);
pseudoRsquared = std::numeric_limits<double>::quiet_NaN();
break;
}
}
return pseudoRsquared;
}
///////
//
// Axes Refining
//
///////
// uses minimization of N-jettiness to continually update axes until convergence.
// The function returns the axes found at the (local) minimum
// This is the general axes refiner that can be used for a generic measure (but is
// overwritten in the case of the conical measure and the deprecated geometric measure)
std::vector<fastjet::PseudoJet> MeasureDefinition::get_one_pass_axes(int n_jets,
const std::vector <fastjet::PseudoJet> & particles,
const std::vector<fastjet::PseudoJet>& currentAxes,
int nAttempts,
double accuracy) const {
assert(n_jets == (int)currentAxes.size());
std::vector<fastjet::PseudoJet> seedAxes = currentAxes;
std::vector<fastjet::PseudoJet> temp_axes(seedAxes.size(),fastjet::PseudoJet(0,0,0,0));
for (unsigned int k = 0; k < seedAxes.size(); k++) {
seedAxes[k] = lightFrom(seedAxes[k]) * seedAxes[k].E(); // making light-like, but keeping energy
}
double seedTau = result(particles, seedAxes);
std::vector<fastjet::PseudoJet> bestAxesSoFar = seedAxes;
double bestTauSoFar = seedTau;
for (int i_att = 0; i_att < nAttempts; i_att++) {
std::vector<fastjet::PseudoJet> newAxes(seedAxes.size(),fastjet::PseudoJet(0,0,0,0));
std::vector<fastjet::PseudoJet> summed_jets(seedAxes.size(), fastjet::PseudoJet(0,0,0,0));
// find closest axis and assign to that
for (unsigned int i = 0; i < particles.size(); i++) {
// start from unclustered beam measure
int minJ = -1;
double minDist = beam_distance_squared(particles[i]);
// which axis am I closest to?
for (unsigned int j = 0; j < seedAxes.size(); j++) {
double tempDist = jet_distance_squared(particles[i],seedAxes[j]);
if (tempDist < minDist) {
minDist = tempDist;
minJ = j;
}
}
// if not unclustered, then cluster
if (minJ != -1) {
summed_jets[minJ] += particles[i]; // keep track of energy to use later.
if (_useAxisScaling) {
double pseudoMomentum = dot_product(lightFrom(seedAxes[minJ]),particles[i]) + accuracy; // need small offset to avoid potential divide by zero issues
double axis_scaling = (double)jet_numerator(particles[i], seedAxes[minJ])/pseudoMomentum;
newAxes[minJ] += particles[i]*axis_scaling;
}
}
}
if (!_useAxisScaling) newAxes = summed_jets;
// convert the axes to LightLike and then back to PseudoJet
for (unsigned int k = 0; k < newAxes.size(); k++) {
if (newAxes[k].perp() > 0) {
newAxes[k] = lightFrom(newAxes[k]);
newAxes[k] *= summed_jets[k].E(); // scale by energy to get sensible result
}
}
// calculate tau on new axes
double newTau = result(particles, newAxes);
// find the smallest value of tau (and the corresponding axes) so far
if (newTau < bestTauSoFar) {
bestAxesSoFar = newAxes;
bestTauSoFar = newTau;
}
if (fabs(newTau - seedTau) < accuracy) {// close enough for jazz
seedAxes = newAxes;
seedTau = newTau;
break;
}
seedAxes = newAxes;
seedTau = newTau;
}
// return the axes corresponding to the smallest tau found throughout all iterations
// this is to prevent the minimization from returning a non-minimized of tau due to potential oscillations around the minimum
return bestAxesSoFar;
}
// One pass minimization for the DefaultMeasure
// Given starting axes, update to find better axes by using Kmeans clustering around the old axes
template <int N>
std::vector<LightLikeAxis> DefaultMeasure::UpdateAxesFast(const std::vector <LightLikeAxis> & old_axes,
const std::vector <fastjet::PseudoJet> & inputJets,
double accuracy
) const {
assert(old_axes.size() == N);
- // some storage, declared static to save allocation/re-allocation costs
- static thread_local LightLikeAxis new_axes[N];
- static thread_local fastjet::PseudoJet new_jets[N];
+ LightLikeAxis new_axes[N];
+ fastjet::PseudoJet new_jets[N];
for (int n = 0; n < N; ++n) {
new_axes[n].reset(0.0,0.0,0.0,0.0);
new_jets[n].reset_momentum(0.0,0.0,0.0,0.0);
}
double precision = accuracy; //TODO: actually cascade this in
/////////////// Assignment Step //////////////////////////////////////////////////////////
std::vector<int> assignment_index(inputJets.size());
int k_assign = -1;
for (unsigned i = 0; i < inputJets.size(); i++){
double smallestDist = std::numeric_limits<double>::max(); //large number
for (int k = 0; k < N; k++) {
double thisDist = old_axes[k].DistanceSq(inputJets[i]);
if (thisDist < smallestDist) {
smallestDist = thisDist;
k_assign = k;
}
}
if (smallestDist > sq(_Rcutoff)) {k_assign = -1;}
assignment_index[i] = k_assign;
}
//////////////// Update Step /////////////////////////////////////////////////////////////
double distPhi, old_dist;
for (unsigned i = 0; i < inputJets.size(); i++) {
int old_jet_i = assignment_index[i];
if (old_jet_i == -1) {continue;}
const fastjet::PseudoJet& inputJet_i = inputJets[i];
LightLikeAxis& new_axis_i = new_axes[old_jet_i];
double inputPhi_i = inputJet_i.phi();
double inputRap_i = inputJet_i.rap();
// optimize pow() call
// add noise (the precision term) to make sure we don't divide by zero
if (_beta == 1.0) {
double DR = std::sqrt(sq(precision) + old_axes[old_jet_i].DistanceSq(inputJet_i));
old_dist = 1.0/DR;
} else if (_beta == 2.0) {
old_dist = 1.0;
} else if (_beta == 0.0) {
double DRSq = sq(precision) + old_axes[old_jet_i].DistanceSq(inputJet_i);
old_dist = 1.0/DRSq;
} else {
old_dist = sq(precision) + old_axes[old_jet_i].DistanceSq(inputJet_i);
old_dist = std::pow(old_dist, (0.5*_beta-1.0));
}
// TODO: Put some of these addition functions into light-like axes
// rapidity sum
new_axis_i.set_rap(new_axis_i.rap() + inputJet_i.perp() * inputRap_i * old_dist);
// phi sum
distPhi = inputPhi_i - old_axes[old_jet_i].phi();
if (fabs(distPhi) <= M_PI){
new_axis_i.set_phi( new_axis_i.phi() + inputJet_i.perp() * inputPhi_i * old_dist );
} else if (distPhi > M_PI) {
new_axis_i.set_phi( new_axis_i.phi() + inputJet_i.perp() * (-2*M_PI + inputPhi_i) * old_dist );
} else if (distPhi < -M_PI) {
new_axis_i.set_phi( new_axis_i.phi() + inputJet_i.perp() * (+2*M_PI + inputPhi_i) * old_dist );
}
// weights sum
new_axis_i.set_weight( new_axis_i.weight() + inputJet_i.perp() * old_dist );
// momentum magnitude sum
new_jets[old_jet_i] += inputJet_i;
}
// normalize sums
for (int k = 0; k < N; k++) {
if (new_axes[k].weight() == 0) {
// no particles were closest to this axis! Return to old axis instead of (0,0,0,0)
new_axes[k] = old_axes[k];
} else {
new_axes[k].set_rap( new_axes[k].rap() / new_axes[k].weight() );
new_axes[k].set_phi( new_axes[k].phi() / new_axes[k].weight() );
new_axes[k].set_phi( std::fmod(new_axes[k].phi() + 2*M_PI, 2*M_PI) );
new_axes[k].set_mom( std::sqrt(new_jets[k].modp2()) );
}
}
std::vector<LightLikeAxis> new_axes_vec(N);
for (unsigned k = 0; k < N; ++k) new_axes_vec[k] = new_axes[k];
return new_axes_vec;
}
// Given N starting axes, this function updates all axes to find N better axes.
// (This is just a wrapper for the templated version above.)
// TODO: Consider removing this in a future version
std::vector<LightLikeAxis> DefaultMeasure::UpdateAxes(const std::vector <LightLikeAxis> & old_axes,
const std::vector <fastjet::PseudoJet> & inputJets,
double accuracy) const {
int N = old_axes.size();
switch (N) {
case 1: return UpdateAxesFast<1>(old_axes, inputJets, accuracy);
case 2: return UpdateAxesFast<2>(old_axes, inputJets, accuracy);
case 3: return UpdateAxesFast<3>(old_axes, inputJets, accuracy);
case 4: return UpdateAxesFast<4>(old_axes, inputJets, accuracy);
case 5: return UpdateAxesFast<5>(old_axes, inputJets, accuracy);
case 6: return UpdateAxesFast<6>(old_axes, inputJets, accuracy);
case 7: return UpdateAxesFast<7>(old_axes, inputJets, accuracy);
case 8: return UpdateAxesFast<8>(old_axes, inputJets, accuracy);
case 9: return UpdateAxesFast<9>(old_axes, inputJets, accuracy);
case 10: return UpdateAxesFast<10>(old_axes, inputJets, accuracy);
case 11: return UpdateAxesFast<11>(old_axes, inputJets, accuracy);
case 12: return UpdateAxesFast<12>(old_axes, inputJets, accuracy);
case 13: return UpdateAxesFast<13>(old_axes, inputJets, accuracy);
case 14: return UpdateAxesFast<14>(old_axes, inputJets, accuracy);
case 15: return UpdateAxesFast<15>(old_axes, inputJets, accuracy);
case 16: return UpdateAxesFast<16>(old_axes, inputJets, accuracy);
case 17: return UpdateAxesFast<17>(old_axes, inputJets, accuracy);
case 18: return UpdateAxesFast<18>(old_axes, inputJets, accuracy);
case 19: return UpdateAxesFast<19>(old_axes, inputJets, accuracy);
case 20: return UpdateAxesFast<20>(old_axes, inputJets, accuracy);
default: std::cout << "N-jettiness is hard-coded to only allow up to 20 jets!" << std::endl;
return std::vector<LightLikeAxis>();
}
}
// uses minimization of N-jettiness to continually update axes until convergence.
// The function returns the axes found at the (local) minimum
std::vector<fastjet::PseudoJet> DefaultMeasure::get_one_pass_axes(int n_jets,
const std::vector <fastjet::PseudoJet> & inputJets,
const std::vector<fastjet::PseudoJet>& seedAxes,
int nAttempts,
double accuracy
) const {
// if the measure type doesn't use the pt_R metric, then the standard minimization scheme should be used
if (_measure_type != pt_R) {
return MeasureDefinition::get_one_pass_axes(n_jets, inputJets, seedAxes, nAttempts, accuracy);
}
// convert from PseudoJets to LightLikeAxes
std::vector< LightLikeAxis > old_axes(n_jets, LightLikeAxis(0,0,0,0));
for (int k = 0; k < n_jets; k++) {
old_axes[k].set_rap( seedAxes[k].rap() );
old_axes[k].set_phi( seedAxes[k].phi() );
old_axes[k].set_mom( seedAxes[k].modp() );
}
// Find new axes by iterating (only one pass here)
std::vector< LightLikeAxis > new_axes(n_jets, LightLikeAxis(0,0,0,0));
double cmp = std::numeric_limits<double>::max(); //large number
int h = 0;
while (cmp > accuracy && h < nAttempts) { // Keep updating axes until near-convergence or too many update steps
cmp = 0.0;
h++;
new_axes = UpdateAxes(old_axes, inputJets,accuracy); // Update axes
for (int k = 0; k < n_jets; k++) {
cmp += old_axes[k].Distance(new_axes[k]);
}
cmp = cmp / ((double) n_jets);
old_axes = new_axes;
}
// Convert from internal LightLikeAxes to PseudoJet
std::vector<fastjet::PseudoJet> outputAxes;
for (int k = 0; k < n_jets; k++) {
fastjet::PseudoJet temp = old_axes[k].ConvertToPseudoJet();
outputAxes.push_back(temp);
}
// this is used to debug the minimization routine to make sure that it works.
bool do_debug = false;
if (do_debug) {
// get this information to make sure that minimization is working properly
double seed_tau = result(inputJets, seedAxes);
double outputTau = result(inputJets, outputAxes);
assert(outputTau <= seed_tau);
}
return outputAxes;
}
//// One-pass minimization for the Deprecated Geometric Measure
//// Uses minimization of the geometric distance in order to find the minimum axes.
//// It continually updates until it reaches convergence or it reaches the maximum number of attempts.
//// This is essentially the same as a stable cone finder.
//std::vector<fastjet::PseudoJet> DeprecatedGeometricCutoffMeasure::get_one_pass_axes(int n_jets,
// const std::vector <fastjet::PseudoJet> & particles,
// const std::vector<fastjet::PseudoJet>& currentAxes,
// int nAttempts,
// double accuracy) const {
//
// assert(n_jets == (int)currentAxes.size()); //added int casting to get rid of compiler warning
//
// std::vector<fastjet::PseudoJet> seedAxes = currentAxes;
// double seedTau = result(particles, seedAxes);
//
// for (int i = 0; i < nAttempts; i++) {
//
// std::vector<fastjet::PseudoJet> newAxes(seedAxes.size(),fastjet::PseudoJet(0,0,0,0));
//
// // find closest axis and assign to that
// for (unsigned int i = 0; i < particles.size(); i++) {
//
// // start from unclustered beam measure
// int minJ = -1;
// double minDist = beam_distance_squared(particles[i]);
//
// // which axis am I closest to?
// for (unsigned int j = 0; j < seedAxes.size(); j++) {
// double tempDist = jet_distance_squared(particles[i],seedAxes[j]);
// if (tempDist < minDist) {
// minDist = tempDist;
// minJ = j;
// }
// }
//
// // if not unclustered, then cluster
// if (minJ != -1) newAxes[minJ] += particles[i];
// }
//
// // calculate tau on new axes
// seedAxes = newAxes;
// double tempTau = result(particles, newAxes);
//
// // close enough to stop?
// if (fabs(tempTau - seedTau) < accuracy) break;
// seedTau = tempTau;
// }
//
// return seedAxes;
//}
// Go from internal LightLikeAxis to PseudoJet
fastjet::PseudoJet LightLikeAxis::ConvertToPseudoJet() {
double px, py, pz, E;
E = _mom;
pz = (std::exp(2.0*_rap) - 1.0) / (std::exp(2.0*_rap) + 1.0) * E;
px = std::cos(_phi) * std::sqrt( std::pow(E,2) - std::pow(pz,2) );
py = std::sin(_phi) * std::sqrt( std::pow(E,2) - std::pow(pz,2) );
return fastjet::PseudoJet(px,py,pz,E);
}
} //namespace contrib
FASTJET_END_NAMESPACE
Index: contrib/contribs/Nsubjettiness/trunk/NEWS
===================================================================
--- contrib/contribs/Nsubjettiness/trunk/NEWS (revision 1315)
+++ contrib/contribs/Nsubjettiness/trunk/NEWS (revision 1316)
@@ -1,103 +1,103 @@
-------------------------
Version 2
-------------------------
This is a streamlining of the N-subjettiness code, developed mainly by TJ
Wilkason. The core functionality is unchanged, but classes have been
dramatically reorganized to allow for later expansion. Because the API for
Njettiness has changed, we have called this v2 (http://semver.org).
Note that we have maintain backwards compatibility for the typical ways that
Nsubjettiness was used. In particular, all of the Nsubjettiness class code in
the example file from v1.0.3 still compiles, as does the NjettinessPlugin class
code that uses the default measure.
The key new features are:
* NsubjettinessRatio: Direct access to tau_N / tau_M (the most requested
feature)
* MeasureDefinition to allow access to normalized and unnormalized measures
* AxesDefinition to allow for access to more general axes modes
* Winner-Take-All recombination axes: a faster way to find axes than beta=1
minimization, but with comparable performance.
* TauComponents to get access to the pieces of the N-(sub)jettiness
calculation.
* TauExtras to get complete access to get partitioning and axes information.
* For clarity, split the example file into an example_basic_usage and
example_advanced_usage (and example_advanced_usage_ee for e+e- collisions).
* In Nsubjettiness, access to seedAxes() and currentAxes() to figure out the
axes used before and after minimization.
* In Nsubjettiness, access to currentSubjets() to get the subjet fourvectors.
* (v2.2) XConePlugin, which improves on the previous NjettinessPlugin to use
N-jettiness as a jet finder using the new ConicalGeometric measure.
--- 2.2.6: (in dev) Added "thread_local" for thread safety (thanks Tomek
+-- 2.2.6: (in dev) Removed "static" for thread safety (thanks Tomek
Procter and Andy Buckley)
-- 2.2.5: (June 6, 2018) Fixed bug involved undefined pointer for in
AxesDefinition (thanks Attila Krasznahorkay)
-- 2.2.4: (Jun 14, 2016) Fixed bug where multi-pass minimization could yield
pathological axes (thanks Gregory Soyez)
-- 2.2.3: (Apr 4, 2016) Fixed bug where a jet with fewer than N constituents
could give random value for tau_N (thanks Nathan Hartland)
-- 2.2.2: (Mar 29, 2016) Updating SharedPtr interface for FJ 3.2
-- 2.2.1: (Sept 28, 2015) Fix of small Makefile bug
-- 2.2.0: (Sept 7, 2015) Inclusion of the XCone jet algorithm, as well as a
few new measures, including the "conical geometric" measure and
options for e+e- colliders. Improvement of the
Measure/AxesDefinition interface to allow for direct
use in calculations.
* Fixed bug where MultiPass_Axes did not actually minimize
* Fixed floating point error with infinity^2 in various measures
-- 2.1.0: (July 9, 2014) Inclusion of Measure/AxesDefinition interface.
This was the first publicly available version of Nsubjettiness v2.
-- 2.0.0: Initial release of v2.0. This was never officially made public.
-------------------------
Version 1
-------------------------
This was a new release using FastJet contrib framework, primary developed by
Jesse Thaler.
-- 1.0.3: Added inlines to fix compile issue (thanks Matthew Low)
-- 1.0.2: Fixed potential dependency issue (thanks FJ authors)
-- 1.0.1: Fixed memory leak in Njettiness.hh (thanks FJ authors)
-- 1.0.0: New release using FastJet contrib framework. This includes a new
makefile and a simplified example program.
-------------------------
Previous Versions
-------------------------
The previous versions of this code were developed initially by Ken Van Tilburg,
tweaked by Jesse Thaler, and made into a robust FastJet add on by Chris
Vermilion.
Previous versions available from:
http://jthaler.net/jets/Njettiness-0.5.1.tar.gz (Experimental Version)
http://jthaler.net/jets/Njettiness-0.4.1.tar.gz (Stable Version)
Previous version history:
-- 0.5.1: For Njettiness Plugin, added access to currentTau values and axes via
ClusterSequence::Extras class. (thanks to Dinko Ferencek and John
Paul Chou)
-- 0.5.0: Corrected fatal error in ConstituentTauValue (TauValue unaffected).
Started process of allowing for more general measures and alternative
minimization schemes. Extremely preliminary inclusion of alternative
"geometric" measure.
-- 0.4.1: Corrected bug where a too-small value of Rcut would cause the
minimization procedure to fail (thanks Marat Freytsis, Brian Shuve)
-- 0.4.0: Adding Nsubjettiness FunctionOfPseudoJet<float>. Re-organizing file
structure and doing some re-naming to clarify Njettiness vs.
Nsubjettiness. Some speedup in UpdateAxes code. (CKV)
-- 0.3.2: Returns zero instead of a segmentation fault when the number of
particles in a jet is smaller than the N value in tau_N (thanks
Grigory Ovanesyan)
-- 0.3.2: Fixed -Wshadow errors (thanks Grigory Ovanesyan)
-- 0.3.1: Fixed stray comma/semicolon compiler error (thanks Grigory Ovanesyan)
-- 0.3.1: Corrected tarbomb issue (thanks Jonathan Walsh)
-- 0.3.1: Added anti-kT seeds as option
-- 0.3.1: Fixed bug in minimization code with R_cutoff (thanks Chris Vermilion)
-- 0.3.1: Added getPartition() and getJets() functions as helper functions for
Chris Vermilion. (JT)
Index: contrib/contribs/Nsubjettiness/trunk/Makefile
===================================================================
--- contrib/contribs/Nsubjettiness/trunk/Makefile (revision 1315)
+++ contrib/contribs/Nsubjettiness/trunk/Makefile (revision 1316)
@@ -1,119 +1,119 @@
# If you are using this Makefile standalone and fastjet-config is not
# in your path, edit this line to specify the full path
FASTJETCONFIG=fastjet-config
PREFIX=`$(FASTJETCONFIG) --prefix`
CXX=g++
-CXXFLAGS= -std=c++11 -O3 -Wall -Woverloaded-virtual -g -Wunused-parameter
+CXXFLAGS= -O3 -Wall -Woverloaded-virtual -g -Wunused-parameter
install_script = $(SHELL) ../utils/install-sh
check_script = ../utils/check.sh
# global contrib-wide Makefile include may override some of the above
# variables (leading "-" means don't give an error if you can't find
# the file)
-include ../.Makefile.inc
#------------------------------------------------------------------------
# things that are specific to this contrib
NAME=Nsubjettiness
SRCS=Nsubjettiness.cc Njettiness.cc NjettinessPlugin.cc XConePlugin.cc MeasureDefinition.cc ExtraRecombiners.cc AxesDefinition.cc TauComponents.cc
EXAMPLES=example_basic_usage example_advanced_usage example_v1p0p3
EXAMPLES2=example_advanced_usage_ee
INSTALLED_HEADERS=Nsubjettiness.hh Njettiness.hh NjettinessPlugin.hh XConePlugin.hh MeasureDefinition.hh ExtraRecombiners.hh AxesDefinition.hh TauComponents.hh
#------------------------------------------------------------------------
CXXFLAGS+= $(shell $(FASTJETCONFIG) --cxxflags)
LDFLAGS += -lm $(shell $(FASTJETCONFIG) --libs)
OBJS = $(SRCS:.cc=.o)
EXAMPLES_SRCS = $(EXAMPLES:=.cc)
install_HEADER = $(install_script) -c -m 644
install_LIB = $(install_script) -c -m 644
install_DIR = $(install_script) -d
install_DATA = $(install_script) -c -m 644
install_PROGRAM = $(install_script) -c -s
install_SCRIPT = $(install_script) -c
.PHONY: clean distclean examples check install
# compilation of the code (default target)
all: lib$(NAME).a
lib$(NAME).a: $(OBJS)
ar cru lib$(NAME).a $(OBJS)
ranlib lib$(NAME).a
# building the examples
examples: $(EXAMPLES) $(EXAMPLES2)
# the following construct alloews to build each of the examples listed
# in $EXAMPLES automatically
$(EXAMPLES): % : %.o all
$(CXX) -o $@ $< -L. -l$(NAME) $(LDFLAGS)
$(EXAMPLES2): % : %.o all
$(CXX) -o $@ $< -L. -l$(NAME) $(LDFLAGS)
# check that everything went fine
check: examples
@for prog in $(EXAMPLES); do\
$(check_script) $${prog} ../data/single-event.dat || exit 1; \
done
@for prog in $(EXAMPLES2); do\
$(check_script) $${prog} ../data/single-ee-event.dat || exit 1; \
done
@echo "All tests successful"
# cleaning the directory
clean:
rm -f *~ *.o *.a
distclean: clean
rm -f lib$(NAME).a $(EXAMPLES)
# install things in PREFIX/...
install: all
$(install_DIR) $(PREFIX)/include/fastjet/contrib
for header in $(INSTALLED_HEADERS); do\
$(install_HEADER) $$header $(PREFIX)/include/fastjet/contrib/;\
done
$(install_DIR) $(PREFIX)/lib
$(install_LIB) lib$(NAME).a $(PREFIX)/lib
doxygen:
doxygen Doxyfile
depend:
makedepend -Y -- -- $(SRCS) $(EXAMPLES_SRCS)
# DO NOT DELETE
Nsubjettiness.o: Nsubjettiness.hh Njettiness.hh MeasureDefinition.hh
Nsubjettiness.o: TauComponents.hh AxesDefinition.hh
Nsubjettiness.o: ExtraRecombiners.hh
Njettiness.o: Njettiness.hh MeasureDefinition.hh TauComponents.hh
Njettiness.o: AxesDefinition.hh ExtraRecombiners.hh
NjettinessPlugin.o: NjettinessPlugin.hh Njettiness.hh MeasureDefinition.hh
NjettinessPlugin.o: TauComponents.hh AxesDefinition.hh
NjettinessPlugin.o: ExtraRecombiners.hh
XConePlugin.o: XConePlugin.hh NjettinessPlugin.hh Njettiness.hh
XConePlugin.o: MeasureDefinition.hh TauComponents.hh AxesDefinition.hh
XConePlugin.o: ExtraRecombiners.hh
MeasureDefinition.o: MeasureDefinition.hh TauComponents.hh
ExtraRecombiners.o: ExtraRecombiners.hh
AxesDefinition.o: AxesDefinition.hh MeasureDefinition.hh TauComponents.hh
AxesDefinition.o: ExtraRecombiners.hh
TauComponents.o: TauComponents.hh MeasureDefinition.hh
XConePlugin.o: XConePlugin.hh NjettinessPlugin.hh Njettiness.hh
XConePlugin.o: MeasureDefinition.hh TauComponents.hh AxesDefinition.hh
XConePlugin.o: ExtraRecombiners.hh
example_basic_usage.o: Nsubjettiness.hh Njettiness.hh MeasureDefinition.hh
example_basic_usage.o: TauComponents.hh AxesDefinition.hh
example_basic_usage.o: ExtraRecombiners.hh NjettinessPlugin.hh
example_basic_usage.o: XConePlugin.hh
example_advanced_usage.o: Nsubjettiness.hh Njettiness.hh MeasureDefinition.hh
example_advanced_usage.o: TauComponents.hh AxesDefinition.hh
example_advanced_usage.o: ExtraRecombiners.hh NjettinessPlugin.hh
example_advanced_usage.o: XConePlugin.hh
example_v1p0p3.o: Nsubjettiness.hh Njettiness.hh MeasureDefinition.hh
example_v1p0p3.o: TauComponents.hh AxesDefinition.hh
example_v1p0p3.o: ExtraRecombiners.hh NjettinessPlugin.hh

File Metadata

Mime Type
text/x-diff
Expires
Sun, Feb 23, 2:15 PM (7 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486500
Default Alt Text
(56 KB)

Event Timeline