1 |
********************************************************************** |
********************************************************************** |
2 |
* |
* |
3 |
* |
* |
4 |
* routine per tracciare la particella di uno STEP |
* routine per tracciare la particella di uno STEP |
5 |
* |
* |
6 |
SUBROUTINE GRKUTA (CHARGE,STEP,VECT,VOUT) |
SUBROUTINE GRKUTA (CHARGE,STEP,VECT,VOUT) |
7 |
C. |
C. |
48 |
|
|
49 |
REAL*8 DELTAB(3) |
REAL*8 DELTAB(3) |
50 |
REAL*8 DLT32 |
REAL*8 DLT32 |
51 |
|
DLT=1D-8 |
52 |
DLT32=DLT/32. |
DLT32=DLT/32. |
53 |
|
|
54 |
*. |
*. |
72 |
DO I=1,3 |
DO I=1,3 |
73 |
VVV(I)=SNGL(VOUT(I)) |
VVV(I)=SNGL(VOUT(I)) |
74 |
ENDDO |
ENDDO |
75 |
|
|
76 |
CALL GUFLD(VVV,FFF) |
CALL GUFLD(VVV,FFF) |
77 |
* print*,'GRKUTA Bx,By,Bz: ',(FFF(i),i=1,3) |
* print*,'GRKUTA Bx,By,Bz: ',(FFF(i),i=1,3) |
78 |
DO I=1,3 |
DO I=1,3 |
118 |
CALL GUFLD(VVV,FFF) |
CALL GUFLD(VVV,FFF) |
119 |
DO I=1,3 |
DO I=1,3 |
120 |
F(I)=DBLE(FFF(I)) |
F(I)=DBLE(FFF(I)) |
121 |
ENDDO |
ENDDO |
122 |
DELTAB(2) = -F(2)*VECT(7)*CHARGE*(DELTA0+DELTA1*VVV(2)) |
DELTAB(2) = -F(2)*VECT(7)*CHARGE*(DELTA0+DELTA1*VVV(2)) |
123 |
F(2) = F(2)+DELTAB(2) |
F(2) = F(2)+DELTAB(2) |
124 |
cPP ----------------- |
cPP ----------------- |
252 |
ENDIF |
ENDIF |
253 |
* |
* |
254 |
999 END |
999 END |
255 |
* |
* |
256 |
* |
* |
257 |
|
|
258 |
c$$$********************************************************************** |
c$$$********************************************************************** |
259 |
c$$$* |
c$$$* |
260 |
c$$$* |
c$$$* |
261 |
c$$$* routine per tracciare la particella di uno STEP |
c$$$* routine per tracciare la particella di uno STEP |
262 |
c$$$* *** extended version *** |
c$$$* *** extended version *** |
263 |
c$$$* it return also the track-length |
c$$$* it return also the track-length |
264 |
c$$$* |
c$$$* |
318 |
c$$$ PINV = EC * CHARGE / VECT(7) |
c$$$ PINV = EC * CHARGE / VECT(7) |
319 |
c$$$ TL = 0. |
c$$$ TL = 0. |
320 |
c$$$ H = STEP |
c$$$ H = STEP |
321 |
c$$$ |
c$$$ |
322 |
c$$$c print*,'===================== START GRKUTA2' |
c$$$c print*,'===================== START GRKUTA2' |
323 |
c$$$ |
c$$$ |
324 |
c$$$* |
c$$$* |
325 |
c$$$* |
c$$$* |
326 |
c$$$ 20 REST = STEP-TL |
c$$$ 20 REST = STEP-TL |
328 |
c$$$ DO I=1,3 |
c$$$ DO I=1,3 |
329 |
c$$$ VVV(I)=SNGL(VOUT(I)) |
c$$$ VVV(I)=SNGL(VOUT(I)) |
330 |
c$$$ ENDDO |
c$$$ ENDDO |
331 |
c$$$ |
c$$$ |
332 |
c$$$ CALL GUFLD(VVV,FFF) |
c$$$ CALL GUFLD(VVV,FFF) |
333 |
c$$$* print*,'GRKUTA Bx,By,Bz: ',(FFF(i),i=1,3) |
c$$$* print*,'GRKUTA Bx,By,Bz: ',(FFF(i),i=1,3) |
334 |
c$$$ DO I=1,3 |
c$$$ DO I=1,3 |
374 |
c$$$ CALL GUFLD(VVV,FFF) |
c$$$ CALL GUFLD(VVV,FFF) |
375 |
c$$$ DO I=1,3 |
c$$$ DO I=1,3 |
376 |
c$$$ F(I)=DBLE(FFF(I)) |
c$$$ F(I)=DBLE(FFF(I)) |
377 |
c$$$ ENDDO |
c$$$ ENDDO |
378 |
c$$$C CALL GUFLD(XYZT,F) |
c$$$C CALL GUFLD(XYZT,F) |
379 |
c$$$ AT = A + SECXS(1) |
c$$$ AT = A + SECXS(1) |
380 |
c$$$ BT = B + SECYS(1) |
c$$$ BT = B + SECYS(1) |
410 |
c$$$ F(I)=DBLE(FFF(I)) |
c$$$ F(I)=DBLE(FFF(I)) |
411 |
c$$$ ENDDO |
c$$$ ENDDO |
412 |
c$$$C CALL GUFLD(XYZT,F) |
c$$$C CALL GUFLD(XYZT,F) |
413 |
c$$$* |
c$$$* |
414 |
c$$$ Z = Z + (C + (SECZS(1) + SECZS(2) + SECZS(3)) * THIRD) * H |
c$$$ Z = Z + (C + (SECZS(1) + SECZS(2) + SECZS(3)) * THIRD) * H |
415 |
c$$$ Y = Y + (B + (SECYS(1) + SECYS(2) + SECYS(3)) * THIRD) * H |
c$$$ Y = Y + (B + (SECYS(1) + SECYS(2) + SECYS(3)) * THIRD) * H |
416 |
c$$$ X = X + (A + (SECXS(1) + SECXS(2) + SECXS(3)) * THIRD) * H |
c$$$ X = X + (A + (SECXS(1) + SECXS(2) + SECXS(3)) * THIRD) * H |
433 |
c$$$* If too many iterations, go to HELIX |
c$$$* If too many iterations, go to HELIX |
434 |
c$$$ IF (ITER.GT.MAXIT) GO TO 40 |
c$$$ IF (ITER.GT.MAXIT) GO TO 40 |
435 |
c$$$* |
c$$$* |
436 |
c$$$ DL = VOUT(8) + |
c$$$ DL = VOUT(8) + |
437 |
c$$$ $ DSQRT( 0 |
c$$$ $ DSQRT( 0 |
438 |
c$$$ $ + (X-VOUT(1))**2 |
c$$$ $ + (X-VOUT(1))**2 |
439 |
c$$$ $ + (Y-VOUT(2))**2 |
c$$$ $ + (Y-VOUT(2))**2 |
523 |
c$$$ |
c$$$ |
524 |
c$$$* |
c$$$* |
525 |
c$$$ 999 END |
c$$$ 999 END |
526 |
c$$$* |
c$$$* |
527 |
c$$$* |
c$$$* |
528 |
|
|
529 |
********************************************************************** |
********************************************************************** |
530 |
* |
* |
531 |
* gives the value of the magnetic field in the tracking point |
* gives the value of the magnetic field in the tracking point |
532 |
* |
* |
533 |
********************************************************************** |
********************************************************************** |
534 |
|
|
535 |
subroutine gufld(v,f) !coordinates in cm, B field in kGauss |
subroutine gufld(v,f) !coordinates in cm, B field in kGauss |
544 |
enddo |
enddo |
545 |
c inter_B: coordinates in m, B field in Tesla |
c inter_B: coordinates in m, B field in Tesla |
546 |
c$$$ print*,'GUFLD: v ',v |
c$$$ print*,'GUFLD: v ',v |
547 |
call inter_B(vv(1),vv(2),vv(3),ff) |
call inter_B(vv(1),vv(2),vv(3),ff) |
548 |
do i=1,3 !change back the field in kGauss |
do i=1,3 !change back the field in kGauss |
549 |
f(i)=REAL(ff(i)*10.) ! EM GCC4.7 |
f(i)=REAL(ff(i)*10.) ! EM GCC4.7 |
550 |
enddo |
enddo |
551 |
c$$$ print*,'GUFLD: b ',f |
c$$$ print*,'GUFLD: b ',f |
552 |
|
|
553 |
return |
return |
554 |
end |
end |
|
|
|