def say(self, det=None): """print header/detector information""" if det is None: self.sayHeader() else: bin = self.detector[det] say("Bin : ", bin.nb) say("Title : ", bin.name) say("Type : ", bin.type) say("Score : ", bin.score) say("X : [", bin.xlow, "-", bin.xhigh, "] x", bin.nx, "dx=", bin.dx) say("Y : [", bin.ylow, "-", bin.yhigh, "] x", bin.ny, "dy=", bin.dy) say("Z : [", bin.zlow, "-", bin.zhigh, "] x", bin.nz, "dz=", bin.dz) say("L : ", bin.lntzer) say("bk : ", bin.bk) say("b2 : ", bin.b2) say("tc : ", bin.tc)
def say(self, det=None): """print header/detector information""" if det is None: self.sayHeader() else: det = self.detector[det] say("BDX : ", det.nb) say("Title : ", det.name) say("Type : ", det.type) say("Dist : ", det.dist) say("Reg1 : ", det.reg1) say("Reg2 : ", det.reg2) say("Area : ", det.area) say("2way : ", det.twoway) say("Fluence: ", det.fluence) say("LowNeu : ", det.lowneu) say("Energy : [", det.elow, "..", det.ehigh, "] ne=", det.ne, "de=", det.de) if det.lowneu: say("LOWNeut : [", det.egroup[-1], "..", det.egroup[0], "] ne=", det.ngroup) say("Angle : [", det.alow, "..", det.ahigh, "] na=", det.na, "da=", det.da) say("Total : ", det.total, "+/-", det.totalerror)
def sayHeader(self): say("File : ", self.file) say("Title : ", self.title) say("Time : ", self.time) say("Weight : ", self.weight) say("NCase : ", self.ncase) say("NBatch : ", self.nbatch)
def say(self, det=None): """print header/detector information""" if det is None: self.sayHeader() else: bin = self.detector[det] say("Bin : ", bin.nb) say("Title : ", bin.name) say("Type : ", bin.type) say("Region : ", bin.region) say("Volume : ", bin.volume) say("Mhigh : ", bin.mhigh) say("Zhigh : ", bin.zhigh) say("NMZmin : ", bin.nmzmin)
half = 0 f.close() # if first: # self.det.set(first) #=============================================================================== if __name__ == "__main__": import sys # say("="*80) # mgdraw = Mgdraw("examples/source001_source") # while mgdraw.readEvent(): # say(mgdraw.data) say("=" * 80) usr = Usrbdx(sys.argv[1]) usr.say() for i in range(len(usr.detector)): say("-" * 50) usr.say(i) data = unpackArray(usr.readData(i)) stat = unpackArray(usr.readStat(i)) #say( len(data), len(stat)) #for j,(d,e) in enumerate(zip(data,stat)): # say(j,d,e) #say() #usr = Resnuclei(sys.argv[1]) #usr.say() #for i in range(len(usr.detector)):