Skip to content

Commit

Permalink
Merge pull request #1 from mondalspandan/master
Browse files Browse the repository at this point in the history
Merge master
  • Loading branch information
mondalspandan authored Nov 14, 2023
2 parents 9e6e9cd + 9c7e5b1 commit 17370a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/BTVNanoCommissioning/helpers/update_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def missing_branch(events):
"btagDeepFlavCvB": jets.btagDeepFlavCvB,
},
)
if not hasattr(events.Jet, "btagDeepB"):
if hasattr(events.Jet, "btagDeepB_b") and not hasattr(events.Jet, "btagDeepB"):
jets = events.Jet
jets["btagDeepB"] = events.Jet.btagDeepB_b + events.Jet.btagDeepB_bb
events.Jet = update(
Expand Down Expand Up @@ -125,7 +125,9 @@ def missing_branch(events):
)
if hasattr(events, "METFixEE2017"):
events.MET = events.METFixEE2017
if not hasattr(events.PuppiMET, "MetUnclustEnUpDeltaX"):
if hasattr(events.PuppiMET, "ptUnclusteredUp") and not hasattr(
events.PuppiMET, "MetUnclustEnUpDeltaX"
):
met = events.PuppiMET
met["MetUnclustEnUpDeltaX"] = met.ptUnclusteredUp * np.cos(met.phiUnclusteredUp)
met["MetUnclustEnUpDeltaY"] = met.ptUnclusteredUp * np.sin(met.phiUnclusteredUp)
Expand Down

0 comments on commit 17370a9

Please sign in to comment.