-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from cms-l1-dpg/refactored_tools
Refactored tools
- Loading branch information
Showing
296 changed files
with
8,468 additions
and
10,865 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[flake8] | ||
ignore = W391, W503 | ||
max-line-length = 79 | ||
max-line-length = 88 | ||
extend-ignore = E203, E704, E266 | ||
exclude = menu_tools/object_performance/quality_obj.py,menu_tools/**/test_*.py |
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
name: Code quality | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
black-lint: | ||
runs-on: ubuntu-latest | ||
name: black | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: psf/black@stable | ||
with: | ||
options: "--check --verbose" | ||
src: "./menu_tools" | ||
version: "~= 23.12" | ||
flake8-lint: | ||
runs-on: ubuntu-latest | ||
name: flake8 | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: flake8 Lint | ||
uses: py-actions/flake8@v2 | ||
with: | ||
path: "./menu_tools" | ||
mypy-type-check: | ||
runs-on: ubuntu-latest | ||
name: mypy | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
architecture: 'x64' | ||
- run: | | ||
python -m pip install --upgrade pip poetry | ||
poetry install | ||
poetry run mypy |
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,11 +1,16 @@ | ||
**/__pycache__/* | ||
*.pyc | ||
pyenv/* | ||
**/*.png | ||
**/.DS_Store | ||
**/*.parquet | ||
**/rates.py | ||
objectPerformance/**/*.root | ||
objectPerformance/outputs/**/* | ||
**/*.root | ||
rates/table/out/* | ||
rates/table/cache/**/* | ||
rates/table/lib/* | ||
rates/table/rates_tables/* | ||
**/tmp/* | ||
outputs | ||
menu_tools.egg-info | ||
dist |
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 @@ | ||
/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/cache |
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
File renamed without changes.
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,51 @@ | ||
ElectronsMatchingBarrel: | ||
sample: DYLL_M50 | ||
version: V29 | ||
match_test_to_ref: True | ||
reference_object: | ||
object: "part_e" | ||
x_arg: "Pt" | ||
label: "Gen Electrons" | ||
cuts: | ||
event: | ||
- "{dr_0.3} < 0.15" | ||
- "abs({eta}) < 1.5" | ||
object: | ||
- "abs({eta}) < 2.4" | ||
test_objects: | ||
EG:default: "Pt" | ||
tkElectron:NoIso: "Pt" | ||
tkElectron:NoIsoLowPt: "Pt" | ||
tkElectron:Iso: "Pt" | ||
xlabel: "Gen. $p_T$ (GeV)" | ||
ylabel: "Matching Efficiency (Barrel)" | ||
binning: | ||
min: 0 | ||
max: 100 | ||
step: 3 | ||
|
||
ElectronsMatchingEndcap: | ||
sample: DYLL_M50 | ||
version: V29 | ||
match_test_to_ref: True | ||
reference_object: | ||
object: "part_e" | ||
x_arg: "Pt" | ||
label: "Gen Electrons" | ||
cuts: | ||
event: | ||
- "{dr_0.3} < 0.15" | ||
- "abs({eta}) > 1.5" | ||
object: | ||
- "abs({eta}) < 2.4" | ||
test_objects: | ||
EG:default: "Pt" | ||
tkElectron:NoIso: "Pt" | ||
tkElectron:NoIsoLowPt: "Pt" | ||
tkElectron:Iso: "Pt" | ||
xlabel: "Gen. $p_T$ (GeV)" | ||
ylabel: "Matching Efficiency (Endcap)" | ||
binning: | ||
min: 0 | ||
max: 100 | ||
step: 3 |
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,52 @@ | ||
ElectronsMatching_Eta_Pt10to25: | ||
sample: DYLL_M50 | ||
version: V29 | ||
match_test_to_ref: True | ||
reference_object: | ||
object: "part_e" | ||
x_arg: "Eta" | ||
label: "Gen Electrons" | ||
cuts: | ||
event: | ||
- "{dr_0.3} < 0.15" | ||
- "{pt} < 25" | ||
- "{pt} > 10" | ||
object: | ||
- "abs({eta}) < 3.0" | ||
test_objects: | ||
EG:default: "Eta" | ||
tkElectron:NoIso: "Eta" | ||
tkElectron:NoIsoLowPt: "Eta" | ||
tkElectron:Iso: "Eta" | ||
xlabel: "Gen. $\\eta$" | ||
ylabel: "Matching Efficiency ($10 < p_T < 25$ GeV)" | ||
binning: | ||
min: -3 | ||
max: 3 | ||
step: 0.2 | ||
|
||
ElectronsMatching_Eta_Pt25toInf: | ||
sample: DYLL_M50 | ||
version: V29 | ||
match_test_to_ref: True | ||
reference_object: | ||
object: "part_e" | ||
x_arg: "Eta" | ||
label: "Gen Electrons" | ||
cuts: | ||
event: | ||
- "{dr_0.3} < 0.15" | ||
- "{pt} > 25" | ||
object: | ||
- "abs({eta}) < 3.0" | ||
test_objects: | ||
EG:default: "Eta" | ||
tkElectron:NoIso: "Eta" | ||
tkElectron:NoIsoLowPt: "Eta" | ||
tkElectron:Iso: "Eta" | ||
xlabel: "Gen. $\\eta$" | ||
ylabel: "Matching Efficiency ($p_T > 25$ GeV)" | ||
binning: | ||
min: -3 | ||
max: 3 | ||
step: 0.2 |
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
Oops, something went wrong.