Skip to content

Commit

Permalink
Update gammapkt.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 16, 2024
1 parent c353346 commit 7d0a27e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gammapkt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7d0a27e

Please sign in to comment.