Neutron and isotopes dump with mgdraw.f

Dear professors:
I’m working on simulations for muon-(+) induced background. I want to obtain the position and momentum for each produced neutron as well as the vanishing location. I have tried in the uploaded mgdraw.f which waits for your comments. I’m also wondering how to do the same work for different isotope which seems not to have particle codes. Thank you for your help!

Best
Hechong Han
Te-LS.inp (3.5 KB)
mgdraw.f (3.2 KB)

Dear @hanhechong,

Thank you for your question.

As to what regards the produced neutron, this is rather straightforward. Please find here a user routine
mgdraw.f (5.5 KB) which scores every neutron interaction. This is too much for what you need, so you can additionally filter on ICODE.EQ.100 and/or 101 just for the produced neutrons, but I kept this way to discuss with you the vanishing part of the question.

Could you elaborate a it more on what you mean by vanishing? The neutrons could fall below transport threshold (if you put a higher one than default), or be absorbed in a nuclear interaction.

Please note that you would have to compile this routine by linking with ldpmqmd, since you are also requesting COALESCE above 125 MeV/n. COALESCE slides, no. 19.

I have adjusted your input file without the first OPEN and SOURCE cards.

Best,
Daniel

Thank you for your help! I have carefully studied your comments and codes and rewritten a new mgdraw.f. I divide all reactions into three parts: neutrons only in reactant, neutrons only in product and neutrons in both. Informations are recorded respectively. My purpose is to mark the production and vanishing point of neutron. By vanishing I mean the capture process. I’m sorry that I did not make myself clear last time. Now I have two more questions.

  1. How to record all the reactants? As in the dump file, the JTRACK for every reaction is only one. How could I possibly record both muon and proton in a process like \mu + p \rightarrow \nu_\mu + n
  2. How to do the same record for isotopes in this process? I do not find corresponding particle codes.
    I have uploaded the inp file, newsource.f, mgdraw.f and the dump file.
    Thank you in advance!
    Te-LS.inp (3.3 KB)
    mgdraw.f (6.5 KB)
    newsource.f (7.3 KB)
    dumpfile.txt (9.1 KB)

Dear @hanhechong,

  1. The mother particle for JTRACK is incoming one, and you would be interested in the target as well from what I understand. For your process, in addition to the proton, you could maybe have nuclei that you seem to be interested in.
    From a separate question of yours, I see that you are using the stuprf.f routine, but this will store the information from ALL the subsequent interactions, which might be too much. Alternatively, you could use the mdstck.f subroutine in a similar way.
    To get the target nuclei, you would have to add INCLUDE 'resnuc.inc' to access the parameters that you would be interested in.

  2. The isotopes will not have corresponding particle codes, but you can nevertheless retrieve their A and Z numbers, as suggested in this post:

      IARES  = MOD ( MOD ( IAZTRK , 1000000), 1000  ) 
      IZRES  = MOD ( IAZTRK, 1000000) / 1000
      ISRES  = IAZTRK/ 1000000

Hope this helps.

Best,
Daniel

2 Likes

Dear @dprelipc ,
Thank you for your detailed instructions! I have learned mdstck.f and resnuc.inc these days. However, I don’t know how to use the mdstck.f in a similar way as the sfuprf.f because the former seems not to have these variables like SPAREK to record the information. Anyway, I have included both of them to record the target nuclei. In addition, usrrnc.f is used to record the stopping information for residual nuclei. My question is how to interpret the output 18,0,0 and 0,0,0 respectively for ICRES, IBRES, ISMRES in mdstck.f. What could these two frequently appeared “particles” be?
Best
Hechong Han
mdstck.f (1.7 KB)
usrrnc.f (1.2 KB)
stuprf.f (1.9 KB)
mgdraw.f (10.1 KB)
Te-LS.flair (3.5 KB)
dump file.out (1.9 MB)