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