Skip to content
Snippets Groups Projects

implementing the SAS for electrons functions

Merged Caio Cesar Daumann requested to merge SAS_for_electrons into master
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
37
38 if is_correction:
39 # scale is a residual correction on data to match MC calibration. Check if is MC, throw error in this case.
40 if hasattr(events, "GenPart"):
41 raise ValueError("Scale corrections should only be applied to data!")
42
43 if year in ["2016preVFP", "2016postVFP", "2017", "2018"]:
44 # the correction is already applied for Run 2
45 logger.info("the scale correction for Run 2 MC is already applied in nAOD, nothing to be done")
46 else:
47 correction = evaluator.evaluate("total_correction", gain, run, eta, r9, ecalEnergy_)
48 ecal_energy_corr = ecalEnergy_ * correction
49
50 corrected_electrons = deepcopy(events.Electron)
51 ecal_energy_corr = ak.unflatten(ecal_energy_corr, counts)
52 corrected_electrons["ele_ecalEnergy"] = ecal_energy_corr
  • Hi @cdaumann, shouldn't the electron scale correction also change it's pT in the end? Here you only change the ECAL energy. Should be sufficient for what you want to do in the Zee processor. I might be missing something, but for an analysis that needs precision in electrons, we'd need an actual correction to the electron pT, no?

  • Please register or sign in to reply
  • added 1 commit

    • f640e722 - applying the SaS on the electron pt

    Compare with previous version

  • added 26 commits

    Compare with previous version

  • Florian Alexander Mausolf marked this merge request as ready

    marked this merge request as ready

  • mentioned in commit 0b4d85d0

  • Please register or sign in to reply
    Loading