Commit 6f93e018 authored by Breno Rilho Lemos's avatar Breno Rilho Lemos 💬
Browse files

Added histogram data

parent 11011ac7
......@@ -87,7 +87,7 @@ int main(int argc, char **argv) {
fscanf(detail,"%lf %lf %lf %lf %lf %lf %lf %lf \n",&m[i],&q[i],&px[i],&py[i],&pz[i],&Vx[i],&Vy[i],&Vz[i]);
lorentz[i] = 1 / sqrt( 1 - (Vx[i]*Vx[i]+Vy[i]*Vy[i]+Vz[i]*Vz[i]) ); // Lorentz factor [SOMETHING FUNNY HERE...]
lorentz[i] = 1 / sqrt( 1 - (Vx[i]*Vx[i]+Vy[i]*Vy[i]+Vz[i]*Vz[i]) ); // Lorentz factor
}
......@@ -106,13 +106,18 @@ int main(int argc, char **argv) {
// Y coordinate = y coordinate of gamaX + y coordinate of gamaY + primary y vertex
// X coordinate = z coordinate of particle (straight line) + primary z vertex
FILE *positions;
FILE *positions, *histogram;
positions = fopen("positions.txt","w");
histogram = fopen("histogram.txt","w");
for(i=0;i<numberOfTracks;i++) { // Loops in each track
// First, print histogram.txt information
fprintf(histogram,"%d %lf\n",i,m[i]);
// Here we consider the momentum to be m * v
// If momentum is zero, R is zero!!
Rx = px[i] / ( q[i] * B ) * 3.335641; // unit conversion to meters
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment