43 int sample_min,
int sample_max,
44 double time_of_max,
double chi2_max,
69 for(k=sample_min;k<=sample_max;k++){
116 double xki2, dif, difmx, deglib;
119 deglib=(double)nmxul - 4.;
120 for(i=0;i<nmxul;i++){
131 for(i=0;i<nmxul;i++){
137 for(i=0;i<nmxul;i++){
152 if( parom[3] == 0. ){
161 for(i=0;i<nmxul;i++ ){
163 h= parom[0]+parom[1]*t[
i]+parom[2]*t2+parom[3]*t2*t[
i];
164 dif=(adc[
i]-
h)*mask[i];
170 if(deglib > 0.5) xki2=xki2/deglib;
172 delta=parom[2]*parom[2]-3.*parom[3]*parom[1];
175 tm=-(delta+parom[2])/(3.*parom[3]);
176 tmp=(delta-parom[2])/(3.*parom[3]);
185 parom[5]= parom[0]+parom[1]*tm+parom[2]*tm*tm+parom[3]*tm*tm*tm;
200 "ERROR : trying to use TSFit::inverms with size %d( max allowed %d\n",
206 memset( (
char *)
al, zero, 8*n*n );
207 memset( (
char *)
be, zero, 8*n*n );
226 if( j < i )
al[
i][
j] = r /
al[
j][
j];
231 be[0][0] = 1./
al[0][0];
237 for(k=jj+1;k<=
i;k++){
288 if( bdc[i] > val_max ){
294 if( (val_max*val_max) *
errmat[imax][imax] < 16. )
return -118;
301 double val2 = val_max / 2.;
302 double val3 = val_max / 2.;
308 if( ( bdc[i] < val3 ) && ( i < imax ) )ilow =
i;
309 if( bdc[i] > val2 )ihig =
i;
319 if( ihig == ilow)
return -105;
320 if( ilow == imax )ilow = ilow-1;
326 int number_of_good_samples = 0;
327 for(i=ilow;i<=ihig;i++){
334 number_of_good_samples++;
339 if( number_of_good_samples < 4 ){
348 tm =
parfp3[4] + (float)ilow;
351 if( amp * amp *
errmat[0][0] < 2. )
return -101.;
352 tmp =
parfp3[6] + (float)ilow;
365 if( (tm < (
double)ilow ) || (tm > (
double)ihig)){
369 if( (tmp > (
double)ilow ) && (tmp < (
double)ihig - 1.) ){
377 ret_dat[2] = val_max;
378 ret_dat[3] = (double)imax;
379 ret_dat[4] = (double)ilow;
380 ret_dat[5] = (double)ihig;
381 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])
double errmat[SDIM][SDIM]
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::vector< std::vector< double > > tmp
void set_params(int, int, int, int, int, double, double, int, int)
tuple size
Write out results.