CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCCLCTDigi Class Reference

#include <CSCCLCTDigi.h>

Public Member Functions

void clear ()
 clear this CLCT More...
 
 CSCCLCTDigi (const int valid, const int quality, const int pattern, const int striptype, const int bend, const int strip, const int cfeb, const int bx, const int trknmb=0, const int fullbx=0)
 Constructors. More...
 
 CSCCLCTDigi ()
 default More...
 
int getBend () const
 return bend More...
 
int getBX () const
 return BX More...
 
int getCFEB () const
 return Key CFEB ID More...
 
int getFullBX () const
 return 12-bit full BX. More...
 
int getKeyStrip () const
 
int getPattern () const
 return pattern More...
 
int getQuality () const
 return quality of a pattern (number of layers hit!) More...
 
int getStrip () const
 return halfstrip that goes from 0 to 31 More...
 
int getStripType () const
 return striptype More...
 
int getTrknmb () const
 return track number (1,2) More...
 
bool isValid () const
 check CLCT validity (1 - valid CLCT) More...
 
bool operator!= (const CSCCLCTDigi &) const
 True if the preceding one is false. More...
 
bool operator== (const CSCCLCTDigi &) const
 True if the two LCTs have exactly the same members (except the number). More...
 
bool operator> (const CSCCLCTDigi &) const
 
void print () const
 Print content of digi. More...
 
void setBend (const int bend)
 set bend More...
 
void setBX (const int bx)
 set bx More...
 
void setCFEB (const int cfeb)
 set Key CFEB ID More...
 
void setFullBX (const uint16_t fullbx)
 Set 12-bit full BX. More...
 
void setPattern (const int pattern)
 set pattern More...
 
void setQuality (const int quality)
 set quality More...
 
void setStrip (const int strip)
 set strip More...
 
void setStripType (const int stripType)
 set stripType More...
 
void setTrknmb (const uint16_t number)
 Set track number (1,2) after sorting CLCTs. More...
 
void setValid (const int valid)
 set valid More...
 

Private Attributes

uint16_t bend_
 
uint16_t bx_
 
uint16_t cfeb_
 
uint16_t fullbx_
 
uint16_t pattern_
 
uint16_t quality_
 
uint16_t strip_
 
uint16_t striptype_
 
uint16_t trknmb_
 
uint16_t valid_
 

Detailed Description

Digi for CLCT trigger primitives.

Author
N. Terentiev, CMU

Definition at line 15 of file CSCCLCTDigi.h.

Constructor & Destructor Documentation

CSCCLCTDigi::CSCCLCTDigi ( const int  valid,
const int  quality,
const int  pattern,
const int  striptype,
const int  bend,
const int  strip,
const int  cfeb,
const int  bx,
const int  trknmb = 0,
const int  fullbx = 0 
)

Constructors.

Definition at line 15 of file CSCCLCTDigi.cc.

25  : valid_(valid),
28  striptype_(striptype),
29  bend_(bend),
30  strip_(strip),
31  cfeb_(cfeb),
32  bx_(bx),
33  trknmb_(trknmb),
34  //fullbx_(0)
35  fullbx_(fullbx) {
36  //valid_ = valid;
37  //quality_ = quality;
38  //pattern_ = pattern;
39  //striptype_ = striptype;
40  //bend_ = bend;
41  //strip_ = strip;
42  //cfeb_ = cfeb;
43  //bx_ = bx;
44  //trknmb_ = trknmb;
45 }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:131
uint16_t strip_
Definition: CSCCLCTDigi.h:128
uint16_t pattern_
Definition: CSCCLCTDigi.h:125
uint16_t valid_
Definition: CSCCLCTDigi.h:123
uint16_t bx_
Definition: CSCCLCTDigi.h:130
uint16_t bend_
Definition: CSCCLCTDigi.h:127
uint16_t fullbx_
Definition: CSCCLCTDigi.h:132
uint16_t cfeb_
Definition: CSCCLCTDigi.h:129
uint16_t striptype_
Definition: CSCCLCTDigi.h:126
uint16_t quality_
Definition: CSCCLCTDigi.h:124
CSCCLCTDigi::CSCCLCTDigi ( )

