22 {
23
24 TApplication app("app", &argc, argv);
25
26
28
30
31
33
34 cmp.
Initialise(
"diode_msh.grd",
"diode_des.dat");
35
37 for (size_t i = 0; i < nRegions; ++i) {
39 }
40
41
45
46
51
52
54 drift.SetDistanceSteps(1.e-4);
55
56
58 drift.EnablePlotting(&driftView);
59
61 track.SetParticle("pi");
62 track.SetMomentum(3.e9);
63
64
68 track.NewTrack(x0, y0, 0., 0.,
sin(theta), 0.,
cos(theta));
69
70 for (const auto& cluster : track.GetClusters()) {
71
72 for (const auto& electron : cluster.electrons) {
73
74 constexpr double fPlot = 0.01;
76 drift.DriftElectron(electron.x, electron.y, electron.z, electron.t);
77 drift.DriftHole(electron.x, electron.y, electron.z, electron.t);
78 }
79 }
82 app.Run(true);
83}
Interpolation in a three-dimensional field map created by Sentaurus Device.
size_t GetNumberOfRegions() const
Get the number of regions in the device.
bool Initialise(const std::string &gridfilename, const std::string &datafilename)
void SetMedium(const size_t ireg, Medium *m)
Set the medium to be associated to a given region.
Solid crystalline silicon
void SetTemperature(const double t)
Set the temperature [K].
void AddComponent(Component *comp)
Add a component.
bool SetArea(const bool verbose=false)
Set the user area to the default.
Generate tracks using Heed++.
void SetPlaneXZ()
Set the viewing plane to x-z.
Visualize drift lines and tracks.
void Plot2d(const bool axis=true, const bool snapshot=false)
Make a 2D plot of the drift lines in the current viewing plane.
Visualize the potential or electric field of a component or sensor.
void PlotContour(const std::string &option="v")
void SetSensor(Sensor *s)
Set the sensor for which to plot the field.
double RndmUniform()
Draw a random number uniformly distributed in the range [0, 1).
DoubleAc cos(const DoubleAc &f)
DoubleAc sin(const DoubleAc &f)