#include <CSCComparatorDigi.h>
Public Member Functions | |
CSCComparatorDigi (int strip, int comparator, int timeBinWord) | |
Construct from the strip number and the ADC readings. More... | |
CSCComparatorDigi () | |
comparator here can be either 0 or 1 for left or right halfstrip of given strip More... | |
int | getCFEB () const |
Get the CFEB number. Counts from 0. More... | |
int | getComparator () const |
Get Comparator readings. Can be 0 or 1. More... | |
int | getDiStrip () const |
Get the distrip number. Counts from 0. More... | |
float | getFractionalStrip () const |
Return the fractional half-strip. Counts from 0.25. More... | |
int | getHalfStrip () const |
Get the associated halfstrip number for this comparator digi. Counts from 0. More... | |
int | getStrip () const |
Get the strip number. Counts from 1. More... | |
int | getTimeBin () const |
Return bin number of first time bin which is ON. Counts from 0. More... | |
std::vector< int > | getTimeBinsOn () const |
int | getTimeBinWord () const |
Return the word with each bit corresponding to a time bin. More... | |
bool | operator< (const CSCComparatorDigi &digi) const |
sort by time first, then by strip More... | |
bool | operator== (const CSCComparatorDigi &digi) const |
Digis are equal if they are on the same strip and have same Comparator data. More... | |
void | print () const |
Print content of digi. More... | |
void | setComparator (int comparator) |
Set Comparator data. More... | |
void | setStrip (int strip) |
Set the strip number. More... | |
Private Attributes | |
uint16_t | comparator_ |
uint16_t | strip_ |
uint16_t | timeBinWord_ |
Digi for CSC Comparators.
Definition at line 16 of file CSCComparatorDigi.h.
CSCComparatorDigi::CSCComparatorDigi | ( | int | strip, |
int | comparator, | ||
int | timeBinWord | ||
) |
Construct from the strip number and the ADC readings.
Definition at line 16 of file CSCComparatorDigi.cc.
CSCComparatorDigi::CSCComparatorDigi | ( | ) |
comparator here can be either 0 or 1 for left or right halfstrip of given strip
Default construction.
Definition at line 19 of file CSCComparatorDigi.cc.
int CSCComparatorDigi::getCFEB | ( | ) | const |
Get the CFEB number. Counts from 0.
Definition at line 71 of file CSCComparatorDigi.cc.
References CSCConstants::NUM_STRIPS_PER_CFEB, and strip_.
Referenced by CSCComparatorData::add().
|
inline |
Get Comparator readings. Can be 0 or 1.
Definition at line 41 of file CSCComparatorDigi.h.
References comparator_.
Referenced by CSCComparatorData::add(), getFractionalStrip(), getHalfStrip(), operator<<(), operator==(), and print().
int CSCComparatorDigi::getDiStrip | ( | ) | const |
Get the distrip number. Counts from 0.
Definition at line 67 of file CSCComparatorDigi.cc.
References CSCConstants::NUM_STRIPS_PER_CFEB, and strip_.
Referenced by CSCComparatorData::add().
float CSCComparatorDigi::getFractionalStrip | ( | ) | const |
Return the fractional half-strip. Counts from 0.25.
Definition at line 79 of file CSCComparatorDigi.cc.
References getComparator(), and getStrip().
int CSCComparatorDigi::getHalfStrip | ( | ) | const |
Get the associated halfstrip number for this comparator digi. Counts from 0.
Definition at line 76 of file CSCComparatorDigi.cc.
References getComparator(), and getStrip().
Referenced by CSCComparatorData::add().
|
inline |
Get the strip number. Counts from 1.
Definition at line 35 of file CSCComparatorDigi.h.
References strip_.
Referenced by CSCComparatorData::add(), getFractionalStrip(), getHalfStrip(), operator<(), operator<<(), operator==(), and print().
int CSCComparatorDigi::getTimeBin | ( | ) | const |
Return bin number of first time bin which is ON. Counts from 0.
Definition at line 51 of file CSCComparatorDigi.cc.
References mps_fire::i, and timeBinWord_.
Referenced by operator<(), operator<<(), and print().
std::vector< int > CSCComparatorDigi::getTimeBinsOn | ( | ) | const |
Return vector of the bin numbers for which time bins are ON. e.g. if bits 0 and 13 fired, then this vector will contain the values 0 and 13
Definition at line 81 of file CSCComparatorDigi.cc.
References mps_fire::i, and timeBinWord_.
Referenced by CSCComparatorData::add(), operator<<(), and print().
|
inline |
Return the word with each bit corresponding to a time bin.
Definition at line 44 of file CSCComparatorDigi.h.
References timeBinWord_.
Referenced by operator==().
bool CSCComparatorDigi::operator< | ( | const CSCComparatorDigi & | digi | ) | const |
sort by time first, then by strip
Definition at line 41 of file CSCComparatorDigi.cc.
References getStrip(), getTimeBin(), and mps_fire::result.
bool CSCComparatorDigi::operator== | ( | const CSCComparatorDigi & | digi | ) | const |
Digis are equal if they are on the same strip and have same Comparator data.
Definition at line 23 of file CSCComparatorDigi.cc.
References getComparator(), getStrip(), and getTimeBinWord().
void CSCComparatorDigi::print | ( | void | ) | const |
Print content of digi.
Definition at line 103 of file CSCComparatorDigi.cc.
References filterCSVwithJSON::copy, getComparator(), getStrip(), getTimeBin(), and getTimeBinsOn().
void CSCComparatorDigi::setComparator | ( | int | comparator | ) |
void CSCComparatorDigi::setStrip | ( | int | strip | ) |
Set the strip number.
Definition at line 98 of file CSCComparatorDigi.cc.
References nano_mu_digi_cff::strip, and strip_.
|
private |
Definition at line 71 of file CSCComparatorDigi.h.
Referenced by getComparator(), and setComparator().
|
private |
Definition at line 70 of file CSCComparatorDigi.h.
Referenced by getCFEB(), getDiStrip(), getStrip(), and setStrip().
|
private |
Definition at line 72 of file CSCComparatorDigi.h.
Referenced by getTimeBin(), getTimeBinsOn(), and getTimeBinWord().