Add a new method to pre-selection and final-selection. Also add some features to do_plots#513
Open
tomfournier wants to merge 6 commits into
Open
Add a new method to pre-selection and final-selection. Also add some features to do_plots#513tomfournier wants to merge 6 commits into
tomfournier wants to merge 6 commits into
Conversation
"name" in customHists now correctly change the histogram name LOGGER.info now give the number of histograms found in the TDirectory
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.
Hi,
I have written a new method to run the pre-selection. This method has the same properties of
RDFanalysisbut takes theprocess_nameas a second argument inanalysersand return the dataframe and a list of histogram orTParameterthat will be written in the output file in aTDirectorycalledcustom_objects.In
custom_object, the objects to write will be put in sub-TDirectorydepending on their class (TH1D, TParameter, etc.) to be more readable.I called this new class
RDFgraphbecause I wanted to take the advantages ofRDFanalysisandbuild_graphand I named theTDirectorycustom_objectsbut if you have more inspiration, you can change the names.During the final-selection, a dictionary similar to
histoListcan optionally be added to include the histograms in the final-selection output file calledcustomHistThis new variable takes this form:to modify the histogram. If you don't want to modify your histogram, you can just leave the dictionary empty.
I made this method to be able to easily make a cuflow and histograms before a filter since
RDFanalysisonly return the branches after all the filters.For the final-selection, we could use an eventual cutflow that is in
custom_objects/TH1Dto add new cuts fromcutListbut I think it's too difficult for me to implement it.I also modified
do_plotsto have a strict x-range to not display bins with zero content and to set grid on the plot.To do this you can add
strictRange = TrueandsetGrid = Trueto the plot script.This apply to all the variables but we could make a list like for
rebinto do implement it on chosen variables.We could also make a dictionary with
rebin,grid,strictRangeand other parameters for all the variables in this form:with the keys optional.
I ran it on my setup and it works fine but I don't know if it works for other setup or if I followed the coding conventions. I timed
RDFanalysisand my new method and they take the same time to run so I don't think there is much optimization to do.If I was not clear enough or you need more information, I am available to answer your questions. I hope my modifications can be implemented as I think they could be useful for
FCCAnalysesusers.