pymchelper.flair package#

Subpackages#

Submodules#

pymchelper.flair.Data module#

class pymchelper.flair.Data.Detector[source]#

Bases: object

class pymchelper.flair.Data.Mgdraw(filename=None)[source]#

Bases: object

close()[source]#
open(filename)[source]#

Read header information, and return the file handle

readEnergy(icode, jtrack, etrack, wtrack)[source]#
readEvent(e_type=None)[source]#
readSource(ncase, npflka, nstmax, tkesum, weipri)[source]#
readTracking(ntrack, mtrack, jtrack, etrack, wtrack)[source]#
reset()[source]#

Reset information

class pymchelper.flair.Data.Resnuclei(filename=None)[source]#

Bases: Usrxxx

readData(n)[source]#

Read detector det data structure

readHeader(filename)[source]#

Read residual nuclei detector information

readStat(n)[source]#

Read detector det statistical data

say(det=None)[source]#

print header/detector information

class pymchelper.flair.Data.UsrTrack(filename=None)[source]#

Bases: Usrxxx

readData(n)[source]#

Read detector n data structure

readHeader(filename)[source]#

Read USRTRACK detector information

readStat(n)[source]#

Read detector n statistical data

say(det=None)[source]#

print header/detector information

class pymchelper.flair.Data.Usrbdx(filename=None)[source]#

Bases: Usrxxx

readData(n)[source]#

Read detector n data structure

readHeader(filename)[source]#

Read boundary crossing detector information

readStat(n)[source]#

Read detector n statistical data

say(det=None)[source]#

print header/detector information

class pymchelper.flair.Data.Usrbin(filename=None)[source]#

Bases: Usrxxx

readData(n)[source]#

Read detector det data structure

readHeader(filename)[source]#

Read USRBIN detector information

readStat(n)[source]#

Read detector n statistical data

say(det=None)[source]#

print header/detector information

class pymchelper.flair.Data.Usrxxx(filename=None)[source]#

Bases: object

readData(det)[source]#

Read detector det data structure

readHeader(filename)[source]#

Read header information, and return the file handle

readStat(det)[source]#

Read detector det statistical data

reset()[source]#

Reset header information

sayHeader()[source]#
pymchelper.flair.Data.unpackArray(data)[source]#

pymchelper.flair.Input module#

class pymchelper.flair.Input.Card(tag, what=None, comment='', extra='')[source]#

Bases: object

Base class for a fluka card

BODY = 1#
GENERIC = 0#
OBJECT = 3#
REGION = 2#
absWhat(w)[source]#

return the absolute value of what[w]

addUserInvalid(item)[source]#
addZone(zone)[source]#

Add zone to card

appendComment(comment)[source]#

append comment

appendWhats(what, pos=None)[source]#

append what’s

bodyN()[source]#

Normal of body

bodyP()[source]#

Position of body

bodyP1()#

Position of body

bodyP2()[source]#
bodyPn(n)[source]#
bodyR()[source]#

Radius (or x-radius) of body

bodyX()[source]#

X-vector of body

bodyY()[source]#

Y-vector of body

bodyZ()[source]#

Z-vector of body

case()[source]#
changeTag(tag, truncate=True)[source]#

change tag of card

clearUserInvalid()[source]#
clone()[source]#

clone card object

static cmpPos_key(a)[source]#
comment()[source]#
commentStr()[source]#

return a comment string

convert(tonames=True)[source]#
copyProperties(card)[source]#

Copy properties from card

diff(card)[source]#

Return differences of the two cards as a list of integers -3 = enable/disable -2 = Comment -1 = Extra 0 = Sdum 1..n = What’s :param card: :return:

disable()[source]#

disable card

dump(pickler)[source]#
errorMessage(labels=())[source]#
evalWhat(n, dollar=True)[source]#

return evaluated what if needed

evalWhat0(n, dollar=True)[source]#
evalWhatStr()[source]#

return string for special evaluated whats

