Commit e3267f66 authored by Pedro Widniczck's avatar Pedro Widniczck

Replace vs_e_gammas.c

parent 18f00350
......@@ -9,8 +9,9 @@
int main(){
FILE *summary, *details;
FILE *paraanimacao;
int Ntracks = 1, Nevents = 1; //
int Ntracks = 20, Nevents = 1; //
int numeros[Ntracks*Nevents][2], num[Nevents][2]; // VARIAVEIS
float p[Ntracks*Nevents][3]; // NECESSARIAS
float mass[Ntracks*Nevents], charge[Ntracks*Nevents]; // PARA LER OS
......@@ -23,7 +24,8 @@ int main(){
details = fopen("events_detail.txt","r"); // ABRE O ARQUIVO DE LEITURA DETAILS
summary = fopen("events_summary.txt","r"); // ABRE O ARQUIVO DE LEITURA SUMMARY
summary = fopen("events_summary.txt","r"); // ABRE O ARQUIVO DE LEITURA SUMMARY
paraanimacao = fopen("events_animacao.txt","w"); // ABRE ARQUIVO PARA IMPRESSAO
for(i=0;i<Ntracks*Nevents;i++){ //
......@@ -114,10 +116,12 @@ int main(){
vel[k][0] = sqrt(1 - vt[k]*vt[k])*p[k][0]/mass[k];
vel[k][1] = sqrt(1 - vt[k]*vt[k])*p[k][1]/mass[k];
vel[k][2] = sqrt(1 - vt[k]*vt[k])*p[k][2]/mass[k];
printf("%d %f %f %f %f %f %f %f \n",i,v[i][0],v[i][1],v[i][2],vel[k][0],vel[k][1],vel[k][2], omega[k]);
fprintf(paraanimacao,"%d %f %f %f %f %f %f %f \n",i,v[i][0],v[i][1],v[i][2],vel[k][0],vel[k][1],vel[k][2], omega[k]);
j++;
k++;
}
}
fclose(paraanimacao);
}
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