13 std::ostringstream strm;
15 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
16 strm <<
"+ Before CCCLUT algorithm: +\n";
17 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
18 strm <<
" Old CLCT digi " << digi <<
"\n";
19 strm <<
" 1/4 strip bit " << digi.
getQuartStripBit() <<
" 1/8 strip bit " << digi.getEighthStripBit() <<
"\n";
20 strm <<
" 1/4 strip number " << digi.getKeyStrip(4) <<
" 1/8 strip number " << digi.getKeyStrip(8) <<
"\n";
21 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
22 LogDebug(
"ComparatorCodeLUT") << strm.str();
40 compHitsCC[
i][iCC] = 1;
42 compHitsCC[
i][iCC] = 0;
67 const bool slopeCCSign((slopeCC >> 4) & 0x1);
68 const unsigned slopeCCValue(slopeCC & 0xf);
73 std::tuple<int16_t, bool, bool> stripoffset;
75 const int halfstripoffset = std::get<0>(stripoffset);
76 halfstrip += halfstripoffset;
92 std::ostringstream strm;
94 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
95 strm <<
"+ CCCLUT algorithm results: +\n";
96 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
97 strm <<
" New CLCT digi " << digi <<
"\n";
98 strm <<
" 1/4 strip bit " << digi.
getQuartStripBit() <<
" 1/8 strip bit " << digi.getEighthStripBit() <<
"\n";
99 strm <<
" 1/4 strip number " << digi.getKeyStrip(4) <<
" 1/8 strip number " << digi.getKeyStrip(8) <<
"\n";
100 strm <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
101 LogDebug(
"ComparatorCodeLUT") << strm.str();
113 for (
int row = 2; row >= 0; row--) {
114 rowPat = rowPat << 1;
115 rowPat += halfStripPattern[column][row];
135 id += (rowCode << 2 * column);
141 const unsigned slopeList[32] = {10, 10, 10, 8, 8, 8, 6, 6, 6, 4, 4, 4, 2, 2, 2, 2,
142 10, 10, 10, 9, 9, 9, 7, 7, 7, 5, 5, 5, 3, 3, 3, 3};
143 return slopeList[
slope];
167 std::vector<std::tuple<int16_t, bool, bool>> my_tuple = {
185 returnValue = my_tuple[
offset];
void setQuartStripBit(const bool quartStripBit)
set single quart strip bit
uint16_t *__restrict__ id
unsigned cclutPosition(unsigned pattern, unsigned code) const
std::array< std::array< int, 3 >, CSCConstants::NUM_LAYERS > pattern
void setBend(const uint16_t bend)
set bend
static const double slope[3]
void setStrip(const uint16_t strip)
set strip
void setPattern(const uint16_t pattern)
set pattern
CSCPatternBank::LCTPatterns clct_pattern_
void run(CSCCLCTDigi &digi, unsigned numCFEBs) const
uint16_t getKeyStrip(const uint16_t n=2) const
static const LCTPatterns clct_pattern_run3_
void setCompCode(const int16_t code)
void setRun3(bool isRun3)
void setSlope(const uint16_t slope)
set the slope
void setRun3Pattern(const uint16_t pattern)
set pattern
ComparatorCodeLUT(const edm::ParameterSet &conf)
int calculateComparatorCode(const pattern &halfStripPattern) const
const ComparatorContainer & getHits() const
uint16_t getPattern() const
return pattern
unsigned cclutSlope(unsigned pattern, unsigned code) const
void setCFEB(const uint16_t cfeb)
set Key CFEB ID
void setEighthStripBit(const bool eighthStripBit)
set single eighth strip bit
unsigned convertSlopeToRun2Pattern(const unsigned slope) const
void setESLookupTables(const CSCL1TPLookupTableCCLUT *conf)
bool getQuartStripBit() const
get single quart strip bit
void assignPositionCC(const unsigned offset, std::tuple< int16_t, bool, bool > &returnValue) const
const CSCL1TPLookupTableCCLUT * lookupTableCCLUT_