CMS 3D CMS Logo

Public Member Functions | Private Attributes

CSCALCTDigi Class Reference

#include <CSCALCTDigi.h>

List of all members.

Public Member Functions

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

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.

Date:
2009/03/25 13:13:11
Revision:
1.13
Author:
N. Terentiev, CMU

Digi for ALCT trigger primitives.

Date:
2010/06/15 13:40:07
Revision:
1.13
Author:
N. Terentiev, CMU

Definition at line 17 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 19 of file CSCALCTDigi.cc.

References TrackValidation_HighPurity_cff::valid, and sistrip::valid_.

                                           {
  valid_    = valid;
  quality_  = quality;
  accel_    = accel;
  patternb_ = patternb;
  keywire_  = keywire;
  bx_       = bx;
  trknmb_   = trknmb;
}
CSCALCTDigi::CSCALCTDigi ( )

default

Default.

Definition at line 32 of file CSCALCTDigi.cc.

References hitfit::clear().

                         {
  clear(); // set contents to zero
}

Member Function Documentation

void CSCALCTDigi::clear ( void  )

clear this ALCT

Clears this ALCT.

Definition at line 37 of file CSCALCTDigi.cc.

References sistrip::valid_.

Referenced by CSCAnodeLCTProcessor::clear(), CSCAnodeLCTProcessor::lctSearch(), and L1Comparator::produce().

                        {
  valid_    = 0;
  quality_  = 0;
  accel_    = 0;
  patternb_ = 0;
  keywire_  = 0;
  bx_       = 0;
  trknmb_   = 0;
  fullbx_   = 0;
}
int CSCALCTDigi::getAccelerator ( ) const [inline]

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

Definition at line 39 of file CSCALCTDigi.h.

References accel_.

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

{return accel_ ;}
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 44 of file CSCALCTDigi.h.

References patternb_.

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

{return patternb_ ;}
int CSCALCTDigi::getFullBX ( ) const [inline]

return 12-bit full BX.

Definition at line 59 of file CSCALCTDigi.h.

References fullbx_.

{return fullbx_ ;}
int CSCALCTDigi::getKeyWG ( ) const [inline]
int CSCALCTDigi::getQuality ( ) const [inline]
int CSCALCTDigi::getTrknmb ( ) const [inline]

return track number (1,2)

Definition at line 53 of file CSCALCTDigi.h.

References trknmb_.

Referenced by operator<<().

{return trknmb_ ;}
bool CSCALCTDigi::isValid ( void  ) const [inline]
bool CSCALCTDigi::operator!= ( const CSCALCTDigi rhs) const

True if the preceding one is false.

Definition at line 78 of file CSCALCTDigi.cc.

                                                           {
  // True if == is false.
  bool returnValue = true;
  if ((*this) == rhs) returnValue = false;
  return returnValue;
}
bool CSCALCTDigi::operator== ( const CSCALCTDigi rhs) const

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

Definition at line 66 of file CSCALCTDigi.cc.

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

                                                           {
  // Exact equality.
  bool returnValue = false;
  if (isValid()        == rhs.isValid() && getQuality() == rhs.getQuality() &&
      getAccelerator() == rhs.getAccelerator() &&
      getCollisionB()  == rhs.getCollisionB()  &&
      getKeyWG()       == rhs.getKeyWG()       && getBX() == rhs.getBX()) {
    returnValue = true;
  }
  return returnValue;
}
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 48 of file CSCALCTDigi.cc.

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

                                                          {
  bool returnValue = false;

  // Early ALCTs are always preferred to the ones found at later bx's.
  if (getBX()  < rhs.getBX()) {returnValue = true;}
  if (getBX() != rhs.getBX()) {return returnValue;}

  // The > operator then checks the quality of ALCTs.
  // If two qualities are equal, the ALCT furthest from the beam axis
  // (lowest eta, highest wire group number) is selected.
  int quality1 = getQuality();
  int quality2 = rhs.getQuality();
  if (quality1 > quality2) {returnValue = true;}
  else if (quality1 == quality2 && getKeyWG() > rhs.getKeyWG())
    {returnValue = true;}
  return returnValue;
}
void CSCALCTDigi::print ( void  ) const

Print content of digi.

Debug.

Definition at line 86 of file CSCALCTDigi.cc.

References gather_cfg::cout.

                              {
  if (isValid()) {
    std::cout << "CSC ALCT #"         << setw(1) << getTrknmb()
              << ": Valid = "         << setw(1) << isValid()
              << " Quality = "        << setw(2) << getQuality()
              << " Accel. = "         << setw(1) << getAccelerator()
              << " PatternB = "       << setw(1) << getCollisionB()
              << " Key wire group = " << setw(3) << getKeyWG()
              << " BX = "             << setw(2) << getBX()
              << " Full BX= "         << std::setw(1) << getFullBX() << std::endl;
  }
  else {
    std::cout << "Not a valid Anode LCT." << std::endl;
  }
}
void CSCALCTDigi::setFullBX ( const uint16_t  fullbx) [inline]

Set 12-bit full BX.

Definition at line 62 of file CSCALCTDigi.h.

References fullbx_.

{fullbx_ = fullbx;}
void CSCALCTDigi::setTrknmb ( const uint16_t  number) [inline]

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

Definition at line 56 of file CSCALCTDigi.h.

References trknmb_.

Referenced by CSCAnodeLCTProcessor::lctSearch().

{trknmb_ = number;}
void CSCALCTDigi::setWireGroup ( unsigned int  wiregroup) [inline]

set wiregroup number

Definition at line 78 of file CSCALCTDigi.h.

References keywire_.

{keywire_= wiregroup;}

Member Data Documentation

uint16_t CSCALCTDigi::accel_ [private]

Definition at line 84 of file CSCALCTDigi.h.

Referenced by getAccelerator().

uint16_t CSCALCTDigi::bx_ [private]

Definition at line 87 of file CSCALCTDigi.h.

Referenced by getBX().

uint16_t CSCALCTDigi::fullbx_ [private]

Definition at line 89 of file CSCALCTDigi.h.

Referenced by getFullBX(), and setFullBX().

uint16_t CSCALCTDigi::keywire_ [private]

Definition at line 86 of file CSCALCTDigi.h.

Referenced by getKeyWG(), and setWireGroup().

uint16_t CSCALCTDigi::patternb_ [private]

Definition at line 85 of file CSCALCTDigi.h.

Referenced by getCollisionB().

uint16_t CSCALCTDigi::quality_ [private]

Definition at line 83 of file CSCALCTDigi.h.

Referenced by getQuality().

uint16_t CSCALCTDigi::trknmb_ [private]

Definition at line 88 of file CSCALCTDigi.h.

Referenced by getTrknmb(), and setTrknmb().

uint16_t CSCALCTDigi::valid_ [private]

Definition at line 82 of file CSCALCTDigi.h.

Referenced by isValid().