Dear experts
I am a freshman about Garfield++.I have meet some problems in simulating a parallel-plate ion chamber.In my code,I simulated the drift of electrons successfully.But when I try to plot the induced signal,it failed,and the terminal print “Sensor::ConvoluteSignal: No signals present.”.The signal printed in canvas is 0.
The code and gas table is followed,Thanks for your help.
code and gas table.zip (8.7 KB)
Hi,
I’m not sure if the drift line simulation worked. There are a few issues with your code that need to be fixed:
- You should remove the lines
//set sensitive volume
GeometrySimple geo;
SolidTube sen_vol(0.,0.,0.,radius,half_gap,0.,1.,0.);
geo.AddSolid(&sen_vol,&gas);
because (1) you already set the sensitive medium with the line
cmp.SetMedium(&gas);
and (2) the geometry you set (a cylinder) is not consistent with the parallel-plate geometry you are trying to simulate. You can/should also remove the lines related to ViewGeometry
.
- You can remove the lines
cmp.AddReadout("anode");
cmp.AddReadout("cathode");
(the weighting fields for the planes are computed automatically if you give them a label).
- As you can see from the error message printed by
TrackHeed
, the energy of the particle is too low.
track.SetParticle("alpha");
track.SetEnergy(5.4e6);
Note that SetEnergy
sets the total energy of the particle, to set the kinetic energy you can use SetKineticEnergy
. Be aware that the model used by Heed to compute the inelastic cross-section is not reliable at low energies though.
- You should take the line
track.Initialise(&gas, true);
out of the for loop. You need to call it only once (unless you change the particle energy or energy, or the medium).
- Remove the call
track.GetElectron(0., xe, ye, ze, te, ee, dx, dy, dz);
. The loop over the clusters and electrons should then look like this
for (const auto& cluster : track.GetClusters()) {
for (const auto& electron : cluster.electrons) {
drift.DriftElectron(electron.x,electron.y,electron.z,electron.t);
}
}
Thank you for your advice,I have solve the problem by changing the order of the ViewSignal.Meanwhile,It seems the drift line simulation have worked,and your advice have help me do this better.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.