source: trunk/examples/extended/electromagnetic/TestEm2/geant3/src/gustep.F@ 1036

Last change on this file since 1036 was 807, checked in by garnier, 17 years ago

update

File size: 2.4 KB
RevLine 
[807]1
2 SUBROUTINE GUSTEP
3*
4* User routine called at the end of each tracking step
5*
6#include "geant321/gcflag.inc"
7#include "geant321/gconst.inc"
8#include "geant321/gckine.inc"
9#include "geant321/gcking.inc"
10#include "geant321/gctmed.inc"
11#include "geant321/gctrak.inc"
12#include "geant321/gcvolu.inc"
13#include "pvolum.inc"
14#include "celoss.inc"
15*
16*
17* *** Debug event and strore track for drawing
18 IF (IDEBUG.NE.0) CALL GPCXYZ
19 IF (ISWIT(1).EQ.1.AND.(CHARGE.NE.0.)) CALL GSXYZ
20 IF (ISWIT(1).EQ.2) CALL GSXYZ
21*
22* *** Something generated ?
23 IF(NGKINE.GT.0) CALL GSKING(0)
24*
25* *** Energy deposited
26 IF (DESTEP.GT.0.)THEN
27 radius = sqrt(vect(1)**2 + vect(2)**2)
28 NR = 1 + radius/(DRX0*X0)
29 NL = 1 + (Z1 + vect(3))/(DLX0*X0)
30 DEDR(NR) = DEDR(NR) + DESTEP
31 DEDL(NL) = DEDL(NL) + DESTEP
32 ENDIF
33*
34* *** track length and total energy deposit
35 IF (CHARGE.NE.0.) THEN
36 STRCH = STRCH + STEP
37 EDEPCH = EDEPCH + DESTEP
38 ELSE
39 STRNE = STRNE + STEP
40 EDEPNE = EDEPNE + DESTEP
41 ENDIF
42*
43* *** energy of particles contributing to edep
44 IF ((DESTEP).GT.0.)THEN
45 elog = log10((gekin+destep)/pkine(3))
46 call hfill (21,elog,0.,destep)
47 ENDIF
48 END
Note: See TracBrowser for help on using the repository browser.