#include #include #include #include #include #include "Garfield/ViewFEMesh.hh" //#include "Garfield/SolidTube.hh" //#include "Garfield/ViewGeometry.hh" //#include "Garfield/GeometrySimple.hh" //#include "Garfield/ComponentFieldMap.hh" #include "Garfield/ComponentComsol.hh" #include "Garfield/ViewField.hh" #include "Garfield/ViewMedium.hh" #include "Garfield/MediumMagboltz.hh" #include "Garfield/Sensor.hh" #include "Garfield/AvalancheMicroscopic.hh" #include "Garfield/AvalancheMC.hh" #include "Garfield/Random.hh" #include "Garfield/Plotting.hh" //#include //#include #include #include //#include //#include using namespace Garfield; int main(int argc, char * argv[]) { const std::string GAS_CHEMICAL_COMPOSITION = "ar"; //e.g "c3h8", "n2", "ar"... const double GAS_PRESSURE = 1.00; //Torr const double GAS_TEMPERATURE = 293.15; //K Default 293.15 K const std::string INPUT_PATH_GAS_FILE = "gas_files_argon/ar-1torr-293.15K-emin1-emax1000-setFieldGrid6-GenerateGasTable5.gas"; // Gas setup const std::string path = getenv("GARFIELD_HOME"); MediumMagboltz* gas = new MediumMagboltz(); gas->SetComposition(GAS_CHEMICAL_COMPOSITION, 100.); gas->SetTemperature(GAS_TEMPERATURE); gas->SetPressure(GAS_PRESSURE); gas->Initialise(); gas->LoadGasFile(INPUT_PATH_GAS_FILE); gas->PrintGas(); // Calculate Townsend coefficent alpha double ex = 1000., ey = 0., ez = 0.; // Electric field in V/cm double bx = 0., by = 0., bz = 0.; // Magnetic field in T double alpha = 0.; // Townsend coefficient in 1/cm gas ->ElectronTownsend(ex, ey, ez, bx, by, bz, alpha); std::cout << "**********************************************************************" << "\n" ; std::cout << "Townsend coefficient at E = " << ex << "V/cm: " << alpha << " / cm" << "\n" ; std::cout << "**********************************************************************" ; }