New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove redundant product validity check from ConversionTrackProducer and modernize it #30082
Conversation
The bare "throw" will lead to abort because there is no exception to be thrown. On the other hand, the beamSpotHandle->position() will throw an exception if the product is missing (with much clearer message), so easiest fix is to just remove the check.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30082/15817
|
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages: RecoEgamma/EgammaPhotonProducers @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
The tests are being triggered in jenkins. |
if (filterOnConvTrackHyp && !beamSpotHandle.isValid()) { | ||
edm::LogError("Invalid Collection") << "invalid collection for the BeamSpot"; | ||
throw; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The beamspotHandle->position()
on line 114/109 will throw an exception (with much clearer message) if the Handle is not valid.
(by the way, does
math::XYZVector beamSpot = math::XYZVector(beamSpotHandle->position());
really need to be repeated for each input track?)
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
May I suggest then to leave the LogError, without throwing? Perhaps, while adding to the report also the |
Why? If |
@makortel : Ok about removing the LogError as a whole from the ConversionTrackProducer |
The code-checks are being triggered in jenkins. |
@perrotta Done, I could not resists on doing a bit more modernization on the same go. I hope it is fine. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30082/15900
|
@cmsbuild, please test |
The tests are being triggered in jenkins. |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR is part of #30074 even though it itself does not fix any workflow. The bare "throw" will lead to abort (*) because there is no exception to be thrown. On the other hand, the
beamSpotHandle->position()
will throw an exception if the product is missing (with much clearer message), so this PR proposes just remove the check.(*) https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/raw/slc7_amd64_gcc820/CMSSW_11_2_X_2020-06-01-2300/pyRelValMatrixLogs/run/135.9_ZMM_13+ZMMFS_13+HARVESTUP15FS+MINIAODMCUP15FS/step1_ZMM_13+ZMMFS_13+HARVESTUP15FS+MINIAODMCUP15FS.log
In addition this PR modernizes
ConversionTrackProducer
bymath::XYZVector
onceedm::Event::get()
instead of going viaedm::Handle
useTrajectory == True
edm::ESGetToken
PR validation:
Workflow 135.9 does not abort anymore (but it won't succeed either, the real fix is different but independent of this PR). Limited matrix runs.