Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -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......
|
||||
|
||||
Reference in New Issue
Block a user