CMS 3D CMS Logo

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

#include <CSCALCTPreTriggerDigi.h>

Public Member Functions

void clear ()
 clear this ALCT More...
 
 CSCALCTPreTriggerDigi ()
 default More...
 
 CSCALCTPreTriggerDigi (const int valid, const int quality, const int accel, const int patternb, const int keywire, const int bx, const int trknmb=0)
 Constructors. 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 CSCALCTPreTriggerDigi &) const
 True if the preceding one is false. More...
 
bool operator== (const CSCALCTPreTriggerDigi &) const
 True if all members (except the number) of both ALCTs are equal. More...
 
bool operator> (const CSCALCTPreTriggerDigi &) 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

Pre-trigger Digi for ALCT trigger primitives.

Definition at line 13 of file CSCALCTPreTriggerDigi.h.

Constructor & Destructor Documentation

◆ CSCALCTPreTriggerDigi() [1/2]

CSCALCTPreTriggerDigi::CSCALCTPreTriggerDigi ( 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 9 of file CSCALCTPreTriggerDigi.cc.

15  {
16  valid_ = valid;
17  quality_ = quality;
18  accel_ = accel;
19  patternb_ = patternb;
20  keywire_ = keywire;
21  bx_ = bx;
22  trknmb_ = trknmb;
23 }

References simKBmtfDigis_cfi::bx, qcdUeDQM_cfi::quality, validateGeometry_cfg::valid, and sistrip::valid_.

◆ CSCALCTPreTriggerDigi() [2/2]

CSCALCTPreTriggerDigi::CSCALCTPreTriggerDigi ( )

default

Default.

Definition at line 26 of file CSCALCTPreTriggerDigi.cc.

26  {
27  clear(); // set contents to zero
28 }

References clear().

Member Function Documentation

◆ clear()

void CSCALCTPreTriggerDigi::clear ( void  )

clear this ALCT

Clears this ALCT.

Definition at line 31 of file CSCALCTPreTriggerDigi.cc.

31  {
32  valid_ = 0;
33  quality_ = 0;
34  accel_ = 0;
35  patternb_ = 0;
36  keywire_ = 0;
37  bx_ = 0;
38  trknmb_ = 0;
39  fullbx_ = 0;
40 }

References sistrip::valid_.

Referenced by BeautifulSoup.Tag::setString().

◆ getAccelerator()

int CSCALCTPreTriggerDigi::getAccelerator ( ) const
inline

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

Definition at line 43 of file CSCALCTPreTriggerDigi.h.

43 { return accel_; }

References accel_.

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

◆ getBX()

int CSCALCTPreTriggerDigi::getBX ( ) const
inline

return BX - five low bits of BXN counter tagged by the ALCT

Definition at line 63 of file CSCALCTPreTriggerDigi.h.

63 { return bx_; }

References bx_.

Referenced by operator<<(), operator==(), and operator>().

◆ getCollisionB()

int CSCALCTPreTriggerDigi::getCollisionB ( ) const
inline

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

Definition at line 51 of file CSCALCTPreTriggerDigi.h.

51 { return patternb_; }

References patternb_.

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

◆ getFullBX()

int CSCALCTPreTriggerDigi::getFullBX ( ) const
inline

return 12-bit full BX.

Definition at line 75 of file CSCALCTPreTriggerDigi.h.

75 { return fullbx_; }

References fullbx_.

◆ getKeyWG()

int CSCALCTPreTriggerDigi::getKeyWG ( ) const
inline

return key wire group

Definition at line 57 of file CSCALCTPreTriggerDigi.h.

57 { return keywire_; }

References keywire_.

Referenced by operator<<(), operator==(), and operator>().

◆ getQuality()

int CSCALCTPreTriggerDigi::getQuality ( ) const
inline

return quality of a pattern

Definition at line 36 of file CSCALCTPreTriggerDigi.h.

36 { return quality_; }

References quality_.

Referenced by operator<<(), operator==(), and operator>().

◆ getTrknmb()

int CSCALCTPreTriggerDigi::getTrknmb ( ) const
inline

return track number (1,2)

Definition at line 69 of file CSCALCTPreTriggerDigi.h.

69 { return trknmb_; }

References trknmb_.

Referenced by operator<<().

◆ isValid()

bool CSCALCTPreTriggerDigi::isValid ( void  ) const
inline

check ALCT validity (1 - valid ALCT)

Definition at line 30 of file CSCALCTPreTriggerDigi.h.

30 { return valid_; }

References valid_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), operator<<(), operator==(), and core.AutoHandle.AutoHandle::ReallyLoad().

◆ operator!=()

