Skip to content

Commit

Permalink
using v_t for calcualtion of p2 , no longer assuming target in rest
Browse files Browse the repository at this point in the history
  • Loading branch information
Itay-max committed Oct 25, 2022
1 parent 65f3033 commit 52d337e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tallies/tally_scoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3088,7 +3088,10 @@ void getMu_COM(double x_det , double y_det , double z_det ,Particle p_col , doub
std::cout << "p1: "<< p1[0] <<" "<< p1[1]<<" " <<p1[2] <<std::endl;
std::cout << "p2: "<< (p_col.v_t() * m2 / C_LIGHT).x <<" " <<(p_col.v_t() * m2 / C_LIGHT).y << " "<<(p_col.v_t() * m2 / C_LIGHT).z <<std::endl;
//std::cout << (p.v_t() * m2 / C_LIGHT).x << (p.v_t() * m2 / C_LIGHT).y << (p.v_t() * m2 / C_LIGHT).z <<std::endl;
double p2[3]={0, 0, 0}; //3 momentum of target in lab
double p2_x = (p_col.v_t() * m2 / C_LIGHT).x;
double p2_y = (p_col.v_t() * m2 / C_LIGHT).y;
double p2_z = (p_col.v_t() * m2 / C_LIGHT).z;
double p2[3]={p2_x, p2_y, p2_z}; //3 momentum of target in lab

// calculate
double Fp1[4]; //four momentum of incoming particle in LAB
Expand Down

0 comments on commit 52d337e

Please sign in to comment.