cmssw
cmssw copied to clipboard
improve `SiStripHitEffFromCalibTree` and `SiStripHitResolFromCalibTree`
PR description:
Somewhat inspired by https://github.com/cms-sw/cms-bot/pull/2228, trying to debug crashes reported at https://github.com/cms-sw/cms-bot/pull/2228#issuecomment-2108606810, improve the modules SiStripHitEffFromCalibTree
and SiStripHitResolFromCalibTree
:
- close input calibTree files after reading them;
-
delete
allnew
-ly allocated memory; - use named constants for
k_END_OF_LAYERS
andk_END_OF_LAYS_AND_RINGS
in lieu of magic numbers
PR validation:
scram b runtests_testSiStripHitEfficiency
and scram b runtests_testSiStripHitResolution
run fine after the update.
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
Not a backport, might be backported to 14.0.X