CMS 3D CMS Logo

FedTimingAnalysis.cc
Go to the documentation of this file.
5 #include <iostream>
6 #include <iomanip>
7 #include <cmath>
8 
9 using namespace sistrip;
10 
11 // ----------------------------------------------------------------------------
12 //
14  : CommissioningAnalysis(key, "FedTimingAnalysis"),
15  time_(sistrip::invalid_),
16  max_(sistrip::invalid_),
17  delay_(sistrip::invalid_),
18  error_(sistrip::invalid_),
19  base_(sistrip::invalid_),
20  peak_(sistrip::invalid_),
21  height_(sistrip::invalid_),
22  optimumSamplingPoint_(15.) {
23  ;
24 }
25 
26 // ----------------------------------------------------------------------------
27 //
29  : CommissioningAnalysis("FedTimingAnalysis"),
30  time_(sistrip::invalid_),
31  max_(sistrip::invalid_),
32  delay_(sistrip::invalid_),
33  error_(sistrip::invalid_),
34  base_(sistrip::invalid_),
35  peak_(sistrip::invalid_),
36  height_(sistrip::invalid_),
37  optimumSamplingPoint_(15.) {
38  ;
39 }
40 
41 // ----------------------------------------------------------------------------
42 //
51 }
52 
53 // ----------------------------------------------------------------------------
54 //
55 void FedTimingAnalysis::print(std::stringstream& ss, uint32_t not_used) {
56  header(ss);
57  ss << " Time of tick rising edge [ns] : " << time_ << "\n"
58  << " Maximum time (sampling point) [ns] : " << max_ << "\n"
59  << " Delay required wrt max time [ns] : " << delay_ << "\n"
60  << " Error on delay [ns] : " << error_ << "\n"
61  << " Baseline [adc] : " << base_ << "\n"
62  << " Tick peak [adc] : " << peak_ << "\n"
63  << " Tick height [adc] : " << height_ << "\n";
64 }
65 
66 // ----------------------------------------------------------------------------
67 //
68 void FedTimingAnalysis::max(const float& max) {
69  max_ = max;
70  if (time_ > sistrip::maximum_) {
71  return;
72  }
73  int32_t adjustment = 25 - static_cast<int32_t>(rint(max_ + optimumSamplingPoint_)) % 25;
74  max_ += adjustment;
75  delay_ = max_ - time_;
76 }
FedTimingAnalysis::delay_
float delay_
Definition: FedTimingAnalysis.h:54
MessageLogger.h
FedTimingAnalysis::print
void print(std::stringstream &, uint32_t not_used=0) override
Definition: FedTimingAnalysis.cc:55
FedTimingAnalysis::reset
void reset() override
Definition: FedTimingAnalysis.cc:43
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
FedTimingAnalysis.h
CommissioningAnalysis::header
virtual void header(std::stringstream &) const
Definition: CommissioningAnalysis.cc:33
FedTimingAnalysis::time_
float time_
Definition: FedTimingAnalysis.h:48
FedTimingAnalysis::height_
float height_
Definition: FedTimingAnalysis.h:66
FedTimingAnalysis::FedTimingAnalysis
FedTimingAnalysis()
Definition: FedTimingAnalysis.cc:28
FedTimingAnalysis::base_
float base_
Definition: FedTimingAnalysis.h:60
FedTimingAnalysis::peak_
float peak_
Definition: FedTimingAnalysis.h:63
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
sistrip::maximum_
static const uint16_t maximum_
Definition: Constants.h:20
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
CommissioningAnalysis
Abstract base for derived classes that provide analysis of commissioning histograms.
Definition: CommissioningAnalysis.h:18
FedTimingAnalysis::optimumSamplingPoint_
float optimumSamplingPoint_
Definition: FedTimingAnalysis.h:69
FedTimingAnalysis::max
const float & max() const
Definition: FedTimingAnalysis.h:73
SiStripEnumsAndStrings.h
SiStripHistoTitle.h
sistrip
sistrip classes
Definition: SiStripQualityHelpers.h:14
crabWrapper.key
key
Definition: crabWrapper.py:19
FedTimingAnalysis::max_
float max_
Definition: FedTimingAnalysis.h:51
FedTimingAnalysis::error_
float error_
Definition: FedTimingAnalysis.h:57