Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
+6 -6
View File
@@ -41,7 +41,7 @@
B1SteppingAction::B1SteppingAction(B1EventAction* eventAction)
: G4UserSteppingAction(),
fEventAction(eventAction),
fScoringVolume(0)
fScoringVolume(nullptr)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -53,24 +53,24 @@ B1SteppingAction::~B1SteppingAction()
void B1SteppingAction::UserSteppingAction(const G4Step* step)
{
if (!fScoringVolume) {
if (!fScoringVolume) {
const B1DetectorConstruction* detectorConstruction
= static_cast<const B1DetectorConstruction*>
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
fScoringVolume = detectorConstruction->GetScoringVolume();
fScoringVolume = detectorConstruction->GetScoringVolume();
}
// get volume of the current step
G4LogicalVolume* volume
G4LogicalVolume* volume
= step->GetPreStepPoint()->GetTouchableHandle()
->GetVolume()->GetLogicalVolume();
// check if we are in scoring volume
if (volume != fScoringVolume) return;
// collect energy deposited in this step
G4double edepStep = step->GetTotalEnergyDeposit();
fEventAction->AddEdep(edepStep);
fEventAction->AddEdep(edepStep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......