lape
  LAPE e-log  ELOG logo
Fields marked with * are required
Entry time:Mon Apr 9 21:38:55 2012
Author*:
Type*:
Category:
Subject:

Encoding:
        
Attachment 1: fotomultiplicadoras.JPG   
fotomultiplicadoras.JPG
Attachment 2: esquema_1.JPG   
esquema_1.JPG
Attachment 3: esquema_2.JPG   
esquema_2.JPG
Attachment 4: dados_C3.dat   
#voltagem(V)    tempo(s)  contagem          contagem
#                         sem radiacao      com radiacao 

1840              10         125                225 
1900              10         295                2170 
1950              10         416                12132
2000              10         638                35051 
2050              10         1504               61513  
2100              10         5018               850000  
Attachment 5: foto.JPG   
foto.JPG
Attachment 6: calc_erro.C   

                            /******************************************************
                             Programm for make an error of binomial distribuction 
                             *****************************************************
                                        Calcule the error for efficiency
                             *****************************************************/ 



// Programmer: Saullo C. Esterque Rodrigues
// e-mail: scardoso.fisis@gmail.com         <<< For suggestion or question not spam !!!

// For compiler tipe in Terminal: $ gcc -o <name_executable> <name_programm.c> -lm
// for execute tipe: $ ./<name>

#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int main(){

printf("\n\n\n*******************************************************\nProgramm for make an error of binomial distribuction\n*****************************************************\nCalcule the error for efficiency\n******************************************************\n\n\n\n");

// Define Variables =================

int Ntres, Ndois,NtresF,NdoisF, NtresT, NdoisT;// number of coincidence for 3 cintilator, number of coinc. for 2 cint. normal, false and true
int dT, dTF; //time for coincidence and false coincidence in second
double error;// error in efficiency
double efic; // efficiency
int YN;
// ==================================


printf("\n\nTell me the number of coincidence for 3 cinttilator:  \n");
scanf("%d",&Ntres);

printf("\n\nTell me the number of coincidence for 2 cinttilator:  \n");
scanf("%d",&Ndois);
printf("Tell me the time (in second) with you use for coincidence:  \n");
scanf("%d",&dT);

// for use false coincidence
printf("You have tell me the number of false coincidence ???\n  1 for YES\n  0 for NO:  ");
scanf("%d",&YN);

if (YN == 1){

printf("\n\nTell me the number of FALSE coincidence for 3 cinttilator:  \n");
scanf("%d",&NtresF);
printf("\n\nTell me the number of FALSE coincidence for 2 cinttilator:  \n");
scanf("%d",&NdoisF);
printf("Tell me the time (in second) with you use for FALSE coincidence:  \n");
scanf("%d",&dTF);


// true number of coincidence
NtresT = ( Ntres - NtresF*pow(dTF,-1)*dT);
printf("Number of real coincidence for 3 is: %d\n",NtresT);

NdoisT = ( Ndois - NdoisF*pow(dTF,-1)*dT);
printf("Number of real coincidence for 2 is: %d\n",NdoisT);

efic = NtresT*pow(NdoisT,-1); //calculle efficiency
printf("\nYour efficiency is:  %lf\n",efic);

error = sqrt( NtresT*(1 - efic)*pow(NdoisT,-2)) ;
printf ("Error for this efficience: %lf\n\n\n",error);  //calcule efficiency error

}//end if

else{

efic = Ntres*pow(Ndois,-1); //calculle efficiency
printf("\nYour efficiency is:  %lf\n",efic);

error = sqrt( Ntres * (1 - efic)*pow(Ndois,-2) );
printf ("Error for this efficience: %lf\n\n\n",error);  //calcule efficiency error

}//end else if


return 0;

}//close main
Attachment 7: calc_erro   
Attachment 8:   
Drop attachments here...
ELOG V3.1.3-