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

Run-3 ALCT and LCT data formats #29456

Merged
merged 16 commits into from
May 6, 2020
Next Next commit
Run-3 data formats
  • Loading branch information
Sven Dildick committed Apr 10, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 357ff0c4cda6f08e70348ed83a2bd189a7ab8338
13 changes: 12 additions & 1 deletion DataFormats/CSCDigi/interface/CSCALCTDigi.h
Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@ class CSCALCTDigi {
const int patternb,
const int keywire,
const int bx,
const int trknmb = 0);
const int trknmb = 0,
const int hmt = 0);
/// default
CSCALCTDigi();

@@ -79,6 +80,12 @@ class CSCALCTDigi {
/// Set 12-bit full BX.
void setFullBX(const uint16_t fullbx) { fullbx_ = fullbx; }

/// return the high multiplicity bits
int getHMT() const { return hmt_; }

/// set the high multiplicity bits
void setHMT(const int hmt) { hmt_ = hmt; }

/// True if the first ALCT has a larger quality, or if it has the same
/// quality but a larger wire group.
bool operator>(const CSCALCTDigi&) const;
@@ -104,6 +111,10 @@ class CSCALCTDigi {
uint16_t bx_;
uint16_t trknmb_;
uint16_t fullbx_;
/// Run-3 introduces high-multiplicity bits for CSCs.
/// Note: In DN-20-016, 3 bits are allocated for HMT in the
/// ALCT board. These bits are copied into the ALCT digi in CMSSW
uint16_t hmt_;
};

std::ostream& operator<<(std::ostream& o, const CSCALCTDigi& digi);
40 changes: 39 additions & 1 deletion DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h
Original file line number Diff line number Diff line change
@@ -32,7 +32,8 @@ class CSCCorrelatedLCTDigi {
const int mpclink = 0,
const uint16_t bx0 = 0,
const uint16_t syncErr = 0,
const uint16_t cscID = 0);
const uint16_t cscID = 0,
const uint16_t hmt = 0);
CSCCorrelatedLCTDigi(); /// default

