forked from HEP-FCC/FCCAnalyses
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronization of final and plots stages (HEP-FCC#397)
* Decoupling latex table printing from rdf running * Further minor adjustments * Providing default values in Hismaker Plot * Storing graph in working directory if path not specified * Before scaling the histograms in plots stage check final stage results * Now possible to have no signal or no background in the plot * Putting scaling determination to separate function
- Loading branch information
Showing
10 changed files
with
1,023 additions
and
425 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,110 @@ | ||
#Input directory where the files produced at the pre-selection level are | ||
inputDir = "outputs/FCCee/higgs/mH-recoil/mumu/stage2/" | ||
''' | ||
Final stage of the example Z(mumu)H recoil mass analysis. | ||
''' | ||
|
||
#Input directory where the files produced at the pre-selection level are | ||
outputDir = "outputs/FCCee/higgs/mH-recoil/mumu/final/" | ||
# Input directory where the files produced in the pre-selection stages are | ||
# stored | ||
inputDir = "outputs/FCCee/higgs/mH-recoil/mumu/stage2/" | ||
|
||
# Output directory where the resulting files will be stored | ||
outputDir = "outputs/FCCee/higgs/mH-recoil/mumu/final/" | ||
|
||
processList = { | ||
'p8_ee_ZZ_ecm240':{},#Run over the full statistics from stage2 input file <inputDir>/p8_ee_ZZ_ecm240.root. Keep the same output name as input | ||
'p8_ee_WW_ecm240':{}, #Run over the statistics from stage2 input files <inputDir>/p8_ee_WW_ecm240_out/*.root. Keep the same output name as input | ||
'MySample_p8_ee_ZH_ecm240':{} #Run over the full statistics from stage2 input file <inputDir>/p8_ee_ZH_ecm240_out.root. Change the output name to MySample_p8_ee_ZH_ecm240 | ||
# Run over the full statistics from stage2 input file | ||
# <inputDir>/p8_ee_ZZ_ecm240.root. Keep the same output name as input | ||
'p8_ee_ZZ_ecm240': {}, | ||
# Run over the statistics from stage2 input files | ||
# <inputDir>/p8_ee_WW_ecm240_out/*.root. Keep the same output name as input | ||
'p8_ee_WW_ecm240': {}, | ||
# Run over the full statistics from stage2 input file | ||
# <inputDir>/p8_ee_ZH_ecm240_out.root. Change the output name to | ||
# MySample_p8_ee_ZH_ecm240 | ||
'MySample_p8_ee_ZH_ecm240': {} | ||
} | ||
|
||
#Link to the dictonary that contains all the cross section informations etc... | ||
# Link to the dictionary that contains all the cross section information etc... | ||
procDict = "FCCee_procDict_spring2021_IDEA.json" | ||
|
||
#Add MySample_p8_ee_ZH_ecm240 as it is not an offical process | ||
procDictAdd={"MySample_p8_ee_ZH_ecm240":{"numberOfEvents": 10000000, "sumOfWeights": 10000000, "crossSection": 0.201868, "kfactor": 1.0, "matchingEfficiency": 1.0}} | ||
# Add MySample_p8_ee_ZH_ecm240 as it is not an offical process | ||
procDictAdd = {"MySample_p8_ee_ZH_ecm240": {"numberOfEvents": 10000000, | ||
"sumOfWeights": 10000000, | ||
"crossSection": 0.201868, | ||
"kfactor": 1.0, | ||
"matchingEfficiency": 1.0}} | ||
|
||
# Expected integrated luminosity | ||
intLumi = 5.0e+06 # pb-1 | ||
|
||
#Number of CPUs to use | ||
# Whether to scale to expected integrated luminosity | ||
doScale = True | ||
|
||
# Number of threads to use | ||
nCPUS = 2 | ||
|
||
#produces ROOT TTrees, default is False | ||
doTree = False | ||
# Whether to produce ROOT TTrees, default is False | ||
doTree = True | ||
|
||
# Save cut yields and efficiencies in LaTeX table | ||
saveTabular = True | ||
|
||
###Dictionnay of the list of cuts. The key is the name of the selection that will be added to the output file | ||
cutList = {"sel0":"Zcand_q == 0", | ||
"sel1":"Zcand_q == -1 || Zcand_q == 1", | ||
"sel2":"Zcand_m > 80 && Zcand_m < 100", | ||
"sel3":"MyFilter==true && (Zcand_m < 80 || Zcand_m > 100)" | ||
} | ||
# Save cut yields and efficiencies in JSON file | ||
saveJSON = True | ||
|
||
# Dictionary with the list of cuts. The key is the name of the selection that | ||
# will be added to the output file | ||
cutList = {"sel0": "Zcand_q == 0", | ||
"sel1": "Zcand_q == -1 || Zcand_q == 1", | ||
"sel2": "Zcand_m > 80 && Zcand_m < 100", | ||
"sel3": "MyFilter==true && (Zcand_m < 80 || Zcand_m > 100)"} | ||
|
||
|
||
#Dictionary for the ouput variable/hitograms. The key is the name of the variable in the output files. "name" is the name of the variable in the input file, "title" is the x-axis label of the histogram, "bin" the number of bins of the histogram, "xmin" the minimum x-axis value and "xmax" the maximum x-axis value. | ||
# Dictionary for the output variables/histograms. The key is the name of the | ||
# variable in the output files. "name" is the name of the variable in the input | ||
# file, "title" is the x-axis label of the histogram, "bin" the number of bins | ||
# of the histogram, "xmin" the minimum x-axis value and "xmax" the maximum | ||
# x-axis value. | ||
histoList = { | ||
"mz":{"name":"Zcand_m","title":"m_{Z} [GeV]","bin":125,"xmin":0,"xmax":250}, | ||
"mz_zoom":{"name":"Zcand_m","title":"m_{Z} [GeV]","bin":40,"xmin":80,"xmax":100}, | ||
"leptonic_recoil_m":{"name":"Zcand_recoil_m","title":"Z leptonic recoil [GeV]","bin":100,"xmin":0,"xmax":200}, | ||
"leptonic_recoil_m_zoom":{"name":"Zcand_recoil_m","title":"Z leptonic recoil [GeV]","bin":200,"xmin":80,"xmax":160}, | ||
"leptonic_recoil_m_zoom1":{"name":"Zcand_recoil_m","title":"Z leptonic recoil [GeV]","bin":100,"xmin":120,"xmax":140}, | ||
"leptonic_recoil_m_zoom2":{"name":"Zcand_recoil_m","title":"Z leptonic recoil [GeV]","bin":200,"xmin":120,"xmax":140}, | ||
"leptonic_recoil_m_zoom3":{"name":"Zcand_recoil_m","title":"Z leptonic recoil [GeV]","bin":400,"xmin":120,"xmax":140}, | ||
"leptonic_recoil_m_zoom4":{"name":"Zcand_recoil_m","title":"Z leptonic recoil [GeV]","bin":800,"xmin":120,"xmax":140}, | ||
"leptonic_recoil_m_zoom5":{"name":"Zcand_recoil_m","title":"Z leptonic recoil [GeV]","bin":2000,"xmin":120,"xmax":140}, | ||
"leptonic_recoil_m_zoom6":{"name":"Zcand_recoil_m","title":"Z leptonic recoil [GeV]","bin":100,"xmin":130.3,"xmax":132.5}, | ||
"mz_1D":{"cols":["Zcand_m"],"title":"m_{Z} [GeV]", "bins": [(40,80,100)]}, # 1D histogram (alternative syntax) | ||
"mz_recoil_2D":{"cols":["Zcand_m", "Zcand_recoil_m"],"title":"m_{Z} - leptonic recoil [GeV]", "bins": [(40,80,100), (100,120,140)]}, # 2D histogram | ||
"mz_recoil_3D":{"cols":["Zcand_m", "Zcand_recoil_m", "Zcand_recoil_m"],"title":"m_{Z} - leptonic recoil - leptonic recoil [GeV]", "bins": [(40,80,100), (100,120,140), (100,120,140)]}, # 3D histogram | ||
"mz": {"name": "Zcand_m", | ||
"title": "m_{Z} [GeV]", | ||
"bin": 125, "xmin": 0, "xmax": 250}, | ||
"mz_zoom": {"name": "Zcand_m", | ||
"title": "m_{Z} [GeV]", | ||
"bin": 40, "xmin": 80, "xmax": 100}, | ||
"leptonic_recoil_m": {"name": "Zcand_recoil_m", | ||
"title": "Z leptonic recoil [GeV]", | ||
"bin": 100, "xmin": 0, "xmax": 200}, | ||
"leptonic_recoil_m_zoom": {"name": "Zcand_recoil_m", | ||
"title": "Z leptonic recoil [GeV]", | ||
"bin": 200, "xmin": 80, "xmax": 160}, | ||
"leptonic_recoil_m_zoom1": {"name": "Zcand_recoil_m", | ||
"title": "Z leptonic recoil [GeV]", | ||
"bin": 100, "xmin": 120, "xmax": 140}, | ||
"leptonic_recoil_m_zoom2": {"name": "Zcand_recoil_m", | ||
"title": "Z leptonic recoil [GeV]", | ||
"bin": 200, "xmin": 120, "xmax": 140}, | ||
"leptonic_recoil_m_zoom3": {"name": "Zcand_recoil_m", | ||
"title": "Z leptonic recoil [GeV]", | ||
"bin": 400, "xmin": 120, "xmax": 140}, | ||
"leptonic_recoil_m_zoom4": {"name": "Zcand_recoil_m", | ||
"title": "Z leptonic recoil [GeV]", | ||
"bin": 800, "xmin": 120, "xmax": 140}, | ||
"leptonic_recoil_m_zoom5": {"name": "Zcand_recoil_m", | ||
"title": "Z leptonic recoil [GeV]", | ||
"bin": 2000, "xmin": 120, "xmax": 140}, | ||
"leptonic_recoil_m_zoom6": {"name": "Zcand_recoil_m", | ||
"title": "Z leptonic recoil [GeV]", | ||
"bin": 100, "xmin": 130.3, "xmax": 132.5}, | ||
# 1D histogram (alternative syntax) | ||
"mz_1D": {"cols": ["Zcand_m"], | ||
"title": "m_{Z} [GeV]", | ||
"bins": [(40, 80, 100)]}, | ||
# 2D histogram | ||
"mz_recoil_2D": {"cols": ["Zcand_m", "Zcand_recoil_m"], | ||
"title": "m_{Z} - leptonic recoil [GeV]", | ||
"bins": [(40, 80, 100), (100, 120, 140)]}, | ||
# 3D histogram | ||
"mz_recoil_3D": { | ||
"cols": ["Zcand_m", "Zcand_recoil_m", "Zcand_recoil_m"], | ||
"title": "m_{Z} - leptonic recoil - leptonic recoil [GeV]", | ||
"bins": [(40, 80, 100), (100, 120, 140), (100, 120, 140)]}, | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
.\" Manpage for fccanalysis-final-script | ||
.\" Contact [email protected] to correct errors or typos. | ||
.TH FCCANALYSIS\-FINAL\-SCRIPT 7 "05 Aug 2024" "0.9.0" "fccanalysis-final-script man page" | ||
.SH NAME | ||
\fBfccanalysis\-final\-script\fR \(en analysis script for the final stage of the | ||
analysis | ||
.SH SYNOPSIS | ||
.IP | ||
* | ||
.SH DESCRIPTION | ||
.PP | ||
The analysis script for the final stage of the analysis is expected to be a | ||
valid Python script containing definitions of the cuts and the final | ||
histograms\&. To run the final stage do | ||
.IP | ||
fccanalysis final \fIanalysis_script.py\fR | ||
|
||
.RE | ||
.SH ATTRIBUTES | ||
User can use the following global attributes to control the behavior of the | ||
final analysis stage\&. | ||
.TP | ||
\fBprocDict\fR (mandatory) | ||
This variable controls which process dictionary will be used. It can be either | ||
simple file name, absolute path or url\&. In the case of a simple filename, the | ||
file is being searched for first in the working directory and then at the | ||
locations indicated in the $FCCDICTSDIR environment variable\&. | ||
.TP | ||
\fBprocDictAdd\fR (optional) | ||
User can provide additional processes, which are not included in the main | ||
processes dictionary\&. | ||
.TP | ||
\fBinputDir\fR (mandatory) | ||
User has to specify the directory where the input files coming from the previous | ||
analysis stage are stored\&. | ||
.TP | ||
\fBoutputDir\fR (optional) | ||
User can specify the directory for the output files\&. | ||
.br | ||
Default value: \&. (current working directory) | ||
.TP | ||
\fBnCPUS\fR (optional) | ||
Number of threads the RDataFrame will use\&. If -1 is specified all available | ||
cores will be used\&. | ||
.br | ||
Default value: 4 | ||
.TP | ||
\fBcutList\fR (optional) | ||
Dictionary of cuts to be done of form "<cut_name>: <cut_definition>"\&. The | ||
cuts are independent and there is one special cut "all_events"\&. | ||
.br | ||
Default value: Empty dictionary | ||
.TP | ||
\fBcutLabels\fR (optional) | ||
Dictionary of labels for cuts defined in \fBcutList\fR which will be used in | ||
LaTeX table(s)\&. | ||
.br | ||
Default value: Empty dictionary | ||
.TP | ||
\fBdoScale\fR (optional) | ||
Whether to scale the results to the expected integrated luminosity\&. | ||
.br | ||
Default value: True | ||
.TP | ||
\fBintLumi\fR (optional) | ||
Expected integrated luminosity in pb^{-1}\&. | ||
.br | ||
Default value: 1.0 pb^{-1} | ||
.TP | ||
\fBdoTree\fR (optional) | ||
Save events passing final cuts into output TTree\&. | ||
.br | ||
Default value: False | ||
.TP | ||
\fBsaveTabular\fR (optional) | ||
Save results into LaTeX table(s)\&. | ||
.br | ||
Default value: False | ||
.TP | ||
\fBsaveJSON\fR (optional) | ||
Save results into JSON file. | ||
.br | ||
Default value: False | ||
.PP | ||
This section is under construction. You are invited to help :) | ||
.SH SEE ALSO | ||
fccanalysis(1), fccanalysis-final(1) | ||
.SH BUGS | ||
Many | ||
.SH AUTHORS | ||
There are many contributors to the FCCAnalyses framework, but the principal | ||
authors are: | ||
.in +4 | ||
Clement Helsens | ||
.br | ||
Valentin Volkl | ||
.br | ||
Gerardo Ganis | ||
.SH FCCANALYSES | ||
Part of the FCCAnalyses framework\&. | ||
.SH LINKS | ||
.PP | ||
.UR https://hep-fcc\&.github\&.io/FCCAnalyses/ | ||
FCCAnalyses webpage | ||
.UE | ||
.PP | ||
.UR https://github\&.com/HEP\-FCC/FCCAnalyses/ | ||
FCCAnalysises GitHub repository | ||
.UE | ||
.PP | ||
.UR https://fccsw\-forum\&.web\&.cern\&.ch/ | ||
FCCSW Forum | ||
.UE | ||
.SH CONTACT | ||
.pp | ||
.MT [email protected] | ||
FCC-PED-SoftwareAndComputing-Analysis | ||
.ME |
Oops, something went wrong.