default

Default.

Definition at line 48 of file CSCCLCTDigi.cc.

49  : valid_(0), quality_(0), pattern_(0), striptype_(0), bend_(0), strip_(0), cfeb_(0), bx_(0), trknmb_(0), fullbx_(0) {
50  // clear(); // set contents to zero
51 }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:131
uint16_t strip_
Definition: CSCCLCTDigi.h:128
uint16_t pattern_
Definition: CSCCLCTDigi.h:125
uint16_t valid_
Definition: CSCCLCTDigi.h:123
uint16_t bx_
Definition: CSCCLCTDigi.h:130
uint16_t bend_
Definition: CSCCLCTDigi.h:127
uint16_t fullbx_
Definition: CSCCLCTDigi.h:132
uint16_t cfeb_
Definition: CSCCLCTDigi.h:129
uint16_t striptype_
Definition: CSCCLCTDigi.h:126
uint16_t quality_
Definition: CSCCLCTDigi.h:124

Member Function Documentation

void CSCCLCTDigi::clear ( void  )

clear this CLCT

Clears this CLCT.

Definition at line 54 of file CSCCLCTDigi.cc.

References bend_, bx_, cfeb_, fullbx_, pattern_, quality_, strip_, striptype_, trknmb_, and valid_.

Referenced by CSCCathodeLCTProcessor::clear(), Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), CSCGEMMotherboardME21::correlateLCTsGEM(), CSCGEMMotherboardME11::correlateLCTsGEM(), CSCMotherboardME11::correlateLCTsME11(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), BeautifulSoup.Tag::setString(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().

54  {
55  valid_ = 0;
56  quality_ = 0;
57  pattern_ = 0;
58  striptype_ = 0;
59  bend_ = 0;
60  strip_ = 0;
61  cfeb_ = 0;
62  bx_ = 0;
63  trknmb_ = 0;
64  fullbx_ = 0;
65 }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:131
uint16_t strip_
Definition: CSCCLCTDigi.h:128
uint16_t pattern_
Definition: CSCCLCTDigi.h:125
uint16_t valid_
Definition: CSCCLCTDigi.h:123
uint16_t bx_
Definition: CSCCLCTDigi.h:130
uint16_t bend_
Definition: CSCCLCTDigi.h:127
uint16_t fullbx_
Definition: CSCCLCTDigi.h:132
uint16_t cfeb_
Definition: CSCCLCTDigi.h:129
uint16_t striptype_
Definition: CSCCLCTDigi.h:126
uint16_t quality_
Definition: CSCCLCTDigi.h:124
int CSCCLCTDigi::getBend ( ) const
inline
int CSCCLCTDigi::getBX ( ) const
inline
int CSCCLCTDigi::getCFEB ( ) const
inline

return Key CFEB ID

Definition at line 71 of file CSCCLCTDigi.h.

References cfeb_.

Referenced by CSCTMBHeader2006::addCLCT0(), CSCTMBHeader2007::addCLCT0(), CSCTMBHeader2006::addCLCT1(), CSCTMBHeader2007::addCLCT1(), operator<<(), and print().

71 { return cfeb_; }
uint16_t cfeb_
Definition: CSCCLCTDigi.h:129
int CSCCLCTDigi::getFullBX ( ) const
inline
int CSCCLCTDigi::getKeyStrip ( ) const
inline

Convert strip_ and cfeb_ to keyStrip. Each CFEB has up to 16 strips (32 halfstrips). There are 5 cfebs. The "strip_" variable is one of 32 halfstrips on the keylayer of a single CFEB, so that Distrip = (cfeb*32 + strip)/4. Halfstrip = (cfeb*32 + strip). Always return halfstrip number since this is what is stored in the correlated LCT digi. For distrip patterns, the convention is the same as for persistent strip numbers: low halfstrip of a distrip. SV, June 15th, 2006.

Definition at line 94 of file CSCCLCTDigi.h.

References cfeb_, and strip_.

Referenced by CSCTMBHeader2007_rev0x50c3::addCLCT0(), CSCTMBHeader2013::addCLCT0(), CSCTMBHeader2013::addCLCT1(), CSCTMBHeader2007_rev0x50c3::addCLCT1(), CSCGEMMotherboard::bestMatchingPad(), CSCMotherboard::constructLCTs(), CSCGEMMotherboard::constructLCTsGEM(), CSCMotherboardLUTME11::doesALCTCrossCLCT(), CSCGEMMotherboard::getPad(), CSCCathodeLCTAnalyzer::lctDigis(), CSCGEMMotherboard::matchingPads(), operator<<(), operator==(), operator>(), and print().

94  {
95  int keyStrip = cfeb_ * 32 + strip_;
96  return keyStrip;
97  }
uint16_t strip_
Definition: CSCCLCTDigi.h:128
uint16_t cfeb_
Definition: CSCCLCTDigi.h:129
int CSCCLCTDigi::getPattern ( ) const
inline
int CSCCLCTDigi::getQuality ( ) const
inline
int CSCCLCTDigi::getStrip ( ) const
inline

return halfstrip that goes from 0 to 31

Definition at line 65 of file CSCCLCTDigi.h.

References strip_.

Referenced by CSCTMBHeader2006::addCLCT0(), CSCTMBHeader2007::addCLCT0(), CSCTMBHeader2006::addCLCT1(), CSCTMBHeader2007::addCLCT1(), operator<<(), and print().

65 { return strip_; }
uint16_t strip_
Definition: CSCCLCTDigi.h:128
int CSCCLCTDigi::getStripType ( ) const
inline

return striptype

Definition at line 53 of file CSCCLCTDigi.h.

References striptype_.

Referenced by CSCTMBHeader2006::addCLCT0(), CSCTMBHeader2006::addCLCT1(), CSCCathodeLCTAnalyzer::lctDigis(), operator<<(), operator==(), and print().

53 { return striptype_; }
uint16_t striptype_
Definition: CSCCLCTDigi.h:126
int CSCCLCTDigi::getTrknmb ( ) const
inline

return track number (1,2)

Definition at line 83 of file CSCCLCTDigi.h.

References trknmb_.

Referenced by operator<<(), and print().

83 { return trknmb_; }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:131
bool CSCCLCTDigi::isValid ( void  ) const
inline
bool CSCCLCTDigi::operator!= ( const CSCCLCTDigi rhs) const

True if the preceding one is false.

Definition at line 105 of file CSCCLCTDigi.cc.

Referenced by setFullBX().

105  {
106  // True if == is false.
107  bool returnValue = true;
108  if ((*this) == rhs)
109  returnValue = false;
110  return returnValue;
111 }
bool CSCCLCTDigi::operator== ( const CSCCLCTDigi rhs) const

True if the two LCTs have exactly the same members (except the number).

Definition at line 94 of file CSCCLCTDigi.cc.

References getBend(), getBX(), getKeyStrip(), getPattern(), getQuality(), getStripType(), and isValid().

Referenced by setFullBX().

94  {
95  // Exact equality.
96  bool returnValue = false;
97  if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() && getPattern() == rhs.getPattern() &&
98  getKeyStrip() == rhs.getKeyStrip() && getStripType() == rhs.getStripType() && getBend() == getBend() &&
99  getBX() == rhs.getBX()) {
100  returnValue = true;
101  }
102  return returnValue;
103 }
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:41
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:53
int getBend() const
return bend
Definition: CSCCLCTDigi.h:59
int getBX() const
return BX
Definition: CSCCLCTDigi.h:77
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:35
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:47
int getKeyStrip() const
Definition: CSCCLCTDigi.h:94
bool CSCCLCTDigi::operator> ( const CSCCLCTDigi rhs) const

