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
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 setFullBX (const uint16_t fullbx)
 Set 12-bit full BX. More...
 
void setTrknmb (const uint16_t number)
 Set track number (1,2) after sorting ALCTs. 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 HLT_25ns10e33_v2_cff::quality, and sistrip::valid_.

19  {
20  valid_ = valid;
21  quality_ = quality;
22  accel_ = accel;
23  patternb_ = patternb;
24  keywire_ = keywire;
25  bx_ = bx;
26  trknmb_ = trknmb;
27 }
uint16_t bx_
Definition: CSCALCTDigi.h:85
uint16_t trknmb_
Definition: CSCALCTDigi.h:86
uint16_t patternb_
Definition: CSCALCTDigi.h:83
uint16_t keywire_
Definition: CSCALCTDigi.h:84
uint16_t valid_
Definition: CSCALCTDigi.h:80
uint16_t accel_
Definition: CSCALCTDigi.h:82
uint16_t quality_
Definition: CSCALCTDigi.h:81
CSCALCTDigi::CSCALCTDigi ( )

default

Default.

Definition at line 30 of file CSCALCTDigi.cc.

References hitfit::clear().

30  {
31  clear(); // set contents to zero
32 }
void clear()
clear this ALCT
Definition: CSCALCTDigi.cc:35

Member Function Documentation

void CSCALCTDigi::clear ( void  )
int CSCALCTDigi::getAccelerator ( ) const
inline
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 42 of file CSCALCTDigi.h.

References patternb_.

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

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

return 12-bit full BX.

Definition at line 57 of file CSCALCTDigi.h.

References fullbx_.

Referenced by CSCAnodeLCTProcessor::lctSearch().

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

return track number (1,2)

Definition at line 51 of file CSCALCTDigi.h.

References trknmb_.

Referenced by operator<<().

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

True if the preceding one is false.

Definition at line 76 of file CSCALCTDigi.cc.

76  {
77  // True if == is false.
78  bool returnValue = true;
79  if ((*this) == rhs) returnValue = false;
80  return returnValue;
81 }
bool CSCALCTDigi::operator== ( const CSCALCTDigi rhs) const

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

Definition at line 64 of file CSCALCTDigi.cc.

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

64  {
65  // Exact equality.
66  bool returnValue = false;
67  if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() &&
68  getAccelerator() == rhs.getAccelerator() &&
69  getCollisionB() == rhs.getCollisionB() &&
70  getKeyWG() == rhs.getKeyWG() && getBX() == rhs.getBX()) {
71  returnValue = true;
72  }
73  return returnValue;
74 }
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:48
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:33
int getAccelerator() const
Definition: CSCALCTDigi.h:37
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:45
int getCollisionB() const
Definition: CSCALCTDigi.h:42
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 46 of file CSCALCTDigi.cc.

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

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

Print content of digi.

Debug.

Definition at line 84 of file CSCALCTDigi.cc.

84  {
85  if (isValid()) {
86  edm::LogVerbatim("CSCDigi")
87  << "CSC ALCT #" << setw(1) << getTrknmb()
88  << ": Valid = " << setw(1) << isValid()
89  << " Quality = " << setw(2) << getQuality()
90  << " Accel. = " << setw(1) << getAccelerator()
91  << " PatternB = " << setw(1) << getCollisionB()
92  << " Key wire group = " << setw(3) << getKeyWG()
93  << " BX = " << setw(2) << getBX()
94  << " Full BX= " << std::setw(1) << getFullBX();
95  }
96  else {
97  edm::LogVerbatim("CSCDigi") << "Not a valid Anode LCT.";
98  }
99 }
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
int getFullBX() const
return 12-bit full BX.
Definition: CSCALCTDigi.h:57
int getTrknmb() const
return track number (1,2)
Definition: CSCALCTDigi.h:51
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:48
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:33
int getAccelerator() const
Definition: CSCALCTDigi.h:37
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:45
int getCollisionB() const
Definition: CSCALCTDigi.h:42
void CSCALCTDigi::setFullBX ( const uint16_t  fullbx)
inline

Set 12-bit full BX.

Definition at line 60 of file CSCALCTDigi.h.

References fullbx_.

Referenced by CSCAnodeLCTProcessor::lctSearch().

60 {fullbx_ = fullbx;}
uint16_t fullbx_
Definition: CSCALCTDigi.h:87
void CSCALCTDigi::setTrknmb ( const uint16_t  number)
inline

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

Definition at line 54 of file CSCALCTDigi.h.

References contentValuesFiles::number, and trknmb_.

Referenced by CSCAnodeLCTProcessor::lctSearch().

54 {trknmb_ = number;}
uint16_t trknmb_
Definition: CSCALCTDigi.h:86
void CSCALCTDigi::setWireGroup ( unsigned int  wiregroup)
inline

set wiregroup number

Definition at line 76 of file CSCALCTDigi.h.

References keywire_.

76 {keywire_= wiregroup;}
uint16_t keywire_
Definition: CSCALCTDigi.h:84

Member Data Documentation

uint16_t CSCALCTDigi::accel_
private

Definition at line 82 of file CSCALCTDigi.h.

Referenced by getAccelerator().

uint16_t CSCALCTDigi::bx_
private

Definition at line 85 of file CSCALCTDigi.h.

Referenced by getBX().

uint16_t CSCALCTDigi::fullbx_
private

Definition at line 87 of file CSCALCTDigi.h.

Referenced by getFullBX(), and setFullBX().

uint16_t CSCALCTDigi::keywire_
private

Definition at line 84 of file CSCALCTDigi.h.

Referenced by getKeyWG(), and setWireGroup().

uint16_t CSCALCTDigi::patternb_
private

Definition at line 83 of file CSCALCTDigi.h.

Referenced by getCollisionB().

uint16_t CSCALCTDigi::quality_
private

Definition at line 81 of file CSCALCTDigi.h.

Referenced by getQuality().

uint16_t CSCALCTDigi::trknmb_
private

Definition at line 86 of file CSCALCTDigi.h.

Referenced by getTrknmb(), and setTrknmb().

uint16_t CSCALCTDigi::valid_
private

Definition at line 80 of file CSCALCTDigi.h.

Referenced by isValid().