Add a value to a branch (std::vector<double>) and fill a new Tree

Hello, In my Tree I’ve the Edep branch that is a std::vector<double>.
Then Edep[0] refers to a first detector and Edep[1] to a second one.
I’ve to add the resolution by definening the new Edep[0] and Edep[1] as


where sigma si estimated on a function based on Edep[0] and Edep[1].

I wrote the macro, but starting from the input file of 350MB, it is creating a new very big Root file (4GB after just 2 min) and it is still at 0% processing… than surely something isn’t working fine.
sigmatree.cpp (1.7 KB)

WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

e->clear(); for (int j=0; j<e0->size(); j++) {

Thank you @Wile_E_Coyote !

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