Modify fluscw.f with user defined conversion factors

Dear expert,

Continuing the discussion from How to score air kerma via usrbin:

Can you please guide if the user routine is properly modified? (please note I have not written all the dose conversion factors, only couple of them for testing…). Since I have used two USRBIN scoring, the intention is to get kerma value in 22 bin output and not to modify 21 bin output by the fluscw value. Will it be automatically taken care of ??

65keV.flair (1.2 KB)
65keV.inp (1.7 KB)
fluscw.f (5.6 KB)

Regards,
Riya

Dear @riya,

the general idea is sound, but I have few remarks.

  • Since you are using the fluscw.f routine, for correct results the scoring cards which you want to use for the scoring of air kerma should score ALL-PART, not DOSE-EQ (otherwise you apply other weightings on top).
  • The fluscw.f routine can easily check the SDUM of the scoring card, less easily the region where the scoring is applied (see below)
  • I suggest to make first a filtering by the type of estimator (ISCRNG variable, 2 for USRBIN, 3 for USRTRACK) and then by the scoring SDUM.

You can find attached an updated template of your routine. As a side note, remember that with USRBIN region type scoring you should still divide the estimated results by the region volume to obtain pGy/primary.

Please take your time to have a look at it and let me know in case you have further questions.

Best,
Davide

PS: mind that the first coefficient is 7.43 pGy cm2 :wink:
fluscw.f (6.0 KB)

1 Like

Thank you @dbozzato for the detailed explanation, and also pointing out the first coefficient which I wrote wrong. I am now able to get similar kerma results using both usrbin and usrtrack. Just for complete understanding I have few queries:

  1. To understand the meaning of ISCRNG, I kept two USRBIN card and one USRTRACK card (see the attached image) . Now for these command lines:
  • Get current scoring SDUM for USRBIN or USRTRACK
    IF ( ISCRNG .EQ. 2 ) THEN
       SCORNAM = TITUSB(JSCRNG)
    ELSEIF ( ISCRNG .EQ. 3 ) THEN
       SCORNAM = TITUTC(JSCRNG)
    ELSE
    
  •    Ignore all other estimators (no weighting applied)
       FLUSCW = ONEONE
       RETURN
    ENDIF
    WRITE (*,*) "Selected scoring ", SCORNAM
    

I got pho_det and flux_det in the output. I expected that it will print en_det also. Does this mean the term ISCRNG only refer to ALL_PART or PHOTON or any other particles for that matter, and not refer to ENERGY or DOSE etc.??

  1. With region type scoring in USRBIN, after chosing ALL-PART, in which unit the scoring is stored? I mean ALL-PART or PHOTON etc gives track length, right ? So, in this case, is the unit # cm ? Is this why we have to divide it by volume to convert it into flux unit and thus will get pGy unit in the end after fluscw multiplication?

  2. If I use ISCRNG = 1 → Boundary crossing estimator i.e. USRBDX card, which file do I have to include in the beginning? Is it called ‘usrbdx.inc’? (for e.g. for USRBIN, we write INCLUDE ‘usrbin.inc’)

  3. Instead of adding ALL-PART in usrbin, in this case I can add PHOTON also, right ??

2

Regards,
Riya

Dear @riya,

  1. Fluscw.f applies extra weighting only to fluences calculated by means of USRBIN, USRTRACK, USRBDX (and yields by USRYIELD), not to energy-density and star density quantities (see the USERWEIG page on the manual). This is why you don’t see that en_det is printed out.

  2. Yes, with no weighting applied a fluence scoring with USRBIN region has the units of total track-length (cm as you said). If a weighting is applied, the units of the results will be cm*[unit of the coefficients]. In both cases you have to normalize by the volume to get the correct units.

  3. Yes, that’s correct. You can include ‘usrbdx.inc’ and the corresponding scoring SDUM is TITUSX(JSCRNG).

  4. Also correct, if you are interested only in photons and not other particles (for which you would have to add the coefficients in the routine in any case).

Best,
Davide

1 Like

Thank you so much @dbozzato for the detailed discussion. The topic is clear to me now.

Regards,
Riya

1 Like