| 4 |
*/ |
*/ |
| 5 |
#include <TrkLevel2.h> |
#include <TrkLevel2.h> |
| 6 |
#include <iostream> |
#include <iostream> |
| 7 |
|
#include <math.h> |
| 8 |
using namespace std; |
using namespace std; |
| 9 |
//...................................... |
//...................................... |
| 10 |
// F77 routines |
// F77 routines |
| 23 |
seqno = -1; |
seqno = -1; |
| 24 |
image = -1; |
image = -1; |
| 25 |
chi2 = 0; |
chi2 = 0; |
| 26 |
nstep = 0; |
nstep = 0; |
| 27 |
for(int it1=0;it1<5;it1++){ |
for(int it1=0;it1<5;it1++){ |
| 28 |
al[it1] = 0; |
al[it1] = 0; |
| 29 |
for(int it2=0;it2<5;it2++)coval[it1][it2] = 0; |
for(int it2=0;it2<5;it2++)coval[it1][it2] = 0; |
| 30 |
}; |
}; |
| 31 |
for(int ip=0;ip<6;ip++){ |
for(int ip=0;ip<6;ip++){ |
| 32 |
xgood[ip] = 0; |
xgood[ip] = 0; |
| 57 |
seqno = t.seqno; |
seqno = t.seqno; |
| 58 |
image = t.image; |
image = t.image; |
| 59 |
chi2 = t.chi2; |
chi2 = t.chi2; |
| 60 |
nstep = t.nstep; |
nstep = t.nstep; |
| 61 |
for(int it1=0;it1<5;it1++){ |
for(int it1=0;it1<5;it1++){ |
| 62 |
al[it1] = t.al[it1]; |
al[it1] = t.al[it1]; |
| 63 |
for(int it2=0;it2<5;it2++)coval[it1][it2] = t.coval[it1][it2]; |
for(int it2=0;it2<5;it2++)coval[it1][it2] = t.coval[it1][it2]; |
| 64 |
}; |
}; |
| 65 |
for(int ip=0;ip<6;ip++){ |
for(int ip=0;ip<6;ip++){ |
| 66 |
xgood[ip] = t.xgood[ip]; |
xgood[ip] = t.xgood[ip]; |
| 220 |
cout << endl << " "; for(int i=0; i<5; i++)cout << coval[4][i]<<" "; |
cout << endl << " "; for(int i=0; i<5; i++)cout << coval[4][i]<<" "; |
| 221 |
cout << endl << "dedx_x : "; for(int i=0; i<6; i++)cout << dedx_x[i] << " "; |
cout << endl << "dedx_x : "; for(int i=0; i<6; i++)cout << dedx_x[i] << " "; |
| 222 |
cout << endl << "dedx_y : "; for(int i=0; i<6; i++)cout << dedx_y[i] << " "; |
cout << endl << "dedx_y : "; for(int i=0; i<6; i++)cout << dedx_y[i] << " "; |
| 223 |
|
cout << endl; |
| 224 |
} |
} |
| 225 |
/** |
/** |
| 226 |
* Set the TrkTrack position measurements |
* Set the TrkTrack position measurements |
| 296 |
al[4]=0.; |
al[4]=0.; |
| 297 |
} |
} |
| 298 |
// end guess |
// end guess |
| 299 |
for(int i=0; i<5; i++) track_.al[i]=al[i]; |
if(pfixed==0.) { |
| 300 |
|
al[4]=0.; // free momentum |
| 301 |
|
track_.pfixed=0.; // " |
| 302 |
|
} |
| 303 |
if(pfixed!=0.) { |
if(pfixed!=0.) { |
| 304 |
al[4]=1./pfixed; // to fix the momentum |
al[4]=1./pfixed; // to fix the momentum |
| 305 |
track_.pfixed=pfixed; // " |
track_.pfixed=pfixed; // " |
| 306 |
} |
} |
| 307 |
|
track_.zini = 23.5; // ZINI = 23.5 !!! it should be the same parameter in all codes |
| 308 |
|
for(int i=0; i<5; i++) track_.al[i]=al[i]; |
| 309 |
int istep=0; |
int istep=0; |
| 310 |
int ifail=0; |
int ifail=0; |
| 311 |
mini2_(&istep,&ifail, &iprint); |
mini2_(&istep,&ifail, &iprint); |