Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified analysis/data/EGammaSF/2022post/electron.json.gz
Binary file not shown.
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2022post/electronSS_EtDependent.json.gz
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2022post/photon.json.gz
Binary file not shown.
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2022post/photonSS_EtDependent.json.gz
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2022pre/electron.json.gz
Binary file not shown.
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2022pre/electronSS_EtDependent.json.gz
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2022pre/photon.json.gz
Binary file not shown.
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2022pre/photonSS_EtDependent.json.gz
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2023post/electron.json.gz
Binary file not shown.
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2023post/electronSS_EtDependent.json.gz
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2023post/photon.json.gz
Binary file not shown.
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2023post/photonSS_EtDependent.json.gz
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2023pre/electron.json.gz
Binary file not shown.
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2023pre/electronSS_EtDependent.json.gz
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2023pre/photon.json.gz
Binary file not shown.
Binary file not shown.
Binary file modified analysis/data/EGammaSF/2023pre/photonSS_EtDependent.json.gz
Binary file not shown.
Binary file added analysis/data/EGammaSF/2024/electron.json.gz
Binary file not shown.
Binary file added analysis/data/EGammaSF/2024/electronHlt.json.gz
Binary file not shown.
Binary file not shown.
Binary file added analysis/data/EGammaSF/2024/photon.json.gz
Binary file not shown.
Binary file not shown.
19 changes: 15 additions & 4 deletions analysis/processors/stop_processor_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,11 +707,12 @@ def process(self, events):
#print(t_medium.pt)

### Jets
j = events.Jet
j = events.Jet # Events/Jet_*
### Appling JECs
jec_corr = get_jec_correction(self._year, j.pt, j.eta, j.phi, j.rho, j.area, run, isData)
j['pt'] = j.pt * jec_corr
j['mass'] = j.mass * jec_corr

### Appling JetID
j['isgood'] = isGoodJet(j, self._year)
j['T'] = ak.zip({
Expand Down Expand Up @@ -820,6 +821,7 @@ def process(self, events):
selection.add('zero_e', n_e_veto == 0)
selection.add('zero_m', n_m_loose == 0)
selection.add('zero_t', n_t_medium == 0)
selection.add('one_veto_lepton', ((n_e_veto == 1) & (n_m_loose == 0)) | ((n_e_veto == 0) & (n_m_loose == 1)))
selection.add('one_e', n_e_medium == 1)
selection.add('one_m', n_m_medium == 1)
selection.add('one_p', n_p_medium == 1)
Expand All @@ -846,23 +848,32 @@ def process(self, events):
'met_250', 'puppi/calo',
'ht_300', 'opening_angles_preselection'
],
'cat2_highDeltaM_mediumB': [
'cat2_LLCR': [
'lumimask', 'met_filters',
'signal_trigger',
'zero_trk_e', 'zero_trk_m', 'zero_trk_pi',
'zero_t', 'two_j',
'one_veto_lepton',
'met_250', 'puppi/calo',
'ht_300', 'opening_angles_preselection'
],
'cat3_highDeltaM_mediumB': [
'lumimask', 'met_filters',
'signal_trigger',
'zero_trk_e', 'zero_trk_m', 'zero_trk_pi',
'zero_m', 'zero_t', 'zero_e', 'five_j', 'one_b',
'met_250', 'puppi/calo',
'ht_300', 'opening_angles_highDeltaM'
],
'cat3_highDeltaM_tightB': [
'cat4_highDeltaM_tightB': [
'lumimask', 'met_filters',
'signal_trigger',
'zero_trk_e', 'zero_trk_m', 'zero_trk_pi',
'zero_m', 'zero_t', 'zero_e', 'five_j', 'one_b_tight',
'met_250', 'puppi/calo',
'ht_300', 'opening_angles_highDeltaM'
],
'cat4_highDeltaM_looseB': [
'cat5_highDeltaM_looseB': [
'lumimask', 'met_filters',
'signal_trigger',
'zero_trk_e', 'zero_trk_m', 'zero_trk_pi',
Expand Down
10 changes: 6 additions & 4 deletions analysis/utils/corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def get_jec_correction(year, pt, eta, phi, rho, area, run, isData):
evaluator = correctionlib.CorrectionSet.from_file('data/JMESF/'+year+'/jet_jerc.json.gz')
counts = ak.num(pt)
run, _ = ak.broadcast_arrays(run, pt)
rho, _ = ak.broadcast_arrays(rho, pt)
pt, eta, phi, rho, area, run = ak.flatten(pt), ak.flatten(eta), ak.flatten(phi), ak.flatten(rho), ak.flatten(area), ak.flatten(run)
if year == '2022pre':
## DATA Correction
Expand Down Expand Up @@ -136,20 +137,21 @@ def get_fjec_correction(year, pt, eta, phi, rho, area, run, isData):
evaluator = correctionlib.CorrectionSet.from_file('data/JMESF/'+year+'/fatJet_jerc.json.gz')
counts = ak.num(pt)
run, _ = ak.broadcast_arrays(run, pt)
rho, _ = ak.broadcast_arrays(rho, pt)
pt, eta, phi, rho, area, run = ak.flatten(pt), ak.flatten(eta), ak.flatten(phi), ak.flatten(rho), ak.flatten(area), ak.flatten(run)
if year == '2022pre':
## DATA Correction
if isData:
jec_names = {
'L1FastJet' : "Summer22_22Sep2023_RunCD_V3_DATA_L2Relative_AK8PFPuppi",
'L2Relative' : "Summer22_22Sep2023_RunCD_V3_DATA_L3Absolute_AK8PFPuppi",
'L1FastJet' : "Summer22_22Sep2023_RunCD_V3_DATA_L1FastJet_AK8PFPuppi",
'L2Relative' : "Summer22_22Sep2023_RunCD_V3_DATA_L2Relative_AK8PFPuppi",
'L3Absolute' : "Summer22_22Sep2023_RunCD_V3_DATA_L3Absolute_AK8PFPuppi",
'L2L3Residual' : "Summer22_22Sep2023_RunCD_V3_DATA_L2L3Residual_AK8PFPuppi"
}
# L1FastJet Correction
corr_L1 = evaluator[jec_names['L1FastJet']].evaluate(area, eta, pt, rho)
# L2Relative Correction
corr_L2 = evaluator[jec_names['L2Relative']].evaluate(eta, phi, pt)
corr_L2 = evaluator[jec_names['L2Relative']].evaluate(eta, pt)
# L3Absolute Correction
corr_L3 = evaluator[jec_names['L3Absolute']].evaluate(eta, pt)
# L2L3Residual Correction
Expand All @@ -165,7 +167,7 @@ def get_fjec_correction(year, pt, eta, phi, rho, area, run, isData):
# L1FastJet Correction
corr_L1 = evaluator[jec_names['L1FastJet']].evaluate(area, eta, pt, rho)
# L2Relative Correction
corr_L2 = evaluator[jec_names['L2Relative']].evaluate(eta, phi, pt)
corr_L2 = evaluator[jec_names['L2Relative']].evaluate(eta, pt)
# L3Absolute Correction
corr_L3 = evaluator[jec_names['L3Absolute']].evaluate(eta, pt)
corr = corr_L1 * corr_L2 * corr_L3
Expand Down