I have an NTuple with a branch ptLeptons which is a std::vector.
I can then do a plot like:
or with a cut like this
NTuple.Draw(ptLeptons, “ptLeptons > 50”);
But how do I access the size of the array? Say I only want those events where there are at least 3 leptons.
[code]root  NTuple.Draw(“lepPt”,“lepPt.size()>2”)
Warning in TTreeFormula::DefinedVariable: Can not call method on content of vector in lepPt.size()
Error in TTreeFormula::Compile: Part of the Variable “lepPt.size()” exists but some of it is not accessible or useable
However, when using a TSelector, doing SetBranchAddress, GetEntry and so on the full vector and thus also the size() is available. But how to access this when drawing things interactively? (an easy solution is of course to store an additional branch “sizeLepPt”, but as the size() is already stored in the vector, this should not be needed)
Is this possible at all? People I have asked suggested I should be using arrays instead of vectors and store the number of array entries separately. Do you agree on this, so should I get rid of std::vectors in the ntuple?