extra()[source]#
findType(target)[source]#

return whats with a specific type from the card, pi, mi, …

get(t=None, default=None)#

get card information

getProperty(t, default=None)[source]#
ignore()[source]#
indent()[source]#
intWhat(n)[source]#

try to return an integer from what

isEvalWhat(w)[source]#
isGeo()[source]#
load(unpickler)[source]#
loadVoxel()[source]#

Load voxel information

longWhat(n)[source]#

try to return a long integer from what

name()#
notIgnore()[source]#
numWhat(n)[source]#

try to return a number from what

nwhats()[source]#
pos()[source]#
sdum()[source]#
set(t, v)#

set value to what(#, sdum, comment, extra)

setAbsWhat(w, v)[source]#

change the absolute value of what keeping the same sign

setActive(a)[source]#

set active state of card

setComment(comment='')[source]#

set comment string

setEnable(e)[source]#

set state enable(True)/disable(False)

setExtra(e)[source]#

set extra information

setModified()[source]#

set last time modified

setNWhats(n)[source]#

set the total number of whats

setName(s)#

set sdum

setProperty(t, v)[source]#
setSdum(s)[source]#

set sdum

setSign(w, s)[source]#
setWhat(w, v)[source]#

set what value

setWhats(whats)[source]#
setZones(zones)[source]#

Set a list of zones as expression… removing empty zones

sign(w)[source]#

return sign of a number: False=+, True=-

static splitExpr(expr, maxlength=100)[source]#
test(func, var, val, case=False)[source]#

test card against a filter-function Filter format type [function]

what value

func: [type][function]
type: i=int

f=float s=string

function:

a=abs

var:
0..9 = whats
  • = anywhere

b = body d = detector s = sdum

m = material p = particle (range if tuple) r = region (range if tuple)

t = transformation

u = unit

param func:

param var:

param val:

anything int, float or string

param case:

True for matching case

return:

toStr(fmt=None)[source]#
type()[source]#
units(absolute=True)[source]#

return unit from card

validate(case=None)[source]#
what(n)[source]#
whats()[source]#
class pymchelper.flair.Input.CardInfo(name, group, range_, extra, assert_, default, meaning)[source]#

Bases: object

static compileAssert(assertStatement)[source]#

Compile assert statement First detect all what references w(#) and replace them with:

w(#) -> c.numWhat(#) W(#) -> c.what(#)

identify all what-indexes to report as problems and request in the code that are not zero!

finally compile the code example: w(8)>w(7)

lambda c: c.numWhat(7)==0 or c.numWhat(8)==0 or c.numWhat(8)>c.numWhat(7)

Parameters:

assertStatement

Returns:

static compileConditions(rng)[source]#
find(target, case)[source]#
Parameters:
  • target

  • case

Returns:

list - of references, tuple - for a range

findCase(card)[source]#

Find card’s range(case)

static get(card)[source]#
static none()[source]#
setDisableComment(c=False)[source]#
toNames(card, case=None)[source]#
validate(card, case=None)[source]#

Validate card: return a list of failing variables.

class pymchelper.flair.Input.Input(filename=None)[source]#

Bases: object

addCard(card, pos=None, renumber=False)[source]#

Add a card to list at position pos WARNING: renumber is False (on contrast with delCard, moveCard) :param card: :param pos: :param renumber: :return:

addCardProperty(tag, proptag, prop, valueWhat, fromWhat, toWhat=-1, stepWhat=-1, sdum=None, func=None)[source]#

Append to card’s properties the additional value from tag’s :param tag: cards to append the extra property :param proptag: cards from where to get the property :param prop: property name to add in cards :param valueWhat: which value to add as property :param fromWhat: range of cards :param toWhat: range of cards :param stepWhat: range of cards :param sdum: filter cards with the specific sdum :param func: apply a function to value :return:

allcards()[source]#

Return an extend list with all cards including the ones from the voxel

bestPosition(tag)[source]#

Find best position from the sorting order in the file search which card is closer to one we’ve asked :param tag: :return:

bodyProperties()[source]#

Return the body properties as a dictionary of the active/enabled bodies :return:

cardsCache(tag, what=None)[source]#

Cache lists when they are requested

cardsSorted(tag, which=0)[source]#

Return cards of a specific tag sorted with _pos Possibilities on which:

0: enabled and active (requires a call to preprocess before) 1: enabled 2: all

Warning on REGION maybe the “&” you want to get rid off :param tag: :param which: :return:

changeAllTags(old, new, show=True)[source]#

Changing all cards tag from old to new

changeName(type, old, new)[source]#

Change name to all cards

changeTag(card, newtag)[source]#

Change card tag

static checkCompound(card, all=False)[source]#

Check COMPOUND cards for correct mixture

checkFormat(card)[source]#

Find current format FIXME #defines and state! :param card: :return:

checkInputFile()[source]#

Check if a new input file exists

checkNumbering()[source]#

Verify the internal order of the cards

clearCache(tag=None)[source]#
clone()[source]#

return a clone of current input

convert2Names()[source]#

Convert input to names and check for obsolete and/or non-valid cards

delCard(pos, renumber=True)[source]#

Delete card by position

delGeometryCards()[source]#

Delete geometry cards

delTag(tag, renumber=True)[source]#

Delete all cards with a specific tag

dump(pickler)[source]#

dump input to pickler

filenames()[source]#

Return input filename

getTransformation(idx=None, rotdefi=None, inv=False)[source]#

FIXME I should combine the rotdefi with the self.cache! :param idx: rotation to return, Can be prefixed with “-”, None to return a dictionary :param rotdefi: cached dictionary :param inv: return the inverse of the idx matrix. Accepted even if idx is prefixed with “-” :return: rotation matrix from a rot-defi cards or a dictionary with all transformations

include(includecard)[source]#

include card has been modified take appropriate action :param includecard: :return: True if #include has modified the input, False if nothing happened

load(unpickler)[source]#

load input from unpickle

material(mat, toName)[source]#

Convert material to name/number :param mat: :param toName: :return:

materialDict()[source]#
materialList(which=0, icru=False, assigned=False)[source]#
materialZAID(material)[source]#
minimumInput()[source]#

Create bare minimum input file

moveCard(src, dest, renumber=True)[source]#

Move card (src) at position (dest)

parse()[source]#

Import/parse a file including geometry

preprocess(activeDefines=None)[source]#

Pre-process all cards and set correspondingly the card.active flag nest[] contains the evaluation of the nesting -1: inactive - do not include any subsequent #if..

0: false & active - include substitute #if.. 1: true & active 2: false & active after else 3: true & active after else

FIXME values do not WORK! :param activeDefines: :return: list of error cards

read(filename)[source]#

Open and read a fluka input file, return True if error

refresh()[source]#
region(reg, toName)[source]#

Convert region to name/number :param reg: :param toName: :return:

regionProperties()[source]#

Return the region properties as a dictionary of the active/enabled regions :return:

renumber(fromPos=0, toPos=-1)[source]#

Put the correct index to cards in the range given by fromPos:toPos

replaceCard(pos, card)[source]#

replace card at position (pos) with card

rotdefiCards(idx)[source]#
rotdefiList(negative=False)[source]#
scanUnits()[source]#

Scan for units

setFileTime()[source]#

Set as input/modified time the latest time from files

setModified()[source]#

set last time modified

transformBody(card, matrix)[source]#

Transform a body card, using a 4x4 transformation matrix

validate()[source]#

Validate all active cards

write(filename, backup=True)[source]#

Open and write the input to file (specified either by filename, or by file pointer). Optionally use a different geometry file and a different format

static writeCard(f, card, fmt)[source]#

write a single card

writeCards(f, condition, format=None, geolevel=0, from_=0, to_=-1)[source]#

Write cards of that fulfill a given condition(lambda) with all the preprocessor cards around them FIXME Write also non empty blocks: #if .. #define/#undef .. #endif

Might end up in duplicate blocks when only #define/#undef exist inside the geometry

geolevel
-1 before defines

0 before geobegin 1 bodies and voxels 2 regions 3 lattices 4 after geoend

from_ .. to_ (to_ is not included) :param f: :param condition: :param format: :param geolevel: :param from_: :param to_: :return:

writeGeometry(fgeo, geoFmt=None, fmt=None)[source]#
Write geometry only

preprocessor cards are written only when cards are in the correct position

Parameters:
  • fgeo

  • geoFmt

  • fmt

Returns:

writeWithInclude(filename, backup=True)[source]#

Open and write the input to file (specified either by filename, or by file pointer). Optionally use a different geometry file and a different format # WARNING FIXME no testing is done for the correctness of the file

class pymchelper.flair.Input.LocalDict(input)[source]#

Bases: dict

Implement the local dictionary

bodyWhat(name, what)[source]#
cardWhat(tag, name, what)[source]#
clear()[source]#

Clear dictionary and set default variables

class pymchelper.flair.Input.LogicalUnits[source]#

Bases: object

assign(unit, tag, fn=None)[source]#

Assign a new unit to tag

clear(unit)[source]#

Clear a unit from list

filterList(card=None, bin=True)[source]#

Return a list of all units, filtered for a card

free()[source]#

Return first free unit

get(u)[source]#

Return unit information

reset()[source]#
scan(input)[source]#
class pymchelper.flair.Input.LowNeutMaterial[source]#

Bases: object

Structures as placeholders

class pymchelper.flair.Input.Particle(id, name, mass=0.0, comment=None, pdg=None)[source]#

Bases: object

static add(id, name, mass=0.0, comment=None, pdg=None)[source]#
beam = ['', '3-HELIUM', '4-HELIUM', 'AKAONZER', 'ALAMBDA', 'ALAMBDC-', 'ANEUTRIE', 'ANEUTRIM', 'ANEUTRIT', 'ANEUTRON', 'AOMEGA+', 'AOMEGAC0', 'APROTON', 'ASIGMA+', 'ASIGMA-', 'ASIGMAZE', 'AXSI+', 'AXSIC-', 'AXSIC0', 'AXSIPC-', 'AXSIPC0', 'AXSIZERO', 'D+', 'D-', 'D0', 'D0BAR', 'DEUTERON', 'DS+', 'DS-', 'ELECTRON', 'HEAVYION', 'ISOTOPE', 'KAON+', 'KAON-', 'KAONLONG', 'KAONSHRT', 'KAONZERO', 'LAMBDA', 'LAMBDAC+', 'MUON+', 'MUON-', 'NEUTRIE', 'NEUTRIM', 'NEUTRIT', 'NEUTRON', 'OMEGA-', 'OMEGAC0', 'OPTIPHOT', 'PHOTON', 'PION+', 'PION-', 'PIZERO', 'POSITRON', 'PROTON', 'RAY', 'SIGMA+', 'SIGMA-', 'SIGMAZER', 'TAU+', 'TAU-', 'TRITON', 'WWLOWNEU', 'XSI-', 'XSIC+', 'XSIC0', 'XSIPC+', 'XSIPC0', 'XSIZERO']#
static convert(pid, tonames=True)[source]#

Convert particle from name to number particle type :param tonames: True/False :return:

static get(idx)[source]#
list = ['', '3-HELIUM', '4-HELIUM', 'AKAONZER', 'ALAMBDA', 'ALAMBDC-', 'ANEUTRIE', 'ANEUTRIM', 'ANEUTRIT', 'ANEUTRON', 'AOMEGA+', 'AOMEGAC0', 'APROTON', 'ASIGMA+', 'ASIGMA-', 'ASIGMAZE', 'AXSI+', 'AXSIC-', 'AXSIC0', 'AXSIPC-', 'AXSIPC0', 'AXSIZERO', 'D+', 'D-', 'D0', 'D0BAR', 'DEUTERON', 'DS+', 'DS-', 'ELECTRON', 'HEAVYION', 'KAON+', 'KAON-', 'KAONLONG', 'KAONSHRT', 'KAONZERO', 'LAMBDA', 'LAMBDAC+', 'MUON+', 'MUON-', 'NEUTRIE', 'NEUTRIM', 'NEUTRIT', 'NEUTRON', 'OMEGA-', 'OMEGAC0', 'OPTIPHOT', 'PHOTON', 'PION+', 'PION-', 'PIZERO', 'POSITRON', 'PROTON', 'RAY', 'SIGMA+', 'SIGMA-', 'SIGMAZER', 'TAU+', 'TAU-', 'TRITON', 'WWLOWNEU', 'XSI-', 'XSIC+', 'XSIC0', 'XSIPC+', 'XSIPC0', 'XSIZERO', '@LASTPAR']#
listAll = ['', '3-HELIUM', '4-HELIUM', 'ACTIVITY', 'ACTOMASS', 'AKAONZER', 'ALAMBDA', 'ALAMBDC-', 'ALL-CHAR', 'ALL-IONS', 'ALL-NEGA', 'ALL-NEUT', 'ALL-PART', 'ALL-POSI', 'ALPHA-D', 'ANEUTRIE', 'ANEUTRIM', 'ANEUTRIT', 'ANEUTRON', 'ANNIHRST', 'AOMEGA+', 'AOMEGAC0', 'AP&AN', 'APROTON', 'ASIGMA+', 'ASIGMA-', 'ASIGMAZE', 'AXSI+', 'AXSIC-', 'AXSIC0', 'AXSIPC-', 'AXSIPC0', 'AXSIZERO', 'BEAMPART', 'C-(A)BAR', 'C-MESONS', 'CHARMED', 'D+', 'D-', 'D0', 'D0BAR', 'DEUTERON', 'DOSE', 'DOSE-EM', 'DOSE-EQ', 'DOSE-H2O', 'DOSEQLET', 'DPA-NRES', 'DPA-SCO', 'DS+', 'DS-', 'E+&E-', 'E+E-GAMM', 'ELECTRON', 'EM-ENRGY', 'ENERGY', 'FISSIONS', 'HAD-CHAR', 'HAD-NEUT', 'HADGT20M', 'HE-FISS', 'HEAVYION', 'HEHAD-EQ', 'HVY-IONS', 'ISOTOPE', 'KAON+', 'KAON-', 'KAONLONG', 'KAONS', 'KAONS+-', 'KAONS0', 'KAONSHRT', 'KAONZERO', 'LAMBDA', 'LAMBDAC+', 'LE-FISS', 'LGH-IONS', 'LOWENNEU', 'MUON+', 'MUON-', 'MUONS', 'NET-CHRG', 'NEU-BALA', 'NEUTRIE', 'NEUTRIM', 'NEUTRIT', 'NEUTRON', 'NIEL-DEP', 'NTLOWENE', 'NUC&PI+-', 'NUCLEONS', 'OMEGA-', 'OMEGAC0', 'OPTIPHOT', 'PHOTON', 'PION+', 'PION-', 'PIONS+-', 'PIZERO', 'POSITRON', 'PROTON', 'RAY', 'RES-NIEL', 'RES-NUCL', 'SI1MEVNE', 'SIGMA+', 'SIGMA-', 'SIGMAZER', 'SQBETA-D', 'STRANGE', 'TAU+', 'TAU-', 'THNEU-EQ', 'TRITON', 'UNB-EMEN', 'UNB-ENER', 'WWLOWNEU', 'X-MOMENT', 'XSI-', 'XSIC+', 'XSIC0', 'XSIPC+', 'XSIPC0', 'XSIZERO', 'Y-MOMENT', 'Z-MOMENT', '@LASTPAR']#
static makeLists()[source]#
particles = ['', '3-HELIUM', '4-HELIUM', 'AKAONZER', 'ALAMBDA', 'ALAMBDC-', 'ALL-CHAR', 'ALL-NEGA', 'ALL-NEUT', 'ALL-PART', 'ALL-POSI', 'ANEUTRIE', 'ANEUTRIM', 'ANEUTRIT', 'ANEUTRON', 'AOMEGA+', 'AOMEGAC0', 'AP&AN', 'APROTON', 'ASIGMA+', 'ASIGMA-', 'ASIGMAZE', 'AXSI+', 'AXSIC-', 'AXSIC0', 'AXSIPC-', 'AXSIPC0', 'AXSIZERO', 'BEAMPART', 'C-(A)BAR', 'C-MESONS', 'CHARMED', 'D+', 'D-', 'D0', 'D0BAR', 'DEUTERON', 'DS+', 'DS-', 'E+&E-', 'ELECTRON', 'HAD-CHAR', 'HAD-NEUT', 'HEAVYION', 'KAON+', 'KAON-', 'KAONLONG', 'KAONS', 'KAONS+-', 'KAONS0', 'KAONSHRT', 'KAONZERO', 'LAMBDA', 'LAMBDAC+', 'MUON+', 'MUON-', 'MUONS', 'NEUTRIE', 'NEUTRIM', 'NEUTRIT', 'NEUTRON', 'NUC&PI+-', 'NUCLEONS', 'OMEGA-', 'OMEGAC0', 'OPTIPHOT', 'PHOTON', 'PION+', 'PION-', 'PIONS+-', 'PIZERO', 'POSITRON', 'PROTON', 'RAY', 'SIGMA+', 'SIGMA-', 'SIGMAZER', 'STRANGE', 'TAU+', 'TAU-', 'TRITON', 'WWLOWNEU', 'XSI-', 'XSIC+', 'XSIC0', 'XSIPC+', 'XSIPC0', 'XSIZERO']#
static scan(input)[source]#
signedList = ['', '3-HELIUM', '-3-HELIUM', '4-HELIUM', '-4-HELIUM', 'AKAONZER', '-AKAONZER', 'ALAMBDA', '-ALAMBDA', 'ALAMBDC-', '-ALAMBDC-', 'ANEUTRIE', '-ANEUTRIE', 'ANEUTRIM', '-ANEUTRIM', 'ANEUTRIT', '-ANEUTRIT', 'ANEUTRON', '-ANEUTRON', 'AOMEGA+', '-AOMEGA+', 'AOMEGAC0', '-AOMEGAC0', 'APROTON', '-APROTON', 'ASIGMA+', '-ASIGMA+', 'ASIGMA-', '-ASIGMA-', 'ASIGMAZE', '-ASIGMAZE', 'AXSI+', '-AXSI+', 'AXSIC-', '-AXSIC-', 'AXSIC0', '-AXSIC0', 'AXSIPC-', '-AXSIPC-', 'AXSIPC0', '-AXSIPC0', 'AXSIZERO', '-AXSIZERO', 'D+', '-D+', 'D-', '-D-', 'D0', '-D0', 'D0BAR', '-D0BAR', 'DEUTERON', '-DEUTERON', 'DS+', '-DS+', 'DS-', '-DS-', 'ELECTRON', '-ELECTRON', 'HEAVYION', '-HEAVYION', 'KAON+', '-KAON+', 'KAON-', '-KAON-', 'KAONLONG', '-KAONLONG', 'KAONSHRT', '-KAONSHRT', 'KAONZERO', '-KAONZERO', 'LAMBDA', '-LAMBDA', 'LAMBDAC+', '-LAMBDAC+', 'MUON+', '-MUON+', 'MUON-', '-MUON-', 'NEUTRIE', '-NEUTRIE', 'NEUTRIM', '-NEUTRIM', 'NEUTRIT', '-NEUTRIT', 'NEUTRON', '-NEUTRON', 'OMEGA-', '-OMEGA-', 'OMEGAC0', '-OMEGAC0', 'OPTIPHOT', '-OPTIPHOT', 'PHOTON', '-PHOTON', 'PION+', '-PION+', 'PION-', '-PION-', 'PIZERO', '-PIZERO', 'POSITRON', '-POSITRON', 'PROTON', '-PROTON', 'RAY', '-RAY', 'SIGMA+', '-SIGMA+', 'SIGMA-', '-SIGMA-', 'SIGMAZER', '-SIGMAZER', 'TAU+', '-TAU+', 'TAU-', '-TAU-', 'TRITON', '-TRITON', 'WWLOWNEU', '-WWLOWNEU', 'XSI-', '-XSI-', 'XSIC+', '-XSIC+', 'XSIC0', '-XSIC0', 'XSIPC+', '-XSIPC+', 'XSIPC0', '-XSIPC0', 'XSIZERO', '-XSIZERO', '@LASTPAR']#
signedListAll = ['', '3-HELIUM', '-3-HELIUM', '4-HELIUM', '-4-HELIUM', 'ACTIVITY', '-ACTIVITY', 'ACTOMASS', '-ACTOMASS', 'AKAONZER', '-AKAONZER', 'ALAMBDA', '-ALAMBDA', 'ALAMBDC-', '-ALAMBDC-', 'ALL-CHAR', '-ALL-CHAR', 'ALL-IONS', '-ALL-IONS', 'ALL-NEGA', '-ALL-NEGA', 'ALL-NEUT', '-ALL-NEUT', 'ALL-PART', '-ALL-PART', 'ALL-POSI', '-ALL-POSI', 'ALPHA-D', '-ALPHA-D', 'ANEUTRIE', '-ANEUTRIE', 'ANEUTRIM', '-ANEUTRIM', 'ANEUTRIT', '-ANEUTRIT', 'ANEUTRON', '-ANEUTRON', 'ANNIHRST', '-ANNIHRST', 'AOMEGA+', '-AOMEGA+', 'AOMEGAC0', '-AOMEGAC0', 'AP&AN', '-AP&AN', 'APROTON', '-APROTON', 'ASIGMA+', '-ASIGMA+', 'ASIGMA-', '-ASIGMA-', 'ASIGMAZE', '-ASIGMAZE', 'AXSI+', '-AXSI+', 'AXSIC-', '-AXSIC-', 'AXSIC0', '-AXSIC0', 'AXSIPC-', '-AXSIPC-', 'AXSIPC0', '-AXSIPC0', 'AXSIZERO', '-AXSIZERO', 'BEAMPART', '-BEAMPART', 'C-(A)BAR', '-C-(A)BAR', 'C-MESONS', '-C-MESONS', 'CHARMED', '-CHARMED', 'D+', '-D+', 'D-', '-D-', 'D0', '-D0', 'D0BAR', '-D0BAR', 'DEUTERON', '-DEUTERON', 'DOSE', '-DOSE', 'DOSE-EM', '-DOSE-EM', 'DOSE-EQ', '-DOSE-EQ', 'DOSE-H2O', '-DOSE-H2O', 'DOSEQLET', '-DOSEQLET', 'DPA-NRES', '-DPA-NRES', 'DPA-SCO', '-DPA-SCO', 'DS+', '-DS+', 'DS-', '-DS-', 'E+&E-', '-E+&E-', 'E+E-GAMM', '-E+E-GAMM', 'ELECTRON', '-ELECTRON', 'EM-ENRGY', '-EM-ENRGY', 'ENERGY', '-ENERGY', 'FISSIONS', '-FISSIONS', 'HAD-CHAR', '-HAD-CHAR', 'HAD-NEUT', '-HAD-NEUT', 'HADGT20M', '-HADGT20M', 'HE-FISS', '-HE-FISS', 'HEAVYION', '-HEAVYION', 'HEHAD-EQ', '-HEHAD-EQ', 'HVY-IONS', '-HVY-IONS', 'ISOTOPE', '-ISOTOPE', 'KAON+', '-KAON+', 'KAON-', '-KAON-', 'KAONLONG', '-KAONLONG', 'KAONS', '-KAONS', 'KAONS+-', '-KAONS+-', 'KAONS0', '-KAONS0', 'KAONSHRT', '-KAONSHRT', 'KAONZERO', '-KAONZERO', 'LAMBDA', '-LAMBDA', 'LAMBDAC+', '-LAMBDAC+', 'LE-FISS', '-LE-FISS', 'LGH-IONS', '-LGH-IONS', 'LOWENNEU', '-LOWENNEU', 'MUON+', '-MUON+', 'MUON-', '-MUON-', 'MUONS', '-MUONS', 'NET-CHRG', '-NET-CHRG', 'NEU-BALA', '-NEU-BALA', 'NEUTRIE', '-NEUTRIE', 'NEUTRIM', '-NEUTRIM', 'NEUTRIT', '-NEUTRIT', 'NEUTRON', '-NEUTRON', 'NIEL-DEP', '-NIEL-DEP', 'NTLOWENE', '-NTLOWENE', 'NUC&PI+-', '-NUC&PI+-', 'NUCLEONS', '-NUCLEONS', 'OMEGA-', '-OMEGA-', 'OMEGAC0', '-OMEGAC0', 'OPTIPHOT', '-OPTIPHOT', 'PHOTON', '-PHOTON', 'PION+', '-PION+', 'PION-', '-PION-', 'PIONS+-', '-PIONS+-', 'PIZERO', '-PIZERO', 'POSITRON', '-POSITRON', 'PROTON', '-PROTON', 'RAY', '-RAY', 'RES-NIEL', '-RES-NIEL', 'RES-NUCL', '-RES-NUCL', 'SI1MEVNE', '-SI1MEVNE', 'SIGMA+', '-SIGMA+', 'SIGMA-', '-SIGMA-', 'SIGMAZER', '-SIGMAZER', 'SQBETA-D', '-SQBETA-D', 'STRANGE', '-STRANGE', 'TAU+', '-TAU+', 'TAU-', '-TAU-', 'THNEU-EQ', '-THNEU-EQ', 'TRITON', '-TRITON', 'UNB-EMEN', '-UNB-EMEN', 'UNB-ENER', '-UNB-ENER', 'WWLOWNEU', '-WWLOWNEU', 'X-MOMENT', '-X-MOMENT', 'XSI-', '-XSI-', 'XSIC+', '-XSIC+', 'XSIC0', '-XSIC0', 'XSIPC+', '-XSIPC+', 'XSIPC0', '-XSIPC0', 'XSIZERO', '-XSIZERO', 'Y-MOMENT', '-Y-MOMENT', 'Z-MOMENT', '-Z-MOMENT', '@LASTPAR']#
class pymchelper.flair.Input.Vector(x=3, *args)[source]#

Bases: Vector

flair vector returning a string with {} representation

class pymchelper.flair.Input.Voxel(filename=None)[source]#

Bases: object

Voxel class
parse the voxel file and create fake cards for the

materials, assignmats and corrfact

that might be embedded in the voxel file

cleanup()[source]#
read(filename)[source]#
static regionName(idx)[source]#

return a valid region name

pymchelper.flair.Input.init(filename=None)[source]#
Initialize classes:

CardInfo Particle

Parameters:

filename

Returns:

pymchelper.flair.Input.isEvalStr(w)[source]#

return is the what string is an evaluated function

pymchelper.flair.Input.utfReadline(f)[source]#

Readline and convert it to unicode if necessary

pymchelper.flair.Input.utfWrite(f, s)[source]#

Write in utf format if necessary

pymchelper.flair.Input.utfWriteln(f, s)[source]#
pymchelper.flair.Input.writeln(f, s)[source]#

Module contents#