#include #include "Garfield/MediumMagboltz.hh" #include "Garfield/FundamentalConstants.hh" using namespace Garfield; int main(int argc, char * argv[]) { const double pressure = 500; const double temperature = 293.15; // Setup the gas. MediumMagboltz gas; gas.SetComposition("He"); gas.SetTemperature(temperature); gas.SetPressure(pressure); // Set the field range to be covered by the gas table. const size_t nE = 11; const double emin = 150.; const double emax = 1250.; // Flag to request logarithmic spacing. constexpr bool useLog = false; // gas.SetFieldGrid(emin, emax, nE, useLog, 0., 0., 1, 0., 0., 1); gas.SetFieldGrid(emin, emax, nE, useLog); const int ncoll = 10; // Run Magboltz to generate the gas table. gas.GenerateGasTable(ncoll); // Save the table. gas.WriteGasFile("he.gas"); }