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

Restore fed error treatment for phase0 pixel detector #26679

Merged
merged 7 commits into from May 13, 2019

Conversation

veszpv
Copy link
Contributor

@veszpv veszpv commented May 7, 2019

Resubmitting original PR26606 without the format checks.

PR description:

The FED raw data format for phase 0 and phase 1 detectors are essentially the same with small differences for the bit-packing of the pixel hit information in layer 1. There is a difference also in the error assignment by the front-end (*). The former case has been treated in the PixelDataFormatter by setting the 'phase1' variable through python configuration files. The error decoding class, called ErrorChecker, however was not made aware of the difference, instead, was just simply updated to phase 1.
This PR fixes that: a base class is defined for the ErrorChecker, the present default code is kept with the same name deriving from this base, and a new derived class ErrorCheckerPhase0 is introduced to restore the phase 0 treatment. The proper error checker is instantiated by the PixelDataFormatter based on the value of 'phase1', so no change needs to be made in the python configurations.

FED error 25: in phase 1, FED error type 25 has been reinterpreted and used by the FED firmware to signal "dead" links. It is used to flag stuck TBMs. This error has a totally different meaning in phase 0. In this PR, the special treatment of this error type by raw-to-digi and digi-to-raw is cancelled for phase 0.

(*) Few error codes have different interpretation; and in phase 0 FPix, the error association with detId is ambiguous.
PR validation:

During the reconstruction of phase 0 data, when a rare type 25 error was encountered, the tracking code crashed. This PR fixes that. The FED25 error packing in simulation, and unpacking in simulation and data for phase 1 should be unchanged, are being validated by @tsusa.

@tsusa @mmusich @dkotlins

veszpv added 6 commits May 2, 2019 15:29
…etector. An empty map results in no FED25 error being packed into the RAW data.
…of phase 0, treatment is reverted to original.
…rit from a virtual base and do some clean-up but leave its phase 1 behavior intact. Create a separate derived class for phase 0 (ErrorCheckerPhase0) restoring the original treatment of a few FED errors and their association to DetId-s.
…rit from a virtual base and do some clean-up but leave its phase 1 behavior intact. Create a separate derived class for phase 0 (ErrorCheckerPhase0) restoring the original treatment of a few FED errors and their association to DetId-s.
…e1 is true (current default), the new phase 0 otherwise.
@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26679/9641

  • This PR adds an extra 32KB to repository

@perrotta
Copy link
Contributor

perrotta commented May 7, 2019

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/41/console Started: 2019/05/07 10:49

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

A new Pull Request was created by @veszpv (Viktor Veszpremi) for master.

It involves the following packages:

EventFilter/SiPixelRawToDigi

@perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@makortel, @Martin-Grunewald, @dkotlins, @VinInn this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

Copy link
Contributor

@perrotta perrotta left a comment

Choose a reason for hiding this comment

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

I repeat here a few comments I already made in the former version of this PR
None of them is really fundamental, but worth being taken into account anyhow before merging this PR

class SiPixelFedCabling;

