cms-L1TK / cmssw

Fork of CMSSW where improvements to L1 tracking code are developed.
http://cms-sw.github.io/
Apache License 2.0
4 stars 5 forks source link

Reduce L1 tracking CPU #172

Closed tomalin closed 2 years ago

tomalin commented 2 years ago

PR description:

This reduces the CPU used by L1FPGATrackProducer::produce() by 63%. This is achieved by: 1) Removing a call to SLHCEvent::layersHit() from TrackletEventProcessor.cc during normal running. This call is only needed when producing debug output. 2) The call to cms::Ort::ONNXRuntime from L1TrackQuality is now called only in the L1TrackQuality constructor (start of job) instead of for every track of every event. 3) Expensive calculation done in the IMATH code VarBase::calculate(), which are not needed with the default debug_level=0 have been swithched off. This function is called by the TrackletCalculator and dominates its CPU use.

This PR also reduces by 50% the CPU use of L1TrackNtupleMaker.cc by moving earlier in a loop over TP the cuts on Pt & eta, and rejecting also neutral TP. Remaining CPU use is dominated by the HitPatternHelper.

P.S. Also sneaked in a few trivial style improvements too.

Validation:

Checked tracking performance unchanged on 10 ttbar+200PU events. And output txt files for HLS unchanged.