16 "My Primary Generator Action"
19 G4VUserPrimaryGeneratorAction.__init__(self)
25 self.particleGun.SetParticleMomentumDirection(
G4ThreeVector(dx, 0., 1.))
26 self.particleGun.GeneratePrimaryVertex(event)
33 print "*** #event to be processed (BRA)=",
34 run.GetNumberOfEventToBeProcessed()
37 print "*** run end run(ERA)=", run.GetRunID()
56 track= step.GetTrack()
57 touchable= track.GetTouchable()
58 pv= touchable.GetVolume()
76 qMaterials= gtest01.QMaterials()
77 qMaterials.Construct()
79 qDC= gtest01.QDetectorConstruction()
80 gRunManager.SetUserInitialization(qDC)
82 qPL= gtest01.QPhysicsList()
83 gRunManager.SetUserInitialization(qPL)
88 gRunManager.SetUserAction(myPGA)
94 gRunManager.SetUserAction(myEA)
97 gRunManager.SetUserAction(mySA)
102 pg= myPGA.particleGun
103 pg.SetParticleByName(
"e-")
104 pg.SetParticleEnergy(200.*MeV)
108 fieldMgr= gTransportationManager.GetFieldManager()
111 fieldMgr.SetDetectorField(myField)
112 fieldMgr.CreateChordFinder(myField)
114 gRunManager.Initialize()
117 gRunManager.BeamOn(10)