Changeset 149 for GLBFrejus/HEAD/src
- Timestamp:
- May 30, 2006, 11:09:42 AM (18 years ago)
- Location:
- GLBFrejus/HEAD/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GLBFrejus/HEAD/src/discoCP.cxx
r2 r149 30 30 7/7/05 JEC introduce the Mass hierachy and Octant degeneracy from Th.Schwetz 31 31 8/7/05 JEC introduce data card management 32 17/5/06 JEC add TEST_OCTANT to avoid pb if theta23=pi/4. 32 33 */ 33 34 … … 35 36 #define DELTA_0 0.0 36 37 #define DELTA_PI M_PI 38 #define TEST_OCTANT false 37 39 38 40 … … 47 49 //--------------------------------------------------------------------- 48 50 bool test_th23(glb_params fit_values) { 49 double fit_th23 = glbGetOscParams(fit_values, GLB_THETA_23); 50 51 // testing if fit_th23 is at the same side as the true value 52 53 return ( 54 (WRONG_TH23 == 0 && 55 (TH23 > M_PI/4. && fit_th23 > M_PI/4.) || 56 (TH23 < M_PI/4. && fit_th23 < M_PI/4.)) 57 || 58 (WRONG_TH23 == 1 && 59 (TH23 > M_PI/4. && fit_th23 < M_PI/4.) || 60 (TH23 < M_PI/4. && fit_th23 > M_PI/4.)) 61 ); 51 if(TEST_OCTANT) { 52 double fit_th23 = glbGetOscParams(fit_values, GLB_THETA_23); 53 54 // testing if fit_th23 is at the same side as the true value 55 56 return ( 57 (WRONG_TH23 == 0 && 58 (TH23 > M_PI/4. && fit_th23 > M_PI/4.) || 59 (TH23 < M_PI/4. && fit_th23 < M_PI/4.)) 60 || 61 (WRONG_TH23 == 1 && 62 (TH23 > M_PI/4. && fit_th23 < M_PI/4.) || 63 (TH23 < M_PI/4. && fit_th23 > M_PI/4.)) 64 ); 65 } 66 return true; 62 67 }//same_th23 63 68 … … 101 106 102 107 fileDataCard >> DUMMYSTR >> WRONG_TH23; 103 std::cout << DUMMYSTR << WRONG_TH23 << std::endl;108 std::cout << DUMMYSTR << " " << WRONG_TH23 << std::endl; 104 109 fileDataCard >> DUMMYSTR >> WRONG_HIER; 105 std::cout << DUMMYSTR << WRONG_HIER << std::endl;110 std::cout << DUMMYSTR << " " << WRONG_HIER << std::endl; 106 111 fileDataCard >> DUMMYSTR >> TH12; 107 std::cout << DUMMYSTR << TH12 << std::endl;112 std::cout << DUMMYSTR << " " << TH12 << std::endl; 108 113 fileDataCard >> DUMMYSTR >> TH23; 109 std::cout << DUMMYSTR << TH23 << std::endl;114 std::cout << DUMMYSTR << " " << TH23 << std::endl; 110 115 fileDataCard >> DUMMYSTR >> DMQ21; 111 std::cout << DUMMYSTR << DMQ21 << std::endl;116 std::cout << DUMMYSTR << " " << DMQ21 << std::endl; 112 117 fileDataCard >> DUMMYSTR >> DMQ31; 113 std::cout << DUMMYSTR << DMQ31 << std::endl;118 std::cout << DUMMYSTR << " " << DMQ31 << std::endl; 114 119 fileDataCard >> DUMMYSTR >> ROOTFILENAME; 115 120 … … 127 132 128 133 fileDataCard >> DUMMYSTR >> ND; 129 std::cout << DUMMYSTR << ND << std::endl;134 std::cout << DUMMYSTR << " " << ND << std::endl; 130 135 fileDataCard >> DUMMYSTR >> NTH; 131 std::cout << DUMMYSTR << NTH << std::endl;136 std::cout << DUMMYSTR << " " << NTH << std::endl; 132 137 fileDataCard >> DUMMYSTR >> LOG10MIN; 133 std::cout << DUMMYSTR << LOG10MIN << std::endl;138 std::cout << DUMMYSTR << " " << LOG10MIN << std::endl; 134 139 fileDataCard >> DUMMYSTR >> LOG10MAX; 135 std::cout << DUMMYSTR << LOG10MAX << std::endl;140 std::cout << DUMMYSTR << " " << LOG10MAX << std::endl; 136 141 137 142 … … 184 189 // minimizer 185 190 glb_params input_errors = glbAllocParams(); 191 //JEC 17-05-06 use 10% except for Dm2_21 4% 192 // glbDefineParams(input_errors, 193 // TH12*0.05, 0., TH23*0.30, 0., 194 // DMQ21*0.05, fabs(DMQ31)*0.30); 186 195 glbDefineParams(input_errors, 187 TH12*0. 05, 0., TH23*0.30, 0.,188 DMQ21*0.0 5, fabs(DMQ31)*0.30);196 TH12*0.10, 0., TH23*0.10, 0., 197 DMQ21*0.04, fabs(DMQ31)*0.10); 189 198 glbSetDensityParams(input_errors, 0.05, GLB_ALL); 190 199 glbSetInputErrors(input_errors); … … 213 222 214 223 for(int j = 0; j < ND; j++) { 215 //scan de 0 a + Pi pour delta_CP216 delta = M_PI * double(j) / (ND-1);224 //scan de 0 a +2Pi pour delta_CP 225 delta = 2.0 * M_PI * double(j) / (ND-1); 217 226 218 227 std::cout << "Consider (k,j) = (" << k << "," << j << ")" << std::endl; -
GLBFrejus/HEAD/src/discoTheta13.cxx
r4 r149 24 24 experiment may be fit by Theta13 = 0 25 25 the true values are used to build the referenced experiments 26 use chi2Theta to marginalized over all parameters except Theta 26 use chi2Delta to marginalized over all parameters except delta 27 27 28 28 29 11/7/05 JEC creation 29 31/10/05 JEC correct the comment chi2Theta30 30 */ 31 31 32 32 33 33 #define TH13_0 0.0 34 #define TEST_OCTANT false 34 35 35 36 int WRONG_TH23, WRONG_HIER; //condition on octant/hierarchy … … 43 44 //--------------------------------------------------------------------- 44 45 bool test_th23(glb_params fit_values) { 45 double fit_th23 = glbGetOscParams(fit_values, GLB_THETA_23); 46 47 // testing if fit_th23 is at the same side as the true value 48 49 return ( 50 (WRONG_TH23 == 0 && 51 (TH23 > M_PI/4. && fit_th23 > M_PI/4.) || 52 (TH23 < M_PI/4. && fit_th23 < M_PI/4.)) 53 || 54 (WRONG_TH23 == 1 && 55 (TH23 > M_PI/4. && fit_th23 < M_PI/4.) || 56 (TH23 < M_PI/4. && fit_th23 > M_PI/4.)) 57 ); 46 if(TEST_OCTANT) { 47 double fit_th23 = glbGetOscParams(fit_values, GLB_THETA_23); 48 49 // testing if fit_th23 is at the same side as the true value 50 51 return ( 52 (WRONG_TH23 == 0 && 53 (TH23 > M_PI/4. && fit_th23 > M_PI/4.) || 54 (TH23 < M_PI/4. && fit_th23 < M_PI/4.)) 55 || 56 (WRONG_TH23 == 1 && 57 (TH23 > M_PI/4. && fit_th23 < M_PI/4.) || 58 (TH23 < M_PI/4. && fit_th23 > M_PI/4.)) 59 ); 60 } 61 return true; 58 62 }//same_th23 59 63 -
GLBFrejus/HEAD/src/sensi.cxx
r2 r149 25 25 use glbChiDeltaTheta to marginalized other all parameters except of 26 26 the current delta and theta 27 28 24/10/05 (JEC) 29 . transfert the #defined variables to Data Cards 30 . polish the code 31 27 32 */ 28 //FIXME: transfert the #defined variables to Data Cards 29 #define TH12 ( 0.5 * asin(sqrt(0.82)) ) 30 #define TH23 ( M_PI/4.0 ) 31 32 #define TH13 0.0 33 #define DELTA 0.0 34 35 #define DMQ21 8.2e-5 36 #define DMQ31 2.5e-3 37 38 39 int WRONG_TH23, WRONG_HIER; 40 33 34 float TH12, TH23,DMQ21,DMQ31; //theta12,theta23,Dm^2_21,Dm^2_31 35 36 //The true value Theta13 and Delta_CP 37 #define TH13_0 0.0 38 #define DELTA_0 0.0 39 40 int ND; //number of bins to scan delta parameter [-pi,+pi] 41 int NTH; //number of bins to scan theta13 parameter 42 float LOG10MIN; //minimal Log10(sin^2(2theta13)) 43 float LOG10MAX; //minimal Log10(sin^2(2theta13)) 41 44 42 45 /**************************************/ … … 46 49 int main(int argc, char *argv[]) 47 50 { 51 //Process data card file 52 std::string ROOTDIR = getenv("GLBFREJUSROOT"); 53 std::string DATACARD; 54 DATACARD = ROOTDIR + "/run/sensi.data"; 55 std::ifstream fileDataCard; 56 std::cout << "Open DataCard file : " << DATACARD <<std::endl; 57 fileDataCard.open(DATACARD.data()); 58 std::string DUMMYSTR; //comment string of the variables 59 60 std::string ROOTFILENAME; 61 62 fileDataCard >> DUMMYSTR >> TH12; 63 std::cout << DUMMYSTR << TH12 << std::endl; 64 fileDataCard >> DUMMYSTR >> TH23; 65 std::cout << DUMMYSTR << TH23 << std::endl; 66 fileDataCard >> DUMMYSTR >> DMQ21; 67 std::cout << DUMMYSTR << DMQ21 << std::endl; 68 fileDataCard >> DUMMYSTR >> DMQ31; 69 std::cout << DUMMYSTR << DMQ31 << std::endl; 70 fileDataCard >> DUMMYSTR >> ROOTFILENAME; 71 ROOTFILENAME += ".root"; 72 std::cout << DUMMYSTR <<ROOTFILENAME << std::endl; 73 74 fileDataCard >> DUMMYSTR >> ND; 75 std::cout << DUMMYSTR << ND << std::endl; 76 fileDataCard >> DUMMYSTR >> NTH; 77 std::cout << DUMMYSTR << NTH << std::endl; 78 fileDataCard >> DUMMYSTR >> LOG10MIN; 79 std::cout << DUMMYSTR << LOG10MIN << std::endl; 80 fileDataCard >> DUMMYSTR >> LOG10MAX; 81 std::cout << DUMMYSTR << LOG10MAX << std::endl; 82 83 48 84 //init AIDA for Histo/Tuple 49 85 AIDA::IAnalysisFactory* aida = AIDA_createAnalysisFactory(); … … 57 93 std::string opts = "export=root"; 58 94 AIDA::ITree* fTree = 59 treeFactory->create( "SPLDeltaTheta2+8OldFluxCorr.root","root",false,true,opts);95 treeFactory->create(ROOTFILENAME,"root",false,true,opts); 60 96 delete treeFactory; 61 97 … … 88 124 // true values (reference for future Chi2 computations) 89 125 glb_params true_values = glbAllocParams(); 90 glbDefineParams(true_values, TH12, TH13 , TH23, DELTA, DMQ21, DMQ31);126 glbDefineParams(true_values, TH12, TH13_0, TH23, DELTA_0, DMQ21, DMQ31); 91 127 glbPrintParams(stdout,true_values); 92 128 … … 96 132 // set Starting Values 97 133 glb_params start_values = glbAllocParams(); 98 glbDefineParams(start_values, TH12, TH13 , TH23, DELTA, DMQ21, DMQ31);134 glbDefineParams(start_values, TH12, TH13_0, TH23, DELTA_0, DMQ21, DMQ31); 99 135 glbSetStartingValues(start_values); 100 136 glbPrintParams(stdout,start_values); … … 103 139 // init test values 104 140 glb_params test_values = glbAllocParams(); 105 glbDefineParams(test_values, TH12, TH13 , TH23, DELTA, DMQ21, DMQ31);141 glbDefineParams(test_values, TH12, TH13_0, TH23, DELTA_0, DMQ21, DMQ31); 106 142 glbPrintParams(stdout,test_values); 107 143 … … 122 158 123 159 124 #define ND 31125 #define NTH 41126 #define LOG10MIN -4.0127 #define LOG10MAX -1.0128 129 160 std::cout << "Start to loop...." << std::endl; 130 161 … … 147 178 glbSetOscParams(test_values, th, GLB_THETA_13); 148 179 180 std::cout << "Consider (k,j) = (" << k << "," << j << ")" << std::endl; 149 181 //Param correlation 150 182 res = glbChiThetaDelta(test_values,fit_values,0); 151 152 std::cout << "delta j:" << j << " theta13 k:" << k 153 << " chi2 : " << res 154 << std::endl; 155 183 184 185 //For sensitivity plot store the outcome of the fit 156 186 fit_theta12 = glbGetOscParams(fit_values, GLB_THETA_12); 157 187 fit_theta13 = glbGetOscParams(fit_values, GLB_THETA_13);
Note: See TracChangeset
for help on using the changeset viewer.