True if the left-hand side has a larger "quality". Full definition of "quality" depends on quality word itself, pattern type, and strip number.

Definition at line 67 of file CSCCLCTDigi.cc.

References getKeyStrip(), getPattern(), and getQuality().

Referenced by setFullBX().

67  {
68  // Several versions of CLCT sorting criteria were used before 2008.
69  // They are available in CMSSW versions prior to 3_1_0; here we only keep
70  // the latest one, used in TMB-07 firmware (w/o distrips).
71  bool returnValue = false;
72 
73  int quality1 = getQuality();
74  int quality2 = rhs.getQuality();
75  // The bend-direction bit pid[0] is ignored (left and right bends have
76  // equal quality).
77  int pattern1 = getPattern() & 14;
78  int pattern2 = rhs.getPattern() & 14;
79 
80  // Better-quality CLCTs are preferred.
81  // If two qualities are equal, larger pattern id (i.e., straighter pattern)
82  // is preferred; left- and right-bend patterns are considered to be of
83  // the same quality.
84  // If both qualities and pattern id's are the same, lower keystrip
85  // is preferred.
86  if ((quality1 > quality2) || (quality1 == quality2 && pattern1 > pattern2) ||
87  (quality1 == quality2 && pattern1 == pattern2 && getKeyStrip() < rhs.getKeyStrip())) {
88  returnValue = true;
89  }
90 
91  return returnValue;
92 }
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:41
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:47
int getKeyStrip() const
Definition: CSCCLCTDigi.h:94
void CSCCLCTDigi::print ( void  ) const

