Recording position of particles when KE goes below EMFCUT

Dear Experts and Users
My simulation consists of monitoring positrons produced in Tungsten via pair production (this is in continuation of my earlier queries!). I want to record the position at the moment when the positron KE drops below the threshold defined by EMFCUT. I have modified an earlier mgdraw routine. I am using ENDRAW entry. The instance of positron KE dropping below transport threhold is ensured by ICODE =22. Is this the correct way to go? Can somebody please take a look at the ENDRAW part of the code?
Also, manual says ICODE = 21 and 22 both should work. But 21 gives blank output. what might be the problem?
Also, is there a way to record only positron annihilations?
sincerely
saurabh mukherjee
slow_e+.inp (4.3 KB) mgdraw_pos_yield.f (4.2 KB)

Dear Saurabh,

Good to have you back!

Indeed, the manual is maybe not as explicit as it could be: 21 is for e-/e+ below production threshold (seldom needed), whereas 22 is below transport threshold (what you want). Will be clarified.

To score positron annihilation i’d go in USDRAW and consider ICODE 214 (positron annihilation in flight) and 215 (at rest).

Cesc

1 Like

Dear Cesc
thank you for the answer!
sincerely
saurabh