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

Public Member Functions

def UserSteppingAction (self, step)
 
def UserSteppingAction (self, step)
 
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 39 of file examples/demos/water_phantom/test.py.

Member Function Documentation

◆ UserSteppingAction() [1/3]

def test.MySteppingAction.UserSteppingAction (   self,
  step 
)

Definition at line 42 of file examples/demos/water_phantom/test.py.

42  def UserSteppingAction(self, step):
43  pass
44  #print "*** dE/dx in current step=", step.GetTotalEnergyDeposit()
45  preStepPoint= step.GetPreStepPoint()
46  track= step.GetTrack()
47  touchable= track.GetTouchable()
48  #print "*** vid= ", touchable.GetReplicaNumber()
49 
50 
51 # ==================================================================
52 # main
53 # ==================================================================
54 myMaterials= demo_wp.MyMaterials()
55 myMaterials.Construct()
56 
57 myDC= demo_wp.MyDetectorConstruction()
58 gRunManager.SetUserInitialization(myDC)
59 
60 myPL= FTFP_BERT()
61 gRunManager.SetUserInitialization(myPL)
62 
63 # set user actions...
64 myPGA= MyPrimaryGeneratorAction()
65 gRunManager.SetUserAction(myPGA)
66 
67 myRA= MyRunAction()
68 gRunManager.SetUserAction(myRA)
69 
70 myEA= MyEventAction()
71 gRunManager.SetUserAction(myEA)
72 
73 mySA= MySteppingAction()
74 gRunManager.SetUserAction(mySA)
75 
76 
77 # set particle gun
78 pg= myPGA.particleGun
79 pg.SetParticleByName("proton")
80 pg.SetParticleEnergy(230.*MeV)
81 pg.SetParticleMomentumDirection(G4ThreeVector(0., 0., 1.))
82 pg.SetParticlePosition(G4ThreeVector(0.,0.,-20.)*cm)
83 
84 gRunManager.Initialize()
85 
86 # visualization
87 gApplyUICommand("/control/execute vis.mac")
88 
89 # beamOn
90 #gRunManager.BeamOn(3)
91 
92 
Here is the caller graph for this function:

◆ UserSteppingAction() [2/3]

def test.MySteppingAction.UserSteppingAction (   self,
  step 
)

Definition at line 54 of file tests/gtest01/python3/test.py.

54  def UserSteppingAction(self, step):
55  #print("*** dE/dx in current step=", step.GetTotalEnergyDeposit())
56  track= step.GetTrack()
57  touchable= track.GetTouchable()
58  pv= touchable.GetVolume()
59  #print(pv.GetCopyNo())
60  #print(touchable.GetReplicaNumber(0))
61 
62 # ------------------------------------------------------------------
Here is the call graph for this function:

◆ UserSteppingAction() [3/3]

def test.MySteppingAction.UserSteppingAction (   self,
  step 
)

Definition at line 55 of file tests/gtest01/test.py.

55  def UserSteppingAction(self, step):
56  #print "*** dE/dx in current step=", step.GetTotalEnergyDeposit()
57  track= step.GetTrack()
58  touchable= track.GetTouchable()
59  pv= touchable.GetVolume()
60  #print pv.GetCopyNo()
61  #print touchable.GetReplicaNumber(0)
62 
63 # ------------------------------------------------------------------
Here is the call graph for this function:

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