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

Calotower -> HCAL rechit for EGM ID variables #33666

Merged
merged 27 commits into from Jul 14, 2021

Conversation

afiqaize
Copy link
Contributor

@afiqaize afiqaize commented May 7, 2021

PR description:

This is the PR implementing the calotower -> rechit transition in calculating EGM ID variables H/E and HCAL isolation. Codes relying on affected variables are updated accordingly. Minor changes are expected due to the different positioning of tower vs rechits. To preserve the ability to read old files, ioread rules are defined but currently this is only successful when reading RECO files, not AOD (see discussion in [1]).

[1] https://hypernews.cern.ch/HyperNews/CMS/get/recoData/126.html

PR validation:

  • WFs 10802.0, 135.4
  • validated that 5x5 BC H/E do not change wrt calotower version on a custom ele gun sample

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2021

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33666/22563

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

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33666/22564

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2021

A new Pull Request was created by @afiqaize (Afiq Anuar) for master.

It involves the following packages:

DQM/Physics
DQMOffline/EGamma
DQMOffline/Trigger
DataFormats/EgammaCandidates
PhysicsTools/NanoAOD
RecoEgamma/EgammaElectronAlgos
RecoEgamma/EgammaElectronProducers
RecoEgamma/EgammaIsolationAlgos
RecoEgamma/EgammaPhotonProducers
RecoEgamma/EgammaTools
RecoEgamma/ElectronIdentification
RecoEgamma/Examples
RecoEgamma/PhotonIdentification
RecoParticleFlow/PFProducer
Validation/RecoEgamma

@perrotta, @andrius-k, @gouskos, @kmaeshima, @ErnestaP, @ahmad3213, @cmsbuild, @jfernan2, @fgolf, @slava77, @jpata, @mariadalfonso, @rvenditti can you please review it and eventually sign? Thanks.
@rappoccio, @jainshilpi, @varuns23, @cericeci, @mmarionncern, @jhgoh, @lgray, @missirol, @sscruz, @seemasharmafnal, @trocino, @rociovilar, @Sam-Harper, @rovere, @hatakeyamak, @mtosi, @HuguesBrun, @swertz, @Fedespring, @calderona, @sobhatta, @lecriste, @cbernet, @gpetruc, @ram1123 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

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33666/22565

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2021

Pull request #33666 was updated. @perrotta, @andrius-k, @gouskos, @kmaeshima, @ErnestaP, @ahmad3213, @cmsbuild, @jfernan2, @fgolf, @slava77, @jpata, @mariadalfonso, @rvenditti can you please check and sign again.

@slava77
Copy link
Contributor

slava77 commented May 8, 2021

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 8, 2021

-1

Failed Tests: RelVals RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e76c7f/14947/summary.html
COMMIT: ed8f390
CMSSW: CMSSW_12_0_X_2021-05-07-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/33666/14947/install.sh to create a dev area with all the needed externals and cmssw changes.

CMS Clang-Tidy warnings: There are Clang-Tidy warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e76c7f/14947/llvm-analysis/cmsclangtidy.txt for details.

RelVals

  • 136.7611136.7611_RunJetHT2016E_reminiaod+RunJetHT2016E_reminiaod+REMINIAOD_data2016_HIPM+HARVESTDR2_REMINIAOD_data2016_HIPM/step2_RunJetHT2016E_reminiaod+RunJetHT2016E_reminiaod+REMINIAOD_data2016_HIPM+HARVESTDR2_REMINIAOD_data2016_HIPM.log
  • 140.53140.53_RunHI2011+RunHI2011+RECOHID11+HARVESTDHI/step2_RunHI2011+RunHI2011+RECOHID11+HARVESTDHI.log

RelVals-INPUT

  • 136.7611136.7611_RunJetHT2016E_reminiaod+RunJetHT2016E_reminiaod+REMINIAOD_data2016_HIPM+HARVESTDR2_REMINIAOD_data2016_HIPM/step2_RunJetHT2016E_reminiaod+RunJetHT2016E_reminiaod+REMINIAOD_data2016_HIPM+HARVESTDR2_REMINIAOD_data2016_HIPM.log
  • 136.7721136.7721_RunJetHT2016H_reminiaod+RunJetHT2016H_reminiaod+REMINIAOD_data2016+HARVESTDR2_REMINIAOD_data2016/step2_RunJetHT2016H_reminiaod+RunJetHT2016H_reminiaod+REMINIAOD_data2016+HARVESTDR2_REMINIAOD_data2016.log
  • 140.52140.52_RunHI2010+RunHI2010+RECOHID10+RECOHIR10D11+HARVESTDHI/step2_RunHI2010+RunHI2010+RECOHID10+RECOHIR10D11+HARVESTDHI.log
Expand to see more relval errors ...

@afiqaize
Copy link
Contributor Author

afiqaize commented May 8, 2021

Apparently there are a few other codes that need to be modified that weren't caught by the WFs I used to validate. Will fix on Monday.

