22 ROOT.gStyle.SetTextFont(82)
23 ROOT.gStyle.SetTitleFont(82,
"X")
24 ROOT.gStyle.SetLabelFont(82,
"X")
25 ROOT.gStyle.SetTitleFont(82,
"Y")
26 ROOT.gStyle.SetLabelFont(82,
"Y")
29 ROOT.gStyle.SetErrorX(0)
31 canvas= ROOT.TCanvas(
"g4py_plots",
32 "Geant4Py Sample Plots",
46 hist1= ROOT.TH1D(
"dE/dx/step",
"dE/dx", 100, 0., 2000.)
47 hist1.SetXTitle(
"(keV)")
63 "My Primary Generator Action"
66 G4VUserPrimaryGeneratorAction.__init__(self)
77 print "*** #event to be processed (BRA)=",
78 run.numberOfEventToBeProcessed
81 print "*** run end run(ERA)=", run.runID
88 print "*** current event (BEA)=", event.eventID
91 print "*** current event (EEA)=", event.eventID
99 dedx= step.GetTotalEnergyDeposit()
101 hist1.Fill(dedx/HEPUnit.keV)
109app= gtest01.MyApplication()
114gRunManager.SetUserAction(myPGA)
117gRunManager.SetUserAction(myRA)
123gRunManager.SetUserAction(mySA)
129pg.SetParticleByName(
"e-")
130pg.SetParticleEnergy(200.*HEPUnit.MeV)
135ApplyUICommand(
"/control/execute vis.mac")
138gRunManager.BeamOn(1000)
def BeginOfEventAction(self, event)
def EndOfEventAction(self, event)
def GeneratePrimaries(self, event)
def BeginOfRunAction(self, run)
def EndOfRunAction(self, run)
def UserSteppingAction(self, step)