Geant4-11
Public Member Functions | Protected Attributes
test.MySteppingAction Class Reference
Inheritance diagram for test.MySteppingAction:
G4UserSteppingAction G4UserSteppingAction

Public Member Functions

virtual void SetSteppingManagerPointer (G4SteppingManager *pValue)
 
virtual void UserSteppingAction (const G4Step *)
 
def UserSteppingAction (self, step)
 
def UserSteppingAction (self, step)
 

Protected Attributes

G4SteppingManagerfpSteppingManager = nullptr
 

Detailed Description

Definition at line 39 of file test.py.

Member Function Documentation

◆ SetSteppingManagerPointer()

void G4UserSteppingAction::SetSteppingManagerPointer ( G4SteppingManager pValue)
virtualinherited

Reimplemented in G4MultiSteppingAction.

Definition at line 63 of file G4UserSteppingAction.cc.

65{
66 fpSteppingManager = pValue;
67}
G4SteppingManager * fpSteppingManager

References G4UserSteppingAction::fpSteppingManager.

Referenced by G4TrackingManager::SetUserAction().

◆ UserSteppingAction() [1/3]

virtual void G4UserSteppingAction::UserSteppingAction ( const G4Step )
inlinevirtualinherited

◆ UserSteppingAction() [2/3]

def test.MySteppingAction.UserSteppingAction (   self,
  step 
)

Definition at line 42 of file 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# ==================================================================
54myMaterials= demo_wp.MyMaterials()
55myMaterials.Construct()
56
57myDC= demo_wp.MyDetectorConstruction()
58gRunManager.SetUserInitialization(myDC)
59
60myPL= FTFP_BERT()
61gRunManager.SetUserInitialization(myPL)
62
63# set user actions...
64myPGA= MyPrimaryGeneratorAction()
65gRunManager.SetUserAction(myPGA)
66
67myRA= MyRunAction()
68gRunManager.SetUserAction(myRA)
69
70myEA= MyEventAction()
71gRunManager.SetUserAction(myEA)
72
73mySA= MySteppingAction()
74gRunManager.SetUserAction(mySA)
75
76
77# set particle gun
78pg= myPGA.particleGun
79pg.SetParticleByName("proton")
80pg.SetParticleEnergy(230.*MeV)
81pg.SetParticleMomentumDirection(G4ThreeVector(0., 0., 1.))
82pg.SetParticlePosition(G4ThreeVector(0.,0.,-20.)*cm)
83
84gRunManager.Initialize()
85
86# visualization
87gApplyUICommand("/control/execute vis.mac")
88
89# beamOn
90#gRunManager.BeamOn(3)
91
92
gApplyUICommand
Definition: __init__.py:158

References source.gApplyUICommand.

◆ UserSteppingAction() [3/3]

def test.MySteppingAction.UserSteppingAction (   self,
  step 
)

Definition at line 54 of file 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# ------------------------------------------------------------------

Field Documentation

◆ fpSteppingManager

G4SteppingManager* G4UserSteppingAction::fpSteppingManager = nullptr
protectedinherited

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