source: trunk/examples/extended/electromagnetic/TestEm11/geant3/src/gutrak.F @ 1292

Last change on this file since 1292 was 807, checked in by garnier, 16 years ago

update

File size: 1.8 KB
Line 
1
2      SUBROUTINE GUTRAK                                                         
3*                                                                               
4*     User routine to control tracking of one track                 
5*     Called by GTREVE                                                           
6*
7#include "geant321/gckine.inc"
8#include "geant321/gctrak.inc"
9#include "celoss.inc"
10#include "histo.inc"
11*
12* *** per track initialisations   
13*
14* *** process a track                                                                                     
15      CALL GTRACK
16*
17* *** count track length of primary particle
18      if (istak.eq.0) then
19        TrLen  = TrLen + sleng
20        TrLen2 = TrLen2 + sleng*sleng
21*       
22        xLen    = vect(1) - vert(1)
23        XTrLen  = XTrLen  + xLen
24        XTrLen2 = XTrLen2 + xLen*xLen
25*
26        NbStep  = NbStep  + nstep
27        NbStep2 = NbStep2 + nstep*nstep
28*
29        stepsize = sleng/nstep
30        StepLen  = StepLen  + stepsize
31        StepLen2 = StepLen2 + stepsize*stepsize                 
32      endif
33*
34* *** absorbed, transmited, reflected ?
35      if (istak.eq.0) then
36        i = 1
37        if (inwvol.eq.3) then
38          i = 2
39          if (vect(4).le.0.) i = 3
40        endif
41        kcoef(i) = kcoef(i) + 1
42      endif
43*
44* *** histo track length
45      ih = 0
46      if (istak.eq.0) ih = 3
47      if (istak*charge.ne.0.) ih = 6
48      if ((ih.gt.0).and.(histo(ih)))
49     &   call hfill (ih,sleng/histUnit(ih),0.,1.)
50*
51* *** histo projected range of primary
52      if (istak.eq.0) then
53        ih = 5
54        if (histo(ih)) call hfill (ih,xLen/histUnit(ih),0.,1.)
55      endif                                                                                             
56*                                                                               
57      END                                                                           
Note: See TracBrowser for help on using the repository browser.