Print content of digi.

Debug.

Definition at line 114 of file CSCCLCTDigi.cc.

References getBend(), getBX(), getCFEB(), getFullBX(), getKeyStrip(), getPattern(), getQuality(), getStrip(), getStripType(), getTrknmb(), and isValid().

Referenced by setFullBX().

114  {
115  if (isValid()) {
116  char stripType = (getStripType() == 0) ? 'D' : 'H';
117  char bend = (getBend() == 0) ? 'L' : 'R';
118 
119  edm::LogVerbatim("CSCDigi") << " CSC CLCT #" << std::setw(1) << getTrknmb() << ": Valid = " << std::setw(1)
120  << isValid() << " Key Strip = " << std::setw(3) << getKeyStrip()
121  << " Strip = " << std::setw(2) << getStrip() << " Quality = " << std::setw(1)
122  << getQuality() << " Pattern = " << std::setw(1) << getPattern()
123  << " Bend = " << std::setw(1) << bend << " Strip type = " << std::setw(1) << stripType
124  << " CFEB ID = " << std::setw(1) << getCFEB() << " BX = " << std::setw(1) << getBX()
125  << " Full BX= " << std::setw(1) << getFullBX();
126  } else {
127  edm::LogVerbatim("CSCDigi") << "Not a valid Cathode LCT.";
128  }
129 }
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:41
int getStrip() const
return halfstrip that goes from 0 to 31
Definition: CSCCLCTDigi.h:65
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:53
int getBend() const
return bend
Definition: CSCCLCTDigi.h:59
int getCFEB() const
return Key CFEB ID
Definition: CSCCLCTDigi.h:71
int getBX() const
return BX
Definition: CSCCLCTDigi.h:77
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:35
int getTrknmb() const
return track number (1,2)
Definition: CSCCLCTDigi.h:83
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:47
int getKeyStrip() const
Definition: CSCCLCTDigi.h:94
int getFullBX() const
return 12-bit full BX.
Definition: CSCCLCTDigi.h:103
void CSCCLCTDigi::setBend ( const int  bend)
inline

set bend

Definition at line 62 of file CSCCLCTDigi.h.

References bend_.

62 { bend_ = bend; }
uint16_t bend_
Definition: CSCCLCTDigi.h:127
void CSCCLCTDigi::setBX ( const int  bx)
inline

set bx

Definition at line 80 of file CSCCLCTDigi.h.

References bx_.

80 { bx_ = bx; }
uint16_t bx_
Definition: CSCCLCTDigi.h:130
void CSCCLCTDigi::setCFEB ( const int  cfeb)
inline

set Key CFEB ID

Definition at line 74 of file CSCCLCTDigi.h.

