# Cell map with root

**URL:** <https://root-forum.cern.ch/t/cell-map-with-root/33890>\
**Category:** Newbie\
**Tags:** graphics, python\
**Created:** [May 3, 2019, 1:52pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890 "2019-05-03T13:52:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yosse\_andrean](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yosse_andrean/32/25829_2.png) [@yosse\_andrean](https://root-forum.cern.ch/u/yosse_andrean)\
**Post date:** [May 3, 2019, 1:52pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890/1 "2019-05-03T13:52:03Z")

</div>

Dear experts,

I am wondering if producing such plot is possible to do in root. If so, what object and approach would you advice to use?  
Short example with pyroot is appreciated!

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

Thanks!

---

<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:** [May 3, 2019, 1:54pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890/2 "2019-05-03T13:54:15Z")

</div>

There is no such drawing option in ROOT. In which format are your data ? trees ? histograms ?

---

<div class="post-metadata">

**Author:** ![yosse\_andrean](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yosse_andrean/32/25829_2.png) [@yosse\_andrean](https://root-forum.cern.ch/u/yosse_andrean)\
**Post date:** [May 3, 2019, 1:59pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890/3 "2019-05-03T13:59:48Z")

</div>

OK…that’s unfortunate.  
Each of the value of the cell are saved in separate root file as TParameter. My initial idea is to loop through those root files, extract the TParameter, and somehow plot them in such a plot.

---

<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:** [May 3, 2019, 2:03pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890/4 "2019-05-03T14:03:02Z")

</div>

Ok, that’s very specific … You can also make a macro making this kind of drawing. But that’s a fair amount of coding. What’s the name of such plot ? I would like to understand how it should be read …

---

<div class="post-metadata">

**Author:** ![yosse\_andrean](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yosse_andrean/32/25829_2.png) [@yosse\_andrean](https://root-forum.cern.ch/u/yosse_andrean)\
**Post date:** [May 3, 2019, 2:08pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890/5 "2019-05-03T14:08:55Z")

</div>

This is a tile calorimeter cell map of the ATLAS detector. Each value represent an observable specific to that cell.

---

<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:** [May 3, 2019, 2:26pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890/6 "2019-05-03T14:26:32Z")

</div>

May be a TH2Poly is the best ROOT object to be used to represent this data.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 3, 2019, 2:28pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890/7 "2019-05-03T14:28:39Z")

</div>

Why not ask the ATLAS people how they do it instead of trying to reinvent the wheel?

---

<div class="post-metadata">

**Author:** ![yosse\_andrean](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yosse_andrean/32/25829_2.png) [@yosse\_andrean](https://root-forum.cern.ch/u/yosse_andrean)\
**Post date:** [May 3, 2019, 2:35pm UTC](https://root-forum.cern.ch/t/cell-map-with-root/33890/8 "2019-05-03T14:35:14Z")

</div>

Well that’s the first thing I did. This is a legacy plot which source code was not preserved and whose owner had left the field.
