Save jets constituents information in ntuples
In the past, we had several tuple tools that allowed the saving of jets' constituents information in ntuples. You can see a working example here. How should we achieve this in funtuple? One possible way would be to add a functor collections such as
def JetTupling(
) -> FunctorCollection:
"""
Candidate-level (jet) collection of functors of jet constituents properties
Args:
"""
jet_tupling = {
"nConstituents": F.NINGENERATION(F.ALL,1),
# Store an array of jet constituents' Px, Py, Pz
"ConstituentPx": F.MAP(F.PX) @ F.GET_GENERATION(1),
"ConstituentPy": F.MAP(F.PY) @ F.GET_GENERATION(1),
"ConstituentPz": F.MAP(F.PZ) @ F.GET_GENERATION(1),
"ConstituentPt": F.MAP(F.PT) @ F.GET_GENERATION(1),
"ConstituentPID": F.MAP(F.PARTICLE_ID) @ F.GET_GENERATION(1),
}
return FunctorCollection(jet_tupling)
Is this the right approach?