107 title = Label(self, text=
"Geant4Py for Education @ H. Yoshida Naruto Univ. of Education")
108 title.grid(row=0, column=1, columnspan=5)
109 header = Label(self, text=
"Measurement of Mass Attenuation Coefficient")
110 header.grid(row=1, column=1, columnspan=5)
113 materialLabel = Label(self, bg=
"green", text=
"Material")
114 materialLabel.grid(row=2, column=0, sticky=W)
116 self.materialVar.set(
"water")
119 for i
in absorber.keys():
120 ra1[i] = Radiobutton(self, text=i, variable=self.
materialVar, value=i)
121 ra1[i].grid(row=2, column=pos, sticky=W)
125 thickLabel = Label(self, bg=
"green", text=
"Thickness (mm)")
127 self.thickVar.set(100.0)
128 thick = Scale(self, orient=HORIZONTAL, length=400, from_=0., to=100., resolution=0.05, tickinterval=10.0, digits=4, variable=self.
thickVar)
129 thickLabel.grid(row=3, column=0, sticky=W)
130 thick.grid(row=3, column=1, columnspan=5, sticky=W)
133 self.
solid = g4py.ezgeom.G4EzVolume.GetSold(water_phantom)
136 particleLabel = Label(self, bg=
"green", text=
"Particle")
137 particleLabel.grid(row=4, column=0, sticky=W)
139 self.particleVar.set(
"gamma")
142 for i
in (
"gamma",
"e-"):
143 ra1[i] = Radiobutton(self, text=i, variable=self.
particleVar, value=i)
144 ra1[i].grid(row=4, column=pos1, sticky=W)
148 energyLabel = Label(self, bg=
"green", text=
"Energy (MeV)")
151 self.energyVar.set(1)
152 energy = Scale(self, orient=HORIZONTAL, length=400, from_=0., to=100., tickinterval=10.0, resolution=0.1, variable=self.
energyVar, digits=4 )
153 energyLabel.grid(row=5, column=0, sticky=W)
154 energy.grid(row=5, column=1, columnspan=5, sticky=W)
157 eventLabel = Label(self, bg=
"green", text=
"Events")
159 event = Scale(self, orient=HORIZONTAL, length=400, from_=1, to=100, tickinterval=10, resolution=1, variable=self.
eventVar )
160 eventLabel.grid(row=6, column=0, sticky=W)
161 event.grid(row=6, column=1, columnspan=5, sticky=W)
164 startBut = Button(self, bg=
"orange", text=
"Start a run", command=self.
cmd_beamOn)
165 startBut.grid(row=0, column=0, sticky=W)
168 visLabel = Label(self, text=
"viewer", bg=
"orange")
169 expandBut = Button(self, text=
"Zoom in", command=self.
cmd_expand)
170 shrinkBut = Button(self, text=
"Zoom out", command=self.
cmd_shrink)
171 visLabel.grid(row=8, column=0, sticky=W)
172 expandBut.grid(row=8, column=1, sticky=W)
173 shrinkBut.grid(row=8, column=2, sticky=W)
175 upBut = Button(self, text=
"Up", command=self.
cmd_up)
176 downBut = Button(self, text=
"Down", command=self.
cmd_down)
177 upBut.grid(row=8, column=3, sticky=W)
178 downBut.grid(row=8, column=4, sticky=W)
180 leftBut = Button(self, text=
"Left", command=self.
cmd_left)
181 rightBut = Button(self, text=
"Right", command=self.
cmd_right)
182 leftBut.grid(row=8, column=5, sticky=W)
183 rightBut.grid(row=8, column=6, sticky=W)
206 exitBut = Button(self, bg=
"red", text=
"End all", command=sys.exit)
207 exitBut.grid(row=0, column=6, sticky=W)