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

remove vertex type from PFCandidate, iteration 2 #31456

Merged
merged 10 commits into from
Sep 23, 2020

Conversation

jpata
Copy link
Contributor

@jpata jpata commented Sep 14, 2020

PR description:

Continuation of #31298 from @veelken, to be able to change the PR.

attn @hatakeyamak @bendavid

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@jpata
Copy link
Contributor Author

jpata commented Sep 14, 2020

Need to implement the following: #31298 (comment)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31456/18354

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @jpata (Joosep Pata) for master.

It involves the following packages:

DataFormats/ParticleFlowCandidate
DataFormats/PatCandidates
RecoParticleFlow/PFProducer

@perrotta, @jpata, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks.
@mmarionncern, @gouskos, @cbernet, @rovere, @lgray, @hatakeyamak, @gpetruc, @peruzzim, @seemasharmafnal 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

@jpata
Copy link
Contributor Author

jpata commented Sep 15, 2020

I tried something like the following to correctly set the reco::PFCandidate -> reco::LeafCandidate::m_state.vertex_ data member from DataFormats/ParticleFlowCandidate/src/classes_def.xml for old versions of the class, but this doesn't seem to work, as I can't override a parent class member.

  <ioread sourceClass = "reco::PFCandidate" version="[-19]" targetClass="reco::PFCandidate" source="PFVertexType vertexType_" target="m_state.vertex_">
    <![CDATA[m_state.vertex_= setVertexLegacy(onfile.vertexType_)]]>
  </ioread>

We need to change the behaviour of PFCandidate::vertex() for the old versions, but it seems like with ioread rules we can only change data members.

Any suggestions @slava77 et al?

@slava77
Copy link
Contributor

slava77 commented Sep 15, 2020

There is a public setVertex method

The set in setVertexLegacy implies an action, not just a return value.
So, setVertex(vertexLegacy(onfile.vertexType_)) ?

@jpata
Copy link
Contributor Author

jpata commented Sep 15, 2020

Thanks Slava! Just a note to myself, the following seems to be going in the right direction

+  <ioread sourceClass = "reco::PFCandidate" version="[-19]" targetClass="reco::PFCandidate" source="reco::PFCandidate::PFVertexType vertexType_" target="">
+    <![CDATA[newObj->setVertex(newObj->vertexLegacy(onfile.vertexType_));]]>

but currently crashes:

----- Begin Fatal Exception 15-Sep-2020 16:21:01 EEST-----------------------
An exception of category 'FileReadError' occurred while
   [0] Rethrowing an exception that happened on a different thread.
   [1] Reading branch recoPFCandidates_particleFlow__RECO.
Exception Message:
Ref Attempt to construct a Ref with ProductID 2:3076
but with a null pointer to a product getter.
The product getter pointer passed to the constructor must refer
to a real getter, such as an EventPrincipal.
----- End Fatal Exception -------------------------------------------------

@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-31456/18414

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

@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-31456/18544

  • This PR adds an extra 100KB to repository

@cmsbuild
Copy link
Contributor

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

@veelken
Copy link
Contributor

veelken commented Sep 23, 2020

@jpata The code looks good to me. Thank you very much for the time that you invested to make this work!

@jpata
Copy link
Contributor Author

jpata commented Sep 23, 2020

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 23, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: d568fe4
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f9798c/9510/summary.html
CMSSW: CMSSW_11_2_X_2020-09-22-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-f9798c/9510/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 11 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2540471
  • DQMHistoTests: Total failures: 13
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2540436
  • 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

@jpata
Copy link
Contributor Author

jpata commented Sep 23, 2020

+reconstruction

  • fixes issue Review of reco::PFCandidate::vertex() function #30895, the vertex is now embedded directly in the PFCandidate at creation time. The new version of the class always has PFCandidate::vertexType_ = kCandVertex, while backwards-compability is retained with old AOD files using the PFCandidate::vertexLegacy(vertexType) function.
  • This PR also fixes a bug for electrons, where the KF track was used instead of the GSF track.
  • minor reco changes to tau ID are understood to be caused by the electron issue above.

@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 d2ef33f into cms-sw:master Sep 23, 2020
@jpata jpata deleted the pfcandidate_vertex branch October 6, 2021 13:51
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