20 lambdaPenningGlobal(0.),
21 pressureTable(m_pressure),
22 temperatureTable(m_temperature),
28 m_extrHighExcRates(1),
30 m_extrHighIonRates(1),
65 const std::string gas2,
const double f2,
66 const std::string gas3,
const double f3,
67 const std::string gas4,
const double f4,
68 const std::string gas5,
const double f5,
69 const std::string gas6,
const double f6) {
80 std::string gasname =
"";
115 std::cerr <<
" Error setting the composition.\n";
116 std::cerr <<
" No valid ingredients were specified.\n";
146 std::cout <<
" " <<
m_name;
148 std::cout <<
" (" <<
fraction[0] * 100;
150 std::cout <<
"/" <<
fraction[i] * 100;
169 for (
unsigned int j = 0; j < nComponentsOld; ++j) {
170 if (
gas[i] == gasOld[j]) {
171 if (rPenningGasOld[j] > 0.) {
175 std::cout <<
" Adopting Penning transfer parameters for " <<
gas[i]
176 <<
" from previous mixture.\n";
187 double& f2, std::string& gas3,
double& f3,
188 std::string& gas4,
double& f4, std::string& gas5,
189 double& f5, std::string& gas6,
double& f6) {
206 std::string& label,
double& f) {
210 std::cerr <<
" Index out of range.\n";
222 std::cerr <<
m_className <<
"::SetAtomicNumber:\n";
223 std::cerr <<
" Effective Z cannot be changed"
224 <<
" directly to " << z <<
".\n";
225 std::cerr <<
" Use SetComposition to define the gas mixture.\n";
230 std::cerr <<
m_className <<
"::SetAtomicWeight:\n";
231 std::cerr <<
" Effective A cannot be changed"
232 <<
" directly to " << a <<
".\n";
233 std::cerr <<
" Use SetComposition to define the gas mixture.\n";
238 std::cerr <<
m_className <<
"::SetNumberDensity:\n";
239 std::cerr <<
" Density cannot directly be changed to " << n <<
".\n";
240 std::cerr <<
" Use SetTemperature and SetPressure.\n";
246 std::cerr <<
" Density cannot directly be changed to " << rho <<
".\n";
247 std::cerr <<
" Use SetTemperature, SetPressure"
248 <<
" and SetComposition.\n";
264 return LoschmidtNumber * (
m_pressure / AtmosphericPressure) *
285 std::ifstream gasfile;
287 gasfile.open(filename.c_str());
289 if (!gasfile.is_open()) {
291 std::cerr <<
" Gas file could not be opened.\n";
299 std::string gasBits =
"";
302 const int nMagboltzGases = 60;
303 std::vector<double> mixture(nMagboltzGases);
304 for (
int i = nMagboltzGases; i--;) mixture[i] = 0.;
313 int versionNumber = 12;
316 bool atTables =
false;
318 gasfile.getline(line, 256);
319 if (strncmp(line,
" The gas tables follow:", 8) == 0 ||
320 strncmp(line,
"The gas tables follow:", 7) == 0) {
323 std::cout <<
" Entering tables.\n";
328 std::cout <<
" Line: " << line <<
"\n";
332 token = strtok(line,
" :,%");
333 while (token != NULL) {
334 if (
m_debug) std::cout <<
" Token: " << token <<
"\n";
335 if (strcmp(token,
"Version") == 0) {
336 token = strtok(NULL,
" :,%");
337 versionNumber = atoi(token);
339 if (versionNumber != 10 && versionNumber != 11 &&
340 versionNumber != 12) {
342 std::cerr <<
" The file has version number " << versionNumber
344 std::cerr <<
" Files written in this format cannot be read.\n";
349 std::cout <<
" Version: " << versionNumber <<
"\n";
351 }
else if (strcmp(token,
"GASOK") == 0) {
354 token = strtok(NULL,
" :,%\t");
355 token = strtok(NULL,
" :,%\t");
357 }
else if (strcmp(token,
"Identifier") == 0) {
359 std::string identifier =
"";
360 token = strtok(NULL,
"\n");
361 if (token != NULL) identifier += token;
364 std::cout <<
" Identifier:\n";
365 std::cout <<
" " << token <<
"\n";
367 }
else if (strcmp(token,
"Dimension") == 0) {
368 token = strtok(NULL,
" :,%\t");
369 if (strcmp(token,
"F") == 0) {
374 token = strtok(NULL,
" :,%\t");
375 eFieldRes = atoi(token);
377 if (eFieldRes <= 0) {
379 std::cerr <<
" Number of E fields out of range.\n";
383 token = strtok(NULL,
" :,%\t");
384 angRes = atoi(token);
388 std::cerr <<
" Number of E-B angles out of range.\n";
393 token = strtok(NULL,
" :,%\t");
394 bFieldRes = atoi(token);
396 if (
m_map2d && bFieldRes <= 0) {
398 std::cerr <<
" Number of B fields out of range.\n";
412 token = strtok(NULL,
" :,%\t");
414 std::cout <<
" " << token <<
"\n";
416 int nexc = atoi(token);
422 token = strtok(NULL,
" :,%\t");
423 int nion = atoi(token);
429 std::cout <<
" Finished initializing excitation/ionisation"
432 }
else if (strcmp(token,
"E") == 0) {
433 token = strtok(NULL,
" :,%");
434 if (strcmp(token,
"fields") == 0) {
435 for (
int i = 0; i < eFieldRes; i++) {
439 }
else if (strcmp(token,
"E-B") == 0) {
440 token = strtok(NULL,
" :,%");
441 if (strcmp(token,
"angles") == 0) {
442 for (
int i = 0; i < angRes; i++) {
446 }
else if (strcmp(token,
"B") == 0) {
447 token = strtok(NULL,
" :,%");
448 if (strcmp(token,
"fields") == 0) {
450 for (
int i = 0; i < bFieldRes; i++) {
456 }
else if (strcmp(token,
"Mixture") == 0) {
457 for (
int i = 0; i < nMagboltzGases; ++i) {
458 gasfile >> mixture[i];
460 }
else if (strcmp(token,
"Excitation") == 0) {
462 token = strtok(NULL,
" :,%");
464 token = strtok(NULL,
" :,%");
467 token = strtok(NULL,
" :,%");
470 token = strtok(NULL,
" :,%");
472 if (versionNumber >= 11) {
474 token = strtok(NULL,
" :,%");
477 token = strtok(NULL,
" :,%");
485 }
else if (strcmp(token,
"Ionisation") == 0) {
487 token = strtok(NULL,
" :,%");
489 token = strtok(NULL,
" :,%");
492 token = strtok(NULL,
" :,%");
497 token = strtok(NULL,
" :,%");
523 std::cout <<
" GASOK bits: " << gasBits <<
"\n";
526 if (gasBits[0] ==
'T') {
533 if (gasBits[1] ==
'T') {
540 if (gasBits[2] ==
'T') {
547 if (gasBits[3] ==
'T') {
557 if (gasBits[5] ==
'T') {
565 if (gasBits[7] ==
'T') {
572 if (gasBits[8] ==
'T') {
579 if (gasBits[9] ==
'T') {
586 if (gasBits[10] ==
'T') {
593 if (gasBits[11] ==
'T') {
602 if (gasBits[14] ==
'T') {
610 if (gasBits[15] ==
'T') {
620 std::vector<std::string> gasnames;
622 std::vector<double> percentages;
624 bool gasMixOk =
true;
625 unsigned int gasCount = 0;
626 for (
int i = 0; i < nMagboltzGases; ++i) {
627 if (mixture[i] > 0.) {
628 std::string gasname =
"";
629 if (!
GetGasName(i + 1, versionNumber, gasname)) {
631 std::cerr <<
" Unknown gas (gas number ";
632 std::cerr << i + 1 <<
")\n";
636 gasnames.push_back(gasname);
637 percentages.push_back(mixture[i]);
643 std::cerr <<
" Gas mixture has " << gasCount <<
" components.\n";
644 std::cerr <<
" Number of gases is limited to " <<
m_nMaxGases <<
".\n";
646 }
else if (gasCount == 0) {
648 std::cerr <<
" Gas mixture is not defined (zero components).\n";
652 for (
unsigned int i = 0; i < gasCount; ++i) sum += percentages[i];
653 if (gasMixOk && sum != 100.) {
655 std::cerr <<
" Percentages are not normalized to 100.\n";
656 for (
unsigned int i = 0; i < gasCount; ++i) percentages[i] *= 100. / sum;
668 gas[i] = gasnames[i];
669 fraction[i] = percentages[i] / 100.;
673 std::cout <<
" Gas composition set to " <<
m_name;
675 std::cout <<
" (" <<
fraction[0] * 100;
677 std::cout <<
"/" <<
fraction[i] * 100;
684 std::cerr <<
" Gas composition could not be established.\n";
689 std::cout <<
" Reading gas tables.\n";
694 double ve = 0., vb = 0., vexb = 0.;
698 double dl = 0., dt = 0.;
700 double alpha = 0., alpha0 = 0., eta = 0.;
702 double mu = 0., diss = 0.;
703 double ionDiffLong = 0., ionDiffTrans = 0.;
711 std::cout <<
" Gas table is 3D.\n";
713 for (
int i = 0; i < eFieldRes; i++) {
714 for (
int j = 0; j < angRes; j++) {
715 for (
int k = 0; k < bFieldRes; k++) {
717 gasfile >> ve >> vb >> vexb;
730 gasfile >> alpha >> alpha0 >> eta;
749 for (
int l = 0; l < 6; l++) {
769 std::cout <<
" Gas table is 1D.\n";
771 for (
int i = 0; i < eFieldRes; i++) {
772 if (
m_debug) std::cout <<
" Done table: " << i <<
"\n";
774 gasfile >> ve >> waste >> vb >> waste >> vexb >> waste;
782 gasfile >> dl >> waste >> dt >> waste;
786 gasfile >> alpha >> waste >> alpha0 >> eta >> waste;
795 gasfile >> mu >> waste;
799 gasfile >> lor >> waste;
801 gasfile >> diss >> waste;
804 for (
int j = 0; j < 6; j++) {
805 gasfile >> diff >> waste;
810 gasfile >> rate >> waste;
815 gasfile >> rate >> waste;
820 if (
m_debug) std::cout <<
" Done with gas tables.\n";
823 int hExtrap[13], lExtrap[13];
830 gasfile.getline(line, 256);
831 token = strtok(line,
" :,%=\t");
832 while (token != NULL) {
833 if (strcmp(token,
"H") == 0) {
834 token = strtok(NULL,
" :,%=\t");
835 for (
int i = 0; i < 13; i++) {
836 token = strtok(NULL,
" :,%=\t");
837 if (token != NULL) hExtrap[i] = atoi(token);
839 }
else if (strcmp(token,
"L") == 0) {
840 token = strtok(NULL,
" :,%=\t");
841 for (
int i = 0; i < 13; i++) {
842 token = strtok(NULL,
" :,%=\t");
843 if (token != NULL) lExtrap[i] = atoi(token);
845 }
else if (strcmp(token,
"Thresholds") == 0) {
846 token = strtok(NULL,
" :,%=\t");
848 token = strtok(NULL,
" :,%=\t");
850 token = strtok(NULL,
" :,%=\t");
852 }
else if (strcmp(token,
"Interp") == 0) {
853 for (
int i = 0; i < 13; i++) {
854 token = strtok(NULL,
" :,%=\t");
855 if (token != NULL) interpMeth[i] = atoi(token);
857 }
else if (strcmp(token,
"A") == 0) {
858 token = strtok(NULL,
" :,%=\t");
862 }
else if (strcmp(token,
"Z") == 0) {
864 token = strtok(NULL,
" :,%=\t");
867 }
else if (strcmp(token,
"EMPROB") == 0) {
869 token = strtok(NULL,
" :,%=\t");
872 }
else if (strcmp(token,
"EPAIR") == 0) {
874 token = strtok(NULL,
" :,%=\t");
877 }
else if (strcmp(token,
"Ion") == 0) {
879 token = strtok(NULL,
" :,%=\t");
880 token = strtok(NULL,
" :,%=\t");
881 if (token != NULL) ionDiffLong = atof(token);
882 token = strtok(NULL,
" :,%=\t");
883 if (token != NULL) ionDiffTrans = atof(token);
884 }
else if (strcmp(token,
"CMEAN") == 0) {
886 token = strtok(NULL,
" :,%=\t");
889 }
else if (strcmp(token,
"RHO") == 0) {
891 token = strtok(NULL,
" :,%=\t");
894 }
else if (strcmp(token,
"PGAS") == 0) {
895 token = strtok(NULL,
" :,%=\t");
897 if (token != NULL) pTorr = atof(token);
899 }
else if (strcmp(token,
"TGAS") == 0) {
900 token = strtok(NULL,
" :,%=\t");
901 double tKelvin = 293.15;
902 if (token != NULL) tKelvin = atof(token);
910 token = strtok(NULL,
" :,%=\t");
921 for (
int i = eFieldRes; i--;) {
927 for (
int i = eFieldRes; i--;) {
928 for (
int j = angRes; j--;) {
929 for (
int k = bFieldRes; k--;) {
937 for (
int l = 6; l--;) {
984 if (ionDiffLong > 0.) {
987 for (
int i = eFieldRes; i--;) {
988 for (
int j = angRes; j--;) {
989 for (
int k = bFieldRes; k--;) {
998 if (ionDiffTrans > 0.) {
1001 for (
int i = eFieldRes; i--;) {
1002 for (
int j = angRes; j--;) {
1003 for (
int k = bFieldRes; k--;) {
1015 std::cout <<
" Gas file sucessfully read.\n";
1023 const int nMagboltzGases = 60;
1024 std::vector<double> mixture(nMagboltzGases);
1025 for (
int i = nMagboltzGases; i--;) mixture[i] = 0.;
1031 std::cerr <<
" Error retrieving gas number for gas " <<
gas[i]
1034 mixture[ng - 1] =
fraction[i] * 100.;
1044 std::cout <<
" Writing gas tables to file: " << filename <<
"\n";
1047 std::ofstream outFile;
1048 outFile.open(filename.c_str(), std::ios::out);
1049 if (!outFile.is_open()) {
1051 std::cerr <<
" File could not be opened.\n";
1057 std::string gasBits =
"FFFFFFFFFFFFFFFFFFFF";
1075 time_t rawtime = time(0);
1076 tm timeinfo = *localtime(&rawtime);
1077 char datebuf[80] = {0};
1078 char timebuf[80] = {0};
1080 strftime(datebuf,
sizeof(datebuf) - 1,
"%d/%m/%y", &timeinfo);
1081 strftime(timebuf,
sizeof(timebuf) - 1,
"%H.%M.%S", &timeinfo);
1083 std::string member =
"< none >";
1085 outFile <<
"*----.----1----.----2----.----3----.----4----.----"
1086 <<
"5----.----6----.----7----.----8----.----9----.---"
1087 <<
"10----.---11----.---12----.---13--\n";
1088 outFile <<
"% Created " << datebuf <<
" at " << timebuf <<
" ";
1089 outFile << member <<
" GAS ";
1092 buffer = std::string(25,
' ');
1093 outFile <<
"\"none" << buffer <<
"\"\n";
1094 const int versionNumber = 12;
1095 outFile <<
" Version : " << versionNumber <<
"\n";
1096 outFile <<
" GASOK bits: " << gasBits <<
"\n";
1097 std::stringstream idStream;
1101 std::string idString = idStream.str();
1102 outFile <<
" Identifier: " << std::setw(80) << std::left << idString <<
"\n";
1103 outFile << std::right;
1104 buffer = std::string(80,
' ');
1105 outFile <<
" Clusters : " << buffer <<
"\n";
1106 outFile <<
" Dimension : ";
1112 outFile << std::setw(9) << eFieldRes <<
" " << std::setw(9) << angRes <<
" "
1113 << std::setw(9) << bFieldRes <<
" " << std::setw(9)
1116 outFile <<
" E fields \n";
1117 outFile << std::scientific << std::setw(15) << std::setprecision(8);
1118 for (
int i = 0; i < eFieldRes; i++) {
1121 if ((i + 1) % 5 == 0) outFile <<
"\n";
1123 if (eFieldRes % 5 != 0) outFile <<
"\n";
1124 outFile <<
" E-B angles \n";
1125 for (
int i = 0; i < angRes; i++) {
1127 outFile << std::setw(15) <<
bAngles[i];
1128 if ((i + 1) % 5 == 0) outFile <<
"\n";
1130 if (angRes % 5 != 0) outFile <<
"\n";
1131 outFile <<
" B fields \n";
1132 for (
int i = 0; i < bFieldRes; i++) {
1135 outFile << std::setw(15) <<
bFields[i] * 100.;
1136 if ((i + 1) % 5 == 0) outFile <<
"\n";
1138 if (bFieldRes % 5 != 0) outFile <<
"\n";
1139 outFile <<
" Mixture: \n";
1140 for (
int i = 0; i < nMagboltzGases; i++) {
1142 outFile << std::setw(15) << mixture[i];
1143 if ((i + 1) % 5 == 0) outFile <<
"\n";
1145 if (nMagboltzGases % 5 != 0) outFile <<
"\n";
1147 outFile <<
" Excitation " << std::setw(5) << i + 1 <<
": " << std::setw(45)
1154 outFile <<
" Ionisation " << std::setw(5) << i + 1 <<
": " << std::setw(45)
1162 outFile <<
" The gas tables follow:\n";
1164 for (
int i = 0; i < eFieldRes; i++) {
1165 for (
int j = 0; j < angRes; j++) {
1166 for (
int k = 0; k < bFieldRes; k++) {
1167 double ve = 0., vb = 0., vexb = 0.;
1175 double dl = 0., dt = 0.;
1180 double alpha = -30., alpha0 = -30., eta = -30.;
1184 alpha -= logPressure;
1185 alpha0 -= logPressure;
1202 diss -= logPressure;
1205 const double spl = 0.;
1207 outFile << std::setw(15);
1210 if (cnt % 8 == 0) outFile <<
"\n";
1212 outFile << std::setw(15);
1215 if (cnt % 8 == 0) outFile <<
"\n";
1217 outFile << std::setw(15);
1220 if (cnt % 8 == 0) outFile <<
"\n";
1222 outFile << std::setw(15);
1225 if (cnt % 8 == 0) outFile <<
"\n";
1227 outFile << std::setw(15);
1230 if (cnt % 8 == 0) outFile <<
"\n";
1232 outFile << std::setw(15);
1235 if (cnt % 8 == 0) outFile <<
"\n";
1237 outFile << std::setw(15);
1240 if (cnt % 8 == 0) outFile <<
"\n";
1242 outFile << std::setw(15);
1245 if (cnt % 8 == 0) outFile <<
"\n";
1247 outFile << std::setw(15);
1250 if (cnt % 8 == 0) outFile <<
"\n";
1252 outFile << std::setw(15);
1255 if (cnt % 8 == 0) outFile <<
"\n";
1257 outFile << std::setw(15);
1260 if (cnt % 8 == 0) outFile <<
"\n";
1262 outFile << std::setw(15);
1265 if (cnt % 8 == 0) outFile <<
"\n";
1267 outFile << std::setw(15);
1270 if (cnt % 8 == 0) outFile <<
"\n";
1271 outFile << std::setw(15);
1274 if (cnt % 8 == 0) outFile <<
"\n";
1275 outFile << std::setw(15);
1279 if (cnt % 8 == 0) outFile <<
"\n";
1280 outFile << std::setw(15);
1284 if (cnt % 8 == 0) outFile <<
"\n";
1286 outFile << std::setw(15);
1289 if (cnt % 8 == 0) outFile <<
"\n";
1291 outFile << std::setw(15);
1294 if (cnt % 8 == 0) outFile <<
"\n";
1296 outFile << std::setw(15);
1299 if (cnt % 8 == 0) outFile <<
"\n";
1301 outFile << std::setw(15);
1304 if (cnt % 8 == 0) outFile <<
"\n";
1306 outFile << std::setw(15);
1309 if (cnt % 8 == 0) outFile <<
"\n";
1311 outFile << std::setw(15);
1312 for (
int l = 0; l < 6; ++l) {
1318 outFile << std::setw(15);
1321 if (cnt % 8 == 0) outFile <<
"\n";
1323 outFile << std::setw(15) << spl;
1325 if (cnt % 8 == 0) outFile <<
"\n";
1330 outFile << std::setw(15);
1333 if (cnt % 8 == 0) outFile <<
"\n";
1335 outFile << std::setw(15) << spl;
1337 if (cnt % 8 == 0) outFile <<
"\n";
1343 outFile << std::setw(15);
1346 if (cnt % 8 == 0) outFile <<
"\n";
1348 outFile << std::setw(15) << spl;
1350 if (cnt % 8 == 0) outFile <<
"\n";
1356 if (cnt % 8 != 0) outFile <<
"\n";
1361 int hExtrap[13], lExtrap[13];
1393 outFile <<
" H Extr: ";
1394 for (
int i = 0; i < 13; i++) {
1395 outFile << std::setw(5) << hExtrap[i];
1398 outFile <<
" L Extr: ";
1399 for (
int i = 0; i < 13; i++) {
1400 outFile << std::setw(5) << lExtrap[i];
1406 outFile <<
" Interp: ";
1407 for (
int i = 0; i < 13; i++) {
1408 outFile << std::setw(5) << interpMeth[i];
1411 outFile <<
" A =" << std::setw(15) << 0. <<
","
1412 <<
" Z =" << std::setw(15) << 0. <<
","
1413 <<
" EMPROB=" << std::setw(15) << 0. <<
","
1414 <<
" EPAIR =" << std::setw(15) << 0. <<
"\n";
1415 double ionDiffLong = 0., ionDiffTrans = 0.;
1418 outFile <<
" Ion diffusion: " << std::setw(15) << ionDiffLong << std::setw(15)
1419 << ionDiffTrans <<
"\n";
1420 outFile <<
" CMEAN =" << std::setw(15) << 0. <<
","
1421 <<
" RHO =" << std::setw(15) << 0. <<
","
1424 outFile <<
" CLSTYP : NOT SET \n";
1425 buffer = std::string(80,
' ');
1426 outFile <<
" FCNCLS : " << buffer <<
"\n";
1427 outFile <<
" NCLS : " << std::setw(10) << 0 <<
"\n";
1428 outFile <<
" Average : " << std::setw(25) << std::setprecision(18) << 0.
1430 outFile <<
" Heed initialisation done: F\n";
1431 outFile <<
" SRIM initialisation done: F\n";
1441 std::cout <<
" Gas composition: " <<
m_name;
1443 std::cout <<
" (" <<
fraction[0] * 100;
1445 std::cout <<
"/" <<
fraction[i] * 100;
1450 std::cout <<
" Pressure: " <<
m_pressure <<
" Torr\n";
1452 std::cout <<
" Gas file:\n";
1456 std::cout <<
" Electric field range: " <<
eFields[0] <<
" - "
1460 std::cout <<
" Electric field: " <<
eFields[0] <<
" V/cm\n";
1462 std::cout <<
" Electric field range: not set\n";
1465 std::cout <<
" Magnetic field range: " <<
bFields[0] <<
" - "
1469 std::cout <<
" Magnetic field: " <<
bFields[0] <<
"\n";
1471 std::cout <<
" Magnetic field range: not set\n";
1474 std::cout <<
" Angular range: " <<
bAngles[0] <<
" - "
1478 std::cout <<
" Angle between E and B: " <<
bAngles[0] <<
"\n";
1480 std::cout <<
" Angular range: not set\n";
1483 std::cout <<
" Available electron transport data:\n";
1485 std::cout <<
" Velocity along E\n";
1488 std::cout <<
" Velocity along Bt\n";
1491 std::cout <<
" Velocity along ExB\n";
1494 std::cout <<
" Low field extrapolation: ";
1496 std::cout <<
" constant\n";
1498 std::cout <<
" linear\n";
1500 std::cout <<
" exponential\n";
1502 std::cout <<
" unknown\n";
1503 std::cout <<
" High field extrapolation: ";
1505 std::cout <<
" constant\n";
1507 std::cout <<
" linear\n";
1509 std::cout <<
" exponential\n";
1511 std::cout <<
" unknown\n";
1515 std::cout <<
" Longitudinal diffusion coefficient\n";
1518 std::cout <<
" Transverse diffusion coefficient\n";
1521 std::cout <<
" Diffusion tensor\n";
1524 std::cout <<
" Low field extrapolation: ";
1526 std::cout <<
" constant\n";
1528 std::cout <<
" linear\n";
1530 std::cout <<
" exponential\n";
1532 std::cout <<
" unknown\n";
1533 std::cout <<
" High field extrapolation: ";
1535 std::cout <<
" constant\n";
1537 std::cout <<
" linear\n";
1539 std::cout <<
" exponential\n";
1541 std::cout <<
" unknown\n";
1545 std::cout <<
" Townsend coefficient\n";
1546 std::cout <<
" Low field extrapolation: ";
1548 std::cout <<
" constant\n";
1550 std::cout <<
" linear\n";
1552 std::cout <<
" exponential\n";
1554 std::cout <<
" unknown\n";
1555 std::cout <<
" High field extrapolation: ";
1557 std::cout <<
" constant\n";
1559 std::cout <<
" linear\n";
1561 std::cout <<
" exponential\n";
1563 std::cout <<
" unknown\n";
1567 std::cout <<
" Attachment coefficient\n";
1568 std::cout <<
" Low field extrapolation: ";
1570 std::cout <<
" constant\n";
1572 std::cout <<
" linear\n";
1574 std::cout <<
" exponential\n";
1576 std::cout <<
" unknown\n";
1577 std::cout <<
" High field extrapolation: ";
1579 std::cout <<
" constant\n";
1581 std::cout <<
" linear\n";
1583 std::cout <<
" exponential\n";
1585 std::cout <<
" unknown\n";
1589 std::cout <<
" Excitation rates\n";
1590 std::cout <<
" Low field extrapolation: ";
1592 std::cout <<
" constant\n";
1594 std::cout <<
" linear\n";
1596 std::cout <<
" exponential\n";
1598 std::cout <<
" unknown\n";
1599 std::cout <<
" High field extrapolation: ";
1601 std::cout <<
" constant\n";
1603 std::cout <<
" linear\n";
1605 std::cout <<
" exponential\n";
1607 std::cout <<
" unknown\n";
1611 std::cout <<
" Ionisation rates\n";
1612 std::cout <<
" Low field extrapolation: ";
1614 std::cout <<
" constant\n";
1616 std::cout <<
" linear\n";
1618 std::cout <<
" exponential\n";
1620 std::cout <<
" unknown\n";
1621 std::cout <<
" High field extrapolation: ";
1623 std::cout <<
" constant\n";
1625 std::cout <<
" linear\n";
1627 std::cout <<
" exponential\n";
1629 std::cout <<
" unknown\n";
1636 std::cout <<
" none\n";
1639 std::cout <<
" Available ion transport data:\n";
1641 std::cout <<
" Mobility\n";
1642 std::cout <<
" Low field extrapolation: ";
1644 std::cout <<
" constant\n";
1646 std::cout <<
" linear\n";
1648 std::cout <<
" exponential\n";
1650 std::cout <<
" unknown\n";
1651 std::cout <<
" High field extrapolation: ";
1653 std::cout <<
" constant\n";
1655 std::cout <<
" linear\n";
1657 std::cout <<
" exponential\n";
1659 std::cout <<
" unknown\n";
1663 std::cout <<
" Longitudinal diffusion coefficient\n";
1666 std::cout <<
" Transverse diffusion coefficient\n";
1669 std::cout <<
" Low field extrapolation: ";
1671 std::cout <<
" constant\n";
1673 std::cout <<
" linear\n";
1675 std::cout <<
" exponential\n";
1677 std::cout <<
" unknown\n";
1678 std::cout <<
" High field extrapolation: ";
1680 std::cout <<
" constant\n";
1682 std::cout <<
" linear\n";
1684 std::cout <<
" exponential\n";
1686 std::cout <<
" unknown\n";
1690 std::cout <<
" Dissociation coefficient\n";
1691 std::cout <<
" Low field extrapolation: ";
1693 std::cout <<
" constant\n";
1695 std::cout <<
" linear\n";
1697 std::cout <<
" exponential\n";
1699 std::cout <<
" unknown\n";
1700 std::cout <<
" High field extrapolation: ";
1702 std::cout <<
" constant\n";
1704 std::cout <<
" linear\n";
1706 std::cout <<
" exponential\n";
1708 std::cout <<
" unknown\n";
1713 std::cout <<
" none\n";
1720 std::ifstream infile;
1721 infile.open(filename.c_str(), std::ios::in);
1724 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1725 std::cerr <<
" Error opening file\n";
1726 std::cerr <<
" " << filename <<
".\n";
1730 double field = -1., mu = -1.;
1731 double lastField = field;
1732 std::vector<double> efields;
1733 std::vector<double> mobilities;
1741 while (!infile.eof()) {
1744 infile.getline(line, 100);
1747 token = strtok(line,
" ,\t");
1750 }
else if (strcmp(token,
"#") == 0 || strcmp(token,
"*") == 0 ||
1751 strcmp(token,
"//") == 0) {
1754 field = atof(token);
1755 token = strtok(NULL,
" ,\t");
1757 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1758 std::cerr <<
" Found E/N but no mobility before the end-of-line\n";
1759 std::cerr <<
" " << filename <<
" (line " << i <<
").\n";
1764 token = strtok(NULL,
" ,\t");
1765 if (token && strcmp(token,
"//") != 0) {
1766 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1767 std::cerr <<
" Unexpected non-comment characters after the mobility; "
1768 <<
" line skipped.\n";
1769 std::cerr <<
" " << filename <<
" (line " << i <<
").\n";
1773 std::cout <<
" E/N = " << field <<
" Td: mu = " << mu <<
" cm2/(V.s)\n";
1776 if (infile.fail() && !infile.eof()) {
1777 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1778 std::cerr <<
" Error reading file\n";
1779 std::cerr <<
" " << filename <<
" (line " << i <<
").\n";
1785 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1786 std::cerr <<
" Negative electric field (line " << i <<
").\n";
1790 if (field <= lastField) {
1791 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1792 std::cerr <<
" Table is not in ascending order (line " << i <<
").\n";
1796 efields.push_back(field);
1797 mobilities.push_back(mu);
1801 const int ne = efields.size();
1803 std::cerr <<
m_className <<
"::LoadIonMobilities:\n";
1804 std::cerr <<
" No valid data found.\n";
1811 const double scaleMobility =
1813 for (
int j = ne; j--;) {
1815 efields[j] *= scaleField;
1816 mobilities[j] *= scaleMobility;
1819 std::cout <<
m_className <<
"::LoadIonMobility:\n";
1820 std::cout <<
" Read " << ne <<
" values from file " << filename <<
"\n";
1826 const std::string extrLow,
const std::string extrHigh) {
1828 unsigned int iExtr = 0;
1832 std::cerr <<
m_className <<
"::SetExtrapolationMethodExcitationRates:\n";
1833 std::cerr <<
" Unknown extrapolation method (" << extrLow <<
")\n";
1838 std::cerr <<
m_className <<
"::SetExtrapolationMethodExcitationRates:\n";
1839 std::cerr <<
" Unknown extrapolation method (" << extrHigh <<
")\n";
1844 const std::string extrLow,
const std::string extrHigh) {
1846 unsigned int iExtr = 0;
1850 std::cerr <<
m_className <<
"::SetExtrapolationMethodIonisationRates:\n";
1851 std::cerr <<
" Unknown extrapolation method (" << extrLow <<
")\n";
1856 std::cerr <<
m_className <<
"::SetExtrapolationMethodIonisationRates:\n";
1857 std::cerr <<
" Unknown extrapolation method (" << extrHigh <<
")\n";
1878 if (gasname ==
"CF4") {
1879 a = 12.0107 + 4 * 18.9984032;
1882 }
else if (gasname ==
"Ar") {
1885 }
else if (gasname ==
"He") {
1888 }
else if (gasname ==
"He-3") {
1891 }
else if (gasname ==
"Ne") {
1894 }
else if (gasname ==
"Kr") {
1897 }
else if (gasname ==
"Xe") {
1900 }
else if (gasname ==
"CH4") {
1901 a = 12.0107 + 4 * 1.00794;
1903 }
else if (gasname ==
"C2H6") {
1904 a = 2 * 12.0107 + 6 * 1.00794;
1906 }
else if (gasname ==
"C3H8") {
1907 a = 3 * 12.0107 + 8 * 1.00794;
1909 }
else if (gasname ==
"iC4H10") {
1910 a = 4 * 12.0107 + 10 * 1.00794;
1912 }
else if (gasname ==
"CO2") {
1913 a = 12.0107 + 2 * 15.9994;
1915 }
else if (gasname ==
"neoC5H12") {
1916 a = 5 * 12.0107 + 12 * 1.00794;
1918 }
else if (gasname ==
"H2O") {
1919 a = 2 * 1.00794 + 15.9994;
1921 }
else if (gasname ==
"O2") {
1924 }
else if (gasname ==
"N2") {
1927 }
else if (gasname ==
"NO") {
1928 a = 14.0067 + 15.9994;
1930 }
else if (gasname ==
"N2O") {
1931 a = 2 * 14.0067 + 15.9994;
1933 }
else if (gasname ==
"C2H4") {
1934 a = 2 * 12.0107 + 4 * 1.00794;
1936 }
else if (gasname ==
"C2H2") {
1937 a = 2 * 12.0107 + 2 * 1.00794;
1939 }
else if (gasname ==
"H2") {
1942 }
else if (gasname ==
"D2") {
1943 a = 2 * 2.01410177785;
1945 }
else if (gasname ==
"CO") {
1946 a = 12.0107 + 15.9994;
1948 }
else if (gasname ==
"Methylal") {
1949 a = 3 * 12.0107 + 8 * 1.00794 + 2 * 15.9994;
1950 z = 3 * 6 + 8 + 2 * 8;
1951 }
else if (gasname ==
"DME") {
1952 a = 4 * 12.0107 + 10 * 1.00794 + 2 * 15.9994;
1953 z = 4 * 6 + 10 + 2 * 8;
1954 }
else if (gasname ==
"Reid-Step" || gasname ==
"Mawell-Model" ||
1955 gasname ==
"Reid-Ramp") {
1958 }
else if (gasname ==
"C2F6") {
1959 a = 2 * 12.0107 + 6 * 18.9984032;
1961 }
else if (gasname ==
"SF6") {
1962 a = 32.065 + 6 * 18.9984032;
1964 }
else if (gasname ==
"NH3") {
1965 a = 14.0067 + 3 * 1.00794;
1967 }
else if (gasname ==
"C3H6") {
1968 a = 3 * 12.0107 + 6 * 1.00794;
1970 }
else if (gasname ==
"cC3H6") {
1971 a = 3 * 12.0107 + 6 * 1.00794;
1973 }
else if (gasname ==
"CH3OH") {
1974 a = 12.0107 + 4 * 1.00794 + 15.9994;
1976 }
else if (gasname ==
"C2H5OH") {
1977 a = 2 * 12.0107 + 6 * 1.00794 + 15.9994;
1979 }
else if (gasname ==
"C3H7OH") {
1980 a = 3 * 12.0107 + 8 * 1.00794 + 15.9994;
1982 }
else if (gasname ==
"Cs") {
1985 }
else if (gasname ==
"F2") {
1988 }
else if (gasname ==
"CS2") {
1989 a = 12.0107 + 2 * 32.065;
1991 }
else if (gasname ==
"COS") {
1992 a = 12.0107 + 15.9994 + 32.065;
1994 }
else if (gasname ==
"CD4") {
1995 a = 12.0107 + 4 * 2.01410177785;
1997 }
else if (gasname ==
"BF3") {
1998 a = 10.811 + 3 * 18.9984032;
2000 }
else if (gasname ==
"C2H2F4") {
2001 a = 2 * 12.0107 + 2 * 1.00794 + 4 * 18.9984032;
2002 z = 2 * 6 + 2 + 4 * 9;
2003 }
else if (gasname ==
"CHF3") {
2004 a = 12.0107 + 1.00794 + 3 * 18.9984032;
2006 }
else if (gasname ==
"CF3Br") {
2007 a = 12.0107 + 3 * 18.9984032 + 79.904;
2009 }
else if (gasname ==
"C3F8") {
2010 a = 3 * 12.0107 + 8 * 18.9984032;
2012 }
else if (gasname ==
"O3") {
2015 }
else if (gasname ==
"Hg") {
2018 }
else if (gasname ==
"H2S") {
2019 a = 2 * 1.00794 + 32.065;
2021 }
else if (gasname ==
"nC4H10") {
2022 a = 4 * 12.0107 + 10 * 1.00794;
2024 }
else if (gasname ==
"nC5H12") {
2025 a = 5 * 12.0107 + 12 * 1.00794;
2027 }
else if (gasname ==
"N2") {
2030 }
else if (gasname ==
"GeH4") {
2031 a = 72.64 + 4 * 1.00794;
2033 }
else if (gasname ==
"SiH4") {
2034 a = 28.0855 + 4 * 1.00794;
2046 std::string& gasname) {
2048 switch (gasnumber) {
2086 gasname =
"neoC5H12";
2119 gasname =
"Methylal";
2125 gasname =
"Reid-Step";
2128 gasname =
"Maxwell-Model";
2131 gasname =
"Reid-Ramp";
2179 if (version <= 11) {
2244 for (
unsigned int i = 0; i < input.length(); ++i) {
2245 input[i] = toupper(input[i]);
2250 if (input ==
"")
return false;
2253 if (input ==
"CF4" || input ==
"FREON" || input ==
"FREON-14" ||
2254 input ==
"TETRAFLUOROMETHANE") {
2259 if (input ==
"AR" || input ==
"ARGON") {
2264 if (input ==
"HE" || input ==
"HELIUM" || input ==
"HE-4" ||
2265 input ==
"HE 4" || input ==
"HE4" || input ==
"4-HE" || input ==
"4 HE" ||
2266 input ==
"4HE" || input ==
"HELIUM-4" || input ==
"HELIUM 4" ||
2267 input ==
"HELIUM4") {
2272 if (input ==
"HE-3" || input ==
"HE3" || input ==
"HELIUM-3" ||
2273 input ==
"HELIUM 3" || input ==
"HELIUM3") {
2278 if (input ==
"NE" || input ==
"NEON") {
2283 if (input ==
"KR" || input ==
"KRYPTON") {
2288 if (input ==
"XE" || input ==
"XENON") {
2293 if (input ==
"CH4" || input ==
"METHANE") {
2298 if (input ==
"C2H6" || input ==
"ETHANE") {
2303 if (input ==
"C3H8" || input ==
"PROPANE") {
2308 if (input ==
"C4H10" || input ==
"ISOBUTANE" || input ==
"ISO" ||
2309 input ==
"IC4H10" || input ==
"ISO-C4H10" || input ==
"ISOC4H10") {
2314 if (input ==
"CO2" || input ==
"CARBON-DIOXIDE" ||
2315 input ==
"CARBON DIOXIDE" || input ==
"CARBONDIOXIDE") {
2320 if (input ==
"NEOPENTANE" || input ==
"NEO-PENTANE" || input ==
"NEO-C5H12" ||
2321 input ==
"NEOC5H12" || input ==
"DIMETHYLPROPANE" || input ==
"C5H12") {
2322 gasname =
"neoC5H12";
2326 if (input ==
"H2O" || input ==
"WATER" || input ==
"WATER-VAPOUR" ||
2327 input ==
"WATER VAPOUR") {
2332 if (input ==
"O2" || input ==
"OXYGEN") {
2337 if (input ==
"NI" || input ==
"NITRO" || input ==
"N2" ||
2338 input ==
"NITROGEN") {
2343 if (input ==
"NO" || input ==
"NITRIC-OXIDE" || input ==
"NITRIC OXIDE" ||
2344 input ==
"NITROGEN-MONOXIDE" || input ==
"NITROGEN MONOXIDE") {
2349 if (input ==
"N2O" || input ==
"NITROUS-OXIDE" || input ==
"NITROUS OXIDE" ||
2350 input ==
"DINITROGEN-MONOXIDE" || input ==
"LAUGHING-GAS") {
2355 if (input ==
"C2H4" || input ==
"ETHENE" || input ==
"ETHYLENE") {
2360 if (input ==
"C2H2" || input ==
"ACETYL" || input ==
"ACETYLENE" ||
2361 input ==
"ETHYNE") {
2366 if (input ==
"H2" || input ==
"HYDROGEN") {
2371 if (input ==
"D2" || input ==
"DEUTERIUM") {
2376 if (input ==
"CO" || input ==
"CARBON-MONOXIDE" ||
2377 input ==
"CARBON MONOXIDE") {
2382 if (input ==
"METHYLAL" || input ==
"METHYLAL-HOT" || input ==
"DMM" ||
2383 input ==
"DIMETHOXYMETHANE" || input ==
"FORMAL" || input ==
"C3H8O2") {
2384 gasname =
"Methylal";
2388 if (input ==
"DME" || input ==
"DIMETHYL-ETHER" || input ==
"DIMETHYLETHER" ||
2389 input ==
"DIMETHYL ETHER" || input ==
"METHYL ETHER" ||
2390 input ==
"METHYL-ETHER" || input ==
"METHYLETHER" ||
2391 input ==
"WOOD-ETHER" || input ==
"WOODETHER" || input ==
"WOOD ETHER" ||
2392 input ==
"DIMETHYL OXIDE" || input ==
"DIMETHYL-OXIDE" ||
2393 input ==
"DEMEON" || input ==
"METHOXYMETHANE" || input ==
"C4H10O2") {
2398 if (input ==
"REID-STEP") {
2399 gasname =
"Reid-Step";
2403 if (input ==
"MAXWELL-MODEL") {
2404 gasname =
"Maxwell-Model";
2408 if (input ==
"REID-RAMP") {
2409 gasname =
"Reid-Ramp";
2413 if (input ==
"C2F6" || input ==
"FREON-116" || input ==
"ZYRON-116" ||
2414 input ==
"ZYRON-116-N5" || input ==
"HEXAFLUOROETHANE") {
2419 if (input ==
"SF6" || input ==
"SULPHUR-HEXAFLUORIDE" ||
2420 input ==
"SULFUR-HEXAFLUORIDE" || input ==
"SULPHUR HEXAFLUORIDE" ||
2421 input ==
"SULFUR HEXAFLUORIDE") {
2426 if (input ==
"NH3" || input ==
"AMMONIA") {
2431 if (input ==
"C3H6" || input ==
"PROPENE" || input ==
"PROPYLENE") {
2436 if (input ==
"C-PROPANE" || input ==
"CYCLO-PROPANE" ||
2437 input ==
"CYCLO PROPANE" || input ==
"CYCLOPROPANE" ||
2438 input ==
"C-C3H6" || input ==
"CC3H6" || input ==
"CYCLO-C3H6") {
2443 if (input ==
"METHANOL" || input ==
"METHYL-ALCOHOL" ||
2444 input ==
"METHYL ALCOHOL" || input ==
"WOOD ALCOHOL" ||
2445 input ==
"WOOD-ALCOHOL" || input ==
"CH3OH") {
2450 if (input ==
"ETHANOL" || input ==
"ETHYL-ALCOHOL" ||
2451 input ==
"ETHYL ALCOHOL" || input ==
"GRAIN ALCOHOL" ||
2452 input ==
"GRAIN-ALCOHOL" || input ==
"C2H5OH") {
2457 if (input ==
"PROPANOL" || input ==
"2-PROPANOL" || input ==
"ISOPROPYL" ||
2458 input ==
"ISO-PROPANOL" || input ==
"ISOPROPANOL" ||
2459 input ==
"ISOPROPYL ALCOHOL" || input ==
"ISOPROPYL-ALCOHOL" ||
2460 input ==
"C3H7OH") {
2465 if (input ==
"CS" || input ==
"CESIUM" || input ==
"CAESIUM") {
2470 if (input ==
"F2" || input ==
"FLUOR" || input ==
"FLUORINE") {
2475 if (input ==
"CS2" || input ==
"CARBON-DISULPHIDE" ||
2476 input ==
"CARBON-DISULFIDE" || input ==
"CARBON DISULPHIDE" ||
2477 input ==
"CARBON DISULFIDE") {
2482 if (input ==
"COS" || input ==
"CARBONYL-SULPHIDE" ||
2483 input ==
"CARBONYL-SULFIDE" || input ==
"CARBONYL SULFIDE") {
2488 if (input ==
"DEUT-METHANE" || input ==
"DEUTERIUM-METHANE" ||
2489 input ==
"DEUTERATED-METHANE" || input ==
"DEUTERATED METHANE" ||
2490 input ==
"DEUTERIUM METHANE" || input ==
"CD4") {
2495 if (input ==
"BF3" || input ==
"BORON-TRIFLUORIDE" ||
2496 input ==
"BORON TRIFLUORIDE") {
2501 if (input ==
"C2HF5" || input ==
"C2H2F4" || input ==
"C2F5H" ||
2502 input ==
"C2F4H2" || input ==
"FREON 134" || input ==
"FREON 134A" ||
2503 input ==
"FREON-134" || input ==
"FREON-134-A" || input ==
"FREON 125" ||
2504 input ==
"ZYRON 125" || input ==
"FREON-125" || input ==
"ZYRON-125" ||
2505 input ==
"TETRAFLUOROETHANE" || input ==
"PENTAFLUOROETHANE") {
2510 if (input ==
"TMA" || input ==
"TRIMETHYLAMINE" || input ==
"N(CH3)3" ||
2511 input ==
"N-(CH3)3") {
2516 if (input ==
"CHF3" || input ==
"FREON-23" || input ==
"TRIFLUOROMETHANE" ||
2517 input ==
"FLUOROFORM") {
2522 if (input ==
"CF3BR" || input ==
"TRIFLUOROBROMOMETHANE" ||
2523 input ==
"BROMOTRIFLUOROMETHANE" || input ==
"HALON-1301" ||
2524 input ==
"HALON 1301" || input ==
"FREON-13B1" || input ==
"FREON 13BI") {
2529 if (input ==
"C3F8" || input ==
"OCTAFLUOROPROPANE" || input ==
"R218" ||
2530 input ==
"R-218" || input ==
"FREON 218" || input ==
"FREON-218" ||
2531 input ==
"PERFLUOROPROPANE" || input ==
"RC 218" || input ==
"PFC 218" ||
2532 input ==
"RC-218" || input ==
"PFC-218" || input ==
"FLUTEC PP30" ||
2533 input ==
"GENETRON 218") {
2538 if (input ==
"OZONE" || input ==
"O3") {
2543 if (input ==
"MERCURY" || input ==
"HG" || input ==
"HG2") {
2548 if (input ==
"H2S" || input ==
"HYDROGEN SULPHIDE" || input ==
"SEWER GAS" ||
2549 input ==
"HYDROGEN-SULPHIDE" || input ==
"SEWER-GAS" ||
2550 input ==
"HYDROGEN SULFIDE" || input ==
"HEPATIC ACID" ||
2551 input ==
"HYDROGEN-SULFIDE" || input ==
"HEPATIC-ACID" ||
2552 input ==
"SULFUR HYDRIDE" || input ==
"DIHYDROGEN MONOSULFIDE" ||
2553 input ==
"SULFUR-HYDRIDE" || input ==
"DIHYDROGEN-MONOSULFIDE" ||
2554 input ==
"DIHYDROGEN MONOSULPHIDE" || input ==
"SULPHUR HYDRIDE" ||
2555 input ==
"DIHYDROGEN-MONOSULPHIDE" || input ==
"SULPHUR-HYDRIDE" ||
2556 input ==
"STINK DAMP" || input ==
"SULFURATED HYDROGEN" ||
2557 input ==
"STINK-DAMP" || input ==
"SULFURATED-HYDROGEN") {
2562 if (input ==
"N-BUTANE" || input ==
"N-C4H10" || input ==
"NBUTANE" ||
2563 input ==
"NC4H10") {
2568 if (input ==
"N-PENTANE" || input ==
"N-C5H12" || input ==
"NPENTANE" ||
2569 input ==
"NC5H12") {
2574 if (input ==
"NI-PHELPS" || input ==
"NI PHELPS" ||
2575 input ==
"NITROGEN-PHELPS" || input ==
"NITROGEN PHELPHS" ||
2576 input ==
"N2-PHELPS" || input ==
"N2 PHELPS" || input ==
"N2 (PHELPS)") {
2577 gasname =
"N2 (Phelps)";
2581 if (input ==
"GERMANE" || input ==
"GERM" || input ==
"GERMANIUM-HYDRIDE" ||
2582 input ==
"GERMANIUM HYDRIDE" || input ==
"GERMANIUM TETRAHYDRIDE" ||
2583 input ==
"GERMANIUM-TETRAHYDRIDE" || input ==
"GERMANOMETHANE" ||
2584 input ==
"MONOGERMANE" || input ==
"GEH4") {
2589 if (input ==
"SILANE" || input ==
"SIL" || input ==
"SILICON-HYDRIDE" ||
2590 input ==
"SILICON HYDRIDE" || input ==
"SILICON-TETRAHYDRIDE" ||
2591 input ==
"SILICANE" || input ==
"MONOSILANE" || input ==
"SIH4") {
2597 std::cerr <<
" Gas " << input <<
" is not defined.\n";
2602 int& number)
const {
2610 if (input ==
"CF4") {
2615 if (input ==
"Ar") {
2620 if (input ==
"He" || input ==
"He-4") {
2625 if (input ==
"He-3") {
2630 if (input ==
"Ne") {
2635 if (input ==
"Kr") {
2640 if (input ==
"Xe") {
2645 if (input ==
"CH4") {
2650 if (input ==
"C2H6") {
2655 if (input ==
"C3H8") {
2660 if (input ==
"iC4H10") {
2665 if (input ==
"CO2") {
2670 if (input ==
"neoC5H12") {
2675 if (input ==
"H2O") {
2680 if (input ==
"O2") {
2685 if (input ==
"N2") {
2690 if (input ==
"NO") {
2695 if (input ==
"N2O") {
2700 if (input ==
"C2H4") {
2705 if (input ==
"C2H2") {
2710 if (input ==
"H2") {
2715 if (input ==
"D2") {
2720 if (input ==
"CO") {
2725 if (input ==
"Methylal") {
2730 if (input ==
"DME") {
2735 if (input ==
"Reid-Step") {
2740 if (input ==
"Maxwell-Model") {
2745 if (input ==
"Reid-Ramp") {
2750 if (input ==
"C2F6") {
2755 if (input ==
"SF6") {
2760 if (input ==
"NH3") {
2765 if (input ==
"C3H6") {
2770 if (input ==
"cC3H6") {
2775 if (input ==
"CH3OH") {
2780 if (input ==
"C2H5OH") {
2785 if (input ==
"C3H7OH") {
2790 if (input ==
"Cs") {
2795 if (input ==
"F2") {
2800 if (input ==
"CS2") {
2805 if (input ==
"COS") {
2810 if (input ==
"CD4") {
2815 if (input ==
"BF3") {
2820 if (input ==
"C2HF5" || input ==
"C2H2F4") {
2825 if (input ==
"TMA") {
2830 if (input ==
"CHF3") {
2835 if (input ==
"CF3Br") {
2840 if (input ==
"C3F8") {
2845 if (input ==
"O3") {
2850 if (input ==
"Hg") {
2855 if (input ==
"H2S") {
2860 if (input ==
"nC4H10") {
2865 if (input ==
"nC5H12") {
2870 if (input ==
"N2 (Phelps)") {
2875 if (input ==
"GeH4") {
2880 if (input ==
"SiH4") {
2885 std::cerr <<
m_className <<
"::GetGasNumberGasFile:\n";
2886 std::cerr <<
" Gas " << input <<
" is not defined.\n";
2891 const unsigned int& i) {
2894 std::cerr <<
m_className <<
"::GetPhotoabsorptionCrossSection:\n";
2895 std::cerr <<
" Index (" << i <<
") out of range.\n";
DoubleAc sqrt(const DoubleAc &f)
void GetComposition(std::string &gas1, double &f1, std::string &gas2, double &f2, std::string &gas3, double &f3, std::string &gas4, double &f4, std::string &gas5, double &f5, std::string &gas6, double &f6)
std::vector< ionListElement > ionisationList
void SetAtomicNumber(const double &z)
std::vector< std::vector< std::vector< std::vector< double > > > > tabIonRates
double GetMassDensity() const
bool GetGasInfo(const std::string gasname, double &a, double &z) const
bool LoadIonMobility(const std::string &filename)
bool GetGasName(const int gasnumber, const int version, std::string &gasname)
void SetMassDensity(const double &rho)
std::vector< std::vector< std::vector< double > > > tabTownsendNoPenning
void SetNumberDensity(const double &n)
void SetExtrapolationMethodExcitationRates(const std::string extrLow, const std::string extrHigh)
double lambdaPenningGas[m_nMaxGases]
double fraction[m_nMaxGases]
std::vector< std::vector< std::vector< std::vector< double > > > > tabExcRates
unsigned int m_intpExcRates
unsigned int m_extrHighExcRates
std::string gas[m_nMaxGases]
static const unsigned int m_nMaxGases
bool WriteGasFile(const std::string &filename)
void GetComponent(const unsigned int &i, std::string &label, double &f)
bool GetGasNumberGasFile(const std::string input, int &number) const
void SetExtrapolationMethodIonisationRates(const std::string extrLow, const std::string extrHigh)
void SetAtomicWeight(const double &a)
double GetAtomicNumber() const
double rPenningGas[m_nMaxGases]
bool SetComposition(const std::string gas1, const double f1=1., const std::string gas2="", const double f2=0., const std::string gas3="", const double f3=0., const std::string gas4="", const double f4=0., const std::string gas5="", const double f5=0., const std::string gas6="", const double f6=0.)
double atNum[m_nMaxGases]
void SetInterpolationMethodIonisationRates(const int intrp)
bool GetPhotoabsorptionCrossSection(const double &e, double &sigma, const unsigned int &i)
std::vector< excListElement > excitationList
double GetAtomicWeight() const
bool LoadGasFile(const std::string &filename)
unsigned int m_intpIonRates
unsigned int m_extrHighIonRates
void SetInterpolationMethodExcitationRates(const int intrp)
unsigned int m_extrLowIonRates
double GetNumberDensity() const
unsigned int m_extrLowExcRates
double atWeight[m_nMaxGases]
bool m_hasElectronDiffTens
unsigned int m_extrLowMobility
bool SetIonMobility(const unsigned int &ie, const unsigned int &ib, const unsigned int &ia, const double &mu)
unsigned int m_intpDiffusion
unsigned int m_extrLowDiffusion
void InitParamTensor(const unsigned int &eRes, const unsigned int &bRes, const unsigned int &aRes, const unsigned int &tRes, std::vector< std::vector< std::vector< std::vector< double > > > > &tab, const double &val)
bool m_hasElectronDiffTrans
bool m_hasElectronTownsend
std::vector< double > bFields
std::vector< std::vector< std::vector< double > > > tabElectronVelocityB
unsigned int m_extrHighAttachment
unsigned int m_intpMobility
unsigned int m_intpAttachment
bool m_hasElectronVelocityB
bool GetExtrapolationIndex(std::string extrStr, unsigned int &extrNb)
unsigned int m_extrHighDiffusion
std::vector< double > eFields
std::vector< std::vector< std::vector< double > > > tabIonDissociation
unsigned int m_extrHighMobility
std::vector< std::vector< std::vector< double > > > tabElectronVelocityE
unsigned int m_intpTownsend
unsigned int m_extrLowAttachment
std::vector< double > bAngles
unsigned int m_extrHighDissociation
unsigned int m_intpVelocity
std::vector< std::vector< std::vector< double > > > tabElectronDiffLong
std::vector< std::vector< std::vector< double > > > tabElectronAttachment
unsigned int m_extrLowVelocity
unsigned int m_extrHighTownsend
virtual void EnableDrift()
unsigned int m_extrHighVelocity
unsigned int m_extrLowTownsend
std::vector< std::vector< std::vector< double > > > tabIonDiffTrans
unsigned int m_extrLowDissociation
std::vector< std::vector< std::vector< std::vector< double > > > > tabElectronDiffTens
bool m_hasElectronVelocityExB
std::vector< std::vector< std::vector< double > > > tabIonMobility
int thrElectronAttachment
bool m_hasElectronDiffLong
virtual void EnablePrimaryIonisation()
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)
unsigned int m_nComponents
std::vector< std::vector< std::vector< double > > > tabIonDiffLong
bool m_hasIonDissociation
unsigned int m_intpDissociation
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
bool GetPhotoabsorptionCrossSection(const std::string material, const double e, double &cs, double &eta)
bool IsAvailable(const std::string material) const