11 bool iPedestalConstraint,
17 unsigned nSamplesToFit)
73 const double pulseTime,
74 const double pulseHeight,
91 if (offset_start == 1.0) {
96 const int bin_start = (
int)offset_start;
97 const int bin_0_start = (offset_start < bin_start + 0.5 ? bin_start - 1 : bin_start);
98 const int iTS_start = i_start / ns_per_bx;
99 const int distTo25ns_start = ns_per_bx - 1 - i_start % ns_per_bx;
100 const double factor = offset_start - bin_0_start - 0.5;
110 int bin_idx = distTo25ns_start + 1 + (iTS - iTS_start - 1) * ns_per_bx + bin_0_start;
116 ntmpbin[
i] *= pulseHeight;
128 float dummyPulseHeight = 0.f;
134 unsigned i = 0,
j = 0;
136 const double pedestal = pars[nPars - 1];
139 for (
i = 0;
i < nPars; ++
i)
147 const unsigned parBy2 = (nPars - 1) / 2;
159 for (
i = 1;
i < parBy2; ++
i) {
177 for (
i = 1;
i < parBy2; ++
i) {
198 for (
j = 0;
j < parBy2; ++
j) {
double psFit_x[hcal::constants::maxSamples]
void EvalPulse(const float *pars)
double psFit_erry2[hcal::constants::maxSamples]
constexpr bool isNotFinite(T x)
std::vector< float > accVarLenIdxMinusOneVec_
double psFit_slew[hcal::constants::maxSamples]
double psFit_erry[hcal::constants::maxSamples]
constexpr int maxPSshapeBin
PulseShapeFunctor(const HcalPulseShapes::Shape &pulse, bool iPedestalConstraint, bool iTimeConstraint, bool iAddPulseJitter, double iPulseJitter, double iTimeMean, double iPedMean, unsigned int nSamplesToFit)
std::vector< float > diff25nsItvlVec_
Abs< T >::type abs(const T &t)
std::array< double, hcal::constants::maxSamples > pulse_shape_
std::vector< float > acc25nsVec_
std::array< float, hcal::constants::maxPSshapeBin > pulse_hist
double psFit_y[hcal::constants::maxSamples]
double pulse(double x, double y, double z, double t)
void funcShape(std::array< double, hcal::constants::maxSamples > &ntmpbin, const double pulseTime, const double pulseHeight, const double slew, bool scalePulse)
constexpr float iniTimeShift
std::array< double, hcal::constants::maxSamples > pulse_shape_sum_
std::vector< float > accVarLenIdxZEROVec_
std::vector< float > diffVarItvlIdxZEROVec_
std::vector< float > diffVarItvlIdxMinusOneVec_
double EvalPulseM2(const double *pars, const unsigned nPar)
constexpr float invertnsPerBx