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

Harmonize the use of reco::TrackBase::TrackAlgorithm enumeration #8315

Merged
merged 4 commits into from Mar 21, 2015

Conversation

makortel
Copy link
Contributor

This PR is a preparatory step towards adding enumerators for Phase1-specific iterations to reco::TrackBase::TrackAlgorithm enumeration. For now, the he intent is to preserve the current behaviour.

Comparing reco::TrackBase::TrackAlgorithm enumerators with equality on "magic numbers" and with less/greater than on anything are, in general, considered harmful. This PR replaces these numbers with enumerators, and the less/greater than comparisons with switches with explicit enumerators. In RecoTracker/FinalTrackSelectors/plugins/*ListMerger.cc an ordering between enumerators is genuinely needed, for them a separate array mapping the enumerators for their order "priority" is added (constructed compile-time).

Tested in CMSSW_7_5_X_2015-03-09-0200 with 9k events of RelValTTbar. No regression expected, none observed.

@rovere @VinInn @boudoul @venturia

…th explicit list of enumerators

The order of the enumerators do not, in general, contain (the naively
expected) information. It is better to spell out explicitly all the
enumerators of interest. This issue will become relevant when we add
enumerators for the Phase1-specific iterations.
The order can, in general, be different from the order of the
enumerators (and will when the Phase1 enumerators get added).
@makortel
Copy link
Contributor Author

We considered using the C++11 strongly-typed enum for the TrackAlgorithm, but decided to postpone that until there is no need to protect it with #ifdef in the header.

@@ -42,7 +42,7 @@
chi2_tight_max = cms.double(3.0),
nhits_tight_min = cms.double(11),
ptErr_tight_max = cms.double(0.1),
maxTrackAlgo = cms.int32(8)
trackAlgos = cms.vstring("undefAlgorithm", "ctf", "rs", "cosmics", "initialStep", "lowPtTripletStep", "pixelPairStep", "detachedTripletStep"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not perfectly happy with ending up to two parameters with similar names (trackAlgos and track_algos) and different semantics, but I think this issue kind-of existed already before.

@cmsbuild
Copy link
Contributor

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

Harmonize the use of reco::TrackBase::TrackAlgorithm enumeration

It involves the following packages:

DQM/PhysicsHWW
ElectroWeakAnalysis/Utilities
PhysicsTools/UtilAlgos
RecoEgamma/EgammaPhotonProducers
RecoMET/METAlgorithms
RecoMET/METProducers
RecoParticleFlow/PFProducer
RecoParticleFlow/PFTracking
RecoTracker/FinalTrackSelectors
Validation/RecoEgamma
Validation/RecoTrack

@nclopezo, @cvuosalo, @monttj, @cmsbuild, @deguio, @slava77, @vadler, @danduggan can you please review it and eventually sign? Thanks.
@ghellwig, @TaiSakuma, @schoef, @rappoccio, @dgulhan, @venturia, @mmarionncern, @ahinzmann, @lgray, @jdolen, @cerati, @Sam-Harper, @GiacomoSguazzoni, @rovere, @VinInn, @nhanvtran, @wmtford, @richard-cms, @appeltel, @gpetruc, @mariadalfonso, @bachtis this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@nclopezo you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@cvuosalo
Copy link
Contributor

@cmsbuild please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs unless changes (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @nclopezo, @ktf, @smuzaffar

@davidlange6
Copy link
Contributor

+1

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

6 participants