How to get the signal in micromegas geometry?

The signal on the anode of micromegas geometry is wanted, but ComponentAnalyticField class object only can have two planes at the y direction, so two ComponentAnalyticField class objects are used, the codes are:

MediumMagboltz gas;
  gas.LoadGasFile("Ar_90_ch4_10_1bar.gas");

  // Setup the cell.
  ComponentAnalyticField cmp;
  ComponentAnalyticField cmpD;
  cmp.SetMedium(&gas);
  cmpD.SetMedium(&gas);

  double mesh = 5.e-3;
  double drift_pos=mesh+1.;
  double vMesh=-300.;
  double vDrift=-800;
  cmp.AddPlaneY(0., 0.,"s");
  cmp.AddPlaneY(mesh, vMesh,"mesh1");
  

  cmpD.AddPlaneY(mesh, vMesh,"mesh2");
  cmpD.AddPlaneY(drift_pos, vDrift);

  cmp.AddReadout("mesh1");
  cmpD.AddReadout("mesh2");

  Sensor sensor;
  sensor.AddComponent(&cmp);
  sensor.AddComponent(&cmpD);
  sensor.AddElectrode(&cmp,"s");
  double t_step=1.e-2;
  double n_step=1000.;
  double start=0;
  sensor.SetTimeWindow(start,t_step,n_step);

  DriftLineRKF drift;
  drift.SetSensor(&sensor);
  // drift.EnableIonTail();

  AvalancheMicroscopic micro;
  micro.SetSensor(&sensor);

  sensor.ClearSignal();
  drift.DriftElectron(0,drift_pos-1.e-4,0,0);
  // micro.AvalancheElectron(0.,drift_pos,0,
  //                        0,
  //                        0);
  TCanvas c1("","",1200,1200);
  c1.SetLeftMargin(0.2);
  sensor.PlotSignal("s",&c1);
  ofstream ofile("signal.txt");
  sensor.ExportSignal("s","signal.txt");

  
  c1.SaveAs("signal.png");

but the signal is 0,

when changing the start positon of the electron from drift region to avalanche region, the signal is right,

it seems the electron can not pass through boundary plane,

so how to get the right signal in micromegas geometry?

Hi, you’re correct, the electrons will not cross the boundary planes. You need to move them “manually” to the amplification gap, as is done in this example: