149 title = Label(self, text=
"exampleN03")
150 title.grid(row=0, column=1, columnspan=3)
151 header = Label(self, text=
"empowered by \n Geant4Py")
152 header.grid(row=1, column=1, columnspan=3)
154 layerLabel = Label(self, bg=
"green", text=
"No of layers")
156 self.layerVar.set(10)
157 layer = Scale(self, orient=HORIZONTAL, length=400, from_=0, to=10, tickinterval=1, resolution=1, variable=self.
layerVar )
158 layerLabel.grid(row=2, column=0, sticky=W)
159 layer.grid(row=2, column=1, columnspan=5, sticky=W)
162 absorbermaterialLabel = Label(self, bg=
"green", text=
"Absorber Material")
163 absorbermaterialLabel.grid(row=3, column=0, sticky=W)
165 self.absorbermaterialVar.set(
"Lead")
168 for i
in (
"Aluminium",
"Lead"):
170 ra1[i].grid(row=3, column=pos, sticky=W)
174 absorberthickLabel = Label(self, bg=
"green", text=
"Thickness (mm)")
176 self.absorberthickVar.set(10.0)
177 absorberthick = Scale(self, orient=HORIZONTAL, length=400, from_=0., to=100., resolution=0.05, tickinterval=10.0, digits=4, variable=self.
absorberthickVar)
178 absorberthickLabel.grid(row=4, column=0, sticky=W)
179 absorberthick.grid(row=4, column=1, columnspan=5, sticky=W)
183 gapmaterialLabel = Label(self, bg=
"green", text=
"Gap Material")
184 gapmaterialLabel.grid(row=5, column=0, sticky=W)
186 self.gapmaterialVar.set(
"liquidArgon")
189 for i
in (
"liquidArgon",
"Scintillator",
"Air",
"Aerogel",
"Galactic" ):
190 ra2[i] = Radiobutton(self, text=i, variable=self.
gapmaterialVar, value=i)
191 ra2[i].grid(row=5, column=pos, sticky=W)
195 gapthickLabel = Label(self, bg=
"green", text=
"Thickness (mm)")
197 self.gapthickVar.set(5.0)
198 gapthick = Scale(self, orient=HORIZONTAL, length=400, from_=0., to=100., resolution=0.05, tickinterval=10.0, digits=4, variable=self.
gapthickVar)
199 gapthickLabel.grid(row=6, column=0, sticky=W)
200 gapthick.grid(row=6, column=1, columnspan=5, sticky=W)
203 calorsizeYZLabel = Label(self, bg=
"green", text=
"SizeYZ (mm)")
205 self.calorsizeYZVar.set(100.0)
206 calorsizeYZ = Scale(self, orient=HORIZONTAL, length=400, from_=0., to=200., resolution=0.05, tickinterval=20.0, digits=4, variable=self.
calorsizeYZVar)
207 calorsizeYZLabel.grid(row=7, column=0, sticky=W)
208 calorsizeYZ.grid(row=7, column=1, columnspan=5, sticky=W)
212 particleLabel = Label(self, bg=
"green", text=
"Particle")
213 particleLabel.grid(row=8, column=0, sticky=W)
215 self.particleVar.set(
"e-")
218 for i
in (
"proton",
"gamma",
"e-",
"e+",
"mu-",
"mu+"):
219 ra1[i] = Radiobutton(self, text=i, variable=self.
particleVar, value=i)
220 ra1[i].grid(row=8, column=pos1, sticky=W)
224 energyLabel = Label(self, bg=
"green", text=
"Energy (MeV)")
227 self.energyVar.set(50)
228 energy = Scale(self, orient=HORIZONTAL, length=400, from_=0., to=1000., tickinterval=100.0, resolution=0.1, variable=self.
energyVar, digits=5 )
229 energyLabel.grid(row=9, column=0, sticky=W)
230 energy.grid(row=9, column=1, columnspan=5, sticky=W)
233 eventLabel = Label(self, bg=
"green", text=
"Events")
236 event = Scale(self, orient=HORIZONTAL, length=400, from_=0, to=100, tickinterval=10, resolution=1, variable=self.
eventVar )
237 eventLabel.grid(row=10, column=0, sticky=W)
238 event.grid(row=10, column=1, columnspan=5, sticky=W)
241 startBut = Button(self, bg=
"orange", text=
"Start a run", command=self.
cmd_beamOn)
242 startBut.grid(row=0, column=0, sticky=W)
260 processLabel=Label(self, text=
"Process on/off", bg=
"green")
261 processLabel.grid(row=11, column=0, sticky=W)
264 self.
processList = [
"phot",
"compt",
"conv",
"msc",
"eIoni",
"eBrem",
"annihil",
"muIoni",
"muBrems",
"hIoni"]
271 procTab[i].grid(row=11, column=pos, sticky=W)
273 procTab[i].grid(row=12, column=pos-3, sticky=W)
275 procTab[i].grid(row=13, column=pos-7, sticky=W)
279 cutLabel = Label(self, bg=
"green", text=
"Cut (mm)")
283 cut = Scale(self, orient=HORIZONTAL, length=400, from_=0., to=10., tickinterval=1., resolution=0.005, variable=self.
cutVar, digits=5 )
284 cutLabel.grid(row=14, column=0, sticky=W)
285 cut.grid(row=14, column=1, columnspan=5, sticky=W)
288 magLabel = Label(self, bg=
"green", text=
"Magnetic (T)")
292 mag = Scale(self, orient=HORIZONTAL, length=400, from_=0., to=5., tickinterval=1., resolution=0.1, variable=self.
magVar, digits=3 )
293 magLabel.grid(row=15, column=0, sticky=W)
294 mag.grid(row=15, column=1, columnspan=5, sticky=W)
298 viewerLabel = Label(self, bg=
"green", text=
"Viewer")
299 viewerLabel.grid(row=16, column=0, sticky=W)
301 self.viewerVar.set(
"")
302 stateOfViewer = {
"OpenGL":
"normal",
"VRML":
"normal",
"Wired":
"normal"}
303 if vrmlViewer
is None: stateOfViewer[
"VRML"] =
"disabled"
304 if heprepViewer
is None: stateOfViewer[
"Wired"] =
"disabled"
307 for i
in (
"OpenGL",
"VRML",
"Wired"):
308 viewers[i] = Radiobutton(self, text=i, variable=self.
viewerVar, value=i, command=self.
cmd_viewer, state=stateOfViewer[i])
309 viewers[i].grid(row=16, column=pos, sticky=W)
314 g4comLabel = Label(self, text=
"Geant4 command", bg=
"orange")
316 commandEntry = Entry(self, textvariable=self.
g4commandVar, width=15)
317 self.g4commandVar.set(
"/vis/viewer/zoom 1.2")
318 comBut = Button(self, bg=
"orange", text=
"Execute", command=self.
cmd_g4command)
319 g4comLabel.grid(row=17, column=0, sticky=W)
320 commandEntry.grid(row=17, column=1, columnspan=3, sticky=E+W)
321 comBut.grid(row=17, column=5)
324 exitBut = Button(self, bg=
"red", text=
"End all", command=sys.exit)
325 exitBut.grid(row=0, column=5, sticky=W)