pyg4ometry.fluka.directive

Classes

MatrixConvertibleMixin

Transform

expansion, translation, rotoTranslation can be either a single

RotoTranslation

translation in mm, angles in degrees

RecursiveRotoTranslation

container for dealing with a recursively defined

Functions

rotoTranslationFromTBxyz(name, tbxyz[, flukaregistry, ...])

tbxyz = trait bryan angles in radians

rotoTranslationFromTra2(name, tra2[, flukaregistry, ...])

_translationTo4DMatrix(translation)

_expansionFactorTo4DMatrix(factor)

_rightMultiplyMatrices(matrices)

Module Contents

class pyg4ometry.fluka.directive.MatrixConvertibleMixin
toScaleMatrix()
toTranslationMatrix()
toRotationMatrix()
netTranslation()
netExpansion()
leftMultiplyVector(vector)
leftMultiplyRotation(matrix)
hash()
class pyg4ometry.fluka.directive.Transform(*, expansion=None, translation=None, rotoTranslation=None, invertRotoTranslation=None)

Bases: MatrixConvertibleMixin

expansion, translation, rotoTranslation can be either a single instance of RotoTranslation or a multiple instances of RotoTranslation and RecursiveRotoTranslation

expansion
translation
rotoTranslation
invertRotoTranslation
_expansionsTo4DMatrices()
_translationsTo4DMatrices()
_rotoTranslationsTo4DMatrices()
to4DMatrix()
class pyg4ometry.fluka.directive.RotoTranslation(name, axis=None, polar=0.0, azimuth=0.0, translation=None, transformationIndex=None, flukaregistry=None)

Bases: MatrixConvertibleMixin

translation in mm, angles in degrees

name
axis
polar
azimuth
translation
transformationIndex
__repr__()
to4DMatrix()
toCard()
flukaFreeString()
classmethod fromCard(card)
hasTranslation()
hasRotation()
isPureTranslation()
class pyg4ometry.fluka.directive.RecursiveRotoTranslation(name, rotoTranslations)

Bases: collections.abc.MutableSequence, MatrixConvertibleMixin

container for dealing with a recursively defined rototranslation. they must also refer to the same rototrans, i.e., have the same name. for a list of rototranslations supplied:

[a, b, c], the order of evaluation acting on a vector v is c*b*a*v. so teh first rototrans is applied first.. and so on.

name
_rtransList
names
__repr__()
__getitem__(i)
_raiseIfDifferentName(name)
__setitem__(i, obj)
__delitem__(i)
__len__()
insert(i, obj)

S.insert(index, value) – insert value before index

to4DMatrix()
flukaFreeString()
_transformationIndices()
areAllTheSameTransformationIndices()
property transformationIndex
pyg4ometry.fluka.directive.rotoTranslationFromTBxyz(name, tbxyz, flukaregistry=None, allowZero=False)

tbxyz = trait bryan angles in radians

pyg4ometry.fluka.directive.rotoTranslationFromTra2(name, tra2, flukaregistry=None, allowZero=False)
pyg4ometry.fluka.directive._translationTo4DMatrix(translation)
pyg4ometry.fluka.directive._expansionFactorTo4DMatrix(factor)
pyg4ometry.fluka.directive._rightMultiplyMatrices(matrices)