Open lenzip opened 2 months ago
cms-bot internal usage
A new Issue was created by @lenzip.
@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.
cms-bot commands are listed here
I am posting this here as requested yesterday at the core software meeting, although this does not concern cmssw specifically, just ROOT
type root
assign analysis
I feel this is the closest match, even if this issue doesn't concern CMSSW directly.
Thanks @lenzip!
New categories assigned: analysis
@tvami you have been requested to review this Pull request/Issue and eventually sign? Thanks
It would be desirable to be able to write analysis in RDataFrame treating the nanoAOD as a collection of objects, rather than dealing with the individual branches, mainly to reduce bolierplate, e.g.:
This is already implemented in some tools that use RDataFrame as a backend. For example in Bamboo this is implemented in a python layer that then translates under the hood in RDataFrame actions on individual columns.
Ideally one would like to be able to build, e.g., an RVec of
Muon
objects from the individualMuon_attribute
s RVecs, with something like:Requirements:
.
operator, i.e. one should be able to doMuons[0].pt
orMuon[0].pt()
, rather thanMuon_pt[0]
.ROOT does offer a
ROOT::VecOps::Construct
function that allows building custom objects, e.g. the following code builds a RVec of muon 4-momenta:This achieves 1. above, but not 2., i.e. it is not lazy, all branches are accessed to pass arguments to the
ROOT::Math::PtEtaPhiMVector
constructor.Status:
ROOT people have already discussed this topic with us and in a ROOT PPP meeting. Afterwards they have given us pointers to the use of
ROOT::VecOps::Construct
function described in the example above. We only recently mentioned requirement 2. (lazy branch read in this objectification layer), and they mentioned they are thinking of a possible solution.