Some function moved to AliZDC
[u/mrichter/AliRoot.git] / GEANT321 / erdecks / ertrnt.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1996/03/06 15:37:35 mclareni
6* Add geane321 source directories
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.49 by S.Giani
11*-- Author :
12 SUBROUTINE ERTRNT
13C.
14C. ******************************************************************
15C. * *
16C. * Average neutral track is extrapolated by one step *
17C. * *
18C. * ==>Called by : ERTRGO *
19C. * Original routine : GTNINO *
20C. * Authors M.Maire, E.Nagy ********* *
21C. * *
22C. ******************************************************************
23C.
24#include "geant321/ertrio.inc"
25#include "geant321/gconst.inc"
26#include "geant321/gctmed.inc"
27#include "geant321/gctrak.inc"
28*
29* *** Compute point where to store error matrix
30*
31 STEPER = BIG
32 DO 20 IPR = 1,NEPRED
33 STEPE = BIG
34 IF (LELENG) STEPE = ERLENG(IPR) - SLENG
35 IF (LEPLAN) THEN
36 SCAL1 = 0.
37 SCAL2 = 0.
38 DO 18 I=1,3
39 SCAL1 = SCAL1 + ERPLO(I,4,IPR)*(ERPLO(I,3,IPR)-VECT(I))
40 SCAL2 = SCAL2 + ERPLO(I,4,IPR)*VECT(I+3)
41 18 CONTINUE
42 STEPE = SCAL1/SCAL2
43 ENDIF
44 IF (STEPE.LE.PREC) STEPE = BIG
45 IF (STEPE.LT.STEPER) THEN
46 STEPER = STEPE
47 INLIST = IPR
48 ENDIF
49 20 CONTINUE
50*
51 STEP = BIG
52 CALL GTNEXT
53*
54 IF(STEPER.LT.SNEXT) THEN
55 STEP = STEPER
56 INWVOL = 0
57 IMEC = 27
58 NMEC = NMEC + 1
59 LMEC(NMEC) = IMEC
60 ELSE
61 STEP = SNEXT + PREC
62 INWVOL = 2
63 IMEC = 1
64 NMEC = NMEC + 1
65 LMEC(NMEC) = IMEC
66 IF ((STEPER-SNEXT).LE.(2*PREC)) THEN
67 IMEC = 27
68 NMEC = NMEC + 1
69 LMEC(NMEC) = IMEC
70 ENDIF
71 ENDIF
72*
73* *** Linear transport
74*
75 DO 25 I=1,3
76 VECT(I) = VECT(I) + STEP*VECT(I+3)
77 25 CONTINUE
78*
79 SLENG = SLENG + STEP
80*
81* *** Propagate error matrix
82*
83 IF (.NOT. LEONLY) CALL ERPROP
84*
85* *** Store informations
86*
87 IF(IMEC.EQ.27) CALL ERSTOR
88*
89 END