#include <stdlib.h>#include <stdio.h>#include <math.h>#include <gsl/gsl_multimin.h>#include "globes/globes.h"#include "nova-globes.h"Go to the source code of this file.
Defines | |
| #define | NSAMPLEX 20 |
| #define | NSAMPLEY 100 |
| #define | SSTTLOW 0.0 |
| #define | SSTTHIGH 0.10 |
Functions | |
| void | cp_sens () |
|
|
|
|
|
|
|
|
Definition at line 14 of file cp_sens.c. Referenced by cp_sens(), hier_sens(), and ssttdcp_scan(). |
|
|
Definition at line 13 of file cp_sens.c. Referenced by cp_sens(), hier_sens(), and ssttdcp_scan(). |
|
|
Definition at line 16 of file cp_sens.c. References run_name(), SSTTHIGH, SSTTLOW, test_hierarchy(), test_ldms(), test_sdms(), test_theta12(), test_theta13(), and test_theta23(). Referenced by main(). 00017 {
00018 int i, j, k, l, m;
00019 double theta12 = test_theta12();
00020 double theta13 = test_theta13();
00021 double theta23 = test_theta23();
00022 double sdm = test_sdms();
00023 double ldm = test_ldms();
00024 double otheta23;
00025 double sstt13;
00026 double theta13_test;
00027 double sstt13_test;
00028 double dcp;
00029 double chi2;
00030 double bestchi2;
00031 glb_params test_values = glbAllocParams();
00032 glb_params true_values = glbAllocParams();
00033
00034 /* Pick a theta23 in the other octant */
00035 otheta23 = 0.5*M_PI-theta23;
00036
00037 /* Set the true parameters */
00038 if (test_hierarchy()>0) {
00039 glbDefineParams(true_values,
00040 theta12, theta13, theta23, dcp,
00041 sdm, sdm+ldm);
00042 glbDefineParams(test_values,
00043 theta12, theta13, theta23, dcp,
00044 sdm, sdm+ldm);
00045 }
00046 else {
00047 glbDefineParams(true_values,
00048 theta12, theta13, theta23, dcp,
00049 sdm, -ldm);
00050 glbDefineParams(test_values,
00051 theta12, theta13, theta23, dcp,
00052 sdm, -ldm);
00053 }
00054 glbSetDensityParams(true_values, 1.0, GLB_ALL);
00055 glbSetDensityParams(test_values, 1.0, GLB_ALL);
00056
00057 char fname[256];
00058 sprintf(fname,"%s_cp_sens.txt",run_name());
00059 FILE* fp = fopen(fname,"w");
00060 for (i=0; i<NSAMPLEX; ++i) {
00061 sstt13 = SSTTLOW+(SSTTHIGH-SSTTLOW)*((float)i+0.5)/NSAMPLEX;
00062 theta13 = 0.5*asin(sqrt(sstt13));
00063 for (j=0; j<NSAMPLEY; ++j) {
00064 dcp = 2.0*M_PI*((float)j+0.5)/NSAMPLEY;
00065 bestchi2 = 1e30;
00066
00067 /* Set the oscillations parameters for the true point */
00068 glbSetOscParams(true_values, theta13, GLB_THETA_13);
00069 glbSetOscParams(true_values, dcp, GLB_DELTA_CP);
00070 glbSetOscillationParameters(true_values);
00071 glbSetRates();
00072
00073 int which_dcp;
00074 int which_hier;
00075 int which_oct;
00076 for (l=0; l<8; ++l) {
00077 /* Test several cases for the data */
00078 which_dcp = (l/4)%2;
00079 which_hier = (l/2)%2;
00080 which_oct = (l/1)%2;
00081 if (which_dcp) glbSetOscParams(test_values, 0.00, GLB_DELTA_CP);
00082 else glbSetOscParams(test_values, M_PI, GLB_DELTA_CP);
00083 if (which_hier) glbSetOscParams(test_values, sdm+ldm, GLB_DM_31);
00084 else glbSetOscParams(test_values, -ldm, GLB_DM_31);
00085 if (which_oct) glbSetOscParams(test_values, theta23, GLB_THETA_23);
00086 else glbSetOscParams(test_values, otheta23, GLB_THETA_23);
00087
00088 /* Now find the best theta13 value for this case */
00089 for (m=0; m<NSAMPLEX; ++m) {
00090 sstt13_test = 0.0+0.1*((float)m+0.5)/NSAMPLEX;
00091 theta13_test = 0.5*asin(sqrt(sstt13_test));
00092 glbSetOscParams(test_values, theta13_test, GLB_THETA_13);
00093
00094 chi2 = glbChiSys(test_values, GLB_ALL, GLB_ALL);
00095 if (chi2<bestchi2) bestchi2 = chi2;
00096 }
00097 } /* l potentially ambiguous solutions */
00098 fprintf(fp,"%f %f %f\n", sstt13, dcp/M_PI, bestchi2);
00099 } /* j samples in delta_CP */
00100 } /* i samples in sstt13 */
00101 fclose(fp);
00102 }
|
1.3.9.1