Navigation Menu

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

ECAL PFCluster Correction 9X #19307

Merged
merged 16 commits into from Jul 3, 2017

Conversation

rafaellopesdesa
Copy link
Contributor

Code for the 9X ECAL PFCluster corrections.

Updates include:

  • New training for 9X releases as presented in PPD. [1]
  • Remove old corrections no longer supported by EGM (parametrized correction, 50ns correction, ...)
  • Small changes in the code to comply with CMS coding rules

@perrotta and @slava77 : the code as it is will not pass validation because the tags consumed are not in the GT. The request to include in the global tag have been done [2]. I guess @arunhep or @franzoni will also have to point the "auto" GT to the ones with these tags before this code has any hope of passing validation (similar to discussions in [3])

Attention: @jainshilpi @fcouderc @Sam-Harper @arunhep @franzoni

[1] https://indico.cern.ch/event/646805/contributions/2627253/attachments/1477404/2289247/status_regression_15june.pdf
[2] https://hypernews.cern.ch/HyperNews/CMS/get/calibrations/3008.html
[3] #18912

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @rafaellopesdesa (Rafael Lopes de Sa) for master.

It involves the following packages:

RecoParticleFlow/PFClusterProducer

@perrotta, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@mmarionncern, @lgray, @seemasharmafnal, @bachtis, @cbernet this is something you requested to watch as well.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@franzoni
Copy link

hold

@cmsbuild
Copy link
Contributor

Pull request has been put on hold by @franzoni
They need to issue an unhold command to remove the hold state or L1 can unhold it for all

@cmsbuild cmsbuild added the hold label Jun 18, 2017
@franzoni
Copy link

We'll come to these GTs as soon as other integration of conditioned will be done ( may take 2-3 days ) which cannot be done in parallel

@rafaellopesdesa
Copy link
Contributor Author

Thanks, @franzoni

@slava77
Copy link
Contributor

slava77 commented Jun 21, 2017

@kmcdermo please check if this will affect your work for running OOT photons from legacy miniAOD.
Dependence on SRFlags is added here.

