CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 setFullBX (const uint16_t fullbx)
 Set 12-bit full BX. More...
 
void setTrknmb (const uint16_t number)
 Set track number (1,2) after sorting CLCTs. 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:104
uint16_t strip_
Definition: CSCCLCTDigi.h:101
uint16_t pattern_
Definition: CSCCLCTDigi.h:98
uint16_t valid_
Definition: CSCCLCTDigi.h:96
uint16_t bx_
Definition: CSCCLCTDigi.h:103
uint16_t bend_
Definition: CSCCLCTDigi.h:100
uint16_t fullbx_
Definition: CSCCLCTDigi.h:105
uint16_t cfeb_
Definition: CSCCLCTDigi.h:102
uint16_t striptype_
Definition: CSCCLCTDigi.h:99
uint16_t quality_
Definition: CSCCLCTDigi.h:97
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:104
uint16_t strip_
Definition: CSCCLCTDigi.h:101
uint16_t pattern_
Definition: CSCCLCTDigi.h:98
uint16_t valid_
Definition: CSCCLCTDigi.h:96
uint16_t bx_
Definition: CSCCLCTDigi.h:103
uint16_t bend_
Definition: CSCCLCTDigi.h:100
uint16_t fullbx_
Definition: CSCCLCTDigi.h:105
uint16_t cfeb_
Definition: CSCCLCTDigi.h:102
uint16_t striptype_
Definition: CSCCLCTDigi.h:99
uint16_t quality_
Definition: CSCCLCTDigi.h:97

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(), CSCMotherboardME11GEM::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:104
uint16_t strip_
Definition: CSCCLCTDigi.h:101
uint16_t pattern_
Definition: CSCCLCTDigi.h:98
uint16_t valid_
Definition: CSCCLCTDigi.h:96
uint16_t bx_
Definition: CSCCLCTDigi.h:103
uint16_t bend_
Definition: CSCCLCTDigi.h:100
uint16_t fullbx_
Definition: CSCCLCTDigi.h:105
uint16_t cfeb_
Definition: CSCCLCTDigi.h:102
uint16_t striptype_
Definition: CSCCLCTDigi.h:99
uint16_t quality_
Definition: CSCCLCTDigi.h:97
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 65 of file CSCCLCTDigi.h.

References cfeb_, and strip_.

Referenced by CSCTMBHeader2007_rev0x50c3::addCLCT0(), CSCTMBHeader2013::addCLCT0(), CSCTMBHeader2013::addCLCT1(), CSCTMBHeader2007_rev0x50c3::addCLCT1(), CSCMotherboard::constructLCTs(), CSCMotherboardME21GEM::constructLCTsGEM(), CSCMotherboardME11GEM::constructLCTsGEM(), CSCMotherboardME3141RPC::constructLCTsRPC(), CSCMotherboardME11GEM::correlateLCTsGEM(), CSCMotherboardME11::doesALCTCrossCLCT(), CSCMotherboardME11GEM::doesALCTCrossCLCT(), CSCMotherboardME21GEM::matchingGEMPads(), CSCMotherboardME11GEM::matchingGEMPads(), CSCMotherboardME3141RPC::matchingRPCDigis(), operator<<(), operator==(), operator>(), print(), CSCMotherboard::testLCT(), and CSCCathodeLCTProcessor::testLCTs().

65  {
66  int keyStrip = cfeb_ * 32 + strip_;
67  return keyStrip;
68  }
uint16_t strip_
Definition: CSCCLCTDigi.h:101
uint16_t cfeb_
Definition: CSCCLCTDigi.h:102
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 45 of file CSCCLCTDigi.h.

References strip_.

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

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

return track number (1,2)

Definition at line 54 of file CSCCLCTDigi.h.

References trknmb_.

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

54 {return trknmb_ ;}
uint16_t trknmb_
Definition: CSCCLCTDigi.h:104
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.

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().

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:33
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:39
int getBend() const
return bend
Definition: CSCCLCTDigi.h:42
int getBX() const
return BX
Definition: CSCCLCTDigi.h:51
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:36
int getKeyStrip() const
Definition: CSCCLCTDigi.h:65
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(), getQuality(), pattern1, and pattern2.

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:33
PhiMemoryImage pattern1(0x8000, 0, 0, 0x8000, 0, 0, 0x8000, 0, 0, 0x8000, 0, 0)
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:36
PhiMemoryImage pattern2(0x10000, 0, 0, 0x8000, 0, 0, 0xc000, 0, 0, 0xc000, 0, 0)
int getKeyStrip() const
Definition: CSCCLCTDigi.h:65
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().

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:33
int getStrip() const
return halfstrip that goes from 0 to 31
Definition: CSCCLCTDigi.h:45
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:39
int getBend() const
return bend
Definition: CSCCLCTDigi.h:42
int getCFEB() const
return Key CFEB ID
Definition: CSCCLCTDigi.h:48
int getBX() const
return BX
Definition: CSCCLCTDigi.h:51
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
int getTrknmb() const
return track number (1,2)
Definition: CSCCLCTDigi.h:54
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:36
int getKeyStrip() const
Definition: CSCCLCTDigi.h:65
int getFullBX() const
return 12-bit full BX.
Definition: CSCCLCTDigi.h:74
void CSCCLCTDigi::setFullBX ( const uint16_t  fullbx)
inline

Set 12-bit full BX.

Definition at line 77 of file CSCCLCTDigi.h.

References fullbx_.

Referenced by CSCCathodeLCTProcessor::findLCTsSLHC().

77 {fullbx_ = fullbx;}
uint16_t fullbx_
Definition: CSCCLCTDigi.h:105
void CSCCLCTDigi::setTrknmb ( const uint16_t  number)
inline

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

Definition at line 71 of file CSCCLCTDigi.h.

References contentValuesFiles::number, and trknmb_.

Referenced by CSCCathodeLCTProcessor::run().

71 {trknmb_ = number;}
uint16_t trknmb_
Definition: CSCCLCTDigi.h:104

Member Data Documentation

uint16_t CSCCLCTDigi::bend_
private

Definition at line 100 of file CSCCLCTDigi.h.

Referenced by clear(), and getBend().

uint16_t CSCCLCTDigi::bx_
private

Definition at line 103 of file CSCCLCTDigi.h.

Referenced by clear(), and getBX().

uint16_t CSCCLCTDigi::cfeb_
private

Definition at line 102 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::fullbx_
private

Definition at line 105 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::pattern_
private

Definition at line 98 of file CSCCLCTDigi.h.

Referenced by clear(), and getPattern().

uint16_t CSCCLCTDigi::quality_
private

Definition at line 97 of file CSCCLCTDigi.h.

Referenced by clear(), and getQuality().

uint16_t CSCCLCTDigi::strip_
private

Definition at line 101 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::striptype_
private

Definition at line 99 of file CSCCLCTDigi.h.

Referenced by clear(), and getStripType().

uint16_t CSCCLCTDigi::trknmb_
private

Definition at line 104 of file CSCCLCTDigi.h.

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

uint16_t CSCCLCTDigi::valid_
private

Definition at line 96 of file CSCCLCTDigi.h.

Referenced by clear(), and isValid().