| Line | |
|---|
| 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/gckine.inc"
|
|---|
| 8 | #include "geant321/gcking.inc"
|
|---|
| 9 | #include "geant321/gctrak.inc"
|
|---|
| 10 | #include "calor.inc"
|
|---|
| 11 | #include "celoss.inc"
|
|---|
| 12 | #include "histo.inc"
|
|---|
| 13 | *
|
|---|
| 14 | common/local1/ fnorm
|
|---|
| 15 | *
|
|---|
| 16 | data amm, aMeV /1.e-1, 1.e-3/
|
|---|
| 17 | *
|
|---|
| 18 | if (ievent.eq.1) fnorm = amm/(nevent*aMeV*binWidth(1)*histUnit(1))
|
|---|
| 19 | *
|
|---|
| 20 | * *** Debug event and store tracks for drawing
|
|---|
| 21 | IF (IDEBUG.NE.0) CALL GPCXYZ
|
|---|
| 22 | IF (IDEBUG.NE.0) CALL GPGKIN
|
|---|
| 23 | IF ((ISWIT(1).EQ.1).AND.(CHARGE.NE.0.)) CALL GSXYZ
|
|---|
| 24 | IF (ISWIT(1).EQ.2) CALL GSXYZ
|
|---|
| 25 | *
|
|---|
| 26 | * *** Something generated ?
|
|---|
| 27 | IF(NGKINE.GT.0) CALL GSKING(0)
|
|---|
| 28 | *
|
|---|
| 29 | if (destep.le.0.) return
|
|---|
| 30 | *
|
|---|
| 31 | * *** Energy deposited per event
|
|---|
| 32 | Eevent = Eevent + destep
|
|---|
| 33 | *
|
|---|
| 34 | * *** histo edep longitudinal profile
|
|---|
| 35 | xlen = 0.5*sizeX + vect(1)
|
|---|
| 36 | ih = 1
|
|---|
| 37 | if (histo(ih))
|
|---|
| 38 | & call hfill (ih,xlen/histUnit(ih),0.,fnorm*destep)
|
|---|
| 39 | *
|
|---|
| 40 | * *** histo step size
|
|---|
| 41 | ih = 0
|
|---|
| 42 | if (istak.eq.0) ih = 4
|
|---|
| 43 | if (istak*charge.ne.0.) ih = 7
|
|---|
| 44 | if ((ih.gt.0).and.(histo(ih)))
|
|---|
| 45 | & call hfill (ih,step/histUnit(ih),0.,1.)
|
|---|
| 46 | *
|
|---|
| 47 | END
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.