bool iseb = cluster.layer() == PFLayer::ECAL_BARREL;
if (iseb){
EBSrFlagCollection::const_iterator srf = ebSrFlags->find(readOutUnitOf(static_cast<EBDetId>(cluster.seed())));
clusFlag = srf->value();
Copy link
Contributor

Choose a reason for hiding this comment

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

is it logically possible for the find to find nothing and srf to be invalid and impossible to dereference?
If so, there better be an appropriate protection.

else {
if (pt<2.5) coridx = 1 + regind;
else if (pt>2.5 && pt<6.) coridx = 2 + regind;
else if (pt>6.) coridx = 3 + regind;
Copy link
Contributor

Choose a reason for hiding this comment

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

please make sure that there are no gaps (values with pt==2.5 and 6 are not covered.

coridx += 5;
if (clusFlag!=1 && clusFlag!=3) {
edm::LogWarning("PFClusterEMEnergyCorrector") << "We can only correct regions readout in ZS (flag 1) or FULL readout (flag 3). Flag " << clusFlag << " is not recognized.";
edm::LogWarning("PFClusterEMEnergyCorrector") << "Assuming FULL readout and continuing";
Copy link
Contributor

Choose a reason for hiding this comment

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

What are the other options and how often can they happen?
If they can happen normally for some data types, the warning should not be issued in this case.
Also, please use only one LogWarning. << "\n" or << std::endl can be used for multiple line warning


// Form ietamod20 and iphimod20 as well
int signeta = (ietaix > 0) ? 1 : -1;
int ietamod20 = (std::abs(ietaix) < 26) ? ietaix - signeta : (ietaix - 26*signeta) % 20;
Copy link
Contributor

Choose a reason for hiding this comment

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

what are "26" and "20" in this context? Are they available from some header or geometry as constants?

<< size << " " << reducedHits;
LogDebug("PFClusterEMEnergyCorrector") << "isEB : eraw : ePS1 : ePS2 : (eps1+eps2)/raw : Flag = "
<< iseb << " " << evale << " " << ePS1 << " " << ePS2 << " " << (ePS1+ePS2)/evale << " " << clusFlag;
LogDebug("PFClusterEMEnergyCorrector") << "response : correction = "
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be sent over just one LogDebug instead of 3

@slava77
Copy link
Contributor

slava77 commented Jun 21, 2017

@rafaellopesdesa
please provide a comparison between the size of new and old payloads related to this PR.

@slava77
Copy link
Contributor

slava77 commented Jun 21, 2017

@rafaellopesdesa
how well should this update work for 2016 data or new MC generated in 2016 era setup?
Reasonably the same, if not better, performance should be maintained for all of run-2.

@kmcdermo
Copy link
Contributor

@kmcdermo please check if this will affect your work for running OOT photons from legacy miniAOD.
Dependence on SRFlags is added here.

@slava77 this will definitely affect the legacy sequence... is there some way to retain the old behavior without the use of the SRFlags?

@rafaellopesdesa
Copy link
Contributor Author

@kmcdermo @slava77

We can maintain the old correction for 2016 era, if need be (perhaps it's the easiest way). Specially because the PF selective readout was not implemented last year.

If you don't like this option... then maybe we need some help.

The truth is that we haven't tested these corrections with 2016 era setup. We didn't think we would be generating 2016 MC with these releases. We can generate some MC with 2016 era setup to test. Do you have an example of workflow that I can run with the 92X release for this test? That would help us.

@kmcdermo
Copy link
Contributor

Well, the first would be to modify the code to ensure it does not crash on missing the srFlags, which are not present in 80X AOD. I had to do something similar in #19404 (some reason it is not linking: #19404), see:
https://github.com/kmcdermo/cmssw/blob/a891cbea48ec16dbd75f22e2b64e41f5b34edf39/RecoParticleFlow/PFClusterProducer/interface/PFEcalBarrelRecHitCreator.h

Then, for sure, maintaining the old correction would be great. As for 2016 MC in 92X, we are actually trying to debug some things ourselves first (with our signals in 2017). @lsoffi and I are trying to figure this out... we can get back to you shortly on this.

@rafaellopesdesa
Copy link
Contributor Author

@kmcdermo Sorry, I think I was not clear. This will not be ported to 8X. 8X is not a concern here. This is a correction only valid for 9X, where SR flags are available and important (since the PF ZS and SR were finally implemented)

@rafaellopesdesa
Copy link
Contributor Author

What would really be a problem is if you try to use this correction with 2016 era.... if I re-instante the old correction, it will be for 2016 era in 9X only. Not 8X, this will remain untouched.

@slava77 : About the other code review, @jainshilpi is looking at them and will commit the fixes.

@kmcdermo
Copy link
Contributor

@rafaellopesdesa Yes, indeed, no need to backport this. I am saying that, however, the code as it stands will crash on not having the srFlag products at AOD. So if we can add a protection to the code to prevent this in 92X, that would be best.

@kmcdermo
Copy link
Contributor

And indeed, just re inserting the old correction for 2016 is enough.

@rafaellopesdesa
Copy link
Contributor Author

@kmcdermo Still not understanding: This code will never run over AOD (the SR flags is the least of the concerns). Why would you use a 9X release to run over 8X RAW? Will CMS do that?

@kmcdermo
Copy link
Contributor

@rafaellopesdesa ah sorry for not explaining. In the 80X re-miniAOD, which will start from AOD, we will be adding in a new collection (out-of-time photons). Since this collection does not already exist, we have to go through the full reco chain for this particular collection, which includes calculating the PFClusterIsolation.

@davidlange6
Copy link
Contributor

davidlange6 commented Jul 3, 2017 via email

@rafaellopesdesa
Copy link
Contributor Author

rafaellopesdesa commented Jul 3, 2017

@davidlange6 Yes, getting the binning from the conditions DB would require a lot of changes at this point.

As for the name, that's basically what is being done in the code. Different options are controlled by the options applyMVACorrections and srfAwareCorrection. The user selects these options and the code will correctly know about the tag names and binning option. But I agree that it introduces code complexity... I just don't know what to do as an alternative at this point.

@arunhep
Copy link
Contributor

arunhep commented Jul 3, 2017

@davidlange6 @rafaellopesdesa
should the tests be re-triggered?

@rafaellopesdesa
Copy link
Contributor Author

@arunhep I am waiting instructions of whether or not the current version of the code is acceptable.

@arunhep
Copy link
Contributor

arunhep commented Jul 3, 2017

we are waiting for this PR to get merged so that we can open last one for condition updates for 930pre1 build.

@rafaellopesdesa
Copy link
Contributor Author

@arunhep I understand, I am trying to have turn arounds as quickly as I can.

@slava77
Copy link
Contributor

slava77 commented Jul 3, 2017 via email

@davidlange6
Copy link
Contributor

davidlange6 commented Jul 3, 2017 via email

@rafaellopesdesa
Copy link
Contributor Author

@davidlange6 The new and old conditions are controlled by configuration parameters. If you try to run the new calibration in an old sample it will run an exception because it will not find the necessary variables.

The new calibration is activated via era mechanism.

@davidlange6
Copy link
Contributor

davidlange6 commented Jul 3, 2017 via email

@slava77
Copy link
Contributor

slava77 commented Jul 3, 2017

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 3, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/21088/console Started: 2017/07/03 15:39

@rafaellopesdesa
Copy link
Contributor Author

@davidlange6 Yes, and the default for older eras...

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 3, 2017

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 3, 2017

Comparison job queued.

@davidlange6
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 514d35a into cms-sw:master Jul 3, 2017
@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 3, 2017

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19307/21088/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1092 differences found in the comparisons
  • DQMHistoTests: Total files compared: 22
  • DQMHistoTests: Total histograms compared: 1756063
  • DQMHistoTests: Total failures: 44487
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1711410
  • DQMHistoTests: Total skipped: 166
  • DQMHistoTests: Total Missing objects: 0
  • Checked 90 log files, 14 edm output root files, 22 DQM output files

@slava77
Copy link
Contributor

slava77 commented Jul 3, 2017

+1

for #19307 f6602a1

  • technical updates since the last signoff
  • jenkins tests results look the same as before

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

10 participants