Skip to content

Commit

Permalink
Get BX as defined in RAW data
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Dildick committed Apr 7, 2021
1 parent 30ab0bf commit f719820
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DataFormats/CSCDigi/interface/CSCCLCTDigi.h
Expand Up @@ -24,6 +24,8 @@ class CSCCLCTDigi {
enum CLCTPatternMasks { kRun3SlopeMask = 0xf, kRun3PatternMask = 0x7, kLegacyPatternMask = 0xf };
enum CLCTPatternShifts { kRun3SlopeShift = 7, kRun3PatternShift = 4, kLegacyPatternShift = 0 };
enum class Version { Legacy = 0, Run3 };
// for data vs emulator studies
enum CLCTBXMask { kBXDataMask = 0x3 };

/// Constructors
CSCCLCTDigi(const uint16_t valid,
Expand Down Expand Up @@ -118,6 +120,9 @@ class CSCCLCTDigi {
/// return BX
uint16_t getBX() const { return bx_; }

/// return 2-bit BX as in data
uint16_t getBXData() const { return bx_ & kBXDataMask; }

/// set bx
void setBX(const uint16_t bx) { bx_ = bx; }

Expand Down
5 changes: 5 additions & 0 deletions DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h
Expand Up @@ -24,6 +24,8 @@ class CSCCorrelatedLCTDigi {
enum LCTPatternMasks { kRun3SlopeMask = 0xf, kRun3PatternMask = 0x7, kLegacyPatternMask = 0xf };
enum LCTPatternShifts { kRun3SlopeShift = 7, kRun3PatternShift = 4, kLegacyPatternShift = 0 };
enum class Version { Legacy = 0, Run3 };
// for data vs emulator studies
enum LCTBXMask { kBXDataMask = 0x1 };

/// Constructors
CSCCorrelatedLCTDigi(const uint16_t trknmb,
Expand Down Expand Up @@ -108,6 +110,9 @@ class CSCCorrelatedLCTDigi {
/// return BX
uint16_t getBX() const { return bx; }

/// return 1-bit BX as in data
uint16_t getBXData() const { return bx & kBXDataMask; }

/// return CLCT pattern number (in use again Feb 2011)
/// This function should not be used for Run-3
uint16_t getCLCTPattern() const;
Expand Down

0 comments on commit f719820

Please sign in to comment.