# Trying to use SetTopLid() using neBEM in Garfield++

**URL:** <https://root-forum.cern.ch/t/trying-to-use-settoplid-using-nebem-in-garfield/57184>\
**Category:** Garfield++\
**Created:** [November 21, 2023, 6:49am UTC](https://root-forum.cern.ch/t/trying-to-use-settoplid-using-nebem-in-garfield/57184 "2023-11-21T06:49:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [November 21, 2023, 6:49am UTC](https://root-forum.cern.ch/t/trying-to-use-settoplid-using-nebem-in-garfield/57184/1 "2023-11-21T06:49:42Z")

</div>

Hi, I just started to use neBEM in Garfield++, starting from the examples provided in the “neBEM” directory. Creating a SolidTube I read in the Garfield++ UserGuide that one can remove the lids, so I just wrote the following, simple piece of code:  
SolidTube tube(0,0,0,CathodeRadius, CathodeLength/2., 0, 1, 0);  
const bool closed = false;  
tube.SetTopLid(closed);  
tube.SetBottomLid(closed);  
But when using ViewGeometry I see the lids are still there. The field profile also shows there are not removed. Could you please tell me what I’m doing wrong? 🙂  
Thanks!  
Sébastien

---

<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 21, 2023, 7:22am UTC](https://root-forum.cern.ch/t/trying-to-use-settoplid-using-nebem-in-garfield/57184/2 "2023-11-21T07:22:02Z")

</div>

Hi,  
thanks for your message! That sounds like a bug; will take a look…

---

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [November 30, 2023, 4:04pm UTC](https://root-forum.cern.ch/t/trying-to-use-settoplid-using-nebem-in-garfield/57184/3 "2023-11-30T16:04:37Z")

</div>

OK, thanks in advance! 🙂

---

<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 3, 2023, 12:37pm UTC](https://root-forum.cern.ch/t/trying-to-use-settoplid-using-nebem-in-garfield/57184/4 "2023-12-03T12:37:56Z")

</div>

Sorry for the delay! And thanks for the reminder 😉

I ran a little test using the attached program which describes a geometry consisting of a tube and a wire inside. As you can see from the attached plots, I get different results for the electric potential with and without lids: with the lids removed, the field extends outside the tube while with the lids closed the potential is forced to zero at the ends of the tube.

`ViewGeometry` indeed doesn’t distinguish between tubes with and without lids; they are always plotted as solid cylinders. Need to think how one could visualise the lids…

[tube.C](https://root-forum.cern.ch/uploads/short-url/kFfBnwauhkJeh7BimFu4QEhGtTD.C) (1.4 KB)

 ![withLids](https://root-forum.cern.ch/uploads/default/original/3X/1/3/13498ba4b8838dcaf089ededca703562d73bdd12.jpeg)  
 ![withoutLids](https://root-forum.cern.ch/uploads/default/original/3X/0/5/052a3933ac63343da3b05f156cbbd0bdb8769f72.jpeg)

---

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [December 11, 2023, 11:44am UTC](https://root-forum.cern.ch/t/trying-to-use-settoplid-using-nebem-in-garfield/57184/5 "2023-12-11T11:44:30Z")

</div>

You’re right, I looked at the geometry in which the lids appear in both cases, and then I too quickly checked the field profile (I did not zoom enough to notice the difference on the field). Thanks for your help!

---

<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 25, 2023, 11:44am UTC](https://root-forum.cern.ch/t/trying-to-use-settoplid-using-nebem-in-garfield/57184/6 "2023-12-25T11:44:36Z")

</div>

Closed on December 25, 2023, 11:44am UTC

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