Dear experts,
I have a very simple question regarding the usage of TTreeReaderValue and TTreeReaderArray.
I’m using a TSelector to loop over a tree, my final output will be a skimmed tree. I do not have problems to fill my flat variables, for example the number of jets:
Once defined:
TTreeReaderValue<Int_t> n_jet = {fReader, "n_jet"};
Int_t shortTree_n_jet;
in the loop I do:
shortTree_n_jet = *n_jet;
How can I do the same for vectors? For example the jet momenta:
TTreeReaderArray<float> jet_pt = {fReader, "jet_pt"};
vector<float> shortTree_jet_pt;
what about the matching?
shortTree_jet_pt = ?
Is there a smart way to do it without looping on the TreeReaderArray and fill the corresponding vector?
Thanks for the attention.
Cheers,
Francesco
ROOT Version v6-10-04