Skip to content
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

Add minPhi+maxPhi to RecoTrackSelectorBase and TrackingParticleSelector #19029

Merged
merged 2 commits into from Jun 28, 2017

Conversation

makortel
Copy link
Contributor

@makortel makortel commented May 31, 2017

This PR adds ability to select tracks/TrackingParticles in phi slices to RecoTrackSelectorBase/TrackingParticleSelector.

Tested in 910pre3 and CMSSW_9_2_X_2017-05-30-1100 (rebased on top of CMSSW_9_2_X_2017-06-13-2300 CMSSW_9_2_X_2017-06-18-2300 CMSSW_9_2_X_2017-06-25-2300 CMSSW_9_3_X_2017-06-26-2300). No changes expected.

@rovere @VinInn

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @makortel (Matti Kortelainen) for master.

It involves the following packages:

CommonTools/RecoAlgos
HLTrigger/Configuration
PhysicsTools/RecoAlgos
SimTracker/Common
Validation/RecoTrack

@perrotta, @cmsbuild, @civanch, @monttj, @silviodonato, @fwyzard, @mdhildreth, @dmitrijus, @Martin-Grunewald, @slava77, @vanbesien, @davidlange6 can you please review it and eventually sign? Thanks.
@TaiSakuma, @felicepantaleo, @abbiendi, @rappoccio, @Martin-Grunewald, @threus, @geoff-smith, @seemasharmafnal, @LBeck, @mmarionncern, @cnuttens, @ahinzmann, @sdevissc, @jlagram, @jhgoh, @jdolen, @prolay, @schoef, @GiacomoSguazzoni, @rovere, @VinInn, @nhanvtran, @gkasieczka, @jalimena, @wmtford, @ebrondol, @mtosi, @dgulhan, @gbenelli, @mariadalfonso, @mmusich this is something you requested to watch as well.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 31, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/20226/console Started: 2017/05/31 11:24
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/20229/console Started: 2017/05/31 12:20

for producer in producers_by_type(process, "RecoTrackRefSelector"):
if not hasattr(producer, "minPhi"):
producer.minPhi = cms.double(-3.2)
producer.maxPhi = cms.double(3.2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (adding two top-level parameters to a plugin) is better done by a fillDescriptions().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -19,6 +19,8 @@ class RecoTrackSelectorBase {
ptMin_(cfg.getParameter<double>("ptMin")),
minRapidity_(cfg.getParameter<double>("minRapidity")),
maxRapidity_(cfg.getParameter<double>("maxRapidity")),
meanPhi_((cfg.getParameter<double>("minPhi")+cfg.getParameter<double>("maxPhi"))/2.),
rangePhi_((cfg.getParameter<double>("maxPhi")-cfg.getParameter<double>("minPhi"))/2.),
Copy link
Contributor

@fwyzard fwyzard May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not seem to work correctly for something like

minPhi = 4.712    #  3/2 π
maxPhi = 1.571    #  1/2 π

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fwyzard I agree. The idea is that minPhi should be smaller than maxPhi (I can certainly add a check for that), and in case one needs to specify a range containing π (which I understood was your point), the maxPhi is set to a value larger than π (I could also add checks that minPhi must be smaller than π, and maxPhi must be larger than -π).

The range from 3π/2 to π/2 (going through π) can be specified by reversing your minPhi and maxPhi

minPhi = 1.571    # 1/2 π
maxPhi = 4.712    #  3/2 π

and then it should work (selecting tracks whose phi is in range 3.1415 +- 1.5705).

I can also add some documentation to the classes to clarify the intended usage (as it was a bit tricky and took me some time end up with this implementation).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhm, no, my point was really to select tracks whose phi is around 0.
This

minPhi =  4.712    #  3/2 π
maxPhi =  1.571    #  1/2 π

should be equivalent to

minPhi = -1.571    #  -1/2 π == 3/2 π
maxPhi =  1.571    #  1/2 π

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok. Would the checks I mentioned above (minPhi < maxPhi, minPhi < π, maxPhi > -π) be enough (i.e. the first case would give an error), or the input to be normalized/sanitized first?

To me a configuration would be easier to understand (by me) if minPhi < maxPhi would be enforced despite of phi wrapping around, but if the opposite is desired, I'm fine with that as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One possibility would be to configure directly with meanPhi and rangePhi (or maybe call it deltaPhi).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think these checks (minPhi < maxPhi, minPhi < π, maxPhi > -π) should be enough to cover all possibilities.

You still leave the possibility of specifying some ranges in multiple ways (e.g. 3/4π..9/4π vs -5/4π..1/4π) but that's not a problem if the code handles both pair of values consistently.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fwyzard Indeed those are still possible, but the code should deal with them properly (thanks to reco::deltaPhi() reducing the range of the difference wrt. meanPhi to -π..π).

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19029/20229/summary.html

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /build/cmsbld/jenkins-workarea/workspace/compare-root-files-short-matrix/results/JR-comparison/PR-19029/20434.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D10_GenSimHLBeamSpotFull14+DigiFullTrigger_2023D10+RecoFullGlobal_2023D10+HARVESTFullGlobal_2023D10
  • /build/cmsbld/jenkins-workarea/workspace/compare-root-files-short-matrix/results/JR-comparison/PR-19029/23234.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D18_GenSimHLBeamSpotFull14+DigiFull_2023D18+RecoFullGlobal_2023D18+HARVESTFullGlobal_2023D18
  • /build/cmsbld/jenkins-workarea/workspace/compare-root-files-short-matrix/results/JR-comparison/PR-19029/27434.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D17_GenSimHLBeamSpotFull14+DigiFull_2023D17+RecoFullGlobal_2023D17+HARVESTFullGlobal_2023D17

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 3398 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 1786072
  • DQMHistoTests: Total failures: 34249
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1751650
  • DQMHistoTests: Total skipped: 173
  • DQMHistoTests: Total Missing objects: 0
  • Checked 94 log files, 14 edm output root files, 23 DQM output files

@Martin-Grunewald
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

Pull request #19029 was updated. @perrotta, @cmsbuild, @civanch, @monttj, @vazzolini, @silviodonato, @fwyzard, @mdhildreth, @dmitrijus, @Martin-Grunewald, @kmaeshima, @slava77, @vanbesien, @davidlange6 can you please check and sign again.

@makortel
Copy link
Contributor Author

@cmsbuild, please test

Rebased on top of CMSSW_9_3_X_2017-06-26-2300 (thanks @Martin-Grunewald for the notification).

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 27, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/20935/console Started: 2017/06/27 12:24

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19029/20935/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 22
  • DQMHistoTests: Total histograms compared: 1754263
  • DQMHistoTests: Total failures: 90
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1754007
  • DQMHistoTests: Total skipped: 166
  • DQMHistoTests: Total Missing objects: 0
  • Checked 90 log files, 14 edm output root files, 22 DQM output files

@slava77
Copy link
Contributor

slava77 commented Jun 27, 2017

+1

for #19029 ca093f4

  • rebased since the last signoff by reco; the code changes are the same (modulo the empty line and context line change in HLTrigger/Configuration/python/customizeHLTforCMSSW.py)
  • jenkins tests pass and comparisons show no differences

@Martin-Grunewald
Copy link
Contributor

+1

@davidlange6
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit b4e8e82 into cms-sw:master Jun 28, 2017
@makortel makortel deleted the selectorPhi branch February 12, 2018 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants