Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZX_PostProcessingPlotter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christian Weber
ZX_PostProcessingPlotter
Commits
ce88c47d
Commit
ce88c47d
authored
2 years ago
by
Christian Weber
Browse files
Options
Downloads
Patches
Plain Diff
limitsetting - update mechanism to select signal physics process
Can now also use generic 'signal'
parent
ce3ce16b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
limitSetting/limitSetting.py
+34
-3
34 additions, 3 deletions
limitSetting/limitSetting.py
with
34 additions
and
3 deletions
limitSetting/limitSetting.py
+
34
−
3
View file @
ce88c47d
...
...
@@ -787,6 +787,33 @@ def setupHistofactoryData(TH1):
return
dataObj
def
selectSignal
(
signalTag
,
physicsProcessList
):
def
matchFunction
(
tag
):
rePattern
=
re
.
compile
(
tag
)
matchList
=
filter
(
rePattern
.
search
,
physicsProcessList
)
# Read Note below
if
not
isinstance
(
matchList
,
list
):
matchList
=
[
item
for
item
in
matchList
]
if
len
(
matchList
)
>
0
:
return
matchList
[
0
]
else
:
return
None
signalSampleExact
=
matchFunction
(
signalTag
)
if
signalSampleExact
is
None
:
signalSampleExact
=
matchFunction
(
"
signal
"
)
# selection via difflib
#signalSampleExact = difflib.get_close_matches( signalSample , masterDict[region].keys())[0]
return
signalSampleExact
if
__name__
==
'
__main__
'
:
parser
=
argparse
.
ArgumentParser
()
...
...
@@ -918,9 +945,13 @@ if __name__ == '__main__':
templatePaths
=
{}
# Prep signal sample locations
signalSample
=
"
ZZd %iGeV
"
%
(
massPoint
)
signalSampleExact
=
difflib
.
get_close_matches
(
signalSample
,
masterDict
[
region
].
keys
())[
0
]
templatePaths
[
"
Signal
"
]
=
getFullTDirPath
(
masterDict
,
region
,
signalSampleExact
,
"
Nominal
"
,
flavor
)
# region+"/ZZd, m_{Zd} = 35GeV/Nominal/"+flavor+"/ZXSR_ZZd, m_{Zd} = 35GeV_Nominal_All"
signalSampleTag
=
"
ZZd\D+%iGeV
"
%
(
massPoint
)
signalSample
=
selectSignal
(
signalSampleTag
,
masterDict
[
region
].
keys
())
templatePaths
[
"
Signal
"
]
=
getFullTDirPath
(
masterDict
,
region
,
signalSample
,
"
Nominal
"
,
flavor
)
# region+"/ZZd, m_{Zd} = 35GeV/Nominal/"+flavor+"/ZXSR_ZZd, m_{Zd} = 35GeV_Nominal_All"
templatePaths
[
"
ZZ
"
]
=
getFullTDirPath
(
masterDict
,
region
,
"
ZZ
"
,
"
Nominal
"
,
flavor
)
templatePaths
[
"
H4l
"
]
=
getFullTDirPath
(
masterDict
,
region
,
"
H4l
"
,
"
Nominal
"
,
flavor
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment