CMS 3D CMS Logo

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

#include <CSCALCTDigi.h>

Public Member Functions

void clear ()
 clear this ALCT More...
 
 CSCALCTDigi (const int valid, const int quality, const int accel, const int patternb, const int keywire, const int bx, const int trknmb=0)
 Constructors. More...
 
 CSCALCTDigi ()
 default More...
 
int getAccelerator () const
 
int getBX () const
 return BX - five low bits of BXN counter tagged by the ALCT More...
 
int getCollisionB () const
 
int getFullBX () const
 return 12-bit full BX. More...
 
int getKeyWG () const
 return key wire group More...
 
int getQuality () const
 return quality of a pattern More...
 
int getTrknmb () const
 return track number (1,2) More...
 
bool isValid () const
 check ALCT validity (1 - valid ALCT) More...
 
bool operator!= (const CSCALCTDigi &) const
 True if the preceding one is false. More...
 
bool operator== (const CSCALCTDigi &) const
 True if all members (except the number) of both ALCTs are equal. More...
 
bool operator> (const CSCALCTDigi &) const
 
void print () const
 Print content of digi. More...
 
void setAccelerator (const int accelerator)
 set accelerator bit More...
 
void setBX (const int BX)
 set BX More...
 
void setCollisionB (const int collision)
 set Collision Pattern B bit More...
 
void setFullBX (const uint16_t fullbx)
 Set 12-bit full BX. More...
 
void setKeyWG (const int keyWG)
 set key wire group More...
 
void setQuality (const int quality)
 set quality More...
 
void setTrknmb (const uint16_t number)
 Set track number (1,2) after sorting ALCTs. More...
 
void setValid (const int valid)
 set valid More...
 
void setWireGroup (unsigned int wiregroup)
 set wiregroup number More...
 

Private Attributes

uint16_t accel_
 
uint16_t bx_
 
uint16_t fullbx_
 
uint16_t keywire_
 
uint16_t patternb_
 
uint16_t quality_
 
uint16_t trknmb_
 
uint16_t valid_
 

Detailed Description

Digi for ALCT trigger primitives.

Author
N. Terentiev, CMU

Definition at line 15 of file CSCALCTDigi.h.

Constructor & Destructor Documentation

CSCALCTDigi::CSCALCTDigi ( const int  valid,
const int  quality,
const int  accel,
const int  patternb,
const int  keywire,
const int  bx,
const int  trknmb = 0 
)

Constructors.

Definition at line 17 of file CSCALCTDigi.cc.

References jets_cff::quality, and sistrip::valid_.

23  {
24  valid_ = valid;
25  quality_ = quality;
26  accel_ = accel;
27  patternb_ = patternb;
28  keywire_ = keywire;
29  bx_ = bx;
30  trknmb_ = trknmb;
31 }
uint16_t bx_
Definition: CSCALCTDigi.h:104
uint16_t trknmb_
Definition: CSCALCTDigi.h:105
uint16_t patternb_
Definition: CSCALCTDigi.h:102
uint16_t keywire_
Definition: CSCALCTDigi.h:103
uint16_t valid_
Definition: CSCALCTDigi.h:99
uint16_t accel_
Definition: CSCALCTDigi.h:101
uint16_t quality_
Definition: CSCALCTDigi.h:100
CSCALCTDigi::CSCALCTDigi ( )

default

Default.

Definition at line 34 of file CSCALCTDigi.cc.

References hitfit::clear().

34  {
35  clear(); // set contents to zero
36 }
void clear()
clear this ALCT
Definition: CSCALCTDigi.cc:39

Member Function Documentation

void CSCALCTDigi::clear ( void  )
int CSCALCTDigi::getAccelerator ( ) const
inline

return Accelerator bit 1-Accelerator pattern, 0-CollisionA or CollisionB pattern

Definition at line 45 of file CSCALCTDigi.h.

References accel_.

Referenced by CSCALCTs2006::addALCT0(), CSCALCTs2006::addALCT1(), CSCMotherboard::findQuality(), CSCGEMMotherboard::findQualityGEM(), CSCAnodeLCTProcessor::isBetterALCT(), CSCAnodeLCTAnalyzer::lctDigis(), operator<<(), and operator==().

45 { return accel_; }
uint16_t accel_
Definition: CSCALCTDigi.h:101
int CSCALCTDigi::getBX ( ) const
inline
int CSCALCTDigi::getCollisionB ( ) const
inline

