Import Geant4 11.2.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2023-06-30 09:09:57 +02:00
parent aef78ca386
commit dd1f179cda
3780 changed files with 212808 additions and 142780 deletions
+8 -15
View File
@@ -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());