Skip to content

Commit

Permalink
Merge pull request #102 from ikrommyd/add-examples
Browse files Browse the repository at this point in the history
chore: improve ntuples filters example
  • Loading branch information
ikrommyd authored Sep 30, 2024
2 parents 9116405 + a85d464 commit 6ff8a98
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/ntuples_filters/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```
run_analysis \
--config config.json \
--config config_nd.json/config_1d.json \
--settings settings.json \
--fileset fileset.json \
--executor distributed \
Expand Down
93 changes: 93 additions & 0 deletions examples/ntuples_filters/config_1d.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"workflow": "ElectronTagNProbeFromMiniNTuples",
"workflow_args": {
"filters": [
"passHLTEle30WPTightGsfTrackIsoFilter",
"passHLTEle115CaloIdVTGsfTrkIdTGsfDphiFilter",
"passHLTEle23Ele12CaloIdLTrackIdLIsoVLTrackIsoLeg1Filter",
"passHLTEle23Ele12CaloIdLTrackIdLIsoVLTrackIsoLeg2Filter",
"passHLTEle33CaloIdLMWPMS2Filter",
"passHLTDiEle33CaloIdLMWPMS2UnseededFilter"
]
},
"methods": [
{
"name": "get_1d_pt_eta_phi_tnp_histograms",
"args": {
"filter": "passHLTEle30WPTightGsfTrackIsoFilter",
"cut_and_count": true,
"eta_regions_pt": {
"barrel": [0.0, 1.4442],
"endcap_loweta": [1.566, 2.0],
"endcap_higheta": [2.0, 2.5]
},
"plateau_cut": 35
}
},
{
"name": "get_1d_pt_eta_phi_tnp_histograms",
"args": {
"filter": "passHLTEle115CaloIdVTGsfTrkIdTGsfDphiFilter",
"cut_and_count": true,
"eta_regions_pt": {
"barrel": [0.0, 1.4442],
"endcap_loweta": [1.566, 2.0],
"endcap_higheta": [2.0, 2.5]
},
"plateau_cut": 120
}
},
{
"name": "get_1d_pt_eta_phi_tnp_histograms",
"args": {
"filter": "passHLTEle23Ele12CaloIdLTrackIdLIsoVLTrackIsoLeg1Filter",
"cut_and_count": true,
"eta_regions_pt": {
"barrel": [0.0, 1.4442],
"endcap_loweta": [1.566, 2.0],
"endcap_higheta": [2.0, 2.5]
},
"plateau_cut": 25
}
},
{
"name": "get_1d_pt_eta_phi_tnp_histograms",
"args": {
"filter": "passHLTEle23Ele12CaloIdLTrackIdLIsoVLTrackIsoLeg2Filter",
"cut_and_count": true,
"eta_regions_pt": {
"barrel": [0.0, 1.4442],
"endcap_loweta": [1.566, 2.0],
"endcap_higheta": [2.0, 2.5]
},
"plateau_cut": 15
}
},
{
"name": "get_1d_pt_eta_phi_tnp_histograms",
"args": {
"filter": "passHLTEle33CaloIdLMWPMS2Filter",
"cut_and_count": true,
"eta_regions_pt": {
"barrel": [0.0, 1.4442],
"endcap_loweta": [1.566, 2.0],
"endcap_higheta": [2.0, 2.5]
},
"plateau_cut": 35
}
},
{
"name": "get_1d_pt_eta_phi_tnp_histograms",
"args": {
"filter": "passHLTDiEle33CaloIdLMWPMS2UnseededFilter",
"cut_and_count": true,
"eta_regions_pt": {
"barrel": [0.0, 1.4442],
"endcap_loweta": [1.566, 2.0],
"endcap_higheta": [2.0, 2.5]
},
"plateau_cut": 35
}
}
]
}
File renamed without changes.
4 changes: 2 additions & 2 deletions src/egamma_tnp/utils/runner_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ def get_proxy():
stat, out = subprocess.getstatusoutput("voms-proxy-info -e -p")
# stat is 0 if the proxy is valid
if stat != 0:
logger.error("No valid proxy found. Please create one.")
raise RuntimeError("No valid proxy found. Please create one.")
logger.warning("No valid proxy found. Please create one.")
warnings.warn("No valid proxy found. Please create one.", stacklevel=1)

_x509_localpath = out
_x509_path = os.environ["HOME"] + f'/.{_x509_localpath.split("/")[-1]}'
Expand Down

0 comments on commit 6ff8a98

Please sign in to comment.