#include #include #include #include #include "Garfield/ComponentAnalyticField.hh" #include "Garfield/MediumMagboltz.hh" #include "Garfield/Sensor.hh" #include "Garfield/DriftLineRKF.hh" #include "Garfield/ViewDrift.hh" using namespace Garfield; int main(int argc, char * argv[]) { TApplication app("app", &argc, argv); // Make a gas medium. MediumMagboltz gas; gas.LoadGasFile("Ar_90_ch4_10_0.1bar.gas"); gas.LoadIonMobility("IonMobility_Ar+_Ar.txt"); // gas.PrintGas(); // Make a component with analytic electric field. ComponentAnalyticField cmp; cmp.SetMedium(&gas); // Wire radius [cm] const double rWire = 25.e-4; // Outer radius of the tube [cm] const double rTube = 0.71; // Voltages const double vWire = 1000.; const double vTube = 0.; // Add the wire in the centre. cmp.AddWire(0, 0, 2 * rWire, vWire, "s"); // Add the tube. cmp.AddTube(rTube, vTube, 0); // Make a sensor. Sensor sensor; sensor.AddComponent(&cmp); sensor.AddElectrode(&cmp, "s"); DriftLineRKF drift(&sensor); drift.DriftElectron(0.3, 0.3, 0, 0); sensor.IntegrateSignal("s"); double charge = sensor.GetTotalInducedCharge("s"); std::cout << "Total charge: " << charge << "\n"; }