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 21 of file SteppingAction.cc.

00023 :m_detector(det),m_runAction(run),m_eventAction(event)
00024 { }

SteppingAction::~SteppingAction (  ) 

Definition at line 28 of file SteppingAction.cc.

00029 { }


Member Function Documentation

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 }


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:21:37 2008 for jour4d by  doxygen 1.5.7.1