-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Restore fed error treatment for phase0 pixel detector #26679
Conversation
…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.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26679/9641
|
please test |
The tests are being triggered in jenkins. |
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. cms-bot commands are listed here |
There was a problem hiding this 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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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)){ |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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)"; |
There was a problem hiding this comment.
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)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Comparison job queued. |
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 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@@ -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)){ |
There was a problem hiding this comment.
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
Thanks @davidlange6! |
@tsusa any news about the validation? |
@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. |
+1
|
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) |
+1 |
@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 |
anyway, as this is now merged, unless problems appear in next IB it will be part of 10_6_0 |
@fabiocos thanks! |
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