Skip to content

Commit

Permalink
Merge pull request #20121 from CTPPS/ctpps_pixel_unpacker_patch1_92x
Browse files Browse the repository at this point in the history
CTPPS Pixel unpacker patch (backport)
  • Loading branch information
cmsbuild committed Aug 11, 2017
2 parents 1d79e98 + 3529436 commit a10d74d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions EventFilter/CTPPSRawToDigi/src/CTPPSPixelDataFormatter.cc
Expand Up @@ -22,6 +22,10 @@ namespace {
constexpr int m_DCOL_bits = 5;
constexpr int m_PXID_bits = 8;
constexpr int m_ADC_bits = 8;
constexpr int min_Dcol = 0;
constexpr int max_Dcol = 25;
constexpr int min_Pixid = 2;
constexpr int max_Pixid = 161;
}

CTPPSPixelDataFormatter::CTPPSPixelDataFormatter(std::map<CTPPSPixelFramePosition, CTPPSPixelROCInfo> const &mapping) : theWordCounter(0), mapping_(mapping)
Expand Down Expand Up @@ -148,6 +152,12 @@ void CTPPSPixelDataFormatter::interpretRawData( bool& errorsInEvent, int fedId,
int dcol = (ww >> m_DCOL_shift) & m_DCOL_mask;
int pxid = (ww >> m_PXID_shift) & m_PXID_mask;

if(dcol<min_Dcol || dcol>max_Dcol || pxid<min_Pixid || pxid>max_Pixid){
edm::LogError("CTPPSPixelDataFormatter")<< " unphysical dcol and/or pxid " << " nllink=" << nlink
<< " nroc="<< nroc << " adc=" << adc << " dcol=" << dcol << " pxid=" << pxid;
continue;
}

std::pair<int,int> rocPixel;
std::pair<int,int> modPixel;

Expand Down

0 comments on commit a10d74d

Please sign in to comment.