Draft
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
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.
Currently a draft...
The existing patterns in this codebase are very hard to follow and should be replaced. Such patterns include:
bkgdEstimate_2022.py,bkgdEstimate_2023.py, etc.). These happen not just for background estimations. The main difference here are the hardcoded paths to files. I propose that there is a single script that takes in a file as an argument.add_channelfunction. Thisadd_channelfunction just obscures what is going on I think, we should just extract the histogram we want directly. Instead you have to traverse through many layers of functions just to figure out which histogram is actually being used.This PR is a rework of the lepton background estimations. There are many changes which I think make this process more understandable, perhaps at the cost of being a little verbose/explicit. A list of the main changes are:
bkgdEstimate_20XX.pyBackgroundEstimation/scripts/lepton_background_estimate.py, where each part of the estimation is defined in a self contained function (i.e. no needing to hop between multiple layers of indirection to figure out how to find P(veto), it is all in one place).--output-fmt latexget_histfunction toStandardAnalysis/python/plotUtilitiesthat is intended to replace the existinggetHistfunction. The new function does not hardcodecondor/to the beginning of the file path. The existinggetHistfunction (which does prependcondor/now prints a deprecation warning and usesget_histbehind the scenes.condor/eventually in this mannerTODO: