Import Geant4 11.2.0 source tree
This commit is contained in:
+3
-3
@@ -40,10 +40,10 @@ class ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
ActionInitialization(const G4String& fileName);
|
||||
virtual ~ActionInitialization();
|
||||
~ActionInitialization() override = default;
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
|
||||
private:
|
||||
G4String fFileName;
|
||||
|
||||
+4
-4
@@ -55,12 +55,12 @@ class G4GlobalMagFieldMessenger;
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
DetectorConstruction();
|
||||
virtual ~DetectorConstruction();
|
||||
DetectorConstruction() = default;
|
||||
~DetectorConstruction() override = default;
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
|
||||
private:
|
||||
// data members
|
||||
|
||||
+3
-3
@@ -47,15 +47,15 @@ class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
PrimaryGeneratorAction();
|
||||
virtual ~PrimaryGeneratorAction();
|
||||
~PrimaryGeneratorAction() override;
|
||||
|
||||
virtual void GeneratePrimaries(G4Event* event);
|
||||
void GeneratePrimaries(G4Event* event) override;
|
||||
|
||||
// set methods
|
||||
void SetRandomFlag(G4bool value);
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun; // G4 particle gun
|
||||
G4ParticleGun* fParticleGun = nullptr; // G4 particle gun
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -56,10 +56,10 @@ class RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
RunAction(const G4String& fileName);
|
||||
virtual ~RunAction();
|
||||
~RunAction() override = default;
|
||||
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
void BeginOfRunAction(const G4Run*) override;
|
||||
void EndOfRunAction(const G4Run*) override;
|
||||
|
||||
private:
|
||||
G4String fFileName;
|
||||
|
||||
@@ -41,11 +41,11 @@ class ScreenSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
ScreenSD(const G4String& name);
|
||||
virtual ~ScreenSD();
|
||||
~ScreenSD() override = default;
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent* hce);
|
||||
virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* history);
|
||||
virtual void EndOfEvent(G4HCofThisEvent* hce);
|
||||
void Initialize(G4HCofThisEvent* hce) override;
|
||||
G4bool ProcessHits(G4Step* step, G4TouchableHistory* history) override;
|
||||
void EndOfEvent(G4HCofThisEvent* hce) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,13 +34,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ActionInitialization::ActionInitialization(const G4String& fileName)
|
||||
: G4VUserActionInitialization(),
|
||||
fFileName(fileName)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ActionInitialization::~ActionInitialization()
|
||||
: fFileName(fileName)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
+10
-21
@@ -46,18 +46,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ThreadLocal
|
||||
G4GlobalMagFieldMessenger* DetectorConstruction::fMagFieldMessenger = 0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorConstruction::DetectorConstruction()
|
||||
: G4VUserDetectorConstruction()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorConstruction::~DetectorConstruction()
|
||||
{}
|
||||
G4GlobalMagFieldMessenger* DetectorConstruction::fMagFieldMessenger = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -87,13 +76,13 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
G4double worldHxyz = 2.*m;
|
||||
|
||||
// world volume
|
||||
G4Box* worldS = new G4Box("World", worldHxyz, worldHxyz, worldHxyz);
|
||||
auto worldS = new G4Box("World", worldHxyz, worldHxyz, worldHxyz);
|
||||
|
||||
G4LogicalVolume* worldLV = new G4LogicalVolume(worldS, air, "World");
|
||||
auto worldLV = new G4LogicalVolume(worldS, air, "World");
|
||||
|
||||
G4VPhysicalVolume* worldPV
|
||||
= new G4PVPlacement(
|
||||
0, G4ThreeVector(), worldLV, "World", 0, false, 0, checkOverlaps);
|
||||
nullptr, G4ThreeVector(), worldLV, "World", nullptr, false, 0, checkOverlaps);
|
||||
|
||||
//
|
||||
// Box
|
||||
@@ -104,15 +93,15 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
G4double boxHz = 10.*cm;
|
||||
|
||||
// box volume
|
||||
G4Box* boxS = new G4Box("World", boxHxy, boxHxy, boxHz);
|
||||
auto boxS = new G4Box("World", boxHxy, boxHxy, boxHz);
|
||||
|
||||
G4LogicalVolume* boxLV = new G4LogicalVolume(boxS, csi, "Box");
|
||||
auto boxLV = new G4LogicalVolume(boxS, csi, "Box");
|
||||
|
||||
// The box position
|
||||
G4double posz = 0.*m;
|
||||
|
||||
new G4PVPlacement(
|
||||
0, G4ThreeVector(0, 0, posz),
|
||||
nullptr, G4ThreeVector(0, 0, posz),
|
||||
boxLV, "Box", worldLV, false, 0, checkOverlaps);
|
||||
|
||||
//
|
||||
@@ -123,15 +112,15 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
G4double screenHz = 1.*mm;
|
||||
|
||||
// Screen volume
|
||||
G4Box* screenS = new G4Box("World", screenHxy, screenHxy, screenHz);
|
||||
auto screenS = new G4Box("World", screenHxy, screenHxy, screenHz);
|
||||
|
||||
G4LogicalVolume* screenLV = new G4LogicalVolume(screenS, air, "Screen");
|
||||
auto screenLV = new G4LogicalVolume(screenS, air, "Screen");
|
||||
|
||||
// The screen position
|
||||
posz += boxHz + screenHz;
|
||||
|
||||
new G4PVPlacement(
|
||||
0, G4ThreeVector(0, 0, posz),
|
||||
nullptr, G4ThreeVector(0, 0, posz),
|
||||
screenLV, "Screen", worldLV, false, 0, checkOverlaps);
|
||||
|
||||
//
|
||||
|
||||
@@ -43,8 +43,6 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PrimaryGeneratorAction::PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(nullptr)
|
||||
{
|
||||
G4int nofParticles = 1;
|
||||
fParticleGun = new G4ParticleGun(nofParticles);
|
||||
|
||||
@@ -38,8 +38,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RunAction::RunAction(const G4String& fileName)
|
||||
: G4UserRunAction(),
|
||||
fFileName(fileName)
|
||||
: fFileName(fileName)
|
||||
{
|
||||
// Create analysis manager
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
@@ -66,12 +65,6 @@ RunAction::RunAction(const G4String& fileName)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RunAction::~RunAction()
|
||||
{
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::BeginOfRunAction(const G4Run* /*run*/)
|
||||
{
|
||||
// Get analysis manager
|
||||
|
||||
@@ -46,11 +46,6 @@ ScreenSD::ScreenSD(const G4String& name)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ScreenSD::~ScreenSD()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ScreenSD::Initialize(G4HCofThisEvent* /*hce*/)
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user