Import Geant4 11.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2024-06-28 13:08:51 +02:00
parent f7b23877ed
commit e58e650b32
5232 changed files with 239416 additions and 244360 deletions
+11 -12
View File
@@ -28,11 +28,12 @@
/// \brief Implementation of the B4b::SteppingAction class
#include "SteppingAction.hh"
#include "RunData.hh"
#include "DetectorConstruction.hh"
#include "G4Step.hh"
#include "DetectorConstruction.hh"
#include "RunData.hh"
#include "G4RunManager.hh"
#include "G4Step.hh"
using namespace B4;
@@ -43,14 +44,13 @@ namespace B4b
SteppingAction::SteppingAction(const DetectorConstruction* detConstruction)
: fDetConstruction(detConstruction)
{
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SteppingAction::UserSteppingAction(const G4Step* step)
{
// Collect energy and track length step by step
// Collect energy and track length step by step
// get volume of the current step
auto volume = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
@@ -60,22 +60,21 @@ void SteppingAction::UserSteppingAction(const G4Step* step)
// step length
G4double stepLength = 0.;
if ( step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. ) {
if (step->GetTrack()->GetDefinition()->GetPDGCharge() != 0.) {
stepLength = step->GetStepLength();
}
auto runData = static_cast<RunData*>
(G4RunManager::GetRunManager()->GetNonConstCurrentRun());
auto runData = static_cast<RunData*>(G4RunManager::GetRunManager()->GetNonConstCurrentRun());
if ( volume == fDetConstruction->GetAbsorberPV() ) {
if (volume == fDetConstruction->GetAbsorberPV()) {
runData->Add(kAbs, edep, stepLength);
}
if ( volume == fDetConstruction->GetGapPV() ) {
if (volume == fDetConstruction->GetGapPV()) {
runData->Add(kGap, edep, stepLength);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
}
} // namespace B4b