fixed jer smearing for all eras (2022-2024)#104
Conversation
jet.h
Outdated
| pt_after = 30.; | ||
| } | ||
| if (isdata_ && require_run_number) { | ||
| cRes = corr_l2l3res_->evaluate({float(run),eta,pt_after}); | ||
| // } | ||
| } else { | ||
| cRes = corr_l2l3res_->evaluate({eta,pt_after}); | ||
| } | ||
|
|
||
| pt_after *= cRes; |
There was a problem hiding this comment.
this doesn't look right - pt_after will be set to 30 * cRes(30), for pt < 30, while I think it should be pt_after * cRes(30).
jet.h
Outdated
| Jet_pt[i] *= 1.0 - Jet_rawFactor[i]; | ||
| Jet_mass[i] *= 1.0 - Jet_rawFactor[i]; | ||
| float jec_sf = 1.; | ||
| bool is2024Eta2To2p5 = (year_ == "2024" && Jet_eta[i] > 2 && Jet_eta[i] < 2.5); |
There was a problem hiding this comment.
| bool is2024Eta2To2p5 = (year_ == "2024" && Jet_eta[i] > 2 && Jet_eta[i] < 2.5); | |
| bool is2024Eta2To2p5 = (year_ == "2024" && std::abs(Jet_eta[i]) > 2 && std::abs(Jet_eta[i]) < 2.5); |
jet.h
Outdated
| is2024Eta2To2p5 | ||
| ); | ||
| } | ||
| Jet_pt[i] *= jec_sf; |
There was a problem hiding this comment.
The logic doesn't seem right: you apply JEC on Jet_pt, while Jet_pt already contains the old JEC. On the other hand jet_pt_corr is never used. Keep Jet_pt argument as const, define jet_pt_corr in the beginning as raw pt, and then use only it everywhere below.
jet.h
Outdated
| float jec_sf = 1.; | ||
| bool is2024Eta2To2p5 = (year_ == "2024" && std::abs(Jet_eta[i]) > 2 && std::abs(Jet_eta[i]) < 2.5); | ||
| if (apply_cmpd_ && !(is2024Eta2To2p5)){ | ||
| jec_sf = evaluateJECCompound(Jet_pt[i], |
There was a problem hiding this comment.
apply_cmpd_ name is misleading, rename apply_jec_. So nano -> pt conversion should be done for both compound and split JEC. Also, since it should be applied here, don't repeat it inside evaluate functions, pass raw pt directly.
Same comments for fat jets.
kandrosov
left a comment
There was a problem hiding this comment.
Tested with cms-flaf/H_mumu#48 (comment)
This PR is intended to fix bugs in JERC application for 2022, 2023, 2024.