17 "My Primary Generator Action"
20 G4VUserPrimaryGeneratorAction.__init__(self)
26 self.particleGun.SetParticleMomentumDirection(
G4ThreeVector(dx, 0., 1.))
27 self.particleGun.GeneratePrimaryVertex(event)
34 print "*** #event to be processed (BRA)=",
35 run.GetNumberOfEventToBeProcessed()
38 print "*** run end run(ERA)=", run.GetRunID()
57 track= step.GetTrack()
58 touchable= track.GetTouchable()
59 pv= touchable.GetVolume()
77 qMaterials= gtest01.QMaterials()
78 qMaterials.Construct()
80 qDC= gtest01.QDetectorConstruction()
81 gRunManager.SetUserInitialization(qDC)
83 qPL= gtest01.QPhysicsList()
84 gRunManager.SetUserInitialization(qPL)
89 gRunManager.SetUserAction(myPGA)
95 gRunManager.SetUserAction(myEA)
98 gRunManager.SetUserAction(mySA)
103 pg= myPGA.particleGun
104 pg.SetParticleByName(
"e-")
105 pg.SetParticleEnergy(200.*MeV)
109 fieldMgr= gTransportationManager.GetFieldManager()
112 fieldMgr.SetDetectorField(myField)
113 fieldMgr.CreateChordFinder(myField)
115 gRunManager.Initialize()
121 gRunManager.BeamOn(10)