return Collision Pattern B bit 1-CollisionB pattern (accel_ = 0), 0-CollisionA pattern (accel_ = 0)

Definition at line 53 of file CSCALCTDigi.h.

References patternb_.

Referenced by CSCALCTs2006::addALCT0(), CSCALCTs2006::addALCT1(), CSCAnodeLCTAnalyzer::lctDigis(), operator<<(), and operator==().

53 { return patternb_; }
uint16_t patternb_
Definition: CSCALCTDigi.h:102
int CSCALCTDigi::getFullBX ( ) const
inline

return 12-bit full BX.

Definition at line 77 of file CSCALCTDigi.h.

References fullbx_.

Referenced by CSCAnodeLCTProcessor::lctSearch().

77 { return fullbx_; }
uint16_t fullbx_
Definition: CSCALCTDigi.h:106
int CSCALCTDigi::getKeyWG ( ) const
inline
int CSCALCTDigi::getQuality ( ) const
inline
int CSCALCTDigi::getTrknmb ( ) const
inline

return track number (1,2)

Definition at line 71 of file CSCALCTDigi.h.

References trknmb_.

Referenced by operator<<().

71 { return trknmb_; }
uint16_t trknmb_
Definition: CSCALCTDigi.h:105
bool CSCALCTDigi::isValid ( void  ) const
inline
bool CSCALCTDigi::operator!= ( const CSCALCTDigi rhs) const

True if the preceding one is false.

Definition at line 84 of file CSCALCTDigi.cc.

Referenced by setFullBX().

84  {
85  // True if == is false.
86  bool returnValue = true;
87  if ((*this) == rhs)
88  returnValue = false;
89  return returnValue;
90 }
bool CSCALCTDigi::operator== ( const CSCALCTDigi rhs) const

True if all members (except the number) of both ALCTs are equal.

Definition at line 74 of file CSCALCTDigi.cc.

References getAccelerator(), getBX(), getCollisionB(), getKeyWG(), getQuality(), and isValid().

Referenced by setFullBX().

74  {
75  // Exact equality.
76  bool returnValue = false;
77  if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() && getAccelerator() == rhs.getAccelerator() &&
78  getCollisionB() == rhs.getCollisionB() && getKeyWG() == rhs.getKeyWG() && getBX() == rhs.getBX()) {
79  returnValue = true;
80  }
81  return returnValue;
82 }
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:32
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:65
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:38
int getAccelerator() const
Definition: CSCALCTDigi.h:45
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:59
int getCollisionB() const
Definition: CSCALCTDigi.h:53
bool CSCALCTDigi::operator> ( const CSCALCTDigi rhs) const

True if the first ALCT has a larger quality, or if it has the same quality but a larger wire group.

Definition at line 50 of file CSCALCTDigi.cc.

References getBX(), getKeyWG(), and getQuality().

Referenced by setFullBX().

50  {
51  bool returnValue = false;
52 
53  // Early ALCTs are always preferred to the ones found at later bx's.
54  if (getBX() < rhs.getBX()) {
55  returnValue = true;
56  }
57  if (getBX() != rhs.getBX()) {
58  return returnValue;
59  }
60 
61  // The > operator then checks the quality of ALCTs.
62  // If two qualities are equal, the ALCT furthest from the beam axis
63  // (lowest eta, highest wire group number) is selected.
64  int quality1 = getQuality();
65  int quality2 = rhs.getQuality();
66  if (quality1 > quality2) {
67  returnValue = true;
68  } else if (quality1 == quality2 && getKeyWG() > rhs.getKeyWG()) {
69  returnValue = true;
70  }
71  return returnValue;
72 }
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:65
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:38
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:59
void CSCALCTDigi::print ( void  ) const

Print content of digi.

Debug.

Definition at line 93 of file CSCALCTDigi.cc.

Referenced by setFullBX().

93  {
94  if (isValid()) {
95  edm::LogVerbatim("CSCDigi") << "CSC ALCT #" << setw(1) << getTrknmb() << ": Valid = " << setw(1) << isValid()
96  << " Quality = " << setw(2) << getQuality() << " Accel. = " << setw(1)
97  << getAccelerator() << " PatternB = " << setw(1) << getCollisionB()
98  << " Key wire group = " << setw(3) << getKeyWG() << " BX = " << setw(2) << getBX()
99  << " Full BX= " << std::setw(1) << getFullBX();
100  } else {
101  edm::LogVerbatim("CSCDigi") << "Not a valid Anode LCT.";
102  }
103 }
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:32
int getFullBX() const
return 12-bit full BX.
Definition: CSCALCTDigi.h:77
int getTrknmb() const
return track number (1,2)
Definition: CSCALCTDigi.h:71
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:65
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:38
int getAccelerator() const
Definition: CSCALCTDigi.h:45
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:59
int getCollisionB() const
Definition: CSCALCTDigi.h:53
void CSCALCTDigi::setAccelerator ( const int  accelerator)
inline

