Analysis for timing run using APV tick marks. More...
#include <ApvTimingAnalysis.h>
Public Member Functions | |
void | addErrorCode (const std::string &error) |
ApvTimingAnalysis (const uint32_t &key) | |
ApvTimingAnalysis () | |
const float & | base () const |
const float & | delay () const |
const float & | error () const |
bool | foundTickMark () const |
uint16_t | frameFindingThreshold () const |
const float & | height () const |
bool | isValid () const |
const float & | optimumSamplingPoint () const |
const float & | peak () const |
void | print (std::stringstream &, uint32_t not_used=0) |
const float & | refTime () const |
void | refTime (const float &time, const float &targetDelay=-1) |
void | reset () |
const float & | time () const |
virtual | ~ApvTimingAnalysis () |
Public Member Functions inherited from CommissioningAnalysis | |
CommissioningAnalysis (const uint32_t &key, const std::string &my_name) | |
CommissioningAnalysis (const std::string &my_name) | |
const uint32_t & | dcuId () const |
void | dcuId (const uint32_t &) |
const uint32_t & | detId () const |
void | detId (const uint32_t &) |
const uint32_t & | fecKey () const |
void | fecKey (const uint32_t &) |
const uint32_t & | fedKey () const |
void | fedKey (const uint32_t &) |
const VString & | getErrorCodes () const |
virtual void | header (std::stringstream &) const |
const std::string & | myName () const |
void | setErrorCodes (const VString &errors) |
virtual void | summary (std::stringstream &) const |
virtual | ~CommissioningAnalysis () |
Static Public Attributes | |
static const float | frameFindingThreshold_ = (2./3.) |
static const float | optimumSamplingPoint_ = 15. |
static const float | tickMarkHeightThreshold_ = 50. |
Private Attributes | |
float | base_ |
float | delay_ |
float | error_ |
float | height_ |
float | peak_ |
bool | synchronized_ |
float | time_ |
Static Private Attributes | |
static float | refTime_ = 1.*sistrip::invalid_ |
Friends | |
class | ApvTimingAlgorithm |
Additional Inherited Members | |
Public Types inherited from CommissioningAnalysis | |
typedef std::vector< float > | VFloat |
typedef std::vector< uint16_t > | VInt |
typedef std::vector< std::string > | VString |
typedef std::vector< VFloat > | VVFloat |
typedef std::vector< VInt > | VVInt |
Analysis for timing run using APV tick marks.
Definition at line 15 of file ApvTimingAnalysis.h.
ApvTimingAnalysis::ApvTimingAnalysis | ( | const uint32_t & | key | ) |
Definition at line 30 of file ApvTimingAnalysis.cc.
ApvTimingAnalysis::ApvTimingAnalysis | ( | ) |
Definition at line 43 of file ApvTimingAnalysis.cc.
|
inlinevirtual |
Definition at line 25 of file ApvTimingAnalysis.h.
|
inlinevirtual |
Adds error codes for analysis (overrides private base).
Reimplemented from CommissioningAnalysis.
Definition at line 129 of file ApvTimingAnalysis.h.
References CommissioningAnalysis::addErrorCode().
Referenced by ApvTimingAlgorithm::analyse(), and refTime().
|
inline |
Baseline level of tick mark [ADC].
Definition at line 127 of file ApvTimingAnalysis.h.
References base_.
Referenced by ApvTimingHistosUsingDb::create(), ApvTimingSummaryFactory::extract(), and ApvTimingHistosUsingDb::update().
|
inline |
Delay required to sync w.r.t. reference tick mark [ns].
Definition at line 125 of file ApvTimingAnalysis.h.
References delay_.
Referenced by ApvTimingHistosUsingDb::create(), ApvTimingSummaryFactory::extract(), and ApvTimingHistosUsingDb::update().
|
inline |
Error on time of tick mark rising edge [ns].
Definition at line 122 of file ApvTimingAnalysis.h.
References error_.
Referenced by argparse.ArgumentParser::_get_option_tuples(), python.rootplot.argparse.ArgumentParser::_get_option_tuples(), argparse.ArgumentParser::_parse_known_args(), python.rootplot.argparse.ArgumentParser::_parse_known_args(), argparse.ArgumentParser::_parse_optional(), python.rootplot.argparse.ArgumentParser::_parse_optional(), argparse.ArgumentParser::_read_args_from_files(), python.rootplot.argparse.ArgumentParser::_read_args_from_files(), argparse.ArgumentParser::add_subparsers(), python.rootplot.argparse.ArgumentParser::add_subparsers(), argparse.ArgumentParser::parse_args(), python.rootplot.argparse.ArgumentParser::parse_args(), argparse.ArgumentParser::parse_known_args(), and python.rootplot.argparse.ArgumentParser::parse_known_args().
bool ApvTimingAnalysis::foundTickMark | ( | ) | const |
Identifies if tick mark is found or not.
Definition at line 134 of file ApvTimingAnalysis.cc.
References base_, relativeConstraints::empty, frameFindingThreshold(), CommissioningAnalysis::getErrorCodes(), height_, peak_, time_, and sistrip::valid_.
Referenced by ApvTimingHistograms::histoAnalysis(), and print().
uint16_t ApvTimingAnalysis::frameFindingThreshold | ( | ) | const |
FED frame-finding threshold [ADC] (returns 65535 if invalid).
Definition at line 119 of file ApvTimingAnalysis.cc.
References base_, relativeConstraints::empty, frameFindingThreshold_, CommissioningAnalysis::getErrorCodes(), height_, sistrip::invalid_, peak_, tickMarkHeightThreshold_, time_, and sistrip::valid_.
Referenced by ApvTimingHistosUsingDb::create(), foundTickMark(), isValid(), print(), and ApvTimingHistosUsingDb::update().
|
inline |
Height of tick mark [ADC].
Definition at line 126 of file ApvTimingAnalysis.h.
References height_.
Referenced by Vispa.Main.MainWindow.MainWindow::_saveIni(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Gui.VispaWidget.VispaWidget::boundingRect(), Vispa.Gui.ConnectableWidget.ConnectableWidget::centerSinglePortVertically(), Vispa.Gui.VispaWidget.VispaWidget::contentRect(), ApvTimingHistosUsingDb::create(), Vispa.Gui.VispaWidget.VispaWidget::defineArrowBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget::defineCircleBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget::defineRoundRectBackgroundShape(), ApvTimingSummaryFactory::extract(), Vispa.Gui.VispaWidget.VispaWidget::imageRectF(), Vispa.Gui.VispaWidget.VispaWidget::paint(), Vispa.Gui.VispaWidget.VispaWidget::setZoom(), ApvTimingHistosUsingDb::update(), and Vispa.Main.MainWindow.MainWindow::updateStartupScreenGeometry().
|
virtual |
Identifies if analysis is valid or not.
Reimplemented from CommissioningAnalysis.
Definition at line 145 of file ApvTimingAnalysis.cc.
References base_, delay_, relativeConstraints::empty, frameFindingThreshold(), CommissioningAnalysis::getErrorCodes(), height_, peak_, refTime_, synchronized_, time_, and sistrip::valid_.
Referenced by ApvTimingHistosUsingDb::create(), ApvTimingHistograms::histoAnalysis(), print(), core.AutoHandle.AutoHandle::ReallyLoad(), and ApvTimingHistosUsingDb::update().
|
inline |
Optimum sampling point, defined w.r.t. rising edge [ns].
Definition at line 123 of file ApvTimingAnalysis.h.
References optimumSamplingPoint_.
Referenced by ApvTimingHistosUsingDb::create().
|
inline |
Level of tick mark top [ADC].
Definition at line 128 of file ApvTimingAnalysis.h.
References peak_.
Referenced by ApvTimingHistosUsingDb::create(), ApvTimingSummaryFactory::extract(), and ApvTimingHistosUsingDb::update().
|
virtual |
Prints analysis results.
Implements CommissioningAnalysis.
Definition at line 159 of file ApvTimingAnalysis.cc.
References base_, delay_, relativeConstraints::empty, foundTickMark(), frameFindingThreshold(), CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), height_, sistrip::invalid_, isValid(), optimumSamplingPoint_, peak_, refTime_, time_, and sistrip::valid_.
Referenced by ApvTimingHistosUsingDb::update().
|
inline |
Sampling point of "reference" tick mark [ns].
Definition at line 124 of file ApvTimingAnalysis.h.
References refTime_.
Referenced by ApvTimingHistosUsingDb::create(), ApvTimingSummaryFactory::extract(), and ApvTimingHistograms::histoAnalysis().
void ApvTimingAnalysis::refTime | ( | const float & | time, |
const float & | targetDelay = -1 |
||
) |
Static method to set global reference time [ns].
Definition at line 68 of file ApvTimingAnalysis.cc.
References addErrorCode(), delay_, sistrip::invalid_, sistrip::invalidDelayTime_, sistrip::invalidRefTime_, sistrip::mlCommissioning_, CommissioningAnalysis::myName(), optimumSamplingPoint_, position, refTime_, synchronized_, time(), time_, and sistrip::valid_.
|
virtual |
Resets analysis member data.
Implements CommissioningAnalysis.
Definition at line 56 of file ApvTimingAnalysis.cc.
References base_, delay_, error_, height_, sistrip::invalid_, peak_, synchronized_, and time_.
Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().
|
inline |
Time of tick mark rising edge [ns].
Definition at line 121 of file ApvTimingAnalysis.h.
References time_.
Referenced by ApvTimingHistosUsingDb::create(), ApvTimingSummaryFactory::extract(), ApvTimingHistograms::histoAnalysis(), and refTime().
|
friend |
Definition at line 27 of file ApvTimingAnalysis.h.
|
private |
Baseline level of tick mark [ADC].
Definition at line 109 of file ApvTimingAnalysis.h.
Referenced by ApvTimingAlgorithm::analyse(), base(), foundTickMark(), frameFindingThreshold(), isValid(), print(), and reset().
|
private |
|
private |
Error on time of tick mark rising edge [ns].
Definition at line 97 of file ApvTimingAnalysis.h.
|
static |
Threshold for FED frame finding (fraction of tick height).
Definition at line 87 of file ApvTimingAnalysis.h.
Referenced by frameFindingThreshold().
|
private |
Height of tick mark [ADC].
Definition at line 106 of file ApvTimingAnalysis.h.
Referenced by ApvTimingAlgorithm::analyse(), foundTickMark(), frameFindingThreshold(), height(), isValid(), print(), and reset().
|
static |
Optimum sampling point, defined w.r.t. rising edge [ns].
Definition at line 81 of file ApvTimingAnalysis.h.
Referenced by optimumSamplingPoint(), print(), and refTime().
|
private |
Level of tick mark top [ADC].
Definition at line 112 of file ApvTimingAnalysis.h.
Referenced by ApvTimingAlgorithm::analyse(), foundTickMark(), frameFindingThreshold(), isValid(), peak(), print(), and reset().
|
staticprivate |
Sampling point of "reference" tick mark [ns].
Definition at line 100 of file ApvTimingAnalysis.h.
|
private |
Checks synchronization to ref time is done only once.
Definition at line 115 of file ApvTimingAnalysis.h.
|
static |
Threshold defining minimum tick mark height [ADC].
Definition at line 84 of file ApvTimingAnalysis.h.
Referenced by ApvTimingAlgorithm::analyse(), ApvTimingHistosUsingDb::create(), and frameFindingThreshold().
|
private |
Time of tick mark rising edge [ns].
Definition at line 94 of file ApvTimingAnalysis.h.
Referenced by ApvTimingAlgorithm::analyse(), foundTickMark(), frameFindingThreshold(), isValid(), print(), refTime(), reset(), and time().