Skip to content

Commit

Permalink
fix: merge Spandan's dev ci:skip syst
Browse files Browse the repository at this point in the history
  • Loading branch information
Ming-Yan committed Nov 8, 2023
1 parent f289458 commit 900044e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ctag_DY_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
push:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/workflows/*BTA*'
- 'src/BTVNanoCommissioning/workflows/ctag_*DY*'
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- '.github/workflows/ctag_DY_workflow.yml'
pull_request_target:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/workflows/*BTA*'
- 'src/BTVNanoCommissioning/workflows/ctag_*DY*'
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- '.github/workflows/ctag_DY_workflow.yml'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ctag_Wc_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
push:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/workflows/*BTA*'
- 'src/BTVNanoCommissioning/workflows/ctag_*Wc*'
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- '.github/workflows/ctag_Wc_workflow.yml'

pull_request_target:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/workflows/*BTA*'
- 'src/BTVNanoCommissioning/workflows/ctag_*Wc*'
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- '.github/workflows/ctag_Wc_workflow.yml'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ctag_ttbar_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: ttbar ctag Workflows
name: ctag ttbar workflows

on:
push:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/workflows/*BTA*'
- 'src/BTVNanoCommissioning/workflows/ctag*tt*'
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- '.github/workflows/ttbar_ctag_workflow.yml'
- '.github/workflows/ctag_ttbar_workflow.yml'
pull_request_target:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/workflows/*BTA*'
- 'src/BTVNanoCommissioning/workflows/ctag*tt*'
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- '.github/workflows/ttbar_ctag_workflow.yml'
- '.github/workflows/ctag_ttbar_workflow.yml'
workflow_dispatch:

jobs:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ttbar_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ on:
push:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/workflows/*BTA*'
- 'src/BTVNanoCommissioning/workflows/tt*'
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- '.github/workflows/ttbar_SL_workflow.yml'
- '.github/workflows/ttbar_workflow.yml'
pull_request_target:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/workflows/*BTA*'
- 'src/BTVNanoCommissioning/workflows/tt*'
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- '.github/workflows/ttbar_SL_workflow.yml'
- '.github/workflows/ttbar_workflow.yml'
workflow_dispatch:

jobs:
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,12 +643,15 @@ Yout can find the secret configuration in the direcotry : `Settings>>Secrets>>Ac
- `GRID_USERCERT` & `GRID_USERKEY`: Encrypt your grid user certification `base64 -i ~/.globus/userkey.pem | awk NF=NF RS= OFS=` and `base64 -i ~/.globus/usercert.pem | awk NF=NF RS= OFS=` and copy the output to the entry.

Special commit head messages could run different commands in actions (add the flag in front of your commit)
The default configureation is doing
```
python runner.py --workflow emctag_ttdilep_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isArray --isSyst all
```

- `[skip ci]`: not running ci at all in the commit message
- `[run array]` : add `--isArray` option
- `[run syst all]` : add `--isSyst all`
- `[run syst jerc]` : add `--isSyst JERC_split`
- `[run syst wei]` : add `--isSyst weight_only`
- `ci:skip array` : remove `--isArray` option
- `ci:JERC_split` : change systematic option to split JERC uncertainty sources `--isSyst JERC_split`
- `ci:weight_only` : change systematic option to weight only variations `--isSyst weight_only`

### Running jupyter remotely
1. On your local machine, edit `.ssh/config`:
Expand Down
5 changes: 4 additions & 1 deletion condor/execute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,17 @@ python runner.py $OPTS

# Transfer output
if [[ ${ARGS[outputXrootdDir]} == root://* ]]; then

xrdcp --silent -p -f -r hists_* ${ARGS[outputXrootdDir]}/
if [[ "$OPTS" == *"isArray"* ]]; then
xrdcp --silent -p -f -r arrays_* ${ARGS[outputXrootdDir]}/
fi
else
mkdir -p ${ARGS[outputXrootdDir]}
cp -p -f -r hists_* ${ARGS[outputXrootdDir]}/
cp -p -f -r arrays_* ${ARGS[outputXrootdDir]}/
if [[ "$OPTS" == *"isArray"* ]]; then
cp -p -f -r arrays_* ${ARGS[outputXrootdDir]}/
fi
fi

### one can also consider origanizing the root files in the subdirectory structure ###
Expand Down
19 changes: 18 additions & 1 deletion src/BTVNanoCommissioning/helpers/update_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ def missing_branch(events):
if hasattr(events, "fixedGridRhoFastjetAll")
else events.Rho.fixedGridRhoFastjetAll
)

if not hasattr(events.Jet, "btagDeepFlavB"):
jets = events.Jet
jets["btagDeepFlavB"] = (
events.Jet.btagDeepFlavB_b
+ events.Jet.btagDeepFlavB_bb
+ events.Jet.btagDeepFlavB_lepb
)
events.Jet = update(
events.Jet,
{"btagDeepFlavB": jets.btagDeepFlavB},
)
if hasattr(events.Jet, "btagDeepFlavCvL") and not hasattr(
events.Jet, "btagDeepFlavC"
):
Expand Down Expand Up @@ -73,6 +83,13 @@ def missing_branch(events):
"btagDeepFlavCvB": jets.btagDeepFlavCvB,
},
)
if not hasattr(events.Jet, "btagDeepB"):
jets = events.Jet
jets["btagDeepB"] = events.Jet.btagDeepB_b + events.Jet.btagDeepB_bb
events.Jet = update(
events.Jet,
{"btagDeepB": jets.btagDeepB},
)
if hasattr(events.Jet, "btagDeepC") and not hasattr(events.Jet, "btagDeepCvL"):
jets["btagDeepCvL"] = np.maximum(
np.minimum(
Expand Down

0 comments on commit 900044e

Please sign in to comment.