1 |
// |
2 |
// track shared library v. 0.1 |
3 |
// |
4 |
// calls the fortran tracking routine track.f |
5 |
// |
6 |
// Written by Emiliano Mocchiutti |
7 |
// |
8 |
#define track track_ |
9 |
extern "C" int track(int&, Double_t[], Double_t[], Double_t[], Double_t[], int&); |
10 |
void ctrack(int npoint, Double_t zin[100], Double_t xout[100], Double_t yout[100], Double_t al_p[5], int& ifail) { |
11 |
// |
12 |
Double_t czin[100]; |
13 |
Double_t cxout[100]; |
14 |
Double_t cyout[100]; |
15 |
for ( int i = 0 ; i<100 ; i++){ |
16 |
if ( i < npoint ) { |
17 |
czin[i] = zin[i]; |
18 |
//printf("CTRK =====>< zin %i %f \n",i,czin[i]); |
19 |
} else { |
20 |
czin[i] = 0.; |
21 |
}; |
22 |
cxout[i] = 0.; |
23 |
cyout[i] = 0.; |
24 |
}; |
25 |
// |
26 |
track(npoint, czin, cxout, cyout, al_p, ifail); |
27 |
// |
28 |
for ( int i = 0 ; i<npoint ; i++){ |
29 |
xout[i] = cxout[i]; |
30 |
yout[i] = cyout[i]; |
31 |
// printf("CTRK ===> xout %i %f %f\n",i,xout[i],cxout[i]); |
32 |
}; |
33 |
}; |
34 |
|
35 |
|