class ErrorChecker {
class ErrorChecker : public ErrorCheckerBase {

public:
// typedef unsigned int Word32;
Copy link
Contributor

Choose a reason for hiding this comment

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

Still, you can remove this unneeded commented out code

class ErrorCheckerBase {

public:
// typedef unsigned int Word32;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove unneeded commented out code

class ErrorCheckerPhase0 : public ErrorCheckerBase {

public:
// typedef unsigned int Word32;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove unneeded commented out code

@@ -136,7 +136,7 @@ void SiPixelDigiToRaw::produce( edm::StreamID, edm::Event& ev,

PixelDataFormatter::BadChannels badChannels;
edm::Handle<PixelFEDChannelCollection> pixelFEDChannelCollectionHandle;
if (ev.getByToken(theBadPixelFEDChannelsToken, pixelFEDChannelCollectionHandle)){
if (usePhase1==true && ev.getByToken(theBadPixelFEDChannelsToken, pixelFEDChannelCollectionHandle)){
Copy link
Contributor

Choose a reason for hiding this comment

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

usePhase1 == true can simply become usePhase1

@@ -252,7 +252,7 @@ void SiPixelRawToDigi::produce( edm::Event& ev,
for (auto const& aPixelError : errorDetSet) {
// For the time being, we extend the error handling functionality with ErrorType 25
// In the future, we should sort out how the usage of tkerrorlist can be generalized
if (aPixelError.getType()==25) {
if (usePhase1==true && aPixelError.getType()==25) {
Copy link
Contributor

Choose a reason for hiding this comment

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

usePhase1 == true can simply become usePhase1

@@ -100,12 +100,17 @@ PixelDataFormatter::PixelDataFormatter( const SiPixelFedCabling* map, bool phase
PXID_mask = ~(~PixelDataFormatter::Word32(0) << PXID_bits);
ADC_mask = ~(~PixelDataFormatter::Word32(0) << ADC_bits);

if (phase1==true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

  if (phase1) {

break;
}
case(26) : {
//LogDebug("")<<" gap word found (errorType=26)";
Copy link
Contributor

Choose a reason for hiding this comment

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

If these LogDebug are not neded, you can just remove them

return false;
}
case(27) : {
//LogDebug("")<<" dummy word found (errorType=27)";
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@perrotta
Copy link
Contributor

perrotta commented May 7, 2019

In order not to interfere with this PR, I opened PR #26681 for the removal of the useless ```config_.exists()''' checks in SiPixelRawToDigi.cc.
Please @veszpv fill free to comment in that PR if you have any complain with it.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented May 7, 2019

Comparison job queued.

@perrotta
Copy link
Contributor

perrotta commented May 9, 2019

Issue #26731 have been opened to keep track of the fixes for the removal of the duplicated code that will be implemented in the next cycle after the UL release

@cmsbuild
Copy link
Contributor

cmsbuild commented May 9, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented May 9, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 9, 2019

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3211964
  • DQMHistoTests: Total failures: 78
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211682
  • DQMHistoTests: Total skipped: 204
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 32 files compared)
  • Checked 137 log files, 14 edm output root files, 33 DQM output files

@@ -136,7 +136,7 @@ void SiPixelDigiToRaw::produce( edm::StreamID, edm::Event& ev,

PixelDataFormatter::BadChannels badChannels;
edm::Handle<PixelFEDChannelCollection> pixelFEDChannelCollectionHandle;
if (ev.getByToken(theBadPixelFEDChannelsToken, pixelFEDChannelCollectionHandle)){
if (usePhase1 && ev.getByToken(theBadPixelFEDChannelsToken, pixelFEDChannelCollectionHandle)){
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, bad channels are there only for Phase1

@perrotta
Copy link
Contributor

@veszpv @tsusa : in the PR description you anticipate that there is an ongoing validation for this PR. Please post here a link to the results, or just a short summary of them, so that we can conclude the review and finally sign this off for reco.

@tsusa
Copy link
Contributor

tsusa commented May 10, 2019

@perrotta @slava77 The validation is still ongoing. I will post the plots as soon as they are done [ETA tomorrow]

@davidlange6
Copy link
Contributor

davidlange6 commented May 10, 2019 via email

@tsusa
Copy link
Contributor

tsusa commented May 10, 2019

Thanks @davidlange6!

@fabiocos
Copy link
Contributor

@tsusa any news about the validation?

@tsusa
Copy link
Contributor

tsusa commented May 12, 2019

@fabiocos @perrotta @slava77 The validation plots are uploaded. For Phase 1 detector shown are the occupancy maps w/ and w/o changes implemented in the PR and with BadFED simulation switched on and off. For Phase0 shown are the plots with BadFED simulation switched off as FED25 error did not exist in Phase 0 detector.

pr26679_validation.pdf

@mmusich
Copy link
Contributor

mmusich commented May 13, 2019

@perrotta @fabiocos what's the plan for inclusion of this PR?
I see that 10.6.0 has been already built: as a reminder this is a mandatory fix to process phase-0 data (also included in #26721).
Does this imply that a backport will be needed?

@perrotta
Copy link
Contributor

+1

  • ErrorChecker specialized for Phase0 and Phase1 separately, so that the original behaviour for Phase0 can be recovered by simply relying on the "(use)phase1" switches already present in the code
  • Jenkins tests show no difference: validation has been provided for both Phase0 and Phase1 configurations in Restore fed error treatment for phase0 pixel detector #26679 (comment)

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

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit b45186e into cms-sw:master May 13, 2019
@fabiocos
Copy link
Contributor

@mmusich only the externals of 10_6_0 have been pre-built. In any case at this point there is pressure to start the GEN-SIM part of production, where this PR is irrelevant

@fabiocos
Copy link
Contributor

anyway, as this is now merged, unless problems appear in next IB it will be part of 10_6_0

@mmusich
Copy link
Contributor

mmusich commented May 13, 2019

anyway, as this is now merged, unless problems appear in next IB it will be part of 10_6_0

@fabiocos thanks!

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

8 participants