Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add instruction & feat: JEC/jetveto from jsonpog #106

Merged
merged 7 commits into from
Jan 23, 2025

Conversation

Ming-Yan
Copy link
Collaborator

@Ming-Yan Ming-Yan commented Jan 5, 2025

add documentation for commissioning

- doc: add instructions of the CommFW, remove contents from readme
- doc: add api information
- env: update missing module
-
@Ming-Yan Ming-Yan changed the title doc: add instruction doc: add instruction & feat: JEC/jetveto from jsonpog Jan 17, 2025
flatCorrFactor = corr.evaluate(*values)
corrFactor = ak.unflatten(flatCorrFactor, nj)
nocorrjet["EventID"] = ak.broadcast_arrays(events.event, nocorrjet.pt)[0]
nocorrjet["Genpt"] = events.GenJet[nocorrjet.genJetIdx].pt
Copy link
Contributor

@philippgadow philippgadow Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only run for MC (I think):

Suggested change
nocorrjet["Genpt"] = events.GenJet[nocorrjet.genJetIdx].pt
if "GenJet" in events.fields: nocorrjet["Genpt"] = events.GenJet[nocorrjet.genJetIdx].pt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(maybe I was wrong here, but I got a mistake when running this PR on Summer22 data): AttributeError: no field named 'GenJet'

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @philippgadow thanks for the suggestion, you are right, I need to fix this :p I was only test on MC and this does not show error messages

@philippgadow
Copy link
Contributor

also I saw the BTA producer workflows giving an error (also in the CI):

File "/home/runner/work/BTVNanoCommissioning/BTVNanoCommissioning/src/BTVNanoCommissioning/utils/correction.py", line 825, in JME_shifts
    if "Summer22" in campaign:
TypeError: argument of type 'bool' is not iterable

I fixed it locally with if "Summer22" in str(campaign):

@Ming-Yan
Copy link
Collaborator Author

also I saw the BTA producer workflows giving an error (also in the CI):

File "/home/runner/work/BTVNanoCommissioning/BTVNanoCommissioning/src/BTVNanoCommissioning/utils/correction.py", line 825, in JME_shifts
    if "Summer22" in campaign:
TypeError: argument of type 'bool' is not iterable

I fixed it locally with if "Summer22" in str(campaign):

Hi @philippgadow indeed this is because introduce the year in the correction configuration, to fix it, we need to change the JME_shifts

@@ -73,7 +73,14 @@ class NanoProcessor(processor.ProcessorABC):
 
         if "JME" in self.SF_map.keys() or "jetveto" in self.SF_map.keys():
             shifts = JME_shifts(
-                shifts, self.SF_map, events, self._campaign, isRealData, False, True
+                shifts,
+                self.SF_map,
+                events,
+                self._year,
+                self._campaign,
+                isRealData,
+                False,
+                True,
             )

@@ -106,6 +106,7 @@
"--campaign",
help="campaign name (same as the campaign in runner.py)",
default=None,
require=True,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
require=True,
required=True,

@philippgadow
Copy link
Contributor

Hi @philippgadow indeed this is because introduce the year in the correction configuration, to fix it, we need to change the JME_shifts

@@ -73,7 +73,14 @@ class NanoProcessor(processor.ProcessorABC):
 
         if "JME" in self.SF_map.keys() or "jetveto" in self.SF_map.keys():
             shifts = JME_shifts(
-                shifts, self.SF_map, events, self._campaign, isRealData, False, True
+                shifts,
+                self.SF_map,
+                events,
+                self._year,
+                self._campaign,
+                isRealData,
+                False,
+                True,
             )

Thanks :) - I just realised that I wasn't really fixing the issue and have modified the workflow, it's running now.

@Ming-Yan Ming-Yan merged commit 08d8565 into cms-btv-pog:master Jan 23, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants