# getLocalPosition definition

**URL:** <https://allpix-squared-forum.web.cern.ch/t/getlocalposition-definition/399>\
**Category:** Uncategorized\
**Created:** [April 10, 2023, 8:47am UTC](https://allpix-squared-forum.web.cern.ch/t/getlocalposition-definition/399 "2023-04-10T08:47:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hdarwish](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/h/46a35a/32.png) [@hdarwish](https://allpix-squared-forum.web.cern.ch/u/hdarwish)\
**Post date:** [April 10, 2023, 8:47am UTC](https://allpix-squared-forum.web.cern.ch/t/getlocalposition-definition/399/1 "2023-04-10T08:47:16Z")

</div>

Hello,

Excuse for my question, it might be naive but it takes one minute.  
I am trying to understand how the function getLocalPosition() works.  
I am using it to find the position of the deposited charge in the pixel sensor but I don’t know what is the origin of the coordinate system it is using.

Thank you and best regards,

Hasan

---

<div class="post-metadata">

**Author:** ![hwennlof](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/h/3ab097/32.png) [@hwennlof](https://allpix-squared-forum.web.cern.ch/u/hwennlof)\
**Post date:** [April 11, 2023, 11:24am UTC](https://allpix-squared-forum.web.cern.ch/t/getlocalposition-definition/399/2 "2023-04-11T11:24:20Z")

</div>

Hi,

The local coordinate systems have the origin at the centre of the bottom-left pixel in a detector.

Kind regards,  
Håkan

---

<div class="post-metadata">

**Author:** ![simonspa](https://allpix-squared-forum.web.cern.ch/user_avatar/allpix-squared-forum.web.cern.ch/simonspa/32/597_2.png) [@simonspa](https://allpix-squared-forum.web.cern.ch/u/simonspa)\
**Post date:** [April 11, 2023, 1:44pm UTC](https://allpix-squared-forum.web.cern.ch/t/getlocalposition-definition/399/3 "2023-04-11T13:44:25Z")

</div>

[Simulation Geometry | Allpix Squared](https://allpix-squared.docs.cern.ch/docs/05_geometry_detectors/01_geometry/#coordinate-systems) 🙂

---

<div class="post-metadata">

**Author:** ![hdarwish](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/h/46a35a/32.png) [@hdarwish](https://allpix-squared-forum.web.cern.ch/u/hdarwish)\
**Post date:** [April 12, 2023, 6:04pm UTC](https://allpix-squared-forum.web.cern.ch/t/getlocalposition-definition/399/4 "2023-04-12T18:04:20Z")

</div>

Thank you @hwennlof and @simonspa .  
I had in mind that the coordinate system origin is the center of the lower lef pixel but I didn’t know that this is generalized to all topics and functions.

Thank you and best regards,

Hasan
