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

Implementation of Histmaker #277

Merged
merged 11 commits into from Apr 21, 2023
Merged

Implementation of Histmaker #277

merged 11 commits into from Apr 21, 2023

Conversation

jeyserma
Copy link
Contributor

Implemented the histmaker functionality in FCCAnalysis. It can run over edm4hep files and/or mini-trees from previous stages and directly produces the histograms using the RunGraps() method in RDataframe.

The analyzer.py must have a build_graph() function that contains the analysis logic and histograms to be saved. The plotting script is expanded accordingly to accept the plotting of single histograms (without the convoluted selections).

The usage is similar to the other functions: fccanalysis run path/to/file.py

Other functionalities implemented:

  • Added functionality to add cross-section to the processList. If provided, it will assign the cross-section for that process and normalize to it (regardless the value or existence in the procDict).
  • Possibility to scale directly to the lumi in the histmaker (and cross-section).
  • Added aliases in defines.h (Vec_f, Vec_i, Vec_rp, Vec_mc, Vec_tlv, …) in defines.h
  • Easy way to include user-defined header files (multiple), provided as a list of header files in the input file
  • Added ncpus = -1 to use all available cores
  • Revised the getchunkList() function: usage of numpy functions to make the chunks
  • Created an initialize() function in the FCCAnalysisRun.py that loads the custom analyzers, dicts, and sets the threads (used in both stage and histmaker)
  • Simplified the code for tracking the number of events processed in previous stages

Todo:

  • No condor support yet (will implement soon).
  • Check the newest functionalities with the "final" stage run option (check the normalization, npus, etc). This part of the code is not touched.

config/FCCAnalysisRun.py Outdated Show resolved Hide resolved
config/FCCAnalysisRun.py Outdated Show resolved Hide resolved
#'wzp6_ee_mumuH_ecm240':{'fraction':1},
'p8_ee_WW_ecm240':{'fraction':1, 'input': 'localSamples/p8_ee_WW_ecm240/', 'crossSection': 0.25792}, # 16.4385
'p8_ee_ZZ_ecm240':{'fraction':1, 'input': 'localSamples/p8_ee_ZZ_ecm240/', 'crossSection': 1.35899},
'p8_ee_ZH_ecm240':{'fraction':1, 'input': 'localSamples/p8_ee_ZH_ecm240/', 'crossSection': 0.0067643}, # 0.201868
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is p8_ee_ZH_ecm240 part of the winter2023/IDEA campaign?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it isn't. So in case the process does not exist, the user can provide a custom cross-section in the processList. Otherwise, a default of 1 is used

config/FCCAnalysisRun.py Outdated Show resolved Hide resolved
@kjvbrt kjvbrt merged commit 499b357 into HEP-FCC:master Apr 21, 2023
3 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.

None yet

3 participants