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

Fix initialisation of maxChi2 data member in PVClusterComparer #31725

Merged
merged 4 commits into from Oct 12, 2020

Conversation

ats2008
Copy link
Contributor

@ats2008 ats2008 commented Oct 9, 2020

modified:   PVClusterComparer.cc

PR description:

Minor bug fix. The code to initialize the maxChi2 values does not do the job, due to an unfortunate typo in the loop break condition.

	modified:   PVClusterComparer.cc
@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31725/18919

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2020

A new Pull Request was created by @ats2008 (Aravind Sugunan) for master.

It involves the following packages:

RecoPixelVertexing/PixelVertexFinding

@perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @ebrondol, @mtosi, @dgulhan 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

@slava77
Copy link
Contributor

slava77 commented Oct 9, 2020

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2020

The tests are being triggered in jenkins.

@slava77
Copy link
Contributor

slava77 commented Oct 9, 2020

@ats2008
please update the PR title to mention what's fixed and where (at least where)

@@ -78,7 +78,7 @@ double PVClusterComparer::pTSquaredSum(const reco::Vertex &v) {
void PVClusterComparer::setChisquareQuantile() {
std::vector<double> maxChi2(20, 0.);
Copy link
Contributor

@VinInn VinInn Oct 9, 2020

Choose a reason for hiding this comment

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

please do not use variables that differ only for a "_"!

Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure 20 is safe?

Copy link
Contributor

Choose a reason for hiding this comment

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

and, btw, why 20?

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 am not clear on why it was initialized with 20 elements.

there another function ( PVClusterComparer::updateChisquareQuantile ) that updates the maxChi2_ vector if elements with ndof more than 20 are required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and its called when those elements need to be accessed, as seen here, so it should be safe.

@@ -78,7 +78,7 @@ double PVClusterComparer::pTSquaredSum(const reco::Vertex &v) {
void PVClusterComparer::setChisquareQuantile() {
std::vector<double> maxChi2(20, 0.);
if (track_prob_min_ >= 0. && track_prob_min_ <= 1.)
for (size_t ndof = 0; ndof < maxChi2_.size(); ++ndof)
for (size_t ndof = 0; ndof < maxChi2.size(); ++ndof)
// http://root.cern.ch/root/html/TMath.html#TMath:ChisquareQuantile
maxChi2[ndof] = TMath::ChisquareQuantile(1 - track_prob_min_, ndof);
Copy link
Contributor

Choose a reason for hiding this comment

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

why not filling maxChi2_ directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes .. it could have been done . I thought i will just make the minor code correction .. but now that its mentioned , I shall update the PR with the code that fills maxChi2_ directly

@ats2008 ats2008 changed the title Fix Fix initialisation of maxChi2 data member in PVClusterComparer Oct 9, 2020
@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2020

+1
Tested at: 41abcc7
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-72e7eb/9829/summary.html
CMSSW: CMSSW_11_2_X_2020-10-08-2300
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2020

Comparison job queued.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31725/18969

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

Pull request #31725 was updated. @perrotta, @jpata, @cmsbuild, @slava77 can you please check and sign again.

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 12, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: f46dea9
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-72e7eb/9873/summary.html
CMSSW: CMSSW_11_2_X_2020-10-11-2300
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-72e7eb/9873/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2542225
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2542194
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 149 log files, 22 edm output root files, 35 DQM output files

@perrotta
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 260347d into cms-sw:master Oct 12, 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

6 participants