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

Clean up L1TTrackMatch producers [11_1_X] #30982

Merged
merged 7 commits into from Aug 3, 2020

Conversation

kpedro88
Copy link
Contributor

backport of #30970

This will make TDR production more efficient on multiple threads by eliminating stalls from legacy producers.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 30, 2020

A new Pull Request was created by @kpedro88 (Kevin Pedro) for CMSSW_11_1_X.

It involves the following packages:

L1Trigger/L1TTrackMatch

@cmsbuild, @rekovic, @benkrikler, @kpedro88 can you please review it and eventually sign? Thanks.
@Martin-Grunewald this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@kpedro88
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 30, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 592181a
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-cc232b/8431/summary.html
CMSSW: CMSSW_11_1_X_2020-07-30-1100
SCRAM_ARCH: slc7_amd64_gcc820

@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-cc232b/8431/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2780792
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2780741
  • DQMHistoTests: Total skipped: 50
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 35 files compared)
  • Checked 152 log files, 16 edm output root files, 36 DQM output files

@kpedro88
Copy link
Contributor Author

+upgrade

@kpedro88
Copy link
Contributor Author

@silviodonato if there will be another 11_1_X patch to include #30979, it would be good to include this one also

Comment on lines -668 to -697
int match_trk_idx = matches.at(imatch);
if (match_trk_idx < 0)
continue; // this muon was not matched to any candidate

// take properties of the track
const L1TTTrackType& matchTk = (*l1tksH.product())[match_trk_idx];
const auto& p3 = matchTk.momentum();
const auto& tkv3 = matchTk.POCA();
float p4e = sqrt(mu_mass * mu_mass + p3.mag2());
math::XYZTLorentzVector l1tkp4(p3.x(), p3.y(), p3.z(), p4e);

edm::Ptr<L1TTTrackType> l1tkPtr(l1tksH, match_trk_idx);
edm::Ref<RegionalMuonCandBxCollection> l1muRef(muonH, imatch);

float trkisol = -999;
TkMuon l1tkmu(l1tkp4, l1muRef, l1tkPtr, trkisol);
l1tkmu.setTrackCurvature(matchTk.rInv());
l1tkmu.setTrkzVtx((float)tkv3.z());
l1tkmu.setMuonDetector(detector);
tkMuons.push_back(l1tkmu);
}
return;
}

void L1TkMuonProducer::build_tkMuons_from_idxs(TkMuonCollection& tkMuons,
const std::vector<int>& matches,
const edm::Handle<L1TTTrackCollectionType>& l1tksH,
int detector) const {
for (uint imatch = 0; imatch < matches.size(); ++imatch) {
int match_trk_idx = matches.at(imatch);
Copy link
Contributor

Choose a reason for hiding this comment

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

@kpedro88 could you comment about this deletion? Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There were two functions that only differed by one line. Since a default-constructed edm::Handle is invalid, I unified the functions by checking if the corresponding argument is valid (a few lines below this). This reduces code duplication.

@silviodonato
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit cc02ea6 into cms-sw:CMSSW_11_1_X Aug 3, 2020
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

3 participants