# Error in ComponentGrid::GetData?

**URL:** <https://root-forum.cern.ch/t/error-in-componentgrid-getdata/64813>\
**Category:** Garfield++\
**Created:** [April 22, 2026, 2:36pm UTC](https://root-forum.cern.ch/t/error-in-componentgrid-getdata/64813 "2026-04-22T14:36:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeM](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/0ea827/32.png) [@JoeM](https://root-forum.cern.ch/u/JoeM)\
**Post date:** [April 22, 2026, 2:36pm UTC](https://root-forum.cern.ch/t/error-in-componentgrid-getdata/64813/1 "2026-04-22T14:36:27Z")

</div>

Hello,

I think there’s a small error in the GetData function of ComponentGrid.cpp as Reduce is called on xi only and not yi and zi.

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/d/3/d3d7c670ac3615777c49b19d6e65c5b3759c615b.png)

Thanks for keeping Garfield++ going,

Joe.

---

<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 23, 2026, 6:23am UTC](https://root-forum.cern.ch/t/error-in-componentgrid-getdata/64813/2 "2026-04-23T06:23:38Z")

</div>

Welcome to the ROOT forum.

I think @hschindl can help you.

---

<div class="post-metadata">

**Author:** ![Piet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/piet/32/12536_2.png) [@Piet](https://root-forum.cern.ch/u/Piet)\
**Post date:** [April 23, 2026, 8:40am UTC](https://root-forum.cern.ch/t/error-in-componentgrid-getdata/64813/3 "2026-04-23T08:40:47Z")

</div>

This is maybe a question for @dastocco ?

---

<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:** [April 23, 2026, 12:41pm UTC](https://root-forum.cern.ch/t/error-in-componentgrid-getdata/64813/4 "2026-04-23T12:41:39Z")

</div>

Hi Joe,  
thanks a lot for spotting and reporting this bug! I’ve committed a fix:

> **[Bug fix in ComponentGrid (!610) · Merge requests · garfield / garfieldpp ·...](https://gitlab.cern.ch/garfield/garfieldpp/-/merge_requests/610)**
>
> Bugfix: when reducing/shifting coordinates to the elementary cell, only the x coordinate was used. Many thanks to Joe Murphy for reporting the issue.

Can you check?

---

<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:** [May 7, 2026, 12:41pm UTC](https://root-forum.cern.ch/t/error-in-componentgrid-getdata/64813/5 "2026-05-07T12:41:41Z")

</div>

Closed on May 7, 2026, 12:41pm UTC

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