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

bug fix in vertex selection of L2TauTagNNProducer #37291

Merged
merged 10 commits into from Mar 28, 2022

Conversation

valeriadamante
Copy link
Contributor

PR description:

Doing tests on GPU, some issues in L2NNTag produced outputs have been reported: running twice the L2NNTag producer, it gave different results on the same events/taus. The problem has been addressed to the filling of the CNN inputs : PatatrackPtSumWithVertex and PatatrackSizeWithVertex.
The reason is the following: to fill the aforementioned variables while looping on tracks, a match between the vertex associated to the track (*) is required by associating the observable idv (which is the vertex index related to the patatrack) to be the same of the sortInd (**) which is the vertex index sorted by the vertex observable ptv2 .
If you want to give a look to the vertex related observables, they are described here.

This match is not correct: indeed, the idv has to be compared with the vertex index.

(*) all tracks with vertex index -1 are not considered, since this means that they are not associated to any vertex
(**) the sortInd is of a subset of all vertices, since they are required to pass some quality cuts described in the function SelectGoodVertices. Also in this function there is a similar matching requirement and also in that case it has been changed.

In this PR, this bug is fixed.

PR validation:

This bug was spotted because while looping multiple times on GPU, results were not consistent among each other.
With the aforementioned change, some preliminar tests on GPU and CPU have been carried on, selecting specific bugged events and from those preliminar tests there are no more differences.

With CPUs there were no difference both before and after the bugfix. So integrating this PR CPU results should be kept unchanged (in terms of efficiencies and rates).

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37291/28923

  • This PR adds an extra 20KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37291/28925

  • This PR adds an extra 20KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@missirol
Copy link
Contributor

@valeriadamante , same issue with code-checks, see comments from the previous PR.

std::vector<double> maxChi2_;
std::vector<double> pTSquaredSum(nv);

for (int j = nv - 1; j >= 0; --j) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this double loop is not required.
enough to loop on the tracks, apply selection, and fill pTSquaredSum directly.
No need to sort either as the algorithms is just using the max (not even the location, just the max value of pt2sum).

@valeriadamante
Copy link
Contributor Author

@missirol
I ran scram b code-checks && scram b code-format, no errors have been raised after the latest commit, which is the one where I also removed the std::endl calls from logWarning (should I remove also from logInfo?).
Thank you.

Valeria

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37291/28945

  • This PR adds an extra 20KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@missirol
Copy link
Contributor

@valeriadamante , as you can see from the GitHub page, the label "code-checks-rejected" is still there.

After running scram b code-checks && scram b code-format, you also have to commit and push any changes applied by those commands. After that, the code-checks here will pass.

@missirol
Copy link
Contributor

type bugfix

@valeriadamante , please fix this PR [*], so that the tests can be started. Since this is a bugfix, and HLT development is still mostly in 12_3_X, a backport to 12_3_X will be needed after this PR is approved.

[*]

cd ${CMSSW_BASE}/src
git checkout BugFixVtx
scram b code-checks
scram b code-format
git add -u :/
git commit -m 'apply code checks'
git push my-cmssw BugFixVtx

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37291/28994

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

Pull request #37291 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

@missirol
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-55b7e0/23399/summary.html
COMMIT: c76cfb5
CMSSW: CMSSW_12_4_X_2022-03-25-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/37291/23399/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 3342 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3695650
  • DQMHistoTests: Total failures: 51911
  • DQMHistoTests: Total nulls: 63
  • DQMHistoTests: Total successes: 3643654
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 204 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@missirol
Copy link
Contributor

+hlt

  • bugfix for HLT by the TAU POG

@valeriadamante , please open a backport PR to 12_3_X once this PR is merged (if possible squashing into a single commit the changes in this PR).

@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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Mar 28, 2022

please test
just to check again as #37337 is merged

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-55b7e0/23432/summary.html
COMMIT: c76cfb5
CMSSW: CMSSW_12_4_X_2022-03-27-2300/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/37291/23432/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3589460
  • DQMHistoTests: Total failures: 8
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3589430
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 200 log files, 45 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@qliphy
Copy link
Contributor

qliphy commented Mar 28, 2022

+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

7 participants