-
Notifications
You must be signed in to change notification settings - Fork 10
Durham algorithm #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Durham algorithm #73
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Durham (ee_kt_algorithm) is implemented: get_algorithm_power_consistency will set p=1 in this case automatically (this means that other power values are basically overwritten for this algorithm). Two new functions is_pp() and is_ee() take an algorithm and return true if the algorithm is for pp or e+e- collisions. A new struct, EEjet, is introduced, that shares the same abstract type as PseudoJet, but is optimised for geometric distance measures (in particular the normalised momentum is cached, as the dot product is used to calculate the angle between two jets). Various accessors are added for components of the struct, as well as derived values, such as phi and rapidity. initial_history() is moved to the ClusterSequence.jl file, which is where it should be (used by all algorithms/strategies). ClusterSequence structs are updated to take jets as vectors of the abstract type FourMomentum. The Durham EE algorithm is implemented, following much the same structure as N2Plain. The main jet variables are stored in the cluster sequence, with compact arrays used to calculate metric distances (with an array mapping from the compact array back into the jet Vector). For the generic jet_reconstruct() documentation is updated and the algorithm handling logic is changed to support the e+e- algorithms. If driven only by power, a pp algorithm is now explicitly assumed. Note: as yet the outputs are not validated against fastjet.
Planning to refactor tests so that it is easier and more scalable to test e+e- algorithms and use different input files. - Separate common parts to common.jl - Rename algorithms and input files with a "pp" label as needed
Add the ComparisonTest that encapsulates all the parameters needed to run a comparison with FastJet. Add the run_reco_test(test::ComparisonTest) function to common, which actually runs a test case. Factorise the pp-inclusive test cases, using this new improved structure. Rename fastjet inclusive JSON files so that they match the string values of the RecoStrategy enum.
Add the factor 2.0 to the distance calculation (following fastjet). Factorise the dij calculation to ensure consistency between all update methods.
Had the wrong sign for the ny and nz parts of the calculation! Add kt2 as an alias of pt2
ptmin is now a named parameter for inclusive_jets()
Remove all the debug println()s, @asserts and ee_check_consistency() checks Tests now pass (same results as FastJet), however speed is currently poor: - JetReconstruction.jl 61μs/evt - Fastjet 21μs/evt
Reduces execution time from 61μs to 58μs
Interfaces change a bit with the addition of the Durham algorithm and now specifiying the algorithm is favoured over power
Still also running old tests for the moment
As it is bad practice to include files twice in Julia, but very practical for factorising tests, have an include guard type wrapper to prevent redefining common things. Add a test description field to the ComparisonTest structure. Clean up old test structures and code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implementation of the e+e- k_T algorithm, aka Durham algorithm.
This is implemented in a new specific implementation as the distance metrics are rather different from those used for pp events. In particular, the reconstruction happens in$(\theta, \phi)$ space.
A new
EEjet
structure is used, that stores the 4-momentum, but with different internal cache variables for optimising the distance calculations.The algorithm stores the vector of
EEjet
s in theClusterSequence
as before (original and all intermediate jets) and optimised compact arrays for finding the closest jets are used.Currently the implementation is about 50% slower than FastJet (which doesn't use any compact arrays).
The consistency handling of
p
andalgorithm
is updated to take this new algorithm into account and new functions are added that map algorithms to either pp or e+e- cases.Documentation is updated to favour passing the algorithm to the reconstruction instead of implying it from the
p
value (though that mode is still supported and will imply pp reconstruction).There is also a major refactoring of tests to make testing Julia reconstruction against FastJet much easier and more independent of assumptions about the
p <-> alg
mapping. A new test file with e+e- -> H events is added and the 13TeV pp event file is renamed.Closes #51