소스 검색

Adding root resolution script to generate resolution along z

Andrej 5 년 전
부모
커밋
c6fdabcaa7
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17 0
      getResoultion.C

+ 17 - 0
getResoultion.C

@@ -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;