Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HiggsDNA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
cms-analysis
General
HiggsDNA
Commits
48f4f1b0
Commit
48f4f1b0
authored
9 months ago
by
Florian Alexander Mausolf
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Forbid scale correction for MC"
parent
921ead16
No related branches found
No related tags found
1 merge request
!235
Resolve "Forbid scale correction for MC"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
higgs_dna/systematics/photon_systematics.py
+5
-0
5 additions, 0 deletions
higgs_dna/systematics/photon_systematics.py
with
5 additions
and
0 deletions
higgs_dna/systematics/photon_systematics.py
+
5
−
0
View file @
48f4f1b0
...
...
@@ -53,6 +53,9 @@ def Scale(pt, events, year="2022postEE", is_correction=True, restriction=None):
exit
()
if
is_correction
:
# scale is a residual correction on data to match MC calibration. Check if is MC, throw error in this case.
if
hasattr
(
events
,
"
GenPart
"
):
raise
ValueError
(
"
Scale corrections should only be applied to data!
"
)
if
year
in
[
"
2016preVFP
"
,
"
2016postVFP
"
,
"
2017
"
,
"
2018
"
]:
# the correction is already applied for Run 2
...
...
@@ -70,6 +73,8 @@ def Scale(pt, events, year="2022postEE", is_correction=True, restriction=None):
return
events
else
:
if
not
hasattr
(
events
,
"
GenPart
"
):
raise
ValueError
(
"
Scale uncertainties should only be applied to MC!
"
)
if
year
in
[
"
2016preVFP
"
,
"
2016postVFP
"
,
"
2017
"
,
"
2018
"
]:
# the uncertainty is applied in reverse because the correction is meant for data as I understand fro EGM instructions here: https://cms-talk.web.cern.ch/t/pnoton-energy-corrections-in-nanoaod-v11/34327/2
...
...
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