Following the discussion in Rec#409
This MR creates the necessary tools to replace the MCTupleToolPrimaries in Funtuple, and also adds some useful MC functors.
What is done?
- Read all MC PVs from
- Refactor MC functors like:
- New MC functors are included like
- New functional functor
TARGETto get the pointer from
LHCb::SmartRef(Needed to get objects from MC_Header)
as @ldufour discussed in Rec#409 (comment 6241665), the
get_mc_header() will require first the
MCVertices are unpacked, since the
MCVertices are unpacked automatically using
get_mc_particles(), the dependency here is to require
mc_particles as inputs to chain the dependency automatically.
Why do we refactor
ORIGIN_VZ are three different functors which don't make sense, not it's defined as a composition of more basic functors like:
ORIGIN_VX = X_COORDINATE @ POSITION @ MC_ORIGINVERTEX ORIGIN_VY = Y_COORDINATE @ POSITION @ MC_ORIGINVERTEX ORIGIN_VZ = Z_COORDINATE @ POSITION @ MC_ORIGINVERTEX
which is more elegant and cleaner in the code.
Why do we need
LHCb::SmartRef will only fetch the object when the object is called, the
Sel::Utils::deref_if_ptr can't handle this smart pointer correctly, so the
F.TARGET is called to convert this
LHCb::SmartRef to the classic pointer.
This should be tested with Analysis!946 (merged) Rec!3279 (merged) LHCb!3935 (merged)