I have seen some similar topics here but cannot find quite what I’m looking for.
I used EventLoop to create ntuples, following the tutorial for ATLAS at:
[ATLAS Analysis Software Tutorial | Creating and Filling Trees/NTuples]
Each variable is filled into a vector of floats which is then filled into the tree.
I want to work with the resulting ntuple, going through each variable and calculating simple things like mean and covariance.
The problem is that I cannot seem to extract the data from the ntuple. Here is what my Tree looks like:
I have tried following instructions that involve
TFile *mainInput = new TFile("path/to/file", "READ"); TTree* mainTree = (TTree*)mainInput->Get("VarNTuple"); std::vector<float>* WidthHigh; mainTree->SetBranchAddress("WidthHigh", &WidthHigh);
But any attempts to Draw or scan or show after this are failing.
What do I need to do to access data from a Tree of vectors like this?