set accelerator bit

Definition at line 48 of file CSCALCTDigi.h.

References accel_.

48 { accel_ = accelerator; }
uint16_t accel_
Definition: CSCALCTDigi.h:101
void CSCALCTDigi::setBX ( const int  BX)
inline

set BX

Definition at line 68 of file CSCALCTDigi.h.

References rpcdqm::BX, and bx_.

Referenced by CSCMotherboard::getBXShiftedALCT().

68 { bx_ = BX; }
uint16_t bx_
Definition: CSCALCTDigi.h:104
void CSCALCTDigi::setCollisionB ( const int  collision)
inline

set Collision Pattern B bit

Definition at line 56 of file CSCALCTDigi.h.

References patternb_.

56 { patternb_ = collision; }
uint16_t patternb_
Definition: CSCALCTDigi.h:102
void CSCALCTDigi::setFullBX ( const uint16_t  fullbx)
inline

Set 12-bit full BX.

Definition at line 80 of file CSCALCTDigi.h.

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

80 { fullbx_ = fullbx; }
uint16_t fullbx_
Definition: CSCALCTDigi.h:106
void CSCALCTDigi::setKeyWG ( const int  keyWG)
inline

set key wire group

Definition at line 62 of file CSCALCTDigi.h.

References keywire_.

62 { keywire_ = keyWG; }
uint16_t keywire_
Definition: CSCALCTDigi.h:103
void CSCALCTDigi::setQuality ( const int  quality)
inline

set quality

Definition at line 41 of file CSCALCTDigi.h.

References jets_cff::quality, and quality_.

41 { quality_ = quality; }
uint16_t quality_
Definition: CSCALCTDigi.h:100
void CSCALCTDigi::setTrknmb ( const uint16_t  number)
inline

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

Definition at line 74 of file CSCALCTDigi.h.

References trknmb_.

Referenced by CSCAnodeLCTProcessor::lctSearch().

74 { trknmb_ = number; }
uint16_t trknmb_
Definition: CSCALCTDigi.h:105
void CSCALCTDigi::setValid ( const int  valid)
inline

set valid

Definition at line 35 of file CSCALCTDigi.h.

References valid_.

35 { valid_ = valid; }
uint16_t valid_
Definition: CSCALCTDigi.h:99
void CSCALCTDigi::setWireGroup ( unsigned int  wiregroup)
inline

set wiregroup number

Definition at line 96 of file CSCALCTDigi.h.

References keywire_.

96 { keywire_ = wiregroup; }
uint16_t keywire_
Definition: CSCALCTDigi.h:103

Member Data Documentation

uint16_t CSCALCTDigi::accel_
private

Definition at line 101 of file CSCALCTDigi.h.

Referenced by getAccelerator(), and setAccelerator().

uint16_t CSCALCTDigi::bx_
private

Definition at line 104 of file CSCALCTDigi.h.

Referenced by getBX(), and setBX().

uint16_t CSCALCTDigi::fullbx_
private

Definition at line 106 of file CSCALCTDigi.h.

Referenced by getFullBX(), and setFullBX().

uint16_t CSCALCTDigi::keywire_
private

Definition at line 103 of file CSCALCTDigi.h.

Referenced by getKeyWG(), setKeyWG(), and setWireGroup().

uint16_t CSCALCTDigi::patternb_
private

Definition at line 102 of file CSCALCTDigi.h.

Referenced by getCollisionB(), and setCollisionB().

uint16_t CSCALCTDigi::quality_
private

Definition at line 100 of file CSCALCTDigi.h.

Referenced by getQuality(), and setQuality().

uint16_t CSCALCTDigi::trknmb_
private

Definition at line 105 of file CSCALCTDigi.h.

Referenced by getTrknmb(), and setTrknmb().

uint16_t CSCALCTDigi::valid_
private

Definition at line 99 of file CSCALCTDigi.h.

Referenced by isValid(), and setValid().