# How to set a electrode in the ComponentAnsys123 Class

**URL:** <https://root-forum.cern.ch/t/how-to-set-a-electrode-in-the-componentansys123-class/48118>\
**Category:** Garfield++\
**Created:** [December 20, 2021, 1:31am UTC](https://root-forum.cern.ch/t/how-to-set-a-electrode-in-the-componentansys123-class/48118 "2021-12-20T01:31:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [December 20, 2021, 1:31am UTC](https://root-forum.cern.ch/t/how-to-set-a-electrode-in-the-componentansys123-class/48118/1 "2021-12-20T01:31:38Z")

</div>

I have imported the model from the ansys to the Garfield++, and the most important part of my model is some gas area including the electric field, now I want to get the signal from the electrode, what should I do to add the plane or strip to be the electrode and convolute the induced current pulse with the transfer function? I just found some method in the ComponentAnalyticField class. the code is like below

```auto
cmp.AddWire(0., 0., 2 * rWire, vWire, "s");
sensor.AddElectrode(&cmp, "s");

```

---

<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:** [December 20, 2021, 8:08am UTC](https://root-forum.cern.ch/t/how-to-set-a-electrode-in-the-componentansys123-class/48118/2 "2021-12-20T08:08:01Z")

</div>

You need to provide a weighting potential for the electrode, see [this page](https://garfieldpp.web.cern.ch/examples/signals/).  
The recipe for adding a weighting potential to `ComponentAnsys123` can be found [here](https://garfieldpp.web.cern.ch/examples/ansys123/#weightingfields).

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [December 20, 2021, 8:13am UTC](https://root-forum.cern.ch/t/how-to-set-a-electrode-in-the-componentansys123-class/48118/3 "2021-12-20T08:13:45Z")

</div>

Hi,  
Thanks a lot for your reply.  
These pages are really useful. I will learn it and then try.

---

<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:** [January 3, 2022, 8:13am UTC](https://root-forum.cern.ch/t/how-to-set-a-electrode-in-the-componentansys123-class/48118/4 "2022-01-03T08:13:54Z")

</div>

Closed on January 3, 2022, 8:13am UTC

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