cmssw icon indicating copy to clipboard operation
cmssw copied to clipboard

improve `SiStripHitEffFromCalibTree` and `SiStripHitResolFromCalibTree`

Open mmusich opened this issue 8 months ago • 16 comments

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 all new-ly allocated memory;
  • use named constants for k_END_OF_LAYERS and k_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

mmusich avatar May 28 '24 21:05 mmusich