Bosonic Recoil Corrections#110
Conversation
|
@cms-flaf-bot please test
|
|
pipeline#14905862 started |
|
pipeline#14905862 passed |
|
Hi @kandrosov , this PR is ready for review. |
There was a problem hiding this comment.
Pull request overview
This PR introduces bosonic recoil corrections (HLepRare recommended V-recoil) into the Corrections submodule by adding a new recoil correction provider (C++/ROOT JIT) and wiring it into Corrections.py, along with adding v5 correctionlib recoil payloads under Corrections/data/hleprare/recoil.
Changes:
- Add a new recoil correction module (
recoil.py) that loads the appropriate v5 recoil JSON (per era) and initializes a C++ provider via ROOT JIT. - Add a C++ recoil provider implementation (
recoil.h) that builds LHE boson/visible boson 4-vectors, derives an njet category from reco jets, and evaluates correctionlib recoil corrections + uncertainties. - Integrate recoil correction application into
Corrections.pyand add the required v5 recoil JSON payloads (Git LFS pointers).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
Corrections.py |
Adds recoil property and applyRecoilCorrections() to define corrected MET and (optionally) systematic variations in the dataframe. |
recoil.py |
New Python-side initializer that locates the recoil JSON under ANALYSIS_PATH and ROOT-JIT includes/initializes the C++ provider. |
recoil.h |
New C++ correctionlib provider implementing recoil correction evaluation and uncertainty propagation. |
data/hleprare/recoil/Recoil_corrections_v5.json.gz |
Adds v5 recoil payload (LFS pointer). |
data/hleprare/recoil/Recoil_corrections_2022preEE_v5.json.gz |
Adds 2022 preEE v5 payload (LFS pointer). |
data/hleprare/recoil/Recoil_corrections_2022postEE_v5.json.gz |
Adds 2022 postEE v5 payload (LFS pointer). |
data/hleprare/recoil/Recoil_corrections_2023preBPix_v5.json.gz |
Adds 2023 preBPix v5 payload (LFS pointer). |
data/hleprare/recoil/Recoil_corrections_2023postBPix_v5.json.gz |
Adds 2023 postBPix v5 payload (LFS pointer). |
data/hleprare/recoil/Recoil_corrections_2024_v5.json.gz |
Adds 2024 v5 payload (LFS pointer). |
| if (method == "QuantileMapFit") { | ||
| if (std::abs(val) > 150.) { | ||
| return safeEvaluate(corr_rescaling_, order, njet, ptll, var, val); | ||
| } | ||
| throw std::runtime_error("QuantileMapFit not implemented in the current setup"); | ||
| } |
| print(f"Applying bosonic recoil corrections with order {recoil_order}.") | ||
| recoil_method = self.to_apply["recoil"].get("method", "QuantileMapHist") | ||
| apply_systematics = self.to_apply["recoil"].get("apply_systematics", True) | ||
|
|
|
@cms-flaf-bot please test
|
|
pipeline#14925448 started |
|
pipeline#14925448 failed |
|
@cms-flaf-bot please test
|
|
pipeline#14928063 started |
|
pipeline#14928063 failed |
|
@cms-flaf-bot please test
|
|
pipeline#14928348 started |
|
pipeline#14928348 passed |
|
Hi @kandrosov , this PR is ready for review |
| return p4; | ||
| } | ||
|
|
||
| static LorentzVectorM GetLHEBosonVisP4(const RVecF& pt, |
There was a problem hiding this comment.
What do you mean by visible p4 of LHE boson? It can't be computed based on LHE information.
| return apdg == 11 || apdg == 13 || apdg == 15; | ||
| } | ||
|
|
||
| static bool PassLHEBosonParticleSelection(const int pdgId, |
There was a problem hiding this comment.
Why do you work with LHE Particles? I don't see where it is required as an input for corrections.
There was a problem hiding this comment.
@kandrosov you said to switch from GenPart_* to LHEPart_* objects.
Our anaTuples in bbtautau do not save GenPart_* objects at the moment. But you said LHEPart_* objects are sufficient and asked me to switch to them.
|
@cms-flaf-bot please test
|
|
pipeline#14978977 started |
|
pipeline#14978977 failed |
|
@cms-flaf-bot please test
|
|
pipeline#14984820 started |
|
pipeline#14984820 failed |
|
@cms-flaf-bot please test
|
|
pipeline#14985885 started |
|
pipeline#14985885 passed |
|
@cms-flaf-bot test please
|
|
pipeline#14989838 started |
|
@cms-flaf-bot please test
|
Following the HLepRare recommendation, applying Bosonic Recoil Corrections
Adding version 5 of the CorrectionLib recoil files.
Related issue: https://github.com/cms-flaf/HH_bbtautau_planning/issues/81
Edit:
Konstantin said we don't need the
GenPart_*objects, we can instead do the following:LHEPart_*objects instead ofGenPart_*objects in this recoil correction.LHE_Vptforptll(orpt_ll)njet, use number of reconstructed b jets and VBF jets. use appropriate pT cuts on reco b jets and VBF jets when using njet.