bool CSCALCTPreTriggerDigi::operator!= ( const CSCALCTPreTriggerDigi rhs) const

True if the preceding one is false.

Definition at line 76 of file CSCALCTPreTriggerDigi.cc.

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

◆ operator==()

bool CSCALCTPreTriggerDigi::operator== ( const CSCALCTPreTriggerDigi rhs) const

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

Definition at line 66 of file CSCALCTPreTriggerDigi.cc.

66  {
67  // Exact equality.
68  bool returnValue = false;
69  if (isValid() == rhs.isValid() && getQuality() == rhs.getQuality() && getAccelerator() == rhs.getAccelerator() &&
70  getCollisionB() == rhs.getCollisionB() && getKeyWG() == rhs.getKeyWG() && getBX() == rhs.getBX()) {
71  returnValue = true;
72  }
73  return returnValue;
74 }

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

◆ operator>()

bool CSCALCTPreTriggerDigi::operator> ( const CSCALCTPreTriggerDigi 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 42 of file CSCALCTPreTriggerDigi.cc.

42  {
43  bool returnValue = false;
44 
45  // Early ALCTs are always preferred to the ones found at later bx's.
46  if (getBX() < rhs.getBX()) {
47  returnValue = true;
48  }
49  if (getBX() != rhs.getBX()) {
50  return returnValue;
51  }
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) {
59  returnValue = true;
60  } else if (quality1 == quality2 && getKeyWG() > rhs.getKeyWG()) {
61  returnValue = true;
62  }
63  return returnValue;
64 }

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

◆ print()

void CSCALCTPreTriggerDigi::print ( void  ) const

Print content of digi.

Debug.

Definition at line 85 of file CSCALCTPreTriggerDigi.cc.

85  {
86  if (isValid()) {
87  edm::LogVerbatim("CSCDigi") << "CSC ALCT #" << setw(1) << getTrknmb() << ": Valid = " << setw(1) << isValid()
88  << " Quality = " << setw(2) << getQuality() << " Accel. = " << setw(1)
89  << getAccelerator() << " PatternB = " << setw(1) << getCollisionB()
90  << " Key wire group = " << setw(3) << getKeyWG() << " BX = " << setw(2) << getBX()
91  << " Full BX= " << std::setw(1) << getFullBX();
92  } else {
93  edm::LogVerbatim("CSCDigi") << "Not a valid Anode LCT.";
94  }
95 }

◆ setAccelerator()

void CSCALCTPreTriggerDigi::setAccelerator ( const int  accelerator)
inline

set accelerator bit

Definition at line 46 of file CSCALCTPreTriggerDigi.h.

46 { accel_ = accelerator; }

References accel_.

◆ setBX()

void CSCALCTPreTriggerDigi::setBX ( const int  BX)
inline

set BX

Definition at line 66 of file CSCALCTPreTriggerDigi.h.

66 { bx_ = BX; }

References L1TStage2uGTEmulatorClient_cff::BX, and bx_.

◆ setCollisionB()

void CSCALCTPreTriggerDigi::setCollisionB ( const int  collision)
inline

set Collision Pattern B bit

Definition at line 54 of file CSCALCTPreTriggerDigi.h.

54 { patternb_ = collision; }

References patternb_.

◆ setFullBX()

void CSCALCTPreTriggerDigi::setFullBX ( const uint16_t  fullbx)
inline

Set 12-bit full BX.

Definition at line 78 of file CSCALCTPreTriggerDigi.h.

78 { fullbx_ = fullbx; }

References fullbx_.

◆ setKeyWG()

void CSCALCTPreTriggerDigi::setKeyWG ( const int  keyWG)
inline

set key wire group

Definition at line 60 of file CSCALCTPreTriggerDigi.h.

60 { keywire_ = keyWG; }

References keywire_.

◆ setQuality()

void CSCALCTPreTriggerDigi::setQuality ( const int  quality)
inline

set quality

Definition at line 39 of file CSCALCTPreTriggerDigi.h.

39 { quality_ = quality; }

References qcdUeDQM_cfi::quality, and quality_.

◆ setTrknmb()

void CSCALCTPreTriggerDigi::setTrknmb ( const uint16_t  number)
inline

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

Definition at line 72 of file CSCALCTPreTriggerDigi.h.

72 { trknmb_ = number; }

References contentValuesFiles::number, and trknmb_.

◆ setValid()

void CSCALCTPreTriggerDigi::setValid ( const int  valid)
inline

set valid

Definition at line 33 of file CSCALCTPreTriggerDigi.h.

33 { valid_ = valid; }

References validateGeometry_cfg::valid, and valid_.

◆ setWireGroup()