@mariadalfonso
Copy link
Contributor

I have a general comment:

we call too many times the RecoEgamma/EgammaIsolationAlgos/python/egammaHBHERecHitThreshold_cff.py
and then in each instance (isolationCalculator,ecalDrivenElectronSeeds,gsfElectronProducer,conversionTrackCandidates,conversions,gedPhotons,photons) we look again to the channel quality and hcal severity level (that handle for really HCAL experts).

why not using the pfRecHit directly ? or at least have a produced intermediate that make your hbheforECALuse collection ? I think will save a lot of time if one does this once.

@@ -665,11 +665,11 @@ bool ElectronTagProbeAnalyzer::isolationCut(const reco::GsfElectronCollection::c

if (gsfIter->dr03TkSumPt() > tkIso03Max_)
return true;
if (gsfIter->isEB() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxBarrel_)
if (gsfIter->isEB() && gsfIter->dr03HcalTowerSumEt(1) > hcalIso03Depth1MaxBarrel_)
Copy link
Contributor

Choose a reason for hiding this comment

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

in Run3 HCAL now have more than one depth also in the barrel, so you should have the same multiple cases of isHB() as in the isEE() ?
This seems true for all the DQMOffline instances

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, and this is deliberate. This PR is intended purely for the tower to rechit migration, any other code is updated only to the extent necessary to be able to compile and run cmssw.

The fact that the meaning of things monitored have changed, or whether to monitor individual depths are outside of the scope and should be addressed elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be a follow-up PR in DQM?

HcalTopology const *hcalTopology_ = nullptr;
HcalChannelQuality const *hcalChannelQuality_ = nullptr;
HcalSeverityLevelComputer const *hcalSevLvlComputer_ = nullptr;
CaloTowerConstituentsMap const *towerMap_ = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to understand why you still need from the CaloTowerConstituentsMap.
Here and in all other files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For matching the ecal and hcal rechits behind cluster. See EgammaHcalIsolation::getHcalESumBc()

Copy link
Contributor

Choose a reason for hiding this comment

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

why this is done twice in the ElectronHcalHelper and the EgammaHcalIsolation.h

I see that for photon and GSFElectron you have hcalTowersBehindClusters()
https://github.com/cms-sw/cmssw/pull/33666/files#diff-2a8819f54a944ade88b9fc2dd659ed4b5c16725c31a250abd7ef89860e908dcdR459

and for Photons you found a way to avoid use the CaloTowerConstituentsMap
https://github.com/cms-sw/cmssw/pull/33666/files#diff-fd3b0e20a0dc203a5747ecc1765f08c85018edee832ab5967e260d1f7d06bb35L353

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ElectronHcalHelper uses EgammaHcalIsolation under the hood.

And PhotonProducer doesn't explicitly show CaloTowerConstituentsMap usage only because ElectronHcalHelper takes care of this internally, while EgammaHcalIsolation does not.

Copy link
Contributor

Choose a reason for hiding this comment

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

is this still an issue? I could ask for a bit more context to understand the problem.

@afiqaize
Copy link
Contributor Author

why not using the pfRecHit directly ?

#33666 (comment)

or at least have a produced intermediate that make your hbheforECALuse collection ? I think will save a lot of time if one does this once.

I'm not aware of an existing filter to do this and didn't want to write a new one; never seen that timing was a serious issue. The test jobs take about the same time. If a filter already exists then would be great if you can point me to it.

@jpata
Copy link
Contributor

jpata commented Jun 17, 2021

Just trying to make sure it doesn't get stuck (it's a long PR already), I left some comments inline.

@mariadalfonso are there blockers from XPOG or HCAL side, or could your comments be implemented as a follow-up (I can add them to an issue)?

@qliphy
Copy link
Contributor

qliphy commented Jun 22, 2021

kindly ping @cms-sw/xpog-l2

@jpata
Copy link
Contributor

jpata commented Jun 29, 2021

@mariadalfonso are there blockers from XPOG or HCAL side, or could your comments be implemented as a follow-up (I can add them to an issue)?

kind ping

@jpata
Copy link
Contributor

jpata commented Jul 9, 2021

Kind ping @cms-sw/xpog-l2. Please let us know which comments are critical, and which can be done in a follow-up / refactoring. We should aim to get this in in the next 2 weeks for 12_0_0_pre5.

@mariadalfonso
Copy link
Contributor

mariadalfonso commented Jul 13, 2021

+xpog

the only xPOG change is this one: PhysicsTools/NanoAOD/python/electrons_cff.py
needed update to follow changes in this PR.

general comments:
there are too many repetition of the HCAL dedicated classes (hcalTopology, caloTowerMap hcalChannelQuality, hcalSevLvlComputer, towerMap, re-implementation of the threshold)
Multiple calls were present in the original code as well.
Note in view of the Run3, the severity level will not matter since we are with all siPM, so better to move to pf-rechit directly

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

@qliphy
Copy link
Contributor

qliphy commented Jul 14, 2021

+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

9 participants