# Project3D() - letter "d" in name option

**URL:** <https://root-forum.cern.ch/t/project3d-letter-d-in-name-option/57612>\
**Category:** ROOT\
**Tags:** hist, root\
**Created:** [December 20, 2023, 3:35pm UTC](https://root-forum.cern.ch/t/project3d-letter-d-in-name-option/57612 "2023-12-20T15:35:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alandou](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/alandou/32/21386_2.png) [@alandou](https://root-forum.cern.ch/u/alandou)\
**Post date:** [December 20, 2023, 3:35pm UTC](https://root-forum.cern.ch/t/project3d-letter-d-in-name-option/57612/1 "2023-12-20T15:35:59Z")

</div>

Hi,  
I just stumbled upon an unexpected behaviour when using the Project3D function to make a TH2 from a TH3.  
I was up until now using it the following way:

```auto
TH2D* H2D_ZY = (TH2D*)H3D_XYZ->Project3D("UniqueName_zy");

```

with H3D\_XYZ a preexisting TH3D.  
However, I just found out that if the letter d appears in `UniqueName`, then it will replace the last histogram I plotted in a different function, despite it having a different name.  
Is that expected behaviour? The option “d” is mentioned in the documentation for the ProjectionX/Y/Z() functions. However I cannot see anything about it in the documentation of the Project3D function.

---

<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:** [December 20, 2023, 9:33pm UTC](https://root-forum.cern.ch/t/project3d-letter-d-in-name-option/57612/2 "2023-12-20T21:33:43Z")

</div>

Indeed that’s a real issue. I made [this PR](https://github.com/root-project/root/pull/14288) to fix it. May be @moneta can have a look.

---

<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:** [January 3, 2024, 9:34pm UTC](https://root-forum.cern.ch/t/project3d-letter-d-in-name-option/57612/3 "2024-01-03T21:34:01Z")

</div>

Closed on January 3, 2024, 9:34pm UTC

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