|
@@ -0,0 +1,17 @@
|
|
|
+double getResolution(double ctheta0, int N){
|
|
|
+ double s=0;
|
|
|
+ for (int i=0;i<N;i++){
|
|
|
+ double ctheta=1-(i+0.5)/(N-1.0)*(1-ctheta0);
|
|
|
+ double stheta2=1-ctheta*ctheta;
|
|
|
+ s+=stheta2;
|
|
|
+ }
|
|
|
+ return s/N;
|
|
|
+}
|
|
|
+
|
|
|
+double getResolutionT(double ctheta0, int N){
|
|
|
+ double s=0;
|
|
|
+ for (int i=0;i<N;i++){
|
|
|
+ double ctheta=1-(i+0.5)/(N-1.0)*(1-ctheta0);
|
|
|
+ s+=ctheta*ctheta;
|
|
|
+ }
|
|
|
+ return s/N;
|