spine.constants.enums

Canonical SPINE categorical enumerations.

This module defines enumerated integer codes used for semantic categories and physics/reconstruction labels. Unlike spine.constants.columns, which describes tensor schema positions, this module only contains categories whose values are part of the semantic content of SPINE objects.

Typical uses include: - semantic shape categories such as shower/track/Michel/delta - canonical SPINE particle-ID categories - neutrino current and interaction categories

These enums are intended to be the source of truth for: - field metadata validation in spine.data - human-readable label maps in spine.constants.labels

Classes

GenieNuInteractionType(value)

Enumerates GENIE scattering categories.

LArSoftNuInteractionType(value)

Enumerates LArSoft neutrino interaction categories.

NuCurrentType(value)

Enumerates neutrino current types.

NuInteractionScheme(value)

Enumerates source conventions for neutrino interaction code fields.

NuInteractionType

ParticlePID(value)

Enumerates canonical SPINE particle species IDs.

ParticleShape(value)

Enumerates semantic voxel/particle categories.

class spine.constants.enums.ParticleShape(value)[source]

Enumerates semantic voxel/particle categories.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

Methods

as_integer_ratio(/)

Return integer ratio.

bit_count(/)

Number of ones in the binary representation of the absolute value of self.

bit_length(/)

Number of bits necessary to represent self in binary.

conjugate

Returns self, the complex conjugate of any int.

from_bytes(/, bytes[, byteorder, signed])

Return the integer represented by the given array of bytes.

to_bytes(/[, length, byteorder, signed])

Return an array of bytes representing an integer.

UNKNOWN = -1
SHOWER = 0
TRACK = 1
MICHEL = 2
DELTA = 3
LOWE = 4
GHOST = 5
LARCV_UNKNOWN = 6
class spine.constants.enums.ParticlePID(value)[source]

Enumerates canonical SPINE particle species IDs.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

Methods

as_integer_ratio(/)

Return integer ratio.

bit_count(/)

Number of ones in the binary representation of the absolute value of self.

bit_length(/)

Number of bits necessary to represent self in binary.

conjugate

Returns self, the complex conjugate of any int.

from_bytes(/, bytes[, byteorder, signed])

Return the integer represented by the given array of bytes.

to_bytes(/[, length, byteorder, signed])

Return an array of bytes representing an integer.

UNKNOWN = -1
PHOTON = 0
ELECTRON = 1
MUON = 2
PION = 3
PROTON = 4
KAON = 5
class spine.constants.enums.NuCurrentType(value)[source]

Enumerates neutrino current types.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

Methods

as_integer_ratio(/)

Return integer ratio.

bit_count(/)

Number of ones in the binary representation of the absolute value of self.

bit_length(/)

Number of bits necessary to represent self in binary.

conjugate

Returns self, the complex conjugate of any int.

from_bytes(/, bytes[, byteorder, signed])

Return the integer represented by the given array of bytes.

to_bytes(/[, length, byteorder, signed])

Return an array of bytes representing an integer.

UNKNOWN = -1
CC = 0
NC = 1
class spine.constants.enums.NuInteractionScheme(value)[source]

Enumerates source conventions for neutrino interaction code fields.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

Methods

as_integer_ratio(/)

Return integer ratio.

bit_count(/)

Number of ones in the binary representation of the absolute value of self.

bit_length(/)

Number of bits necessary to represent self in binary.

conjugate

Returns self, the complex conjugate of any int.

from_bytes(/, bytes[, byteorder, signed])

Return the integer represented by the given array of bytes.

to_bytes(/[, length, byteorder, signed])

Return an array of bytes representing an integer.

UNKNOWN = -1
LARSOFT = 0
GENIE = 1
class spine.constants.enums.LArSoftNuInteractionType(value)[source]

Enumerates LArSoft neutrino interaction categories.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

Methods

as_integer_ratio(/)

Return integer ratio.

bit_count(/)

Number of ones in the binary representation of the absolute value of self.

bit_length(/)

Number of bits necessary to represent self in binary.

conjugate

Returns self, the complex conjugate of any int.

from_bytes(/, bytes[, byteorder, signed])

Return the integer represented by the given array of bytes.

