SteppingAction Class Reference

#include <SteppingAction.hh>

Inheritance diagram for SteppingAction:

Inheritance graph
[legend]
Collaboration diagram for SteppingAction:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SteppingAction (DetectorConstruction *, RunAction *, EventAction *)
 ~SteppingAction ()
void UserSteppingAction (const G4Step *)

Private Attributes

DetectorConstructionm_detector
RunActionm_runAction
EventActionm_eventAction


Detailed Description

Definition at line 17 of file SteppingAction.hh.


Constructor & Destructor Documentation

SteppingAction::SteppingAction ( DetectorConstruction det,
RunAction run,
EventAction event 
)

Definition at line 17 of file SteppingAction.cc.

00019 :m_detector(det),m_runAction(run),m_eventAction(event)
00020 { }

SteppingAction::~SteppingAction (  ) 

Definition at line 24 of file SteppingAction.cc.

00025 { }


Member Function Documentation

void SteppingAction::UserSteppingAction ( const G4Step *  step  ) 

Definition at line 29 of file SteppingAction.cc.

00030 {
00031  // in which volume is the step ?
00032  G4TouchableHandle touchable = step->GetPreStepPoint()->GetTouchableHandle();
00033  G4VPhysicalVolume* volume   = touchable->GetVolume();
00034 
00035  // energy deposit in this step 
00036  G4double edep = step->GetTotalEnergyDeposit();
00037 
00038  // is astronaut ?
00039  if (volume == m_detector->GetAstronaut()) {
00040  
00041    // sum edep in EventAction
00042    m_eventAction->AddEdep(edep);
00043    
00044    // get step points in world coordinate system
00045    G4ThreeVector point1 = step->GetPreStepPoint()->GetPosition();
00046    G4ThreeVector point2 = step->GetPostStepPoint()->GetPosition();
00047    
00048    // randomize point of energy deposition
00049    G4ThreeVector pointE = point1 + G4UniformRand()*(point2 - point1);      
00050    // transform it in local coordinate system
00051    G4ThreeVector localPointE 
00052    = touchable->GetHistory()->GetTopTransform().TransformPoint(pointE);
00053    
00054    // extract z and offset
00055    G4double zLocal = 0.5*(m_detector->GetAstronautHeight()) - localPointE.z();
00056    
00057    // sum edep in RunAction
00058    m_runAction->SumDepthDose(zLocal,edep);
00059  }
00060 }


Member Data Documentation

Definition at line 26 of file SteppingAction.hh.

Referenced by UserSteppingAction().

Definition at line 27 of file SteppingAction.hh.

Referenced by UserSteppingAction().

Definition at line 28 of file SteppingAction.hh.

Referenced by UserSteppingAction().


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

Generated on Fri Nov 21 10:20:42 2008 for jour3e by  doxygen 1.5.7.1