#include <SteppingAction.hh>


| Public Member Functions | |
| SteppingAction (DetectorConstruction *, RunAction *, EventAction *) | |
| ~SteppingAction () | |
| void | UserSteppingAction (const G4Step *) | 
| Private Attributes | |
| DetectorConstruction * | m_detector | 
| RunAction * | m_runAction | 
| EventAction * | m_eventAction | 
Definition at line 17 of file SteppingAction.hh.
| SteppingAction::SteppingAction | ( | DetectorConstruction * | det, | |
| RunAction * | run, | |||
| EventAction * | event | |||
| ) | 
Definition at line 21 of file SteppingAction.cc.
00023 :m_detector(det),m_runAction(run),m_eventAction(event) 00024 { }
| SteppingAction::~SteppingAction | ( | ) | 
| void SteppingAction::UserSteppingAction | ( | const G4Step * | step | ) | 
Definition at line 33 of file SteppingAction.cc.
00034 { 00035 // in which volume is the step ? 00036 G4TouchableHandle touchable = step->GetPreStepPoint()->GetTouchableHandle(); 00037 G4VPhysicalVolume* volume = touchable->GetVolume(); 00038 00039 // energy deposit in this step 00040 G4double edep = step->GetTotalEnergyDeposit(); 00041 00042 // is astronaut ? 00043 if (volume == m_detector->GetAstronaut()) { 00044 00045 // sum edep in EventAction 00046 m_eventAction->AddEdep(edep); 00047 00048 // get step points in world coordinate system 00049 G4ThreeVector point1 = step->GetPreStepPoint()->GetPosition(); 00050 G4ThreeVector point2 = step->GetPostStepPoint()->GetPosition(); 00051 00052 // randomize point of energy deposition 00053 G4ThreeVector pointE = point1 + G4UniformRand()*(point2 - point1); 00054 // transform it in local coordinate system 00055 G4ThreeVector localPointE 00056 = touchable->GetHistory()->GetTopTransform().TransformPoint(pointE); 00057 00058 // extract z and offset 00059 G4double zLocal = 0.5*(m_detector->GetAstronautHeight()) - localPointE.z(); 00060 00061 // sum edep in RunAction 00062 m_runAction->SumDepthDose(zLocal,edep); 00063 #ifdef G4ANALYSIS_USE 00064 m_runAction->GetHisto(1)->fill(zLocal, edep); 00065 #endif 00066 } 00067 }
| DetectorConstruction* SteppingAction::m_detector  [private] | 
| RunAction* SteppingAction::m_runAction  [private] | 
| EventAction* SteppingAction::m_eventAction  [private] | 
 1.5.7.1
 1.5.7.1