Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run.MyField Class Reference
Inheritance diagram for run.MyField:
Collaboration diagram for run.MyField:

Public Member Functions

def GetFieldValue
 
- Public Member Functions inherited from G4MagneticField
 G4MagneticField ()
 
virtual ~G4MagneticField ()
 
 G4MagneticField (const G4MagneticField &r)
 
G4MagneticFieldoperator= (const G4MagneticField &p)
 
G4bool DoesFieldChangeEnergy () const
 
virtual void GetFieldValue (const G4double Point[4], G4double *Bfield) const =0
 
- Public Member Functions inherited from G4ElectroMagneticField
 G4ElectroMagneticField ()
 
virtual ~G4ElectroMagneticField ()
 
 G4ElectroMagneticField (const G4ElectroMagneticField &r)
 
G4ElectroMagneticFieldoperator= (const G4ElectroMagneticField &p)
 
- Public Member Functions inherited from G4Field
 G4Field (G4bool gravityOn=false)
 
 G4Field (const G4Field &)
 
virtual ~G4Field ()
 
G4Fieldoperator= (const G4Field &p)
 
G4bool IsGravityActive () const
 
void SetGravityActive (G4bool OnOffFlag)
 
virtual G4FieldClone () const
 

Detailed Description

Definition at line 64 of file run.py.

Member Function Documentation

def run.MyField.GetFieldValue (   self,
  pos,
  time 
)

Definition at line 67 of file run.py.

67 
68  def GetFieldValue(self, pos, time):
69  bfield= G4ThreeVector()
70  bfield.x= 0.
71  bfield.y= 5.*tesla
72  bfield.z= 0.
73  return bfield
74 
75 # ==================================================================
76 # main
77 # ==================================================================
78 qMaterials= gtest01.QMaterials()
79 qMaterials.Construct()
80 
81 qDC= gtest01.QDetectorConstruction()
82 gRunManager.SetUserInitialization(qDC)
83 
84 qPL= gtest01.QPhysicsList()
85 gRunManager.SetUserInitialization(qPL)
86 
87 # set user actions...
88 #qPGA= gtest01.QPrimaryGeneratorAction()
90 gRunManager.SetUserAction(myPGA)
91 
92 #myRA= MyRunAction()
93 #gRunManager.SetUserAction(myRA)
94 
95 myEA= MyEventAction()
96 gRunManager.SetUserAction(myEA)
97 
98 mySA= MySteppingAction()
99 gRunManager.SetUserAction(mySA)
100 
101 # set particle gun
102 #ApplyUICommand("/control/execute gun.mac")
103 #pg= qPGA.GetParticleGun()
104 pg= myPGA.particleGun
105 pg.SetParticleByName("e-")
106 pg.SetParticleEnergy(200.*MeV)
107 pg.SetParticlePosition(G4ThreeVector(0.,0.,-14.9)*cm)
108 
109 # magnetic field
110 fieldMgr= gTransportationManager.GetFieldManager()
111 myField= G4UniformMagField(G4ThreeVector(0.,10.*tesla,0.))
112 #myField= MyField()
113 fieldMgr.SetDetectorField(myField)
114 fieldMgr.CreateChordFinder(myField)
115 
116 gRunManager.Initialize()
117 
118 # visualization
119 gControlExecute("vis.mac")
120 
121 # beamOn
122 gRunManager.BeamOn(10)
123 #thread.start_new_thread(gRunManager.BeamOn, (100000))
124 
def GetFieldValue
Definition: run.py:67
gControlExecute
Definition: __init__.py:164

The documentation for this class was generated from the following file: