MooreAnalysis merge requestshttps://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests2022-01-22T16:48:14+01:00https://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests/67Adapt to merge of Phys into Rec2022-01-22T16:48:14+01:00Rosen MatevAdapt to merge of Phys into RecGoes together with lhcb/Rec!2637Goes together with lhcb/Rec!2637Rosen MatevRosen Matevhttps://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests/61Don't attempt to access the LHCbIDs of neutrals when TOS matching in HltEffic...2023-12-14T17:29:12+01:00Ross John HunterDon't attempt to access the LHCbIDs of neutrals when TOS matching in HltEfficiencyCheckerFYI @mireboll
As titled. As described by #21, the TOS algorithm will attempt to access LHCbIDs of any particle, and these don't exist for a neutral -> seg fault. This MR improves that behaviour by removing the seg fault, returning `0` ...FYI @mireboll
As titled. As described by #21, the TOS algorithm will attempt to access LHCbIDs of any particle, and these don't exist for a neutral -> seg fault. This MR improves that behaviour by removing the seg fault, returning `0` for TOS efficiencies with respect to neutrals (or composites containing a neutral), and otherwise being successful such that you can still access the DEC efficiencies.
### How does it work
1) Throws a warning instead of attempting to access the LHCbIDs e.g.:
```
MCDecayTreeTuple.MCTupleToolTOSHLT2 WARNING Particle with ID LHCb.ParticleID(22) is neutral, so has no track. Adding empty container of LHCbIDs to this candidate for this track.
```
and 2) appends an empty vector to the container of LHCbIDs/track.
The algorithm then proceeds, and when it attempts to match the neutral's track, it will hit the empty container, and the algorithm will return false, meaning unmatched. This will mean that TOS efficiencies with respect to neutrals (or composites containing a neutral) will be zero.
### Follow ups
The algorithm should later be improved to be able to match neutral objects via e.g. calo clusters.Sebastien PonceRoss John HunterAlessandro ScarabottoSebastien Poncehttps://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests/48fix: move to modern cmake and fix dev4 slot on the way2021-09-25T18:30:59+02:00Christoph Hassefix: move to modern cmake and fix dev4 slot on the wayI noticed that the dev4 slot was having a problem running tests on clang due to a missing `libomp.so`. Up to Moore that library was correctly populated in the `LD_LIBRARY_PATH` so I figured it's likely a problem of `MooreAnalysis` still ...I noticed that the dev4 slot was having a problem running tests on clang due to a missing `libomp.so`. Up to Moore that library was correctly populated in the `LD_LIBRARY_PATH` so I figured it's likely a problem of `MooreAnalysis` still being old style cmake and figured the right rabbit hole to jump into is to move `MooreAnalysis` to modern cmake...
Not sure if I did it correctly though, so would be really grateful if @clemenci could have a look over this change.
(locally, it does compile, and all tests now pass)Marco Clemencicmarco.clemencic@cern.chMarco Clemencicmarco.clemencic@cern.chhttps://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests/47follow LHCb ODIN creator changes2021-09-10T21:41:43+02:00Sevda Esenfollow LHCb ODIN creator changesto go with LHCb!3036to go with LHCb!3036https://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests/32Adapt to changes in Moore persistence2021-04-28T22:01:23+02:00Sevda EsenAdapt to changes in Moore persistenceGoes together with LHCb!2978 and Moore!770Goes together with LHCb!2978 and Moore!770https://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests/22Explicitly cast python map to list for python 2/3 compatibility in HltEfficie...2021-07-08T15:58:24+02:00Ross John HunterExplicitly cast python map to list for python 2/3 compatibility in HltEfficiencyChecker wizardThis short MR should fix the errors seen in the python3 nightly build failures, for example [here](https://lhcb-nightlies.web.cern.ch/nightly/lhcb-master/build/1247/). Should be ready for testing.
FYI @dzulianiThis short MR should fix the errors seen in the python3 nightly build failures, for example [here](https://lhcb-nightlies.web.cern.ch/nightly/lhcb-master/build/1247/). Should be ready for testing.
FYI @dzulianiSebastien PonceMiroslav Saurmiroslav.saur@cern.chSebastien Poncehttps://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests/15Follow changes in Moore!5412020-07-02T17:55:00+02:00Sascha StahlFollow changes in Moore!541Adapt to change `stateProvider_with_simplified_geom` being in module `RecoConf.global_tools`.
Requires Moore!541. A dependency of Moore!542.Adapt to change `stateProvider_with_simplified_geom` being in module `RecoConf.global_tools`.
Requires Moore!541. A dependency of Moore!542.https://gitlab.cern.ch/lhcb/MooreAnalysis/-/merge_requests/14Refactor analysis scripts2020-07-02T17:55:00+02:00Rosen MatevRefactor analysis scripts(work by @rjhunter, thanks to @rmatev for opening the MR!)
During the writing of the documentation for the `HltEfficiencyChecker` package, it became apparent that the analysis scripts `scripts/hlt_line_efficiencies.py` and `scripts/hl...(work by @rjhunter, thanks to @rmatev for opening the MR!)
During the writing of the documentation for the `HltEfficiencyChecker` package, it became apparent that the analysis scripts `scripts/hlt_line_efficiencies.py` and `scripts/hlt_calculate_rates.py` needed a refactor to remove confusion, be more user-friendly and add some valuable features. The most important changes are:
* Small helper functions and the definitions of the denominators that were cluttering up the analysis scripts have been moved to `python/HltEfficiencyChecker/utils.py`.
* `help` has been added/reviewed for all the args that you can parse to either analysis script.
* Prefer the usage of comma-separated lists as inputs rather than `nargs = '+'`, whitespace-spaced lists because the `yaml` syntax is simpler.
### `hlt_calculate_rates.py`:
* Now has the ability for you to define a group of lines at the command line/`yaml`, and it will calculate an inclusive rate for that group. This was available previously only for Hlt1 via some hard-coded groups. The hard-coded Hlt1 groups now exist as a set of defaults.
### `hlt_line_efficiencies.py`:
* Default to `CanRecoChildren` denominator rather than all that are defined.
* Add ability to choose the denominator that will be applied to the shape distribution that is shown in the efficiency plots with `--shape-distr-with-denom`. In cases where there is only 1 denominator on the plot, that denominator is used, so this is only relevant when you want to see efficiencies for >1 denom on 1 plot.
* Choose the particle who's kinematics you're interested in more simply e.g. `--vars PT,Kminus:PT` will plot efficiency versus parent PT and versus the PT of the `Kminus`.
* `--children` -> `--reconstructible-children` to be more clear on what purpose that argument serves in terms of defining denominators.
* Add ability to specify binning for efficiencies and the shape histogram (`--nbins`, `--shape-nbins`).
* Refactored all the logic so that you get a sensible set of plots for any combination of `--lines`, `--denoms`.
The example scripts were slightly modified to take account of these changes and use some new features.
TODO:
* [x] Address #12? Note that in the `yaml` we specify `trigger_level` as an integer to the `job` options, but we specify `level` as `Hlt1` or `Hlt2` to the analysis scripts. This is a place where an easy mistake could be made, the possibility of which could be eradicated if we address #12. ADDRESS LATER - see issue discussion.
See tutorial at lhcb/Moore!542. This is WIP until we're happy with all the tutorials.
FYI @rmatev @sstahl @mvesteri