Geant4  10.02.p03
root_test.MySteppingAction Class Reference
Inheritance diagram for root_test.MySteppingAction:
Collaboration diagram for root_test.MySteppingAction:

Public Member Functions

def UserSteppingAction (self, step)
 
- 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

◆ UserSteppingAction()

def root_test.MySteppingAction.UserSteppingAction (   self,
  step 
)

Definition at line 97 of file root_test.py.

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

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