Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
root_test.MySteppingAction Class Reference
Inheritance diagram for root_test.MySteppingAction:
G4UserSteppingAction

Public Member Functions

def UserSteppingAction
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()
 
void SetSteppingManagerPointer (G4SteppingManager *pValue)
 
virtual void UserSteppingAction (const G4Step *)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Definition at line 94 of file root_test.py.

Member Function Documentation

def root_test.MySteppingAction.UserSteppingAction (   self,
  step 
)

Definition at line 97 of file root_test.py.

References root_test.hini(), root_test.hshow(), and root_test.init_root().

97 
98  def UserSteppingAction(self, step):
99  #print "*** dE/dx in current step=", step.GetTotalEnergyDeposit()
100  dedx= step.GetTotalEnergyDeposit()
101  if(dedx>0):
102  hist1.Fill(dedx/HEPUnit.keV)
103 
104 # ==================================================================
105 # main
106 # ==================================================================
107 g4pyCanvas= init_root()
108 hini()
109 
110 app= gtest01.MyApplication()
111 app.Configure()
112 
113 # set user actions...
115 gRunManager.SetUserAction(myPGA)
116 
117 myRA= MyRunAction()
118 gRunManager.SetUserAction(myRA)
119 
120 #myEA= MyEventAction()
121 #gRunManager.SetUserAction(myEA)
122 
123 mySA= MySteppingAction()
124 gRunManager.SetUserAction(mySA)
125 
126 
127 # set particle gun
128 #ApplyUICommand("/control/execute gun.mac")
129 pg= myPGA.particleGun
130 pg.SetParticleByName("e-")
131 pg.SetParticleEnergy(200.*HEPUnit.MeV)
132 pg.SetParticleMomentumDirection(G4ThreeVector(0.2, 0., 1.))
133 pg.SetParticlePosition(G4ThreeVector(0.,0.,-14.9)*HEPUnit.cm)
134 
135 # visualization
136 ApplyUICommand("/control/execute vis.mac")
137 
138 # beamOn
139 gRunManager.BeamOn(1000)
140 
141 #
142 hshow()
143 
144 
def hshow
Definition: root_test.py:51
def hini
Definition: root_test.py:43
def init_root
Definition: root_test.py:17

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