20 m_lambdaPenningGlobal(0.),
21 m_pressureTable(m_pressure),
22 m_temperatureTable(m_temperature),
26 m_extrHighExcRates(1),
28 m_extrHighIonRates(1),
60 const std::string& gas2,
const double f2,
61 const std::string& gas3,
const double f3,
62 const std::string& gas4,
const double f4,
63 const std::string& gas5,
const double f5,
64 const std::string& gas6,
const double f6) {
74 std::string gases[6] = {gas1, gas2, gas3, gas4, gas5, gas6};
75 double fractions[6] = {f1, f2, f3, f4, f5, f6};
76 for (
unsigned int i = 0; i < 6; ++i) {
78 std::string gasname =
"";
79 if (fractions[i] > 0. &&
GetGasName(gases[i], gasname)) {
89 <<
" Error setting the composition.\n"
90 <<
" No valid ingredients were specified.\n";
142 for (
unsigned int j = 0; j < nComponentsOld; ++j) {
143 if (
m_gas[i] != gasOld[j])
continue;
144 if (rPenningGasOld[j] > 0.) {
148 <<
" Using Penning transfer parameters for "
149 <<
m_gas[i] <<
" from previous mixture.\n"
159 double& f2, std::string& gas3,
double& f3,
160 std::string& gas4,
double& f4, std::string& gas5,
161 double& f5, std::string& gas6,
double& f6) {
178 std::string& label,
double& f) {
181 std::cerr <<
m_className <<
"::GetComponent:\n Index out of range.\n";
194 <<
" Effective Z cannot be changed directly to " << z <<
".\n"
195 <<
" Use SetComposition to define the gas mixture.\n";
201 <<
" Effective A cannot be changed directly to " << a <<
".\n"
202 <<
" Use SetComposition to define the gas mixture.\n";
207 std::cerr <<
m_className <<
"::SetNumberDensity:\n"
208 <<
" Density cannot directly be changed to " << n <<
".\n"
209 <<
" Use SetTemperature and SetPressure.\n";
215 <<
" Density cannot directly be changed to " << rho <<
".\n"
216 <<
" Use SetTemperature, SetPressure and SetComposition.\n";
232 return LoschmidtNumber * (
m_pressure / AtmosphericPressure) *
253 std::ifstream gasfile;
255 gasfile.open(filename.c_str());
257 if (!gasfile.is_open()) {
259 <<
" Gas file could not be opened.\n";
267 std::string gasBits =
"";
270 const int nMagboltzGases = 60;
271 std::vector<double> mixture(nMagboltzGases, 0.);
283 bool atTables =
false;
285 gasfile.getline(line, 256);
286 if (strncmp(line,
" The gas tables follow:", 8) == 0 ||
287 strncmp(line,
"The gas tables follow:", 7) == 0) {
290 std::cout <<
" Entering tables.\n";
295 std::cout <<
" Line: " << line <<
"\n";
299 token = strtok(line,
" :,%");
301 if (
m_debug) std::cout <<
" Token: " << token <<
"\n";
302 if (strcmp(token,
"Version") == 0) {
303 token = strtok(NULL,
" :,%");
304 version = atoi(token);
306 if (version != 10 && version != 11 && version != 12) {
308 <<
" The file has version number " << version <<
".\n"
309 <<
" Files written in this format cannot be read.\n";
314 <<
" Version: " << version <<
"\n";
316 }
else if (strcmp(token,
"GASOK") == 0) {
319 token = strtok(NULL,
" :,%\t");
320 token = strtok(NULL,
" :,%\t");
322 }
else if (strcmp(token,
"Identifier") == 0) {
324 std::string identifier =
"";
325 token = strtok(NULL,
"\n");
326 if (token != NULL) identifier += token;
329 <<
" Identifier: " << token <<
"\n";
331 }
else if (strcmp(token,
"Dimension") == 0) {
332 token = strtok(NULL,
" :,%\t");
333 if (strcmp(token,
"F") == 0) {
338 token = strtok(NULL,
" :,%\t");
339 eFieldRes = atoi(token);
341 if (eFieldRes <= 0) {
343 <<
" Number of E fields out of range.\n";
347 token = strtok(NULL,
" :,%\t");
348 angRes = atoi(token);
352 <<
" Number of E-B angles out of range.\n";
357 token = strtok(NULL,
" :,%\t");
358 bFieldRes = atoi(token);
360 if (
m_map2d && bFieldRes <= 0) {
362 <<
" Number of B fields out of range.\n";
373 token = strtok(NULL,
" :,%\t");
374 if (
m_debug) std::cout <<
" " << token <<
"\n";
376 const int nexc = atoi(token);
379 token = strtok(NULL,
" :,%\t");
380 const int nion = atoi(token);
384 std::cout <<
" " << nexc <<
" excitations, "
385 << nion <<
" ionisations.\n";
387 }
else if (strcmp(token,
"E") == 0) {
388 token = strtok(NULL,
" :,%");
389 if (strcmp(token,
"fields") == 0) {
390 for (
int i = 0; i < eFieldRes; ++i) gasfile >>
m_eFields[i];
392 }
else if (strcmp(token,
"E-B") == 0) {
393 token = strtok(NULL,
" :,%");
394 if (strcmp(token,
"angles") == 0) {
395 for (
int i = 0; i < angRes; ++i) gasfile >>
m_bAngles[i];
397 }
else if (strcmp(token,
"B") == 0) {
398 token = strtok(NULL,
" :,%");
399 if (strcmp(token,
"fields") == 0) {
401 for (
int i = 0; i < bFieldRes; i++) {
407 }
else if (strcmp(token,
"Mixture") == 0) {
408 for (
int i = 0; i < nMagboltzGases; ++i) {
409 gasfile >> mixture[i];
411 }
else if (strcmp(token,
"Excitation") == 0) {
413 token = strtok(NULL,
" :,%");
415 token = strtok(NULL,
" :,%");
418 token = strtok(NULL,
" :,%");
421 token = strtok(NULL,
" :,%");
427 token = strtok(NULL,
" :,%");
431 token = strtok(NULL,
" :,%");
437 }
else if (strcmp(token,
"Ionisation") == 0) {
439 token = strtok(NULL,
" :,%");
441 token = strtok(NULL,
" :,%");
444 token = strtok(NULL,
" :,%");
449 token = strtok(NULL,
" :,%");
475 std::cout <<
" GASOK bits: " << gasBits <<
"\n";
478 if (gasBits[0] ==
'T') {
485 if (gasBits[1] ==
'T') {
492 if (gasBits[2] ==
'T') {
499 if (gasBits[3] ==
'T') {
507 if (gasBits[5] ==
'T') {
514 if (gasBits[6] ==
'T') {
521 if (gasBits[7] ==
'T') {
528 if (gasBits[8] ==
'T') {
535 if (gasBits[9] ==
'T') {
542 if (gasBits[10] ==
'T') {
549 if (gasBits[11] ==
'T') {
558 if (gasBits[14] ==
'T') {
567 if (gasBits[15] ==
'T') {
578 std::vector<std::string> gasnames;
579 std::vector<double> percentages;
580 bool gasMixOk =
true;
581 unsigned int gasCount = 0;
582 for (
int i = 0; i < nMagboltzGases; ++i) {
583 if (mixture[i] > 0.) {
584 std::string gasname =
"";
587 std::cerr <<
" Unknown gas (gas number ";
588 std::cerr << i + 1 <<
")\n";
592 gasnames.push_back(gasname);
593 percentages.push_back(mixture[i]);
599 std::cerr <<
" Gas mixture has " << gasCount <<
" components.\n";
600 std::cerr <<
" Number of gases is limited to " <<
m_nMaxGases <<
".\n";
602 }
else if (gasCount == 0) {
604 std::cerr <<
" Gas mixture is not defined (zero components).\n";
608 for (
unsigned int i = 0; i < gasCount; ++i) sum += percentages[i];
609 if (gasMixOk && sum != 100.) {
611 std::cerr <<
" Percentages are not normalized to 100.\n";
612 for (
unsigned int i = 0; i < gasCount; ++i) percentages[i] *= 100. / sum;
624 m_gas[i] = gasnames[i];
629 std::cout <<
" Gas composition set to " <<
m_name;
640 std::cerr <<
" Gas composition could not be established.\n";
645 std::cout <<
" Reading gas tables.\n";
650 double ve = 0., vb = 0., vexb = 0.;
654 double dl = 0., dt = 0.;
656 double alpha = 0., alpha0 = 0., eta = 0.;
658 double mu = 0., diss = 0.;
659 double ionDiffLong = 0., ionDiffTrans = 0.;
667 std::cout <<
" Gas table is 3D.\n";
669 for (
int i = 0; i < eFieldRes; i++) {
670 for (
int j = 0; j < angRes; j++) {
671 for (
int k = 0; k < bFieldRes; k++) {
673 gasfile >> ve >> vb >> vexb;
686 gasfile >> alpha >> alpha0 >> eta;
706 for (
int l = 0; l < 6; l++) {
712 for (
unsigned int l = 0; l < nexc; ++l) {
718 for (
unsigned int l = 0; l < nion; ++l) {
728 std::cout <<
" Gas table is 1D.\n";
730 for (
int i = 0; i < eFieldRes; i++) {
731 if (
m_debug) std::cout <<
" Done table: " << i <<
"\n";
733 gasfile >> ve >> waste >> vb >> waste >> vexb >> waste;
741 gasfile >> dl >> waste >> dt >> waste;
745 gasfile >> alpha >> waste >> alpha0 >> eta >> waste;
754 gasfile >> mu >> waste;
758 gasfile >> lor >> waste;
761 gasfile >> diss >> waste;
764 for (
int j = 0; j < 6; j++) {
765 gasfile >> diff >> waste;
770 for (
unsigned int j = 0; j < nexc; ++j) {
771 gasfile >> rate >> waste;
776 for (
unsigned int j = 0; j < nion; ++j) {
777 gasfile >> rate >> waste;
782 if (
m_debug) std::cout <<
" Done with gas tables.\n";
785 int hExtrap[13], lExtrap[13];
792 gasfile.getline(line, 256);
793 token = strtok(line,
" :,%=\t");
794 while (token != NULL) {
795 if (strcmp(token,
"H") == 0) {
796 token = strtok(NULL,
" :,%=\t");
797 for (
int i = 0; i < 13; i++) {
798 token = strtok(NULL,
" :,%=\t");
799 if (token != NULL) hExtrap[i] = atoi(token);
801 }
else if (strcmp(token,
"L") == 0) {
802 token = strtok(NULL,
" :,%=\t");
803 for (
int i = 0; i < 13; i++) {
804 token = strtok(NULL,
" :,%=\t");
805 if (token != NULL) lExtrap[i] = atoi(token);
807 }
else if (strcmp(token,
"Thresholds") == 0) {
808 token = strtok(NULL,
" :,%=\t");
810 token = strtok(NULL,
" :,%=\t");
812 token = strtok(NULL,
" :,%=\t");
814 }
else if (strcmp(token,
"Interp") == 0) {
815 for (
int i = 0; i < 13; i++) {
816 token = strtok(NULL,
" :,%=\t");
817 if (token != NULL) interpMeth[i] = atoi(token);
819 }
else if (strcmp(token,
"A") == 0) {
820 token = strtok(NULL,
" :,%=\t");
824 }
else if (strcmp(token,
"Z") == 0) {
826 token = strtok(NULL,
" :,%=\t");
829 }
else if (strcmp(token,
"EMPROB") == 0) {
831 token = strtok(NULL,
" :,%=\t");
834 }
else if (strcmp(token,
"EPAIR") == 0) {
836 token = strtok(NULL,
" :,%=\t");
839 }
else if (strcmp(token,
"Ion") == 0) {
841 token = strtok(NULL,
" :,%=\t");
842 token = strtok(NULL,
" :,%=\t");
843 if (token != NULL) ionDiffLong = atof(token);
844 token = strtok(NULL,
" :,%=\t");
845 if (token != NULL) ionDiffTrans = atof(token);
846 }
else if (strcmp(token,
"CMEAN") == 0) {
848 token = strtok(NULL,
" :,%=\t");
851 }
else if (strcmp(token,
"RHO") == 0) {
853 token = strtok(NULL,
" :,%=\t");
856 }
else if (strcmp(token,
"PGAS") == 0) {
857 token = strtok(NULL,
" :,%=\t");
859 if (token != NULL) pTorr = atof(token);
861 }
else if (strcmp(token,
"TGAS") == 0) {
862 token = strtok(NULL,
" :,%=\t");
863 double tKelvin = 293.15;
864 if (token != NULL) tKelvin = atof(token);
872 token = strtok(NULL,
" :,%=\t");
883 for (
int i = eFieldRes; i--;) {
889 for (
int i = eFieldRes; i--;) {
890 for (
int j = angRes; j--;) {
891 for (
int k = bFieldRes; k--;) {
899 for (
int l = 6; l--;) {
949 if (ionDiffLong > 0.) {
952 for (
int i = eFieldRes; i--;) {
953 for (
int j = angRes; j--;) {
954 for (
int k = bFieldRes; k--;) {
963 if (ionDiffTrans > 0.) {
966 for (
int i = eFieldRes; i--;) {
967 for (
int j = angRes; j--;) {
968 for (
int k = bFieldRes; k--;) {
980 std::cout <<
" Gas file sucessfully read.\n";
988 const int nMagboltzGases = 60;
989 std::vector<double> mixture(nMagboltzGases);
990 for (
int i = nMagboltzGases; i--;) mixture[i] = 0.;
996 std::cerr <<
" Error retrieving gas number for gas " <<
m_gas[i]
1003 const unsigned int eFieldRes =
m_eFields.size();
1004 const unsigned int bFieldRes =
m_bFields.size();
1005 const unsigned int angRes =
m_bAngles.size();
1009 std::cout <<
" Writing gas tables to file: " << filename <<
"\n";
1012 std::ofstream outFile;
1013 outFile.open(filename.c_str(), std::ios::out);
1014 if (!outFile.is_open()) {
1016 std::cerr <<
" File could not be opened.\n";
1022 std::string gasBits =
"FFFFFFFFFFFFFFFFFFFF";
1040 time_t rawtime = time(0);
1041 tm timeinfo = *localtime(&rawtime);
1042 char datebuf[80] = {0};
1043 char timebuf[80] = {0};
1045 strftime(datebuf,
sizeof(datebuf) - 1,
"%d/%m/%y", &timeinfo);
1046 strftime(timebuf,
sizeof(timebuf) - 1,
"%H.%M.%S", &timeinfo);
1048 std::string member =
"< none >";
1050 outFile <<
"*----.----1----.----2----.----3----.----4----.----"
1051 <<
"5----.----6----.----7----.----8----.----9----.---"
1052 <<
"10----.---11----.---12----.---13--\n";
1053 outFile <<
"% Created " << datebuf <<
" at " << timebuf <<
" ";
1054 outFile << member <<
" GAS ";
1057 buffer = std::string(25,
' ');
1058 outFile <<
"\"none" << buffer <<
"\"\n";
1059 const int version = 12;
1060 outFile <<
" Version : " << version <<
"\n";
1061 outFile <<
" GASOK bits: " << gasBits <<
"\n";
1062 std::stringstream idStream;
1066 std::string idString = idStream.str();
1067 outFile <<
" Identifier: " << std::setw(80) << std::left << idString <<
"\n";
1068 outFile << std::right;
1069 buffer = std::string(80,
' ');
1070 outFile <<
" Clusters : " << buffer <<
"\n";
1071 outFile <<
" Dimension : ";
1077 outFile << std::setw(9) << eFieldRes <<
" " << std::setw(9) << angRes <<
" "
1078 << std::setw(9) << bFieldRes <<
" "
1081 outFile <<
" E fields \n";
1082 outFile << std::scientific << std::setw(15) << std::setprecision(8);
1083 for (
unsigned int i = 0; i < eFieldRes; ++i) {
1086 if ((i + 1) % 5 == 0) outFile <<
"\n";
1088 if (eFieldRes % 5 != 0) outFile <<
"\n";
1089 outFile <<
" E-B angles \n";
1090 for (
unsigned int i = 0; i < angRes; ++i) {
1092 outFile << std::setw(15) <<
m_bAngles[i];
1093 if ((i + 1) % 5 == 0) outFile <<
"\n";
1095 if (angRes % 5 != 0) outFile <<
"\n";
1096 outFile <<
" B fields \n";
1097 for (
unsigned int i = 0; i < bFieldRes; ++i) {
1100 outFile << std::setw(15) <<
m_bFields[i] * 100.;
1101 if ((i + 1) % 5 == 0) outFile <<
"\n";
1103 if (bFieldRes % 5 != 0) outFile <<
"\n";
1104 outFile <<
" Mixture: \n";
1105 for (
int i = 0; i < nMagboltzGases; i++) {
1107 outFile << std::setw(15) << mixture[i];
1108 if ((i + 1) % 5 == 0) outFile <<
"\n";
1110 if (nMagboltzGases % 5 != 0) outFile <<
"\n";
1112 for (
int i = 0; i < nexc; ++i) {
1113 outFile <<
" Excitation " << std::setw(5) << i + 1 <<
": " << std::setw(45)
1120 for (
int i = 0; i < nion; ++i) {
1121 outFile <<
" Ionisation " << std::setw(5) << i + 1 <<
": " << std::setw(45)
1129 outFile <<
" The gas tables follow:\n";
1131 for (
unsigned int i = 0; i < eFieldRes; ++i) {
1132 for (
unsigned int j = 0; j < angRes; ++j) {
1133 for (
unsigned int k = 0; k < bFieldRes; ++k) {
1134 double ve = 0., vb = 0., vexb = 0.;
1142 double dl = 0., dt = 0.;
1147 double alpha = -30., alpha0 = -30., eta = -30.;
1151 alpha -= logPressure;
1152 alpha0 -= logPressure;
1170 diss -= logPressure;
1173 const double spl = 0.;
1175 outFile << std::setw(15);
1178 if (cnt % 8 == 0) outFile <<
"\n";
1180 outFile << std::setw(15);
1183 if (cnt % 8 == 0) outFile <<
"\n";
1185 outFile << std::setw(15);
1188 if (cnt % 8 == 0) outFile <<
"\n";
1190 outFile << std::setw(15);
1193 if (cnt % 8 == 0) outFile <<
"\n";
1195 outFile << std::setw(15);
1198 if (cnt % 8 == 0) outFile <<
"\n";
1200 outFile << std::setw(15);
1203 if (cnt % 8 == 0) outFile <<
"\n";
1205 outFile << std::setw(15);
1208 if (cnt % 8 == 0) outFile <<
"\n";
1210 outFile << std::setw(15);
1213 if (cnt % 8 == 0) outFile <<
"\n";
1215 outFile << std::setw(15);
1218 if (cnt % 8 == 0) outFile <<
"\n";
1220 outFile << std::setw(15);
1223 if (cnt % 8 == 0) outFile <<
"\n";
1225 outFile << std::setw(15);
1228 if (cnt % 8 == 0) outFile <<
"\n";
1230 outFile << std::setw(15);
1233 if (cnt % 8 == 0) outFile <<
"\n";
1235 outFile << std::setw(15);
1238 if (cnt % 8 == 0) outFile <<
"\n";
1239 outFile << std::setw(15);
1242 if (cnt % 8 == 0) outFile <<
"\n";
1243 outFile << std::setw(15);
1247 if (cnt % 8 == 0) outFile <<
"\n";
1248 outFile << std::setw(15);
1252 if (cnt % 8 == 0) outFile <<
"\n";
1254 outFile << std::setw(15);
1257 if (cnt % 8 == 0) outFile <<
"\n";
1259 outFile << std::setw(15);
1262 if (cnt % 8 == 0) outFile <<
"\n";
1264 outFile << std::setw(15);
1267 if (cnt % 8 == 0) outFile <<
"\n";
1269 outFile << std::setw(15);
1272 if (cnt % 8 == 0) outFile <<
"\n";
1274 outFile << std::setw(15);
1277 if (cnt % 8 == 0) outFile <<
"\n";
1279 outFile << std::setw(15);
1280 for (
int l = 0; l < 6; ++l) {
1286 outFile << std::setw(15);
1289 if (cnt % 8 == 0) outFile <<
"\n";
1291 outFile << std::setw(15) << spl;
1293 if (cnt % 8 == 0) outFile <<
"\n";
1297 for (
int l = 0; l < nexc; ++l) {
1298 outFile << std::setw(15);
1301 if (cnt % 8 == 0) outFile <<
"\n";
1303 outFile << std::setw(15) << spl;
1305 if (cnt % 8 == 0) outFile <<
"\n";
1310 for (
int l = 0; l < nion; ++l) {
1311 outFile << std::setw(15);
1314 if (cnt % 8 == 0) outFile <<
"\n";
1316 outFile << std::setw(15) << spl;
1318 if (cnt % 8 == 0) outFile <<
"\n";
1324 if (cnt % 8 != 0) outFile <<
"\n";
1329 int hExtrap[13], lExtrap[13];
1361 outFile <<
" H Extr: ";
1362 for (
int i = 0; i < 13; i++) {
1363 outFile << std::setw(5) << hExtrap[i];
1366 outFile <<
" L Extr: ";
1367 for (
int i = 0; i < 13; i++) {
1368 outFile << std::setw(5) << lExtrap[i];
1374 outFile <<
" Interp: ";
1375 for (
int i = 0; i < 13; i++) {
1376 outFile << std::setw(5) << interpMeth[i];
1379 outFile <<
" A =" << std::setw(15) << 0. <<
","
1380 <<
" Z =" << std::setw(15) << 0. <<
","
1381 <<
" EMPROB=" << std::setw(15) << 0. <<
","
1382 <<
" EPAIR =" << std::setw(15) << 0. <<
"\n";
1383 double ionDiffLong = 0., ionDiffTrans = 0.;
1386 outFile <<
" Ion diffusion: " << std::setw(15) << ionDiffLong << std::setw(15)
1387 << ionDiffTrans <<
"\n";
1388 outFile <<
" CMEAN =" << std::setw(15) << 0. <<
","
1389 <<
" RHO =" << std::setw(15) << 0. <<
","
1392 outFile <<
" CLSTYP : NOT SET \n";
1393 buffer = std::string(80,
' ');
1394 outFile <<
" FCNCLS : " << buffer <<
"\n";
1395 outFile <<
" NCLS : " << std::setw(10) << 0 <<
"\n";
1396 outFile <<
" Average : " << std::setw(25) << std::setprecision(18) << 0.
1398 outFile <<
" Heed initialisation done: F\n";
1399 outFile <<
" SRIM initialisation done: F\n";
1409 std::cout <<
" Gas composition: " <<
m_name;
1418 std::cout <<
" Pressure: " <<
m_pressure <<
" Torr\n";
1420 std::cout <<
" Gas file:\n";
1424 std::cout <<
" Electric field range: " <<
m_eFields[0] <<
" - "
1428 std::cout <<
" Electric field: " <<
m_eFields[0] <<
" V/cm\n";
1430 std::cout <<
" Electric field range: not set\n";
1433 std::cout <<
" Magnetic field range: " <<
m_bFields[0] <<
" - "
1437 std::cout <<
" Magnetic field: " <<
m_bFields[0] <<
"\n";
1439 std::cout <<
" Magnetic field range: not set\n";
1442 std::cout <<
" Angular range: " <<
m_bAngles[0] <<
" - "
1446 std::cout <<
" Angle between E and B: " <<
m_bAngles[0] <<
"\n";
1448 std::cout <<
" Angular range: not set\n";
1451 std::cout <<
" Available electron transport data:\n";
1453 std::cout <<
" Velocity along E\n";
1456 std::cout <<
" Velocity along Bt\n";
1459 std::cout <<
" Velocity along ExB\n";
1462 std::cout <<
" Low field extrapolation: ";
1464 std::cout <<
" constant\n";
1466 std::cout <<
" linear\n";
1468 std::cout <<
" exponential\n";
1470 std::cout <<
" unknown\n";
1471 std::cout <<
" High field extrapolation: ";
1473 std::cout <<
" constant\n";
1475 std::cout <<
" linear\n";
1477 std::cout <<
" exponential\n";
1479 std::cout <<
" unknown\n";
1483 std::cout <<
" Longitudinal diffusion coefficient\n";
1486 std::cout <<
" Transverse diffusion coefficient\n";
1489 std::cout <<
" Diffusion tensor\n";
1492 std::cout <<
" Low field extrapolation: ";
1494 std::cout <<
" constant\n";
1496 std::cout <<
" linear\n";
1498 std::cout <<
" exponential\n";
1500 std::cout <<
" unknown\n";
1501 std::cout <<
" High field extrapolation: ";
1503 std::cout <<
" constant\n";
1505 std::cout <<
" linear\n";
1507 std::cout <<
" exponential\n";
1509 std::cout <<
" unknown\n";
1513 std::cout <<
" Townsend coefficient\n";
1514 std::cout <<
" Low field extrapolation: ";
1516 std::cout <<
" constant\n";
1518 std::cout <<
" linear\n";
1520 std::cout <<
" exponential\n";
1522 std::cout <<
" unknown\n";
1523 std::cout <<
" High field extrapolation: ";
1525 std::cout <<
" constant\n";
1527 std::cout <<
" linear\n";
1529 std::cout <<
" exponential\n";
1531 std::cout <<
" unknown\n";
1535 std::cout <<
" Attachment coefficient\n";
1536 std::cout <<
" Low field extrapolation: ";
1538 std::cout <<
" constant\n";
1540 std::cout <<
" linear\n";
1542 std::cout <<
" exponential\n";
1544 std::cout <<
" unknown\n";
1545 std::cout <<
" High field extrapolation: ";
1547 std::cout <<
" constant\n";
1549 std::cout <<
" linear\n";
1551 std::cout <<
" exponential\n";
1553 std::cout <<
" unknown\n";
1557 std::cout <<
" Lorentz Angle\n";
1558 std::cout <<
" Low field extrapolation: ";
1560 std::cout <<
" constant\n";
1562 std::cout <<
" linear\n";
1564 std::cout <<
" exponential\n";
1566 std::cout <<
" unknown\n";
1567 std::cout <<
" High field extrapolation: ";
1569 std::cout <<
" constant\n";
1571 std::cout <<
" linear\n";
1573 std::cout <<
" exponential\n";
1575 std::cout <<
" unknown\n";
1579 std::cout <<
" Excitation rates\n";
1580 std::cout <<
" Low field extrapolation: ";
1582 std::cout <<
" constant\n";
1584 std::cout <<
" linear\n";
1586 std::cout <<
" exponential\n";
1588 std::cout <<
" unknown\n";
1589 std::cout <<
" High field extrapolation: ";
1591 std::cout <<
" constant\n";
1593 std::cout <<
" linear\n";
1595 std::cout <<
" exponential\n";
1597 std::cout <<
" unknown\n";
1601 std::cout <<
" Ionisation rates\n";
1602 std::cout <<
" Low field extrapolation: ";
1604 std::cout <<
" constant\n";
1606 std::cout <<
" linear\n";
1608 std::cout <<
" exponential\n";
1610 std::cout <<
" unknown\n";
1611 std::cout <<
" High field extrapolation: ";
1613 std::cout <<
" constant\n";
1615 std::cout <<
" linear\n";
1617 std::cout <<
" exponential\n";
1619 std::cout <<
" unknown\n";
1626 std::cout <<
" none\n";
1629 std::cout <<
" Available ion transport data:\n";
1631 std::cout <<
" Mobility\n";
1632 std::cout <<
" Low field extrapolation: ";
1634 std::cout <<
" constant\n";
1636 std::cout <<
" linear\n";
1638 std::cout <<
" exponential\n";
1640 std::cout <<
" unknown\n";
1641 std::cout <<
" High field extrapolation: ";
1643 std::cout <<
" constant\n";
1645 std::cout <<
" linear\n";
1647 std::cout <<
" exponential\n";
1649 std::cout <<
" unknown\n";
1653 std::cout <<
" Longitudinal diffusion coefficient\n";
1656 std::cout <<
" Transverse diffusion coefficient\n";
1659 std::cout <<
" Low field extrapolation: ";
1661 std::cout <<
" constant\n";
1663 std::cout <<
" linear\n";
1665 std::cout <<
" exponential\n";
1667 std::cout <<
" unknown\n";
1668 std::cout <<
" High field extrapolation: ";
1670 std::cout <<
" constant\n";
1672 std::cout <<
" linear\n";
1674 std::cout <<
" exponential\n";
1676 std::cout <<
" unknown\n";
1680 std::cout <<
" Dissociation coefficient\n";
1681 std::cout <<
" Low field extrapolation: ";
1683 std::cout <<
" constant\n";
1685 std::cout <<
" linear\n";
1687 std::cout <<
" exponential\n";
1689 std::cout <<
" unknown\n";
1690 std::cout <<
" High field extrapolation: ";
1692 std::cout <<
" constant\n";
1694 std::cout <<
" linear\n";
1696 std::cout <<
" exponential\n";
1698 std::cout <<
" unknown\n";
1703 std::cout <<
" none\n";
1710 std::ifstream infile;
1711 infile.open(filename.c_str(), std::ios::in);
1714 std::cerr <<
m_className <<
"::LoadIonMobility:\n"
1715 <<
" Error opening file " << filename <<
".\n";;
1719 double field = -1., mu = -1.;
1720 double lastField = field;
1721 std::vector<double> efields;
1722 std::vector<double> mobilities;
1728 while (!infile.eof()) {
1731 infile.getline(line, 100);
1734 token = strtok(line,
" ,\t");
1737 }
else if (strcmp(token,
"#") == 0 || strcmp(token,
"*") == 0 ||
1738 strcmp(token,
"//") == 0) {
1741 field = atof(token);
1742 token = strtok(NULL,
" ,\t");
1744 std::cerr <<
m_className <<
"::LoadIonMobility:\n"
1745 <<
" Found E/N but no mobility before the end-of-line.\n"
1746 <<
" Skipping line " << i <<
".\n";
1751 token = strtok(NULL,
" ,\t");
1752 if (token && strcmp(token,
"//") != 0) {
1753 std::cerr <<
m_className <<
"::LoadIonMobility:\n"
1754 <<
" Unexpected non-comment characters after the mobility.\n"
1755 <<
" Skipping line " << i <<
".\n";
1759 std::cout <<
" E/N = " << field <<
" Td: mu = " << mu <<
" cm2/(Vs)\n";
1762 if (infile.fail() && !infile.eof()) {
1763 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1764 std::cerr <<
" Error reading file\n";
1765 std::cerr <<
" " << filename <<
" (line " << i <<
").\n";
1771 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1772 std::cerr <<
" Negative electric field (line " << i <<
").\n";
1776 if (field <= lastField) {
1777 std::cerr <<
m_className <<
"::LoadIonMobility:\n";
1778 std::cerr <<
" Table is not in ascending order (line " << i <<
").\n";
1782 efields.push_back(field);
1783 mobilities.push_back(mu);
1787 const int ne = efields.size();
1789 std::cerr <<
m_className <<
"::LoadIonMobilities:\n";
1790 std::cerr <<
" No valid data found.\n";
1797 const double scaleMobility =
1799 for (
int j = ne; j--;) {
1801 efields[j] *= scaleField;
1802 mobilities[j] *= scaleMobility;
1805 std::cout <<
m_className <<
"::LoadIonMobility:\n";
1806 std::cout <<
" Read " << ne <<
" values from file " << filename <<
"\n";
1812 const std::string& extrLow,
const std::string& extrHigh) {
1814 unsigned int iExtr = 0;
1818 std::cerr <<
m_className <<
"::SetExtrapolationMethodExcitationRates:\n";
1819 std::cerr <<
" Unknown extrapolation method (" << extrLow <<
")\n";
1824 std::cerr <<
m_className <<
"::SetExtrapolationMethodExcitationRates:\n";
1825 std::cerr <<
" Unknown extrapolation method (" << extrHigh <<
")\n";
1830 const std::string& extrLow,
const std::string& extrHigh) {
1832 unsigned int iExtr = 0;
1836 std::cerr <<
m_className <<
"::SetExtrapolationMethodIonisationRates:\n";
1837 std::cerr <<
" Unknown extrapolation method (" << extrLow <<
")\n";
1842 std::cerr <<
m_className <<
"::SetExtrapolationMethodIonisationRates:\n";
1843 std::cerr <<
" Unknown extrapolation method (" << extrHigh <<
")\n";
1864 if (gasname ==
"CF4") {
1865 a = 12.0107 + 4 * 18.9984032;
1868 }
else if (gasname ==
"Ar") {
1871 }
else if (gasname ==
"He") {
1874 }
else if (gasname ==
"He-3") {
1877 }
else if (gasname ==
"Ne") {
1880 }
else if (gasname ==
"Kr") {
1883 }
else if (gasname ==
"Xe") {
1886 }
else if (gasname ==
"CH4") {
1887 a = 12.0107 + 4 * 1.00794;
1889 }
else if (gasname ==
"C2H6") {
1890 a = 2 * 12.0107 + 6 * 1.00794;
1892 }
else if (gasname ==
"C3H8") {
1893 a = 3 * 12.0107 + 8 * 1.00794;
1895 }
else if (gasname ==
"iC4H10") {
1896 a = 4 * 12.0107 + 10 * 1.00794;
1898 }
else if (gasname ==
"CO2") {
1899 a = 12.0107 + 2 * 15.9994;
1901 }
else if (gasname ==
"neoC5H12") {
1902 a = 5 * 12.0107 + 12 * 1.00794;
1904 }
else if (gasname ==
"H2O") {
1905 a = 2 * 1.00794 + 15.9994;
1907 }
else if (gasname ==
"O2") {
1910 }
else if (gasname ==
"N2") {
1913 }
else if (gasname ==
"NO") {
1914 a = 14.0067 + 15.9994;
1916 }
else if (gasname ==
"N2O") {
1917 a = 2 * 14.0067 + 15.9994;
1919 }
else if (gasname ==
"C2H4") {
1920 a = 2 * 12.0107 + 4 * 1.00794;
1922 }
else if (gasname ==
"C2H2") {
1923 a = 2 * 12.0107 + 2 * 1.00794;
1925 }
else if (gasname ==
"H2") {
1928 }
else if (gasname ==
"D2") {
1929 a = 2 * 2.01410177785;
1931 }
else if (gasname ==
"CO") {
1932 a = 12.0107 + 15.9994;
1934 }
else if (gasname ==
"Methylal") {
1935 a = 3 * 12.0107 + 8 * 1.00794 + 2 * 15.9994;
1936 z = 3 * 6 + 8 + 2 * 8;
1937 }
else if (gasname ==
"DME") {
1938 a = 4 * 12.0107 + 10 * 1.00794 + 2 * 15.9994;
1939 z = 4 * 6 + 10 + 2 * 8;
1940 }
else if (gasname ==
"Reid-Step" || gasname ==
"Mawell-Model" ||
1941 gasname ==
"Reid-Ramp") {
1944 }
else if (gasname ==
"C2F6") {
1945 a = 2 * 12.0107 + 6 * 18.9984032;
1947 }
else if (gasname ==
"SF6") {
1948 a = 32.065 + 6 * 18.9984032;
1950 }
else if (gasname ==
"NH3") {
1951 a = 14.0067 + 3 * 1.00794;
1953 }
else if (gasname ==
"C3H6") {
1954 a = 3 * 12.0107 + 6 * 1.00794;
1956 }
else if (gasname ==
"cC3H6") {
1957 a = 3 * 12.0107 + 6 * 1.00794;
1959 }
else if (gasname ==
"CH3OH") {
1960 a = 12.0107 + 4 * 1.00794 + 15.9994;
1962 }
else if (gasname ==
"C2H5OH") {
1963 a = 2 * 12.0107 + 6 * 1.00794 + 15.9994;
1965 }
else if (gasname ==
"C3H7OH") {
1966 a = 3 * 12.0107 + 8 * 1.00794 + 15.9994;
1968 }
else if (gasname ==
"Cs") {
1971 }
else if (gasname ==
"F2") {
1974 }
else if (gasname ==
"CS2") {
1975 a = 12.0107 + 2 * 32.065;
1977 }
else if (gasname ==
"COS") {
1978 a = 12.0107 + 15.9994 + 32.065;
1980 }
else if (gasname ==
"CD4") {
1981 a = 12.0107 + 4 * 2.01410177785;
1983 }
else if (gasname ==
"BF3") {
1984 a = 10.811 + 3 * 18.9984032;
1986 }
else if (gasname ==
"C2H2F4") {
1987 a = 2 * 12.0107 + 2 * 1.00794 + 4 * 18.9984032;
1988 z = 2 * 6 + 2 + 4 * 9;
1989 }
else if (gasname ==
"CHF3") {
1990 a = 12.0107 + 1.00794 + 3 * 18.9984032;
1992 }
else if (gasname ==
"CF3Br") {
1993 a = 12.0107 + 3 * 18.9984032 + 79.904;
1995 }
else if (gasname ==
"C3F8") {
1996 a = 3 * 12.0107 + 8 * 18.9984032;
1998 }
else if (gasname ==
"O3") {
2001 }
else if (gasname ==
"Hg") {
2004 }
else if (gasname ==
"H2S") {
2005 a = 2 * 1.00794 + 32.065;
2007 }
else if (gasname ==
"nC4H10") {
2008 a = 4 * 12.0107 + 10 * 1.00794;
2010 }
else if (gasname ==
"nC5H12") {
2011 a = 5 * 12.0107 + 12 * 1.00794;
2013 }
else if (gasname ==
"N2") {
2016 }
else if (gasname ==
"GeH4") {
2017 a = 72.64 + 4 * 1.00794;
2019 }
else if (gasname ==
"SiH4") {
2020 a = 28.0855 + 4 * 1.00794;
2032 std::string& gasname) {
2034 switch (gasnumber) {
2072 gasname =
"neoC5H12";
2105 gasname =
"Methylal";
2111 gasname =
"Reid-Step";
2114 gasname =
"Maxwell-Model";
2117 gasname =
"Reid-Ramp";
2165 if (version <= 11) {
2230 for (
unsigned int i = 0; i < input.length(); ++i) {
2231 input[i] = toupper(input[i]);
2236 if (input ==
"")
return false;
2239 if (input ==
"CF4" || input ==
"FREON" || input ==
"FREON-14" ||
2240 input ==
"TETRAFLUOROMETHANE") {
2245 if (input ==
"AR" || input ==
"ARGON") {
2250 if (input ==
"HE" || input ==
"HELIUM" || input ==
"HE-4" ||
2251 input ==
"HE 4" || input ==
"HE4" || input ==
"4-HE" || input ==
"4 HE" ||
2252 input ==
"4HE" || input ==
"HELIUM-4" || input ==
"HELIUM 4" ||
2253 input ==
"HELIUM4") {
2258 if (input ==
"HE-3" || input ==
"HE3" || input ==
"HELIUM-3" ||
2259 input ==
"HELIUM 3" || input ==
"HELIUM3") {
2264 if (input ==
"NE" || input ==
"NEON") {
2269 if (input ==
"KR" || input ==
"KRYPTON") {
2274 if (input ==
"XE" || input ==
"XENON") {
2279 if (input ==
"CH4" || input ==
"METHANE") {
2284 if (input ==
"C2H6" || input ==
"ETHANE") {
2289 if (input ==
"C3H8" || input ==
"PROPANE") {
2294 if (input ==
"C4H10" || input ==
"ISOBUTANE" || input ==
"ISO" ||
2295 input ==
"IC4H10" || input ==
"ISO-C4H10" || input ==
"ISOC4H10") {
2300 if (input ==
"CO2" || input ==
"CARBON-DIOXIDE" ||
2301 input ==
"CARBON DIOXIDE" || input ==
"CARBONDIOXIDE") {
2306 if (input ==
"NEOPENTANE" || input ==
"NEO-PENTANE" || input ==
"NEO-C5H12" ||
2307 input ==
"NEOC5H12" || input ==
"DIMETHYLPROPANE" || input ==
"C5H12") {
2308 gasname =
"neoC5H12";
2312 if (input ==
"H2O" || input ==
"WATER" || input ==
"WATER-VAPOUR" ||
2313 input ==
"WATER VAPOUR") {
2318 if (input ==
"O2" || input ==
"OXYGEN") {
2323 if (input ==
"NI" || input ==
"NITRO" || input ==
"N2" ||
2324 input ==
"NITROGEN") {
2329 if (input ==
"NO" || input ==
"NITRIC-OXIDE" || input ==
"NITRIC OXIDE" ||
2330 input ==
"NITROGEN-MONOXIDE" || input ==
"NITROGEN MONOXIDE") {
2335 if (input ==
"N2O" || input ==
"NITROUS-OXIDE" || input ==
"NITROUS OXIDE" ||
2336 input ==
"DINITROGEN-MONOXIDE" || input ==
"LAUGHING-GAS") {
2341 if (input ==
"C2H4" || input ==
"ETHENE" || input ==
"ETHYLENE") {
2346 if (input ==
"C2H2" || input ==
"ACETYL" || input ==
"ACETYLENE" ||
2347 input ==
"ETHYNE") {
2352 if (input ==
"H2" || input ==
"HYDROGEN") {
2357 if (input ==
"D2" || input ==
"DEUTERIUM") {
2362 if (input ==
"CO" || input ==
"CARBON-MONOXIDE" ||
2363 input ==
"CARBON MONOXIDE") {
2368 if (input ==
"METHYLAL" || input ==
"METHYLAL-HOT" || input ==
"DMM" ||
2369 input ==
"DIMETHOXYMETHANE" || input ==
"FORMAL" || input ==
"C3H8O2") {
2370 gasname =
"Methylal";
2374 if (input ==
"DME" || input ==
"DIMETHYL-ETHER" || input ==
"DIMETHYLETHER" ||
2375 input ==
"DIMETHYL ETHER" || input ==
"METHYL ETHER" ||
2376 input ==
"METHYL-ETHER" || input ==
"METHYLETHER" ||
2377 input ==
"WOOD-ETHER" || input ==
"WOODETHER" || input ==
"WOOD ETHER" ||
2378 input ==
"DIMETHYL OXIDE" || input ==
"DIMETHYL-OXIDE" ||
2379 input ==
"DEMEON" || input ==
"METHOXYMETHANE" || input ==
"C4H10O2") {
2384 if (input ==
"REID-STEP") {
2385 gasname =
"Reid-Step";
2389 if (input ==
"MAXWELL-MODEL") {
2390 gasname =
"Maxwell-Model";
2394 if (input ==
"REID-RAMP") {
2395 gasname =
"Reid-Ramp";
2399 if (input ==
"C2F6" || input ==
"FREON-116" || input ==
"ZYRON-116" ||
2400 input ==
"ZYRON-116-N5" || input ==
"HEXAFLUOROETHANE") {
2405 if (input ==
"SF6" || input ==
"SULPHUR-HEXAFLUORIDE" ||
2406 input ==
"SULFUR-HEXAFLUORIDE" || input ==
"SULPHUR HEXAFLUORIDE" ||
2407 input ==
"SULFUR HEXAFLUORIDE") {
2412 if (input ==
"NH3" || input ==
"AMMONIA") {
2417 if (input ==
"C3H6" || input ==
"PROPENE" || input ==
"PROPYLENE") {
2422 if (input ==
"C-PROPANE" || input ==
"CYCLO-PROPANE" ||
2423 input ==
"CYCLO PROPANE" || input ==
"CYCLOPROPANE" ||
2424 input ==
"C-C3H6" || input ==
"CC3H6" || input ==
"CYCLO-C3H6") {
2429 if (input ==
"METHANOL" || input ==
"METHYL-ALCOHOL" ||
2430 input ==
"METHYL ALCOHOL" || input ==
"WOOD ALCOHOL" ||
2431 input ==
"WOOD-ALCOHOL" || input ==
"CH3OH") {
2436 if (input ==
"ETHANOL" || input ==
"ETHYL-ALCOHOL" ||
2437 input ==
"ETHYL ALCOHOL" || input ==
"GRAIN ALCOHOL" ||
2438 input ==
"GRAIN-ALCOHOL" || input ==
"C2H5OH") {
2443 if (input ==
"PROPANOL" || input ==
"2-PROPANOL" || input ==
"ISOPROPYL" ||
2444 input ==
"ISO-PROPANOL" || input ==
"ISOPROPANOL" ||
2445 input ==
"ISOPROPYL ALCOHOL" || input ==
"ISOPROPYL-ALCOHOL" ||
2446 input ==
"C3H7OH") {
2451 if (input ==
"CS" || input ==
"CESIUM" || input ==
"CAESIUM") {
2456 if (input ==
"F2" || input ==
"FLUOR" || input ==
"FLUORINE") {
2461 if (input ==
"CS2" || input ==
"CARBON-DISULPHIDE" ||
2462 input ==
"CARBON-DISULFIDE" || input ==
"CARBON DISULPHIDE" ||
2463 input ==
"CARBON DISULFIDE") {
2468 if (input ==
"COS" || input ==
"CARBONYL-SULPHIDE" ||
2469 input ==
"CARBONYL-SULFIDE" || input ==
"CARBONYL SULFIDE") {
2474 if (input ==
"DEUT-METHANE" || input ==
"DEUTERIUM-METHANE" ||
2475 input ==
"DEUTERATED-METHANE" || input ==
"DEUTERATED METHANE" ||
2476 input ==
"DEUTERIUM METHANE" || input ==
"CD4") {
2481 if (input ==
"BF3" || input ==
"BORON-TRIFLUORIDE" ||
2482 input ==
"BORON TRIFLUORIDE") {
2487 if (input ==
"C2HF5" || input ==
"C2H2F4" || input ==
"C2F5H" ||
2488 input ==
"C2F4H2" || input ==
"FREON 134" || input ==
"FREON 134A" ||
2489 input ==
"FREON-134" || input ==
"FREON-134-A" || input ==
"FREON 125" ||
2490 input ==
"ZYRON 125" || input ==
"FREON-125" || input ==
"ZYRON-125" ||
2491 input ==
"TETRAFLUOROETHANE" || input ==
"PENTAFLUOROETHANE") {
2496 if (input ==
"TMA" || input ==
"TRIMETHYLAMINE" || input ==
"N(CH3)3" ||
2497 input ==
"N-(CH3)3") {
2502 if (input ==
"CHF3" || input ==
"FREON-23" || input ==
"TRIFLUOROMETHANE" ||
2503 input ==
"FLUOROFORM") {
2508 if (input ==
"CF3BR" || input ==
"TRIFLUOROBROMOMETHANE" ||
2509 input ==
"BROMOTRIFLUOROMETHANE" || input ==
"HALON-1301" ||
2510 input ==
"HALON 1301" || input ==
"FREON-13B1" || input ==
"FREON 13BI") {
2515 if (input ==
"C3F8" || input ==
"OCTAFLUOROPROPANE" || input ==
"R218" ||
2516 input ==
"R-218" || input ==
"FREON 218" || input ==
"FREON-218" ||
2517 input ==
"PERFLUOROPROPANE" || input ==
"RC 218" || input ==
"PFC 218" ||
2518 input ==
"RC-218" || input ==
"PFC-218" || input ==
"FLUTEC PP30" ||
2519 input ==
"GENETRON 218") {
2524 if (input ==
"OZONE" || input ==
"O3") {
2529 if (input ==
"MERCURY" || input ==
"HG" || input ==
"HG2") {
2534 if (input ==
"H2S" || input ==
"HYDROGEN SULPHIDE" || input ==
"SEWER GAS" ||
2535 input ==
"HYDROGEN-SULPHIDE" || input ==
"SEWER-GAS" ||
2536 input ==
"HYDROGEN SULFIDE" || input ==
"HEPATIC ACID" ||
2537 input ==
"HYDROGEN-SULFIDE" || input ==
"HEPATIC-ACID" ||
2538 input ==
"SULFUR HYDRIDE" || input ==
"DIHYDROGEN MONOSULFIDE" ||
2539 input ==
"SULFUR-HYDRIDE" || input ==
"DIHYDROGEN-MONOSULFIDE" ||
2540 input ==
"DIHYDROGEN MONOSULPHIDE" || input ==
"SULPHUR HYDRIDE" ||
2541 input ==
"DIHYDROGEN-MONOSULPHIDE" || input ==
"SULPHUR-HYDRIDE" ||
2542 input ==
"STINK DAMP" || input ==
"SULFURATED HYDROGEN" ||
2543 input ==
"STINK-DAMP" || input ==
"SULFURATED-HYDROGEN") {
2548 if (input ==
"N-BUTANE" || input ==
"N-C4H10" || input ==
"NBUTANE" ||
2549 input ==
"NC4H10") {
2554 if (input ==
"N-PENTANE" || input ==
"N-C5H12" || input ==
"NPENTANE" ||
2555 input ==
"NC5H12") {
2560 if (input ==
"NI-PHELPS" || input ==
"NI PHELPS" ||
2561 input ==
"NITROGEN-PHELPS" || input ==
"NITROGEN PHELPHS" ||
2562 input ==
"N2-PHELPS" || input ==
"N2 PHELPS" || input ==
"N2 (PHELPS)") {
2563 gasname =
"N2 (Phelps)";
2567 if (input ==
"GERMANE" || input ==
"GERM" || input ==
"GERMANIUM-HYDRIDE" ||
2568 input ==
"GERMANIUM HYDRIDE" || input ==
"GERMANIUM TETRAHYDRIDE" ||
2569 input ==
"GERMANIUM-TETRAHYDRIDE" || input ==
"GERMANOMETHANE" ||
2570 input ==
"MONOGERMANE" || input ==
"GEH4") {
2575 if (input ==
"SILANE" || input ==
"SIL" || input ==
"SILICON-HYDRIDE" ||
2576 input ==
"SILICON HYDRIDE" || input ==
"SILICON-TETRAHYDRIDE" ||
2577 input ==
"SILICANE" || input ==
"MONOSILANE" || input ==
"SIH4") {
2583 std::cerr <<
" Gas " << input <<
" is not defined.\n";
2588 int& number)
const {
2596 if (input ==
"CF4") {
2601 if (input ==
"Ar") {
2606 if (input ==
"He" || input ==
"He-4") {
2611 if (input ==
"He-3") {
2616 if (input ==
"Ne") {
2621 if (input ==
"Kr") {
2626 if (input ==
"Xe") {
2631 if (input ==
"CH4") {
2636 if (input ==
"C2H6") {
2641 if (input ==
"C3H8") {
2646 if (input ==
"iC4H10") {
2651 if (input ==
"CO2") {
2656 if (input ==
"neoC5H12") {
2661 if (input ==
"H2O") {
2666 if (input ==
"O2") {
2671 if (input ==
"N2") {
2676 if (input ==
"NO") {
2681 if (input ==
"N2O") {
2686 if (input ==
"C2H4") {
2691 if (input ==
"C2H2") {
2696 if (input ==
"H2") {
2701 if (input ==
"D2") {
2706 if (input ==
"CO") {
2711 if (input ==
"Methylal") {
2716 if (input ==
"DME") {
2721 if (input ==
"Reid-Step") {
2726 if (input ==
"Maxwell-Model") {
2731 if (input ==
"Reid-Ramp") {
2736 if (input ==
"C2F6") {
2741 if (input ==
"SF6") {
2746 if (input ==
"NH3") {
2751 if (input ==
"C3H6") {
2756 if (input ==
"cC3H6") {
2761 if (input ==
"CH3OH") {
2766 if (input ==
"C2H5OH") {
2771 if (input ==
"C3H7OH") {
2776 if (input ==
"Cs") {
2781 if (input ==
"F2") {
2786 if (input ==
"CS2") {
2791 if (input ==
"COS") {
2796 if (input ==
"CD4") {
2801 if (input ==
"BF3") {
2806 if (input ==
"C2HF5" || input ==
"C2H2F4") {
2811 if (input ==
"TMA") {
2816 if (input ==
"CHF3") {
2821 if (input ==
"CF3Br") {
2826 if (input ==
"C3F8") {
2831 if (input ==
"O3") {
2836 if (input ==
"Hg") {
2841 if (input ==
"H2S") {
2846 if (input ==
"nC4H10") {
2851 if (input ==
"nC5H12") {
2856 if (input ==
"N2 (Phelps)") {
2861 if (input ==
"GeH4") {
2866 if (input ==
"SiH4") {
2871 std::cerr <<
m_className <<
"::GetGasNumberGasFile:\n";
2872 std::cerr <<
" Gas " << input <<
" is not defined.\n";
2877 const unsigned int& i) {
2880 std::cerr <<
m_className <<
"::GetPhotoabsorptionCrossSection:\n";
2881 std::cerr <<
" Index (" << i <<
") out of range.\n";
void GetComponent(const unsigned int i, std::string &label, double &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< excListElement > m_excitationList
void SetAtomicNumber(const double z)
std::string m_gas[m_nMaxGases]
bool GetGasInfo(const std::string &gasname, double &a, double &z) const
void SetExtrapolationMethodExcitationRates(const std::string &extrLow, const std::string &extrHigh)
double GetMassDensity() const
bool GetGasNumberGasFile(const std::string &input, int &number) const
bool LoadIonMobility(const std::string &filename)
bool GetGasName(const int gasnumber, const int version, std::string &gasname)
double m_rPenningGas[m_nMaxGases]
double m_atNum[m_nMaxGases]
std::vector< std::vector< std::vector< double > > > m_tabTownsendNoPenning
double m_temperatureTable
unsigned int m_intpExcRates
std::vector< std::vector< std::vector< std::vector< double > > > > m_tabIonRates
unsigned int m_extrHighExcRates
double m_atWeight[m_nMaxGases]
static const unsigned int m_nMaxGases
bool WriteGasFile(const std::string &filename)
double GetAtomicNumber() const
void SetNumberDensity(const double n)
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.)
void SetAtomicWeight(const double a)
void SetInterpolationMethodIonisationRates(const int intrp)
bool GetPhotoabsorptionCrossSection(const double &e, double &sigma, const unsigned int &i)
double m_fraction[m_nMaxGases]
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
std::vector< ionListElement > m_ionisationList
std::vector< std::vector< std::vector< std::vector< double > > > > m_tabExcRates
double m_lambdaPenningGas[m_nMaxGases]
void SetExtrapolationMethodIonisationRates(const std::string &extrLow, const std::string &extrHigh)
void SetMassDensity(const double rho)
Abstract base class for media.
bool m_hasElectronDiffTens
bool SetIonMobility(const unsigned int ie, const unsigned int ib, const unsigned int ia, const double mu)
unsigned int m_extrLowMobility
std::vector< double > m_bFields
unsigned int m_intpDiffusion
unsigned int m_extrLowDiffusion
bool m_hasElectronDiffTrans
unsigned int m_extrLowLorentzAngle
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< 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
unsigned int m_extrHighDissociation
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_intpVelocity
std::vector< std::vector< std::vector< double > > > tabElectronDiffLong
std::vector< std::vector< std::vector< double > > > tabElectronLorentzAngle
unsigned int m_extrHighLorentzAngle
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< double > m_eFields
std::vector< std::vector< std::vector< double > > > tabIonDiffTrans
unsigned int m_extrLowDissociation
std::vector< std::vector< std::vector< std::vector< double > > > > tabElectronDiffTens
std::vector< double > m_bAngles
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_hasElectronVelocityExB
std::vector< std::vector< std::vector< double > > > tabIonMobility
bool m_hasElectronLorentzAngle
int thrElectronAttachment
bool m_hasElectronDiffLong
virtual void EnablePrimaryIonisation()
unsigned int m_intpLorentzAngle
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
Photoabsorption cross-sections for some gases.
bool GetPhotoabsorptionCrossSection(const std::string material, const double e, double &cs, double &eta)
bool IsAvailable(const std::string material) const