Skip to content

Commit

Permalink
[rates] Validation with ak2. Remove shebangs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbonanom committed Jan 22, 2024
1 parent 1d22ebc commit 9d628c8
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
rates/table/out/*
rates/table/cache/**/*
rates/table/lib/*
rates/table/rates_tables/*
**/tmp/*
outputs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

A standard venv with Python3.11 can be created on lxplus
via `python3.11 -m venv <name_of_venv>` and all necessary
dependencies installed via `pip install -r requirements.txt`:
dependencies installed via `pip install .` as follows`:

```bash
python3.11 -m venv <name_of_venv>
Expand Down
41 changes: 22 additions & 19 deletions rates/table/cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,34 +57,35 @@ L1_DoubleTkEle:
obj: tkElectron
L1_DoubleTkEle_PFHTT:
cross_masks:
- abs(leg2.zvtx-leg1.et)<1
- abs(leg3.zvtx-leg1.et)<1
- (abs(leg2.zvtx-leg1.et)<1 & (leg2.deltaR(leg3)>0))
- (abs(leg3.zvtx-leg1.et)<1 & (leg2.deltaR(leg3)>0))
- (leg3.deltaR(leg2)>0)
leg1:
leg_mask:
- leg1.et>-99999.0
obj: z0L1TkPV
leg2:
leg_mask:
- leg2.offline_pt >= 8.0
- leg2.offline_pt > 8.0
- abs(leg2.eta)<2.5
- leg2.passeseleid * (abs(leg2.eta)<1.479) + (abs(leg2.eta)>1.479)
obj: tkElectron
leg3:
leg_mask:
- leg3.offline_pt >= 8.0
- leg3.offline_pt > 8.0
- abs(leg3.eta)<2.5
- leg3.passeseleid * (abs(leg3.eta)<1.479) + (abs(leg3.eta)>1.479)
obj: tkElectron
leg4:
leg_mask:
- leg4.offline_pt >= 390.0
- leg4.offline_pt > 390.0
obj: seededConePuppiHT
L1_DoubleTkMu:
cross_masks:
- abs(leg1.z0-leg2.z0)<1
- ((abs(leg1.z0-leg2.z0)<1) & (leg1.deltaR(leg2)>0))
leg1:
leg_mask:
- leg1.offline_pt >= 15.0
- leg1.offline_pt > 15.0
- abs(leg1.eta)<2.4
obj: gmtTkMuon
leg2:
Expand All @@ -95,9 +96,10 @@ L1_DoubleTkMu:
obj: gmtTkMuon
L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4:
cross_masks:
- leg1.deltaR(leg2)<1.4
- leg1.chg*leg2.chg<0.0
- abs(leg2.z0-leg1.z0)<1
- ((leg1.deltaR(leg2)<1.4))
- ((leg1.chg*leg2.chg<0.0))
- ((abs(leg2.z0-leg1.z0)<1))
- ((leg1.deltaR(leg2)>0))
leg1:
leg_mask:
- abs(leg1.eta)<1.5
Expand All @@ -110,9 +112,9 @@ L1_DoubleTkMu0er1p5_SQ_OS_dR_Max1p4:
obj: gmtTkMuon
L1_DoubleTkMu4_SQ_OS_dR_Max1p2:
cross_masks:
- leg1.deltaR(leg2)<1.2
- leg1.chg*leg2.chg<0.0
- abs(leg2.z0-leg1.z0)<1
- ((leg1.deltaR(leg2)<1.2) & (leg1.deltaR(leg2)>0))
- ((leg1.chg*leg2.chg<0.0) & (leg1.deltaR(leg2)>0))
- ((abs(leg2.z0-leg1.z0)<1) & (leg1.deltaR(leg2)>0))
leg1:
leg_mask:
- leg1.pt>4
Expand All @@ -127,10 +129,10 @@ L1_DoubleTkMu4_SQ_OS_dR_Max1p2:
obj: gmtTkMuon
L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18:
cross_masks:
- pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)>7.0
- pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)<18.0
- leg1.chg*leg2.chg<0.0
- abs(leg2.z0-leg1.z0)<1
- ((pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)>7.0) & (leg1.deltaR(leg2)>0))
- ((pairinvmass(leg2.pt,leg1.pt,leg2.eta,leg1.eta,leg2.phi,leg1.phi)<18.0) & (leg1.deltaR(leg2)>0))
- ((leg1.chg*leg2.chg<0.0) & (leg1.deltaR(leg2)>0))
- ((abs(leg2.z0-leg1.z0)<1) & (leg1.deltaR(leg2)>0))
leg1:
leg_mask:
- leg1.pt>4.5
Expand All @@ -145,8 +147,9 @@ L1_DoubleTkMu4p5er2p0_SQ_OS_Mass7to18:
obj: gmtTkMuon
L1_DoubleTkMu_PfHTT:
cross_masks:
- abs(leg2.z0-leg1.et)<1
- abs(leg3.z0-leg1.et)<1
- (abs(leg2.z0-leg1.et)<1 & (leg3.deltaR(leg2)>0))
- (abs(leg3.z0-leg1.et)<1 & (leg3.deltaR(leg2)>0))
- (leg3.deltaR(leg2)>0)
leg1:
leg_mask:
- leg1.et>-99999.0
Expand Down
5 changes: 3 additions & 2 deletions rates/table/cfg/v29/v29_cfg.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MenuV29:
version: "V29"
sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/13X/v29_RelVal/RelValTTbar_14TeV/RelVal_13X_TT_200PU_crab_v29_13X_RelVal_FixGenTree/230710_081407/L1NtuplePhaseII_Step1_hadd.root"
sample: "/eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/alobanov/phase2/menu/ntuples/CMSSW_12_5_2p1/v29/MinBias_1.root"
menu_config: "cfg/v29/v29_WITHMUONS_Final_clean_cfg.yml"
scalings:
scalings_path: "/eos/user/m/mbonanom/www/Postdoc/L1PhaseII/V29/scalings/"
Expand All @@ -9,4 +9,5 @@ MenuV29:
scalings_file: "scalings.yml"
table:
table_fname: "rates_full_Final"
table_outdir: "rates_tables/V29"
table_outdir: "rates_tables/V29"

1 change: 0 additions & 1 deletion rates/table/menu_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python
import numpy as np

from glob import glob
Expand Down
3 changes: 1 addition & 2 deletions rates/table/rate_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python
import argparse
import yaml

Expand Down Expand Up @@ -28,4 +27,4 @@
table = menu_config.make_table()
menu_config.dump_table(table)

menu_config.dump_masks()
menu_config.dump_masks()
2 changes: 0 additions & 2 deletions rates/table/scaler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/afs/cern.ch/user/d/dhundhau/public/miniconda3/envs/py310/bin/python

import os, yaml
from glob import glob
from menu_config import MenuConfig
Expand Down

0 comments on commit 9d628c8

Please sign in to comment.