42 int sample_min,
int sample_max,
43 double time_of_max,
double chi2_max,
68 for(k=sample_min;k<=sample_max;k++){
115 double xki2, dif, difmx, deglib;
118 deglib=(double)nmxul - 4.;
119 for(i=0;i<nmxul;i++){
130 for(i=0;i<nmxul;i++){
136 for(i=0;i<nmxul;i++){
151 if( parom[3] == 0. ){
160 for(i=0;i<nmxul;i++ ){
162 h= parom[0]+parom[1]*t[
i]+parom[2]*t2+parom[3]*t2*t[
i];
163 dif=(adc[
i]-
h)*mask[i];
169 if(deglib > 0.5) xki2=xki2/deglib;
171 delta=parom[2]*parom[2]-3.*parom[3]*parom[1];
174 tm=-(delta+parom[2])/(3.*parom[3]);
175 tmp=(delta-parom[2])/(3.*parom[3]);
184 parom[5]= parom[0]+parom[1]*tm+parom[2]*tm*tm+parom[3]*tm*tm*tm;
199 "ERROR : trying to use TSFit::inverms with size %d( max allowed %d\n",
205 memset( (
char *)
al, zero, 8*n*n );
206 memset( (
char *)
be, zero, 8*n*n );
225 if( j < i )
al[
i][
j] = r /
al[
j][
j];
230 be[0][0] = 1./
al[0][0];
236 for(k=jj+1;k<=
i;k++){
286 if( bdc[i] > val_max ){
292 if( (val_max*val_max) *
errmat[imax][imax] < 16. )
return -118;
299 double val2 = val_max / 2.;
300 double val3 = val_max / 2.;
306 if( ( bdc[i] < val3 ) && ( i < imax ) )ilow =
i;
307 if( bdc[i] > val2 )ihig =
i;
317 if( ihig == ilow)
return -105;
318 if( ilow == imax )ilow = ilow-1;
324 int number_of_good_samples = 0;
325 for(i=ilow;i<=ihig;i++){
332 number_of_good_samples++;
337 if( number_of_good_samples < 4 ){
346 tm =
parfp3[4] + (float)ilow;
349 if( amp * amp *
errmat[0][0] < 2. )
return -101.;
350 tmp =
parfp3[6] + (float)ilow;
363 if( (tm < (
double)ilow ) || (tm > (
double)ihig)){
367 if( (tmp > (
double)ilow ) && (tmp < (
double)ihig - 1.) ){
374 ret_dat[2] = val_max;
375 ret_dat[3] = (double)imax;
376 ret_dat[4] = (double)ilow;
377 ret_dat[5] = (double)ihig;
378 ret_dat[6] = (double)tmp;
int adc(sample_type sample)
get the ADC sample (12 bits)
TSFit(int size=SDIM, int size_sh=PLSHDIM)
double invcov[matdim][matdim]
double al[matdim][matdim]
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
double fit_third_degree_polynomial(double *, double *)
double be[matdim][matdim]
double cov[matdim][matdim]
double fpol3dg(int, double *, double *, double *)
auto const T2 &decltype(t1.eta()) t2
double inverms(int, double xx[matdim][matdim], double yy[matdim][matdim])
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
double errmat[SDIM][SDIM]
std::vector< std::vector< double > > tmp
void set_params(int, int, int, int, int, double, double, int, int)
tuple size
Write out results.