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

Accessors for CLCT and LCT BX as defined in RAW data [11_2_X] #33357

Merged
merged 1 commit into from Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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