#include <CSCStripDigi.h>
Public Member Functions | |
float | amplitude () const |
CSCStripDigi (const int &strip, const std::vector< int > &ADCCounts) | |
CSCStripDigi (const int &strip, const std::vector< int > &ADCCounts, const std::vector< uint16_t > &ADCOverflow, const std::vector< uint16_t > &Overlap, const std::vector< uint16_t > &Errorstat) | |
CSCStripDigi () | |
std::vector< int > | getADCCounts () const |
Get ADC readings. | |
std::vector< uint16_t > | getADCOverflow () const |
Other getters. | |
std::vector< uint16_t > | getErrorstat () const |
std::vector< int > | getL1APhase () const |
Get L1APhase from OverlappedSample (9th bit) | |
std::vector< uint16_t > | getOverlappedSample () const |
int | getStrip () const |
bool | operator== (const CSCStripDigi &digi) const |
float | pedestal () const |
methods for calibrations | |
void | print () const |
void | setADCCounts (const std::vector< int > &ADCCounts) |
void | setStrip (int istrip) |
Private Attributes | |
std::vector< int > | ADCCounts |
std::vector< uint16_t > | ADCOverflow |
std::vector< uint16_t > | Errorstat |
std::vector< uint16_t > | OverlappedSample |
uint16_t | strip |
Digi for CSC Cathode Strips.
Definition at line 19 of file CSCStripDigi.h.
CSCStripDigi::CSCStripDigi | ( | const int & | strip, |
const std::vector< int > & | ADCCounts, | ||
const std::vector< uint16_t > & | ADCOverflow, | ||
const std::vector< uint16_t > & | Overlap, | ||
const std::vector< uint16_t > & | Errorstat | ||
) |
Definition at line 13 of file CSCStripDigi.cc.
: strip(istrip), ADCCounts(vADCCounts), ADCOverflow(vADCOverflow), OverlappedSample(vOverlap), Errorstat(vErrorstat) { }
CSCStripDigi::CSCStripDigi | ( | const int & | strip, |
const std::vector< int > & | ADCCounts | ||
) |
Definition at line 22 of file CSCStripDigi.cc.
: strip(istrip), ADCCounts(vADCCounts), ADCOverflow(8,0), OverlappedSample(8,0), Errorstat(8,0) { }
CSCStripDigi::CSCStripDigi | ( | ) |
Definition at line 32 of file CSCStripDigi.cc.
: strip(0), ADCCounts(8,0), ADCOverflow(8,0), OverlappedSample(8,0), Errorstat(8,0) { }
float CSCStripDigi::amplitude | ( | ) | const [inline] |
Definition at line 63 of file CSCStripDigi.h.
References pedestal().
std::vector< int > CSCStripDigi::getADCCounts | ( | ) | const |
Get ADC readings.
Definition at line 41 of file CSCStripDigi.cc.
References ADCCounts.
Referenced by CSCCFEBData::add(), CSCEventData::add(), CSCStripElectronicsSim::doSaturation(), CSCStripDigiValidation::fillPedestalPlots(), CSCStripDigiValidation::fillSignalPlots(), operator<<(), operator==(), and print().
{ return ADCCounts; }
std::vector<uint16_t> CSCStripDigi::getADCOverflow | ( | ) | const [inline] |
Other getters.
Definition at line 48 of file CSCStripDigi.h.
References ADCOverflow.
Referenced by print().
{return ADCOverflow;}
std::vector<uint16_t> CSCStripDigi::getErrorstat | ( | ) | const [inline] |
std::vector< int > CSCStripDigi::getL1APhase | ( | ) | const |
Get L1APhase from OverlappedSample (9th bit)
Get L1A Phase.
Definition at line 45 of file CSCStripDigi.cc.
References getOverlappedSample(), and i.
Referenced by print().
{ std::vector<int> L1APhaseResult; for (int i=0; i<(int)getOverlappedSample().size(); i++) { L1APhaseResult.push_back((getOverlappedSample()[i]>>8) & 0x1);} return L1APhaseResult; }
std::vector<uint16_t> CSCStripDigi::getOverlappedSample | ( | ) | const [inline] |
Definition at line 49 of file CSCStripDigi.h.
References OverlappedSample.
Referenced by getL1APhase(), and print().
{return OverlappedSample;}
int CSCStripDigi::getStrip | ( | ) | const [inline] |
Definition at line 39 of file CSCStripDigi.h.
References strip.
Referenced by CSCCFEBData::add(), CSCEventData::add(), CSCDigiToRaw::add(), MuonTruth::analyze(), operator<<(), operator==(), and print().
{ return strip;}
bool CSCStripDigi::operator== | ( | const CSCStripDigi & | digi | ) | const |
Definition at line 54 of file CSCStripDigi.cc.
References getADCCounts(), and getStrip().
{ if ( getStrip() != digi.getStrip() ) return false; if ( getADCCounts().size() != digi.getADCCounts().size() ) return false; if ( getADCCounts() != digi.getADCCounts() ) return false; return true; }
float CSCStripDigi::pedestal | ( | ) | const [inline] |
void CSCStripDigi::print | ( | void | ) | const |
Definition at line 87 of file CSCStripDigi.cc.
References gather_cfg::cout, getADCCounts(), getADCOverflow(), getL1APhase(), getOverlappedSample(), getStrip(), and i.
{ std::cout << "CSC Strip: " << getStrip() << " ADC Counts: "; for (int i=0; i<(int)getADCCounts().size(); i++) {std::cout << getADCCounts()[i] << " ";} std::cout << "\n"; std::cout << " " << " ADCOverflow: "; for (int i=0; i<(int)getADCOverflow().size(); i++) {std::cout << getADCOverflow()[i] << " ";} std::cout << "\n"; std::cout << " " << " OverflappedSample: "; for (int i=0; i<(int)getOverlappedSample().size(); i++) { //if(getOverlappedSample()[i]!=1) std::cout << getOverlappedSample()[i] << " ";} std::cout << "\n"; std::cout << " " << " L1APhases: "; for(int i=0; i<(int)getL1APhase().size(); i++){ std::cout << getL1APhase()[i] << " "; } std::cout << "\n"; }
void CSCStripDigi::setADCCounts | ( | const std::vector< int > & | ADCCounts | ) |
Definition at line 72 of file CSCStripDigi.cc.
Referenced by CSCStripElectronicsSim::doSaturation().
void CSCStripDigi::setStrip | ( | int | istrip | ) | [inline] |
Definition at line 53 of file CSCStripDigi.h.
Referenced by CSCDigiToRaw::add().
{ strip = istrip; }
std::vector<int> CSCStripDigi::ADCCounts [private] |
Definition at line 68 of file CSCStripDigi.h.
Referenced by getADCCounts(), and setADCCounts().
std::vector<uint16_t> CSCStripDigi::ADCOverflow [private] |
Definition at line 69 of file CSCStripDigi.h.
Referenced by getADCOverflow().
std::vector<uint16_t> CSCStripDigi::Errorstat [private] |
Definition at line 71 of file CSCStripDigi.h.
Referenced by getErrorstat().
std::vector<uint16_t> CSCStripDigi::OverlappedSample [private] |
Definition at line 70 of file CSCStripDigi.h.
Referenced by getOverlappedSample().
uint16_t CSCStripDigi::strip [private] |
Definition at line 67 of file CSCStripDigi.h.
Referenced by getStrip().