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

Run2-hcx155 Correct access to HcalGeometry from TauDiscriminationAgainstCaloMuon #20523

Merged
merged 3 commits into from
Oct 13, 2017

Conversation

bsunanda
Copy link
Contributor

There is only one geometry for Hcal for all components (HB,HE,HF,HO) -> HcalGeometry

@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/PR-20523/709

Code check has found code style and quality issues which could be resolved by applying a patch in https://cmssdt.cern.ch/SDT/code-checks/PR-20523/709/git-diff.patch
e.g. curl https://cmssdt.cern.ch/SDT/code-checks/PR-20523/709/git-diff.patch | patch -p1

You can run scram build code-checks to apply code checks directly (this will soon be required for PRs to be considered)

@davidlange6
Copy link
Contributor

please test

4 similar comments
@davidlange6
Copy link
Contributor

please test

@davidlange6
Copy link
Contributor

please test

@davidlange6
Copy link
Contributor

please test

@davidlange6
Copy link
Contributor

please test

@perrotta
Copy link
Contributor

@bsunanda please apply the fixes spotted by the code-cheks

@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/PR-20523/728

Code check has found code style and quality issues which could be resolved by applying a patch in https://cmssdt.cern.ch/SDT/code-checks/PR-20523/728/git-diff.patch
e.g. curl https://cmssdt.cern.ch/SDT/code-checks/PR-20523/728/git-diff.patch | patch -p1

You can run scram build code-checks to apply code checks directly (this will soon be required for PRs to be considered)

@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/PR-20523/730

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @bsunanda for master.

It involves the following packages:

RecoTauTag/RecoTau

@perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@davidlange6, @slava77 you are the release manager for this.

cms-bot commands are listed here

@bsunanda
Copy link
Contributor Author

@cmsbuild Please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 15, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/23007/console Started: 2017/09/15 18:08

@cmsbuild
Copy link
Contributor

@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-20523/23007/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 26
  • DQMHistoTests: Total histograms compared: 2646869
  • DQMHistoTests: Total failures: 207
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2646473
  • DQMHistoTests: Total skipped: 189
  • DQMHistoTests: Total Missing objects: 0
  • Checked 107 log files, 14 edm output root files, 26 DQM output files

@@ -280,8 +270,7 @@ double TauDiscriminationAgainstCaloMuon<TauType, TauDiscriminator>::discriminate

const CaloSubdetectorGeometry* ebGeometry = caloGeometry_->getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
const CaloSubdetectorGeometry* eeGeometry = caloGeometry_->getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
const CaloSubdetectorGeometry* hbGeometry = caloGeometry_->getSubdetectorGeometry(DetId::Hcal, HcalBarrel);
const CaloSubdetectorGeometry* heGeometry = caloGeometry_->getSubdetectorGeometry(DetId::Hcal, HcalEndcap);
const HcalGeometry* hcGeometry = (HcalGeometry*)(caloGeometry_->getSubdetectorGeometry(DetId::Hcal, HcalBarrel));
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't it make more sense to change the interface of CaloGeometry to add getSubdetectorGeometry(det) so that we do not have this counter-intuitive code which semantically looks like HcalBarrel subdetector is selected, while in reality it's all of Hcal.

Copy link
Contributor

Choose a reason for hiding this comment

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

i agree with @slava77 comment - this is a very confusing (and hacky) function call.. how can this be cleaned up?

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 shall think about it. It is not a very easy solution - there are detectors which has one geometry for all sub detectors while there are detectors which have different geometry for each sub detector. I shall try to see if something can be done in near future. But that has to be a separate PR and this PR is simply a bug fix

Copy link
Contributor

Choose a reason for hiding this comment

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

it would seem a simple solution is to add a getDetectorGeometry and implement getSubdetectorGeometry only when relevant (throwing an exception otherwise). That way you don't have to find these "bugs" (rather, code that didn't follow an interface change that didn't change the interface itself) one by one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

David EcalBarrelGeometry, HcalGeometry, .. all are derived from CaloSubDetectorGeometry and depending on the detector/subdetector the functionalities are somewhat different. I do not think what you are suggesting makes sense

@slava77
Copy link
Contributor

slava77 commented Sep 18, 2017

+1

for #20523 eaa68e6

  • moving from CaloSubdetectorGeometry to HcalGeometry. Code changes look OK, similar to the other modifications of this kind being made recently. The TauDiscriminationAgainstCaloMuon is currently not used in standard workflows
  • jenkins tests pass and comparisons show no differences

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

@slava77
Copy link
Contributor

slava77 commented Sep 25, 2017

@davidlange6
do you expect some changes for this PR
that prevent it from getting merged?
Note that the discussion in #20523 (comment) refers to a pattern of changes spread over many PRs, some already merged. So, perhaps an improvement to the geom interface can be done in a followup.

@slava77
Copy link
Contributor

slava77 commented Sep 28, 2017

@davidlange6
do you expect some changes for this PR
that prevent it from getting merged?

@bsunanda
Copy link
Contributor Author

bsunanda commented Oct 3, 2017

@slava77 @davidlange6 Please approve this - I do not foresee any improvement in near future

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 42f293a into cms-sw:master Oct 13, 2017
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.

5 participants