Closed jslawless closed 2 months ago
This sounds great! Indeed you have the correct approach in mind. For reference, you can look at PFNanoAODSchema, https://github.com/CoffeaTeam/coffea/blob/cb7c9ee2b94d08e2c68fff4014bb9f15211e6e40/src/coffea/nanoevents/schemas/nanoaod.py#L336-L355 which also introduces a few new mixin class types.
This reminds me I should push an L1NanoAOD schema for Phase 2... (For posterity, a gist which contains a not-quite-finalized/updated version is here: https://gist.github.com/NJManganelli/9ed6597553a6700e4d733ffe9d815a9e)
Edit: Here's the relevant L1Nano for Phase II (which should eventually go into cmssw...) https://github.com/cms-l1-dpg/Phase2-L1Nano
Thanks, I wrote the basic Schema and made a draft pull request.
For the scouting data sets in CMS, there are several fields with unique names. "ScoutingJet", "ScoutingElectron", so on and so forth. If you use NanoAODSchema to open these files, these objects won't be recognized as four vectors and won't have the nice methods like DeltaR and what not.
I suggest that there should be a Schema for these Scouting data sets. At first it would be pretty simple to just have these fields inherit from there non scouting counter-parts, but if the scouting people want to add custom functionality to these fields it would then be pretty easy.
A proposed solution would look something like this:
This is something I am interested in writing myself. I was hoping for feedback on if this is the correct approach and if this dataset warrants its own schema.