Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -29,39 +29,32 @@
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4MSSteppingAction.hh"
|
||||
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Region.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4MSSteppingAction::G4MSSteppingAction() {}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4MSSteppingAction::~G4MSSteppingAction() {}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
void G4MSSteppingAction::Initialize(G4bool rSens, G4Region* reg)
|
||||
{
|
||||
regionSensitive = rSens;
|
||||
theRegion = reg;
|
||||
length = 0.;
|
||||
x0 = 0.;
|
||||
lambda = 0.;
|
||||
theRegion = reg;
|
||||
length = 0.;
|
||||
x0 = 0.;
|
||||
lambda = 0.;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
void G4MSSteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||
{
|
||||
G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
|
||||
G4Region* region =
|
||||
preStepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetRegion();
|
||||
G4Region* region = preStepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetRegion();
|
||||
|
||||
if(regionSensitive && (region != theRegion))
|
||||
return;
|
||||
if (regionSensitive && (region != theRegion)) return;
|
||||
|
||||
G4double stlen = aStep->GetStepLength();
|
||||
G4double stlen = aStep->GetStepLength();
|
||||
const G4Material* material = preStepPoint->GetMaterial();
|
||||
length += stlen;
|
||||
x0 += stlen / (material->GetRadlen());
|
||||
|
||||
Reference in New Issue
Block a user