void CSCALCTPreTriggerDigi::setWireGroup ( unsigned int  wiregroup)
inline

set wiregroup number

Definition at line 94 of file CSCALCTPreTriggerDigi.h.

94 { keywire_ = wiregroup; }

References keywire_.

Member Data Documentation

◆ accel_

uint16_t CSCALCTPreTriggerDigi::accel_
private

Definition at line 99 of file CSCALCTPreTriggerDigi.h.

Referenced by getAccelerator(), and setAccelerator().

◆ bx_

uint16_t CSCALCTPreTriggerDigi::bx_
private

Definition at line 102 of file CSCALCTPreTriggerDigi.h.

Referenced by getBX(), and setBX().

◆ fullbx_

uint16_t CSCALCTPreTriggerDigi::fullbx_
private

Definition at line 104 of file CSCALCTPreTriggerDigi.h.

Referenced by getFullBX(), and setFullBX().

◆ keywire_

uint16_t CSCALCTPreTriggerDigi::keywire_
private

Definition at line 101 of file CSCALCTPreTriggerDigi.h.

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

◆ patternb_

uint16_t CSCALCTPreTriggerDigi::patternb_
private

Definition at line 100 of file CSCALCTPreTriggerDigi.h.

Referenced by getCollisionB(), and setCollisionB().

◆ quality_

uint16_t CSCALCTPreTriggerDigi::quality_
private

Definition at line 98 of file CSCALCTPreTriggerDigi.h.

Referenced by getQuality(), and setQuality().

◆ trknmb_

uint16_t CSCALCTPreTriggerDigi::trknmb_
private

Definition at line 103 of file CSCALCTPreTriggerDigi.h.

Referenced by getTrknmb(), and setTrknmb().

◆ valid_

uint16_t CSCALCTPreTriggerDigi::valid_
private

Definition at line 97 of file CSCALCTPreTriggerDigi.h.

Referenced by isValid(), and setValid().

CSCALCTPreTriggerDigi::getFullBX
int getFullBX() const
return 12-bit full BX.
Definition: CSCALCTPreTriggerDigi.h:75
CSCALCTPreTriggerDigi::fullbx_
uint16_t fullbx_
Definition: CSCALCTPreTriggerDigi.h:104
CSCALCTPreTriggerDigi::getKeyWG
int getKeyWG() const
return key wire group
Definition: CSCALCTPreTriggerDigi.h:57
CSCALCTPreTriggerDigi::getBX
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTPreTriggerDigi.h:63
validateGeometry_cfg.valid
valid
Definition: validateGeometry_cfg.py:21
CSCALCTPreTriggerDigi::accel_
uint16_t accel_
Definition: CSCALCTPreTriggerDigi.h:99
simKBmtfDigis_cfi.bx
bx
Definition: simKBmtfDigis_cfi.py:55
CSCALCTPreTriggerDigi::getAccelerator
int getAccelerator() const
Definition: CSCALCTPreTriggerDigi.h:43
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
CSCALCTPreTriggerDigi::valid_
uint16_t valid_
Definition: CSCALCTPreTriggerDigi.h:97
CSCALCTPreTriggerDigi::trknmb_
uint16_t trknmb_
Definition: CSCALCTPreTriggerDigi.h:103
CSCALCTPreTriggerDigi::getQuality
int getQuality() const
return quality of a pattern
Definition: CSCALCTPreTriggerDigi.h:36
CSCALCTPreTriggerDigi::keywire_
uint16_t keywire_
Definition: CSCALCTPreTriggerDigi.h:101
edm::LogVerbatim
Definition: MessageLogger.h:297
CSCALCTPreTriggerDigi::isValid
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTPreTriggerDigi.h:30
CSCALCTPreTriggerDigi::bx_
uint16_t bx_
Definition: CSCALCTPreTriggerDigi.h:102
CSCALCTPreTriggerDigi::getCollisionB
int getCollisionB() const
Definition: CSCALCTPreTriggerDigi.h:51
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
CSCALCTPreTriggerDigi::quality_
uint16_t quality_
Definition: CSCALCTPreTriggerDigi.h:98
CSCALCTPreTriggerDigi::clear
void clear()
clear this ALCT
Definition: CSCALCTPreTriggerDigi.cc:31
L1TStage2uGTEmulatorClient_cff.BX
BX
Definition: L1TStage2uGTEmulatorClient_cff.py:9
CSCALCTPreTriggerDigi::getTrknmb
int getTrknmb() const
return track number (1,2)
Definition: CSCALCTPreTriggerDigi.h:69
CSCALCTPreTriggerDigi::patternb_
uint16_t patternb_
Definition: CSCALCTPreTriggerDigi.h:100