Skip to content

Commit

Permalink
Fix the energy scaling of the generated photons
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Jan 8, 2025
1 parent 2dcd95a commit c50b855
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@ public:
auto& uz1 = soa_products_data[0].m_rdata[PIdx::uz][product_index];

// Normalize out the electron velocity and multiply by the photon momentum, E/c
// Also, the photon momentum is normalized by m_e
auto u1 = std::sqrt(ux1*ux1 + uy1*uy1 + uz1*uz1);
ux1 *= (p_product_data[i]/PhysConst::c)/u1;
uy1 *= (p_product_data[i]/PhysConst::c)/u1;
uz1 *= (p_product_data[i]/PhysConst::c)/u1;
ux1 *= (p_product_data[i]/PhysConst::c)/u1/PhysConst::m_e;
uy1 *= (p_product_data[i]/PhysConst::c)/u1/PhysConst::m_e;
uz1 *= (p_product_data[i]/PhysConst::c)/u1/PhysConst::m_e;
}
});

Expand Down

0 comments on commit c50b855

Please sign in to comment.