# How can I use data that is entangled with other data?

**URL:** <https://root-forum.cern.ch/t/how-can-i-use-data-that-is-entangled-with-other-data/59300>\
**Category:** Newbie\
**Tags:** rdataframe, root\
**Created:** [May 10, 2024, 8:44pm UTC](https://root-forum.cern.ch/t/how-can-i-use-data-that-is-entangled-with-other-data/59300 "2024-05-10T20:44:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KillianUB](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/46a35a/32.png) [@KillianUB](https://root-forum.cern.ch/u/KillianUB)\
**Post date:** [May 10, 2024, 8:44pm UTC](https://root-forum.cern.ch/t/how-can-i-use-data-that-is-entangled-with-other-data/59300/1 "2024-05-10T20:44:33Z")

</div>

Hello again, I’m trying to use data in a Branch, but those data are enangled in ROOT::VecOps::RVec\<UShort\_t\>. I’ve used RDF but I’m defenetly not able to get what i want from this.  
Is there something I am missing ? Her’s the way those data are stored :

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

As you can see there 34 instances per event (wish correspond to 34 detectors).

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [May 11, 2024, 5:10am UTC](https://root-forum.cern.ch/t/how-can-i-use-data-that-is-entangled-with-other-data/59300/2 "2024-05-11T05:10:49Z")

</div>

Hi,

What are you trying to do with that data?

Best,  
D

---

<div class="post-metadata">

**Author:** ![KillianUB](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/46a35a/32.png) [@KillianUB](https://root-forum.cern.ch/u/KillianUB)\
**Post date:** [May 11, 2024, 7:53am UTC](https://root-forum.cern.ch/t/how-can-i-use-data-that-is-entangled-with-other-data/59300/3 "2024-05-11T07:53:05Z")

</div>

Hi, first, I would like to get the graph of the number of detection if fonction of the number of detectors who detected the neutron/gammas.

---

<div class="post-metadata">

**Author:** ![KillianUB](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/46a35a/32.png) [@KillianUB](https://root-forum.cern.ch/u/KillianUB)\
**Post date:** [May 11, 2024, 7:59pm UTC](https://root-forum.cern.ch/t/how-can-i-use-data-that-is-entangled-with-other-data/59300/4 "2024-05-11T19:59:43Z")

</div>

I tried this code but i don’t undesratnd the result ;

```auto
TFile f("RAW148OS_treeFF01.root");
std::unique_ptr<TTree> tree(dynamic_cast<TTree*>(f.Get("Analysis_All")));
tree->SetBranchStatus("*", false);
tree->SetBranchStatus("Psd_All_Shift", true);
ROOT::RDataFrame d("Analysis_All", "RAW148OS_treeFF01.root"); // Interface to TTree and TChain
auto colType = d.GetColumnType("Psd_All_Shift");
//Print column type
std::cout << "Column " << colType << " has type " << colType << std::endl;
tree->Scan("Psd_All_Shift");
// Obtention d'un vecteur de données à partir de l'élément "Psd_All_Shift" de l'arbre
auto rvec = d.Take<ROOT::VecOps::RVec<UShort_t>>("Psd_All_S");
// Affichage des valeurs de rvec
for (const auto& value : rvec) {
    std::cout << value << std::endl;
}

```