References cfeb_.

74 { cfeb_ = cfeb; }
uint16_t cfeb_
Definition: CSCCLCTDigi.h:129
void CSCCLCTDigi::setFullBX ( const uint16_t  fullbx)
inline

Set 12-bit full BX.

Definition at line 106 of file CSCCLCTDigi.h.

References fullbx_, operator!=(), operator==(), operator>(), and print().

Referenced by CSCUpgradeCathodeLCTProcessor::findLCTs().

106 { fullbx_ = fullbx; }
uint16_t fullbx_
Definition: CSCCLCTDigi.h:132
void CSCCLCTDigi::setPattern ( const int  pattern)
inline

set pattern

Definition at line 50 of file CSCCLCTDigi.h.

References listBenchmarks::pattern, and pattern_.

void CSCCLCTDigi::setQuality ( const int  quality)
inline

set quality

Definition at line 44 of file CSCCLCTDigi.h.

References jets_cff::quality, and quality_.

44 { quality_ = quality; }
uint16_t quality_
Definition: CSCCLCTDigi.h:124
void CSCCLCTDigi::setStrip ( const int  strip)
inline

set strip

Definition at line 68 of file CSCCLCTDigi.h.

References digitizers_cfi::strip, and strip_.

68 { strip_ = strip; }
uint16_t strip_
Definition: CSCCLCTDigi.h:128
void CSCCLCTDigi::setStripType ( const int  stripType)
inline

set stripType

Definition at line 56 of file CSCCLCTDigi.h.

References striptype_.

56 { striptype_ = stripType; }
uint16_t striptype_
Definition: CSCCLCTDigi.h:126
void CSCCLCTDigi::setTrknmb ( const uint16_t  number)
inline

Set track number (1,2) after sorting CLCTs.

Definition at line 100 of file CSCCLCTDigi.h.

References trknmb_.

Referenced by CSCCathodeLCTProcessor::run().

100 { trknmb_ = number; }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:131
void CSCCLCTDigi::setValid ( const int  valid)
inline

set valid

Definition at line 38 of file CSCCLCTDigi.h.

References valid_.

38 { valid_ = valid; }
uint16_t valid_
Definition: CSCCLCTDigi.h:123

Member Data Documentation

uint16_t CSCCLCTDigi::bend_
private

Definition at line 127 of file CSCCLCTDigi.h.

Referenced by clear(), getBend(), and setBend().

uint16_t CSCCLCTDigi::bx_
private

Definition at line 130 of file CSCCLCTDigi.h.

Referenced by clear(), getBX(), and setBX().

uint16_t CSCCLCTDigi::cfeb_
private

Definition at line 129 of file CSCCLCTDigi.h.

Referenced by clear(), getCFEB(), getKeyStrip(), and setCFEB().

uint16_t CSCCLCTDigi::fullbx_
private

Definition at line 132 of file CSCCLCTDigi.h.

Referenced by clear(), getFullBX(), and setFullBX().

uint16_t CSCCLCTDigi::pattern_
private

Definition at line 125 of file CSCCLCTDigi.h.

Referenced by clear(), getPattern(), and setPattern().

uint16_t CSCCLCTDigi::quality_
private

Definition at line 124 of file CSCCLCTDigi.h.

Referenced by clear(), getQuality(), and setQuality().

uint16_t CSCCLCTDigi::strip_
private

Definition at line 128 of file CSCCLCTDigi.h.

Referenced by clear(), getKeyStrip(), getStrip(), and setStrip().

uint16_t CSCCLCTDigi::striptype_
private

Definition at line 126 of file CSCCLCTDigi.h.

Referenced by clear(), getStripType(), and setStripType().

uint16_t CSCCLCTDigi::trknmb_
private

Definition at line 131 of file CSCCLCTDigi.h.

Referenced by clear(), getTrknmb(), and setTrknmb().

uint16_t CSCCLCTDigi::valid_
private

Definition at line 123 of file CSCCLCTDigi.h.

Referenced by clear(), isValid(), and setValid().