Пример #1
0
def read2015Geometry(fn):
    xmlgeometry = MioctGeometryXMLReader(fn)
    miocts = []
    for MIOCT in xmlgeometry.getMIOCTs():
        sectors = []
        for sector in MIOCT.Sectors:
            #if sn.startswith('B'): continue
            rois = []
            for roiElem in sector.ROIs:
                rois += [ROI.fromROIelement(roiElem)]
            sectors += [
                Sector(name=sector['name'],
                       connector=int(sector['connector']),
                       rois=rois)
            ]
        miocts += [
            Mioct(id=int(MIOCT['id']),
                  slot=int(MIOCT['slot']),
                  sectors=sectors)
        ]
        decodes = Decodes()
        for tc in MIOCT.Decode.TopoCells:
            decodes.addTopoCell(TopoCell.fromTopoCellElement(tc))
        miocts[-1].decodes = decodes
    return MuonGeometry("full geometry 2015", miocts=miocts)
Пример #2
0
def readXML(filename):
    return MioctGeometryXMLReader(filename)
Пример #3
0
def readXML(filename):
    geom = MioctGeometryXMLReader(filename)
    #print [str(m) for m in geom.getMIOCTs()]
    return geom