------------------------------------------------------ Argument list: IJ : particle type (input only, cannot be modified) PLA : particle momentum (if > 0), or -PLA = kinetic energy (if < 0) TXX,TYY,TZZ: particle current direction cosines WEE : particle weight XX,YY,ZZ: particle position NREG : current region (after boundary crossing) IOLREG : previous region (before boundary crossing). Useful only whith boundary crossing estimators; for other estimators it has no meaming. LLO : particle generation (input only, cannot be modified) ICALL : internal code calling flag (not for general use) Function FLUSCW is activated by option USERWEIG, withWHAT(3)> 0.0. Yields obtained via USRYIELD, fluences calculated with USRBDX, USRTRACK, USRCOLL, USRBIN, and currents calculated with USRBDX are multiplied by the value returned by this function. The user can implement any desired logic to differentiate the returned value according to any information contained in the argument list (particle type, energy, direction, weight, position, region, boundary, particle generation), or information available in the SCOHLP COMMON block (binning or detector number, estimator type). The scored quantity is given by the flag ISCRNG (in SCOHLP): ISCRNG = 1 --> Boundary crossing estimator ISCRNG = 2 --> Track length binning ISCRNG = 3 --> Track length estimator ISCRNG = 4 --> Collision density estimator ISCRNG = 5 --> Yield estimator The binning/detector number is given by JSCRNG (in SCOHLP) and is printed in output: Bdrx n. 2 "bdxname" , generalised particle n. 8, from region n. 22 to region n. 78 Track n. 6 "trkname" , generalised particle n. 14, region n. 9. Note that a track-length detector can have the same JSCRNG number as a boundary crossing one or a binning etc. (use the value of ISCRNG to discriminate). Further information can be obtained including COMMON TRACKR (for instance particle age). TRACKR contains also special user variables (both integer and in double precision) which can be used to save information about particles which have undergone some particular event. Function FLUSCW has many applications. A common one is conditional scoring (score only if within a certain distance from a point, etc.): for instance it is possible to implement a sort of 2-dimensional fluence binning on a plane boundary. FLUSCW can be used also when scoring "fluxes" (i.e. fluences or currents or yields) of heavy ions, to discriminate between different types of ions. All ions in FLUKA carry the same id-number IJ = -2: therefore ion fluxes obtained by the various estimators will refer to all ions unless an additional discrimination is introduced by the user at scoring time. This can be done in FLUSCW as follows: CALL USRDCI(IJ,IONA,IONZ,IONM) The three integer values returned are the following ion properties: IONA = mass number of the ion IONZ = atomic number IONM = flag for isomeric state Based on their values, the user can decide or not to accept the scoring. Other interesting applications are based on the fact that FLUSCW is called at every boundary crossing, provided that at least one USRBDX detector has been requested. Although the function has been designed mainly to weight scored quantities, it can be "cheated" to do all sorts of side things, even not directly connected with scoring. Note that the variables in the argument list, with the exception of IJ, LLO and ICALL, are local copies of those used for particle transport, and therefore can be modified to have an effect on scoring, without affecting transport. If name-based input is being used, the names corresponding to NREG and IOLREG can be obtained via a call to routine GEOR2N: CALL GEOR2N (NUMREG, NAMREG, IERR) where NUMREG (input variable) is the region number, and NAMREG (returned variable) is the corresponding region name (to be declared as CHARACTER*8). IERR is a returned error code: if = 0, the conversion is successful. See example in the description of BXDRAW below.Note:setting the variable LSCZER (in SCOHLP) = .TRUE. before RETURN, will cause zero scoring whatever the value returned by FLUSCW. This is more efficient than returning a zero value.
Previous Index Next