Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuFast #38

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CIValidations/FitterValidations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void FitVal(const std::string& Algo, bool MoreTests)
MaCh3Fitter = std::make_unique<mcmc>(FitManager);
} else if (Algo == "PSO") {
FitManager->OverrideSettings("General", "OutputFile", "PSO_Test.root");
FitManager->OverrideSettings("General", "Fitter", "FitTestLikelihood", "true");
MaCh3Fitter = std::make_unique<PSO>(FitManager);
} else if (Algo == "Minuit2") {
#ifdef MaCh3_MINUIT2
Expand Down Expand Up @@ -105,7 +106,7 @@ int main(int argc, char *argv[])
std::vector<std::string> Algo = {"MCMC"};
#ifdef MaCh3_MINUIT2
Algo.push_back("Minuit2");
//Algo.push_back("PSO");
Algo.push_back("PSO");
#endif

bool MoreTests = true;
Expand Down
6 changes: 3 additions & 3 deletions CIValidations/NuOscillatorInterfaceValidations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main() {
" CalculationType: \"Unbinned\"\n"
"\n"
"OscProbCalcerSetup:\n"
" ImplementationName: \"CUDAProb3Linear\"\n"
" ImplementationName: \"NuFASTLinear\"\n"
" OscChannelMapping:\n"
" - Entry: \"Muon:Electron\"\n"
" - Entry: \"Muon:Muon\"\n";
Expand All @@ -38,7 +38,7 @@ int main() {
osc->Setup();

std::vector<double> OscParProp = {0.3, 0.5, 0.020, 7.53e-5,
2.494e-3, 0.0, 1300, 2.6};
2.494e-3, 0.0, 1300, 2.6, 0.5};
osc->CalculateProbabilities(OscParProp);

std::ofstream outFile("NewNuOscOut.txt");
Expand All @@ -63,4 +63,4 @@ int main() {
} else {
MACH3LOG_INFO("Everything is correct");
}
}
}
2 changes: 1 addition & 1 deletion CIValidations/SamplePDFValidations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main(int argc, char *argv[])
outFile << "Likelihood:" << Sample->GetLikelihood() << std::endl;

// Set oscillation parameters and reweight for posterior
std::vector<double> OscParProp = {0.3, 0.5, 0.020, 7.53e-5, 2.494e-3, 0.0, 295, 2.6};
std::vector<double> OscParProp = {0.3, 0.5, 0.020, 7.53e-5, 2.494e-3, 0.0, 295, 2.6, 0.5};
osc->setParameters(OscParProp);
Sample->reweight();

