Skip to content

Commit

Permalink
Merge pull request CmsHI#2 from tahuang1991/HMT_emulation_12_5_X
Browse files Browse the repository at this point in the history
fixed the code-format in CSCRawToDigi from scram build code-format
  • Loading branch information
tahuang1991 authored Aug 4, 2022
2 parents 6d7b6e2 + 0c85cf6 commit b6a117e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 12 deletions.
3 changes: 2 additions & 1 deletion EventFilter/CSCRawToDigi/interface/CSCALCTHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ class CSCALCTHeader {
for (unsigned bx = 0; bx < header2007.lctBins; bx++) {
//CSCID is set to be 0
//ALCTshower, showerType_= 1, wireNHits and ComparatorNHits are not available in data
results.push_back(CSCShowerDigi(theALCTs[bx * 2].reserved & 0x3, 0, 0, bx, CSCShowerDigi::ShowerType::kALCTShower, 0, 0));
results.push_back(
CSCShowerDigi(theALCTs[bx * 2].reserved & 0x3, 0, 0, bx, CSCShowerDigi::ShowerType::kALCTShower, 0, 0));
}
return results;
} else
Expand Down
20 changes: 16 additions & 4 deletions EventFilter/CSCRawToDigi/src/CSCTMBHeader2020_CCLUT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,24 +167,36 @@ CSCShowerDigi CSCTMBHeader2020_CCLUT::showerDigi(uint32_t idlayer) const {
// same for anode HMT and cathode HMT
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win;
//LCTshower with showerType = 3. comparatorNHits from hmt_nhits() and wireNHit is not available
CSCShowerDigi result(
hmt_bits & 0x3, (hmt_bits >> 2) & 0x3, cscid, bx, CSCShowerDigi::ShowerType::kLCTShower, 0, hmt_nhits()); // 2-bits intime, 2-bits out of time
CSCShowerDigi result(hmt_bits & 0x3,
(hmt_bits >> 2) & 0x3,
cscid,
bx,
CSCShowerDigi::ShowerType::kLCTShower,
0,
hmt_nhits()); // 2-bits intime, 2-bits out of time
return result;
}

CSCShowerDigi CSCTMBHeader2020_CCLUT::anodeShowerDigi(uint32_t idlayer) const {
uint16_t cscid = bits.cscID;
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win;
//ALCT shower with showerType = 1. nhits_ is not available from unpack data
CSCShowerDigi result(bits.anode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kALCTShower, 0, 0); // 2-bits intime, no out of time
CSCShowerDigi result(
bits.anode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kALCTShower, 0, 0); // 2-bits intime, no out of time
return result;
}

CSCShowerDigi CSCTMBHeader2020_CCLUT::cathodeShowerDigi(uint32_t idlayer) const {
uint16_t cscid = bits.cscID;
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win - bits.hmt_match_win + 3;
//CLCT shower with showerType = 2.
CSCShowerDigi result(bits.cathode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kCLCTShower, 0, hmt_nhits()); // 2-bits intime, no out of time
CSCShowerDigi result(bits.cathode_hmt & 0x3,
0,
cscid,
bx,
CSCShowerDigi::ShowerType::kCLCTShower,
0,
hmt_nhits()); // 2-bits intime, no out of time
return result;
}

Expand Down
20 changes: 16 additions & 4 deletions EventFilter/CSCRawToDigi/src/CSCTMBHeader2020_GEM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,24 +171,36 @@ CSCShowerDigi CSCTMBHeader2020_GEM::showerDigi(uint32_t idlayer) const {
// same for anode HMT and cathode HMT. offline analysis would take care of this
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win;
//LCTshower with showerType = 3. comparatorNHits from hmt_nhits() and wireNHits is not available
CSCShowerDigi result(
hmt_bits & 0x3, (hmt_bits >> 2) & 0x3, cscid, bx, CSCShowerDigi::ShowerType::kLCTShower, 0, hmt_nhits()); // 2-bits intime, 2-bits out of time
CSCShowerDigi result(hmt_bits & 0x3,
(hmt_bits >> 2) & 0x3,
cscid,
bx,
CSCShowerDigi::ShowerType::kLCTShower,
0,
hmt_nhits()); // 2-bits intime, 2-bits out of time
return result;
}

CSCShowerDigi CSCTMBHeader2020_GEM::anodeShowerDigi(uint32_t idlayer) const {
uint16_t cscid = bits.cscID;
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win;
//ALCT shower with showerType = 1. wireNHits is not available from unpack data
CSCShowerDigi result(bits.anode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kALCTShower, 0, 0); // 2-bits intime, no out of time
CSCShowerDigi result(
bits.anode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kALCTShower, 0, 0); // 2-bits intime, no out of time
return result;
}

CSCShowerDigi CSCTMBHeader2020_GEM::cathodeShowerDigi(uint32_t idlayer) const {
uint16_t cscid = bits.cscID;
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win - bits.hmt_match_win + 3;
//CLCT shower with showerType = 2. comparatorNHits from hmt_nhits()
CSCShowerDigi result(bits.cathode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kCLCTShower, 0, hmt_nhits()); // 2-bits intime, no out of time
CSCShowerDigi result(bits.cathode_hmt & 0x3,
0,
cscid,
bx,
CSCShowerDigi::ShowerType::kCLCTShower,
0,
hmt_nhits()); // 2-bits intime, no out of time
return result;
}

Expand Down
19 changes: 16 additions & 3 deletions EventFilter/CSCRawToDigi/src/CSCTMBHeader2020_TMB.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,36 @@ CSCShowerDigi CSCTMBHeader2020_TMB::showerDigi(uint32_t idlayer) const {
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win;
//LCTshower with showerType = 3. wireNHits is not avaiable
//TMB LCT shower is copied from ALCT shower
CSCShowerDigi result(hmt_bits & 0x3, (hmt_bits >> 2) & 0x3, cscid, bx, CSCShowerDigi::ShowerType::kLCTShower, 0, 0); // 2-bits intime, 2-bits out of time
CSCShowerDigi result(hmt_bits & 0x3,
(hmt_bits >> 2) & 0x3,
cscid,
bx,
CSCShowerDigi::ShowerType::kLCTShower,
0,
0); // 2-bits intime, 2-bits out of time
return result;
}

CSCShowerDigi CSCTMBHeader2020_TMB::anodeShowerDigi(uint32_t idlayer) const {
uint16_t cscid = bits.cscID;
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win;
//ALCTshower with showerType = 1. wireNHits is not avaiable
CSCShowerDigi result(bits.anode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kALCTShower, 0, 0); // 2-bits intime, no out of time
CSCShowerDigi result(
bits.anode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kALCTShower, 0, 0); // 2-bits intime, no out of time
return result;
}

CSCShowerDigi CSCTMBHeader2020_TMB::cathodeShowerDigi(uint32_t idlayer) const {
uint16_t cscid = bits.cscID;
uint16_t bx = CSCConstants::LCT_CENTRAL_BX - bits.pop_l1a_match_win;
//CLCTshower with showerType = 2. comparatorNhits is not avaiable for TMB yet
CSCShowerDigi result(bits.cathode_hmt & 0x3, 0, cscid, bx, CSCShowerDigi::ShowerType::kCLCTShower, 0, 0); // 2-bits intime, no out of time
CSCShowerDigi result(bits.cathode_hmt & 0x3,
0,
cscid,
bx,
CSCShowerDigi::ShowerType::kCLCTShower,
0,
0); // 2-bits intime, no out of time
return result;
}

Expand Down

0 comments on commit b6a117e

Please sign in to comment.