I want to use ENDSCP in carbon beam to shift energy distribution when particles enter a specific region. After reading manual, i still have some questions:
How to active this user routine? I tried USERWEIG. The ENDSCP was with COMSCW. Should I use them together?
How can I modify the ZTRUNK to make energy shift? Is it the distance i want to shift? then what’s the unit for this distance?
I think I understand how to use this user routine ENDSCP simplely. I made a mistake which i want to active it in a region not in scoring. The code as below can shift BraggPeak with 1 cm. And COMSCW is not needed to couple with ENDSCP.
DIMENSION ZTRUCK (0:NTRUCK)
double precision ZTRUCK
LOGICAL LFIRST
SAVE LFIRST
DATA LFIRST / .TRUE. /
IF (LFIRST) THEN
WRITE(LUNOUT,*) 'ROUTINE ENDSCP CALLED'
LFIRST = .FALSE.
ENDIF
DO I=0,NTRUCK
ZTRUCK(I)=ZTRUCK(I)+ 1
ENDDO
RETURN
Sorry for coming late. I just wanted to highlight some of your findings:
as you successfully experienced and pointed out above, one does not need to use also comscw, but can stay with endscp alone, to be activated by the USERWEIG card;
as you realized, in agreement with the manual, the unit for the shift distance is cm.
Moreover, one should be aware that such a scoring shift (that does not alter the actual particle tracking) works only for a Cartesian USRBIN grid and applies only to continuous energy deposition, and not to point energy deposition occurrences (that do not get shifted).
Thanks for putting a spotlight on this FLUKA feature.