Skip to content

Commit

Permalink
Merge commits
Browse files Browse the repository at this point in the history
* fix : minor fixes for runner.py and comparison.py; add JERC to MET propagation (cms-btv-pog#39)

* feat : add PU files

- add pu files, adapt correction will available dicts
- add Muon_RunDv1 to data json files
- improve file splitting for dask/lxplus
- add autorebin for plotting tools
- remove redudant puwei file

fix : python3.7->3.10 in pipeline

* fix : minor fix

- update readme
- bugfix for dileptt,semileptt workflow
- add init to PU directory
- update descriptions

* minor fixes for runner.py and comparison.py

* formatting with black

* fix: add JEC to MET and plot format

- add JEC to MET
- plot format

* fix: set tail of PU to 1

* fix: minor fix on runner.py

Co-authored-by: Ming-Yan <[email protected]>

* patch for the daskoutput name (cms-btv-pog#40)

* patch for the daskoutput name

* reformatted runner (hope with the right black version

* feat : update plotting scripts and add track variables (cms-btv-pog#41)

* feat : improve plot scripts and add new variables

- Add PFCands to defintions
- Correct the uncertainty calculations for ratio panels
- include MC stat error band
- improve DeepJet variable binning and labels

* feat : add track related info

- add track related info
- fix minor comparison

* fix :  minor fixs

- modify name for track variables
- fix jet pt axis
- fix cut in ctag_semileptt_sf and ttcom workflow
- move default errtype to plot_util

* fix : fix the file merging in the plots and other minor fixes

- move black and flake8 to python 3.10
- change the condition PFCands variables storing supported with higher version(not Reco17_94X)
- minor fixes on plotting scripts

* feat : minor fixes

* fix: update python version in setup.cfg

* fix: fix setup.cfg for CI pipelines (cms-btv-pog#42)

* fix setup.cfg

* fix: move setup to coffea0.7.20

* local changes

* Fix : MC merging in plotting scripts and move to PuppiMET (cms-btv-pog#43)

* fix : MC merging in plotting scripts and move to PuppiMET
- move PFMET to Puppi MET for run3
- extend xrootdtimeout for local executor
- fix plotting scripts with merging MC files with same dataset name
- fix axes label
- fix comparison scripts panel
- splitted OS-SS for Wc in plotting scripts

* feat : auto-scale x-axis

- update x-axis range for plots
- fix missing variables in defintion
- change lepton dz range, dr range

* fix: minor fix for plotting scripts

* fix : fix MET correction and plotting scripts (cms-btv-pog#44)

* fix : fix MET correction and plotting scripts

- add MetUnclustEnUpDeltaY,MetUnclustEnUpDeltaX to PuppiMET for MET correction
- fix dxy/dz axes for leptons, have zooming version for lepton with QCD veto
- fix spacing for the axis labels

* fix:minor fix

* my changes to compare script

* Remove stuff that does not work

* fix: plotting style improvements; future warnings in runner.py (cms-btv-pog#45)

* fix: plotting style improvements; took care of future warnings in runner.py; added link to original code in runner.py

* removed deprecated `extra` in lxplus setup

* liniting with black

* fixes for plotting

* fix label for btag discriminator; added prob distributions

* protection for not adding SF axis to prob distributions

* add printout for produced plot

* flake8 fix

* fix: add missing xsection & add protection for missing xsection

Co-authored-by: Ming-Yan Lee <[email protected]>

* added prob var protection to second if condition in ctag ttbar workflows (cms-btv-pog#46)

* bug fix for ctag emu ttbar dilep workflow (cms-btv-pog#47)

* add cross section

* trying to fix the plotting scripts

* Run black and change env.yml file name

* minor fixes

* worflow tester

* fix: setup debug mode for plotting script

* feat : more options for plotting scripts

- add additional cross-section rescaler for sample set
- add mergemap for comparison script
- minor fix for debug mode

* re-added worker port condition for lxplus; bug for xlabel in comparison.py (cms-btv-pog#48)

* linting runner.py

* linting comparison.py

* bugfix jet to PFcand matching for ttbar dilep

* feat: add plotting yaml

fix : plotting CI, polish readme, reformat configurator

- create reproducible config file (`.py`) under output directory
- add default `run_options` in configurator
- move systematic as common methods
- polish readme
- fix plotting CI name

* fix : fix additional scaler bug

fix: limit should be None in default

* feat: add split

* feat : add correctionlib (jsonpog-integration) and rename data(correction files) directory

- wrap jsonpog as submodule
- rename directory name of data/ directory

* feat : correctionlib implementation & minor fixes

- utils: make SFs loading compatible with correctionlib and custom inputs
- utils: add example using correctionlib in AK4_parameter
- utils: rename JEC producer
- runner: limit campaign with particular choices, add isSyst flag
- doc:
- workflows: implement correctionlib, reduce weights implementation on selected events only
- workflows: make conditions for branch not exists in files, skip selection/not filled histogram
- workflows: load SFs, lumimask in __init__
- workflows(Wc): fix selections same as VHccSF(https://github.com/mondalspandan/VHcc-cTagSF/blob/UL/Analyzer/WcSelection.py)
- utils : correct jetid selection for UL
- utils : fix Wc soft lepton pT axis
- env : avoid python 3.11 for setting enviroment
- plotting : fix error band on upper panel
- CI: add submodules, ignore black in jsonpog-integration

* fix: updated 13 TeV single top and ttbar cross sections (cms-btv-pog#49)

* updated 13 TeV single top and ttbar cross sections

* black v23 does not like formatting of black v22

* fix : fix issues for action updates

- reformat with black v23
- restrict setuptools version
- wf: fix mamba error, conda setup errors
- wf: add submodules
- wf: add correctionlib workflow
- wf: run workflow with futures

* fix: suggestions from Denise & fix semilep selection

- improve documentation & implemented suggestion from Denise
- make ctag_ttsemilep selection sync with Wc

* fix : remove UL files & fix bug for NanoAOD

    - remove UL lepton SFs, PU, btag SFs
    - fix bug with filled discriminant for NanoAOD

* feat : suggestions from Annika

- runner: modify memory, disk usages adapt parsl/dask interfaces
- plot: fixing error band
- doc: minor updates on choices of campaign
- data/utils: implemented low pT muon corrections, remove fill_none
- env: change to <3.11 for python version, add line for test_env.yml
- workflows: fix bug for reading SFs, put HLT flag for triggered lepton
- utils: add flag for triggered leptons

- fix: remove correction for ttbar

* feat: add ignore

* feat:fixes

* feat: correctionlib(jsonpog-integration) implementation & fixes on actions (cms-btv-pog#50)

* feat : add correctionlib (jsonpog-integration) and rename data(correction files) directory

- wrap jsonpog as submodule
- rename directory name of data/ directory

* feat : correctionlib implementation & minor fixes

- utils: make SFs loading compatible with correctionlib and custom inputs
- utils: add example using correctionlib in AK4_parameter
- utils: rename JEC producer
- runner: limit campaign with particular choices, add isSyst flag
- doc:
- workflows: implement correctionlib, reduce weights implementation on selected events only
- workflows: make conditions for branch not exists in files, skip selection/not filled histogram
- workflows: load SFs, lumimask in __init__
- workflows(Wc): fix selections same as VHccSF(https://github.com/mondalspandan/VHcc-cTagSF/blob/UL/Analyzer/WcSelection.py)
- utils : correct jetid selection for UL
- utils : fix Wc soft lepton pT axis
- env : avoid python 3.11 for setting enviroment
- plotting : fix error band on upper panel
- CI: add submodules, ignore black in jsonpog-integration

* fix : fix issues for action updates

- reformat with black v23
- restrict setuptools version
- wf: fix mamba error, conda setup errors
- wf: add submodules
- wf: add correctionlib workflow
- wf: run workflow with futures

* fix: suggestions from Denise & fix semilep selection

- improve documentation & implemented suggestion from Denise
- make ctag_ttsemilep selection sync with Wc

* fix : remove UL files & fix bug for NanoAOD

    - remove UL lepton SFs, PU, btag SFs
    - fix bug with filled discriminant for NanoAOD

* feat : suggestions from Annika

- runner: modify memory, disk usages adapt parsl/dask interfaces
- plot: fixing error band
- doc: minor updates on choices of campaign
- data/utils: implemented low pT muon corrections, remove fill_none
- env: change to <3.11 for python version, add line for test_env.yml
- workflows: fix bug for reading SFs, put HLT flag for triggered lepton
- utils: add flag for triggered leptons

- fix: remove correction for ttbar

* feat : fixes on plotting code

- plot: fix variances bug, additional text in the plot
- plot: add custom xrange
- util: fix some range of histograms
- doc: add new features for plot

* feat : fixes dr selection, njet & add under/overflow bin

- plot: add plotting under/overflow bin options
- plot: wrap errorband to a function
- plot: add non-uniform rebinning
- workflow: fix dr selection when using ak.all,masked identity is required
- workflow: add nmujet & nsoftmu in ctag SFs workflows
- worlfow : store njet correctly

* fix : fix mc weight scaler & other minor bug fix
- plot,utils: change the mcwei implementation
- utils: change dr range & bugfix

* feat : minor fixes

plot: comment out flow option before new mplhep release
plot: add custom ylabel & xerror
workflow: return corrected jets
utils: remove repeated puwei, correct MET filter

* feat : minor suggestions from Denise

CI,env: remove python 3.8
plot: add ylabel, xerr

* fix: CI python version

* fix: minor fixes for plot

---------

Co-authored-by: Denise Müller <[email protected]>
Co-authored-by: Pablo Matorras <[email protected]>
Co-authored-by: Andrey Pozdnyakov <[email protected]>
  • Loading branch information
4 people authored Mar 23, 2023
1 parent db5b6db commit f7226d6
Show file tree
Hide file tree
Showing 934 changed files with 6,876 additions and 73,628 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:
- name: Lint with black
uses: psf/black@stable
with:
options: "--check --verbose"
options: "--check --verbose --exclude=src/BTVNanoCommissioning/jsonpog-integration"
src: "./"
16 changes: 12 additions & 4 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ["3.8", "3.9", "3.10"]

python-version: ["3.8","3.10"]

defaults:
run:
shell: "bash -l {0}"

steps:
- uses: actions/checkout@v2
- name: update submodules
run: |
git config --file=.gitmodules submodule.src/BTVNanoCommissioning/jsonpog-integration.url https://milee:${{ secrets.GIT_CERN_PWD }}@gitlab.cern.ch/cms-nanoAOD/jsonpog-integration.git
git submodule sync
git config --list
git submodule update --init --recursive
- uses: cvmfs-contrib/github-action-cvmfs@v2
with:
cvmfs_repositories: 'grid.cern.ch'
Expand All @@ -29,10 +37,9 @@ jobs:
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
miniforge-variant: Mambaforge
channels: conda-forge,defaults
channel-priority: true
auto-update-conda: true
activate-environment: CoffeaRunner
environment-file: env.yml
auto-activate-base: false
Expand Down Expand Up @@ -77,6 +84,7 @@ jobs:
pip install -e .

- name: Run test workflow
run: |
python runner_wconfig.py --cfg config/example.py
python runner_wconfig.py --cfg config/example.py
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ plot/
plotting/plot/
src/BTVNanoCommissioning/version.py
src/BTVNanoCommissioning/workflows/
src/BTVNanoCommissioning/jsonpog-integration/examples/
src/BTVNanoCommissioning.egg-info/
## not track BTV stuff
src/BTVNanoCommissioning/helpers/definitions.py
src/BTVNanoCommissioning/utils/AK4_parameters.py
src/BTVNanoCommissioning/utils/selection.py
src/BTVNanoCommissioning/utils/histogrammer.py
.github/workflows/ctag_DY_workflow.yml
.github/workflows/ctag_Wc_workflow.yml
.github/workflows/ttbar_SL_DL_workflow.yml
Expand All @@ -33,6 +35,6 @@ dask-worker-space/
.job_wrapper_failure
plot/
plotting/plot/

*array*
## other submodules
src/Hpluscharm/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/BTVNanoCommissioning/jsonpog-integration"]
path = src/BTVNanoCommissioning/jsonpog-integration
url = https://gitlab.cern.ch/cms-nanoAOD/jsonpog-integration.git
64 changes: 59 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Clone repository from git

```bash
# only first time
git clone [email protected]:cms-rwth/CoffeaRunner.git
git clone --recursive [email protected]:cms-rwth/CoffeaRunner.git
```

For installing Miniconda, see also https://hackmd.io/GkiNxag0TUmHnnCiqdND1Q#Local-or-remote
Expand Down Expand Up @@ -45,16 +45,12 @@ conda install -c conda-forge p-tqdm
</details>
<br>

=======

Once the environment is set up, compile the python package:
```
pip install -e .
```




## Structures of code

The development of the code is driven by user-friendliness, reproducibility and efficiency.
Expand Down Expand Up @@ -183,6 +179,10 @@ Example in [weight_splitcat.py](https://github.com/cms-rwth/CoffeaRunner/blob/ma

- In case you have correction depends on sample ,i.e. k-factor, use `"bysample":{$sample_name:$weight_nested_dict}`

<details><summary>example with customize weight files
</summary>
<p>

```
"weights":{
"common":{
Expand Down Expand Up @@ -227,6 +227,46 @@ Example in [weight_splitcat.py](https://github.com/cms-rwth/CoffeaRunner/blob/ma
},
}
```
</p>
</details>


- Use central maintained jsonpog-integration
The official correction files collected in [jsonpog-integration](https://gitlab.cern.ch/cms-nanoAOD/jsonpog-integration) is updated by POG except `lumiMask` and `JME` still updated by maintainer. No longer to request input files in the `correction_config`.

<details><summary>See the example with `2017_UL`.</summary>
<p>

```python
"2017_UL": {
# Same with custom config
"lumiMask": "Cert_294927-306462_13TeV_UL2017_Collisions17_MuonJSON.txt",
"JME": "jec_compiled.pkl.gz",
# no config need to be specify for PU weights
"PU": None,
# Btag SFs - specify $TAGGER : $TYPE-> find [$TAGGER_$TYPE] in json file
"BTV": {"deepCSV": "shape", "deepJet": "shape"},

"LSF": {
# Electron SF - Following the scheme: "${SF_name} ${year}": "${WP}"
# https://github.com/cms-egamma/cms-egamma-docs/blob/master/docs/EgammaSFJSON.md
"ele_ID 2017": "wp90iso",
"ele_Reco 2017": "RecoAbove20",

# Muon SF - Following the scheme: "${SF_name} ${year}": "${WP}"
# WPs : ['NUM_GlobalMuons_DEN_genTracks', 'NUM_HighPtID_DEN_TrackerMuons', 'NUM_HighPtID_DEN_genTracks', 'NUM_IsoMu27_DEN_CutBasedIdTight_and_PFIsoTight', 'NUM_LooseID_DEN_TrackerMuons', 'NUM_LooseID_DEN_genTracks', 'NUM_LooseRelIso_DEN_LooseID', 'NUM_LooseRelIso_DEN_MediumID', 'NUM_LooseRelIso_DEN_MediumPromptID', 'NUM_LooseRelIso_DEN_TightIDandIPCut', 'NUM_LooseRelTkIso_DEN_HighPtIDandIPCut', 'NUM_LooseRelTkIso_DEN_TrkHighPtIDandIPCut', 'NUM_MediumID_DEN_TrackerMuons', 'NUM_MediumID_DEN_genTracks', 'NUM_MediumPromptID_DEN_TrackerMuons', 'NUM_MediumPromptID_DEN_genTracks', 'NUM_Mu50_or_OldMu100_or_TkMu100_DEN_CutBasedIdGlobalHighPt_and_TkIsoLoose', 'NUM_SoftID_DEN_TrackerMuons', 'NUM_SoftID_DEN_genTracks', 'NUM_TightID_DEN_TrackerMuons', 'NUM_TightID_DEN_genTracks', 'NUM_TightRelIso_DEN_MediumID', 'NUM_TightRelIso_DEN_MediumPromptID', 'NUM_TightRelIso_DEN_TightIDandIPCut', 'NUM_TightRelTkIso_DEN_HighPtIDandIPCut', 'NUM_TightRelTkIso_DEN_TrkHighPtIDandIPCut', 'NUM_TrackerMuons_DEN_genTracks', 'NUM_TrkHighPtID_DEN_TrackerMuons', 'NUM_TrkHighPtID_DEN_genTracks']

"mu_Reco 2017_UL": "NUM_TrackerMuons_DEN_genTracks",
"mu_HLT 2017_UL": "NUM_IsoMu27_DEN_CutBasedIdTight_and_PFIsoTight",
"mu_ID 2017_UL": "NUM_TightID_DEN_TrackerMuons",
"mu_Iso 2017_UL": "NUM_TightRelIso_DEN_TightIDandIPCut",
},
},
```

</p>
</details>

##### Systematic

Specify whether run systematics or not
Expand Down Expand Up @@ -361,6 +401,9 @@ In `plodataMC.py` config files (i.e. `testfile/btv_datamc.yaml`), you can specif

In `comparison.py` config file (`testfile/btv_compare.yaml`), color and label name and label names are created with `dict` under `reference` and `compare`. `reference` only accept one entry.

<details><summary>Code snipped</summary>
<p>

```yaml
## plodataMC.py
mergemap:
Expand Down Expand Up @@ -395,6 +438,9 @@ compare:
Muon_Run2022D-PromptReco-v2:
```
</p>
</details>
#### Variables
Common definitions for both usage, use default settings if leave empty value for the keys.
Expand All @@ -407,6 +453,9 @@ Common definitions for both usage, use default settings if leave empty value for
| `rebin` | no rebinning |
| `blind` | no blind region |

<details><summary>Code snipped</summary>
<p>

```yaml
## specify variable to plot
btagDeepFlavB_0:
Expand All @@ -422,6 +471,8 @@ Common definitions for both usage, use default settings if leave empty value for
# discr: 2
# or just put a number, would rebin distribution the last axis (usually the variable)
2
# One can try non-uniform rebin now! you can specify the rebin axis with rebin value
#discr : [-0.2,0.04,0.2,0.4,0.48,0.6,0.64,0.68,0.72,0.76,0.8,0.84,0.88,0.92,0.96,1.]
# Optional(only for data/MC), blind variables
blind : -10, #blind variable[-10:], if put -10,-5 would blind variable[-10:-5]
Expand All @@ -442,6 +493,9 @@ Common definitions for both usage, use default settings if leave empty value for
rebin: 2
```

</p>
</details>

### Running jupyter remotely
See also https://hackmd.io/GkiNxag0TUmHnnCiqdND1Q#Remote-jupyter

Expand Down
104 changes: 104 additions & 0 deletions config/HWW2l2nu_split.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
from Hpluscharm.workflows import workflows as hplusc_wf

cfg = {
"dataset": {
"jsons": [
# "src/Hpluscharm/input_json/higgs_UL17.json",
# "src/Hpluscharm/input_json/signal_UL17.json",
"src/Hpluscharm/input_json/mcbkg_UL17.json"
# "src/Hpluscharm/input_json/st_local.json"
],
"campaign": "UL17",
"year": "2017",
"filter": {
"samples": [
# # # # "ZZ_TuneCP5_13TeV-pythia8",
# # # # "WZ_TuneCP5_13TeV-pythia8",
# # # # "WW_TuneCP5_13TeV-pythia8"
# # # # "gchcWW2L2Nu_4f"
# "TTTo2L2Nu_TuneCP5_13TeV-powheg-pythia8",
# "TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8",
"ST_tW_top_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8",
"ST_tW_antitop_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8",
"ST_s-channel_4f_leptonDecays_TuneCP5_13TeV-amcatnlo-pythia8",
"ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8",
"ST_t-channel_top_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8",
# "WJetsToLNu_TuneCP5_13TeV-amcatnloFXFX-pythia8",
# "DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8",
# "DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8",
# "DYJetsToTauTauToMuTauh_M-50_TuneCP5_13TeV-madgraphMLM-pythia8"
]
},
},
# Input and output files
"workflow": hplusc_wf["HWWtest"],
"output": "st_all_array",
"run_options": {
"executor": "parsl/condor/naf_lite",
# "executor":"iterative",
"workers": 4,
"scaleout": 200,
"walltime": "03:00:00",
"mem_per_worker": 2, # GB
"chunk": 15000,
"skipbadfiles": True,
"sample_size": 20,
"retries": 50,
"index": "0,0",
},
## selections
"categories": {"cats": [], "cats2": []},
"preselections": {
"mu1hlt": ["IsoMu27"],
"mu2hlt": [
"Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_Mass3p8",
"Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_Mass8",
],
"e1hlt": ["Ele35_WPTight_Gsf"],
"e2hlt": ["Ele23_Ele12_CaloIdL_TrackIdL_IsoVL"],
"emuhlt": [
"Mu23_TrkIsoVVL_Ele12_CaloIdL_TrackIdL_IsoVL",
"Mu12_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL",
"Mu12_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ",
"Mu23_TrkIsoVVL_Ele12_CaloIdL_TrackIdL_IsoVL_DZ",
],
},
## weights
"weights": {
"common": {
"inclusive": {
"lumiMask": "Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt",
"PU": "puweight_UL17.histo.root",
"JME": "mc_compile_jec.pkl.gz",
"BTV": {
"DeepJetC": "DeepJet_ctagSF_Summer20UL17_interp.root",
},
"LSF": {
# "ele_Trig TrigSF": "Ele32_L1DoubleEG_TrigSF_vhcc.histo.root",
"ele_Rereco_above20 EGamma_SF2D": "egammaEffi_ptAbove20.txt_EGM2D_UL2017.histo.root",
"ele_Rereco_below20 EGamma_SF2D": "egammaEffi_ptBelow20.txt_EGM2D_UL2017.histo.root",
"ele_ID EGamma_SF2D": "egammaEffi.txt_EGM2D_MVA90iso_UL17.histo.root",
"mu_ID NUM_TightID_DEN_TrackerMuons_abseta_pt": "Efficiencies_muon_generalTracks_Z_Run2017_UL_ID.histo.root",
"mu_Iso NUM_TightRelIso_DEN_TightIDandIPCut_abseta_pt": "Efficiencies_muon_generalTracks_Z_Run2017_UL_ISO.histo.root",
"ele_Rereco_above20_error EGamma_SF2D_error": "egammaEffi_ptAbove20.txt_EGM2D_UL2017.histo.root",
"ele_Rereco_below20_error EGamma_SF2D_error": "egammaEffi_ptBelow20.txt_EGM2D_UL2017.histo.root",
"ele_ID_error EGamma_SF2D_error": "egammaEffi.txt_EGM2D_MVA90iso_UL17.histo.root",
"mu_ID_error NUM_TightID_DEN_TrackerMuons_abseta_pt_error": "Efficiencies_muon_generalTracks_Z_Run2017_UL_ID.histo.root",
"mu_Iso_error NUM_TightRelIso_DEN_TightIDandIPCut_abseta_pt_error": "Efficiencies_muon_generalTracks_Z_Run2017_UL_ISO.histo.root",
},
},
},
},
"systematic": {
"JERC": False,
"weights": False,
},
## user specific
"userconfig": {
"export_array": True,
"BDT": {
"ll": "src/Hpluscharm/MVA/xgb_output/SR_ll_scangamma_2017_gamma2.json",
"emu": "src/Hpluscharm/MVA/xgb_output/SR_emu_scangamma_2017_gamma2.json",
},
},
}
20 changes: 17 additions & 3 deletions config/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,22 @@
"weights": {
"common": {
"inclusive": {
"lumiMask": "Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt"
}
}
"lumiMask": "Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt",
"PU": None,
"JME": "jec_compiled.pkl.gz",
"BTV": {"deepJet": "shape"},
"LSF": {
"ele_ID 2017": "wp90iso",
"ele_Reco 2017": "RecoAbove20",
"ele_Reco_low 2017": "RecoBelow20",
"mu_Reco 2017_UL": "NUM_TrackerMuons_DEN_genTracks",
"mu_HLT 2017_UL": "NUM_IsoMu27_DEN_CutBasedIdTight_and_PFIsoTight",
"mu_ID 2017_UL": "NUM_TightID_DEN_TrackerMuons",
"mu_Iso 2017_UL": "NUM_TightRelIso_DEN_TightIDandIPCut",
"mu_ID_low NUM_TightID_DEN_TrackerMuons": "Efficiency_muon_trackerMuon_Run2017_UL_ID.histo.json",
"mu_Reco_low NUM_TrackerMuons_DEN_genTracks": "Efficiency_muon_generalTracks_Run2017_UL_trackerMuon.histo.json",
},
},
},
},
}
3 changes: 2 additions & 1 deletion env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.8, <3.11
- python[version='<=3.10']
- voms
- ca-policy-lcg
- ca-certificates
Expand All @@ -15,6 +15,7 @@ dependencies:
- parsl
- arrow
- dask-jobqueue
- jupyter
- p-tqdm
- pip
- pip:
Expand Down
4 changes: 0 additions & 4 deletions filefetcher/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def getFilesFromDas(args):


def getFilesFromPath(args, lim=None):

fdict = {}
fset = []
with open(args.input) as fp:
Expand All @@ -102,7 +101,6 @@ def getFilesFromPath(args, lim=None):


def getRootFilesFromPath(d, lim=None):

import subprocess

if "xrootd" in d:
Expand Down Expand Up @@ -148,14 +146,12 @@ def getRootFilesFromPath(d, lim=None):


def main(args):

if args.from_path:
print("do it from path: ")

fdict = getFilesFromPath(args)

else:

fdict = getFilesFromDas(args)

# print(fdict)
Expand Down
Loading

0 comments on commit f7226d6

Please sign in to comment.