# How to get the signal in micromegas geometry?

**URL:** <https://root-forum.cern.ch/t/how-to-get-the-signal-in-micromegas-geometry/64491>\
**Category:** Garfield++\
**Created:** [November 29, 2025, 2:24am UTC](https://root-forum.cern.ch/t/how-to-get-the-signal-in-micromegas-geometry/64491 "2025-11-29T02:24:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![newconcept1979](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/newconcept1979/32/26349_2.png) [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Post date:** [November 29, 2025, 2:24am UTC](https://root-forum.cern.ch/t/how-to-get-the-signal-in-micromegas-geometry/64491/1 "2025-11-29T02:24:58Z")

</div>

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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [November 29, 2025, 8:08am UTC](https://root-forum.cern.ch/t/how-to-get-the-signal-in-micromegas-geometry/64491/2 "2025-11-29T08:08:08Z")

</div>

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:

- [Examples/Asacusa/example.cpp · master · garfield / garfieldpp · GitLab](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/Asacusa/example.cpp?ref_type=heads)
- [Low-energy pion detection with a Micromegas - Garfield++](https://garfieldpp.web.cern.ch/tutorials/asacusa/)

---

<div class="post-metadata">

**Author:** ![newconcept1979](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/newconcept1979/32/26349_2.png) [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Post date:** [November 29, 2025, 11:00am UTC](https://root-forum.cern.ch/t/how-to-get-the-signal-in-micromegas-geometry/64491/3 "2025-11-29T11:00:15Z")

</div>

@hschindl, thanks for your reply!

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [December 13, 2025, 11:01am UTC](https://root-forum.cern.ch/t/how-to-get-the-signal-in-micromegas-geometry/64491/4 "2025-12-13T11:01:00Z")

</div>

Closed on December 13, 2025, 11:01am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
