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

Improve MultiTrackValidator performance #8988

Merged
merged 9 commits into from May 11, 2015

Conversation

makortel
Copy link
Contributor

@makortel makortel commented May 7, 2015

This PR reduces the time spent in MultiTrackValidator in RAW2DIGI,RECO,VALIDATION,DQM jobs using TTbar + 35@25ns PU events by a factor of 25. The main sources of improvement are (in descending order, roughly)

  • LogInfo/LogVerbatim -> LogDebug/LogTrace (5x improvement ...)
  • Precalculate TP momentum+vertex wrt PCA for TPs passing the efficiency selection (instead of repeating them for all input track collections)
  • Eliminate (repeated) string comparisons in analyze()
  • Inline all trivial TrackingParticle accessors
  • Tune TrackingParticleSelector, do the efficiency-selection only once (instead of repeating for all input track collections)

A side effect is that now the dEdx-histograms are filled also for the subcollections of generalTracks, and the histograms are not booked for MTV instances other than the one for FullSim pp validation.

Tested in CMSSW_7_5_X_2015-05-03-1100+#8888 and rebased (+tested with limited matrix) on top of CMSSW_7_5_X_2015-05-07-1100 for IB containing #8888. No changes are expected in already-filled histograms.

@rovere @VinInn

- Remove string comparisons
- Remove copying of ValueMaps
- Tidy up monitoring implementation

Using the same ValueMap for all input track collections works for
track validation, as all input collections are Refs to the original
generalTracks.
- Break as soon as know that the return value is false
- Reorder tests such that lighter ones are checked first
- Reduce repeated calculations (minor)
Reduce repeated computations in
- MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos()
- MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos()
- MTVHistoProducerAlgoForTracker::fill_ResoAndPull_recoTrack_histos()

Streamline MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos(),
plus other cleanups.
This reduces the amount of repeated calculations of those. Eliminating
all repeated calculations would require fancier caching, or
precalculating them for all TPs (such that they would be accessible
through Refs, taking into account that label_tp_effic and
label_tp_fake may point to different TP collections...).
@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2015

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

Improve MultiTrackValidator performance

It involves the following packages:

SimDataFormats/TrackingAnalysis
SimTracker/Common
Validation/RecoTrack

@civanch, @nclopezo, @danduggan, @mdhildreth, @cmsbuild, @deguio can you please review it and eventually sign? Thanks.
@jlagram, @battibass, @threus, @abbiendi, @GiacomoSguazzoni, @gbenelli, @jhgoh, @VinInn, @appeltel, @cnuttens, @prolay, @rovere, @wmtford, @cerati, @venturia, @trocino, @dgulhan, @LBeck 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.

@deguio
Copy link
Contributor

deguio commented May 7, 2015

please test

@deguio
Copy link
Contributor

deguio commented May 7, 2015

this is very nice.. :)
thanks @makortel

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2015

The tests are being triggered in jenkins.

@civanch
Copy link
Contributor

civanch commented May 11, 2015

+1

@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, @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

5 participants