getResoultion.C 416 B

1234567891011121314151617
  1. double getResolution(double ctheta0, int N){
  2. double s=0;
  3. for (int i=0;i<N;i++){
  4. double ctheta=1-(i+0.5)/(N-1.0)*(1-ctheta0);
  5. double stheta2=1-ctheta*ctheta;
  6. s+=stheta2;
  7. }
  8. return s/N;
  9. }
  10. double getResolutionT(double ctheta0, int N){
  11. double s=0;
  12. for (int i=0;i<N;i++){
  13. double ctheta=1-(i+0.5)/(N-1.0)*(1-ctheta0);
  14. s+=ctheta*ctheta;
  15. }
  16. return s/N;