/// clear this LCT
@@ -78,6 +79,7 @@ class CSCCorrelatedLCTDigi {
int getBX() const { return bx; }

/// return CLCT pattern number (in use again Feb 2011)
/// This function should not be used for Run-3
Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, IMO it would be better to replace the line below with something like this:
int getCLCTPattern() const { return ( (version_ == Version::0) ? (pattern & 0xF) : -1 ); }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, good point.

int getCLCTPattern() const { return (pattern & 0xF); }

/// return strip type (obsolete since mid-2008)
@@ -90,6 +92,12 @@ class CSCCorrelatedLCTDigi {
uint16_t getBX0() const { return bx0; }
uint16_t getSyncErr() const { return syncErr; }

/// Run-3 introduces high-multiplicity bits for CSCs.
/// The allocation is different for ME1/1 and non-ME1/1
/// chambers. Both LCTs in a chamber are needed for the complete
/// high-multiplicity trigger information
uint16_t getHMT() const { return hmt; }

/// Set track number (1,2) after sorting LCTs.
void setTrknmb(const uint16_t number) { trknmb = number; }

@@ -133,6 +141,9 @@ class CSCCorrelatedLCTDigi {
/// set cscID
void setCSCID(unsigned int c) { cscID = c; }

/// set high-multiplicity bits
void setHMT(unsigned int h) { hmt = h; }

/// SIMULATION ONLY ////
enum Type {
CLCTALCT, // CLCT-centric
@@ -158,18 +169,45 @@ class CSCCorrelatedLCTDigi {
const GEMPadDigi& getGEM2() const { return gem2_; }

private:
// Note: The Run-3 data format is substantially different than the
// Run-1/2 data format. Some explanation is provided below. For
// more information, please check "DN-20-016".

// Run-1, Run-2 and Run-3 trknmb is either 1 or 2.
uint16_t trknmb;
// In Run-3, the valid will be encoded as a quality
// value "000" or "00".
uint16_t valid;
// In Run-3, the LCT quality number will be 2 or 3 bits
// For ME1/1 chambers: 3 bits
// For non-ME1/1 chambers: 2 bits
uint16_t quality;
// 7-bit key wire
uint16_t keywire;
// In Run-3, the strip number receives two additional bits
// strip[7:0] -> 1/2 strip value
// strip[8] -> 1/4 strip bit
// strip[9] -> 1/8 strip bit
uint16_t strip;
// In Run-3, the 4-bit pattern number is reinterpreted as the
// 4-bit bending value. There will be 16 bending values * 2 (left/right)
uint16_t pattern;
// Common definition for left/right bending in Run-1, Run-2 and Run-3.
// 0: right; 1: left
uint16_t bend;
uint16_t bx;
uint16_t mpclink;
uint16_t bx0;
// The synchronization bit is actually not used by MPC or EMTF
uint16_t syncErr;
// 4-bit CSC chamber identifier
uint16_t cscID;
// In Run-3, LCT data will be carrying the high-multiplicity bits
// for chamber. These bits may indicate the observation of "exotic" events
// Depending on the chamber type 2 or 3 bits will be repurposed
// in the 32-bit LCT data word from the synchronization bit and
// quality bits.
uint16_t hmt;

/// SIMULATION ONLY ////
int type_;
13 changes: 9 additions & 4 deletions DataFormats/CSCDigi/src/CSCALCTDigi.cc
Original file line number Diff line number Diff line change
@@ -20,14 +20,16 @@ CSCALCTDigi::CSCALCTDigi(const int valid,
const int patternb,
const int keywire,
const int bx,
const int trknmb) {
const int trknmb,
const int hmt) {
valid_ = valid;
quality_ = quality;
accel_ = accel;
patternb_ = patternb;
keywire_ = keywire;
bx_ = bx;
trknmb_ = trknmb;
hmt_ = hmt;
}

/// Default
@@ -45,6 +47,7 @@ void CSCALCTDigi::clear() {
bx_ = 0;
trknmb_ = 0;
fullbx_ = 0;
hmt_ = 0;
}

bool CSCALCTDigi::operator>(const CSCALCTDigi& rhs) const {
@@ -75,7 +78,8 @@ bool CSCALCTDigi::operator==(const CSCALCTDigi& rhs) const {
// Exact equality.
bool returnValue = false;
if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() && getAccelerator() == rhs.getAccelerator() &&
getCollisionB() == rhs.getCollisionB() && getKeyWG() == rhs.getKeyWG() && getBX() == rhs.getBX()) {
getCollisionB() == rhs.getCollisionB() && getKeyWG() == rhs.getKeyWG() && getBX() == rhs.getBX() &&
getHMT() == rhs.getHMT()) {
returnValue = true;
}
return returnValue;
@@ -96,7 +100,8 @@ void CSCALCTDigi::print() const {
<< " Quality = " << setw(2) << getQuality() << " Accel. = " << setw(1)
<< getAccelerator() << " PatternB = " << setw(1) << getCollisionB()
<< " Key wire group = " << setw(3) << getKeyWG() << " BX = " << setw(2) << getBX()
<< " Full BX= " << std::setw(1) << getFullBX();
<< " Full BX = " << std::setw(1) << getFullBX() << " HMT = " << std::setw(1)
<< getHMT();
} else {
edm::LogVerbatim("CSCDigi") << "Not a valid Anode LCT.";
}
@@ -105,5 +110,5 @@ void CSCALCTDigi::print() const {
std::ostream& operator<<(std::ostream& o, const CSCALCTDigi& digi) {
return o << "CSC ALCT #" << digi.getTrknmb() << ": Valid = " << digi.isValid() << " Quality = " << digi.getQuality()
<< " Accel. = " << digi.getAccelerator() << " PatternB = " << digi.getCollisionB()
<< " Key wire group = " << digi.getKeyWG() << " BX = " << digi.getBX();
<< " Key wire group = " << digi.getKeyWG() << " BX = " << digi.getBX() << " HMT = " << digi.getHMT();
}
13 changes: 8 additions & 5 deletions DataFormats/CSCDigi/src/CSCCorrelatedLCTDigi.cc
Original file line number Diff line number Diff line change
@@ -22,7 +22,8 @@ CSCCorrelatedLCTDigi::CSCCorrelatedLCTDigi(const int itrknmb,
const int impclink,
const uint16_t ibx0,
const uint16_t isyncErr,
const uint16_t icscID)
const uint16_t icscID,
const uint16_t ihmt)
: trknmb(itrknmb),
valid(ivalid),
quality(iquality),
@@ -34,7 +35,8 @@ CSCCorrelatedLCTDigi::CSCCorrelatedLCTDigi(const int itrknmb,
mpclink(impclink),
bx0(ibx0),
syncErr(isyncErr),
cscID(icscID) {}
cscID(icscID),
hmt(ihmt) {}

/// Default
CSCCorrelatedLCTDigi::CSCCorrelatedLCTDigi() {
@@ -55,6 +57,7 @@ void CSCCorrelatedLCTDigi::clear() {
bx0 = 0;
syncErr = 0;
cscID = 0;
hmt = 0;
}

int CSCCorrelatedLCTDigi::getStrip(int n) const {
@@ -107,7 +110,7 @@ float CSCCorrelatedLCTDigi::getFractionalStrip(int n) const {
bool CSCCorrelatedLCTDigi::operator==(const CSCCorrelatedLCTDigi& rhs) const {
return ((trknmb == rhs.trknmb) && (quality == rhs.quality) && (keywire == rhs.keywire) && (strip == rhs.strip) &&
(pattern == rhs.pattern) && (bend == rhs.bend) && (bx == rhs.bx) && (valid == rhs.valid) &&
(mpclink == rhs.mpclink));
(mpclink == rhs.mpclink) && (hmt == rhs.hmt));
}

/// Debug
@@ -117,7 +120,7 @@ void CSCCorrelatedLCTDigi::print() const {
<< " Quality = " << getQuality() << " Key Wire = " << getKeyWG()
<< " Strip = " << getStrip() << " Pattern = " << getPattern()
<< " Bend = " << ((getBend() == 0) ? 'L' : 'R') << " BX = " << getBX()
<< " MPC Link = " << getMPCLink();
<< " MPC Link = " << getMPCLink() << " HMT Bit = " << getHMT();
} else {
edm::LogVerbatim("CSCDigi") << "Not a valid correlated LCT.";
}
@@ -129,5 +132,5 @@ std::ostream& operator<<(std::ostream& o, const CSCCorrelatedLCTDigi& digi) {
<< " cathode info: Strip = " << digi.getStrip() << " Pattern = " << digi.getPattern()
<< " Bend = " << ((digi.getBend() == 0) ? 'L' : 'R') << "\n"
<< " anode info: Key wire = " << digi.getKeyWG() << " BX = " << digi.getBX() << " bx0 = " << digi.getBX0()
<< " syncErr = " << digi.getSyncErr() << "\n";
<< " syncErr = " << digi.getSyncErr() << " HMT Bit = " << digi.getHMT() << "\n";
}
8 changes: 5 additions & 3 deletions DataFormats/CSCDigi/src/classes_def.xml
Original file line number Diff line number Diff line change
@@ -11,7 +11,8 @@
<class name="CSCComparatorDigi" ClassVersion="10">
<version ClassVersion="10" checksum="656608282"/>
</class>
<class name="CSCCorrelatedLCTDigi" ClassVersion="11">
<class name="CSCCorrelatedLCTDigi" ClassVersion="12">
<version ClassVersion="12" checksum="3887645155"/>
<version ClassVersion="11" checksum="2118578151"/>
<version ClassVersion="10" checksum="1301481852"/>
</class>
@@ -27,8 +28,9 @@
<class name="CSCCLCTPreTriggerDigi" ClassVersion="10">
<version ClassVersion="10" checksum="1207676078"/>
</class>
<class name="CSCALCTDigi" ClassVersion="10">
<version ClassVersion="10" checksum="817473300"/>
<class name="CSCALCTDigi" ClassVersion="11">
<version ClassVersion="11" checksum="2721753237"/>
<version ClassVersion="10" checksum="817473300"/>
</class>
<class name="CSCALCTPreTriggerDigi" ClassVersion="10">
<version ClassVersion="10" checksum="2925979693"/>