OscProb
PMNS_Avg.cxx
Go to the documentation of this file.
1
2//
3// Implementation of oscillations of neutrinos in matter in a
4// three-neutrino framework with a first order Taylor expansion.
5//
6// This class inherits from the PMNS_Fast class
7//
9
10#include "PMNS_Avg.h"
12#include "PremModel.h"
13#include <algorithm>
14#include <iostream>
15
16using namespace OscProb;
17
18using namespace std;
19
20//.............................................................................
26PMNS_Avg::PMNS_Avg() : PMNS_Fast()
27{
28 fPrem.LoadModel("");
29
31
32 SetwidthBin(0, 0);
33
34 SetAvgProbPrec(1e-4);
35}
36
37//.............................................................................
42
43//.............................................................................
49{
51
54
57
59
63
64 for (int i = 0; i < fNumNus; i++) {
65 fevolutionMatrixS[i][i] = 1;
66
67 for (int j = 0; j < fNumNus; j++) {
68 fKInvE[i][j] = 0;
69 fKcosT[i][j] = 0;
70 }
71 }
72
73 fLayer = fPrem.GetPremLayers().size() - 1;
74
75 fdl = -1;
76
78}
79
80//.............................................................................
90
91//.............................................................................
97void PMNS_Avg::SetCosT(double cosT) { fcosT = cosT; }
98
99//.............................................................................
106void PMNS_Avg::SetwidthBin(double dE, double dcosT)
107{
108 fdInvE = dE;
109 fdcosT = dcosT;
110}
111
112//.............................................................................
122void PMNS_Avg::BuildKE(double L)
123{
124 double lenghtEV = L * kKm2eV; // L in eV-1
125 double bufK = lenghtEV * 0.5; // L/2 in eV-1
126
127 complexD buffer[3];
128
129 for (int i = 0; i < fNumNus; i++) {
130 complexD Hms_kl;
131
132 for (int l = 0; l < fNumNus; l++) {
133 buffer[l] = 0;
134
135 for (int k = 0; k < fNumNus; k++) {
136 if (k <= l)
137 Hms_kl = fHms[k][l];
138 else
139 Hms_kl = conj(fHms[l][k]);
140
141 if (fIsNuBar && k != l) Hms_kl = conj(Hms_kl);
142
143 buffer[l] += conj(fEvec[k][i]) * Hms_kl;
144 }
145 }
146
147 for (int j = 0; j <= i; j++) {
148 fKmass[i][j] = 0;
149
150 for (int l = 0; l < fNumNus; l++) {
151 fKmass[i][j] += buffer[l] * fEvec[l][j];
152 }
153
154 complexD C;
155
156 if (i == j) { C = complexD(1, 0); }
157 else {
158 double arg = (fEval[i] - fEval[j]) * lenghtEV;
159
160 C = (complexD(cos(arg), sin(arg)) - complexD(1, 0.0)) /
161 complexD(0.0, arg);
162 }
163
164 fKmass[i][j] *= bufK * C;
165
166 if (i != j) fKmass[j][i] = conj(fKmass[i][j]);
167 }
168 }
169}
170
171//.............................................................................
181{
182 UpdateHam();
183
184 double dL = LnDerivative() * kKm2eV;
185
186 for (int j = 0; j < fNumNus; j++) {
187 for (int i = 0; i <= j; i++) {
188 fKflavor[i][j] = dL * fHam[i][j];
189
190 if (i != j) { fKflavor[j][i] = conj(fKflavor[i][j]); }
191 }
192 }
193}
194
195//.............................................................................
200{
201 double dL = 0;
202
203 double L1 = pow(fPrem.GetPremLayers()[fLayer].radius, 2) - fminRsq;
204
205 double L2 = -fminRsq;
206 if (fLayer > 0) L2 += pow(fPrem.GetPremLayers()[fLayer - 1].radius, 2);
207
208 bool ismin = (L2 <= 0 && fcosT < 0);
209
210 if (ismin)
211 dL = 2 * pow(fDetRadius, 2) * fcosT * pow(L1, -0.5);
212 else
213 dL = pow(fDetRadius, 2) * fcosT * (pow(L1, -0.5) - pow(L2, -0.5));
214
215 if (ismin) fdl = 1;
216
217 fLayer += fdl;
218
219 return dL;
220}
221
222//.............................................................................
227{
228 complexD buffer[3];
229
230 for (int j = 0; j < fNumNus; j++) {
231 for (int k = 0; k < fNumNus; k++) {
232 buffer[k] = fPhases[k] * conj(fEvec[j][k]);
233 }
234
235 for (int i = 0; i < fNumNus; i++) {
236 fSflavor[i][j] = 0;
237 for (int k = 0; k < fNumNus; k++) {
238 fSflavor[i][j] += fEvec[i][k] * buffer[k];
239 }
240 }
241 }
242}
243
244//.............................................................................
249{
250 complexD buffer[3];
251
252 for (int j = 0; j < fNumNus; j++) {
253 for (int k = 0; k < fNumNus; k++) {
254 buffer[k] = 0;
255
256 for (int l = 0; l < fNumNus; l++) {
257 buffer[k] += fKmass[k][l] * conj(fEvec[j][l]);
258 }
259 }
260
261 for (int i = 0; i <= j; i++) {
262 fKflavor[i][j] = 0;
263
264 for (int k = 0; k < fNumNus; k++) {
265 fKflavor[i][j] += fEvec[i][k] * buffer[k];
266 }
267
268 if (i != j) { fKflavor[j][i] = conj(fKflavor[i][j]); }
269 }
270 }
271}
272
273//.............................................................................
286{
287 complexD save[3];
288
289 for (int j = 0; j < fNumNus; j++) {
290 for (int n = 0; n < fNumNus; n++) { save[n] = fevolutionMatrixS[n][j]; }
291
292 for (int i = 0; i < fNumNus; i++) {
293 fevolutionMatrixS[i][j] = 0;
294
295 for (int k = 0; k < fNumNus; k++) {
296 fevolutionMatrixS[i][j] += fSflavor[i][k] * save[k];
297 }
298 }
299 }
300}
301
302//.............................................................................
317{
318 for (int i = 0; i < fNumNus; i++) {
319 complexD buffer[3];
320
321 for (int l = 0; l < fNumNus; l++) {
322 for (int k = 0; k < fNumNus; k++) {
323 buffer[l] += conj(fevolutionMatrixS[k][i]) * fKflavor[k][l];
324 }
325 }
326
327 for (int j = 0; j <= i; j++) {
328 for (int l = 0; l < fNumNus; l++) {
329 K[i][j] += buffer[l] * fevolutionMatrixS[l][j];
330 }
331
332 if (i != j) { K[j][i] = conj(K[i][j]); }
333 }
334 }
335}
336
337//.............................................................................
342{
343 for (int i = 0; i < int(fNuPaths.size()); i++) {
345 }
346}
347
348//.............................................................................
354{
355 // Set the neutrino path
356 SetCurPath(p);
357
358 // Solve for eigensystem
359 SolveHam();
360
361 // Get the evolution matrix in mass basis
362 double LengthIneV = kKm2eV * p.length;
363 for (int i = 0; i < fNumNus; i++) {
364 double arg = fEval[i] * LengthIneV;
365 fPhases[i] = complexD(cos(arg), -sin(arg));
366 }
367
368 // Rotate S in flavor basis
369 rotateS();
370
371 // if avg on E
372 if (fdInvE != 0) {
373 // Build KE in mass basis
374 BuildKE(p.length);
375
376 // Rotate KE in flavor basis
377 rotateK();
378
379 // Multiply this layer K's with the previous path K's
381 }
382
383 // if avg on cosT
384 if (fdcosT != 0) {
385 // Build KcosT in mass basis
387
388 // Multiply this layer K's with the previous path K's
390 }
391
392 // Multiply this layer S's with the previous path S's
394}
395
396//.............................................................................
408void PMNS_Avg::SolveK(complexD K[3][3], vectorD& lambda, matrixC& V)
409{
410 double fEvalGLoBES[3];
411 complexD fEvecGLoBES[3][3];
412
413 // Solve K for eigensystem using the GLoBES method
414 zheevh3(K, fEvecGLoBES, fEvalGLoBES);
415
416 // Fill flambdaInvE and fVInvE vectors from GLoBES arrays
417 for (int i = 0; i < fNumNus; i++) {
418 lambda[i] = fEvalGLoBES[i];
419 for (int j = 0; j < fNumNus; j++) { V[i][j] = fEvecGLoBES[i][j]; }
420 }
421}
422
423//.............................................................................
442double PMNS_Avg::AvgFormula(int flvi, int flvf, double dbin, vectorD lambda,
443 matrixC V)
444{
445 vectorC SV = vectorC(fNumNus, 0);
446
447 for (int i = 0; i < fNumNus; i++) {
448 for (int k = 0; k < fNumNus; k++) {
449 SV[i] += fevolutionMatrixS[flvf][k] * V[k][i];
450 }
451 }
452
453 complexD buffer[3];
454
455 for (int n = 0; n < fNumNus; n++) { buffer[n] = SV[n] * conj(V[flvi][n]); }
456
457 complexD sinc[fNumNus][fNumNus];
458
459 for (int j = 0; j < fNumNus; j++) {
460 sinc[j][j] = 1;
461
462 for (int i = 0; i < j; i++) {
463 double arg = (lambda[i] - lambda[j]) * dbin / 2;
464 sinc[i][j] = sin(arg) / arg;
465 sinc[j][i] = sinc[i][j];
466 }
467 }
468
469 complexD P = 0;
470
471 for (int j = 0; j < fNumNus; j++) {
472 for (int i = 0; i < fNumNus; i++) {
473 P += buffer[i] * conj(buffer[j]) * sinc[j][i];
474 }
475 }
476
477 return real(P);
478}
479
480//.............................................................................
501double PMNS_Avg::AvgProb(int flvi, int flvf, double E, double dE)
502{
503 if (E <= 0) return 0;
504
505 if (fNuPaths.empty()) return 0;
506
507 // Don't average zero width
508 if (dE <= 0) return Prob(flvi, flvf, E);
509
510 vectorD Ebin = ConvertEtoLoE(E, dE);
511
512 // return fct avr proba
513 return AvgProbLoE(flvi, flvf, Ebin[0], Ebin[1]);
514}
515
516//.............................................................................
539double PMNS_Avg::AvgProbLoE(int flvi, int flvf, double LoE, double dLoE)
540{
541 if (LoE <= 0) return 0;
542
543 if (fNuPaths.empty()) return 0;
544
545 // Don't average zero width
546 if (dLoE <= 0) return Prob(flvi, flvf, fPath.length / LoE);
547
548 // Get sample points for this bin
549 vectorD samples = GetSamplePoints(LoE, dLoE);
550
551 double avgprob = 0;
552 double L = fPath.length;
553 double sumw = 0;
554
555 // Loop over all sample points
556 for (int j = 1; j < int(samples.size()); j++) {
557 double w = 1. / pow(samples[j], 2);
558
559 avgprob += w * AvgAlgo(flvi, flvf, samples[j], samples[0], L);
560
561 sumw += w;
562 }
563
564 // Return average of probabilities
565 return avgprob / sumw;
566}
567
568//.............................................................................
580double PMNS_Avg::AvgAlgo(int flvi, int flvf, double LoE, double dLoE, double L)
581{
582 // Set width bin as 1/E
583 double d1oE = dLoE / L;
584
585 // reset K et S et Ve et lambdaE
587
588 SetEnergy(L / LoE);
589 SetwidthBin(d1oE, 0);
590
591 // Propagate -> get S and K matrix (on the whole path)
593
594 // DiagolK -> get VE and lambdaE
596
597 // return fct avr proba
598 return AvgFormula(flvi, flvf, d1oE / kGeV2eV, flambdaInvE, fVInvE);
599}
600
601//.............................................................................
623double PMNS_Avg::AvgProb(int flvi, int flvf, double E, double cosT,
624 double dcosT)
625{
626 if (cosT > 0) return 0;
627
628 // if (fNuPaths.empty()) return 0; //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
629
630 // Don't average zero width
631 if (dcosT == 0) return Prob(flvi, flvf, E);
632
633 vectorD samples = GetSamplePoints(E, cosT, dcosT);
634
635 double avgprob = 0;
636
637 // Loop over all sample points
638 for (int j = 1; j < int(samples.size()); j++) {
639 avgprob += AvgAlgoCosT(flvi, flvf, E, samples[j], samples[0]);
640 }
641
642 // Return average of probabilities
643 return avgprob / (samples.size() - 1);
644}
645
646//.............................................................................
658double PMNS_Avg::AvgAlgoCosT(int flvi, int flvf, double E, double cosT,
659 double dcosT)
660{
661 // reset K et S et Ve et lambdaE
663
664 SetEnergy(E);
665 SetCosT(cosT);
666 SetwidthBin(0, dcosT);
667
668 fPrem.FillPath(cosT);
670
671 fminRsq = pow(fDetRadius * sqrt(1 - cosT * cosT), 2);
672
673 // Propagate -> get S and K matrix (on the whole path)
675
676 // DiagolK -> get VE and lambdaE
678
679 // return fct avr proba
680 return AvgFormula(flvi, flvf, fdcosT, flambdaCosT, fVcosT);
681}
682
683//.............................................................................
711double PMNS_Avg::AvgProb(int flvi, int flvf, double E, double dE, double cosT,
712 double dcosT)
713{
714 if (E <= 0) return 0;
715 if (cosT > 0) return 0;
716
717 if (fNuPaths.empty()) return 0;
718
719 // Don't average zero width
720 if (dE <= 0 && dcosT == 0) return Prob(flvi, flvf, E);
721 if (dE <= 0) return AvgProb(flvi, flvf, E, cosT, dcosT);
722 if (dcosT == 0) return AvgProb(flvi, flvf, E, dE);
723
724 vectorD Ebin = ConvertEtoLoE(E, dE);
725
726 return AvgProbLoE(flvi, flvf, Ebin[0], Ebin[1], cosT, dcosT);
727}
728
729//.............................................................................
758double PMNS_Avg::AvgProbLoE(int flvi, int flvf, double LoE, double dLoE,
759 double cosT, double dcosT)
760{
761 if (LoE <= 0) return 0;
762 if (cosT > 0) return 0;
763
764 // if (fNuPaths.empty()) return 0;
765
766 // Don't average zero width
767 if (dLoE <= 0 && dcosT == 0) return Prob(flvi, flvf, fPath.length / LoE);
768 if (dLoE <= 0)
769 return AvgProb(flvi, flvf, fPath.length / LoE, cosT, dcosT);
770 if (dcosT == 0) return AvgProbLoE(flvi, flvf, LoE, dLoE);
771
772 // Make sample with 1oE and not LoE
773 matrixC samples =
774 GetSamplePoints(LoE / fPath.length, dLoE / fPath.length, cosT, dcosT);
775
776 int rows = samples.size();
777 int cols = samples[0].size();
778
779 double avgprob = 0;
780 double sumw = 0;
781
782 // Loop over all sample points
783 for (int k = 1; k < int(rows); k++) {
784 for (int l = 1; l < int(cols); l++) {
785 double w = 1. / pow(real(samples[k][l]), 2);
786
787 avgprob +=
788 w * AvgAlgo(flvi, flvf, real(samples[k][l]), real(samples[0][0]),
789 imag(samples[k][l]), imag(samples[0][0]));
790
791 sumw += w;
792 }
793 }
794
795 // Return average of probabilities
796 return avgprob / ((sumw));
797}
798
799//.............................................................................
813double PMNS_Avg::AvgAlgo(int flvi, int flvf, double InvE, double dInvE,
814 double cosT, double dcosT)
815{
816 fPrem.FillPath(cosT);
818
819 // reset K et S et Ve et lambdaE
821
822 SetEnergy(1 / InvE);
823 SetCosT(cosT);
824 SetwidthBin(dInvE, dcosT);
825
826 fminRsq = pow(fDetRadius * sqrt(1 - cosT * cosT), 2);
827
828 // Propagate -> get S and K matrix (on the whole path)
830
831 // DiagolK -> get VE and lambdaE
834
835 return AlgorithmDensityMatrix(flvi, flvf);
836}
837
838//.............................................................................
847double PMNS_Avg::AlgorithmDensityMatrix(int flvi, int flvf)
848{
849 fdensityMatrix[flvi][flvi] = 1;
850
851 RotateDensityM(true, fVcosT);
853 RotateDensityM(false, fVcosT);
854
855 RotateDensityM(true, fVInvE);
857 RotateDensityM(false, fVInvE);
858
860
861 return real(fdensityMatrix[flvf][flvf]);
862}
863
864//.............................................................................
872void PMNS_Avg::RotateDensityM(bool to_basis, matrixC V)
873{
874 matrixC Buffer = matrixC(fNumNus, vectorC(fNumNus, 0));
875
876 for (int i = 0; i < fNumNus; i++) {
877 for (int j = 0; j < fNumNus; j++) {
878 for (int k = 0; k < fNumNus; k++) {
879 if (to_basis)
880 Buffer[i][j] += fdensityMatrix[i][k] * V[k][j];
881 else
882 Buffer[i][j] += fdensityMatrix[i][k] * conj(V[j][k]);
883 }
884 }
885 }
886
887 for (int i = 0; i < fNumNus; i++) {
888 for (int j = i; j < fNumNus; j++) {
889 fdensityMatrix[i][j] = 0;
890 for (int k = 0; k < fNumNus; k++) {
891 if (to_basis)
892 fdensityMatrix[i][j] += conj(V[k][i]) * Buffer[k][j];
893 else
894 fdensityMatrix[i][j] += V[i][k] * Buffer[k][j];
895 }
896 if (j > i) fdensityMatrix[j][i] = conj(fdensityMatrix[i][j]);
897 }
898 }
899}
900
901//.............................................................................
908void PMNS_Avg::HadamardProduct(vectorD lambda, double dbin)
909{
911 for (int j = 0; j < fNumNus; j++) {
912 for (int i = 0; i < j; i++) {
913 double arg = (lambda[i] - lambda[j]) * dbin;
914 sinc[i][j] = sin(arg) / arg;
915
916 sinc[j][i] = sinc[i][j];
917 }
918 }
919
920 for (int i = 0; i < fNumNus; i++) { sinc[i][i] = 1; }
921
922 for (int j = 0; j < fNumNus; j++) {
923 for (int i = 0; i < fNumNus; i++) {
924 fdensityMatrix[i][j] = fdensityMatrix[i][j] * sinc[i][j];
925 }
926 }
927}
928
929//.............................................................................
939vectorD PMNS_Avg::GetSamplePoints(double LoE, double dLoE)
940{
941 // Set a number of sub-divisions to achieve "good" accuracy
942 // This needs to be studied better
943 int n_div = ceil(3 * pow(dLoE / LoE, 0.8) * pow(LoE, 0.3) /
944 sqrt(fAvgProbPrec / 1e-4));
945
946 // A vector to store sample points
947 vectorD Samples;
948
949 // Define sub-division width
950 Samples.push_back(dLoE / n_div);
951
952 // Loop over sub-divisions
953 for (int k = 0; k < n_div; k++) {
954 // Define sub-division center
955 double bctr = LoE - dLoE / 2 + (k + 0.5) * dLoE / n_div;
956
957 Samples.push_back(bctr);
958
959 } // End of loop over sub-divisions
960
961 // Return sample points
962 return Samples;
963}
964
965//.............................................................................
976vectorD PMNS_Avg::GetSamplePoints(double E, double cosT, double dcosT)
977{
978 // Set a number of sub-divisions to achieve "good" accuracy
979 // This needs to be studied better
980 int n_div = ceil(35 * pow(E, -0.4) * pow(abs(dcosT / cosT), 0.8) /
981 sqrt(fAvgProbPrec / 1e-4));
982
983 // A vector to store sample points
984 vectorD Samples;
985
986 // Define sub-division width
987 Samples.push_back(dcosT / n_div);
988
989 // Loop over sub-divisions
990 for (int k = 0; k < n_div; k++) {
991 // Define sub-division center
992 double bctr = cosT - dcosT / 2 + (k + 0.5) * dcosT / n_div;
993
994 Samples.push_back(bctr);
995
996 } // End of loop over sub-divisions
997
998 // Return sample points
999 return Samples;
1000}
1001
1002//.............................................................................
1015matrixC PMNS_Avg::GetSamplePoints(double InvE, double dInvE, double cosT,
1016 double dcosT)
1017{
1018 // Set a number of sub-divisions to achieve "good" accuracy
1019 // This needs to be studied better
1020 int n_divCosT = ceil(380 * pow(InvE, 0.5) * pow(abs(dcosT / cosT), 0.8) /
1021 sqrt(fAvgProbPrec / 1e-4));
1022 int n_divE = ceil(260 * pow(dInvE / InvE, 0.8) * pow(InvE, 0.6) /
1023 sqrt(fAvgProbPrec / 1e-4));
1024
1025 // A matrix to store sample points
1026 matrixC Samples = matrixC(n_divE + 1, vectorC(n_divCosT + 1, 0));
1027
1028 // Define sub-division width
1029 Samples[0][0] = complexD(dInvE / n_divE, dcosT / n_divCosT);
1030
1031 // Loop over sub-divisions
1032 for (int k = 0; k < n_divE; k++) {
1033 // Define sub-division center for energy
1034 double bctr_InvE = InvE - dInvE / 2 + (k + 0.5) * dInvE / n_divE;
1035
1036 for (int l = 0; l < n_divCosT; l++) {
1037 // Define sub-division center for angle
1038 double bctr_CosT = cosT - dcosT / 2 + (l + 0.5) * dcosT / n_divCosT;
1039
1040 Samples[k + 1][l + 1] = complexD(bctr_InvE, bctr_CosT);
1041 }
1042
1043 } // End of loop over sub-divisions
1044
1045 // Return sample points
1046 return Samples;
1047}
1048
1049//.............................................................................
1068double PMNS_Avg::AvgFormulaExtrapolation(int flvi, int flvf, double dbin,
1069 vectorD lambda, matrixC V)
1070{
1071 vectorC SV = vectorC(fNumNus, 0);
1072
1073 for (int i = 0; i < fNumNus; i++) {
1074 for (int k = 0; k < fNumNus; k++) {
1075 SV[i] += fevolutionMatrixS[flvf][k] * V[k][i];
1076 }
1077 }
1078
1079 complexD buffer[3];
1080
1081 for (int n = 0; n < fNumNus; n++) { buffer[n] = SV[n] * conj(V[flvi][n]); }
1082
1083 complexD expo[fNumNus][fNumNus];
1084
1085 for (int j = 0; j < fNumNus; j++) {
1086 for (int i = 0; i < fNumNus; i++) {
1087 double arg = (lambda[j] - lambda[i]) * dbin;
1088 expo[j][i] = exp(complexD(0.0, arg));
1089 }
1090 }
1091
1092 complexD P = 0;
1093
1094 for (int j = 0; j < fNumNus; j++) {
1095 for (int i = 0; i < fNumNus; i++) {
1096 P += buffer[i] * conj(buffer[j]) * expo[j][i];
1097 }
1098 }
1099
1100 return real(P);
1101}
1102
1103//.............................................................................
1121double PMNS_Avg::ExtrapolationProb(int flvi, int flvf, double E, double dE)
1122{
1123 // reset K et S et Ve et lambdaE
1125
1126 SetEnergy(E);
1127 SetwidthBin(1 / (E + dE) - 1 / E, 0);
1128
1129 // Propagate -> get S and K matrix (on the whole path)
1131
1132 // DiagolK -> get VE and lambdaE
1134
1135 return AvgFormulaExtrapolation(flvi, flvf, fdInvE / kGeV2eV, flambdaInvE,
1136 fVInvE);
1137}
1138
1139//.............................................................................
1157double PMNS_Avg::ExtrapolationProbLoE(int flvi, int flvf, double LoE,
1158 double dLoE)
1159{
1160 // reset K et S et Ve et lambdaE
1162
1164 double L = fPath.length;
1165
1166 SetEnergy(L / LoE);
1167 SetwidthBin(dLoE / L, 0);
1168
1169 // Propagate -> get S and K matrix (on the whole path)
1171
1172 // DiagolK -> get VE and lambdaE
1174
1175 return AvgFormulaExtrapolation(flvi, flvf, dLoE * kGeV2eV / L, flambdaInvE,
1176 fVInvE);
1177}
1178
1179//.............................................................................
1200double PMNS_Avg::ExtrapolationProbCosT(int flvi, int flvf, double cosT,
1201 double dcosT)
1202{
1203 fPrem.FillPath(cosT);
1205
1206 // reset K et S et Ve et lambdaE
1208
1209 // SetEnergy(E);
1210 SetCosT(cosT);
1211 SetwidthBin(0, dcosT);
1212
1213 fminRsq = pow(fDetRadius * sqrt(1 - cosT * cosT), 2);
1214
1215 // Propagate -> get S and K matrix (on the whole path)
1217
1218 // DiagolK -> get VE and lambdaE
1220
1221 return AvgFormulaExtrapolation(flvi, flvf, fdcosT, flambdaCosT, fVcosT);
1222}
virtual std::vector< NuPath > GetNuPath()
double fdInvE
Bin's width for the inverse of energy in GeV-1.
Definition: PMNS_Avg.h:180
vectorD flambdaCosT
Eigenvectors of K_cosTheta.
Definition: PMNS_Avg.h:192
virtual double AvgProbLoE(int flvi, int flvf, double LoE, double dLoE)
Definition: PMNS_Avg.cxx:539
matrixC fKflavor
K matrix in flavor basis for one layer.
Definition: PMNS_Avg.h:178
virtual double ExtrapolationProbLoE(int flvi, int flvf, double LoE, double dLoE)
Definition: PMNS_Avg.cxx:1157
virtual double AvgAlgoCosT(int flvi, int flvf, double E, double cosT, double dcosT)
Definition: PMNS_Avg.cxx:658
matrixC fVcosT
Eigenvalues of K_cosTheta.
Definition: PMNS_Avg.h:193
virtual void SetwidthBin(double dE, double dcosT)
Definition: PMNS_Avg.cxx:106
virtual void PropagateTaylor()
Propagate neutrino through full path.
Definition: PMNS_Avg.cxx:341
virtual void PropagatePathTaylor(NuPath p)
Propagate neutrino through a single path.
Definition: PMNS_Avg.cxx:353
virtual void rotateS()
Rotate the S matrix.
Definition: PMNS_Avg.cxx:226
matrixC fevolutionMatrixS
Definition: PMNS_Avg.h:173
matrixC fdensityMatrix
The neutrino density matrix state.
Definition: PMNS_Avg.h:195
matrixC fVInvE
Eigenvalues of K_invE.
Definition: PMNS_Avg.h:185
double fcosT
Cosine of neutrino angle.
Definition: PMNS_Avg.h:187
double fdcosT
Bin's width for angle.
Definition: PMNS_Avg.h:188
virtual void BuildKE(double L)
build K matrix for the inverse of energy in mass basis
Definition: PMNS_Avg.cxx:122
virtual void rotateK()
Rotate one K matrix.
Definition: PMNS_Avg.cxx:248
virtual void InitializeTaylorsVectors()
Definition: PMNS_Avg.cxx:48
virtual double ExtrapolationProb(int flvi, int flvf, double E, double dE)
Definition: PMNS_Avg.cxx:1121
OscProb::PremModel fPrem
Definition: PMNS_Avg.h:204
virtual void MultiplicationRuleK(complexD K[3][3])
Product between two K matrices.
Definition: PMNS_Avg.cxx:316
virtual void SolveK(complexD K[3][3], vectorD &lambda, matrixC &V)
Solve the K matrix.
Definition: PMNS_Avg.cxx:408
virtual void RotateDensityM(bool to_basis, matrixC V)
Apply rotation to the density matrix.
Definition: PMNS_Avg.cxx:872
virtual void HadamardProduct(vectorD lambda, double dbin)
to the density matrix
Definition: PMNS_Avg.cxx:908
virtual void MultiplicationRuleS()
Product between two S matrices.
Definition: PMNS_Avg.cxx:285
virtual double AvgAlgo(int flvi, int flvf, double LoE, double dLoE, double L)
Definition: PMNS_Avg.cxx:580
matrixC fSflavor
S matrix for one layer.
Definition: PMNS_Avg.h:176
virtual vectorD GetSamplePoints(double LoE, double dLoE)
Definition: PMNS_Avg.cxx:939
matrixC fKmass
K matrix in mass basis for one layer.
Definition: PMNS_Avg.h:177
virtual double LnDerivative()
Definition: PMNS_Avg.cxx:199
virtual double AvgFormulaExtrapolation(int flvi, int flvf, double dbin, vectorD flambda, matrixC fV)
Formula for the extrapolation of probability.
Definition: PMNS_Avg.cxx:1068
virtual void SetCosT(double cosT)
Set neutrino angle.
Definition: PMNS_Avg.cxx:97
virtual double AvgFormula(int flvi, int flvf, double dbin, vectorD flambda, matrixC fV)
Definition: PMNS_Avg.cxx:442
virtual void BuildKcosT(double L)
build K matrix for angle in flavor basis
Definition: PMNS_Avg.cxx:180
complexD fKInvE[3][3]
Definition: PMNS_Avg.h:182
virtual ~PMNS_Avg()
Destructor.
Definition: PMNS_Avg.cxx:41
double fDetRadius
Definition: PMNS_Avg.h:200
complexD fKcosT[3][3]
K matrix for neutrino angle for the entire path.
Definition: PMNS_Avg.h:191
virtual double AlgorithmDensityMatrix(int flvi, int flvf)
Definition: PMNS_Avg.cxx:847
virtual double ExtrapolationProbCosT(int flvi, int flvf, double cosT, double dcosT)
Definition: PMNS_Avg.cxx:1200
virtual void SetPremModel(OscProb::PremModel &prem)
Definition: PMNS_Avg.cxx:89
virtual double AvgProb(int flvi, int flvf, double E, double dE)
Definition: PMNS_Avg.cxx:501
vectorD flambdaInvE
Eigenvectors of K_invE.
Definition: PMNS_Avg.h:184
virtual double P(int flv)
Return the probability of final state in flavour flv.
Definition: PMNS_Base.cxx:1058
bool fIsNuBar
Anti-neutrino flag.
Definition: PMNS_Base.h:293
virtual vectorD ConvertEtoLoE(double E, double dE)
Definition: PMNS_Base.cxx:1516
int fNumNus
Number of neutrino flavours.
Definition: PMNS_Base.h:277
std::vector< NuPath > fNuPaths
Vector of neutrino paths.
Definition: PMNS_Base.h:295
static const double kKm2eV
km to eV^-1
Definition: PMNS_Base.h:215
double fAvgProbPrec
AvgProb precision.
Definition: PMNS_Base.h:305
matrixC fHms
matrix H*2E in eV^2
Definition: PMNS_Base.h:284
matrixC fEvec
Eigenvectors of the Hamiltonian.
Definition: PMNS_Base.h:290
virtual double Prob(vectorC nu_in, int flvf)
Compute the probability of nu_in going to flvf.
Definition: PMNS_Base.cxx:1114
NuPath fPath
Current neutrino path.
Definition: PMNS_Base.h:296
virtual void SetEnergy(double E)
Set the neutrino energy in GeV.
Definition: PMNS_Base.cxx:226
vectorD fEval
Eigenvalues of the Hamiltonian.
Definition: PMNS_Base.h:289
virtual void SetCurPath(NuPath p)
Set the path currently in use by the class.
Definition: PMNS_Base.cxx:274
vectorC fPhases
Buffer for oscillation phases.
Definition: PMNS_Base.h:286
virtual void SetPath(NuPath p)
Set a single path.
Definition: PMNS_Base.cxx:330
virtual void SetAvgProbPrec(double prec)
Set the AvgProb precision.
Definition: PMNS_Base.cxx:1962
static const double kGeV2eV
GeV to eV.
Definition: PMNS_Base.h:217
Implementation of oscillations of neutrinos in matter in a three-neutrino framework.
Definition: PMNS_Fast.h:40
virtual void UpdateHam()
Build the full Hamiltonian.
Definition: PMNS_Fast.cxx:69
virtual void SolveHam()
Solve the full Hamiltonian for eigenvectors and eigenvalues.
Definition: PMNS_Fast.cxx:98
complexD fHam[3][3]
The full hamiltonian.
Definition: PMNS_Fast.h:64
Implements an earth model with spherical shells.
Definition: PremModel.h:33
virtual double GetDetRadius()
Definition: PremModel.cxx:429
virtual void LoadModel(std::string filename)
Load an earth model from a file.
Definition: PremModel.cxx:181
int FillPath(double cosT, double phi=0)
Fill the path sequence in a vector.
Definition: PremModel.cxx:347
virtual std::vector< PremLayer > GetPremLayers()
Definition: PremModel.cxx:145
Some useful general definitions.
Definition: Absorption.h:6
std::complex< double > complexD
Definition: Definitions.h:21
std::vector< complexD > vectorC
Definition: Definitions.h:22
std::vector< double > vectorD
Definition: Definitions.h:18
NuPath AvgPath(NuPath &p1, NuPath &p2)
Get the average of two paths.
Definition: NuPath.cxx:27
std::vector< vectorC > matrixC
Definition: Definitions.h:23
Definition: EigenPoint.h:44
A struct representing a neutrino path segment.
Definition: NuPath.h:34
double length
The length of the path segment in km.
Definition: NuPath.h:78
int zheevh3(std::complex< double > A[3][3], std::complex< double > Q[3][3], double w[3])
Definition: zheevh3.cxx:31