1818
1919class CSCCorrelatedLCTDigi {
2020public:
21- enum LCTKeyStripMasks { kEighthStripMask = 0x1 , kQuartStripMask = 0x1 , kHalfStripMask = 0xff };
22- enum LCTKeyStripShifts { kEighthStripShift = 9 , kQuartStripShift = 8 , kHalfStripShift = 0 };
23- // temporary to facilitate CCLUT-EMTF/OMTF integration studies
24- enum LCTPatternMasks { kRun3SlopeMask = 0xf , kRun3PatternMask = 0x7 , kLegacyPatternMask = 0xf };
25- enum LCTPatternShifts { kRun3SlopeShift = 7 , kRun3PatternShift = 4 , kLegacyPatternShift = 0 };
2621 enum class Version { Legacy = 0 , Run3 };
2722 // for data vs emulator studies
2823 enum LCTBXMask { kBXDataMask = 0x1 };
2924
25+ // / SIMULATION ONLY ////
26+ enum Type {
27+ CLCTALCT, // CLCT-centric
28+ ALCTCLCT, // ALCT-centric
29+ ALCTCLCTGEM, // ALCT-CLCT-1 GEM pad
30+ ALCTCLCT2GEM, // ALCT-CLCT-2 GEM pads in coincidence
31+ ALCT2GEM, // ALCT-2 GEM pads in coincidence
32+ CLCT2GEM, // CLCT-2 GEM pads in coincidence
33+ CLCTONLY, // Missing ALCT
34+ ALCTONLY // Missing CLCT
35+ };
36+
3037 // / Constructors
3138 CSCCorrelatedLCTDigi (const uint16_t trknmb,
3239 const uint16_t valid,
@@ -40,9 +47,14 @@ class CSCCorrelatedLCTDigi {
4047 const uint16_t bx0 = 0 ,
4148 const uint16_t syncErr = 0 ,
4249 const uint16_t cscID = 0 ,
43- const uint16_t hmt = 0 ,
44- const Version version = Version::Legacy);
45- // / default
50+ const Version version = Version::Legacy,
51+ const bool run3_quart_strip_bit = false ,
52+ const bool run3_eighth_strip_bit = false ,
53+ const uint16_t run3_pattern = 0 ,
54+ const uint16_t run3_slope = 0 ,
55+ const int type = ALCTCLCT);
56+
57+ // / default (calls clear())
4658 CSCCorrelatedLCTDigi ();
4759
4860 // / clear this LCT
@@ -64,16 +76,16 @@ class CSCCorrelatedLCTDigi {
6476 uint16_t getStrip (uint16_t n = 2 ) const ;
6577
6678 // / set single quart strip bit
67- void setQuartStrip (const bool quartStrip);
79+ void setQuartStripBit (const bool quartStripBit) { run3_quart_strip_bit_ = quartStripBit; }
6880
6981 // / get single quart strip bit
70- bool getQuartStrip () const ;
82+ bool getQuartStripBit () const { return run3_quart_strip_bit_; }
7183
7284 // / set single eighth strip bit
73- void setEighthStrip (const bool eighthStrip);
85+ void setEighthStripBit (const bool eighthStripBit) { run3_eighth_strip_bit_ = eighthStripBit; }
7486
7587 // / get single eighth strip bit
76- bool getEighthStrip () const ;
88+ bool getEighthStripBit () const { return run3_eighth_strip_bit_; }
7789
7890 /*
7991 Strips are numbered starting from 1 in CMSSW
@@ -94,15 +106,14 @@ class CSCCorrelatedLCTDigi {
94106 */
95107 float getFractionalStrip (uint16_t n = 2 ) const ;
96108
97- // / Legacy: return pattern ID
98- // / Run-3: return the bending angle value
99- uint16_t getPattern () const ;
109+ // / return the Run-2 pattern ID
110+ uint16_t getPattern () const { return pattern; }
100111
101- // / return pattern
102- uint16_t getRun3Pattern () const ;
112+ // / return the Run-3 pattern ID
113+ uint16_t getRun3Pattern () const { return run3_pattern_; }
103114
104115 // / return the slope
105- uint16_t getSlope () const ;
116+ uint16_t getSlope () const { return run3_slope_; }
106117
107118 // / slope in number of half-strips/layer
108119 // / negative means left-bending
@@ -166,13 +177,13 @@ class CSCCorrelatedLCTDigi {
166177 void setStrip (const uint16_t s) { strip = s; }
167178
168179 // / set pattern
169- void setPattern (const uint16_t p);
180+ void setPattern (const uint16_t p) { pattern = p; }
170181
171- // / set pattern
172- void setRun3Pattern (const uint16_t pattern);
182+ // / set Run-3 pattern
183+ void setRun3Pattern (const uint16_t pattern) { run3_pattern_ = pattern; }
173184
174185 // / set the slope
175- void setSlope (const uint16_t slope);
186+ void setSlope (const uint16_t slope) { run3_slope_ = slope; }
176187
177188 // / set bend
178189 void setBend (const uint16_t b) { bend = b; }
@@ -197,18 +208,6 @@ class CSCCorrelatedLCTDigi {
197208
198209 void setRun3 (const bool isRun3);
199210
200- // / SIMULATION ONLY ////
201- enum Type {
202- CLCTALCT, // CLCT-centric
203- ALCTCLCT, // ALCT-centric
204- ALCTCLCTGEM, // ALCT-CLCT-1 GEM pad
205- ALCTCLCT2GEM, // ALCT-CLCT-2 GEM pads in coincidence
206- ALCT2GEM, // ALCT-2 GEM pads in coincidence
207- CLCT2GEM, // CLCT-2 GEM pads in coincidence
208- CLCTONLY, // Missing ALCT
209- ALCTONLY // Missing CLCT
210- };
211-
212211 int getType () const { return type_; }
213212
214213 void setType (int type) { type_ = type; }
@@ -223,9 +222,6 @@ class CSCCorrelatedLCTDigi {
223222 const GEMPadDigi& getGEM2 () const { return gem2_; }
224223
225224private:
226- void setDataWord (const uint16_t newWord, uint16_t & word, const unsigned shift, const unsigned mask);
227- uint16_t getDataWord (const uint16_t word, const unsigned shift, const unsigned mask) const ;
228-
229225 // Note: The Run-3 data format is substantially different than the
230226 // Run-1/2 data format. Some explanation is provided below. For
231227 // more information, please check "DN-20-016".
@@ -241,13 +237,12 @@ class CSCCorrelatedLCTDigi {
241237 uint16_t quality;
242238 // 7-bit key wire
243239 uint16_t keywire;
244- // In Run-3, the strip number receives two additional bits
245- // strip[7:0] -> 1/2 strip value
246- // strip[8] -> 1/4 strip bit
247- // strip[9] -> 1/8 strip bit
240+ // actually the 8-bit half-strip number
248241 uint16_t strip;
249- // In Run-3, the 4-bit pattern number is reinterpreted as the
250- // 4-bit bending value. There will be 16 bending values * 2 (left/right)
242+ // Run-1/2 pattern number.
243+ // For Run-3 CLCTs, please use run3_pattern_. For some backward
244+ // compatibility the trigger emulator translates run3_pattern_
245+ // approximately into pattern_ with a lookup table
251246 uint16_t pattern;
252247 // Common definition for left/right bending in Run-1, Run-2 and Run-3.
253248 // 0: right; 1: left
@@ -259,12 +254,22 @@ class CSCCorrelatedLCTDigi {
259254 uint16_t syncErr;
260255 // 4-bit CSC chamber identifier
261256 uint16_t cscID;
262- // In Run-3, LCT data will be carrying the high-multiplicity bits
263- // for chamber. These bits may indicate the observation of "exotic" events
264- // Depending on the chamber type 2 or 3 bits will be repurposed
265- // in the 32-bit LCT data word from the synchronization bit and
266- // quality bits.
257+
258+ // new members in Run-3:
259+
260+ // In Run-3, CSC trigger data will include the high-multiplicity
261+ // bits for a chamber. These bits may indicate the observation of
262+ // "exotic" events. This data member was included in a prototype.
263+ // Later on, we developed a dedicated object: "CSCShowerDigi"
267264 uint16_t hmt;
265+ // 1/4-strip bit set by CCLUT (see DN-19-059)
266+ bool run3_quart_strip_bit_;
267+ // 1/8-strip bit set by CCLUT
268+ bool run3_eighth_strip_bit_;
269+ // In Run-3, the CLCT digi has 3-bit pattern ID, 0 through 4
270+ uint16_t run3_pattern_;
271+ // 4-bit bending value. There will be 16 bending values * 2 (left/right)
272+ uint16_t run3_slope_;
268273
269274 // / SIMULATION ONLY ////
270275 int type_;
0 commit comments