Skip to content
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

Generalised kT Algorithm for pp collisions #71

Merged
merged 23 commits into from
Jul 30, 2024
Merged

Conversation

graeme-a-stewart
Copy link
Member

@graeme-a-stewart graeme-a-stewart commented Jul 29, 2024

Add proper support for the generalised kT algorithm for pp collisions (i.e., operating in $(y, \phi)$ space).

Added a JetAlgorithm type for generalised kT, viz. GenKt.

Strategies are restructured to be able to be driven by only the power, or the algorithm, or (for GenKt) both. A new function, get_algorithm_power_consistency is added that will return the "partner" of a (power/algorithm) given an (algorithm/power). If inconsistent input is given an exception is thrown.

Documentation is updated explaining how to call with either p or algorithm, or both for GenKt.

ClusterSequence now stores the power value and the algorithm and has to be initialised with both. In addition the power is always stored as a Float64.

Examples are restructured to also be able to be driven by power, or algorithm, or both. However, if neither is given then the scripts will use AntiKt and print a warning. There is also now a clearer separation between calling the jet reconstruction itself and getting the inclusive/exclusive constituents.

A test to compare Generalised kT output with FastJet for the case p=1.5 is added.

Tests are also added to run our code examples, to check none of these break (at least for the standalone Julia scripts).

Misc

  • Notebooks are now not formatted by JuliaFormatter.
  • For the tiled algorithm directly calling the real work interface is now discouraged (method is now _tiled_jet_reconstruct) to ensure that power and algorithm are handled properly in the public interface (tiled_jet_reconstruct).

Closes #49

Add a new algorithm type, GenKt, which takes an arbitrary power value.

For both strategies, add the algorithm named parameter to the argument
list, allowing the use of algorithms where both must be specified.

Add functions that will check the consistency of the power value and
algorithm type, but also set them when one or other is not specified.
Add a new list of algorithms where the power is arbitrary.

Add unittests for the consistency checks.
Reconstruction mode of GenKt now supported, when the power
value is not in [-1, 0, 1]. This is not often used, but it is a valid
algorithm choice.

For both concrete strategies and 'Best', the algorithm can now
be specified directly. If the algorithm and the power are specified
then these are checked to be consistent. If only one is specified
then the other is set to the correct value. Note that for GenKt
both are required!

ClusterSeq is adapted to record both the algorithm and the power.
Power is stored always as a Float to ensure type stability. The
constructor now needs both power and algorithm passed to it
(but this is an internal API).

set_algorithm_power_consistency! is changed to
get_algorithm_power_consistency, which returns a tuple of the
consistent power/algorithm values (can't mutate primitive types).
Adapt the basic jetreco.jl script to allow specification of power and/or algorithm.
These will be checked for consistency. Note that for GenKt both must be given!
Allow these to also be driven by p and/or algorithm from the command line
Add a few examples to the test cases
Fix the instrumented-jetrco.jl call to inclusive jets
Use logging in jetreco-constituents.jl to avoid console
logging during the test not going to /dev/null

Add tests against the example scripts
Test against FastJet's output for p=1.5
Also move these tests to a separate script to avoid the main script from
becoming too large
These are put to one side pending a restructuring to avoid trying GLMakie
tests in the CI
@graeme-a-stewart
Copy link
Member Author

There were non-trivial issues in running the examples tests, so these are put onto the backburner for now:

  • The dependencies are heavy and some for GLMakie actually seem to timeout
  • As these are CI machines, they can't correctly setup GLMakie
  • There seems to be a weird issue with setting up a different environment for the Julia nightly:
ERROR: LoadError: ArgumentError: Package Pkg does not have Random in its dependencies:
- Note that the following manifests in the load path were resolved with a potentially
  different DEV version of the current version, which may be the cause of the error.
  Try to re-resolve them in the current version, or consider deleting them if that fails:
    /tmp/jl_qr3gn6/Manifest.toml
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have Pkg checked out for development and have
  added Random as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with Pkg

I currently have no insight into that one.

The better plan is to restructure the examples to be able to run the subset which are CI friendly, thus move away from a monolithic Project.toml for all tests.

@graeme-a-stewart graeme-a-stewart merged commit d98e7db into main Jul 30, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Generalised k_T in reconstruction interfaces
1 participant