Expand Down
200 changes: 100 additions & 100 deletions CIValidations/TestOutputs/NuOscOut.txt
Original file line number Diff line number Diff line change
@@ -1,101 +1,101 @@
E (GeV) , p(numu->numu) , p(numu->nue)
0.001, 0.2007688, 0.3253087
0.001148154, 0.5336928, 0.3596777
0.001318257, 0.7045855, 0.08390627
0.001513561, 0.8893172, 0.001413872
0.001737801, 0.2775987, 0.2327323
0.001995262, 0.4680089, 0.1592608
0.002290868, 0.618569, 0.09441035
0.002630268, 0.9277779, 0.000463778
0.003019952, 0.9823164, 0.002323159
0.003467369, 0.3496465, 0.496238
0.003981072, 0.1566199, 0.05646514
0.004570882, 0.3924372, 0.5433499
0.005248075, 0.2699862, 0.5772996
0.006025596, 0.2990715, 0.6112116
0.00691831, 0.4402506, 0.4703682
0.007943282, 0.02791257, 0.06867193
0.009120108, 0.03692353, 0.3251549
0.01047129, 0.3088603, 0.3794659
0.01202264, 0.5635867, 0.1579336
0.01380384, 0.1114084, 0.2094709
0.01584893, 0.1813082, 0.3455415
0.01819701, 0.8057608, 0.04562685
0.02089296, 0.002720226, 0.12418
0.02398833, 0.2028323, 0.3106139
0.02754229, 0.1444705, 0.3427793
0.03162278, 0.05894277, 0.25118
0.03630781, 0.9866067, 0.01336271
0.04168694, 0.353917, 0.02386557
0.04786301, 0.5611145, 0.1159268
0.05495409, 0.09922572, 0.4367928
0.06309573, 0.1200504, 0.4591201
0.0724436, 0.2173352, 0.6436186
0.08317638, 0.3456959, 0.4151101
0.09549926, 0.4246292, 0.3366118
0.1096478, 0.5220633, 0.4192947
0.1258925, 0.03454672, 0.338459
0.144544, 0.5466757, 0.3272139
0.1659587, 0.8041483, 0.1677151
0.1905461, 0.8395235, 0.1137332
0.2187762, 0.8634611, 0.1222642
0.2511886, 0.3849828, 0.1615212
0.2884032, 0.08243323, 0.0835991
0.3311311, 0.9612806, 0.03687786
0.3801894, 0.002033692, 0.0857051
0.4365158, 0.9697264, 0.02340723
0.5011872, 0.1890248, 0.03818675
0.5754399, 0.3349335, 0.05721093
0.6606934, 0.9953716, 0.004579627
0.7585776, 0.4891201, 0.01800352
0.8709636, 0.005008776, 0.04864267
1, 0.272932, 0.03883322
1.148154, 0.7833163, 0.01167552
1.318257, 0.9997194, 1.174755e-06
1.513561, 0.8547036, 0.009012941
1.737801, 0.539502, 0.02748088
1.995262, 0.243548, 0.04419483
2.290868, 0.06015301, 0.05391219
2.630268, 0.0009956073, 0.0563116
3.019952, 0.03749903, 0.0533421
3.467369, 0.1318905, 0.04733191
3.981072, 0.2522684, 0.0401391
4.570882, 0.3768257, 0.03296531
5.248075, 0.4929284, 0.02645829
6.025596, 0.5946067, 0.02088587
6.91831, 0.6801034, 0.01628972
7.943282, 0.7500169, 0.01259452
9.120108, 0.8060714, 0.009676223
10.47129, 0.8503793, 0.007400385
12.02264, 0.8850397, 0.005641457
13.80384, 0.9119455, 0.004290729
15.84893, 0.9327127, 0.003258196
18.19701, 0.9486735, 0.002471447
20.89296, 0.960901, 0.001873329
23.98833, 0.9702458, 0.001419324
27.54229, 0.9773747, 0.001075069
31.62278, 0.9828056, 0.0008142108
36.30781, 0.9869387, 0.0006166276
41.68694, 0.9900816, 0.0004670052
47.86301, 0.9924701, 0.0003537127
54.95409, 0.9942846, 0.0002679294
63.09573, 0.9956624, 0.0002029722
72.4436, 0.9967085, 0.0001537806
83.17638, 0.9975025, 0.0001165241
95.49926, 0.9981051, 8.830338e-05
109.6478, 0.9985623, 6.692431e-05
125.8925, 0.9989093, 5.072622e-05
144.544, 0.9991725, 3.845207e-05
165.9587, 0.9993723, 2.915025e-05
190.5461, 0.9995238, 2.210023e-05
218.7762, 0.9996387, 1.675638e-05
251.1886, 0.999726, 1.270542e-05
288.4032, 0.9997921, 9.634322e-06
331.1311, 0.9998423, 7.305897e-06
380.1894, 0.9998804, 5.540437e-06
436.5158, 0.9999093, 4.201753e-06
501.1872, 0.9999312, 3.186626e-06
575.4399, 0.9999478, 2.416819e-06
660.6934, 0.9999604, 1.833023e-06
758.5776, 0.9999699, 1.390277e-06
870.9636, 0.9999772, 1.054492e-06
0.001, 0.1617516, 0.333304
0.001148154, 0.4953201, 0.3138695
0.001318257, 0.5517741, 0.09549623
0.001513561, 0.7862832, 0.00159488
0.001737801, 0.3447367, 0.2368447
0.001995262, 0.5383216, 0.1686903
0.002290868, 0.5465976, 0.08909361
0.002630268, 0.9633905, 0.001219333
0.003019952, 0.9610993, 0.001105899
0.003467369, 0.3795707, 0.4935139
0.003981072, 0.1969176, 0.05185309
0.004570882, 0.3817488, 0.5501979
0.005248075, 0.2745965, 0.5843958
0.006025596, 0.2971392, 0.6097174
0.00691831, 0.4257633, 0.4737918
0.007943282, 0.01956433, 0.06757944
0.009120108, 0.04035393, 0.3299624
0.01047129, 0.2948426, 0.3791359
0.01202264, 0.5523205, 0.1561085
0.01380384, 0.1024932, 0.2081654
0.01584893, 0.1797039, 0.3468126
0.01819701, 0.7984756, 0.04478345
0.02089296, 0.003610887, 0.1229408
0.02398833, 0.2056953, 0.3100938
0.02754229, 0.1427284, 0.34412
0.03162278, 0.0616946, 0.2520326
0.03630781, 0.9868764, 0.01305679
0.04168694, 0.3588346, 0.02358724
0.04786301, 0.5644006, 0.1161717
0.05495409, 0.09792218, 0.4361516
0.06309573, 0.1202625, 0.458204
0.0724436, 0.2171826, 0.6437491
0.08317638, 0.3456618, 0.4144891
0.09549926, 0.4241361, 0.3362624
0.1096478, 0.5227027, 0.4187929
0.1258925, 0.03430291, 0.3388246
0.144544, 0.5476833, 0.326955
0.1659587, 0.8040885, 0.1674891
0.1905461, 0.8392713, 0.1135843
0.2187762, 0.8637971, 0.1221128
0.2511886, 0.3857895, 0.1614687
0.2884032, 0.08202413, 0.08367691
0.3311311, 0.9612931, 0.03682341
0.3801894, 0.00208513, 0.08573398
0.4365158, 0.9698392, 0.02337343
0.5011872, 0.1886815, 0.03821555
0.5754399, 0.3352952, 0.05719401
0.6606934, 0.9953837, 0.004569979
0.7585776, 0.488829, 0.01801804
0.8709636, 0.004974737, 0.04864717
1, 0.2731292, 0.03882413
1.148154, 0.7834752, 0.01166749
1.318257, 0.9997249, 1.126309e-06
1.513561, 0.8546005, 0.009018384
1.737801, 0.5393751, 0.02748707
1.995262, 0.2434529, 0.04419885
2.290868, 0.06010735, 0.05391335
2.630268, 0.0009936377, 0.05631046
3.019952, 0.03752654, 0.05333959
3.467369, 0.1319335, 0.04732882
3.981072, 0.2523166, 0.04013597
4.570882, 0.3768726, 0.03296245
5.248075, 0.4929705, 0.02645583
6.025596, 0.5946427, 0.02088384
6.91831, 0.6801332, 0.01628809
7.943282, 0.750041, 0.01259324
9.120108, 0.8060905, 0.009675222
10.47129, 0.8503943, 0.007399613
12.02264, 0.8850514, 0.005640866
13.80384, 0.9119546, 0.004290278
15.84893, 0.9327197, 0.003257853
18.19701, 0.9486789, 0.002471187
20.89296, 0.9609051, 0.001873132
23.98833, 0.970249, 0.001419175
27.54229, 0.9773771, 0.001074957
31.62278, 0.9828074, 0.0008141256
36.30781, 0.98694, 0.0006165632
41.68694, 0.9900826, 0.0004669565
47.86301, 0.9924709, 0.0003536758
54.95409, 0.9942852, 0.0002679015
63.09573, 0.9956629, 0.0002029511
72.4436, 0.9967088, 0.0001537647
83.17638, 0.9975028, 0.000116512
95.49926, 0.9981053, 8.829424e-05
109.6478, 0.9985625, 6.691739e-05
125.8925, 0.9989094, 5.072098e-05
144.544, 0.9991726, 3.84481e-05
165.9587, 0.9993723, 2.914724e-05
190.5461, 0.9995238, 2.209795e-05
218.7762, 0.9996388, 1.675465e-05
251.1886, 0.999726, 1.270412e-05
288.4032, 0.9997921, 9.63333e-06
331.1311, 0.9998423, 7.305146e-06
380.1894, 0.9998804, 5.539868e-06
436.5158, 0.9999093, 4.201321e-06
501.1872, 0.9999312, 3.186298e-06
575.4399, 0.9999478, 2.41657e-06
660.6934, 0.9999604, 1.832835e-06
758.5776, 0.99997, 1.390134e-06
870.9636, 0.9999772, 1.054384e-06
Loading