# Using ROOT with KDetSim to create 3D hist of cylindrical detector

**URL:** <https://root-forum.cern.ch/t/using-root-with-kdetsim-to-create-3d-hist-of-cylindrical-detector/39145>\
**Category:** Newbie\
**Created:** [April 28, 2020, 6:43pm UTC](https://root-forum.cern.ch/t/using-root-with-kdetsim-to-create-3d-hist-of-cylindrical-detector/39145 "2020-04-28T18:43:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![em3179](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e0b2c6/32.png) [@em3179](https://root-forum.cern.ch/u/em3179)\
**Post date:** [April 28, 2020, 6:43pm UTC](https://root-forum.cern.ch/t/using-root-with-kdetsim-to-create-3d-hist-of-cylindrical-detector/39145/1 "2020-04-28T18:43:03Z")

</div>

Hi ROOT community,

I’m hoping someone is familiar with KDetSim. Its a package used to solve the Possion Equation and thus simulate the E field and track charge inside semi-conductors. I found a sample [script](http://kdetsim.org/examples/SiDriftExample_3.C.html) on the [KDetSim](http://kdetsim.org/KDetSim-Examples.html) website and got it running on my machine. But, I’m looking to generate a cylindrical detector instead of the cube it produces. I’m brand new to C++ and ROOT and therefore the search to solve the mundane becomes an epic quest.

Couple of methods/classes I looked into were ‘ElRectangle’ and ‘ElCylinder’ but wasn’t able to get it running. Also, the ROOT class TH3 (which inherits from TH1).

Any advice would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![oshadura](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/oshadura/32/14460_2.png) [@oshadura](https://root-forum.cern.ch/u/oshadura)\
**Post date:** [April 29, 2020, 11:47am UTC](https://root-forum.cern.ch/t/using-root-with-kdetsim-to-create-3d-hist-of-cylindrical-detector/39145/2 "2020-04-29T11:47:01Z")

</div>

> [@em3179](#):
>
> But, I’m looking to generate a cylindrical detector instead of the cube it produces. I’m brand new to C++ and ROOT and therefore the search to solve the mundane becomes an epic quest.
> 
> Couple of methods/classes I looked into were ‘ElRectangle’ and ‘ElCylinder’ but wasn’t able to get it running. Also, the ROOT class TH3 (which inherits from TH1).
> 
> Any advice would be greatly appreciated.

@couet can you please recomend something here?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [April 29, 2020, 12:04pm UTC](https://root-forum.cern.ch/t/using-root-with-kdetsim-to-create-3d-hist-of-cylindrical-detector/39145/3 "2020-04-29T12:04:14Z")

</div>

> [@em3179](#):
>
> I’m looking to generate a cylindrical detector

The ROOT TGeo package will be the way to go.
