From 7d0a27ea75280847c164b06d2b3abc9f75da0c90 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Mon, 16 Sep 2024 14:09:04 +0100 Subject: [PATCH] Update gammapkt.cc --- gammapkt.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gammapkt.cc b/gammapkt.cc index 911466480..01965ee4e 100644 --- a/gammapkt.cc +++ b/gammapkt.cc @@ -696,9 +696,12 @@ void pair_prod(Packet &pkt) { } if (rng_uniform() > prob_gamma) { + // Convert it to an e-minus packet - actually it could be positron EK too, but this works + // for consistency with compton_scatter. + pkt.type = TYPE_NONTHERMAL_PREDEPOSIT_BETAMINUS; // Convert it to an e-minus or positron kinetic energy packet + // pkt.type = (rng_uniform() > 0.5) ? TYPE_NONTHERMAL_PREDEPOSIT_BETAMINUS : TYPE_NONTHERMAL_PREDEPOSIT_BETAPLUS; // nu_cmf stays the same as the gamma energy becomes the kinetic energy of the electron - pkt.type = (rng_uniform() > 0.5) ? TYPE_NONTHERMAL_PREDEPOSIT_BETAMINUS : TYPE_NONTHERMAL_PREDEPOSIT_BETAPLUS; pkt.absorptiontype = -5; stats::increment(stats::COUNTER_NT_STAT_FROM_GAMMA); } else {