to_bytes(/[, length, byteorder, signed])

Return an array of bytes representing an integer.

UNKNOWN = -1
QE = 0
RES = 1
DIS = 2
COH = 3
COHELASTIC = 4
ELECTRONSCATTERING = 5
IMDANNIHILATION = 6
INVERSEBETADECAY = 7
GLASHOWRESONANCE = 8
AMNUGAMMA = 9
MEC = 10
DIFFRACTIVE = 11
EM = 12
WEAKMIX = 13
NUANCEOFFSET = 1000
CCQE = 1001
NCQE = 1002
RESCCNUPROTONPIPLUS = 1003
RESCCNUNEUTRONPI0 = 1004
RESCCNUNEUTRONPIPLUS = 1005
RESNCNUPROTONPI0 = 1006
RESNCNUPROTONPIPLUS = 1007
RESNCNUNEUTRONPI0 = 1008
RESNCNUNEUTRONPIMINUS = 1009
RESCCNUBARNEUTRONPIMINUS = 1010
RESCCNUBARPROTONPI0 = 1011
RESCCNUBARPROTONPIMINUS = 1012
RESNCNUBARPROTONPI0 = 1013
RESNCNUBARPROTONPIPLUS = 1014
RESNCNUBARNEUTRONPI0 = 1015
RESNCNUBARNEUTRONPIMINUS = 1016
RESCCNUDELTAPLUSPIPLUS = 1017
RESCCNUDELTA2PLUSPIMINUS = 1021
RESCCNUBARDELTA0PIMINUS = 1028
RESCCNUBARDELTAMINUSPIPLUS = 1032
RESCCNUPROTONRHOPLUS = 1039
RESCCNUNEUTRONRHOPLUS = 1041
RESCCNUBARNEUTRONRHOMINUS = 1046
RESCCNUBARNEUTRONRHO0 = 1048
RESCCNUSIGMAPLUSKAONPLUS = 1053
RESCCNUSIGMAPLUSKAON0 = 1055
RESCCNUBARSIGMAMINUSKAON0 = 1060
RESCCNUBARSIGMA0KAON0 = 1062
RESCCNUPROTONETA = 1067
RESCCNUBARNEUTRONETA = 1070
RESCCNUKAONPLUSLAMBDA0 = 1073
RESCCNUBARKAON0LAMBDA0 = 1076
RESCCNUPROTONPIPLUSPIMINUS = 1079
RESCCNUPROTONPI0PI0 = 1080
RESCCNUBARNEUTRONPIPLUSPIMINUS = 1085
RESCCNUBARNEUTRONPI0PI0 = 1086
RESCCNUBARPROTONPI0PI0 = 1090
CCDIS = 1091
NCDIS = 1092
UNUSED1 = 1093
UNUSED2 = 1094
CCQEHYPERON = 1095
NCCOH = 1096
CCCOH = 1097
NUELECTRONELASTIC = 1098
INVERSEMUDECAY = 1099
MEC2P2H = 1100
class spine.constants.enums.GenieNuInteractionType(value)[source]

Enumerates GENIE scattering categories.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

Methods

as_integer_ratio(/)

Return integer ratio.

bit_count(/)

Number of ones in the binary representation of the absolute value of self.

bit_length(/)

Number of bits necessary to represent self in binary.

conjugate

Returns self, the complex conjugate of any int.

from_bytes(/, bytes[, byteorder, signed])

Return the integer represented by the given array of bytes.

to_bytes(/[, length, byteorder, signed])

Return an array of bytes representing an integer.

UNKNOWN = -100
NULL = 0
QE = 1
SINGLEKAON = 2
DIS = 3
RES = 4
COH = 5
DIFFRACTIVE = 6
NUELECTRONELASTIC = 7
INVERSEMUDECAY = 8
AMNUGAMMA = 9
MEC = 10
COHELASTIC = 11
INVERSEBETADECAY = 12
GLASHOWRESONANCE = 13
IMDANNIHILATION = 14
PHOTONCOHERENT = 15
PHOTONRESONANCE = 16
SINGLEPION = 17
DARKMATTERELASTIC = 101
DARKMATTERDIS = 102
DARKMATTERELECTRON = 103
NORM = 104