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    ////G4cout << "--> edep in astronaut : " << edep/keV << " keV" << G4endl;
00041     
00042    // sum edep in EventAction
00043    m_eventAction->AddEdep(edep);
00044 
00045 /*---------for depth dose distribution---------------------------------------
00046    
00047    // get step points in world coordinate system
00048    G4ThreeVector point1 = step->GetPreStepPoint()->GetPosition();
00049    G4ThreeVector point2 = step->GetPostStepPoint()->GetPosition();
00050    
00051    // randomize point of energy deposition
00052    G4ThreeVector pointE = point1 + G4UniformRand()*(point2 - point1);      
00053    // transform it in local coordinate system
00054    G4ThreeVector localPointE 
00055    = touchable->GetHistory()->GetTopTransform().TransformPoint(pointE);
00056    
00057    // extract z and offset
00058    G4double zLocal = 0.5*(m_detector->GetAstronautHeight()) - localPointE.z();
00059    
00060    // sum edep in RunAction
00061    m_runAction->SumDepthDose(zLocal,edep);
00062    
00063 ----------end of depth dose distribution-------------------------------------*/   
00064  }
00065 }


Member Data Documentation

Definition at line 26 of file SteppingAction.hh.

Referenced by UserSteppingAction().

Definition at line 27 of file SteppingAction.hh.

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:31 2008 for jour3c by  doxygen 1.5.7.1