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.

17  :
18  valid_(valid),
21  striptype_(striptype),
22  bend_(bend),
23  strip_(strip),
24  cfeb_(cfeb),
25  bx_(bx),
26  trknmb_(trknmb),
27  //fullbx_(0)
28  fullbx_(fullbx)
29  {
30  //valid_ = valid;
31  //quality_ = quality;
32  //pattern_ = pattern;
33  //striptype_ = striptype;
34  //bend_ = bend;
35  //strip_ = strip;
36  //cfeb_ = cfeb;
37  //bx_ = bx;
38  //trknmb_ = trknmb;
39 }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:128
uint16_t strip_
Definition: CSCCLCTDigi.h:125
uint16_t pattern_
Definition: CSCCLCTDigi.h:122
uint16_t valid_
Definition: CSCCLCTDigi.h:120
uint16_t bx_
Definition: CSCCLCTDigi.h:127
uint16_t bend_
Definition: CSCCLCTDigi.h:124
uint16_t fullbx_
Definition: CSCCLCTDigi.h:129
uint16_t cfeb_
Definition: CSCCLCTDigi.h:126
uint16_t striptype_
Definition: CSCCLCTDigi.h:123
uint16_t quality_
Definition: CSCCLCTDigi.h:121
CSCCLCTDigi::CSCCLCTDigi ( )

default

Default.

Definition at line 42 of file CSCCLCTDigi.cc.

42  :
43  valid_(0),
44  quality_(0),
45  pattern_(0),
46  striptype_(0),
47  bend_(0),
48  strip_(0),
49  cfeb_(0),
50  bx_(0),
51  trknmb_(0),
52  fullbx_(0)
53 {
54 // clear(); // set contents to zero
55 }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:128
uint16_t strip_
Definition: CSCCLCTDigi.h:125
uint16_t pattern_
Definition: CSCCLCTDigi.h:122
uint16_t valid_
Definition: CSCCLCTDigi.h:120
uint16_t bx_
Definition: CSCCLCTDigi.h:127
uint16_t bend_
Definition: CSCCLCTDigi.h:124
uint16_t fullbx_
Definition: CSCCLCTDigi.h:129
uint16_t cfeb_
Definition: CSCCLCTDigi.h:126
uint16_t striptype_
Definition: CSCCLCTDigi.h:123
uint16_t quality_
Definition: CSCCLCTDigi.h:121

Member Function Documentation

void CSCCLCTDigi::clear ( void  )

clear this CLCT

Clears this CLCT.

Definition at line 58 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(), CSCMotherboardME11::correlateLCTs(), CSCGEMMotherboardME21::correlateLCTsGEM(), CSCGEMMotherboardME11::correlateLCTsGEM(), 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().

58  {
59  valid_ = 0;
60  quality_ = 0;
61  pattern_ = 0;
62  striptype_ = 0;
63  bend_ = 0;
64  strip_ = 0;
65  cfeb_ = 0;
66  bx_ = 0;
67  trknmb_ = 0;
68  fullbx_ = 0;
69 }
uint16_t trknmb_
Definition: CSCCLCTDigi.h:128
uint16_t strip_
Definition: CSCCLCTDigi.h:125
uint16_t pattern_
Definition: CSCCLCTDigi.h:122
uint16_t valid_
Definition: CSCCLCTDigi.h:120
uint16_t bx_
Definition: CSCCLCTDigi.h:127
uint16_t bend_
Definition: CSCCLCTDigi.h:124
uint16_t fullbx_
Definition: CSCCLCTDigi.h:129
uint16_t cfeb_
Definition: CSCCLCTDigi.h:126
uint16_t striptype_
Definition: CSCCLCTDigi.h:123
uint16_t quality_
Definition: CSCCLCTDigi.h:121
int CSCCLCTDigi::getBend ( ) const
inline
int CSCCLCTDigi::getBX ( ) const
inline
int CSCCLCTDigi::getCFEB ( ) const
inline
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 89 of file CSCCLCTDigi.h.

References cfeb_, and strip_.

Referenced by CSCTMBHeader2007_rev0x50c3::addCLCT0(), CSCTMBHeader2013::addCLCT0(), CSCTMBHeader2013::addCLCT1(), CSCTMBHeader2007_rev0x50c3::addCLCT1(), CSCMotherboard::constructLCTs(), CSCGEMMotherboard::constructLCTsGEM(), CSCGEMMotherboardME11::doesALCTCrossCLCT(), CSCMotherboardME11::doesALCTCrossCLCT(), CSCGEMMotherboard::getPad(), CSCGEMMotherboard::matchingPads(), operator<<(), operator==(), operator>(), print(), CSCMotherboard::testLCT(), and CSCCathodeLCTProcessor::testLCTs().

89  {
90  int keyStrip = cfeb_ * 32 + strip_;
91  return keyStrip;
92  }
uint16_t strip_
Definition: CSCCLCTDigi.h:125
uint16_t cfeb_
Definition: CSCCLCTDigi.h:126
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 60 of file CSCCLCTDigi.h.

References strip_.

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

60 {return strip_ ;}
uint16_t strip_
Definition: CSCCLCTDigi.h:125
int CSCCLCTDigi::getStripType ( ) const
inline
int CSCCLCTDigi::getTrknmb ( ) const
inline

