#include <MTDShapeBase.h>
|
typedef std::vector< double > | DVec |
|
|
double | linear_interpolation (const double &y, const double &x1, const double &x2, const double &y1, const double &y2) const |
|
Definition at line 9 of file MTDShapeBase.h.
MTDShapeBase::MTDShapeBase |
( |
| ) |
|
Definition at line 6 of file MTDShapeBase.cc.
const double qNSecPerBin_
static constexpr unsigned int kNBinsPerNSec
static constexpr unsigned int k1NSecBinsTotal
std::vector< double > DVec
MTDShapeBase::~MTDShapeBase |
( |
| ) |
|
|
override |
void MTDShapeBase::buildMe |
( |
| ) |
|
|
protected |
virtual void MTDShapeBase::fillShape |
( |
DVec & |
aVec | ) |
const |
|
protectedpure virtual |
unsigned int MTDShapeBase::indexOfMax |
( |
| ) |
const |
double MTDShapeBase::linear_interpolation |
( |
const double & |
y, |
|
|
const double & |
x1, |
|
|
const double & |
x2, |
|
|
const double & |
y1, |
|
|
const double & |
y2 |
|
) |
| const |
|
private |
Definition at line 104 of file MTDShapeBase.cc.
References a, b, and Exception.
Referenced by timeAtThr().
107 throw cms::Exception(
"BadValue") <<
" MTDShapeBase: Trying to interpolate two points with the same x coordinate!";
109 double a = (y2 - y1) / (x2 - x1);
110 double b = y1 - a * x1;
double MTDShapeBase::operator() |
( |
double |
aTime | ) |
const |
|
overridevirtual |
std::array< float, 3 > MTDShapeBase::timeAtThr |
( |
const float |
scale, |
|
|
const float |
threshold1, |
|
|
const float |
threshold2 |
|
) |
| const |
Definition at line 9 of file MTDShapeBase.cc.
References mps_fire::i, indexOfMax_, linear_interpolation(), qNSecPerBin_, pileupReCalc_HLTpaths::scale, and shape_.
Referenced by BTLElectronicsSim::run().
10 std::array<float, 3> times_tmp = {{0., 0., 0.}};
18 unsigned int index_LT1 = 0;
19 unsigned int index_LT2 = 0;
24 if (amplitude > threshold1 && index_LT1 == 0)
27 if (amplitude > threshold2 && index_LT2 == 0) {
34 unsigned int index_FT1 = 0;
39 if (amplitude > threshold1 && index_FT1 == 0) {
49 shape_[index_LT1 - 1] * scale,
50 shape_[index_LT1] * scale);
56 shape_[index_LT2 - 1] * scale,
57 shape_[index_LT2] * scale);
63 shape_[index_FT1 - 1] * scale,
64 shape_[index_FT1] * scale);
const double qNSecPerBin_
double linear_interpolation(const double &y, const double &x1, const double &x2, const double &y1, const double &y2) const
unsigned int MTDShapeBase::timeIndex |
( |
double |
aTime | ) |
const |
|
protected |
double MTDShapeBase::timeOfMax |
( |
| ) |
const |
double MTDShapeBase::timeToRise |
( |
| ) |
const |
|
inlineoverridevirtual |
unsigned int MTDShapeBase::indexOfMax_ |
|
private |
constexpr unsigned int MTDShapeBase::kNBinsPerNSec = 100 |
|
static |
constexpr unsigned int MTDShapeBase::kReadoutTimeInterval = 28 |
|
static |
const double MTDShapeBase::qNSecPerBin_ |
|
private |
DVec MTDShapeBase::shape_ |
|
private |
double MTDShapeBase::timeOfMax_ |
|
private |