11 bool iPedestalConstraint,
bool iTimeConstraint,
bool iAddPulseJitter,
bool iAddTimeSlew,
12 double iPulseJitter,
double iTimeMean,
double iTimeSig,
double iPedMean,
double iPedSig,
13 double iNoise,
unsigned nSamplesToFit) :
68 void PulseShapeFunctor::funcShape(std::array<double,HcalConst::maxSamples> & ntmpbin,
const double &pulseTime,
const double &pulseHeight,
const double &slew) {
77 ntmpbin = { {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f} };
82 if( offset_start == 1.0 ){ offset_start = 0.; i_start-=1; }
84 const int bin_start = (
int) offset_start;
85 const int bin_0_start = ( offset_start < bin_start + 0.5 ? bin_start -1 : bin_start );
86 const int iTS_start = i_start/ns_per_bx;
88 const double factor = offset_start - bin_0_start - 0.5;
91 ntmpbin[iTS_start] = (bin_0_start == -1 ?
95 for(
int iTS = iTS_start+1; iTS < num_bx; ++iTS){
96 int bin_idx = distTo25ns_start + 1 + (iTS-iTS_start-1)*ns_per_bx + bin_0_start;
100 for(
int i=iTS_start;
i < num_bx; ++
i) {
101 ntmpbin[
i] *= pulseHeight;
120 unsigned int parBy2=(nPars-1)/2;
174 for(j=0; j< parBy2; ++j ){
constexpr double invertnsPerBx
double psFit_erry[HcalConst::maxSamples]
double singlePulseShapeFunc(const double *x)
PulseShapeFunctor(const HcalPulseShapes::Shape &pulse, bool iPedestalConstraint, bool iTimeConstraint, bool iAddPulseJitter, bool iAddTimeSlew, double iPulseJitter, double iTimeMean, double iTimeSig, double iPedMean, double iPedSig, double iNoise, unsigned int nSamplesToFit)
std::array< double, HcalConst::maxSamples > pulse_shape_
std::vector< float > acc25nsVec
double psFit_y[HcalConst::maxSamples]
std::vector< float > diffVarItvlIdxZEROVec
Abs< T >::type abs(const T &t)
std::array< float, HcalConst::maxPSshapeBin > pulse_hist
std::vector< float > diff25nsItvlVec
std::vector< float > accVarLenIdxMinusOneVec
void funcShape(std::array< double, HcalConst::maxSamples > &ntmpbin, const double &pulseTime, const double &pulseHeight, const double &slew)
std::vector< float > diffVarItvlIdxMinusOneVec
double triplePulseShapeFunc(const double *x)
double doublePulseShapeFunc(const double *x)
double psFit_erry2[HcalConst::maxSamples]
double psFit_x[HcalConst::maxSamples]
std::array< double, HcalConst::maxSamples > pulse_shape_sum_
double EvalPulse(const double *pars, unsigned int nPar)
double psFit_slew[HcalConst::maxSamples]
constexpr int maxPSshapeBin
std::vector< float > accVarLenIdxZEROVec
constexpr float iniTimeShift