PHYSLITESchema#

class coffea.nanoevents.PHYSLITESchema(base_form, *args, **kwargs)[source]#

Bases: BaseSchema

PHYSLITE schema builder - work in progress.

This is a schema for the ATLAS DAOD_PHYSLITE derivation. Closely following schemas.nanoaod.NanoAODSchema, it is mainly build from naming patterns where the “Analysis” prefix has been removed, so the collections will be named Electrons, Muons, instead of AnalysisElectrons, AnalysisMunos, etc. The collection fields correspond to the “Aux” and “AuxDyn” columns.

Collections are assigned mixin types according to the mixins mapping. All collections are then zipped into one base.NanoEvents record and returned.

Cross references are build from ElementLink columns. Global indices are created dynamically, using an _eventindex field that is attached to each collection.

Attributes Summary

mixins

Default configuration for mixin types, based on the collection name.

truth_collections

TRUTH3 collection names.

Methods Summary

behavior()

Behaviors necessary to implement this schema (dict)

uproot_writeable(events)

Converting BaseSchema events into something that is uproot writeable.

Attributes Documentation

mixins = {'CombinedMuonTrackParticles': 'TrackParticle', 'Electrons': 'Electron', 'ExtrapolatedMuonTrackParticles': 'TrackParticle', 'GSFTrackParticles': 'TrackParticle', 'InDetTrackParticles': 'TrackParticle', 'Jets': 'Particle', 'MuonSpectrometerTrackParticles': 'TrackParticle', 'Muons': 'Muon', 'Photons': 'Particle', 'TauJets': 'Particle', 'TruthBoson': 'TruthParticle', 'TruthBottom': 'TruthParticle', 'TruthElectrons': 'TruthParticle', 'TruthMuons': 'TruthParticle', 'TruthNeutrinos': 'TruthParticle', 'TruthPhotons': 'TruthParticle', 'TruthTaus': 'TruthParticle', 'TruthTop': 'TruthParticle', 'egammaClusters': 'NanoCollection'}#

Default configuration for mixin types, based on the collection name.

The types are implemented in the coffea.nanoevents.methods.physlite module.

truth_collections = ['TruthPhotons', 'TruthMuons', 'TruthNeutrinos', 'TruthTaus', 'TruthElectrons', 'TruthBoson', 'TruthBottom', 'TruthTop']#

TRUTH3 collection names.

TruthParticle behavior is assigned to all of them and global index forms for parent/children relations are created for all combinations.

Methods Documentation

classmethod behavior()[source]#

Behaviors necessary to implement this schema (dict)

classmethod uproot_writeable(events)[source]#

Converting BaseSchema events into something that is uproot writeable. BaseSchema leaves every original branch as a top-level field, so this just packs each uproot-compatible field into a dict ready for uproot.WritableDirectory.mktree.

Subclasses that apply non-trivial zipping during construction should override this with a schema-specific inverse.

Parameters:

events (NanoEvents) – The BaseSchema events to be turned into something uproot-writeable

Returns:

out – An uproot-writeable dictionary representing the same information as the input events

Return type:

dict