return track number (1,2)

Definition at line 78 of file CSCCLCTDigi.h.

References trknmb_.

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

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

True if the preceding one is false.

Definition at line 110 of file CSCCLCTDigi.cc.

Referenced by setFullBX().

110  {
111  // True if == is false.
112  bool returnValue = true;
113  if ((*this) == rhs) returnValue = false;
114  return returnValue;
115 }
bool CSCCLCTDigi::operator== ( const CSCCLCTDigi rhs) const

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

Definition at line 98 of file CSCCLCTDigi.cc.

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

Referenced by setFullBX().

98  {
99  // Exact equality.
100  bool returnValue = false;
101  if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() &&
102  getPattern() == rhs.getPattern() && getKeyStrip()== rhs.getKeyStrip()&&
103  getStripType() == rhs.getStripType() && getBend() == getBend() &&
104  getBX() == rhs.getBX()) {
105  returnValue = true;
106  }
107  return returnValue;
108 }
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:36
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:48
int getBend() const
return bend
Definition: CSCCLCTDigi.h:54
int getBX() const
return BX
Definition: CSCCLCTDigi.h:72
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:42
int getKeyStrip() const
Definition: CSCCLCTDigi.h:89
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 71 of file CSCCLCTDigi.cc.

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

Referenced by setFullBX().

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

Print content of digi.

Debug.

Definition at line 118 of file CSCCLCTDigi.cc.

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

Referenced by setFullBX().

118  {
119  if (isValid()) {
120  char stripType = (getStripType() == 0) ? 'D' : 'H';
121  char bend = (getBend() == 0) ? 'L' : 'R';
122 
123  edm::LogVerbatim("CSCDigi")
124  << " CSC CLCT #" << std::setw(1) << getTrknmb()
125  << ": Valid = " << std::setw(1) << isValid()
126  << " Key Strip = " << std::setw(3) << getKeyStrip()
127  << " Strip = " << std::setw(2) << getStrip()
128  << " Quality = " << std::setw(1) << getQuality()
129  << " Pattern = " << std::setw(1) << getPattern()
130  << " Bend = " << std::setw(1) << bend
131  << " Strip type = " << std::setw(1) << stripType
132  << " CFEB ID = " << std::setw(1) << getCFEB()
133  << " BX = " << std::setw(1) << getBX()
134  << " Full BX= " << std::setw(1) << getFullBX();
135  }
136  else {
137  edm::LogVerbatim("CSCDigi") << "Not a valid Cathode LCT.";
138  }
139 }
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:36
int getStrip() const
return halfstrip that goes from 0 to 31
Definition: CSCCLCTDigi.h:60
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:48
int getBend() const
return bend
Definition: CSCCLCTDigi.h:54
int getCFEB() const
return Key CFEB ID
Definition: CSCCLCTDigi.h:66
int getBX() const
return BX
Definition: CSCCLCTDigi.h:72
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
int getTrknmb() const
return track number (1,2)
Definition: CSCCLCTDigi.h:78
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:42
int getKeyStrip() const
Definition: CSCCLCTDigi.h:89
int getFullBX() const
return 12-bit full BX.
Definition: CSCCLCTDigi.h:98
void CSCCLCTDigi::setBend ( const int  bend)
inline

set bend

Definition at line 57 of file CSCCLCTDigi.h.

References bend_.

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

set bx

Definition at line 75 of file CSCCLCTDigi.h.

References bx_.

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

set Key CFEB ID

Definition at line 69 of file CSCCLCTDigi.h.

References cfeb_.

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

Set 12-bit full BX.

Definition at line 101 of file CSCCLCTDigi.h.

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

Referenced by CSCCathodeLCTProcessor::findLCTsSLHC().

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

set pattern

Definition at line 45 of file CSCCLCTDigi.h.

References listBenchmarks::pattern, and pattern_.

void CSCCLCTDigi::setQuality ( const int  quality)
inline

set quality

Definition at line 39 of file CSCCLCTDigi.h.

References jets_cff::quality, and quality_.

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

set strip

Definition at line 63 of file CSCCLCTDigi.h.

References digitizers_cfi::strip, and strip_.

void CSCCLCTDigi::setStripType ( const int  stripType)
inline

set stripType

Definition at line 51 of file CSCCLCTDigi.h.

References striptype_.

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

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

Definition at line 95 of file CSCCLCTDigi.h.

References trknmb_.

Referenced by CSCCathodeLCTProcessor::run().

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

set valid

Definition at line 33 of file CSCCLCTDigi.h.

References valid_.

33 {valid_ = valid;}
uint16_t valid_
Definition: CSCCLCTDigi.h:120

Member Data Documentation

uint16_t CSCCLCTDigi::bend_
private

Definition at line 124 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::bx_
private

Definition at line 127 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::cfeb_
private

Definition at line 126 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::fullbx_
private

Definition at line 129 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::pattern_
private

Definition at line 122 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::quality_
private

Definition at line 121 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::strip_
private

Definition at line 125 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::striptype_
private

Definition at line 123 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::trknmb_
private

Definition at line 128 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::valid_
private

Definition at line 120 of file CSCCLCTDigi.h.

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