19const int MediumMagboltz::DxcTypeRad = 0;
20const int MediumMagboltz::DxcTypeCollIon = 1;
21const int MediumMagboltz::DxcTypeCollNonIon = -1;
26 m_eStep(m_eFinal / nEnergySteps),
28 m_eHighLog(log(m_eHigh)),
30 m_useAutoAdjust(true),
33 m_useAnisotropic(true),
35 m_useDeexcitation(false),
38 m_useGreenSawada(false),
40 m_eStepGamma(m_eFinalGamma / nEnergyStepsGamma) {
75 for (
int i = nMaxLevels; i--;) {
77 m_lambdaPenning[i] = 0.;
87 m_nCollisionsDetailed.clear();
88 for (
int i = nCsTypes; i--;) m_nCollisions[i] = 0;
89 for (
int i = nCsTypesGamma; i--;) m_nPhotonCollisions[i] = 0;
91 m_ionProducts.clear();
92 m_dxcProducts.clear();
94 for (
unsigned int i = 0; i <
m_nMaxGases; ++i) m_scaleExc[i] = 1.;
100 std::cerr <<
m_className <<
"::SetMaxElectronEnergy:\n";
101 std::cerr <<
" Provided upper electron energy limit (" << e
102 <<
" eV) is too small.\n";
108 if (m_eFinal <= m_eHigh) {
109 m_eStep = m_eFinal / nEnergySteps;
111 m_eStep = m_eHigh / nEnergySteps;
127 std::cerr <<
m_className <<
"::SetMaxPhotonEnergy:\n";
128 std::cerr <<
" Provided upper photon energy limit (" << e
129 <<
" eV) is too small.\n";
135 m_eStepGamma = m_eFinalGamma / nEnergyStepsGamma;
145 m_useOpalBeaty =
true;
146 m_useGreenSawada =
false;
151 m_useOpalBeaty =
false;
152 m_useGreenSawada =
true;
157 if (!m_hasGreenSawada[i]) {
159 std::cout <<
m_className <<
"::SetSplittingFunctionGreenSawada:\n";
162 std::cout <<
" Fit parameters for " <<
m_gas[i] <<
" not available.\n";
163 std::cout <<
" Opal-Beaty formula is used instead.\n";
170 m_useOpalBeaty =
false;
171 m_useGreenSawada =
false;
177 std::cout <<
m_className <<
"::EnableDeexcitation:\n";
178 std::cout <<
" Penning transfer will be switched off.\n";
186 m_useDeexcitation =
true;
188 m_dxcProducts.clear();
194 if (!m_useDeexcitation) {
195 std::cout <<
m_className <<
"::EnableRadiationTrapping:\n";
196 std::cout <<
" Radiation trapping is enabled"
197 <<
" but de-excitation is not.\n";
204 const double lambda) {
206 if (r < 0. || r > 1.) {
207 std::cerr <<
m_className <<
"::EnablePenningTransfer:\n";
208 std::cerr <<
" Penning transfer probability must be "
209 <<
" in the range [0, 1].\n";
214 if (lambda < Small) {
220 std::cout <<
m_className <<
"::EnablePenningTransfer:\n";
221 std::cout <<
" Global Penning transfer parameters set to: \n";
225 for (
unsigned int i = 0; i < m_nTerms; ++i) {
230 if (m_useDeexcitation) {
231 std::cout <<
m_className <<
"::EnablePenningTransfer:\n";
232 std::cout <<
" Deexcitation handling will be switched off.\n";
238 std::string gasname) {
240 if (r < 0. || r > 1.) {
241 std::cerr <<
m_className <<
"::EnablePenningTransfer:\n";
242 std::cerr <<
" Penning transfer probability must be "
243 <<
" in the range [0, 1].\n";
249 std::cerr <<
m_className <<
"::EnablePenningTransfer:\n";
250 std::cerr <<
" Unknown gas name.\n";
258 if (
m_gas[i] == gasname) {
260 if (lambda < Small) {
272 std::cerr <<
m_className <<
"::EnablePenningTransfer:\n";
273 std::cerr <<
" Specified gas (" << gasname
274 <<
") is not part of the present gas mixture.\n";
281 std::cerr <<
m_className <<
"::EnablePenningTransfer:\n";
282 std::cerr <<
" Error calculating the collision rates table.\n";
288 unsigned int nLevelsFound = 0;
289 for (
unsigned int i = 0; i < m_nTerms; ++i) {
290 if (
int(m_csType[i] / nCsTypes) != iGas)
continue;
291 if (m_csType[i] % nCsTypes == ElectronCollisionTypeExcitation) {
298 if (nLevelsFound > 0) {
299 std::cout <<
m_className <<
"::EnablePenningTransfer:\n";
300 std::cout <<
" Penning transfer parameters for " << nLevelsFound
301 <<
" excitation levels set to:\n";
305 std::cerr <<
m_className <<
"::EnablePenningTransfer:\n";
306 std::cerr <<
" Specified gas (" << gasname
307 <<
") has no excitation levels in the present energy range.\n";
315 for (
unsigned int i = 0; i < m_nTerms; ++i) {
317 m_lambdaPenning[i] = 0.;
334 std::cerr <<
m_className <<
"::DisablePenningTransfer:\n";
335 std::cerr <<
" Gas " << gasname <<
" is not defined.\n";
343 if (
m_gas[i] == gasname) {
353 std::cerr <<
m_className <<
"::DisablePenningTransfer:\n";
354 std::cerr <<
" Specified gas (" << gasname
355 <<
") is not part of the present gas mixture.\n";
359 unsigned int nLevelsFound = 0;
360 for (
unsigned int i = 0; i < m_nTerms; ++i) {
361 if (
int(m_csType[i] / nCsTypes) == iGas) {
363 m_lambdaPenning[i] = 0.;
365 if (m_csType[i] % nCsTypes == ElectronCollisionTypeExcitation &&
366 m_rPenning[i] > Small) {
372 if (nLevelsFound == 0) {
374 std::cout <<
m_className <<
"::DisablePenningTransfer:\n"
375 <<
" Penning transfer globally switched off.\n";
381 std::string gasname) {
384 std::cerr <<
m_className <<
"::SetScalingFactor:\n";
385 std::cerr <<
" Incorrect value for scaling factor: " << r <<
"\n";
391 std::cerr <<
m_className <<
"::SetExcitationScalingFactor:\n";
392 std::cerr <<
" Unknown gas name.\n";
399 if (
m_gas[i] == gasname) {
407 std::cerr <<
m_className <<
"::SetExcitationScalingFactor:\n";
408 std::cerr <<
" Specified gas (" << gasname
409 <<
") is not part of the present gas mixture.\n";
422 std::cerr <<
" Nothing changed.\n";
426 if (!Mixer(verbose)) {
428 std::cerr <<
" Error calculating the collision rates table.\n";
444 for (
unsigned int i = 0; i < m_nTerms; ++i) {
446 int type = m_csType[i] % nCsTypes;
447 int ngas = int(m_csType[i] / nCsTypes);
449 std::string descr = std::string(50,
' ');
450 for (
int j = 50; j--;) descr[j] = m_description[i][j];
452 double e = m_rgas[ngas] * m_energyLoss[i];
453 std::cout <<
" Level " << i <<
": " << descr <<
"\n";
454 std::cout <<
" Type " << type;
455 if (type == ElectronCollisionTypeElastic) {
456 std::cout <<
" (elastic)\n";
457 }
else if (type == ElectronCollisionTypeIonisation) {
458 std::cout <<
" (ionisation)\n";
459 std::cout <<
" Ionisation threshold: " << e <<
" eV\n";
460 }
else if (type == ElectronCollisionTypeAttachment) {
461 std::cout <<
" (attachment)\n";
462 }
else if (type == ElectronCollisionTypeInelastic) {
463 std::cout <<
" (inelastic)\n";
464 std::cout <<
" Energy loss: " << e <<
" eV\n";
465 }
else if (type == ElectronCollisionTypeExcitation) {
466 std::cout <<
" (excitation)\n";
467 std::cout <<
" Excitation energy: " << e <<
" eV\n";
468 }
else if (type == ElectronCollisionTypeSuperelastic) {
469 std::cout <<
" (super-elastic)\n";
470 std::cout <<
" Energy gain: " << -e <<
" eV\n";
472 std::cout <<
" (unknown)\n";
474 if (type == ElectronCollisionTypeExcitation &&
m_usePenning &&
476 std::cout <<
" Penning transfer coefficient: " << m_rPenning[i]
478 }
else if (type == ElectronCollisionTypeExcitation && m_useDeexcitation) {
479 const int idxc = m_iDeexcitation[i];
480 if (idxc < 0 || idxc >= (
int)m_deexcitations.size()) {
481 std::cout <<
" Deexcitation cascade not implemented.\n";
484 if (m_deexcitations[idxc].osc > 0.) {
485 std::cout <<
" Oscillator strength: " << m_deexcitations[idxc].osc
488 std::cout <<
" Decay channels:\n";
489 for (
int j = 0; j < m_deexcitations[idxc].nChannels; ++j) {
490 if (m_deexcitations[idxc].type[j] == DxcTypeRad) {
491 std::cout <<
" Radiative decay to ";
492 if (m_deexcitations[idxc].
final[j] < 0) {
493 std::cout <<
"ground state: ";
495 std::cout << m_deexcitations[m_deexcitations[idxc].final[j]].label
498 }
else if (m_deexcitations[idxc].type[j] == DxcTypeCollIon) {
499 if (m_deexcitations[idxc].
final[j] < 0) {
500 std::cout <<
" Penning ionisation: ";
502 std::cout <<
" Associative ionisation: ";
504 }
else if (m_deexcitations[idxc].type[j] == DxcTypeCollNonIon) {
505 if (m_deexcitations[idxc].
final[j] >= 0) {
506 std::cout <<
" Collision-induced transition to "
507 << m_deexcitations[m_deexcitations[idxc].final[j]].label
510 std::cout <<
" Loss: ";
514 std::cout << std::setprecision(5) << m_deexcitations[idxc].p[j] * 100.
517 std::cout << std::setprecision(5) << (m_deexcitations[idxc].p[j] -
518 m_deexcitations[idxc].p[j - 1]) *
531 std::cerr <<
m_className <<
"::GetElectronNullCollisionRate:\n";
532 std::cerr <<
" Error calculating the collision rates table.\n";
539 std::cerr <<
m_className <<
"::GetElectronNullCollisionRate:\n";
540 std::cerr <<
" Warning: unexpected band index.\n";
551 std::cerr <<
m_className <<
"::GetElectronCollisionRate:\n";
552 std::cerr <<
" Electron energy must be greater than zero.\n";
555 if (e > m_eFinal && m_useAutoAdjust) {
556 std::cerr <<
m_className <<
"::GetElectronCollisionRate:\n";
557 std::cerr <<
" Collision rate at " << e
558 <<
" eV is not included in the current table.\n";
559 std::cerr <<
" Increasing energy range to " << 1.05 * e <<
" eV.\n";
566 std::cerr <<
m_className <<
"::GetElectronCollisionRate:\n";
567 std::cerr <<
" Error calculating the collision rates table.\n";
574 std::cerr <<
m_className <<
"::GetElectronCollisionRate:\n";
575 std::cerr <<
" Warning: unexpected band index.\n";
582 iE = int(e / m_eStep);
583 if (iE >= nEnergySteps)
return m_cfTot[nEnergySteps - 1];
584 if (iE < 0)
return m_cfTot[0];
589 const double eLog = log(e);
590 iE = int((eLog - m_eHighLog) / m_lnStep);
592 const double fmax = m_cfTotLog[iE];
593 const double fmin = iE == 0 ? log(m_cfTot[nEnergySteps - 1]) : m_cfTotLog[iE - 1];
594 const double emin = m_eHighLog + iE * m_lnStep;
595 const double f = fmin + (eLog - emin) * (fmax - fmin) / m_lnStep;
600 const unsigned int level,
605 std::cerr <<
m_className <<
"::GetElectronCollisionRate:\n";
606 std::cerr <<
" Electron energy must be greater than zero.\n";
611 if (level >= m_nTerms) {
612 std::cerr <<
m_className <<
"::GetElectronCollisionRate:\n";
613 std::cerr <<
" Level " << level <<
" does not exist.\n";
614 std::cerr <<
" The present gas mixture has " << m_nTerms
615 <<
" cross-section terms.\n";
625 iE = int(e / m_eStep);
626 if (iE >= nEnergySteps)
return m_cfTot[nEnergySteps - 1];
630 rate *= m_cf[iE][level] - m_cf[iE][level - 1];
634 iE = int((log(e) - m_eHighLog) / m_lnStep);
636 rate *= m_cfLog[iE][0];
638 rate *= m_cfLog[iE][level] - m_cfLog[iE][level - 1];
645 double& e1,
double& dx,
double& dy,
646 double& dz,
int& nion,
int& ndxc,
650 if (e > m_eFinal && m_useAutoAdjust) {
651 std::cerr <<
m_className <<
"::GetElectronCollision:\n";
652 std::cerr <<
" Provided electron energy (" << e
653 <<
" eV) exceeds current energy range (" << m_eFinal <<
" eV).\n";
654 std::cerr <<
" Increasing energy range to " << 1.05 * e <<
" eV.\n";
656 }
else if (e <= 0.) {
657 std::cerr <<
m_className <<
"::GetElectronCollision:\n";
658 std::cerr <<
" Electron energy must be greater than zero.\n";
665 std::cerr <<
m_className <<
"::GetElectronCollision:\n";
666 std::cerr <<
" Error calculating the collision rates table.\n";
673 std::cerr <<
m_className <<
"::GetElectronCollision:\n";
674 std::cerr <<
" Warning: unexpected band index.\n";
683 int iE = int(e / m_eStep);
684 if (iE >= nEnergySteps) iE = nEnergySteps - 1;
690 int iUp = m_nTerms - 1;
691 if (r <= m_cf[iE][iLow]) {
693 }
else if (r >= m_cf[iE][iUp]) {
697 while (iUp - iLow > 1) {
698 iMid = (iLow + iUp) >> 1;
699 if (r < m_cf[iE][iMid]) {
708 angCut = m_scatCut[iE][level];
709 angPar = m_scatParameter[iE][level];
713 int iE = int(log(e / m_eHigh) / m_lnStep);
715 if (iE >= nEnergyStepsLog) iE = nEnergyStepsLog - 1;
719 int iUp = m_nTerms - 1;
720 if (r <= m_cfLog[iE][iLow]) {
722 }
else if (r >= m_cfLog[iE][iUp]) {
726 while (iUp - iLow > 1) {
727 iMid = (iLow + iUp) >> 1;
728 if (r < m_cfLog[iE][iMid]) {
737 angCut = m_scatCutLog[iE][level];
738 angPar = m_scatParameterLog[iE][level];
742 type = m_csType[level] % nCsTypes;
743 const int igas = int(m_csType[level] / nCsTypes);
745 ++m_nCollisions[type];
746 ++m_nCollisionsDetailed[level];
749 double loss = m_energyLoss[level];
752 if (type == ElectronCollisionTypeIonisation) {
756 if (m_useOpalBeaty) {
758 const double w = m_wOpalBeaty[level];
759 esec = w * tan(
RndmUniform() * atan(0.5 * (e - loss) / w));
762 }
else if (m_useGreenSawada) {
763 const double w = m_gsGreenSawada[igas] * e / (e + m_gbGreenSawada[igas]);
765 m_tsGreenSawada[igas] - m_taGreenSawada[igas] / (e + m_tbGreenSawada[igas]);
767 esec = esec0 + w * tan((r - 1.) * atan(esec0 / w) +
768 r * atan((0.5 * (e - loss) - esec0) / w));
772 if (esec <= 0) esec = Small;
774 m_ionProducts.clear();
777 newIonProd.type = IonProdTypeElectron;
778 newIonProd.energy = esec;
779 m_ionProducts.push_back(newIonProd);
781 newIonProd.type = IonProdTypeIon;
782 newIonProd.energy = 0.;
783 m_ionProducts.push_back(newIonProd);
785 }
else if (type == ElectronCollisionTypeExcitation) {
796 if (m_useDeexcitation && m_iDeexcitation[level] >= 0) {
798 ComputeDeexcitationInternal(m_iDeexcitation[level], fLevel);
799 ndxc = m_dxcProducts.size();
801 m_dxcProducts.clear();
806 if (m_energyLoss[level] * m_rgas[igas] > m_minIonPot &&
810 double esec = m_energyLoss[level] * m_rgas[igas] - m_minIonPot;
811 if (esec <= 0) esec = Small;
816 if (m_lambdaPenning[level] > Small) {
818 newDxcProd.s = m_lambdaPenning[level] * pow(
RndmUniformPos(), 1. / 3.);
820 newDxcProd.energy = esec;
821 newDxcProd.type = DxcProdTypeElectron;
822 m_dxcProducts.push_back(newDxcProd);
830 if (e < loss) loss = e - 0.0001;
834 if (m_useAnisotropic) {
835 switch (m_scatModel[level]) {
843 ctheta0 = (ctheta0 + angPar) / (1. + angPar * ctheta0);
846 std::cerr <<
m_className <<
"::GetElectronCollision:\n";
847 std::cerr <<
" Unknown scattering model. \n";
848 std::cerr <<
" Using isotropic distribution.\n";
853 const double s1 = m_rgas[igas];
854 const double s2 = (s1 * s1) / (s1 - 1.);
855 const double theta0 = acos(ctheta0);
856 const double arg = std::max(1. - s1 * loss / e, Small);
857 const double d = 1. - ctheta0 * sqrt(arg);
860 e1 = std::max(e * (1. - loss / (s1 * e) - 2. * d / s2), Small);
861 double q = std::min(sqrt((e / e1) * arg) / s1, 1.);
862 const double theta = asin(q * sin(theta0));
863 double ctheta = cos(theta);
865 const double u = (s1 - 1.) * (s1 - 1.) / arg;
866 if (ctheta0 * ctheta0 > u) ctheta = -ctheta;
868 const double stheta = sin(theta);
870 dz = std::min(dz, 1.);
871 const double argZ = sqrt(dx * dx + dy * dy);
875 const double cphi = cos(phi);
876 const double sphi = sin(phi);
883 const double a = stheta / argZ;
884 const double dz1 = dz * ctheta + argZ * stheta * sphi;
885 const double dy1 = dy * ctheta + a * (dx * cphi - dy * dz * sphi);
886 const double dx1 = dx * ctheta - a * (dy * cphi + dx * dz * sphi);
896 int& type,
double& energy)
const {
898 if (i >= m_dxcProducts.size() || !(m_useDeexcitation ||
m_usePenning)) {
901 t = m_dxcProducts[i].t;
902 s = m_dxcProducts[i].s;
903 type = m_dxcProducts[i].type;
904 energy = m_dxcProducts[i].energy;
909 double& energy)
const {
911 if (i >= m_ionProducts.size()) {
912 std::cerr <<
m_className <<
"::GetIonisationProduct:\n"
913 <<
" Index (" << i <<
") out of range.\n";
917 type = m_ionProducts[i].type;
918 energy = m_ionProducts[i].energy;
925 std::cerr <<
m_className <<
"::GetPhotonCollisionRate:\n";
926 std::cerr <<
" Photon energy must be greater than zero.\n";
927 return m_cfTotGamma[0];
929 if (e > m_eFinalGamma && m_useAutoAdjust) {
930 std::cerr <<
m_className <<
"::GetPhotonCollisionRate:\n";
931 std::cerr <<
" Collision rate at " << e
932 <<
" eV is not included in the current table.\n";
933 std::cerr <<
" Increasing energy range to " << 1.05 * e <<
" eV.\n";
939 std::cerr <<
m_className <<
"::GetPhotonCollisionRate:\n";
940 std::cerr <<
" Error calculating the collision rates table.\n";
946 int iE = int(e / m_eStepGamma);
947 if (iE >= nEnergyStepsGamma) iE = nEnergyStepsGamma - 1;
950 double cfSum = m_cfTotGamma[iE];
951 if (m_useDeexcitation && m_useRadTrap && !m_deexcitations.empty()) {
953 const unsigned int nDeexcitations = m_deexcitations.size();
954 for (
unsigned int i = 0; i < nDeexcitations; ++i) {
955 if (m_deexcitations[i].cf > 0. &&
956 fabs(e - m_deexcitations[i].energy) <= m_deexcitations[i].width) {
958 m_deexcitations[i].cf * TMath::Voigt(e - m_deexcitations[i].energy,
959 m_deexcitations[i].sDoppler,
960 2 * m_deexcitations[i].gPressure);
969 double& e1,
double& ctheta,
int& nsec,
972 if (e > m_eFinalGamma && m_useAutoAdjust) {
973 std::cerr <<
m_className <<
"::GetPhotonCollision:\n";
974 std::cerr <<
" Provided electron energy (" << e
975 <<
" eV) exceeds current energy range (" << m_eFinalGamma
977 std::cerr <<
" Increasing energy range to " << 1.05 * e <<
" eV.\n";
979 }
else if (e <= 0.) {
980 std::cerr <<
m_className <<
"::GetPhotonCollision:\n";
981 std::cerr <<
" Photon energy must be greater than zero.\n";
987 std::cerr <<
m_className <<
"::GetPhotonCollision:\n";
988 std::cerr <<
" Error calculating the collision rates table.\n";
995 int iE = int(e / m_eStepGamma);
996 if (iE >= nEnergyStepsGamma) iE = nEnergyStepsGamma - 1;
999 double r = m_cfTotGamma[iE];
1000 if (m_useDeexcitation && m_useRadTrap && !m_deexcitations.empty()) {
1002 std::vector<double> pLine(0);
1003 std::vector<int> iLine(0);
1005 const unsigned int nDeexcitations = m_deexcitations.size();
1006 for (
unsigned int i = 0; i < nDeexcitations; ++i) {
1007 if (m_deexcitations[i].cf > 0. &&
1008 fabs(e - m_deexcitations[i].energy) <= m_deexcitations[i].width) {
1009 r += m_deexcitations[i].cf * TMath::Voigt(e - m_deexcitations[i].energy,
1010 m_deexcitations[i].sDoppler,
1011 2 * m_deexcitations[i].gPressure);
1018 if (nLines > 0 && r >= m_cfTotGamma[iE]) {
1020 for (
int i = 0; i < nLines; ++i) {
1021 if (r <= pLine[i]) {
1022 ++m_nPhotonCollisions[PhotonCollisionTypeExcitation];
1024 ComputeDeexcitationInternal(iLine[i], fLevel);
1025 type = PhotonCollisionTypeExcitation;
1026 nsec = nDeexcitationProducts;
1030 std::cerr <<
m_className <<
"::GetPhotonCollision:\n";
1031 std::cerr <<
" Random sampling of deexcitation line failed.\n";
1032 std::cerr <<
" Program bug!\n";
1040 int iUp = nPhotonTerms - 1;
1041 if (r <= m_cfGamma[iE][iLow]) {
1043 }
else if (r >= m_cfGamma[iE][iUp]) {
1047 while (iUp - iLow > 1) {
1048 iMid = (iLow + iUp) >> 1;
1049 if (r < m_cfGamma[iE][iMid]) {
1060 type = csTypeGamma[level];
1062 type = type % nCsTypesGamma;
1063 int ngas = int(csTypeGamma[level] / nCsTypesGamma);
1064 ++m_nPhotonCollisions[type];
1067 esec = e - m_ionPot[ngas];
1068 if (esec < Small) esec = Small;
1080 for (
int j = nCsTypes; j--;) m_nCollisions[j] = 0;
1081 m_nCollisionsDetailed.resize(m_nTerms);
1082 for (
unsigned int j = 0; j < m_nTerms; ++j) m_nCollisionsDetailed[j] = 0;
1084 for (
int j = nCsTypesGamma; j--;) m_nPhotonCollisions[j] = 0;
1089 unsigned int ncoll = 0;
1090 for (
int j = nCsTypes; j--;) ncoll += m_nCollisions[j];
1095 int& nElastic,
int& nIonisation,
int& nAttachment,
int& nInelastic,
1096 int& nExcitation,
int& nSuperelastic)
const {
1098 nElastic = m_nCollisions[ElectronCollisionTypeElastic];
1099 nIonisation = m_nCollisions[ElectronCollisionTypeIonisation];
1100 nAttachment = m_nCollisions[ElectronCollisionTypeAttachment];
1101 nInelastic = m_nCollisions[ElectronCollisionTypeInelastic];
1102 nExcitation = m_nCollisions[ElectronCollisionTypeExcitation];
1103 nSuperelastic = m_nCollisions[ElectronCollisionTypeSuperelastic];
1104 return nElastic + nIonisation + nAttachment + nInelastic + nExcitation +
1112 std::cerr <<
m_className <<
"::GetNumberOfLevels:\n";
1113 std::cerr <<
" Error calculating the collision rates table.\n";
1123 std::string& descr,
double& e) {
1128 std::cerr <<
" Error calculating the collision rates table.\n";
1134 if (i >= m_nTerms) {
1136 std::cerr <<
" Requested level (" << i <<
") does not exist.\n";
1141 type = m_csType[i] % nCsTypes;
1142 ngas = int(m_csType[i] / nCsTypes);
1144 descr = std::string(50,
' ');
1145 for (
int j = 50; j--;) descr[j] = m_description[i][j];
1147 e = m_rgas[ngas] * m_energyLoss[i];
1150 std::cout <<
" Level " << i <<
": " << descr <<
"\n";
1151 std::cout <<
" Type " << type <<
"\n",
1152 std::cout <<
" Threshold energy: " << e <<
" eV\n";
1153 if (type == ElectronCollisionTypeExcitation &&
m_usePenning &&
1155 std::cout <<
" Penning transfer coefficient: " << m_rPenning[i] <<
"\n";
1156 }
else if (type == ElectronCollisionTypeExcitation && m_useDeexcitation) {
1157 const int idxc = m_iDeexcitation[i];
1158 if (idxc < 0 || idxc >= (
int)m_deexcitations.size()) {
1159 std::cout <<
" Deexcitation cascade not implemented.\n";
1162 if (m_deexcitations[idxc].osc > 0.) {
1163 std::cout <<
" Oscillator strength: " << m_deexcitations[idxc].osc
1166 std::cout <<
" Decay channels:\n";
1167 for (
int j = 0; j < m_deexcitations[idxc].nChannels; ++j) {
1168 if (m_deexcitations[idxc].type[j] == DxcTypeRad) {
1169 std::cout <<
" Radiative decay to ";
1170 if (m_deexcitations[idxc].
final[j] < 0) {
1171 std::cout <<
"ground state: ";
1173 std::cout << m_deexcitations[m_deexcitations[idxc].final[j]].label
1176 }
else if (m_deexcitations[idxc].type[j] == DxcTypeCollIon) {
1177 if (m_deexcitations[idxc].
final[j] < 0) {
1178 std::cout <<
" Penning ionisation: ";
1180 std::cout <<
" Associative ionisation: ";
1182 }
else if (m_deexcitations[idxc].type[j] == DxcTypeCollNonIon) {
1183 if (m_deexcitations[idxc].
final[j] >= 0) {
1184 std::cout <<
" Collision-induced transition to "
1185 << m_deexcitations[m_deexcitations[idxc].final[j]].label
1188 std::cout <<
" Loss: ";
1192 std::cout << std::setprecision(5) << m_deexcitations[idxc].p[j] * 100.
1195 std::cout << std::setprecision(5) << (m_deexcitations[idxc].p[j] -
1196 m_deexcitations[idxc].p[j - 1]) *
1208 if (level >= m_nTerms) {
1209 std::cerr <<
m_className <<
"::GetNumberOfElectronCollisions:\n"
1210 <<
" Cross-section term (" << level <<
") does not exist.\n";
1213 return m_nCollisionsDetailed[level];
1219 for (
int j = nCsTypesGamma; j--;) ncoll += m_nPhotonCollisions[j];
1224 int& nInelastic)
const {
1226 nElastic = m_nPhotonCollisions[0];
1227 nIonising = m_nPhotonCollisions[1];
1228 nInelastic = m_nPhotonCollisions[2];
1229 return nElastic + nIonising + nInelastic;
1232bool MediumMagboltz::GetGasNumberMagboltz(
const std::string& input,
1233 int& number)
const {
1241 if (input ==
"CF4") {
1246 if (input ==
"Ar") {
1251 if (input ==
"He" || input ==
"He-4") {
1256 if (input ==
"He-3") {
1261 if (input ==
"Ne") {
1266 if (input ==
"Kr") {
1271 if (input ==
"Xe") {
1276 if (input ==
"CH4") {
1281 if (input ==
"C2H6") {
1286 if (input ==
"C3H8") {
1291 if (input ==
"iC4H10") {
1296 if (input ==
"CO2") {
1301 if (input ==
"neoC5H12") {
1306 if (input ==
"H2O") {
1311 if (input ==
"O2") {
1316 if (input ==
"N2") {
1321 if (input ==
"NO") {
1326 if (input ==
"N2O") {
1331 if (input ==
"C2H4") {
1336 if (input ==
"C2H2") {
1341 if (input ==
"H2") {
1346 if (input ==
"D2") {
1351 if (input ==
"CO") {
1356 if (input ==
"Methylal") {
1361 if (input ==
"DME") {
1366 if (input ==
"Reid-Step") {
1371 if (input ==
"Maxwell-Model") {
1376 if (input ==
"Reid-Ramp") {
1381 if (input ==
"C2F6") {
1386 if (input ==
"SF6") {
1391 if (input ==
"NH3") {
1396 if (input ==
"C3H6") {
1401 if (input ==
"cC3H6") {
1406 if (input ==
"CH3OH") {
1411 if (input ==
"C2H5OH") {
1416 if (input ==
"C3H7OH") {
1421 if (input ==
"Cs") {
1426 if (input ==
"F2") {
1430 if (input ==
"CS2") {
1435 if (input ==
"COS") {
1440 if (input ==
"CD4") {
1445 if (input ==
"BF3") {
1450 if (input ==
"C2HF5" || input ==
"C2H2F4") {
1455 if (input ==
"TMA") {
1460 if (input ==
"CHF3") {
1465 if (input ==
"CF3Br") {
1470 if (input ==
"C3F8") {
1475 if (input ==
"O3") {
1480 if (input ==
"Hg") {
1485 if (input ==
"H2S") {
1490 if (input ==
"nC4H10") {
1495 if (input ==
"nC5H12") {
1500 if (input ==
"N2 (Phelps)") {
1505 if (input ==
"GeH4") {
1510 if (input ==
"SiH4") {
1515 std::cerr <<
m_className <<
"::GetGasNumberMagboltz:\n";
1516 std::cerr <<
" Gas " << input <<
" is not defined.\n";
1520bool MediumMagboltz::Mixer(
const bool verbose) {
1535 if (m_useAnisotropic) {
1544 const double prefactor = dens * SpeedOfLight *
sqrt(2. / ElectronMass);
1547 for (
int i = nEnergySteps; i--;) {
1549 for (
int j = nMaxLevels; j--;) {
1551 m_scatParameter[i][j] = 0.5;
1552 m_scatCut[i][j] = 1.;
1555 for (
int i = nEnergyStepsLog; i--;) {
1557 for (
int j = nMaxLevels; j--;) {
1559 m_scatParameter[i][j] = 0.5;
1560 m_scatCut[i][j] = 1.;
1564 m_deexcitations.clear();
1565 for (
int i = nMaxLevels; i--;) {
1567 m_iDeexcitation[i] = -1;
1568 m_wOpalBeaty[i] = 1.;
1574 m_gsGreenSawada[i] = 1.;
1575 m_gbGreenSawada[i] = 0.;
1576 m_tsGreenSawada[i] = 0.;
1577 m_taGreenSawada[i] = 0.;
1578 m_tbGreenSawada[i] = 0.;
1579 m_hasGreenSawada[i] =
false;
1585 static double q[nEnergySteps][6];
1587 static double pEqEl[nEnergySteps][6];
1589 static double qIn[nEnergySteps][nMaxInelasticTerms];
1591 static double qIon[nEnergySteps][8];
1593 static double pEqIn[nEnergySteps][nMaxInelasticTerms];
1595 static double pEqIon[nEnergySteps][8];
1597 static double eoby[nEnergySteps];
1599 static double penFra[nMaxInelasticTerms][3];
1601 static char scrpt[260][50];
1606 if (!GetGasNumberMagboltz(
m_gas[i], gasNumber[i])) {
1608 std::cerr <<
" Gas " <<
m_gas[i] <<
" has no corresponding"
1609 <<
" gas number in Magboltz.\n";
1616 std::cout <<
" Creating table of collision rates with\n";
1617 std::cout <<
" " << nEnergySteps <<
" linear energy steps between 0 and "
1618 << std::min(m_eFinal, m_eHigh) <<
" eV\n";
1619 if (m_eFinal > m_eHigh) {
1620 std::cout <<
" " << nEnergyStepsLog
1621 <<
" logarithmic energy steps between " << m_eHigh <<
" and "
1622 << m_eFinal <<
" eV\n";
1627 std::ofstream outfile;
1628 if (m_useCsOutput) {
1629 outfile.open(
"cs.txt", std::ios::out);
1630 outfile <<
"# energy [eV] vs. cross-section [cm2]\n";
1635 if (m_eFinal <= m_eHigh) {
1646 double e[6] = {0., 0., 0., 0., 0., 0.};
1647 double eIn[nMaxInelasticTerms] = {0.};
1648 double eIon[8] = {0.};
1652 long long kIn[nMaxInelasticTerms] = {0};
1653 long long kEl[6] = {0, 0, 0, 0, 0, 0};
1657 long long ngs = gasNumber[iGas];
1659 pEqEl[0], pEqIn[0], penFra[0], kEl, kIn, qIon[0],
1660 pEqIon[0], eIon, &nIon, scrpt);
1662 const double massAmu =
1663 (2. / e[1]) * ElectronMass / AtomicMassUnitElectronVolt;
1664 std::cout <<
" " << name <<
"\n";
1665 std::cout <<
" mass: " << massAmu <<
" amu\n";
1667 std::cout <<
" ionisation threshold: " << eIon[0] <<
" eV\n";
1669 std::cout <<
" ionisation threshold: " << e[2] <<
" eV\n";
1671 if (e[3] > 0. && e[4] > 0.) {
1672 std::cout <<
" cross-sections at minimum ionising energy:\n";
1673 std::cout <<
" excitation: " << e[3] * 1.e18 <<
" Mbarn\n";
1674 std::cout <<
" ionisation: " << e[4] * 1.e18 <<
" Mbarn\n";
1680 if (np0 + nIn + nIon + 1 >= nMaxLevels) {
1682 std::cerr <<
" Max. number of levels (" << nMaxLevels
1690 if (m_useCsOutput) {
1691 outfile <<
"# cross-sections for " << name <<
"\n";
1692 outfile <<
"# cross-section types:\n";
1693 outfile <<
"# elastic\n";
1697 m_scatModel[np] = kEl[1];
1698 const double r = 1. + e[1] / 2.;
1700 m_energyLoss[np] = 0.;
1701 for (
int j = 0; j < 50; ++j) {
1702 m_description[np][j] = scrpt[1][j];
1704 m_csType[np] = nCsTypes * iGas + ElectronCollisionTypeElastic;
1705 bool withIon =
false;
1708 for (
int j = 0; j < nIon; ++j) {
1709 if (m_eFinal < eIon[j])
continue;
1713 m_scatModel[np] = kEl[2];
1714 m_energyLoss[np] = eIon[j] / r;
1716 m_wOpalBeaty[np] = eoby[j];
1717 if (
m_gas[iGas] ==
"CH4") {
1718 if (
fabs(eIon[j] - 21.) < 0.1) {
1719 m_wOpalBeaty[np] = 14.;
1720 }
else if (
fabs(eIon[j] - 291.) < 0.1) {
1721 m_wOpalBeaty[np] = 200.;
1724 for (
int k = 0; k < 50; ++k) {
1725 m_description[np][k] = scrpt[2 + j][k];
1727 m_csType[np] = nCsTypes * iGas + ElectronCollisionTypeIonisation;
1728 if (m_useCsOutput) {
1729 outfile <<
"# " << m_description[np] <<
"\n";
1732 m_gsGreenSawada[iGas] = eoby[0];
1733 m_tbGreenSawada[iGas] = 2 * eIon[0];
1734 m_ionPot[iGas] = eIon[0];
1736 if (m_eFinal >= e[2]) {
1740 m_scatModel[np] = kEl[2];
1741 m_energyLoss[np] = e[2] / r;
1742 m_wOpalBeaty[np] = eoby[0];
1743 m_gsGreenSawada[iGas] = eoby[0];
1744 m_tbGreenSawada[iGas] = 2 * e[2];
1745 m_ionPot[iGas] = e[2];
1746 for (
int j = 0; j < 50; ++j) {
1747 m_description[np][j] = scrpt[2][j];
1749 m_csType[np] = nCsTypes * iGas + ElectronCollisionTypeIonisation;
1750 if (m_useCsOutput) {
1751 outfile <<
"# ionisation (gross)\n";
1758 m_scatModel[np] = 0;
1759 m_energyLoss[np] = 0.;
1760 for (
int j = 0; j < 50; ++j) {
1761 m_description[np][j] = scrpt[2 + nIon][j];
1763 m_csType[np] = nCsTypes * iGas + ElectronCollisionTypeAttachment;
1764 if (m_useCsOutput) {
1765 outfile <<
"# attachment\n";
1768 int nExc = 0, nSuperEl = 0;
1769 for (
int j = 0; j < nIn; ++j) {
1771 m_scatModel[np] = kIn[j];
1772 m_energyLoss[np] = eIn[j] / r;
1773 for (
int k = 0; k < 50; ++k) {
1774 m_description[np][k] = scrpt[5 + nIon + j][k];
1776 if ((m_description[np][1] ==
'E' && m_description[np][2] ==
'X') ||
1777 (m_description[np][0] ==
'E' && m_description[np][1] ==
'X') ||
1778 (
m_gas[iGas] ==
"N2" && eIn[j] > 6.)) {
1780 m_csType[np] = nCsTypes * iGas + ElectronCollisionTypeExcitation;
1782 }
else if (eIn[j] < 0.) {
1784 m_csType[np] = nCsTypes * iGas + ElectronCollisionTypeSuperelastic;
1788 m_csType[np] = nCsTypes * iGas + ElectronCollisionTypeInelastic;
1790 if (m_useCsOutput) {
1791 outfile <<
"# " << m_description[np] <<
"\n";
1796 for (
int iE = 0; iE < nEnergySteps; ++iE) {
1798 if (m_useCsOutput) {
1799 outfile << (iE + 0.5) * m_eStep <<
" " << q[iE][1] <<
" ";
1802 m_cf[iE][np] = q[iE][1] * van;
1803 if (m_scatModel[np] == 1) {
1804 ComputeAngularCut(pEqEl[iE][1], m_scatCut[iE][np], m_scatParameter[iE][np]);
1805 }
else if (m_scatModel[np] == 2) {
1806 m_scatParameter[iE][np] = pEqEl[iE][1];
1811 for (
int j = 0; j < nIon; ++j) {
1812 if (m_eFinal < eIon[j])
continue;
1814 m_cf[iE][np] = qIon[iE][j] * van;
1815 if (m_scatModel[np] == 1) {
1816 ComputeAngularCut(pEqIon[iE][j], m_scatCut[iE][np],
1817 m_scatParameter[iE][np]);
1818 }
else if (m_scatModel[np] == 2) {
1819 m_scatParameter[iE][np] = pEqIon[iE][j];
1821 if (m_useCsOutput) {
1822 outfile << qIon[iE][j] <<
" ";
1827 m_cf[iE][np] = q[iE][2] * van;
1828 if (m_scatModel[np] == 1) {
1829 ComputeAngularCut(pEqEl[iE][2], m_scatCut[iE][np],
1830 m_scatParameter[iE][np]);
1831 }
else if (m_scatModel[np] == 2) {
1832 m_scatParameter[iE][np] = pEqEl[iE][2];
1834 if (m_useCsOutput) {
1835 outfile << q[iE][2] <<
" ";
1841 m_cf[iE][np] = q[iE][3] * van;
1842 m_scatParameter[iE][np] = 0.5;
1843 if (m_useCsOutput) {
1844 outfile << q[iE][3] <<
" ";
1847 for (
int j = 0; j < nIn; ++j) {
1849 if (m_useCsOutput) outfile << qIn[iE][j] <<
" ";
1850 m_cf[iE][np] = qIn[iE][j] * van;
1852 m_cf[iE][np] *= m_scaleExc[iGas];
1854 if (m_description[np][5] ==
'D' && m_description[np][6] ==
'I' &&
1855 m_description[np][7] ==
'S') {
1862 if (m_cf[iE][np] < 0.) {
1864 std::cerr <<
" Negative inelastic cross-section at "
1865 << (iE + 0.5) * m_eStep <<
" eV.\n";
1866 std::cerr <<
" Set to zero.\n";
1869 if (m_scatModel[np] == 1) {
1870 ComputeAngularCut(pEqIn[iE][j], m_scatCut[iE][np],
1871 m_scatParameter[iE][np]);
1872 }
else if (m_scatModel[np] == 2) {
1873 m_scatParameter[iE][np] = pEqIn[iE][j];
1876 if ((
m_debug || verbose) && nIn > 0 && iE == nEnergySteps - 1) {
1877 std::cout <<
" " << nIn <<
" inelastic terms (" << nExc
1878 <<
" excitations, " << nSuperEl <<
" superelastic, "
1879 << nIn - nExc - nSuperEl <<
" other)\n";
1881 if (m_useCsOutput) outfile <<
"\n";
1884 if (m_eFinal <= m_eHigh)
continue;
1887 const double rLog =
pow(m_eFinal / m_eHigh, 1. / nEnergyStepsLog);
1888 m_lnStep = log(rLog);
1890 double emax = m_eHigh * rLog;
1891 int imax = nEnergySteps - 1;
1892 for (
int iE = 0; iE < nEnergyStepsLog; ++iE) {
1896 pEqEl[0], pEqIn[0], penFra[0], kEl, kIn, qIon[0],
1897 pEqIon[0], eIon, &nIon, scrpt);
1899 if (m_useCsOutput) {
1900 outfile << emax <<
" " << q[imax][1] <<
" ";
1903 m_cfLog[iE][np] = q[imax][1] * van;
1904 if (m_scatModel[np] == 1) {
1905 ComputeAngularCut(pEqEl[imax][1], m_scatCutLog[iE][np],
1906 m_scatParameterLog[iE][np]);
1907 }
else if (m_scatModel[np] == 2) {
1908 m_scatParameterLog[iE][np] = pEqEl[imax][1];
1913 for (
int j = 0; j < nIon; ++j) {
1914 if (m_eFinal < eIon[j])
continue;
1916 m_cfLog[iE][np] = qIon[imax][j] * van;
1917 if (m_scatModel[np] == 1) {
1918 ComputeAngularCut(pEqIon[imax][j], m_scatCutLog[iE][np],
1919 m_scatParameterLog[iE][np]);
1920 }
else if (m_scatModel[np] == 2) {
1921 m_scatParameterLog[iE][np] = pEqIon[imax][j];
1923 if (m_useCsOutput) {
1924 outfile << qIon[imax][j] <<
" ";
1930 m_cfLog[iE][np] = q[imax][2] * van;
1933 if (m_scatModel[np] == 1) {
1934 ComputeAngularCut(pEqEl[imax][2], m_scatCutLog[iE][np],
1935 m_scatParameterLog[iE][np]);
1936 }
else if (m_scatModel[np] == 2) {
1937 m_scatParameterLog[iE][np] = pEqEl[imax][2];
1943 m_cfLog[iE][np] = q[imax][3] * van;
1944 if (m_useCsOutput) {
1945 outfile << q[imax][3] <<
" ";
1948 for (
int j = 0; j < nIn; ++j) {
1950 if (m_useCsOutput) outfile << qIn[imax][j] <<
" ";
1951 m_cfLog[iE][np] = qIn[imax][j] * van;
1953 m_cfLog[iE][np] *= m_scaleExc[iGas];
1954 if (m_cfLog[iE][np] < 0.) {
1956 std::cerr <<
" Negative inelastic cross-section at " << emax
1958 std::cerr <<
" Set to zero.\n";
1959 m_cfLog[iE][np] = 0.;
1961 if (m_scatModel[np] == 1) {
1962 ComputeAngularCut(pEqIn[imax][j], m_scatCutLog[iE][np],
1963 m_scatParameterLog[iE][np]);
1964 }
else if (m_scatModel[np] == 2) {
1965 m_scatParameterLog[iE][np] = pEqIn[imax][j];
1968 if (m_useCsOutput) outfile <<
"\n";
1973 if (m_useCsOutput) outfile.close();
1976 std::string minIonPotGas =
"";
1978 if (m_ionPot[i] < 0.)
continue;
1979 if (m_minIonPot < 0.) {
1980 m_minIonPot = m_ionPot[i];
1981 minIonPotGas =
m_gas[i];
1982 }
else if (m_ionPot[i] < m_minIonPot) {
1983 m_minIonPot = m_ionPot[i];
1984 minIonPotGas =
m_gas[i];
1990 std::cout <<
" Lowest ionisation threshold in the mixture:\n";
1991 std::cout <<
" " << m_minIonPot <<
" eV (" << minIonPotGas <<
")\n";
1994 for (
int iE = nEnergySteps; iE--;) {
1996 for (
unsigned int k = 0; k < m_nTerms; ++k) {
1997 if (m_cf[iE][k] < 0.) {
1999 std::cerr <<
" Negative collision rate at " << (iE + 0.5) * m_eStep
2000 <<
" eV. Set to zero.\n";
2003 m_cfTot[iE] += m_cf[iE][k];
2006 if (m_cfTot[iE] > 0.) {
2007 for (
unsigned int k = 0; k < m_nTerms; ++k) m_cf[iE][k] /= m_cfTot[iE];
2009 for (
unsigned int k = 1; k < m_nTerms; ++k) {
2010 m_cf[iE][k] += m_cf[iE][k - 1];
2012 const double ekin = m_eStep * (iE + 0.5);
2013 m_cfTot[iE] *=
sqrt(ekin);
2017 sqrt(1. + 0.5 * ekin / ElectronMass) / (1. + ekin / ElectronMass);
2021 if (m_eFinal > m_eHigh) {
2022 const double rLog =
pow(m_eFinal / m_eHigh, 1. / nEnergyStepsLog);
2023 for (
int iE = nEnergyStepsLog; iE--;) {
2025 for (
unsigned int k = 0; k < m_nTerms; ++k) {
2026 if (m_cfLog[iE][k] < 0.) m_cfLog[iE][k] = 0.;
2027 m_cfTotLog[iE] += m_cfLog[iE][k];
2030 if (m_cfTotLog[iE] > 0.) {
2031 for (
int k = m_nTerms; k--;) m_cfLog[iE][k] /= m_cfTotLog[iE];
2033 for (
unsigned int k = 1; k < m_nTerms; ++k) {
2034 m_cfLog[iE][k] += m_cfLog[iE][k - 1];
2036 const double ekin = m_eHigh *
pow(rLog, iE + 1);
2037 m_cfTotLog[iE] *=
sqrt(ekin) *
sqrt(1. + 0.5 * ekin / ElectronMass) /
2038 (1. + ekin / ElectronMass);
2040 m_cfTotLog[iE] = log(m_cfTotLog[iE]);
2046 for (
int j = 0; j < nEnergySteps; ++j) {
2047 if (m_cfTot[j] > m_cfNull) m_cfNull = m_cfTot[j];
2049 if (m_eFinal > m_eHigh) {
2050 for (
int j = 0; j < nEnergyStepsLog; ++j) {
2051 const double r =
exp(m_cfTotLog[j]);
2052 if (r > m_cfNull) m_cfNull = r;
2057 m_nCollisionsDetailed.resize(m_nTerms);
2058 for (
int j = nCsTypes; j--;) m_nCollisions[j] = 0;
2059 for (
int j = m_nTerms; j--;) m_nCollisionsDetailed[j] = 0;
2063 std::cout <<
" Energy [eV] Collision Rate [ns-1]\n";
2064 for (
int i = 0; i < 8; ++i) {
2065 const double emax = std::min(m_eHigh, m_eFinal);
2066 std::cout <<
" " << std::fixed << std::setw(10) << std::setprecision(2)
2067 << (2 * i + 1) * emax / 16 <<
" " << std::setw(18)
2068 << std::setprecision(2) << m_cfTot[(i + 1) * nEnergySteps / 16]
2071 std::cout << std::resetiosflags(std::ios_base::floatfield);
2075 if (m_useDeexcitation) {
2076 ComputeDeexcitationTable(verbose);
2077 const unsigned int nDeexcitations = m_deexcitations.size();
2078 for (
unsigned int j = 0; j < nDeexcitations; ++j) {
2079 const int probCount = m_deexcitations[j].p.size();
2080 const int flvlCount = m_deexcitations[j].final.size();
2081 const int typeCount = m_deexcitations[j].type.size();
2082 if (!(probCount == flvlCount && flvlCount == typeCount &&
2083 typeCount == m_deexcitations[j].nChannels)) {
2085 std::cerr <<
" Mismatch in deexcitation channel count.\n";
2086 std::cerr <<
" Program bug!\n";
2087 std::cerr <<
" Deexcitation handling is switched off.\n";
2088 m_useDeexcitation =
false;
2094 if (!ComputePhotonCollisionTable(verbose)) {
2096 std::cerr <<
" Photon collision rates could not be calculated.\n";
2097 if (m_useDeexcitation) {
2098 std::cerr <<
" Deexcitation handling is switched off.\n";
2099 m_useDeexcitation =
false;
2104 for (
unsigned int i = 0; i < m_nTerms; ++i) {
2106 int iGas = int(m_csType[i] / nCsTypes);
2119void MediumMagboltz::SetupGreenSawada() {
2122 m_taGreenSawada[i] = 1000.;
2123 m_hasGreenSawada[i] =
true;
2124 if (
m_gas[i] ==
"He" ||
m_gas[i] ==
"He-3") {
2125 m_tsGreenSawada[i] = -2.25;
2126 m_gsGreenSawada[i] = 15.5;
2127 m_gbGreenSawada[i] = 24.5;
2128 }
else if (
m_gas[i] ==
"Ne") {
2129 m_tsGreenSawada[i] = -6.49;
2130 m_gsGreenSawada[i] = 24.3;
2131 m_gbGreenSawada[i] = 21.6;
2132 }
else if (
m_gas[i] ==
"Ar") {
2133 m_tsGreenSawada[i] = 6.87;
2134 m_gsGreenSawada[i] = 6.92;
2135 m_gbGreenSawada[i] = 7.85;
2136 }
else if (
m_gas[i] ==
"Kr") {
2137 m_tsGreenSawada[i] = 3.90;
2138 m_gsGreenSawada[i] = 7.95;
2139 m_gbGreenSawada[i] = 13.5;
2140 }
else if (
m_gas[i] ==
"Xe") {
2141 m_tsGreenSawada[i] = 3.81;
2142 m_gsGreenSawada[i] = 7.93;
2143 m_gbGreenSawada[i] = 11.5;
2144 }
else if (
m_gas[i] ==
"H2" ||
m_gas[i] ==
"D2") {
2145 m_tsGreenSawada[i] = 1.87;
2146 m_gsGreenSawada[i] = 7.07;
2147 m_gbGreenSawada[i] = 7.7;
2148 }
else if (
m_gas[i] ==
"N2") {
2149 m_tsGreenSawada[i] = 4.71;
2150 m_gsGreenSawada[i] = 13.8;
2151 m_gbGreenSawada[i] = 15.6;
2152 }
else if (
m_gas[i] ==
"O2") {
2153 m_tsGreenSawada[i] = 1.86;
2154 m_gsGreenSawada[i] = 18.5;
2155 m_gbGreenSawada[i] = 12.1;
2156 }
else if (
m_gas[i] ==
"CH4") {
2157 m_tsGreenSawada[i] = 3.45;
2158 m_gsGreenSawada[i] = 7.06;
2159 m_gbGreenSawada[i] = 12.5;
2160 }
else if (
m_gas[i] ==
"H20") {
2161 m_tsGreenSawada[i] = 1.28;
2162 m_gsGreenSawada[i] = 12.8;
2163 m_gbGreenSawada[i] = 12.6;
2164 }
else if (
m_gas[i] ==
"CO") {
2165 m_tsGreenSawada[i] = 2.03;
2166 m_gsGreenSawada[i] = 13.3;
2167 m_gbGreenSawada[i] = 14.0;
2168 }
else if (
m_gas[i] ==
"C2H2") {
2169 m_tsGreenSawada[i] = 1.37;
2170 m_gsGreenSawada[i] = 9.28;
2171 m_gbGreenSawada[i] = 5.8;
2172 }
else if (
m_gas[i] ==
"NO") {
2173 m_tsGreenSawada[i] = -4.30;
2174 m_gsGreenSawada[i] = 10.4;
2175 m_gbGreenSawada[i] = 9.5;
2176 }
else if (
m_gas[i] ==
"CO2") {
2177 m_tsGreenSawada[i] = -2.46;
2178 m_gsGreenSawada[i] = 12.3;
2179 m_gbGreenSawada[i] = 13.8;
2181 m_taGreenSawada[i] = 0.;
2182 m_hasGreenSawada[i] =
false;
2183 if (m_useGreenSawada) {
2184 std::cout <<
m_className <<
"::SetupGreenSawada:\n"
2185 <<
" Fit parameters for " <<
m_gas[i] <<
" not available.\n"
2186 <<
" Opal-Beaty formula is used instead.\n";
2192void MediumMagboltz::ComputeAngularCut(
const double parIn,
double& cut,
2193 double& parOut)
const {
2204 const double rads = 2. / Pi;
2205 const double cns = parIn - 0.5;
2206 const double thetac =
asin(2. *
sqrt(cns - cns * cns));
2207 const double fac = (1. -
cos(thetac)) /
pow(
sin(thetac), 2.);
2208 parOut = cns * fac + 0.5;
2209 cut = thetac * rads;
2212void MediumMagboltz::ComputeDeexcitationTable(
const bool verbose) {
2214 for (
int i = nMaxLevels; i--;) m_iDeexcitation[i] = -1;
2215 m_deexcitations.clear();
2218 OpticalData optData;
2221 bool withAr =
false;
2224 bool withNe =
false;
2226 std::map<std::string, int> mapLevels;
2228 for (
unsigned int i = 0; i < m_nTerms; ++i) {
2230 if (m_csType[i] % nCsTypes != ElectronCollisionTypeExcitation)
continue;
2232 const int ngas = int(m_csType[i] / nCsTypes);
2233 if (
m_gas[ngas] ==
"Ar") {
2241 std::string level =
" ";
2242 for (
int j = 0; j < 7; ++j) level[j] = m_description[i][5 + j];
2243 if (level ==
"1S5 ") mapLevels[
"Ar_1S5"] = i;
2244 else if (level ==
"1S4 ") mapLevels[
"Ar_1S4"] = i;
2245 else if (level ==
"1S3 ") mapLevels[
"Ar_1S3"] = i;
2246 else if (level ==
"1S2 ") mapLevels[
"Ar_1S2"] = i;
2247 else if (level ==
"2P10 ") mapLevels[
"Ar_2P10"] = i;
2248 else if (level ==
"2P9 ") mapLevels[
"Ar_2P9"] = i;
2249 else if (level ==
"2P8 ") mapLevels[
"Ar_2P8"] = i;
2250 else if (level ==
"2P7 ") mapLevels[
"Ar_2P7"] = i;
2251 else if (level ==
"2P6 ") mapLevels[
"Ar_2P6"] = i;
2252 else if (level ==
"2P5 ") mapLevels[
"Ar_2P5"] = i;
2253 else if (level ==
"2P4 ") mapLevels[
"Ar_2P4"] = i;
2254 else if (level ==
"2P3 ") mapLevels[
"Ar_2P3"] = i;
2255 else if (level ==
"2P2 ") mapLevels[
"Ar_2P2"] = i;
2256 else if (level ==
"2P1 ") mapLevels[
"Ar_2P1"] = i;
2257 else if (level ==
"3D6 ") mapLevels[
"Ar_3D6"] = i;
2258 else if (level ==
"3D5 ") mapLevels[
"Ar_3D5"] = i;
2259 else if (level ==
"3D3 ") mapLevels[
"Ar_3D3"] = i;
2260 else if (level ==
"3D4! ") mapLevels[
"Ar_3D4!"] = i;
2261 else if (level ==
"3D4 ") mapLevels[
"Ar_3D4"] = i;
2262 else if (level ==
"3D1!! ") mapLevels[
"Ar_3D1!!"] = i;
2263 else if (level ==
"2S5 ") mapLevels[
"Ar_2S5"] = i;
2264 else if (level ==
"2S4 ") mapLevels[
"Ar_2S4"] = i;
2265 else if (level ==
"3D1! ") mapLevels[
"Ar_3D1!"] = i;
2266 else if (level ==
"3D2 ") mapLevels[
"Ar_3D2"] = i;
2267 else if (level ==
"3S1!!!!") mapLevels[
"Ar_3S1!!!!"] = i;
2268 else if (level ==
"3S1!! ") mapLevels[
"Ar_3S1!!"] = i;
2269 else if (level ==
"3S1!!! ") mapLevels[
"Ar_3S1!!!"] = i;
2270 else if (level ==
"2S3 ") mapLevels[
"Ar_2S3"] = i;
2271 else if (level ==
"2S2 ") mapLevels[
"Ar_2S2"] = i;
2272 else if (level ==
"3S1! ") mapLevels[
"Ar_3S1!"] = i;
2273 else if (level ==
"4D5 ") mapLevels[
"Ar_4D5"] = i;
2274 else if (level ==
"3S4 ") mapLevels[
"Ar_3S4"] = i;
2275 else if (level ==
"4D2 ") mapLevels[
"Ar_4D2"] = i;
2276 else if (level ==
"4S1! ") mapLevels[
"Ar_4S1!"] = i;
2277 else if (level ==
"3S2 ") mapLevels[
"Ar_3S2"] = i;
2278 else if (level ==
"5D5 ") mapLevels[
"Ar_5D5"] = i;
2279 else if (level ==
"4S4 ") mapLevels[
"Ar_4S4"] = i;
2280 else if (level ==
"5D2 ") mapLevels[
"Ar_5D2"] = i;
2281 else if (level ==
"6D5 ") mapLevels[
"Ar_6D5"] = i;
2282 else if (level ==
"5S1! ") mapLevels[
"Ar_5S1!"] = i;
2283 else if (level ==
"4S2 ") mapLevels[
"Ar_4S2"] = i;
2284 else if (level ==
"5S4 ") mapLevels[
"Ar_5S4"] = i;
2285 else if (level ==
"6D2 ") mapLevels[
"Ar_6D2"] = i;
2286 else if (level ==
"HIGH ") mapLevels[
"Ar_Higher"] = i;
2288 std::cerr <<
m_className <<
"::ComputeDeexcitationTable:\n";
2289 std::cerr <<
" Unknown excitation level:\n";
2290 std::cerr <<
" Ar " << level <<
"\n";
2292 }
else if (
m_gas[ngas] ==
"Ne") {
2297 std::string level =
" ";
2298 for (
int j = 0; j < 7; ++j) level[j] = m_description[i][3 + j];
2299 if (level ==
" 1S5 ") mapLevels[
"Ne_1S5"] = i;
2300 else if (level ==
" 1S4 ") mapLevels[
"Ne_1S4"] = i;
2301 else if (level ==
" 1S3 ") mapLevels[
"Ne_1S3"] = i;
2302 else if (level ==
" 1S2 ") mapLevels[
"Ne_1S2"] = i;
2303 else if (level ==
" 2P10 ") mapLevels[
"Ne_2P10"] = i;
2304 else if (level ==
" 2P9 ") mapLevels[
"Ne_2P9"] = i;
2305 else if (level ==
" 2P8 ") mapLevels[
"Ne_2P8"] = i;
2306 else if (level ==
" 2P7 ") mapLevels[
"Ne_2P7"] = i;
2307 else if (level ==
" 2P6 ") mapLevels[
"Ne_2P6"] = i;
2308 else if (level ==
" 2P5 ") mapLevels[
"Ne_2P5"] = i;
2309 else if (level ==
" 2P4 ") mapLevels[
"Ne_2P4"] = i;
2310 else if (level ==
" 2P3 ") mapLevels[
"Ne_2P3"] = i;
2311 else if (level ==
" 2P2 ") mapLevels[
"Ne_2P2"] = i;
2312 else if (level ==
" 2P1 ") mapLevels[
"Ne_2P1"] = i;
2313 else if (level ==
" 2S5 ") mapLevels[
"Ne_2S5"] = i;
2314 else if (level ==
" 2S4 ") mapLevels[
"Ne_2S4"] = i;
2315 else if (level ==
" 2S3 ") mapLevels[
"Ne_2S3"] = i;
2316 else if (level ==
" 2S2 ") mapLevels[
"Ne_2S2"] = i;
2317 else if (level ==
" 3D6 ") mapLevels[
"Ne_3D6"] = i;
2318 else if (level ==
" 3D5 ") mapLevels[
"Ne_3D5"] = i;
2319 else if (level ==
" 3D4! ") mapLevels[
"Ne_3D4!"] = i;
2320 else if (level ==
" 3D4 ") mapLevels[
"Ne_3D4"] = i;
2321 else if (level ==
" 3D3 ") mapLevels[
"Ne_3D3"] = i;
2322 else if (level ==
" 3D2 ") mapLevels[
"Ne_3D2"] = i;
2323 else if (level ==
" 3D1!! ") mapLevels[
"Ne_3D1!!"] = i;
2324 else if (level ==
" 3D1! ") mapLevels[
"Ne_3D1!"] = i;
2325 else if (level ==
"3S1!!!!") mapLevels[
"Ne_3S1!!!!"] = i;
2326 else if (level ==
"3S1!!! ") mapLevels[
"Ne_3S1!!!"] = i;
2327 else if (level ==
" 3S1!! ") mapLevels[
"Ne_3S1!!"] = i;
2328 else if (level ==
" 3S1! ") mapLevels[
"Ne_3S1!"] = i;
2329 else if (level ==
"SUM 3P1") mapLevels[
"Ne_3P10_3P6"] = i;
2330 else if (level ==
"SUM 3P5") mapLevels[
"Ne_3P5_3P2"] = i;
2331 else if (level ==
" 3P1 ") mapLevels[
"Ne_3P1"] = i;
2332 else if (level ==
" 3S4 ") mapLevels[
"Ne_3S4"] = i;
2333 else if (level ==
" 3S2 ") mapLevels[
"Ne_3S2"] = i;
2334 else if (level ==
" 4D5 ") mapLevels[
"Ne_4D5"] = i;
2335 else if (level ==
" 4D2 ") mapLevels[
"Ne_4D2"] = i;
2336 else if (level ==
" 4S1! ") mapLevels[
"Ne_4S1!"] = i;
2337 else if (level ==
" 4S4 ") mapLevels[
"Ne_4S4"] = i;
2338 else if (level ==
" 5D5 ") mapLevels[
"Ne_5D5"] = i;
2339 else if (level ==
" 5D2 ") mapLevels[
"Ne_5D2"] = i;
2340 else if (level ==
" 4S2 ") mapLevels[
"Ne_4S2"] = i;
2341 else if (level ==
" 5S1! ") mapLevels[
"Ne_5S1!"] = i;
2342 else if (level ==
"SUM S H") mapLevels[
"Ne_Sum_S_High"] = i;
2343 else if (level ==
"SUM D H") mapLevels[
"Ne_Sum_P_High"] = i;
2345 std::cerr <<
m_className <<
"::ComputeDeexcitationTable:\n";
2346 std::cerr <<
" Unknown excitation level:\n";
2347 std::cerr <<
" Ne " << level <<
"\n";
2354 unsigned int nDeexcitations = 0;
2355 std::map<std::string, int> mapDxc;
2356 std::map<std::string, int>::iterator itMap;
2357 for (itMap = mapLevels.begin(); itMap != mapLevels.end(); itMap++) {
2358 std::string level = (*itMap).first;
2359 mapDxc[level] = nDeexcitations;
2360 m_iDeexcitation[(*itMap).second] = nDeexcitations;
2366 2. * SpeedOfLight * FineStructureConstant / (3. * ElectronMass * HbarC);
2376 for (itMap = mapLevels.begin(); itMap != mapLevels.end(); itMap++) {
2377 std::string level = (*itMap).first;
2378 deexcitation newDxc;
2379 newDxc.gas = int(m_csType[(*itMap).second] / nCsTypes);
2380 newDxc.level = (*itMap).second;
2381 newDxc.label = level;
2383 newDxc.energy = m_energyLoss[(*itMap).second] * m_rgas[newDxc.gas];
2385 newDxc.osc = newDxc.cf = 0.;
2386 newDxc.sDoppler = newDxc.gPressure = newDxc.width = 0.;
2387 newDxc.nChannels = 0;
2388 if (level ==
"Ar_1S5" || level ==
"Ar_1S3") {
2390 }
else if (level ==
"Ar_1S4") {
2392 newDxc.osc = 0.0609;
2395 newDxc.nChannels = nc;
2396 newDxc.p.resize(nc);
2397 newDxc.final.resize(nc);
2398 newDxc.type.resize(nc, DxcTypeRad);
2399 newDxc.p[0] = 0.119;
2400 newDxc.final[0] = -1;
2401 }
else if (level ==
"Ar_1S2") {
2406 newDxc.nChannels = nc;
2407 newDxc.p.resize(nc);
2408 newDxc.final.resize(nc);
2409 newDxc.type.resize(nc, DxcTypeRad);
2411 newDxc.final[0] = -1;
2412 }
else if (level ==
"Ar_2P10") {
2414 newDxc.nChannels = nc;
2415 newDxc.p.resize(nc);
2416 newDxc.final.resize(nc);
2417 newDxc.type.resize(nc, DxcTypeRad);
2418 newDxc.p[0] = 0.0189;
2419 newDxc.final[0] = mapDxc[
"Ar_1S5"];
2420 newDxc.p[1] = 5.43e-3;
2421 newDxc.final[1] = mapDxc[
"Ar_1S4"];
2422 newDxc.p[2] = 9.8e-4;
2423 newDxc.final[2] = mapDxc[
"Ar_1S3"];
2424 newDxc.p[3] = 1.9e-4;
2425 newDxc.final[3] = mapDxc[
"Ar_1S2"];
2426 }
else if (level ==
"Ar_2P9") {
2428 newDxc.nChannels = nc;
2429 newDxc.p.resize(nc);
2430 newDxc.final.resize(nc);
2431 newDxc.type.resize(nc, DxcTypeRad);
2432 newDxc.p[0] = 0.0331;
2433 newDxc.final[0] = mapDxc[
"Ar_1S5"];
2434 }
else if (level ==
"Ar_2P8") {
2436 newDxc.nChannels = nc;
2437 newDxc.p.resize(nc);
2438 newDxc.final.resize(nc);
2439 newDxc.type.resize(nc, DxcTypeRad);
2440 newDxc.p[0] = 9.28e-3;
2441 newDxc.final[0] = mapDxc[
"Ar_1S5"];
2442 newDxc.p[1] = 0.0215;
2443 newDxc.final[1] = mapDxc[
"Ar_1S4"];
2444 newDxc.p[2] = 1.47e-3;
2445 newDxc.final[2] = mapDxc[
"Ar_1S2"];
2446 }
else if (level ==
"Ar_2P7") {
2448 newDxc.nChannels = nc;
2449 newDxc.p.resize(nc);
2450 newDxc.final.resize(nc);
2451 newDxc.type.resize(nc, DxcTypeRad);
2452 newDxc.p[0] = 5.18e-3;
2453 newDxc.final[0] = mapDxc[
"Ar_1S5"];
2454 newDxc.p[1] = 0.025;
2455 newDxc.final[1] = mapDxc[
"Ar_1S4"];
2456 newDxc.p[2] = 2.43e-3;
2457 newDxc.final[2] = mapDxc[
"Ar_1S3"];
2458 newDxc.p[3] = 1.06e-3;
2459 newDxc.final[3] = mapDxc[
"Ar_1S2"];
2460 }
else if (level ==
"Ar_2P6") {
2462 newDxc.nChannels = nc;
2463 newDxc.p.resize(nc);
2464 newDxc.final.resize(nc);
2465 newDxc.type.resize(nc, DxcTypeRad);
2466 newDxc.p[0] = 0.0245;
2467 newDxc.final[0] = mapDxc[
"Ar_1S5"];
2468 newDxc.p[1] = 4.9e-3;
2469 newDxc.final[1] = mapDxc[
"Ar_1S4"];
2470 newDxc.p[2] = 5.03e-3;
2471 newDxc.final[2] = mapDxc[
"Ar_1S2"];
2472 }
else if (level ==
"Ar_2P5") {
2474 newDxc.nChannels = nc;
2475 newDxc.p.resize(nc);
2476 newDxc.final.resize(nc);
2477 newDxc.type.resize(nc, DxcTypeRad);
2478 newDxc.p[0] = 0.0402;
2479 newDxc.final[0] = mapDxc[
"Ar_1S4"];
2480 }
else if (level ==
"Ar_2P4") {
2482 newDxc.nChannels = nc;
2483 newDxc.p.resize(nc);
2484 newDxc.final.resize(nc);
2485 newDxc.type.resize(nc, DxcTypeRad);
2486 newDxc.p[0] = 6.25e-4;
2487 newDxc.final[0] = mapDxc[
"Ar_1S5"];
2488 newDxc.p[1] = 2.2e-5;
2489 newDxc.final[1] = mapDxc[
"Ar_1S4"];
2490 newDxc.p[2] = 0.0186;
2491 newDxc.final[2] = mapDxc[
"Ar_1S3"];
2492 newDxc.p[3] = 0.0139;
2493 newDxc.final[3] = mapDxc[
"Ar_1S2"];
2494 }
else if (level ==
"Ar_2P3") {
2496 newDxc.nChannels = nc;
2497 newDxc.p.resize(nc);
2498 newDxc.final.resize(nc);
2499 newDxc.type.resize(nc, DxcTypeRad);
2500 newDxc.p[0] = 3.8e-3;
2501 newDxc.final[0] = mapDxc[
"Ar_1S5"];
2502 newDxc.p[1] = 8.47e-3;
2503 newDxc.final[1] = mapDxc[
"Ar_1S4"];
2504 newDxc.p[2] = 0.0223;
2505 newDxc.final[2] = mapDxc[
"Ar_1S2"];
2506 }
else if (level ==
"Ar_2P2") {
2508 newDxc.nChannels = nc;
2509 newDxc.p.resize(nc);
2510 newDxc.final.resize(nc);
2511 newDxc.type.resize(nc, DxcTypeRad);
2512 newDxc.p[0] = 6.39e-3;
2513 newDxc.final[0] = mapDxc[
"Ar_1S5"];
2514 newDxc.p[1] = 1.83e-3;
2515 newDxc.final[1] = mapDxc[
"Ar_1S4"];
2516 newDxc.p[2] = 0.0117;
2517 newDxc.final[2] = mapDxc[
"Ar_1S3"];
2518 newDxc.p[3] = 0.0153;
2519 newDxc.final[3] = mapDxc[
"Ar_1S2"];
2520 }
else if (level ==
"Ar_2P1") {
2522 newDxc.nChannels = nc;
2523 newDxc.p.resize(nc);
2524 newDxc.final.resize(nc);
2525 newDxc.type.resize(nc, DxcTypeRad);
2526 newDxc.p[0] = 2.36e-4;
2527 newDxc.final[0] = mapDxc[
"Ar_1S4"];
2528 newDxc.p[1] = 0.0445;
2529 newDxc.final[1] = mapDxc[
"Ar_1S2"];
2530 }
else if (level ==
"Ar_3D6") {
2532 newDxc.nChannels = nc;
2533 newDxc.p.resize(nc);
2534 newDxc.final.resize(nc);
2535 newDxc.type.resize(nc, DxcTypeRad);
2537 newDxc.p[0] = 8.1e-3;
2538 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2539 newDxc.p[1] = 7.73e-4;
2540 newDxc.final[1] = mapDxc[
"Ar_2P7"];
2541 newDxc.p[2] = 1.2e-4;
2542 newDxc.final[2] = mapDxc[
"Ar_2P4"];
2543 newDxc.p[3] = 3.6e-4;
2544 newDxc.final[3] = mapDxc[
"Ar_2P2"];
2545 }
else if (level ==
"Ar_3D5") {
2547 newDxc.osc = 0.0011;
2549 newDxc.nChannels = nc;
2550 newDxc.p.resize(nc);
2551 newDxc.final.resize(nc);
2552 newDxc.type.resize(nc, DxcTypeRad);
2554 newDxc.p[0] = 7.4e-3;
2555 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2556 newDxc.p[1] = 3.9e-5;
2557 newDxc.final[1] = mapDxc[
"Ar_2P8"];
2558 newDxc.p[2] = 3.09e-4;
2559 newDxc.final[2] = mapDxc[
"Ar_2P7"];
2560 newDxc.p[3] = 1.37e-3;
2561 newDxc.final[3] = mapDxc[
"Ar_2P6"];
2562 newDxc.p[4] = 5.75e-4;
2563 newDxc.final[4] = mapDxc[
"Ar_2P5"];
2564 newDxc.p[5] = 3.2e-5;
2565 newDxc.final[5] = mapDxc[
"Ar_2P4"];
2566 newDxc.p[6] = 1.4e-4;
2567 newDxc.final[6] = mapDxc[
"Ar_2P3"];
2568 newDxc.p[7] = 1.7e-4;
2569 newDxc.final[7] = mapDxc[
"Ar_2P2"];
2570 newDxc.p[8] = 2.49e-6;
2571 newDxc.final[8] = mapDxc[
"Ar_2P1"];
2573 newDxc.p[9] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
2574 newDxc.final[9] = -1;
2575 }
else if (level ==
"Ar_3D3") {
2577 newDxc.nChannels = nc;
2578 newDxc.p.resize(nc);
2579 newDxc.final.resize(nc);
2580 newDxc.type.resize(nc, DxcTypeRad);
2582 newDxc.p[0] = 4.9e-3;
2583 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2584 newDxc.p[1] = 9.82e-5;
2585 newDxc.final[1] = mapDxc[
"Ar_2P9"];
2586 newDxc.p[2] = 1.2e-4;
2587 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2588 newDxc.p[3] = 2.6e-4;
2589 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2590 newDxc.p[4] = 2.5e-3;
2591 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2592 newDxc.p[5] = 9.41e-5;
2593 newDxc.final[5] = mapDxc[
"Ar_2P4"];
2594 newDxc.p[6] = 3.9e-4;
2595 newDxc.final[6] = mapDxc[
"Ar_2P3"];
2596 newDxc.p[7] = 1.1e-4;
2597 newDxc.final[7] = mapDxc[
"Ar_2P2"];
2598 }
else if (level ==
"Ar_3D4!") {
2600 newDxc.nChannels = nc;
2602 newDxc.p.resize(nc);
2603 newDxc.final.resize(nc);
2604 newDxc.type.resize(nc, DxcTypeRad);
2605 newDxc.p[0] = 0.01593;
2606 newDxc.final[0] = mapDxc[
"Ar_2P9"];
2607 }
else if (level ==
"Ar_3D4") {
2609 newDxc.nChannels = nc;
2610 newDxc.p.resize(nc);
2611 newDxc.final.resize(nc);
2612 newDxc.type.resize(nc, DxcTypeRad);
2614 newDxc.p[0] = 2.29e-3;
2615 newDxc.final[0] = mapDxc[
"Ar_2P9"];
2616 newDxc.p[1] = 0.011;
2617 newDxc.final[1] = mapDxc[
"Ar_2P8"];
2618 newDxc.p[2] = 8.8e-5;
2619 newDxc.final[2] = mapDxc[
"Ar_2P6"];
2620 newDxc.p[3] = 2.53e-6;
2621 newDxc.final[3] = mapDxc[
"Ar_2P3"];
2622 }
else if (level ==
"Ar_3D1!!") {
2624 newDxc.nChannels = nc;
2625 newDxc.p.resize(nc);
2626 newDxc.final.resize(nc);
2627 newDxc.type.resize(nc, DxcTypeRad);
2629 newDxc.p[0] = 5.85e-6;
2630 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2631 newDxc.p[1] = 1.2e-4;
2632 newDxc.final[1] = mapDxc[
"Ar_2P9"];
2633 newDxc.p[2] = 5.7e-3;
2634 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2635 newDxc.p[3] = 7.3e-3;
2636 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2637 newDxc.p[4] = 2.e-4;
2638 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2639 newDxc.p[5] = 1.54e-6;
2640 newDxc.final[5] = mapDxc[
"Ar_2P4"];
2641 newDxc.p[6] = 2.08e-5;
2642 newDxc.final[6] = mapDxc[
"Ar_2P3"];
2643 newDxc.p[7] = 6.75e-7;
2644 newDxc.final[7] = mapDxc[
"Ar_2P2"];
2645 }
else if (level ==
"Ar_2S5") {
2647 newDxc.nChannels = nc;
2648 newDxc.p.resize(nc);
2649 newDxc.final.resize(nc);
2650 newDxc.type.resize(nc, DxcTypeRad);
2651 newDxc.p[0] = 4.9e-3;
2652 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2653 newDxc.p[1] = 0.011;
2654 newDxc.final[1] = mapDxc[
"Ar_2P9"];
2655 newDxc.p[2] = 1.1e-3;
2656 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2657 newDxc.p[3] = 4.6e-4;
2658 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2659 newDxc.p[4] = 3.3e-3;
2660 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2661 newDxc.p[5] = 5.9e-5;
2662 newDxc.final[5] = mapDxc[
"Ar_2P4"];
2663 newDxc.p[6] = 1.2e-4;
2664 newDxc.final[6] = mapDxc[
"Ar_2P3"];
2665 newDxc.p[7] = 3.1e-4;
2666 newDxc.final[7] = mapDxc[
"Ar_2P2"];
2667 }
else if (level ==
"Ar_2S4") {
2672 newDxc.nChannels = nc;
2673 newDxc.p.resize(nc);
2674 newDxc.final.resize(nc);
2675 newDxc.type.resize(nc, DxcTypeRad);
2676 newDxc.p[0] = 0.077;
2677 newDxc.final[0] = -1;
2678 newDxc.p[1] = 2.44e-3;
2679 newDxc.final[1] = mapDxc[
"Ar_2P10"];
2680 newDxc.p[2] = 8.9e-3;
2681 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2682 newDxc.p[3] = 4.6e-3;
2683 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2684 newDxc.p[4] = 2.7e-3;
2685 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2686 newDxc.p[5] = 1.3e-3;
2687 newDxc.final[5] = mapDxc[
"Ar_2P5"];
2688 newDxc.p[6] = 4.5e-4;
2689 newDxc.final[6] = mapDxc[
"Ar_2P4"];
2690 newDxc.p[7] = 2.9e-5;
2691 newDxc.final[7] = mapDxc[
"Ar_2P3"];
2692 newDxc.p[8] = 3.e-5;
2693 newDxc.final[8] = mapDxc[
"Ar_2P2"];
2694 newDxc.p[9] = 1.6e-4;
2695 newDxc.final[9] = mapDxc[
"Ar_2P1"];
2696 }
else if (level ==
"Ar_3D1!") {
2698 newDxc.nChannels = nc;
2699 newDxc.p.resize(nc);
2700 newDxc.final.resize(nc);
2701 newDxc.type.resize(nc, DxcTypeRad);
2703 newDxc.p[0] = 3.1e-3;
2704 newDxc.final[0] = mapDxc[
"Ar_2P9"];
2705 newDxc.p[1] = 2.e-3;
2706 newDxc.final[1] = mapDxc[
"Ar_2P8"];
2707 newDxc.p[2] = 0.015;
2708 newDxc.final[2] = mapDxc[
"Ar_2P6"];
2709 newDxc.p[3] = 9.8e-6;
2710 newDxc.final[3] = mapDxc[
"Ar_2P3"];
2711 }
else if (level ==
"Ar_3D2") {
2713 newDxc.osc = 0.0932;
2716 newDxc.nChannels = nc;
2717 newDxc.p.resize(nc);
2718 newDxc.final.resize(nc);
2719 newDxc.type.resize(nc, DxcTypeRad);
2722 newDxc.final[0] = -1;
2723 newDxc.p[1] = 1.35e-5;
2724 newDxc.final[1] = mapDxc[
"Ar_2P10"];
2725 newDxc.p[2] = 9.52e-4;
2726 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2727 newDxc.p[3] = 0.011;
2728 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2729 newDxc.p[4] = 4.01e-5;
2730 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2731 newDxc.p[5] = 4.3e-3;
2732 newDxc.final[5] = mapDxc[
"Ar_2P5"];
2733 newDxc.p[6] = 8.96e-4;
2734 newDxc.final[6] = mapDxc[
"Ar_2P4"];
2735 newDxc.p[7] = 4.45e-5;
2736 newDxc.final[7] = mapDxc[
"Ar_2P3"];
2737 newDxc.p[8] = 5.87e-5;
2738 newDxc.final[8] = mapDxc[
"Ar_2P2"];
2739 newDxc.p[9] = 8.77e-4;
2740 newDxc.final[9] = mapDxc[
"Ar_2P1"];
2741 }
else if (level ==
"Ar_3S1!!!!") {
2743 newDxc.nChannels = nc;
2744 newDxc.p.resize(nc);
2745 newDxc.final.resize(nc);
2746 newDxc.type.resize(nc, DxcTypeRad);
2748 newDxc.p[0] = 7.51e-6;
2749 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2750 newDxc.p[1] = 4.3e-5;
2751 newDxc.final[1] = mapDxc[
"Ar_2P9"];
2752 newDxc.p[2] = 8.3e-4;
2753 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2754 newDxc.p[3] = 5.01e-5;
2755 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2756 newDxc.p[4] = 2.09e-4;
2757 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2758 newDxc.p[5] = 0.013;
2759 newDxc.final[5] = mapDxc[
"Ar_2P4"];
2760 newDxc.p[6] = 2.2e-3;
2761 newDxc.final[6] = mapDxc[
"Ar_2P3"];
2762 newDxc.p[7] = 3.35e-6;
2763 newDxc.final[7] = mapDxc[
"Ar_2P2"];
2764 }
else if (level ==
"Ar_3S1!!") {
2766 newDxc.nChannels = nc;
2767 newDxc.p.resize(nc);
2768 newDxc.final.resize(nc);
2769 newDxc.type.resize(nc, DxcTypeRad);
2771 newDxc.p[0] = 1.89e-4;
2772 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2773 newDxc.p[1] = 1.52e-4;
2774 newDxc.final[1] = mapDxc[
"Ar_2P9"];
2775 newDxc.p[2] = 7.21e-4;
2776 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2777 newDxc.p[3] = 3.69e-4;
2778 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2779 newDxc.p[4] = 3.76e-3;
2780 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2781 newDxc.p[5] = 1.72e-4;
2782 newDxc.final[5] = mapDxc[
"Ar_2P4"];
2783 newDxc.p[6] = 5.8e-4;
2784 newDxc.final[6] = mapDxc[
"Ar_2P3"];
2785 newDxc.p[7] = 6.2e-3;
2786 newDxc.final[7] = mapDxc[
"Ar_2P2"];
2787 }
else if (level ==
"Ar_3S1!!!") {
2789 newDxc.nChannels = nc;
2790 newDxc.p.resize(nc);
2791 newDxc.final.resize(nc);
2792 newDxc.type.resize(nc, DxcTypeRad);
2794 newDxc.p[0] = 7.36e-4;
2795 newDxc.final[0] = mapDxc[
"Ar_2P9"];
2796 newDxc.p[1] = 4.2e-5;
2797 newDxc.final[1] = mapDxc[
"Ar_2P8"];
2798 newDxc.p[2] = 9.3e-5;
2799 newDxc.final[2] = mapDxc[
"Ar_2P6"];
2800 newDxc.p[3] = 0.015;
2801 newDxc.final[3] = mapDxc[
"Ar_2P3"];
2802 }
else if (level ==
"Ar_2S3") {
2804 newDxc.nChannels = nc;
2805 newDxc.p.resize(nc);
2806 newDxc.final.resize(nc);
2807 newDxc.type.resize(nc, DxcTypeRad);
2808 newDxc.p[0] = 3.26e-3;
2809 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2810 newDxc.p[1] = 2.22e-3;
2811 newDxc.final[1] = mapDxc[
"Ar_2P7"];
2813 newDxc.final[2] = mapDxc[
"Ar_2P4"];
2814 newDxc.p[3] = 5.1e-3;
2815 newDxc.final[3] = mapDxc[
"Ar_2P2"];
2816 }
else if (level ==
"Ar_2S2") {
2818 newDxc.osc = 0.0119;
2821 newDxc.nChannels = nc;
2822 newDxc.p.resize(nc);
2823 newDxc.final.resize(nc);
2824 newDxc.type.resize(nc, DxcTypeRad);
2825 newDxc.p[0] = 0.035;
2826 newDxc.final[0] = -1;
2827 newDxc.p[1] = 1.76e-3;
2828 newDxc.final[1] = mapDxc[
"Ar_2P10"];
2829 newDxc.p[2] = 2.1e-4;
2830 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2831 newDxc.p[3] = 2.8e-4;
2832 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2833 newDxc.p[4] = 1.39e-3;
2834 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2835 newDxc.p[5] = 3.8e-4;
2836 newDxc.final[5] = mapDxc[
"Ar_2P5"];
2837 newDxc.p[6] = 2.0e-3;
2838 newDxc.final[6] = mapDxc[
"Ar_2P4"];
2839 newDxc.p[7] = 8.9e-3;
2840 newDxc.final[7] = mapDxc[
"Ar_2P3"];
2841 newDxc.p[8] = 3.4e-3;
2842 newDxc.final[8] = mapDxc[
"Ar_2P2"];
2843 newDxc.p[9] = 1.9e-3;
2844 newDxc.final[9] = mapDxc[
"Ar_2P1"];
2845 }
else if (level ==
"Ar_3S1!") {
2850 newDxc.nChannels = nc;
2851 newDxc.p.resize(nc);
2852 newDxc.final.resize(nc);
2853 newDxc.type.resize(nc, DxcTypeRad);
2855 newDxc.p[0] = 0.313;
2856 newDxc.final[0] = -1;
2857 newDxc.p[1] = 2.05e-5;
2858 newDxc.final[1] = mapDxc[
"Ar_2P10"];
2859 newDxc.p[2] = 8.33e-5;
2860 newDxc.final[2] = mapDxc[
"Ar_2P8"];
2861 newDxc.p[3] = 3.9e-4;
2862 newDxc.final[3] = mapDxc[
"Ar_2P7"];
2863 newDxc.p[4] = 3.96e-4;
2864 newDxc.final[4] = mapDxc[
"Ar_2P6"];
2865 newDxc.p[5] = 4.2e-4;
2866 newDxc.final[5] = mapDxc[
"Ar_2P5"];
2867 newDxc.p[6] = 4.5e-3;
2868 newDxc.final[6] = mapDxc[
"Ar_2P4"];
2869 newDxc.p[7] = 4.84e-5;
2870 newDxc.final[7] = mapDxc[
"Ar_2P3"];
2871 newDxc.p[8] = 7.1e-3;
2872 newDxc.final[8] = mapDxc[
"Ar_2P2"];
2873 newDxc.p[9] = 5.2e-3;
2874 newDxc.final[9] = mapDxc[
"Ar_2P1"];
2875 }
else if (level ==
"Ar_4D5") {
2877 newDxc.osc = 0.0019;
2879 newDxc.nChannels = nc;
2880 newDxc.p.resize(nc);
2881 newDxc.final.resize(nc);
2882 newDxc.type.resize(nc, DxcTypeRad);
2883 newDxc.p[0] = 2.78e-3;
2884 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2885 newDxc.p[1] = 2.8e-4;
2886 newDxc.final[1] = mapDxc[
"Ar_2P8"];
2887 newDxc.p[2] = 8.6e-4;
2888 newDxc.final[2] = mapDxc[
"Ar_2P6"];
2889 newDxc.p[3] = 9.2e-4;
2890 newDxc.final[3] = mapDxc[
"Ar_2P5"];
2891 newDxc.p[4] = 4.6e-4;
2892 newDxc.final[4] = mapDxc[
"Ar_2P3"];
2893 newDxc.p[5] = 1.6e-4;
2894 newDxc.final[5] = mapDxc[
"Ar_2P2"];
2896 newDxc.p[6] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
2897 newDxc.final[6] = -1;
2898 }
else if (level ==
"Ar_3S4") {
2900 newDxc.osc = 0.0144;
2902 newDxc.nChannels = nc;
2903 newDxc.p.resize(nc);
2904 newDxc.final.resize(nc);
2905 newDxc.type.resize(nc, DxcTypeRad);
2906 newDxc.p[0] = 4.21e-4;
2907 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2908 newDxc.p[1] = 2.e-3;
2909 newDxc.final[1] = mapDxc[
"Ar_2P8"];
2910 newDxc.p[2] = 1.7e-3;
2911 newDxc.final[2] = mapDxc[
"Ar_2P7"];
2912 newDxc.p[3] = 7.2e-4;
2913 newDxc.final[3] = mapDxc[
"Ar_2P6"];
2914 newDxc.p[4] = 3.5e-4;
2915 newDxc.final[4] = mapDxc[
"Ar_2P5"];
2916 newDxc.p[5] = 1.2e-4;
2917 newDxc.final[5] = mapDxc[
"Ar_2P4"];
2918 newDxc.p[6] = 4.2e-6;
2919 newDxc.final[6] = mapDxc[
"Ar_2P3"];
2920 newDxc.p[7] = 3.3e-5;
2921 newDxc.final[7] = mapDxc[
"Ar_2P2"];
2922 newDxc.p[8] = 9.7e-5;
2923 newDxc.final[8] = mapDxc[
"Ar_2P1"];
2925 newDxc.p[9] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
2926 newDxc.final[9] = -1;
2927 }
else if (level ==
"Ar_4D2") {
2931 newDxc.nChannels = nc;
2932 newDxc.p.resize(nc);
2933 newDxc.final.resize(nc);
2934 newDxc.type.resize(nc, DxcTypeRad);
2935 newDxc.p[0] = 1.7e-4;
2936 newDxc.final[0] = mapDxc[
"Ar_2P7"];
2938 newDxc.p[1] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
2939 newDxc.final[1] = -1;
2940 }
else if (level ==
"Ar_4S1!") {
2942 newDxc.osc = 0.0209;
2944 newDxc.nChannels = nc;
2945 newDxc.p.resize(nc);
2946 newDxc.final.resize(nc);
2947 newDxc.type.resize(nc, DxcTypeRad);
2948 newDxc.p[0] = 1.05e-3;
2949 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2950 newDxc.p[1] = 3.1e-5;
2951 newDxc.final[1] = mapDxc[
"Ar_2P8"];
2952 newDxc.p[2] = 2.5e-5;
2953 newDxc.final[2] = mapDxc[
"Ar_2P7"];
2954 newDxc.p[3] = 4.0e-4;
2955 newDxc.final[3] = mapDxc[
"Ar_2P6"];
2956 newDxc.p[4] = 5.8e-5;
2957 newDxc.final[4] = mapDxc[
"Ar_2P5"];
2958 newDxc.p[5] = 1.2e-4;
2959 newDxc.final[5] = mapDxc[
"Ar_2P3"];
2961 newDxc.p[6] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
2962 newDxc.final[6] = -1;
2963 }
else if (level ==
"Ar_3S2") {
2965 newDxc.osc = 0.0221;
2967 newDxc.nChannels = nc;
2968 newDxc.p.resize(nc);
2969 newDxc.final.resize(nc);
2970 newDxc.type.resize(nc, DxcTypeRad);
2971 newDxc.p[0] = 2.85e-4;
2972 newDxc.final[0] = mapDxc[
"Ar_2P10"];
2973 newDxc.p[1] = 5.1e-5;
2974 newDxc.final[1] = mapDxc[
"Ar_2P8"];
2975 newDxc.p[2] = 5.3e-5;
2976 newDxc.final[2] = mapDxc[
"Ar_2P7"];
2977 newDxc.p[3] = 1.6e-4;
2978 newDxc.final[3] = mapDxc[
"Ar_2P6"];
2979 newDxc.p[4] = 1.5e-4;
2980 newDxc.final[4] = mapDxc[
"Ar_2P5"];
2981 newDxc.p[5] = 6.0e-4;
2982 newDxc.final[5] = mapDxc[
"Ar_2P4"];
2983 newDxc.p[6] = 2.48e-3;
2984 newDxc.final[6] = mapDxc[
"Ar_2P3"];
2985 newDxc.p[7] = 9.6e-4;
2986 newDxc.final[7] = mapDxc[
"Ar_2P2"];
2987 newDxc.p[8] = 3.59e-4;
2988 newDxc.final[8] = mapDxc[
"Ar_2P1"];
2990 newDxc.p[9] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
2991 newDxc.final[9] = -1;
2992 }
else if (level ==
"Ar_5D5") {
2994 newDxc.osc = 0.0041;
2996 newDxc.nChannels = nc;
2997 newDxc.p.resize(nc);
2998 newDxc.final.resize(nc);
2999 newDxc.type.resize(nc, DxcTypeRad);
3000 newDxc.p[0] = 2.2e-3;
3001 newDxc.final[0] = mapDxc[
"Ar_2P10"];
3002 newDxc.p[1] = 1.1e-4;
3003 newDxc.final[1] = mapDxc[
"Ar_2P8"];
3004 newDxc.p[2] = 7.6e-5;
3005 newDxc.final[2] = mapDxc[
"Ar_2P7"];
3006 newDxc.p[3] = 4.2e-4;
3007 newDxc.final[3] = mapDxc[
"Ar_2P6"];
3008 newDxc.p[4] = 2.4e-4;
3009 newDxc.final[4] = mapDxc[
"Ar_2P5"];
3010 newDxc.p[5] = 2.1e-4;
3011 newDxc.final[5] = mapDxc[
"Ar_2P4"];
3012 newDxc.p[6] = 2.4e-4;
3013 newDxc.final[6] = mapDxc[
"Ar_2P3"];
3014 newDxc.p[7] = 1.2e-4;
3015 newDxc.final[7] = mapDxc[
"Ar_2P2"];
3017 newDxc.p[8] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
3018 newDxc.final[8] = -1;
3019 }
else if (level ==
"Ar_4S4") {
3021 newDxc.osc = 0.0139;
3023 newDxc.nChannels = nc;
3024 newDxc.p.resize(nc);
3025 newDxc.final.resize(nc);
3026 newDxc.type.resize(nc, DxcTypeRad);
3027 newDxc.p[0] = 1.9e-4;
3028 newDxc.final[0] = mapDxc[
"Ar_2P10"];
3029 newDxc.p[1] = 1.1e-3;
3030 newDxc.final[1] = mapDxc[
"Ar_2P8"];
3031 newDxc.p[2] = 5.2e-4;
3032 newDxc.final[2] = mapDxc[
"Ar_2P7"];
3033 newDxc.p[3] = 5.1e-4;
3034 newDxc.final[3] = mapDxc[
"Ar_2P6"];
3035 newDxc.p[4] = 9.4e-5;
3036 newDxc.final[4] = mapDxc[
"Ar_2P5"];
3037 newDxc.p[5] = 5.4e-5;
3038 newDxc.final[5] = mapDxc[
"Ar_2P4"];
3040 newDxc.p[6] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
3041 newDxc.final[6] = -1;
3042 }
else if (level ==
"Ar_5D2") {
3044 newDxc.osc = 0.0426;
3046 newDxc.nChannels = nc;
3047 newDxc.p.resize(nc);
3048 newDxc.final.resize(nc);
3049 newDxc.type.resize(nc, DxcTypeRad);
3050 newDxc.p[0] = 5.9e-5;
3051 newDxc.final[0] = mapDxc[
"Ar_2P8"];
3052 newDxc.p[1] = 9.0e-6;
3053 newDxc.final[1] = mapDxc[
"Ar_2P7"];
3054 newDxc.p[2] = 1.5e-4;
3055 newDxc.final[2] = mapDxc[
"Ar_2P5"];
3056 newDxc.p[3] = 3.1e-5;
3057 newDxc.final[3] = mapDxc[
"Ar_2P2"];
3059 newDxc.p[4] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
3060 newDxc.final[4] = -1;
3061 }
else if (level ==
"Ar_6D5") {
3063 newDxc.osc = 0.00075;
3067 newDxc.nChannels = nc;
3068 newDxc.p.resize(nc);
3069 newDxc.final.resize(nc);
3070 newDxc.type.resize(nc, DxcTypeRad);
3071 newDxc.p[0] = 1.9e-3;
3072 newDxc.final[0] = mapDxc[
"Ar_2P10"];
3073 newDxc.p[1] = 4.2e-4;
3074 newDxc.final[1] = mapDxc[
"Ar_2P6"];
3075 newDxc.p[2] = 3.e-4;
3076 newDxc.final[2] = mapDxc[
"Ar_2P5"];
3077 newDxc.p[3] = 5.1e-5;
3078 newDxc.final[3] = mapDxc[
"Ar_2P4"];
3079 newDxc.p[4] = 6.6e-5;
3080 newDxc.final[4] = mapDxc[
"Ar_2P3"];
3081 newDxc.p[5] = 1.21e-4;
3082 newDxc.final[5] = mapDxc[
"Ar_2P1"];
3084 newDxc.p[6] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
3085 newDxc.final[6] = -1;
3086 }
else if (level ==
"Ar_5S1!") {
3088 newDxc.osc = 0.00051;
3092 newDxc.nChannels = nc;
3093 newDxc.p.resize(nc);
3094 newDxc.final.resize(nc);
3095 newDxc.type.resize(nc, DxcTypeRad);
3096 newDxc.p[0] = 7.7e-5;
3097 newDxc.final[0] = mapDxc[
"Ar_2P5"];
3099 newDxc.p[1] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
3100 newDxc.final[1] = -1;
3101 }
else if (level ==
"Ar_4S2") {
3103 newDxc.osc = 0.00074;
3107 newDxc.nChannels = nc;
3108 newDxc.p.resize(nc);
3109 newDxc.final.resize(nc);
3110 newDxc.type.resize(nc, DxcTypeRad);
3111 newDxc.p[0] = 4.5e-4;
3112 newDxc.final[0] = mapDxc[
"Ar_2P10"];
3113 newDxc.p[1] = 2.e-4;
3114 newDxc.final[1] = mapDxc[
"Ar_2P8"];
3115 newDxc.p[2] = 2.1e-4;
3116 newDxc.final[2] = mapDxc[
"Ar_2P7"];
3117 newDxc.p[3] = 1.2e-4;
3118 newDxc.final[3] = mapDxc[
"Ar_2P5"];
3119 newDxc.p[4] = 1.8e-4;
3120 newDxc.final[4] = mapDxc[
"Ar_2P4"];
3121 newDxc.p[5] = 9.e-4;
3122 newDxc.final[5] = mapDxc[
"Ar_2P3"];
3123 newDxc.p[6] = 3.3e-4;
3124 newDxc.final[6] = mapDxc[
"Ar_2P2"];
3126 newDxc.p[7] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
3127 newDxc.final[7] = -1;
3128 }
else if (level ==
"Ar_5S4") {
3130 newDxc.osc = 0.0130;
3133 newDxc.osc = 0.0211;
3135 newDxc.nChannels = nc;
3136 newDxc.p.resize(nc);
3137 newDxc.final.resize(nc);
3138 newDxc.type.resize(nc, DxcTypeRad);
3139 newDxc.p[0] = 3.6e-4;
3140 newDxc.final[0] = mapDxc[
"Ar_2P8"];
3141 newDxc.p[1] = 1.2e-4;
3142 newDxc.final[1] = mapDxc[
"Ar_2P6"];
3143 newDxc.p[2] = 1.5e-4;
3144 newDxc.final[2] = mapDxc[
"Ar_2P4"];
3145 newDxc.p[3] = 1.4e-4;
3146 newDxc.final[3] = mapDxc[
"Ar_2P3"];
3147 newDxc.p[4] = 7.5e-5;
3148 newDxc.final[4] = mapDxc[
"Ar_2P2"];
3150 newDxc.p[5] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
3151 newDxc.final[5] = -1;
3152 }
else if (level ==
"Ar_6D2") {
3154 newDxc.osc = 0.0290;
3157 newDxc.osc = 0.0574;
3159 newDxc.nChannels = nc;
3160 newDxc.p.resize(nc);
3161 newDxc.final.resize(nc);
3162 newDxc.type.resize(nc, DxcTypeRad);
3164 newDxc.p[0] = 3.33e-3;
3165 newDxc.final[0] = mapDxc[
"Ar_2P7"];
3167 newDxc.p[1] = f2A *
pow(newDxc.energy, 2) * newDxc.osc;
3168 newDxc.final[1] = -1;
3169 }
else if (level ==
"Ar_Higher") {
3175 newDxc.nChannels = nc;
3176 newDxc.p.resize(nc);
3177 newDxc.final.resize(nc);
3178 newDxc.type.resize(nc, DxcTypeCollNonIon);
3180 newDxc.final[0] = mapDxc[
"Ar_6D5"];
3182 newDxc.final[1] = mapDxc[
"Ar_5S1!"];
3184 newDxc.final[2] = mapDxc[
"Ar_4S2"];
3186 newDxc.final[3] = mapDxc[
"Ar_5S4"];
3188 newDxc.final[4] = mapDxc[
"Ar_6D2"];
3190 std::cerr <<
m_className <<
"::ComputeDeexcitationTable:\n";
3191 std::cerr <<
" Missing de-excitation data for level " << level
3193 std::cerr <<
" Program bug!\n";
3196 m_deexcitations.push_back(newDxc);
3200 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
3201 std::cout <<
" Found " << m_deexcitations.size() <<
" levels "
3202 <<
"with available radiative de-excitation data.\n";
3209 dimer.label =
"Ar_Dimer";
3212 dimer.energy = 14.71;
3213 dimer.osc = dimer.cf = 0.;
3214 dimer.sDoppler = dimer.gPressure = dimer.width = 0.;
3215 dimer.nChannels = 0;
3216 mapDxc[
"Ar_Dimer"] = m_deexcitations.size();
3217 m_deexcitations.push_back(dimer);
3220 deexcitation excimer;
3221 excimer.label =
"Ar_Excimer";
3224 excimer.energy = 14.71;
3225 excimer.osc = excimer.cf = 0.;
3226 excimer.sDoppler = excimer.gPressure = excimer.width = 0.;
3227 excimer.nChannels = 0;
3228 mapDxc[
"Ar_Excimer"] = m_deexcitations.size();
3229 m_deexcitations.push_back(excimer);
3232 for (
unsigned int j = 0; j < nDeexcitations; ++j) {
3233 const std::string level = m_deexcitations[j].label;
3234 if (level ==
"Ar_1S5") {
3238 const bool useTachibanaData =
false;
3239 const bool useKoltsSetserData =
true;
3240 const bool useCollMixing =
true;
3241 if (useTachibanaData) {
3243 const double k2b = 2.3e-24;
3244 const double k3b = 1.4e-41;
3245 m_deexcitations[j].p.push_back(k3b * nAr * nAr);
3246 m_deexcitations[j].final.push_back(mapDxc[
"Ar_Excimer"]);
3247 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3248 m_deexcitations[j].nChannels += 1;
3249 if (useCollMixing) {
3250 m_deexcitations[j].p.push_back(k2b * nAr);
3251 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3252 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3253 m_deexcitations[j].nChannels += 1;
3255 }
else if (useKoltsSetserData) {
3257 const double k2b = 2.1e-24;
3258 const double k3b = 1.1e-41;
3259 m_deexcitations[j].p.push_back(k3b * nAr * nAr);
3260 m_deexcitations[j].final.push_back(mapDxc[
"Ar_Excimer"]);
3261 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3262 m_deexcitations[j].nChannels += 1;
3263 if (useCollMixing) {
3264 m_deexcitations[j].p.push_back(k2b * nAr);
3265 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3266 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3267 m_deexcitations[j].nChannels += 1;
3271 if (level ==
"Ar_1S3") {
3273 const bool useTachibanaData =
false;
3274 const bool useKoltsSetserData =
true;
3275 const bool useCollMixing =
true;
3276 if (useTachibanaData) {
3278 const double k2b = 4.3e-24;
3279 const double k3b = 1.5e-41;
3280 m_deexcitations[j].p.push_back(k3b * nAr * nAr);
3281 m_deexcitations[j].final.push_back(mapDxc[
"Ar_Excimer"]);
3282 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3283 m_deexcitations[j].nChannels += 1;
3284 if (useCollMixing) {
3285 m_deexcitations[j].p.push_back(k2b * nAr);
3286 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3287 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3288 m_deexcitations[j].nChannels += 1;
3290 }
else if (useKoltsSetserData) {
3292 const double k2b = 5.3e-24;
3293 const double k3b = 0.83e-41;
3294 m_deexcitations[j].p.push_back(k3b * nAr * nAr);
3295 m_deexcitations[j].final.push_back(mapDxc[
"Ar_Excimer"]);
3296 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3297 m_deexcitations[j].nChannels += 1;
3298 if (useCollMixing) {
3299 m_deexcitations[j].p.push_back(k2b * nAr);
3300 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3301 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3302 m_deexcitations[j].nChannels += 1;
3306 if (level ==
"Ar_2P1") {
3311 const double k4s = 1.6e-20;
3312 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3313 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3314 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3315 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3316 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S5"]);
3317 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3318 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S3"]);
3319 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S2"]);
3320 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3321 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3322 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3323 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3324 m_deexcitations[j].nChannels += 4;
3326 if (level ==
"Ar_2P2") {
3329 const double k23 = 0.5e-21;
3330 m_deexcitations[j].p.push_back(k23 * nAr);
3331 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P3"]);
3332 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3333 m_deexcitations[j].nChannels += 1;
3338 const double k4s = 5.3e-20;
3339 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3340 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3341 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3342 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3343 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S5"]);
3344 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3345 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S3"]);
3346 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S2"]);
3347 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3348 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3349 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3350 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3351 m_deexcitations[j].nChannels += 4;
3353 if (level ==
"Ar_2P3") {
3356 const double k34 = 27.5e-21;
3357 const double k35 = 0.3e-21;
3358 const double k36 = 44.0e-21;
3359 const double k37 = 1.4e-21;
3360 const double k38 = 1.9e-21;
3361 const double k39 = 0.8e-21;
3362 m_deexcitations[j].p.push_back(k34 * nAr);
3363 m_deexcitations[j].p.push_back(k35 * nAr);
3364 m_deexcitations[j].p.push_back(k36 * nAr);
3365 m_deexcitations[j].p.push_back(k37 * nAr);
3366 m_deexcitations[j].p.push_back(k38 * nAr);
3367 m_deexcitations[j].p.push_back(k39 * nAr);
3368 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P4"]);
3369 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P5"]);
3370 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P6"]);
3371 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P7"]);
3372 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P8"]);
3373 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P9"]);
3374 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3375 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3376 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3377 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3378 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3379 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3380 m_deexcitations[j].nChannels += 6;
3383 const double k4s = 4.7e-20;
3384 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3385 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3386 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3387 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3388 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S5"]);
3389 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3390 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S3"]);
3391 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S2"]);
3392 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3393 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3394 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3395 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3396 m_deexcitations[j].nChannels += 4;
3398 if (level ==
"Ar_2P4") {
3401 const double k43 = 23.0e-21;
3402 const double k45 = 0.7e-21;
3403 const double k46 = 4.8e-21;
3404 const double k47 = 3.2e-21;
3405 const double k48 = 1.4e-21;
3406 const double k49 = 3.3e-21;
3407 m_deexcitations[j].p.push_back(k43 * nAr);
3408 m_deexcitations[j].p.push_back(k45 * nAr);
3409 m_deexcitations[j].p.push_back(k46 * nAr);
3410 m_deexcitations[j].p.push_back(k47 * nAr);
3411 m_deexcitations[j].p.push_back(k48 * nAr);
3412 m_deexcitations[j].p.push_back(k49 * nAr);
3413 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P3"]);
3414 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P5"]);
3415 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P6"]);
3416 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P7"]);
3417 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P8"]);
3418 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P9"]);
3419 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3420 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3421 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3422 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3423 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3424 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3425 m_deexcitations[j].nChannels += 6;
3428 const double k4s = 3.9e-20;
3429 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3430 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3431 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3432 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3433 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S5"]);
3434 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3435 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S3"]);
3436 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S2"]);
3437 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3438 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3439 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3440 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3441 m_deexcitations[j].nChannels += 4;
3443 if (level ==
"Ar_2P5") {
3446 const double k54 = 1.7e-21;
3447 const double k56 = 11.3e-21;
3448 const double k58 = 9.5e-21;
3449 m_deexcitations[j].p.push_back(k54 * nAr);
3450 m_deexcitations[j].p.push_back(k56 * nAr);
3451 m_deexcitations[j].p.push_back(k58 * nAr);
3452 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P4"]);
3453 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P6"]);
3454 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P8"]);
3455 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3456 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3457 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3458 m_deexcitations[j].nChannels += 3;
3460 if (level ==
"Ar_2P6") {
3463 const double k67 = 4.1e-21;
3464 const double k68 = 6.0e-21;
3465 const double k69 = 1.0e-21;
3466 m_deexcitations[j].p.push_back(k67 * nAr);
3467 m_deexcitations[j].p.push_back(k68 * nAr);
3468 m_deexcitations[j].p.push_back(k69 * nAr);
3469 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P7"]);
3470 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P8"]);
3471 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P9"]);
3472 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3473 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3474 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3475 m_deexcitations[j].nChannels += 3;
3477 if (level ==
"Ar_2P7") {
3480 const double k76 = 2.5e-21;
3481 const double k78 = 14.3e-21;
3482 const double k79 = 23.3e-21;
3483 m_deexcitations[j].p.push_back(k76 * nAr);
3484 m_deexcitations[j].p.push_back(k78 * nAr);
3485 m_deexcitations[j].p.push_back(k79 * nAr);
3486 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P6"]);
3487 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P8"]);
3488 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P9"]);
3489 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3490 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3491 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3492 m_deexcitations[j].nChannels += 3;
3495 const double k4s = 5.5e-20;
3496 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3497 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3498 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3499 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3500 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S5"]);
3501 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3502 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S3"]);
3503 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S2"]);
3504 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3505 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3506 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3507 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3508 m_deexcitations[j].nChannels += 4;
3510 if (level ==
"Ar_2P8") {
3513 const double k86 = 0.3e-21;
3514 const double k87 = 0.8e-21;
3515 const double k89 = 18.2e-21;
3516 const double k810 = 1.0e-21;
3517 m_deexcitations[j].p.push_back(k86 * nAr);
3518 m_deexcitations[j].p.push_back(k87 * nAr);
3519 m_deexcitations[j].p.push_back(k89 * nAr);
3520 m_deexcitations[j].p.push_back(k810 * nAr);
3521 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P6"]);
3522 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P7"]);
3523 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P9"]);
3524 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P10"]);
3525 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3526 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3527 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3528 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3529 m_deexcitations[j].nChannels += 4;
3532 const double k4s = 3.e-20;
3533 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3534 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3535 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3536 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3537 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S5"]);
3538 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3539 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S3"]);
3540 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S2"]);
3541 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3542 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3543 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3544 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3545 m_deexcitations[j].nChannels += 4;
3547 if (level ==
"Ar_2P9") {
3550 const double k98 = 6.8e-21;
3551 const double k910 = 5.1e-21;
3552 m_deexcitations[j].p.push_back(k98 * nAr);
3553 m_deexcitations[j].p.push_back(k910 * nAr);
3554 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P8"]);
3555 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P10"]);
3556 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3557 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3558 m_deexcitations[j].nChannels += 2;
3561 const double k4s = 3.5e-20;
3562 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3563 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3564 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3565 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3566 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S5"]);
3567 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3568 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S3"]);
3569 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S2"]);
3570 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3571 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3572 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3573 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3574 m_deexcitations[j].nChannels += 4;
3576 if (level ==
"Ar_2P10") {
3579 const double k4s = 2.0e-20;
3580 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3581 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3582 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3583 m_deexcitations[j].p.push_back(0.25 * k4s * nAr);
3584 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S5"]);
3585 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S4"]);
3586 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S3"]);
3587 m_deexcitations[j].final.push_back(mapDxc[
"Ar_1S2"]);
3588 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3589 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3590 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3591 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3592 m_deexcitations[j].nChannels += 4;
3594 if (level ==
"Ar_3D6" || level ==
"Ar_3D5" || level ==
"Ar_3D3" ||
3595 level ==
"Ar_3D4!" || level ==
"Ar_3D4" || level ==
"Ar_3D1!!" ||
3596 level ==
"Ar_3D1!" || level ==
"Ar_3D2" || level ==
"Ar_3S1!!!!" ||
3597 level ==
"Ar_3S1!!" || level ==
"Ar_3S1!!!" || level ==
"Ar_3S1!" ||
3598 level ==
"Ar_2S5" || level ==
"Ar_2S4" || level ==
"Ar_2S3" ||
3599 level ==
"Ar_2S2") {
3602 const double k4p =
fit3d4p * 1.e-20;
3603 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P10"]);
3604 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P9"]);
3605 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P8"]);
3606 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P7"]);
3607 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P6"]);
3608 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P5"]);
3609 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P4"]);
3610 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P3"]);
3611 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P2"]);
3612 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P1"]);
3613 for (
int k = 10; k--;) {
3614 m_deexcitations[j].p.push_back(0.1 * k4p * nAr);
3615 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3617 m_deexcitations[j].nChannels += 10;
3619 if (level ==
"Ar_4D5" || level ==
"Ar_3S4" || level ==
"Ar_4D2" ||
3620 level ==
"Ar_4S1!" || level ==
"Ar_3S2" || level ==
"Ar_5D5" ||
3621 level ==
"Ar_4S4" || level ==
"Ar_5D2" || level ==
"Ar_6D5" ||
3622 level ==
"Ar_5S1!" || level ==
"Ar_4S2" || level ==
"Ar_5S4" ||
3623 level ==
"Ar_6D2") {
3626 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P10"]);
3627 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P9"]);
3628 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P8"]);
3629 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P7"]);
3630 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P6"]);
3631 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P5"]);
3632 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P4"]);
3633 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P3"]);
3634 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P2"]);
3635 m_deexcitations[j].final.push_back(mapDxc[
"Ar_2P1"]);
3636 for (
int k = 10; k--;) {
3637 m_deexcitations[j].p.push_back(0.1 * k4p * nAr);
3638 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3640 m_deexcitations[j].nChannels += 10;
3645 const double kHM = 2.e-18;
3646 const bool useHornbeckMolnar =
true;
3647 if (useHornbeckMolnar) {
3648 m_deexcitations[j].p.push_back(kHM * nAr);
3649 m_deexcitations[j].final.push_back(mapDxc[
"Ar_Dimer"]);
3650 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3651 m_deexcitations[j].nChannels += 1;
3658 bool withCO2 =
false;
3661 bool withCH4 =
false;
3664 bool withC2H6 =
false;
3667 bool withIso =
false;
3670 bool withC2H2 =
false;
3673 bool withCF4 =
false;
3677 if (
m_gas[i] ==
"CO2") {
3681 }
else if (
m_gas[i] ==
"CH4") {
3685 }
else if (
m_gas[i] ==
"C2H6") {
3689 }
else if (
m_gas[i] ==
"C2H2") {
3693 }
else if (
m_gas[i] ==
"CF4") {
3697 }
else if (
m_gas[i] ==
"iC4H10") {
3704 if (withAr && withCO2) {
3707 for (
int j = nDeexcitations; j--;) {
3708 std::string level = m_deexcitations[j].label;
3710 double pacs = 0., eta = 0.;
3711 if (!optData.GetPhotoabsorptionCrossSection(
3712 "CO2", m_deexcitations[j].energy, pacs, eta)) {
3715 const double pPenningWK =
pow(eta, 2. / 5.);
3716 if (level ==
"Ar_1S5") {
3718 const double kQ = 5.3e-19;
3719 m_deexcitations[j].p.push_back(kQ * nQ);
3720 m_deexcitations[j].final.push_back(-1);
3721 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3722 m_deexcitations[j].nChannels += 1;
3723 }
else if (level ==
"Ar_1S4") {
3725 const double kQ = 5.0e-19;
3726 m_deexcitations[j].p.push_back(kQ * nQ);
3727 m_deexcitations[j].final.push_back(-1);
3728 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3729 m_deexcitations[j].nChannels += 1;
3730 }
else if (level ==
"Ar_1S3") {
3731 const double kQ = 5.9e-19;
3732 m_deexcitations[j].p.push_back(kQ * nQ);
3733 m_deexcitations[j].final.push_back(-1);
3734 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3735 m_deexcitations[j].nChannels += 1;
3736 }
else if (level ==
"Ar_1S2") {
3737 const double kQ = 7.4e-19;
3738 m_deexcitations[j].p.push_back(kQ * nQ);
3739 m_deexcitations[j].final.push_back(-1);
3740 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3741 m_deexcitations[j].nChannels += 1;
3742 }
else if (level ==
"Ar_2P8") {
3744 const double kQ = 6.4e-19;
3745 m_deexcitations[j].p.push_back(kQ * nQ);
3746 m_deexcitations[j].final.push_back(-1);
3747 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3748 m_deexcitations[j].nChannels += 1;
3749 }
else if (level ==
"Ar_2P6") {
3751 const double kQ = 6.1e-19;
3752 m_deexcitations[j].p.push_back(kQ * nQ);
3753 m_deexcitations[j].final.push_back(-1);
3754 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3755 m_deexcitations[j].nChannels += 1;
3756 }
else if (level ==
"Ar_2P5") {
3758 const double kQ = 6.6e-19;
3759 m_deexcitations[j].p.push_back(kQ * nQ);
3760 m_deexcitations[j].final.push_back(-1);
3761 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3762 m_deexcitations[j].nChannels += 1;
3763 }
else if (level ==
"Ar_2P1") {
3765 const double kQ = 6.2e-19;
3766 m_deexcitations[j].p.push_back(kQ * nQ);
3767 m_deexcitations[j].final.push_back(-1);
3768 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3769 m_deexcitations[j].nChannels += 1;
3770 }
else if (level ==
"Ar_2P10" || level ==
"Ar_2P9" || level ==
"Ar_2P7" ||
3771 level ==
"Ar_2P4" || level ==
"Ar_2P3" || level ==
"Ar_2P2") {
3773 const double kQ = 6.33e-19;
3774 m_deexcitations[j].p.push_back(kQ * nQ);
3775 m_deexcitations[j].final.push_back(-1);
3776 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3777 m_deexcitations[j].nChannels += 1;
3778 }
else if (m_deexcitations[j].osc > 0.) {
3781 const double m1 = ElectronMassGramme / (m_rgas[iAr] - 1.);
3782 const double m2 = ElectronMassGramme / (m_rgas[iCO2] - 1.);
3784 double mR = m1 * m2 / (m1 + m2);
3785 mR /= AtomicMassUnit;
3787 (RydbergEnergy / m_deexcitations[j].energy) * m_deexcitations[j].osc;
3789 (2 * RydbergEnergy / m_deexcitations[j].energy) * pacs /
3790 (4 * Pi2 * FineStructureConstant * BohrRadius * BohrRadius);
3794 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
3795 std::cout <<
" Rate constant for coll. deexcitation of\n"
3796 <<
" " << level <<
" by CO2 (W-K formula):\n"
3797 <<
" " << kQ <<
" cm3 ns-1\n";
3799 double pPenning = pPenningWK;
3800 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3801 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3802 m_deexcitations[j].final.push_back(-1);
3803 m_deexcitations[j].final.push_back(-1);
3804 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3805 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3806 m_deexcitations[j].nChannels += 2;
3807 }
else if (level ==
"Ar_3D6" || level ==
"Ar_3D3" || level ==
"Ar_3D4!" ||
3808 level ==
"Ar_3D4" || level ==
"Ar_3D1!!" ||
3809 level ==
"Ar_3D1!" || level ==
"Ar_3S1!!!!" ||
3810 level ==
"Ar_3S1!!" || level ==
"Ar_3S1!!!") {
3813 const double rAr3d = 436.e-10;
3814 const double rCO2 = 165.e-10;
3816 const double sigma =
pow(rAr3d + rCO2, 2) * Pi;
3818 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
3819 const double m2 = ElectronMass / (m_rgas[iCO2] - 1.);
3820 const double mR = m1 * m2 / (m1 + m2);
3822 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
3824 const double kQ =
fit3dQCO2 * sigma * vel;
3826 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
3827 std::cout <<
" Rate constant for coll. deexcitation of\n"
3828 <<
" " << level <<
" by CO2 (hard sphere):\n"
3829 <<
" " << kQ <<
" cm3 ns-1\n";
3832 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3833 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3834 m_deexcitations[j].final.push_back(-1);
3835 m_deexcitations[j].final.push_back(-1);
3836 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3837 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3838 m_deexcitations[j].nChannels += 2;
3839 }
else if (level ==
"Ar_2S5" || level ==
"Ar_2S3") {
3842 const double rAr5s = 635.e-10;
3843 const double rCO2 = 165.e-10;
3845 const double sigma =
pow(rAr5s + rCO2, 2) * Pi;
3847 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
3848 const double m2 = ElectronMass / (m_rgas[iCO2] - 1.);
3849 const double mR = m1 * m2 / (m1 + m2);
3851 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
3853 const double kQ =
fit3dQCO2 * sigma * vel;
3855 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
3856 std::cout <<
" Rate constant for coll. deexcitation of\n"
3857 <<
" " << level <<
" by CO2 (hard sphere):\n"
3858 <<
" " << kQ <<
" cm3 ns-1\n";
3861 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3862 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3863 m_deexcitations[j].final.push_back(-1);
3864 m_deexcitations[j].final.push_back(-1);
3865 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3866 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3867 m_deexcitations[j].nChannels += 2;
3871 if (withAr && withCH4) {
3874 for (
int j = nDeexcitations; j--;) {
3875 std::string level = m_deexcitations[j].label;
3877 double pacs = 0., eta = 0.;
3878 if (!optData.GetPhotoabsorptionCrossSection(
3879 "CH4", m_deexcitations[j].energy, pacs, eta)) {
3882 const double pPenningWK =
pow(eta, 2. / 5.);
3883 if (level ==
"Ar_1S5") {
3885 const double kQ = 4.55e-19;
3886 m_deexcitations[j].p.push_back(kQ * nQ);
3887 m_deexcitations[j].final.push_back(-1);
3888 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3889 m_deexcitations[j].nChannels += 1;
3890 }
else if (level ==
"Ar_1S4") {
3892 const double kQ = 4.5e-19;
3893 m_deexcitations[j].p.push_back(kQ * nQ);
3894 m_deexcitations[j].final.push_back(-1);
3895 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3896 m_deexcitations[j].nChannels += 1;
3897 }
else if (level ==
"Ar_1S3") {
3899 const double kQ = 5.30e-19;
3900 m_deexcitations[j].p.push_back(kQ * nQ);
3901 m_deexcitations[j].final.push_back(-1);
3902 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3903 m_deexcitations[j].nChannels += 1;
3904 }
else if (level ==
"Ar_1S2") {
3906 const double kQ = 5.7e-19;
3907 m_deexcitations[j].p.push_back(kQ * nQ);
3908 m_deexcitations[j].final.push_back(-1);
3909 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3910 m_deexcitations[j].nChannels += 1;
3911 }
else if (level ==
"Ar_2P8") {
3913 const double kQ = 7.4e-19;
3914 double pPenning = pPenningWK;
3916 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3917 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3918 m_deexcitations[j].final.push_back(-1);
3919 m_deexcitations[j].final.push_back(-1);
3920 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3921 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3922 m_deexcitations[j].nChannels += 2;
3923 }
else if (level ==
"Ar_2P6") {
3925 const double kQ = 3.4e-19;
3926 double pPenning = pPenningWK;
3928 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3929 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3930 m_deexcitations[j].final.push_back(-1);
3931 m_deexcitations[j].final.push_back(-1);
3932 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3933 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3934 m_deexcitations[j].nChannels += 2;
3935 }
else if (level ==
"Ar_2P5") {
3937 const double kQ = 6.0e-19;
3938 double pPenning = pPenningWK;
3940 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3941 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3942 m_deexcitations[j].final.push_back(-1);
3943 m_deexcitations[j].final.push_back(-1);
3944 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3945 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3946 m_deexcitations[j].nChannels += 2;
3947 }
else if (level ==
"Ar_2P1") {
3949 const double kQ = 9.3e-19;
3950 double pPenning = pPenningWK;
3952 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3953 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3954 m_deexcitations[j].final.push_back(-1);
3955 m_deexcitations[j].final.push_back(-1);
3956 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3957 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3958 m_deexcitations[j].nChannels += 2;
3959 }
else if (level ==
"Ar_2P10" || level ==
"Ar_2P9" || level ==
"Ar_2P7" ||
3960 level ==
"Ar_2P4" || level ==
"Ar_2P3" || level ==
"Ar_2P2") {
3962 const double kQ = 6.53e-19;
3963 double pPenning = pPenningWK;
3965 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3966 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3967 m_deexcitations[j].final.push_back(-1);
3968 m_deexcitations[j].final.push_back(-1);
3969 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3970 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
3971 m_deexcitations[j].nChannels += 2;
3972 }
else if (m_deexcitations[j].osc > 0.) {
3975 const double m1 = ElectronMassGramme / (m_rgas[iAr] - 1.);
3976 const double m2 = ElectronMassGramme / (m_rgas[iCH4] - 1.);
3978 double mR = m1 * m2 / (m1 + m2);
3979 mR /= AtomicMassUnit;
3981 (RydbergEnergy / m_deexcitations[j].energy) * m_deexcitations[j].osc;
3983 (2 * RydbergEnergy / m_deexcitations[j].energy) * pacs /
3984 (4 * Pi2 * FineStructureConstant * BohrRadius * BohrRadius);
3988 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
3989 std::cout <<
" Rate constant for coll. deexcitation of\n"
3990 <<
" " << level <<
" by CH4 (W-K formula):\n"
3991 <<
" " << kQ <<
" cm3 ns-1\n";
3993 double pPenning = pPenningWK;
3994 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
3995 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
3996 m_deexcitations[j].final.push_back(-1);
3997 m_deexcitations[j].final.push_back(-1);
3998 m_deexcitations[j].type.push_back(DxcTypeCollIon);
3999 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4000 m_deexcitations[j].nChannels += 2;
4001 }
else if (level ==
"Ar_3D6" || level ==
"Ar_3D3" || level ==
"Ar_3D4!" ||
4002 level ==
"Ar_3D4" || level ==
"Ar_3D1!!" ||
4003 level ==
"Ar_3D1!" || level ==
"Ar_3S1!!!!" ||
4004 level ==
"Ar_3S1!!" || level ==
"Ar_3S1!!!") {
4007 const double rAr3d = 436.e-10;
4008 const double rCH4 = 190.e-10;
4010 const double sigma =
pow(rAr3d + rCH4, 2) * Pi;
4012 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4013 const double m2 = ElectronMass / (m_rgas[iCH4] - 1.);
4014 const double mR = m1 * m2 / (m1 + m2);
4016 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4018 const double kQ =
fit3dQCH4 * sigma * vel;
4020 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4021 std::cout <<
" Rate constant for coll. deexcitation of\n"
4022 <<
" " << level <<
" by CH4 (hard sphere):\n"
4023 <<
" " << kQ <<
" cm3 ns-1\n";
4026 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4027 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4028 m_deexcitations[j].final.push_back(-1);
4029 m_deexcitations[j].final.push_back(-1);
4030 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4031 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4032 m_deexcitations[j].nChannels += 2;
4033 }
else if (level ==
"Ar_2S5" || level ==
"Ar_2S3") {
4036 const double rAr5s = 635.e-10;
4037 const double rCH4 = 190.e-10;
4039 const double sigma =
pow(rAr5s + rCH4, 2) * Pi;
4041 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4042 const double m2 = ElectronMass / (m_rgas[iCH4] - 1.);
4043 const double mR = m1 * m2 / (m1 + m2);
4045 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4047 const double kQ =
fit3dQCH4 * sigma * vel;
4049 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4050 std::cout <<
" Rate constant for coll. deexcitation of\n"
4051 <<
" " << level <<
" by CH4 (hard sphere):\n"
4052 <<
" " << kQ <<
" cm3 ns-1\n";
4055 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4056 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4057 m_deexcitations[j].final.push_back(-1);
4058 m_deexcitations[j].final.push_back(-1);
4059 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4060 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4061 m_deexcitations[j].nChannels += 2;
4065 if (withAr && withC2H6) {
4068 for (
int j = nDeexcitations; j--;) {
4069 std::string level = m_deexcitations[j].label;
4071 double pacs = 0., eta = 0.;
4072 if (!optData.GetPhotoabsorptionCrossSection(
4073 "C2H6", m_deexcitations[j].energy, pacs, eta)) {
4076 const double pPenningWK =
pow(eta, 2. / 5.);
4077 if (level ==
"Ar_1S5") {
4079 const double kQ = 5.29e-19;
4080 const double pPenning = pPenningWK;
4081 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4082 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4083 m_deexcitations[j].final.push_back(-1);
4084 m_deexcitations[j].final.push_back(-1);
4085 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4086 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4087 m_deexcitations[j].nChannels += 2;
4088 }
else if (level ==
"Ar_1S4") {
4090 const double kQ = 6.2e-19;
4091 const double pPenning = pPenningWK;
4092 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4093 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4094 m_deexcitations[j].final.push_back(-1);
4095 m_deexcitations[j].final.push_back(-1);
4096 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4097 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4098 m_deexcitations[j].nChannels += 2;
4099 }
else if (level ==
"Ar_1S3") {
4101 const double kQ = 6.53e-19;
4103 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4104 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4105 m_deexcitations[j].final.push_back(-1);
4106 m_deexcitations[j].final.push_back(-1);
4107 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4108 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4109 m_deexcitations[j].nChannels += 2;
4110 }
else if (level ==
"Ar_1S2") {
4112 const double kQ = 10.7e-19;
4113 const double pPenning = pPenningWK;
4114 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4115 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4116 m_deexcitations[j].final.push_back(-1);
4117 m_deexcitations[j].final.push_back(-1);
4118 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4119 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4120 m_deexcitations[j].nChannels += 2;
4121 }
else if (level ==
"Ar_2P8") {
4123 const double kQ = 9.2e-19;
4125 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4126 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4127 m_deexcitations[j].final.push_back(-1);
4128 m_deexcitations[j].final.push_back(-1);
4129 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4130 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4131 m_deexcitations[j].nChannels += 2;
4132 }
else if (level ==
"Ar_2P6") {
4134 const double kQ = 4.8e-19;
4136 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4137 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4138 m_deexcitations[j].final.push_back(-1);
4139 m_deexcitations[j].final.push_back(-1);
4140 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4141 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4142 m_deexcitations[j].nChannels += 2;
4143 }
else if (level ==
"Ar_2P5") {
4145 const double kQ = 9.9e-19;
4147 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4148 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4149 m_deexcitations[j].final.push_back(-1);
4150 m_deexcitations[j].final.push_back(-1);
4151 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4152 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4153 m_deexcitations[j].nChannels += 2;
4154 }
else if (level ==
"Ar_2P1") {
4156 const double kQ = 11.0e-19;
4158 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4159 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4160 m_deexcitations[j].final.push_back(-1);
4161 m_deexcitations[j].final.push_back(-1);
4162 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4163 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4164 m_deexcitations[j].nChannels += 2;
4165 }
else if (level ==
"Ar_2P10" || level ==
"Ar_2P9" || level ==
"Ar_2P7" ||
4166 level ==
"Ar_2P4" || level ==
"Ar_2P3" || level ==
"Ar_2P2") {
4168 const double kQ = 8.7e-19;
4170 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4171 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4172 m_deexcitations[j].final.push_back(-1);
4173 m_deexcitations[j].final.push_back(-1);
4174 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4175 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4176 m_deexcitations[j].nChannels += 2;
4177 }
else if (m_deexcitations[j].osc > 0.) {
4180 const double m1 = ElectronMassGramme / (m_rgas[iAr] - 1.);
4181 const double m2 = ElectronMassGramme / (m_rgas[iC2H6] - 1.);
4183 double mR = m1 * m2 / (m1 + m2);
4184 mR /= AtomicMassUnit;
4186 (RydbergEnergy / m_deexcitations[j].energy) * m_deexcitations[j].osc;
4188 (2 * RydbergEnergy / m_deexcitations[j].energy) * pacs /
4189 (4 * Pi2 * FineStructureConstant * BohrRadius * BohrRadius);
4193 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4194 std::cout <<
" Rate constant for coll. deexcitation of\n"
4195 <<
" " << level <<
" by C2H6 (W-K formula):\n"
4196 <<
" " << kQ <<
" cm3 ns-1\n";
4198 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4199 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4200 m_deexcitations[j].final.push_back(-1);
4201 m_deexcitations[j].final.push_back(-1);
4202 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4203 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4204 m_deexcitations[j].nChannels += 2;
4205 }
else if (level ==
"Ar_3D6" || level ==
"Ar_3D3" || level ==
"Ar_3D4!" ||
4206 level ==
"Ar_3D4" || level ==
"Ar_3D1!!" ||
4207 level ==
"Ar_3D1!" || level ==
"Ar_3S1!!!!" ||
4208 level ==
"Ar_3S1!!" || level ==
"Ar_3S1!!!") {
4211 const double rAr3d = 436.e-10;
4212 const double rC2H6 = 195.e-10;
4214 const double sigma =
pow(rAr3d + rC2H6, 2) * Pi;
4216 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4217 const double m2 = ElectronMass / (m_rgas[iC2H6] - 1.);
4218 const double mR = m1 * m2 / (m1 + m2);
4220 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4224 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4225 std::cout <<
" Rate constant for coll. deexcitation of\n"
4226 <<
" " << level <<
" by C2H6 (hard sphere):\n"
4227 <<
" " << kQ <<
" cm3 ns-1\n";
4230 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4231 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4232 m_deexcitations[j].final.push_back(-1);
4233 m_deexcitations[j].final.push_back(-1);
4234 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4235 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4236 m_deexcitations[j].nChannels += 2;
4237 }
else if (level ==
"Ar_2S5" || level ==
"Ar_2S3") {
4240 const double rAr5s = 635.e-10;
4241 const double rC2H6 = 195.e-10;
4243 const double sigma =
pow(rAr5s + rC2H6, 2) * Pi;
4245 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4246 const double m2 = ElectronMass / (m_rgas[iC2H6] - 1.);
4247 const double mR = m1 * m2 / (m1 + m2);
4249 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4253 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4254 std::cout <<
" Rate constant for coll. deexcitation of\n"
4255 <<
" " << level <<
" by C2H6 (hard sphere):\n"
4256 <<
" " << kQ <<
" cm3 ns-1\n";
4259 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4260 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4261 m_deexcitations[j].final.push_back(-1);
4262 m_deexcitations[j].final.push_back(-1);
4263 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4264 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4265 m_deexcitations[j].nChannels += 2;
4269 if (withAr && withIso) {
4272 for (
int j = nDeexcitations; j--;) {
4273 std::string level = m_deexcitations[j].label;
4275 double pacs = 0., eta = 0.;
4277 if (!optData.GetPhotoabsorptionCrossSection(
4278 "nC4H10", m_deexcitations[j].energy, pacs, eta)) {
4281 const double pPenningWK =
pow(eta, 2. / 5.);
4282 if (level ==
"Ar_1S5") {
4285 const double kQ = 7.1e-19;
4286 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4287 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4288 m_deexcitations[j].final.push_back(-1);
4289 m_deexcitations[j].final.push_back(-1);
4290 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4291 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4292 m_deexcitations[j].nChannels += 2;
4293 }
else if (level ==
"Ar_1S4") {
4295 const double kQ = 6.1e-19;
4296 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4297 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4298 m_deexcitations[j].final.push_back(-1);
4299 m_deexcitations[j].final.push_back(-1);
4300 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4301 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4302 m_deexcitations[j].nChannels += 2;
4303 }
else if (level ==
"Ar_1S3") {
4306 const double kQ = 8.5e-19;
4307 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4308 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4309 m_deexcitations[j].final.push_back(-1);
4310 m_deexcitations[j].final.push_back(-1);
4311 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4312 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4313 m_deexcitations[j].nChannels += 2;
4314 }
else if (level ==
"Ar_1S2") {
4316 const double kQ = 11.0e-19;
4317 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4318 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4319 m_deexcitations[j].final.push_back(-1);
4320 m_deexcitations[j].final.push_back(-1);
4321 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4322 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4323 m_deexcitations[j].nChannels += 2;
4324 }
else if (level ==
"Ar_2P8") {
4326 const double kEth = 9.2e-19;
4328 const double r4p = 340.;
4330 const double rEth = 195.;
4331 const double rIso = 250.;
4333 const double mAr = 39.9;
4334 const double mEth = 30.1;
4335 const double mIso = 58.1;
4338 kQ *=
pow((r4p + rIso) / (r4p + rEth), 2) *
4339 sqrt((mEth / mIso) * (mAr + mIso) / (mAr + mEth));
4341 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4342 std::cout <<
" Estim. rate constant for coll. deexcitation of\n"
4343 <<
" " << level <<
" by iC4H10:\n"
4344 <<
" " << kQ <<
" cm3 ns-1\n";
4346 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4347 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4348 m_deexcitations[j].final.push_back(-1);
4349 m_deexcitations[j].final.push_back(-1);
4350 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4351 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4352 m_deexcitations[j].nChannels += 2;
4353 }
else if (level ==
"Ar_2P6") {
4355 const double kEth = 4.8e-19;
4357 const double r4p = 340.;
4359 const double rEth = 195.;
4360 const double rIso = 250.;
4362 const double mAr = 39.9;
4363 const double mEth = 30.1;
4364 const double mIso = 58.1;
4367 kQ *=
pow((r4p + rIso) / (r4p + rEth), 2) *
4368 sqrt((mEth / mIso) * (mAr + mIso) / (mAr + mEth));
4370 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4371 std::cout <<
" Estim. rate constant for coll. deexcitation of\n"
4372 <<
" " << level <<
" by iC4H10:\n"
4373 <<
" " << kQ <<
" cm3 ns-1\n";
4375 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4376 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4377 m_deexcitations[j].final.push_back(-1);
4378 m_deexcitations[j].final.push_back(-1);
4379 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4380 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4381 m_deexcitations[j].nChannels += 2;
4382 }
else if (level ==
"Ar_2P5") {
4384 const double kEth = 9.9e-19;
4386 const double r4p = 340.;
4388 const double rEth = 195.;
4389 const double rIso = 250.;
4391 const double mAr = 39.9;
4392 const double mEth = 30.1;
4393 const double mIso = 58.1;
4396 kQ *=
pow((r4p + rIso) / (r4p + rEth), 2) *
4397 sqrt((mEth / mIso) * (mAr + mIso) / (mAr + mEth));
4399 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4400 std::cout <<
" Estim. rate constant for coll. deexcitation of\n"
4401 <<
" " << level <<
" by iC4H10:\n"
4402 <<
" " << kQ <<
" cm3 ns-1\n";
4404 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4405 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4406 m_deexcitations[j].final.push_back(-1);
4407 m_deexcitations[j].final.push_back(-1);
4408 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4409 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4410 m_deexcitations[j].nChannels += 2;
4411 }
else if (level ==
"Ar_2P1") {
4413 const double kEth = 11.0e-19;
4415 const double r4p = 340.;
4417 const double rEth = 195.;
4418 const double rIso = 250.;
4420 const double mAr = 39.9;
4421 const double mEth = 30.1;
4422 const double mIso = 58.1;
4425 kQ *=
pow((r4p + rIso) / (r4p + rEth), 2) *
4426 sqrt((mEth / mIso) * (mAr + mIso) / (mAr + mEth));
4428 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4429 std::cout <<
" Estim. rate constant for coll. deexcitation of\n"
4430 <<
" " << level <<
" by iC4H10:\n"
4431 <<
" " << kQ <<
" cm3 ns-1\n";
4433 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4434 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4435 m_deexcitations[j].final.push_back(-1);
4436 m_deexcitations[j].final.push_back(-1);
4437 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4438 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4439 m_deexcitations[j].nChannels += 2;
4440 }
else if (level ==
"Ar_2P10" || level ==
"Ar_2P9" || level ==
"Ar_2P7" ||
4441 level ==
"Ar_2P4" || level ==
"Ar_2P3" || level ==
"Ar_2P2") {
4443 const double kEth = 5.5e-19;
4445 const double r4p = 340.;
4447 const double rEth = 195.;
4448 const double rIso = 250.;
4450 const double mAr = 39.9;
4451 const double mEth = 30.1;
4452 const double mIso = 58.1;
4455 kQ *=
pow((r4p + rIso) / (r4p + rEth), 2) *
4456 sqrt((mEth / mIso) * (mAr + mIso) / (mAr + mEth));
4458 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4459 std::cout <<
" Estim. rate constant for coll. deexcitation of\n"
4460 <<
" " << level <<
" by iC4H10:\n"
4461 <<
" " << kQ <<
" cm3 ns-1\n";
4463 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4464 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4465 m_deexcitations[j].final.push_back(-1);
4466 m_deexcitations[j].final.push_back(-1);
4467 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4468 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4469 m_deexcitations[j].nChannels += 2;
4470 }
else if (m_deexcitations[j].osc > 0.) {
4473 const double m1 = ElectronMassGramme / (m_rgas[iAr] - 1.);
4474 const double m2 = ElectronMassGramme / (m_rgas[iIso] - 1.);
4476 double mR = m1 * m2 / (m1 + m2);
4477 mR /= AtomicMassUnit;
4479 (RydbergEnergy / m_deexcitations[j].energy) * m_deexcitations[j].osc;
4481 (2 * RydbergEnergy / m_deexcitations[j].energy) * pacs /
4482 (4 * Pi2 * FineStructureConstant * BohrRadius * BohrRadius);
4486 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4487 std::cout <<
" Rate constant for coll. deexcitation of\n"
4488 <<
" " << level <<
" by C4H10 (W-K formula):\n"
4489 <<
" " << kQ <<
" cm3 ns-1\n";
4491 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4492 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4493 m_deexcitations[j].final.push_back(-1);
4494 m_deexcitations[j].final.push_back(-1);
4495 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4496 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4497 m_deexcitations[j].nChannels += 2;
4498 }
else if (level ==
"Ar_3D6" || level ==
"Ar_3D3" || level ==
"Ar_3D4!" ||
4499 level ==
"Ar_3D4" || level ==
"Ar_3D1!!" ||
4500 level ==
"Ar_3D1!" || level ==
"Ar_3S1!!!!" ||
4501 level ==
"Ar_3S1!!" || level ==
"Ar_3S1!!!") {
4504 const double rAr3d = 436.e-10;
4505 const double rIso = 250.e-10;
4507 const double sigma =
pow(rAr3d + rIso, 2) * Pi;
4509 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4510 const double m2 = ElectronMass / (m_rgas[iIso] - 1.);
4511 const double mR = m1 * m2 / (m1 + m2);
4513 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4515 const double kQ = sigma * vel;
4517 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4518 std::cout <<
" Rate constant for coll. deexcitation of\n"
4519 <<
" " << level <<
" by iC4H10 (hard sphere):\n"
4520 <<
" " << kQ <<
" cm3 ns-1\n";
4522 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4523 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4524 m_deexcitations[j].final.push_back(-1);
4525 m_deexcitations[j].final.push_back(-1);
4526 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4527 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4528 m_deexcitations[j].nChannels += 2;
4529 }
else if (level ==
"Ar_2S5" || level ==
"Ar_2S3") {
4532 const double rAr5s = 635.e-10;
4533 const double rIso = 250.e-10;
4535 const double sigma =
pow(rAr5s + rIso, 2) * Pi;
4537 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4538 const double m2 = ElectronMass / (m_rgas[iIso] - 1.);
4539 const double mR = m1 * m2 / (m1 + m2);
4541 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4543 const double kQ = sigma * vel;
4545 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4546 std::cout <<
" Rate constant for coll. deexcitation of\n"
4547 <<
" " << level <<
" by iC4H10 (hard sphere):\n"
4548 <<
" " << kQ <<
" cm3 ns-1\n";
4550 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4551 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4552 m_deexcitations[j].final.push_back(-1);
4553 m_deexcitations[j].final.push_back(-1);
4554 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4555 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4556 m_deexcitations[j].nChannels += 2;
4560 if (withAr && withC2H2) {
4563 for (
int j = nDeexcitations; j--;) {
4564 std::string level = m_deexcitations[j].label;
4566 double pacs = 0., eta = 0.;
4567 if (!optData.GetPhotoabsorptionCrossSection(
4568 "C2H2", m_deexcitations[j].energy, pacs, eta)) {
4571 const double pPenningWK =
pow(eta, 2. / 5.);
4572 if (level ==
"Ar_1S5") {
4574 const double kQ = 5.6e-19;
4578 const double pPenning = 0.61;
4579 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4580 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4581 m_deexcitations[j].final.push_back(-1);
4582 m_deexcitations[j].final.push_back(-1);
4583 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4584 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4585 m_deexcitations[j].nChannels += 2;
4586 }
else if (level ==
"Ar_1S4") {
4588 const double kQ = 4.6e-19;
4589 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4590 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4591 m_deexcitations[j].final.push_back(-1);
4592 m_deexcitations[j].final.push_back(-1);
4593 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4594 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4595 m_deexcitations[j].nChannels += 2;
4596 }
else if (level ==
"Ar_1S3") {
4597 const double kQ = 5.6e-19;
4598 const double pPenning = 0.61;
4599 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4600 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4601 m_deexcitations[j].final.push_back(-1);
4602 m_deexcitations[j].final.push_back(-1);
4603 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4604 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4605 m_deexcitations[j].nChannels += 2;
4606 }
else if (level ==
"Ar_1S2") {
4608 const double kQ = 8.7e-19;
4609 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4610 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4611 m_deexcitations[j].final.push_back(-1);
4612 m_deexcitations[j].final.push_back(-1);
4613 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4614 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4615 m_deexcitations[j].nChannels += 2;
4616 }
else if (level ==
"Ar_2P8") {
4618 const double kQ = 5.0e-19;
4619 const double pPenning = 0.3;
4620 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4621 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4622 m_deexcitations[j].final.push_back(-1);
4623 m_deexcitations[j].final.push_back(-1);
4624 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4625 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4626 m_deexcitations[j].nChannels += 2;
4627 }
else if (level ==
"Ar_2P6") {
4629 const double kQ = 5.7e-19;
4630 const double pPenning = 0.3;
4631 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4632 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4633 m_deexcitations[j].final.push_back(-1);
4634 m_deexcitations[j].final.push_back(-1);
4635 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4636 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4637 m_deexcitations[j].nChannels += 2;
4638 }
else if (level ==
"Ar_2P5") {
4640 const double kQ = 6.0e-19;
4641 const double pPenning = 0.3;
4642 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4643 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4644 m_deexcitations[j].final.push_back(-1);
4645 m_deexcitations[j].final.push_back(-1);
4646 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4647 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4648 m_deexcitations[j].nChannels += 2;
4649 }
else if (level ==
"Ar_2P1") {
4651 const double kQ = 5.3e-19;
4652 const double pPenning = 0.3;
4653 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4654 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4655 m_deexcitations[j].final.push_back(-1);
4656 m_deexcitations[j].final.push_back(-1);
4657 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4658 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4659 m_deexcitations[j].nChannels += 2;
4660 }
else if (level ==
"Ar_2P10" || level ==
"Ar_2P9" || level ==
"Ar_2P7" ||
4661 level ==
"Ar_2P4" || level ==
"Ar_2P3" || level ==
"Ar_2P2") {
4663 const double kQ = 5.5e-19;
4664 const double pPenning = 0.3;
4665 m_deexcitations[j].p.push_back(kQ * nQ * pPenning);
4666 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenning));
4667 m_deexcitations[j].final.push_back(-1);
4668 m_deexcitations[j].final.push_back(-1);
4669 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4670 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4671 m_deexcitations[j].nChannels += 2;
4672 }
else if (m_deexcitations[j].osc > 0.) {
4675 const double m1 = ElectronMassGramme / (m_rgas[iAr] - 1.);
4676 const double m2 = ElectronMassGramme / (m_rgas[iC2H2] - 1.);
4678 double mR = m1 * m2 / (m1 + m2);
4679 mR /= AtomicMassUnit;
4681 (RydbergEnergy / m_deexcitations[j].energy) * m_deexcitations[j].osc;
4683 (2 * RydbergEnergy / m_deexcitations[j].energy) * pacs /
4684 (4 * Pi2 * FineStructureConstant * BohrRadius * BohrRadius);
4688 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4689 std::cout <<
" Rate constant for coll. deexcitation of\n"
4690 <<
" " << level <<
" by C2H2 (W-K formula):\n"
4691 <<
" " << kQ <<
" cm3 ns-1\n";
4693 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4694 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4695 m_deexcitations[j].final.push_back(-1);
4696 m_deexcitations[j].final.push_back(-1);
4697 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4698 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4699 m_deexcitations[j].nChannels += 2;
4700 }
else if (level ==
"Ar_3D6" || level ==
"Ar_3D3" || level ==
"Ar_3D4!" ||
4701 level ==
"Ar_3D4" || level ==
"Ar_3D1!!" ||
4702 level ==
"Ar_3D1!" || level ==
"Ar_3S1!!!!" ||
4703 level ==
"Ar_3S1!!" || level ==
"Ar_3S1!!!") {
4706 const double rAr3d = 436.e-10;
4707 const double rC2H2 = 165.e-10;
4709 const double sigma =
pow(rAr3d + rC2H2, 2) * Pi;
4711 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4712 const double m2 = ElectronMass / (m_rgas[iC2H2] - 1.);
4713 const double mR = m1 * m2 / (m1 + m2);
4715 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4717 const double kQ = sigma * vel;
4719 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4720 std::cout <<
" Rate constant for coll. deexcitation of\n"
4721 <<
" " << level <<
" by C2H2 (hard sphere):\n"
4722 <<
" " << kQ <<
" cm3 ns-1\n";
4724 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4725 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4726 m_deexcitations[j].final.push_back(-1);
4727 m_deexcitations[j].final.push_back(-1);
4728 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4729 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4730 m_deexcitations[j].nChannels += 2;
4731 }
else if (level ==
"Ar_2S5" || level ==
"Ar_2S3") {
4734 const double rAr5s = 635.e-10;
4735 const double rC2H2 = 165.e-10;
4737 const double sigma =
pow(rAr5s + rC2H2, 2) * Pi;
4739 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4740 const double m2 = ElectronMass / (m_rgas[iC2H2] - 1.);
4741 const double mR = m1 * m2 / (m1 + m2);
4743 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4745 const double kQ = sigma * vel;
4747 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4748 std::cout <<
" Rate constant for coll. deexcitation of\n"
4749 <<
" " << level <<
" by C2H2 (hard sphere):\n"
4750 <<
" " << kQ <<
" cm3 ns-1\n";
4752 m_deexcitations[j].p.push_back(kQ * nQ * pPenningWK);
4753 m_deexcitations[j].p.push_back(kQ * nQ * (1. - pPenningWK));
4754 m_deexcitations[j].final.push_back(-1);
4755 m_deexcitations[j].final.push_back(-1);
4756 m_deexcitations[j].type.push_back(DxcTypeCollIon);
4757 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4758 m_deexcitations[j].nChannels += 2;
4762 if (withAr && withCF4) {
4765 for (
int j = nDeexcitations; j--;) {
4766 std::string level = m_deexcitations[j].label;
4768 double pacs = 0., eta = 0.;
4769 if (!optData.GetPhotoabsorptionCrossSection(
4770 "CF4", m_deexcitations[j].energy, pacs, eta)) {
4773 if (level ==
"Ar_1S5") {
4775 const double kQ = 0.33e-19;
4776 m_deexcitations[j].p.push_back(kQ * nQ);
4777 m_deexcitations[j].final.push_back(-1);
4778 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4779 m_deexcitations[j].nChannels += 1;
4780 }
else if (level ==
"Ar_1S3") {
4782 const double kQ = 0.26e-19;
4783 m_deexcitations[j].p.push_back(kQ * nQ);
4784 m_deexcitations[j].final.push_back(-1);
4785 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4786 m_deexcitations[j].nChannels += 1;
4787 }
else if (level ==
"Ar_2P8") {
4789 const double kQ = 1.7e-19;
4790 m_deexcitations[j].p.push_back(kQ * nQ);
4791 m_deexcitations[j].final.push_back(-1);
4792 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4793 m_deexcitations[j].nChannels += 1;
4794 }
else if (level ==
"Ar_2P6") {
4796 const double kQ = 1.7e-19;
4797 m_deexcitations[j].p.push_back(kQ * nQ);
4798 m_deexcitations[j].final.push_back(-1);
4799 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4800 m_deexcitations[j].nChannels += 1;
4801 }
else if (level ==
"Ar_2P5") {
4803 const double kQ = 1.6e-19;
4804 m_deexcitations[j].p.push_back(kQ * nQ);
4805 m_deexcitations[j].final.push_back(-1);
4806 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4807 m_deexcitations[j].nChannels += 1;
4808 }
else if (level ==
"Ar_2P1") {
4810 const double kQ = 2.2e-19;
4811 m_deexcitations[j].p.push_back(kQ * nQ);
4812 m_deexcitations[j].final.push_back(-1);
4813 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4814 m_deexcitations[j].nChannels += 1;
4815 }
else if (level ==
"Ar_2P10" || level ==
"Ar_2P9" || level ==
"Ar_2P7" ||
4816 level ==
"Ar_2P4" || level ==
"Ar_2P3" || level ==
"Ar_2P2") {
4818 const double kQ = 1.8e-19;
4819 m_deexcitations[j].p.push_back(kQ * nQ);
4820 m_deexcitations[j].final.push_back(-1);
4821 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4822 m_deexcitations[j].nChannels += 1;
4823 }
else if (m_deexcitations[j].osc > 0.) {
4826 const double m1 = ElectronMassGramme / (m_rgas[iAr] - 1.);
4827 const double m2 = ElectronMassGramme / (m_rgas[iCF4] - 1.);
4829 double mR = m1 * m2 / (m1 + m2);
4830 mR /= AtomicMassUnit;
4832 (RydbergEnergy / m_deexcitations[j].energy) * m_deexcitations[j].osc;
4834 (2 * RydbergEnergy / m_deexcitations[j].energy) * pacs /
4835 (4 * Pi2 * FineStructureConstant * BohrRadius * BohrRadius);
4839 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4840 std::cout <<
" Rate constant for coll. deexcitation of\n"
4841 <<
" " << level <<
" by CF4 (W-K formula):\n"
4842 <<
" " << kQ <<
" cm3 ns-1\n";
4844 m_deexcitations[j].p.push_back(kQ * nQ);
4845 m_deexcitations[j].final.push_back(-1);
4846 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4847 m_deexcitations[j].nChannels += 1;
4848 }
else if (level ==
"Ar_3D6" || level ==
"Ar_3D3" || level ==
"Ar_3D4!" ||
4849 level ==
"Ar_3D4" || level ==
"Ar_3D1!!" ||
4850 level ==
"Ar_3D1!" || level ==
"Ar_3S1!!!!" ||
4851 level ==
"Ar_3S1!!" || level ==
"Ar_3S1!!!") {
4854 const double rAr3d = 436.e-10;
4855 const double rCF4 = 235.e-10;
4857 const double sigma =
pow(rAr3d + rCF4, 2) * Pi;
4859 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4860 const double m2 = ElectronMass / (m_rgas[iCF4] - 1.);
4861 const double mR = m1 * m2 / (m1 + m2);
4863 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4865 const double kQ = sigma * vel;
4867 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4868 std::cout <<
" Rate constant for coll. deexcitation of\n"
4869 <<
" " << level <<
" by CF4 (hard sphere):\n"
4870 <<
" " << kQ <<
" cm3 ns-1\n";
4872 m_deexcitations[j].p.push_back(kQ * nQ);
4873 m_deexcitations[j].final.push_back(-1);
4874 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4875 m_deexcitations[j].nChannels += 1;
4876 }
else if (level ==
"Ar_2S5" || level ==
"Ar_2S3") {
4879 const double rAr5s = 635.e-10;
4880 const double rCF4 = 190.e-10;
4882 const double sigma =
pow(rAr5s + rCF4, 2) * Pi;
4884 const double m1 = ElectronMass / (m_rgas[iAr] - 1.);
4885 const double m2 = ElectronMass / (m_rgas[iCF4] - 1.);
4886 const double mR = m1 * m2 / (m1 + m2);
4888 const double vel = SpeedOfLight *
sqrt(8. * BoltzmannConstant *
4890 const double kQ = sigma * vel;
4892 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4893 std::cout <<
" Rate constant for coll. deexcitation of\n"
4894 <<
" " << level <<
" by CF4 (hard sphere):\n"
4895 <<
" " << kQ <<
" cm3 ns-1\n";
4897 m_deexcitations[j].p.push_back(kQ * nQ);
4898 m_deexcitations[j].final.push_back(-1);
4899 m_deexcitations[j].type.push_back(DxcTypeCollNonIon);
4900 m_deexcitations[j].nChannels += 1;
4905 if ((
m_debug || verbose) && nDeexcitations > 0) {
4906 std::cout <<
m_className <<
"::ComputeDeexcitationTable:\n";
4907 std::cout <<
" Level Energy [eV] "
4908 <<
" Lifetimes [ns]\n";
4910 <<
" Total Radiative "
4911 <<
" Collisional\n";
4913 <<
" Ionisation Transfer Loss\n";
4916 for (
unsigned int i = 0; i < nDeexcitations; ++i) {
4918 m_deexcitations[i].rate = 0.;
4920 double fCollIon = 0., fCollTransfer = 0., fCollLoss = 0.;
4921 for (
int j = m_deexcitations[i].nChannels; j--;) {
4922 m_deexcitations[i].rate += m_deexcitations[i].p[j];
4923 if (m_deexcitations[i].type[j] == DxcTypeRad) {
4924 fRad += m_deexcitations[i].p[j];
4925 }
else if (m_deexcitations[i].type[j] == DxcTypeCollIon) {
4926 fCollIon += m_deexcitations[i].p[j];
4927 }
else if (m_deexcitations[i].type[j] == DxcTypeCollNonIon) {
4928 if (m_deexcitations[i].
final[j] < 0) {
4929 fCollLoss += m_deexcitations[i].p[j];
4931 fCollTransfer += m_deexcitations[i].p[j];
4934 std::cerr <<
m_className <<
"::ComputeDeexcitationTable:\n";
4935 std::cerr <<
" Unknown type of deexcitation channel (level "
4936 << m_deexcitations[i].label <<
")\n";
4937 std::cerr <<
" Program bug!\n";
4940 if (m_deexcitations[i].rate > 0.) {
4943 std::cout << std::setw(12) << m_deexcitations[i].label <<
" "
4944 << std::fixed << std::setprecision(3) << std::setw(7)
4945 << m_deexcitations[i].energy <<
" " << std::setw(10)
4946 << 1. / m_deexcitations[i].rate <<
" ";
4948 std::cout << std::fixed << std::setprecision(3) << std::setw(10)
4949 << 1. / fRad <<
" ";
4951 std::cout <<
"---------- ";
4953 if (fCollIon > 0.) {
4954 std::cout << std::fixed << std::setprecision(3) << std::setw(10)
4955 << 1. / fCollIon <<
" ";
4957 std::cout <<
"---------- ";
4959 if (fCollTransfer > 0.) {
4960 std::cout << std::fixed << std::setprecision(3) << std::setw(10)
4961 << 1. / fCollTransfer <<
" ";
4963 std::cout <<
"---------- ";
4965 if (fCollLoss > 0.) {
4966 std::cout << std::fixed << std::setprecision(3) << std::setw(10)
4967 << 1. / fCollLoss <<
"\n";
4969 std::cout <<
"---------- \n";
4973 for (
int j = 0; j < m_deexcitations[i].nChannels; ++j) {
4974 m_deexcitations[i].p[j] /= m_deexcitations[i].rate;
4975 if (j > 0) m_deexcitations[i].p[j] += m_deexcitations[i].p[j - 1];
4983 if (!m_useDeexcitation) {
4984 std::cerr <<
m_className <<
"::ComputeDeexcitation:\n";
4985 std::cerr <<
" Deexcitation is disabled.\n";
4992 std::cerr <<
m_className <<
"::ComputeDeexcitation:\n";
4993 std::cerr <<
" Error calculating the collision rates table.\n";
4999 if (iLevel < 0 || iLevel >= (
int)m_nTerms) {
5000 std::cerr <<
m_className <<
"::ComputeDeexcitation:\n";
5001 std::cerr <<
" Level index is out of range.\n";
5005 iLevel = m_iDeexcitation[iLevel];
5006 if (iLevel < 0 || iLevel >= (
int)m_deexcitations.size()) {
5007 std::cerr <<
m_className <<
"::ComputeDeexcitation:\n";
5008 std::cerr <<
" Level is not deexcitable.\n";
5012 ComputeDeexcitationInternal(iLevel, fLevel);
5013 if (fLevel >= 0 && fLevel < (
int)m_deexcitations.size()) {
5014 fLevel = m_deexcitations[fLevel].level;
5018void MediumMagboltz::ComputeDeexcitationInternal(
int iLevel,
int& fLevel) {
5020 nDeexcitationProducts = 0;
5021 m_dxcProducts.clear();
5028 const int nDeexcitations = m_deexcitations.size();
5029 while (iLevel >= 0 && iLevel < nDeexcitations) {
5030 if (m_deexcitations[iLevel].rate <= 0. ||
5031 m_deexcitations[iLevel].nChannels <= 0) {
5037 newDxcProd.t += -log(
RndmUniformPos()) / m_deexcitations[iLevel].rate;
5040 int type = DxcTypeRad;
5042 for (
int j = 0; j < m_deexcitations[iLevel].nChannels; ++j) {
5043 if (r <= m_deexcitations[iLevel].p[j]) {
5044 fLevel = m_deexcitations[iLevel].final[j];
5045 type = m_deexcitations[iLevel].type[j];
5049 if (type == DxcTypeRad) {
5051 newDxcProd.type = DxcProdTypePhoton;
5052 newDxcProd.energy = m_deexcitations[iLevel].energy;
5055 newDxcProd.energy -= m_deexcitations[fLevel].energy;
5056 if (newDxcProd.energy < Small) newDxcProd.energy = Small;
5057 m_dxcProducts.push_back(newDxcProd);
5058 ++nDeexcitationProducts;
5063 double delta =
RndmVoigt(0., m_deexcitations[iLevel].sDoppler,
5064 m_deexcitations[iLevel].gPressure);
5065 while (newDxcProd.energy + delta < Small ||
5066 fabs(delta) >= m_deexcitations[iLevel].width) {
5067 delta =
RndmVoigt(0., m_deexcitations[iLevel].sDoppler,
5068 m_deexcitations[iLevel].gPressure);
5070 newDxcProd.energy += delta;
5071 m_dxcProducts.push_back(newDxcProd);
5072 ++nDeexcitationProducts;
5077 }
else if (type == DxcTypeCollIon) {
5079 newDxcProd.type = DxcProdTypeElectron;
5080 newDxcProd.energy = m_deexcitations[iLevel].energy;
5083 newDxcProd.energy -= m_deexcitations[fLevel].energy;
5084 if (newDxcProd.energy < Small) newDxcProd.energy = Small;
5086 m_dxcProducts.push_back(newDxcProd);
5087 ++nDeexcitationProducts;
5092 newDxcProd.energy -= m_minIonPot;
5093 if (newDxcProd.energy < Small) newDxcProd.energy = Small;
5095 m_dxcProducts.push_back(newDxcProd);
5096 ++nDeexcitationProducts;
5101 }
else if (type == DxcTypeCollNonIon) {
5105 std::cerr <<
m_className <<
"::ComputeDeexcitationInternal:\n";
5106 std::cerr <<
" Unknown deexcitation channel type (" << type <<
").\n";
5107 std::cerr <<
" Program bug!\n";
5115bool MediumMagboltz::ComputePhotonCollisionTable(
const bool verbose) {
5125 m_cfTotGamma.clear();
5126 m_cfTotGamma.resize(nEnergyStepsGamma, 0.);
5128 m_cfGamma.resize(nEnergyStepsGamma);
5129 for (
int j = nEnergyStepsGamma; j--;) m_cfGamma[j].clear();
5130 csTypeGamma.clear();
5134 const double prefactor = dens * SpeedOfLight *
m_fraction[i];
5136 std::string gasname =
m_gas[i];
5137 if (gasname ==
"iC4H10") {
5140 std::cout <<
m_className <<
"::ComputePhotonCollisionTable:\n";
5141 std::cout <<
" Photoabsorption cross-section for "
5142 <<
"iC4H10 not available.\n";
5143 std::cout <<
" Using n-butane cross-section instead.\n";
5146 if (!data.IsAvailable(gasname))
return false;
5147 csTypeGamma.push_back(i * nCsTypesGamma + PhotonCollisionTypeIonisation);
5148 csTypeGamma.push_back(i * nCsTypesGamma + PhotonCollisionTypeInelastic);
5150 for (
int j = 0; j < nEnergyStepsGamma; ++j) {
5152 data.GetPhotoabsorptionCrossSection(gasname, (j + 0.5) * m_eStepGamma, cs,
5154 m_cfTotGamma[j] += cs * prefactor;
5156 m_cfGamma[j].push_back(cs * prefactor * eta);
5158 m_cfGamma[j].push_back(cs * prefactor * (1. - eta));
5163 if (m_useCsOutput) {
5164 std::ofstream csfile;
5165 csfile.open(
"csgamma.txt", std::ios::out);
5166 for (
int j = 0; j < nEnergyStepsGamma; ++j) {
5167 csfile << (j + 0.5) * m_eStepGamma <<
" ";
5168 for (
int i = 0; i < nPhotonTerms; ++i) csfile << m_cfGamma[j][i] <<
" ";
5175 for (
int j = 0; j < nEnergyStepsGamma; ++j) {
5176 for (
int i = 0; i < nPhotonTerms; ++i) {
5177 if (i > 0) m_cfGamma[j][i] += m_cfGamma[j][i - 1];
5182 std::cout <<
m_className <<
"::ComputePhotonCollisionTable:\n";
5183 std::cout <<
" Energy [eV] Mean free path [um]\n";
5184 for (
int i = 0; i < 10; ++i) {
5186 m_cfTotGamma[(2 * i + 1) * nEnergyStepsGamma / 20] / SpeedOfLight;
5187 std::cout <<
" " << std::fixed << std::setw(10) << std::setprecision(2)
5188 << (2 * i + 1) * m_eFinalGamma / 20 <<
" " << std::setw(18)
5189 << std::setprecision(4);
5191 std::cout << 1.e4 / imfp <<
"\n";
5193 std::cout <<
"------------\n";
5196 std::cout << std::resetiosflags(std::ios_base::floatfield);
5199 if (!m_useDeexcitation)
return true;
5203 FineStructureConstant * 2 * Pi2 * HbarC * HbarC / ElectronMass;
5205 int nResonanceLines = 0;
5206 const unsigned int nDeexcitations = m_deexcitations.size();
5207 for (
unsigned int i = 0; i < nDeexcitations; ++i) {
5208 if (m_deexcitations[i].osc < Small)
continue;
5209 const double prefactor =
5210 dens * SpeedOfLight *
m_fraction[m_deexcitations[i].gas];
5211 m_deexcitations[i].cf = prefactor * f2cs * m_deexcitations[i].osc;
5213 const double mgas = ElectronMass / (m_rgas[m_deexcitations[i].gas] - 1.);
5215 m_deexcitations[i].sDoppler = wDoppler * m_deexcitations[i].energy;
5219 const double kResBroad = 1.92 * Pi *
sqrt(1. / 3.);
5220 m_deexcitations[i].gPressure = kResBroad * FineStructureConstant *
5221 pow(HbarC, 3) * m_deexcitations[i].osc * dens *
5223 (ElectronMass * m_deexcitations[i].energy);
5231 const double fwhmGauss = m_deexcitations[i].sDoppler *
sqrt(2. * log(2.));
5232 const double fwhmLorentz = m_deexcitations[i].gPressure;
5233 const double fwhmVoigt =
5234 0.5 * (1.0692 * fwhmLorentz +
sqrt(0.86639 * fwhmLorentz * fwhmLorentz +
5235 4 * fwhmGauss * fwhmGauss));
5236 m_deexcitations[i].width = nWidths * fwhmVoigt;
5240 if (nResonanceLines <= 0) {
5241 std::cerr <<
m_className <<
"::ComputePhotonCollisionTable:\n";
5242 std::cerr <<
" No resonance lines found.\n";
5247 std::cout <<
m_className <<
"::ComputePhotonCollisionTable:\n";
5248 std::cout <<
" Discrete absorption lines:\n";
5249 std::cout <<
" Energy [eV] Line width (FWHM) [eV] "
5250 <<
" Mean free path [um]\n";
5251 std::cout <<
" Doppler Pressure "
5253 for (
unsigned int i = 0; i < nDeexcitations; ++i) {
5254 if (m_deexcitations[i].osc < Small)
continue;
5255 const double imfpP = (m_deexcitations[i].cf / SpeedOfLight) *
5256 TMath::Voigt(0., m_deexcitations[i].sDoppler,
5257 2 * m_deexcitations[i].gPressure);
5258 std::cout <<
" " << std::fixed << std::setw(6)
5259 << std::setprecision(3) << m_deexcitations[i].energy <<
" +/- "
5260 << std::scientific << std::setprecision(1)
5261 << m_deexcitations[i].width <<
" " << std::setprecision(2)
5262 << 2 *
sqrt(2 * log(2.)) * m_deexcitations[i].sDoppler <<
" "
5263 << std::scientific << std::setprecision(3)
5264 << 2 * m_deexcitations[i].gPressure <<
" " << std::fixed
5265 << std::setw(10) << std::setprecision(4);
5267 std::cout << 1.e4 / imfpP;
5269 std::cout <<
"----------";
5279 const double btheta,
const int ncoll,
5280 bool verbose,
double& vx,
double& vy,
5281 double& vz,
double& dl,
double& dt,
5282 double& alpha,
double& eta,
double& lor,
5283 double& vxerr,
double& vyerr,
double& vzerr,
5284 double& dlerr,
double& dterr,
5285 double& alphaerr,
double& etaerr,
5286 double& lorerr,
double& alphatof) {
5291 alpha = eta = alphatof = 0.;
5293 vxerr = vyerr = vzerr = 0.;
5295 alphaerr = etaerr = 0.;
5317 if (!GetGasNumberMagboltz(
m_gas[i], ng)) {
5319 <<
" Gas " <<
m_gas[i] <<
" has no corresponding"
5320 <<
" gas number in Magboltz.\n";
5339 long long ielow = 1;
5340 while (ielow == 1) {
5342 if (bmag == 0. || btheta == 0. || fabs(btheta) == Pi) {
5344 }
else if (btheta == HalfPi) {
5361 }
else if (btheta == 0. || btheta == Pi) {
5363 }
else if (btheta == HalfPi) {
5372 const double sstmin = 30.;
5376 bool useSST =
false;
5377 if (fabs(alpp - attp) > sstmin || alpp > sstmin || attp > sstmin) {
5381 }
else if (btheta == 0. || btheta == Pi) {
5383 }
else if (btheta == HalfPi) {
5394 alphatof = fc1 - sqrt(fc1 * fc1 - fc2);
5407 const double forcalc = vx * vx + vy * vy;
5408 double elvel = sqrt(forcalc + vz * vz);
5409 if (forcalc != 0 && elvel != 0) {
5410 lor = acos(vz / elvel);
5411 const double ainlorerr = sqrt(forcalc * forcalc * vzerr * vzerr +
5412 vx * vx * vx * vx * vxerr * vxerr +
5413 vy * vy * vy * vy * vyerr * vyerr);
5414 lorerr = vz * ainlorerr/ elvel / elvel / sqrt (forcalc) / lor;
5439 std::cout <<
m_className <<
"::RunMagboltz:\n Results:\n";
5440 std::cout <<
" Drift velocity along E: " << std::right
5441 << std::setw(10) << std::setprecision(6) << vz <<
" cm/ns +/- "
5442 << std::setprecision(2) << vzerr <<
"%\n";
5443 std::cout <<
" Drift velocity along Bt: " << std::right
5444 << std::setw(10) << std::setprecision(6) << vx <<
" cm/ns +/- "
5445 << std::setprecision(2) << vxerr <<
"%\n";
5446 std::cout <<
" Drift velocity along ExB: " << std::right
5447 << std::setw(10) << std::setprecision(6) << vy <<
" cm/ns +/- "
5448 << std::setprecision(2) << vyerr <<
"%\n";
5449 std::cout <<
" Longitudinal diffusion: " << std::right
5450 << std::setw(10) << std::setprecision(6) << dl <<
" cm1/2 +/- "
5451 << std::setprecision(2) << dlerr <<
"%\n";
5452 std::cout <<
" Transverse diffusion: " << std::right
5453 << std::setw(10) << std::setprecision(6) << dt <<
" cm1/2 +/- "
5454 << std::setprecision(2) << dterr <<
"%\n";
5455 std::cout <<
" Lorentz Angle: " << std::right
5456 << std::setw(10) << std::setprecision(6) << (lor / Pi * 180.)
5457 <<
" degree +/- " << std::setprecision(2) << lorerr <<
"%\n";
5459 std::cout <<
" Townsend coefficient (SST): " << std::right
5460 << std::setw(10) << std::setprecision(6) << alpha
5461 <<
" cm-1 +/- " << std::setprecision(2) << alphaerr <<
"%\n";
5462 std::cout <<
" Attachment coefficient (SST): " << std::right
5463 << std::setw(10) << std::setprecision(6) << eta <<
" cm-1 +/- "
5464 << std::setprecision(2) << etaerr <<
"%\n";
5465 std::cout <<
" Eff. Townsend coefficient (TOF): " << std::right
5466 << std::setw(10) << std::setprecision(6) << alphatof
5469 std::cout <<
" Townsend coefficient: " << std::right
5470 << std::setw(10) << std::setprecision(6) << alpha
5471 <<
" cm-1 +/- " << std::setprecision(2) << alphaerr <<
"%\n";
5472 std::cout <<
" Attachment coefficient: " << std::right
5473 << std::setw(10) << std::setprecision(6) << eta <<
" cm-1 +/- "
5474 << std::setprecision(2) << etaerr <<
"%\n";
5486 const unsigned int nEfields =
m_eFields.size();
5487 const unsigned int nBfields =
m_bFields.size();
5488 const unsigned int nAngles =
m_bAngles.size();
5526 double vx = 0., vy = 0., vz = 0.;
5527 double difl = 0., dift = 0.;
5528 double alpha = 0., eta = 0.;
5530 double vxerr = 0., vyerr = 0., vzerr = 0.;
5531 double diflerr = 0., difterr = 0.;
5532 double alphaerr = 0., etaerr = 0.;
5533 double alphatof = 0.;
5537 for (
unsigned int i = 0; i < nEfields; ++i) {
5538 for (
unsigned int j = 0; j < nAngles; ++j) {
5539 for (
unsigned int k = 0; k < nBfields; ++k) {
5541 std::cout <<
m_className <<
"::GenerateGasTable:\n"
5542 <<
" E = " <<
m_eFields[i] <<
" V/cm, B = "
5546 vy, vz, difl, dift, alpha, eta, lor, vxerr, vyerr, vzerr,
5547 diflerr, difterr, alphaerr, etaerr, lorerr, alphatof);
Base class for gas media.
std::vector< excListElement > m_excitationList
std::string m_gas[m_nMaxGases]
double m_lambdaPenningGlobal
bool GetGasName(const int gasnumber, const int version, std::string &gasname)
double m_rPenningGas[m_nMaxGases]
std::vector< std::vector< std::vector< double > > > m_tabTownsendNoPenning
double m_temperatureTable
std::vector< std::vector< std::vector< std::vector< double > > > > m_tabIonRates
static const unsigned int m_nMaxGases
double m_fraction[m_nMaxGases]
double GetNumberDensity() const
std::vector< ionListElement > m_ionisationList
std::vector< std::vector< std::vector< std::vector< double > > > > m_tabExcRates
double m_lambdaPenningGas[m_nMaxGases]
void SetSplittingFunctionGreenSawada()
int GetNumberOfPhotonCollisions() const
void SetExcitationScalingFactor(const double r, std::string gasname)
bool GetLevel(const unsigned int i, int &ngas, int &type, std::string &descr, double &e)
void ResetCollisionCounters()
void EnableRadiationTrapping()
unsigned int GetNumberOfElectronCollisions() const
bool GetIonisationProduct(const unsigned int i, int &type, double &energy) const
void EnablePenningTransfer(const double r, const double lambda)
void ComputeDeexcitation(int iLevel, int &fLevel)
void SetSplittingFunctionOpalBeaty()
void GenerateGasTable(const int numCollisions=10, const bool verbose=true)
void SetSplittingFunctionFlat()
void RunMagboltz(const double e, const double b, const double btheta, const int ncoll, bool verbose, double &vx, double &vy, double &vz, double &dl, double &dt, double &alpha, double &eta, double &lor, double &vxerr, double &vyerr, double &vzerr, double &dlerr, double &dterr, double &alphaerr, double &etaerr, double &lorerr, double &alphatof)
bool SetMaxPhotonEnergy(const double e)
bool GetElectronCollision(const double e, int &type, int &level, double &e1, double &dx, double &dy, double &dz, int &nion, int &ndxc, int &band)
double GetElectronNullCollisionRate(const int band)
bool Initialise(const bool verbose=false)
bool GetDeexcitationProduct(const unsigned int i, double &t, double &s, int &type, double &energy) const
double GetPhotonCollisionRate(const double e)
bool SetMaxElectronEnergy(const double e)
double GetElectronCollisionRate(const double e, const int band)
void EnableDeexcitation()
void DisablePenningTransfer()
bool GetPhotonCollision(const double e, int &type, int &level, double &e1, double &ctheta, int &nsec, double &esec)
std::vector< double > m_bFields
bool m_hasElectronDiffTrans
std::vector< std::vector< std::vector< double > > > tabElectronVelocityB
bool m_hasElectronVelocityB
std::vector< std::vector< std::vector< double > > > tabElectronVelocityE
void InitParamArrays(const unsigned int eRes, const unsigned int bRes, const unsigned int aRes, std::vector< std::vector< std::vector< double > > > &tab, const double val)
std::vector< std::vector< std::vector< double > > > tabElectronDiffLong
std::vector< std::vector< std::vector< double > > > tabElectronLorentzAngle
std::vector< std::vector< std::vector< double > > > tabElectronAttachment
virtual void EnableDrift()
std::vector< double > m_eFields
std::vector< double > m_bAngles
bool m_hasElectronVelocityExB
bool m_hasElectronLorentzAngle
bool m_hasElectronDiffLong
virtual void EnablePrimaryIonisation()
unsigned int m_nComponents
bool m_hasIonDissociation
bool m_hasElectronVelocityE
std::vector< std::vector< std::vector< double > > > tabElectronTownsend
bool m_hasElectronAttachment
std::vector< std::vector< std::vector< double > > > tabElectronDiffTrans
std::vector< std::vector< std::vector< double > > > tabElectronVelocityExB
void gasmix_(long long *ngs, double *q, double *qin, long long *nin, double *e, double *ei, char *name, double *virl, double *eb, double *peqel, double *peqin, double *penfra, long long *kel, long long *kin, double *qion, double *peqion, double *eion, long long *nion, char scrpt[260][50])
struct Garfield::Magboltz::@8 diflab_
struct Garfield::Magboltz::@5 ratio_
struct Garfield::Magboltz::@12 ctowns_
void elimitc_(long long *ielow)
struct Garfield::Magboltz::@13 ctwner_
struct Garfield::Magboltz::@4 gasn_
struct Garfield::Magboltz::@0 bfld_
struct Garfield::Magboltz::@7 velerr_
struct Garfield::Magboltz::@2 setp_
void elimit_(long long *ielow)
struct Garfield::Magboltz::@1 inpt_
void elimitb_(long long *ielow)
struct Garfield::Magboltz::@3 cnsts_
struct Garfield::Magboltz::@14 tofout_
struct Garfield::Magboltz::@6 vel_
struct Garfield::Magboltz::@11 diferl_
double RndmUniform()
Draw a random number uniformly distributed in the range [0, 1).
double RndmVoigt(const double mu, const double sigma, const double gamma)
double RndmUniformPos()
Draw a random number uniformly distributed in the range (0, 1).
DoubleAc cos(const DoubleAc &f)
DoubleAc pow(const DoubleAc &f, double p)
DoubleAc exp(const DoubleAc &f)
DoubleAc fabs(const DoubleAc &f)
DoubleAc sin(const DoubleAc &f)
DoubleAc asin(const DoubleAc &f)
DoubleAc sqrt(const DoubleAc &f)