Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /pfRICH/curves/beta.cc was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #include <math.h>
0002 #include <stdio.h>
0003 
0004 static double velocity(double p, double m)
0005 {
0006   return p/sqrt(m*m + p*p);
0007 } /* velocity */
0008 
0009 #define _MPI_      (0.140)
0010 #define _MK_       (0.494)
0011 #define _MP_       (0.938)
0012 #define _ME_       (0.0005)
0013 
0014 // Light velocity --> mm/ns
0015 #define _LIGHT_VELOCITY_     299.79
0016 
0017 int main( void )
0018 {
0019   double m1 = _ME_, m2 = _MPI_, p = 1.0, l = 1200.;
0020   double v1 = velocity(p, m1), v2 = velocity(p, m2);
0021   double t1 = l / (_LIGHT_VELOCITY_*v1), t2 = l / (_LIGHT_VELOCITY_*v2);
0022 
0023   printf("%f %f -> %f %f -> %5.2f\n", v1, v2, t1, t2, 1000*(t2-t1)); 
0024 } // main()