44 int nstd,
double res_cut,
double res_cut_init ) {
47 cout <<
" * o o o " << endl;
48 cout <<
" o o o " << endl;
49 cout <<
" o ooooo o o o oo ooo oo ooo oo " << endl;
50 cout <<
" o o o o o o o o o o o o o o o o " << endl;
51 cout <<
" o o o o o o oooo o o oooo o o oooo " << endl;
52 cout <<
" o o o o o o o ooo o o o o " << endl;
53 cout <<
" o o o o o o oo o oo ooo oo ++ starts" << endl;
57 if (
debug_mode ) cout <<
"----------------------------------------------------" << endl;
59 if (
debug_mode ) cout <<
" Entering InitMille" << endl;
61 if (
debug_mode ) cout <<
"-----------------------------------------------------" << endl;
71 m_residual_cut = res_cut;
72 m_residual_cut_init = res_cut_init;
79 if (
debug_mode ) cout <<
"Number of global parameters : " << nagb << endl;
80 if (
debug_mode ) cout <<
"Number of local parameters : " << nalc << endl;
81 if (
debug_mode ) cout <<
"Number of standard deviations : " << nstdev << endl;
83 if ( nagb > mglobl || nalc > mlocal )
85 if (
debug_mode ) cout <<
"Two many parameters !!!!!" << endl;
91 for (
int i = 0; i < nagb; i++ )
101 for (
int j = 0; j < nagb; j++ ) { cgmat[i][j] = 0.; }
106 for (
int i = 0; i < nalc; i++ )
110 for (
int j = 0; j < nalc; j++ ) { clmat[i][j] = 0.; }
120 for (
int i = 0; i < 3; i++ )
122 if (
verbose_mode ) cout <<
"GetDOF(" << i <<
")= " << DOF[i] << endl;
126 for (
int j = i * nglo; j < ( i + 1 ) * nglo; j++ ) {
Millepede::ParSig( j, Sigm[i] ); }
146 if (
debug_mode ) cout <<
"----------------------------------------------------" << endl;
148 if (
debug_mode ) cout <<
" InitMille has been successfully called!" << endl;
150 if (
debug_mode ) cout <<
"-----------------------------------------------------" << endl;
170 if ( index < 0 || index >= nagb ) {
return false; }
171 else { pparm[index] = param; }
193 if ( index >= nagb ) {
return false; }
194 else { psigm[index] = sigma; }
220bool Millepede::InitUn(
double cutfac ) {
221 cfactr = std::max( 1.0, cutfac );
223 cout <<
"Initial cut factor is " << cfactr << endl;
244 cout <<
"Too many constraints !!!" << endl;
248 for (
int i = 0; i < nagb; i++ ) { adercs[ncs][i] = dercs[i]; }
252 cout <<
"Number of constraints increased to " << ncs << endl;
274 for (
int i = 0; i < nalc; i++ ) { derlc[i] = 0.0; }
275 for (
int i = 0; i < nagb; i++ ) { dergb[i] = 0.0; }
281 double wght = 1.0 / ( sigma * sigma );
288 for (
int i = 0; i < nalc; i++ )
290 if ( derlc[i] != 0.0 )
293 if ( ialc == -1 ) ialc = i;
298 if (
verbose_mode ) cout << ialc <<
" / " << iblc << endl;
300 for (
int i = 0; i < nagb; i++ )
302 if ( dergb[i] != 0.0 )
305 if ( iagb == -1 ) iagb = i;
310 if (
verbose_mode ) cout << iagb <<
" / " << ibgb << endl;
312 indst.push_back( -1 );
313 arest.push_back( rmeas );
314 arenl.push_back( 0. );
316 for (
int i = ialc; i <= iblc; i++ )
318 if ( derlc[i] != 0.0 )
320 indst.push_back( i );
321 arest.push_back( derlc[i] );
322 arenl.push_back( 0.0 );
327 indst.push_back( -1 );
328 arest.push_back( wght );
329 arenl.push_back( 0.0 );
331 for (
int i = iagb; i <= ibgb; i++ )
333 if ( dergb[i] != 0.0 )
335 indst.push_back( i );
336 arest.push_back( dergb[i] );
337 arenl.push_back( dernl[i] );
342 if (
verbose_mode ) cout <<
"Out Equloc -- NST = " << arest.size() << endl;
359 for (
int i = 0; i < nalc; i++ ) { derlc[i] = 0.0; }
360 for (
int i = 0; i < nagb; i++ ) { dergb[i] = 0.0; }
361 for (
int i = 0; i < nagb; i++ ) { dernl[i] = 0.0; }
390 int i, j, k, ik, ij, ist, nderlc, ndergl, ndf;
395 double rmeas, wght, rms, cutval;
404 if ( itert < 2 && single_fit != 1 )
406 if (
debug_mode ) cout <<
"Store equation no: " <<
n << endl;
408 for ( i = 0; i < nst; i++ )
410 storeind.push_back( indst[i] );
411 storeare.push_back( arest[i] );
412 storenl.push_back( arenl[i] );
414 if ( arenl[i] != 0. )
420 storeplace.push_back( storeind.size() );
422 if (
verbose_mode ) cout <<
"StorePlace size = " << storeplace[
n] << endl;
423 if (
verbose_mode ) cout <<
"StoreInd size = " << storeind.size() << endl;
426 for ( i = 0; i < nalc; i++ )
430 for ( j = 0; j < nalc; j++ ) { clmat[i][j] = 0.0; }
433 for ( i = 0; i < nagb; i++ ) { indnz[i] = -1; }
463 indst.push_back( -1 );
467 if ( indst[ist] == -1 )
469 if ( ja == -1 ) { ja = ist; }
470 else if ( jb == 0 ) { jb = ist; }
475 if (
verbose_mode ) cout <<
"rmeas = " << rmeas << endl;
478 for ( i = ( jb + 1 ); i < ist; i++ )
482 if (
verbose_mode ) cout <<
"dparm[" << j <<
"] = " << dparm[j] << endl;
483 if (
verbose_mode ) cout <<
"Starting misalignment = " << pparm[j] << endl;
484 rmeas -= arest[i] * ( pparm[j] + dparm[j] );
487 if (
verbose_mode ) cout <<
"rmeas after global stuff removal = " << rmeas << endl;
489 for ( i = ( ja + 1 ); i < jb; i++ )
492 blvec[j] += wght * rmeas * arest[i];
494 if (
verbose_mode ) cout <<
"blvec[" << j <<
"] = " << blvec[j] << endl;
496 for ( k = ( ja + 1 ); k <= i; k++ )
499 clmat[j][ik] += wght * arest[i] * arest[k];
502 cout <<
"clmat[" << j <<
"][" << ik <<
"] = " << clmat[j][ik] << endl;
518 nrank = Millepede::SpmInv( clmat, blvec, nalc, scdiag, scflag );
521 if (
debug_mode ) cout <<
" __________________________________________________" << endl;
522 if (
debug_mode ) cout <<
" Printout of local fit (FITLOC) with rank= " << nrank << endl;
523 if (
debug_mode ) cout <<
" Result of local fit : (index/parameter/error)" << endl;
525 for ( i = 0; i < nalc; i++ )
527 if (
debug_mode ) cout << std::setprecision( 4 ) << std::fixed;
529 cout << std::setw( 20 ) << i <<
" / " << std::setw( 10 ) << blvec[i] <<
" / "
530 << sqrt( clmat[i][i] ) << endl;
535 for ( i = 0; i < nalc; i++ )
537 track_params[2 * i] = blvec[i];
538 track_params[2 * i + 1] = sqrt( fabs( clmat[i][i] ) );
551 if ( indst[ist] == -1 )
553 if ( ja == -1 ) { ja = ist; }
554 else if ( jb == 0 ) { jb = ist; }
560 nderlc = jb - ja - 1;
561 ndergl = ist - jb - 1;
566 if (
verbose_mode ) cout << std::setprecision( 4 ) << std::fixed;
568 cout <<
". equation: measured value " << std::setw( 13 ) << rmeas <<
" +/- "
569 << std::setw( 13 ) << 1.0 / sqrt( wght ) << endl;
571 cout <<
"Number of derivatives (global, local): " << ndergl <<
", " << nderlc
574 cout <<
"Global derivatives are: (index/derivative/parvalue) " << endl;
576 for ( i = ( jb + 1 ); i < ist; i++ )
579 cout << indst[i] <<
" / " << arest[i] <<
" / " << pparm[indst[i]] << endl;
582 if (
verbose_mode ) cout <<
"Local derivatives are: (index/derivative) " << endl;
584 for ( i = ( ja + 1 ); i < jb; i++ )
586 if (
verbose_mode ) cout << indst[i] <<
" / " << arest[i] << endl;
591 for ( i = ( ja + 1 ); i < jb; i++ )
594 rmeas -= arest[i] * blvec[j];
597 for ( i = ( jb + 1 ); i < ist; i++ )
600 rmeas -= arest[i] * ( pparm[j] + dparm[j] );
605 if (
verbose_reject ) cout <<
"Residual value : " << rmeas << endl;
608 if ( fabs( rmeas ) >= m_residual_cut_init && itert <= 1 )
618 if ( fabs( rmeas ) >= m_residual_cut && itert > 1 )
628 summ += wght * rmeas * rmeas;
642 cout <<
"Final chi square / degrees of freedom " << summ <<
" / " << ndf << endl;
644 if ( ndf > 0 ) rms = summ / float( ndf );
646 if ( single_fit == 0 ) loctot++;
648 if ( nstdev != 0 && ndf > 0 && single_fit != 1 )
650 cutval = Millepede::chindl( nstdev, ndf ) * cfactr;
652 if (
debug_mode ) cout <<
"Reject if Chisq/Ndf = " << rms <<
" > " << cutval << endl;
656 if (
verbose_mode ) cout <<
"Rejected track !!!!!" << endl;
657 if ( single_fit == 0 ) locrej++;
664 if ( single_fit == 1 )
682 if ( indst[ist] == -1 )
684 if ( ja == -1 ) { ja = ist; }
685 else if ( jb == 0 ) { jb = ist; }
691 for ( i = ( jb + 1 ); i < ist; i++ )
694 rmeas -= arest[i] * ( pparm[j] + dparm[j] );
699 for ( i = ( jb + 1 ); i < ist; i++ )
703 bgvec[j] += wght * rmeas * arest[i];
704 if (
verbose_mode ) cout <<
"bgvec[" << j <<
"] = " << bgvec[j] << endl;
706 for ( k = ( jb + 1 ); k < ist; k++ )
709 cgmat[j][ik] += wght * arest[i] * arest[k];
711 cout <<
"cgmat[" << j <<
"][" << ik <<
"] = " << cgmat[j][ik] << endl;
717 for ( i = ( jb + 1 ); i < ist; i++ )
724 for ( k = 0; k < nalc; k++ ) { clcmat[nagbn][k] = 0.0; }
732 for ( k = ( ja + 1 ); k < jb; k++ )
735 clcmat[ik][ij] += wght * arest[i] * arest[k];
737 cout <<
"clcmat[" << ik <<
"][" << ij <<
"] = " << clcmat[ik][ij] << endl;
750 Millepede::SpAVAt( clmat, clcmat, corrm, nalc, nagbn );
751 Millepede::SpAX( clcmat, blvec, corrv, nalc, nagbn );
753 for ( i = 0; i < nagbn; i++ )
756 bgvec[j] -= corrv[i];
758 for ( k = 0; k < nagbn; k++ )
761 cgmat[j][ik] -= corrm[i][k];
798 double trackpars[2 * mlocal];
800 int ntotal_start, ntotal;
802 cout <<
"..... Making global fit ....." << endl;
806 std::vector<double> track_slopes;
808 track_slopes.resize( 2 * ntotal_start );
810 for ( i = 0; i < 2 * ntotal_start; i++ ) track_slopes[i] = 0.;
812 if ( itert <= 1 ) itelim = 10;
814 while ( itert < itelim )
816 if (
debug_mode ) cout <<
"ITERATION --> " << itert << endl;
819 cout <<
"...using " << ntotal <<
" tracks..." << endl;
823 for ( i = 0; i < nagb; i++ ) { diag[i] = cgmat[i][i]; }
829 for ( i = 0; i < nagb; i++ )
831 if ( psigm[i] <= 0.0 )
835 for ( j = 0; j < nagb; j++ )
841 else if ( psigm[i] > 0.0 ) { cgmat[i][i] += 1.0 / ( psigm[i] * psigm[i] ); }
845 if (
debug_mode ) cout <<
"Number of constraint equations : " << ncs << endl;
849 for ( i = 0; i < ncs; i++ )
852 for ( j = 0; j < nagb; j++ )
854 cgmat[nvar][j] = float( ntotal ) * adercs[i][j];
855 cgmat[j][nvar] = float( ntotal ) * adercs[i][j];
856 sum -= adercs[i][j] * ( pparm[j] + dparm[j] );
859 cgmat[nvar][nvar] = 0.0;
860 bgvec[nvar] = float( ntotal ) * sum;
867 double final_cor = 0.0;
871 for ( j = 0; j < nagb; j++ )
873 for ( i = 0; i < nagb; i++ )
875 if ( psigm[i] > 0.0 )
877 final_cor += step[j] * cgmat[j][i] * step[i];
878 if ( i == j ) final_cor -= step[i] * step[i] / ( psigm[i] * psigm[i] );
884 cout <<
" Final coeff is " << final_cor << endl;
885 cout <<
" Final NDOFs = " << nagb << endl;
889 nrank = Millepede::SpmInv( cgmat, bgvec, nvar, scdiag, scflag );
891 for ( i = 0; i < nagb; i++ )
893 dparm[i] += bgvec[i];
894 if (
verbose_mode ) cout <<
"dparm[" << i <<
"] = " << dparm[i] << endl;
895 if (
verbose_mode ) cout <<
"cgmat[" << i <<
"][" << i <<
"] = " << cgmat[i][i] << endl;
896 if (
verbose_mode ) cout <<
"err = " << sqrt( fabs( cgmat[i][i] ) ) << endl;
900 if ( itert == 1 ) error[i] = cgmat[i][i];
904 cout <<
"The rank defect of the symmetric " << nvar <<
" by " << nvar <<
" matrix is "
905 << nvar - nf - nrank <<
" (bad if non 0)" << endl;
907 if ( itert == 0 )
break;
911 cout <<
"Total : " << loctot <<
" local fits, " << locrej <<
" rejected." << endl;
918 if ( cfactr != cfactref && sqrt( cfactr ) > 1.2 * cfactref ) { cfactr = sqrt( cfactr ); }
925 if ( itert == itelim )
break;
927 cout <<
"Iteration " << itert <<
" with cut factor " << cfactr << endl;
931 for ( i = 0; i < nvar; i++ )
934 for ( j = 0; j < nvar; j++ ) { cgmat[i][j] = 0.0; }
945 for ( i = 0; i < ntotal_start; i++ )
950 ( i > 0 ) ? rank_i =
abs( storeplace[i - 1] ) : rank_i = 0;
951 rank_f = storeplace[i];
953 if (
verbose_mode ) cout <<
"Track " << i <<
" : " << endl;
954 if (
verbose_mode ) cout <<
"Starts at " << rank_i << endl;
955 if (
verbose_mode ) cout <<
"Ends at " << rank_f << endl;
965 for ( j = rank_i; j < rank_f; j++ )
967 indst.push_back( storeind[j] );
969 if ( storenl[j] == 0 ) arest.push_back( storeare[j] );
970 if ( storenl[j] == 1 ) arest.push_back( track_slopes[2 * i] * storeare[j] );
971 if ( storenl[j] == 2 ) arest.push_back( track_slopes[2 * i + 1] * storeare[j] );
974 for ( j = 0; j < 2 * nalc; j++ ) { trackpars[j] = 0.; }
978 track_slopes[2 * i] = trackpars[2];
979 track_slopes[2 * i + 1] = trackpars[6];
985 for ( j = rank_i; j < rank_f; j++ )
987 indst.push_back( storeind[j] );
989 if ( storenl[j] == 0 ) arest.push_back( storeare[j] );
990 if ( storenl[j] == 1 ) arest.push_back( track_slopes[2 * i] * storeare[j] );
991 if ( storenl[j] == 2 ) arest.push_back( track_slopes[2 * i + 1] * storeare[j] );
994 for ( j = 0; j < 2 * nalc; j++ ) { trackpars[j] = 0.; }
998 ( sc ) ? nstillgood++ : storeplace[i] = -rank_f;
1006 Millepede::PrtGlo();
1008 for ( j = 0; j < nagb; j++ )
1012 pull[j] = par[j] / sqrt( psigm[j] * psigm[j] - cgmat[j][j] );
1013 error[j] = sqrt( fabs( cgmat[j][j] ) );
1016 cout << std::setw( 10 ) <<
" " << endl;
1017 cout << std::setw( 10 ) <<
" * o o o " << endl;
1018 cout << std::setw( 10 ) <<
" o o o " << endl;
1019 cout << std::setw( 10 ) <<
" o ooooo o o o oo ooo oo ooo oo " << endl;
1020 cout << std::setw( 10 ) <<
" o o o o o o o o o o o o o o o o " << endl;
1021 cout << std::setw( 10 ) <<
" o o o o o o oooo o o oooo o o oooo " << endl;
1022 cout << std::setw( 10 ) <<
" o o o o o o o ooo o o o o " << endl;
1023 cout << std::setw( 10 ) <<
" o o o o o o oo o oo ooo oo ++ ends." << endl;
1024 cout << std::setw( 10 ) <<
" o " << endl;
1041int Millepede::SpmInv(
double v[][mgl],
double b[],
int n,
double diag[],
bool flag[] ) {
1045 double eps = 0.00000000000001;
1050 temp =
new double[
n];
1052 for ( i = 0; i <
n; i++ )
1058 for ( j = 0; j <= i; j++ )
1060 if (
v[j][i] == 0 ) {
v[j][i] =
v[i][j]; }
1066 for ( i = 0; i <
n; i++ )
1068 for ( j = 0; j <
n; j++ )
1070 if ( fabs(
v[i][j] ) >= r[i] ) r[i] = fabs(
v[i][j] );
1071 if ( fabs(
v[j][i] ) >= c[i] ) c[i] = fabs(
v[j][i] );
1075 for ( i = 0; i <
n; i++ )
1077 if ( 0.0 != r[i] ) r[i] = 1. / r[i];
1078 if ( 0.0 != c[i] ) c[i] = 1. / c[i];
1084 for ( i = 0; i <
n; i++ )
1086 for ( j = 0; j <
n; j++ ) {
v[i][j] = sqrt( r[i] ) *
v[i][j] * sqrt( c[j] ); }
1092 for ( i = 0; i <
n; i++ ) { diag[i] = fabs(
v[i][i] ); }
1094 for ( i = 0; i <
n; i++ )
1099 for ( j = 0; j <
n; j++ )
1101 if (
flag[j] && ( fabs(
v[j][j] ) > std::max( fabs( vkk ),
eps * diag[j] ) ) )
1110 if (
verbose_mode ) cout <<
"Pivot value :" << vkk << endl;
1116 for ( j = 0; j <
n; j++ )
1118 for ( jj = 0; jj <
n; jj++ )
1120 if ( j != k && jj != k )
1122 {
v[j][jj] =
v[j][jj] - vkk *
v[j][k] *
v[k][jj]; }
1126 for ( j = 0; j <
n; j++ )
1130 v[j][k] = (
v[j][k] ) * vkk;
1131 v[k][j] = (
v[k][j] ) * vkk;
1137 for ( j = 0; j <
n; j++ )
1143 for ( k = 0; k <
n; k++ )
1155 for ( i = 0; i <
n; i++ )
1157 for ( j = 0; j <
n; j++ ) {
v[i][j] = sqrt( c[i] ) *
v[i][j] * sqrt( r[j] ); }
1160 for ( j = 0; j <
n; j++ )
1164 for ( jj = 0; jj <
n; jj++ )
1166 v[j][jj] = -
v[j][jj];
1167 temp[j] +=
v[j][jj] * b[jj];
1171 for ( j = 0; j <
n; j++ ) { b[j] = temp[j]; }
1184int Millepede::SpmInv(
double v[][mlocal],
double b[],
int n,
double diag[],
bool flag[] ) {
1187 double eps = 0.0000000000001;
1189 temp =
new double[
n];
1191 for ( i = 0; i <
n; i++ )
1194 diag[i] = fabs(
v[i][i] );
1196 for ( j = 0; j <= i; j++ ) {
v[j][i] =
v[i][j]; }
1201 for ( i = 0; i <
n; i++ )
1206 for ( j = 0; j <
n; j++ )
1208 if (
flag[j] && ( fabs(
v[j][j] ) > std::max( fabs( vkk ),
eps * diag[j] ) ) )
1222 for ( j = 0; j <
n; j++ )
1224 for ( jj = 0; jj <
n; jj++ )
1226 if ( j != k && jj != k )
1228 {
v[j][jj] =
v[j][jj] - vkk *
v[j][k] *
v[k][jj]; }
1232 for ( j = 0; j <
n; j++ )
1236 v[j][k] = (
v[j][k] ) * vkk;
1237 v[k][j] = (
v[k][j] ) * vkk;
1243 for ( j = 0; j <
n; j++ )
1249 for ( k = 0; k <
n; k++ ) {
v[j][k] = 0.0; }
1257 for ( j = 0; j <
n; j++ )
1261 for ( jj = 0; jj <
n; jj++ )
1263 v[j][jj] = -
v[j][jj];
1264 temp[j] +=
v[j][jj] * b[jj];
1268 for ( j = 0; j <
n; j++ ) { b[j] = temp[j]; }
1294bool Millepede::SpAVAt(
double v[][mlocal],
double a[][mlocal],
double w[][mglobl],
int n,
1298 for ( i = 0; i < m; i++ )
1300 for ( j = 0; j < m; j++ )
1304 for ( k = 0; k <
n; k++ )
1306 for ( l = 0; l <
n; l++ )
1308 w[i][j] += a[i][k] *
v[k][l] * a[j][l];
1333bool Millepede::SpAX(
double a[][mlocal],
double x[],
double y[],
int n,
int m ) {
1336 for ( i = 0; i < m; i++ )
1340 for ( j = 0; j <
n; j++ )
1342 y[i] += a[i][j] *
x[j];
1359bool Millepede::PrtGlo() {
1363 cout <<
" Result of fit for global parameters" << endl;
1364 cout <<
" ===================================" << endl;
1365 cout <<
" I initial final differ "
1366 <<
" lastcor Error gcor" << endl;
1367 cout <<
"-----------------------------------------"
1368 <<
"------------------------------------------" << endl;
1370 for (
int i = 0; i < nagb; i++ )
1372 err = sqrt( fabs( cgmat[i][i] ) );
1373 if ( cgmat[i][i] < 0.0 ) err = -err;
1376 if ( i % ( nagb / 6 ) == 0 )
1378 cout <<
"-----------------------------------------"
1379 <<
"------------------------------------------" << endl;
1384 if ( fabs( cgmat[i][i] * diag[i] ) > 0 )
1386 cout << std::setprecision( 4 ) << std::fixed;
1387 gcor = sqrt( fabs( 1.0 - 1.0 / ( cgmat[i][i] * diag[i] ) ) );
1388 cout << std::setw( 4 ) << i <<
" / " << std::setw( 10 ) << pparm[i] <<
" / "
1389 << std::setw( 10 ) << pparm[i] + dparm[i] <<
" / " << std::setw( 13 ) << dparm[i]
1390 <<
" / " << std::setw( 13 ) << bgvec[i] <<
" / " << std::setw( 10 )
1391 << std::setprecision( 5 ) << err <<
" / " << std::setw( 10 ) << gcor << endl;
1395 cout << std::setw( 4 ) << i <<
" / " << std::setw( 10 ) <<
"OFF"
1396 <<
" / " << std::setw( 10 ) <<
"OFF"
1397 <<
" / " << std::setw( 13 ) <<
"OFF"
1398 <<
" / " << std::setw( 13 ) <<
"OFF"
1399 <<
" / " << std::setw( 10 ) <<
"OFF"
1400 <<
" / " << std::setw( 10 ) <<
"OFF" << endl;
1415double Millepede::chindl(
int n,
int nd ) {
1417 double sn[3] = { 0.47523, 1.690140, 2.782170 };
1418 double table[3][30] = {
1419 { 1.0000, 1.1479, 1.1753, 1.1798, 1.1775, 1.1730, 1.1680, 1.1630, 1.1581, 1.1536,
1420 1.1493, 1.1454, 1.1417, 1.1383, 1.1351, 1.1321, 1.1293, 1.1266, 1.1242, 1.1218,
1421 1.1196, 1.1175, 1.1155, 1.1136, 1.1119, 1.1101, 1.1085, 1.1070, 1.1055, 1.1040 },
1422 { 4.0000, 3.0900, 2.6750, 2.4290, 2.2628, 2.1415, 2.0481, 1.9736, 1.9124, 1.8610,
1423 1.8171, 1.7791, 1.7457, 1.7161, 1.6897, 1.6658, 1.6442, 1.6246, 1.6065, 1.5899,
1424 1.5745, 1.5603, 1.5470, 1.5346, 1.5230, 1.5120, 1.5017, 1.4920, 1.4829, 1.4742 },
1425 { 9.0000, 5.9146, 4.7184, 4.0628, 3.6410, 3.3436, 3.1209, 2.9468, 2.8063, 2.6902,
1426 2.5922, 2.5082, 2.4352, 2.3711, 2.3143, 2.2635, 2.2178, 2.1764, 2.1386, 2.1040,
1427 2.0722, 2.0428, 2.0155, 1.9901, 1.9665, 1.9443, 1.9235, 1.9040, 1.8855, 1.8681 } };
1429 if ( nd < 1 ) {
return 0.0; }
1432 m = std::max( 1, std::min(
n, 3 ) );
1434 if ( nd <= 30 ) {
return table[m - 1][nd - 1]; }
1437 return ( ( sn[m - 1] + sqrt(
float( 2 * nd - 3 ) ) ) *
1438 ( sn[m - 1] + sqrt(
float( 2 * nd - 3 ) ) ) ) /
1439 float( 2 * nd - 2 );
EvtTensor3C eps(const EvtVector3R &v)
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
bool InitMille(bool DOF[], double Sigm[], int nglo, int nloc, double startfact, int nstd, double res_cut, double res_cut_init)
void SetTrackNumber(int value)
bool ZerLoc(double dergb[], double derlc[], double dernl[])
bool EquLoc(double dergb[], double derlc[], double dernl[], double rmeas, double sigma)
bool MakeGlobalFit(double par[], double error[], double pull[])
bool ParGlo(int index, double param)
bool FitLoc(int n, double track_params[], int single_fit)
bool ParSig(int index, double sigma)
Millepede()
Standard constructor.
bool ConstF(double dercs[], double rhs)
const bool verbose_reject