#include #include "Garfield/MediumMagboltz.hh" #include "Garfield/ComponentAnalyticField.hh" #include "Garfield/TrackHeed.hh" #include "Garfield/Sensor.hh" #include "Garfield/ViewDrift.hh" using namespace Garfield; int main(int argc, char * argv[]) { TApplication app("app", &argc, argv); MediumMagboltz gas("ar", 95., "isobutane", 2., "cf4", 3.); ComponentAnalyticField comp; comp.AddPlaneY(-20, 0., "pad_plane"); comp.AddPlaneY(20, 10000., "HV"); comp.SetMagneticField(0, 1, 0); comp.SetMedium(&gas); Sensor sensor; sensor.AddComponent(&comp); sensor.SetArea(-20., -20., -50., 20., 20., 50.); TrackHeed track; track.SetSensor(&sensor); track.SetParticle("muon"); track.SetMomentum(1.e9); ViewDrift view; track.EnablePlotting(&view); track.EnableMagneticField(); ///* double maxrange = 0., rforstraight = 0., stepstraight = 0., stepcurved = 0.; track.GetSteppingLimits(maxrange, rforstraight, stepstraight, stepcurved); stepcurved = 0.02; track.SetSteppingLimits(maxrange, rforstraight, stepstraight, stepcurved); //*/ constexpr double z0 = -50.; track.NewTrack(0., 0., z0, 0., 0., 0., 1.); double xc = 0., yc = 0., zc = 0., tc = 0., ec = 0., extra = 0.; int nc = 0; while (track.GetCluster(xc, yc, zc, tc, nc, ec, extra)) { } view.Plot(); app.Run(); return 0; }