I’m running a simulation of single GEM gain with one electron with negative ion drift, now i’m trying to put a sensor just below the GEM. I have few doubts.
- Do we need to add Electric fields of the sensor, if not, how to define the drift towards the sensor?
- I am starting with the strip wire as the signal sensor, but I don’t understand how to define it in XY plane?
I am also adding the code of my sensor for everyone to review:
aval->AvalancheNegativeIon(init_x,init_y,init_z,0,0,0);
Int_t nd = aval->GetNumberOfElectronEndpoints();
Sensor sensor;
// sensor.AddComponent(&linearField);
ComponentAnalyticField wField;
constexpr double d = -0.03;
constexpr double pitch_det = 55.e-4;
constexpr double halfpitch = 0.5 * pitch_det;
wField.AddStripOnPlaneY('z',d, -halfpitch, halfpitch, "strip");
wField.AddStripOnPlaneX('z',d, -halfpitch, halfpitch, "strip");
sensor.AddElectrode(&wField, "strip");
AvalancheNIMicroscopic drift;
drift.SetSensor(&sensor);
drift.SetDistanceSteps(1.e-4);
const unsigned int nTimeBins = 1000;
const double tmin = 0.;
const double tmax = 10.;
const double tstep = (tmax - tmin) / nTimeBins;
sensor.SetTimeWindow(tmin, tstep, nTimeBins);
std::ofstream outfile;
outfile.open("signal.txt", std::ios::out);
for (unsigned int i = 0; i < nTimeBins; ++i) {
const double t = (i + 0.5) * tstep;
const double f = sensor.GetSignal("strip", i);
const double fe = sensor.GetElectronSignal("strip", i);
const double fh = sensor.GetIonSignal("strip", i);
outfile << t << " " << f << " " << fe << " " << fh << "\n";
}
Let me know if I’m missing anything because i’m getting zero signal in signal.txt file.
Thanks