How can I access those data?

Hello, first I would like to apologize about my spaming on the forum this one will be the last.

Here is the data I would like to get to finally plot my number of detections according to the number of detectors that detected the neutron/gamma.
I’ve tried this code ;

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 rvec = d.Take<ROOT::VecOps::RVec<UShort_t>>("Psd_All_Shift");
// Affichage des valeurs de rvec
for (const auto& value : rvec) {
    std::cout << value << std::endl;

Wish returns me datas I really don’t understand but anyway, this is not what TRee::Scan(“Psd_All_Shift”) returns me.
I know that those datas are ROOT::VecOps::RVec<UShort_t>.
If you ever have an idea, I would be Thanksfull.


You are welcome to post, really. My point, also from my other answer, is that what you are trying to achieve is not very clear.
If you perhaps could explain what you’d like to do with the content of those arrays, we could help :slight_smile:


First of all, I woud like to get “Psd_All_Shift” but for each detectors just like so ;

I know that the data for each detector is stored inside Psd_All_Shift as you can see in the pic i sent ( TTree::Scan(“Psd_All_Shift”) ) but I’m for now not able to access it.
Then the objectiv is to know, when a neutron/gamma is detected, how much detectors detects it.
The final objectiv is to get the angular distributivity of gammas/neutrons during a nuclear collision.

The code i sent return me somthing like that ;

This is the good form but why do I have many times the same result ? A detection should appears only ones, I don’t understand why do I have the same result hundreds times like that.