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
@@ -35,12 +35,12 @@
class ActionInitialization : public G4VUserActionInitialization
{
public:
ActionInitialization() = default;
~ActionInitialization() override = default;
public:
ActionInitialization() = default;
~ActionInitialization() override = default;
void BuildForMaster() const override;
void Build() const override;
void BuildForMaster() const override;
void Build() const override;
};
#endif
@@ -34,10 +34,10 @@
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "globals.hh"
#include "G4OpticalSurface.hh"
#include "G4RunManager.hh"
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
#include <CLHEP/Units/SystemOfUnits.h>
@@ -47,93 +47,81 @@ class DetectorMessenger;
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction();
~DetectorConstruction() override;
public:
DetectorConstruction();
~DetectorConstruction() override;
G4VPhysicalVolume* Construct() override;
G4VPhysicalVolume* Construct() override;
G4VPhysicalVolume* GetTank() { return fTank; }
G4double GetTankXSize() { return fTank_x; }
G4VPhysicalVolume* GetTank() { return fTank; }
G4double GetTankXSize() { return fTank_x; }
G4OpticalSurface* GetSurface(void) { return fSurface; }
G4OpticalSurface* GetSurface(void) { return fSurface; }
void SetSurfaceFinish(const G4OpticalSurfaceFinish finish)
{
fSurface->SetFinish(finish);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
G4OpticalSurfaceFinish GetSurfaceFinish()
{
return fSurface->GetFinish();
}
void SetSurfaceFinish(const G4OpticalSurfaceFinish finish)
{
fSurface->SetFinish(finish);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
G4OpticalSurfaceFinish GetSurfaceFinish() { return fSurface->GetFinish(); }
void SetSurfaceType(const G4SurfaceType type)
{
fSurface->SetType(type);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
void SetSurfaceType(const G4SurfaceType type)
{
fSurface->SetType(type);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
void SetSurfaceModel(const G4OpticalSurfaceModel model)
{
fSurface->SetModel(model);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
G4OpticalSurfaceModel GetSurfaceModel() { return fSurface->GetModel(); }
void SetSurfaceModel(const G4OpticalSurfaceModel model)
{
fSurface->SetModel(model);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
G4OpticalSurfaceModel GetSurfaceModel() { return fSurface->GetModel(); }
void SetSurfaceSigmaAlpha(G4double v);
void SetSurfacePolish(G4double v);
void SetSurfaceSigmaAlpha(G4double v);
void SetSurfacePolish(G4double v);
void AddTankMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
void AddTankMPC(const G4String& prop, G4double v);
G4MaterialPropertiesTable* GetTankMaterialPropertiesTable()
{
return fTankMPT;
}
void AddTankMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
void AddTankMPC(const G4String& prop, G4double v);
G4MaterialPropertiesTable* GetTankMaterialPropertiesTable() { return fTankMPT; }
void AddWorldMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
void AddWorldMPC(const G4String& prop, G4double v);
G4MaterialPropertiesTable* GetWorldMaterialPropertiesTable()
{
return fWorldMPT;
}
void AddWorldMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
void AddWorldMPC(const G4String& prop, G4double v);
G4MaterialPropertiesTable* GetWorldMaterialPropertiesTable() { return fWorldMPT; }
void AddSurfaceMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
void AddSurfaceMPC(const G4String& prop, G4double v);
G4MaterialPropertiesTable* GetSurfaceMaterialPropertiesTable()
{
return fSurfaceMPT;
}
void AddSurfaceMPV(const G4String& prop, G4MaterialPropertyVector* mpv);
void AddSurfaceMPC(const G4String& prop, G4double v);
G4MaterialPropertiesTable* GetSurfaceMaterialPropertiesTable() { return fSurfaceMPT; }
void SetWorldMaterial(const G4String&);
G4Material* GetWorldMaterial() const { return fWorldMaterial; }
void SetTankMaterial(const G4String&);
G4Material* GetTankMaterial() const { return fTankMaterial; }
void SetWorldMaterial(const G4String&);
G4Material* GetWorldMaterial() const { return fWorldMaterial; }
void SetTankMaterial(const G4String&);
G4Material* GetTankMaterial() const { return fTankMaterial; }
private:
G4double fExpHall_x = 10.*CLHEP::m;
G4double fExpHall_y = 10.*CLHEP::m;
G4double fExpHall_z = 10.*CLHEP::m;
private:
G4double fExpHall_x = 10. * CLHEP::m;
G4double fExpHall_y = 10. * CLHEP::m;
G4double fExpHall_z = 10. * CLHEP::m;
G4VPhysicalVolume* fTank = nullptr;
G4VPhysicalVolume* fTank = nullptr;
G4double fTank_x = 1.*CLHEP::m;
G4double fTank_y = 1.*CLHEP::m;
G4double fTank_z = 1.*CLHEP::m;
G4double fTank_x = 1. * CLHEP::m;
G4double fTank_y = 1. * CLHEP::m;
G4double fTank_z = 1. * CLHEP::m;
G4LogicalVolume* fWorld_LV = nullptr;
G4LogicalVolume* fTank_LV = nullptr;
G4LogicalVolume* fWorld_LV = nullptr;
G4LogicalVolume* fTank_LV = nullptr;
G4Material* fWorldMaterial = nullptr;
G4Material* fTankMaterial = nullptr;
G4Material* fWorldMaterial = nullptr;
G4Material* fTankMaterial = nullptr;
G4OpticalSurface* fSurface = nullptr;
G4OpticalSurface* fSurface = nullptr;
DetectorMessenger* fDetectorMessenger = nullptr;
DetectorMessenger* fDetectorMessenger = nullptr;
G4MaterialPropertiesTable* fTankMPT = nullptr;
G4MaterialPropertiesTable* fWorldMPT = nullptr;
G4MaterialPropertiesTable* fSurfaceMPT = nullptr;
G4MaterialPropertiesTable* fTankMPT = nullptr;
G4MaterialPropertiesTable* fWorldMPT = nullptr;
G4MaterialPropertiesTable* fSurfaceMPT = nullptr;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -33,8 +33,8 @@
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "globals.hh"
class DetectorConstruction;
class G4UIdirectory;
@@ -49,34 +49,34 @@ class G4UIcmdWithoutParameter;
class DetectorMessenger : public G4UImessenger
{
public:
DetectorMessenger(DetectorConstruction*);
~DetectorMessenger() override;
public:
DetectorMessenger(DetectorConstruction*);
~DetectorMessenger() override;
void SetNewValue(G4UIcommand*, G4String) override;
void SetNewValue(G4UIcommand*, G4String) override;
private:
DetectorConstruction* fDetector = nullptr;
G4UIdirectory* fOpticalDir = nullptr;
private:
DetectorConstruction* fDetector = nullptr;
G4UIdirectory* fOpticalDir = nullptr;
// the surface
G4UIcmdWithAString* fSurfaceTypeCmd = nullptr;
G4UIcmdWithAString* fSurfaceFinishCmd = nullptr;
G4UIcmdWithAString* fSurfaceModelCmd = nullptr;
G4UIcmdWithADouble* fSurfaceSigmaAlphaCmd = nullptr;
G4UIcmdWithADouble* fSurfacePolishCmd = nullptr;
G4UIcmdWithAString* fSurfaceMatPropVectorCmd = nullptr;
G4UIcmdWithAString* fSurfaceMatPropConstCmd = nullptr;
// the surface
G4UIcmdWithAString* fSurfaceTypeCmd = nullptr;
G4UIcmdWithAString* fSurfaceFinishCmd = nullptr;
G4UIcmdWithAString* fSurfaceModelCmd = nullptr;
G4UIcmdWithADouble* fSurfaceSigmaAlphaCmd = nullptr;
G4UIcmdWithADouble* fSurfacePolishCmd = nullptr;
G4UIcmdWithAString* fSurfaceMatPropVectorCmd = nullptr;
G4UIcmdWithAString* fSurfaceMatPropConstCmd = nullptr;
// the box
G4UIcmdWithAString* fTankMatPropVectorCmd = nullptr;
G4UIcmdWithAString* fTankMatPropConstCmd = nullptr;
G4UIcmdWithAString* fTankMaterialCmd = nullptr;
// the box
G4UIcmdWithAString* fTankMatPropVectorCmd = nullptr;
G4UIcmdWithAString* fTankMatPropConstCmd = nullptr;
G4UIcmdWithAString* fTankMaterialCmd = nullptr;
// the world
G4UIcmdWithAString* fWorldMatPropVectorCmd = nullptr;
G4UIcmdWithAString* fWorldMatPropConstCmd = nullptr;
G4UIcmdWithAString* fWorldMaterialCmd = nullptr;
// the world
G4UIcmdWithAString* fWorldMatPropVectorCmd = nullptr;
G4UIcmdWithAString* fWorldMatPropConstCmd = nullptr;
G4UIcmdWithAString* fWorldMaterialCmd = nullptr;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -34,20 +34,20 @@
#ifndef HistoManager_h
#define HistoManager_h 1
#include "globals.hh"
#include "G4AnalysisManager.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class HistoManager
{
public:
HistoManager();
~HistoManager() = default;
public:
HistoManager();
~HistoManager() = default;
private:
void Book();
G4String fFileName;
private:
void Book();
G4String fFileName;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -33,9 +33,9 @@
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "globals.hh"
#include "G4ParticleGun.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4Event;
class PrimaryGeneratorMessenger;
@@ -44,26 +44,26 @@ class PrimaryGeneratorMessenger;
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
PrimaryGeneratorAction();
~PrimaryGeneratorAction() override;
public:
PrimaryGeneratorAction();
~PrimaryGeneratorAction() override;
void GeneratePrimaries(G4Event*) override;
void GeneratePrimaries(G4Event*) override;
G4ParticleGun* GetParticleGun() { return fParticleGun; };
G4ParticleGun* GetParticleGun() { return fParticleGun; };
void SetOptPhotonPolar();
void SetOptPhotonPolar(G4double);
void SetRandomDirection(G4bool val = true);
G4bool GetPolarized() { return fPolarized; };
G4double GetPolarization() { return fPolarization; }
void SetOptPhotonPolar();
void SetOptPhotonPolar(G4double);
void SetRandomDirection(G4bool val = true);
G4bool GetPolarized() { return fPolarized; };
G4double GetPolarization() { return fPolarization; }
private:
G4ParticleGun* fParticleGun = nullptr;
PrimaryGeneratorMessenger* fGunMessenger = nullptr;
G4bool fRandomDirection = false;
G4bool fPolarized = false;
G4double fPolarization = 0.;
private:
G4ParticleGun* fParticleGun = nullptr;
PrimaryGeneratorMessenger* fGunMessenger = nullptr;
G4bool fRandomDirection = false;
G4bool fPolarized = false;
G4double fPolarization = 0.;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -36,8 +36,8 @@
#ifndef PrimaryGeneratorMessenger_h
#define PrimaryGeneratorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "globals.hh"
class PrimaryGeneratorAction;
class G4UIdirectory;
@@ -48,17 +48,17 @@ class G4UIcmdWithABool;
class PrimaryGeneratorMessenger : public G4UImessenger
{
public:
PrimaryGeneratorMessenger(PrimaryGeneratorAction*);
~PrimaryGeneratorMessenger() override;
public:
PrimaryGeneratorMessenger(PrimaryGeneratorAction*);
~PrimaryGeneratorMessenger() override;
void SetNewValue(G4UIcommand*, G4String) override;
void SetNewValue(G4UIcommand*, G4String) override;
private:
PrimaryGeneratorAction* fPrimaryAction = nullptr;
G4UIdirectory* fGunDir = nullptr;
G4UIcmdWithADoubleAndUnit* fPolarCmd = nullptr;
G4UIcmdWithABool* fRandomDirectionCmd = nullptr;
private:
PrimaryGeneratorAction* fPrimaryAction = nullptr;
G4UIdirectory* fGunDir = nullptr;
G4UIcmdWithADoubleAndUnit* fPolarCmd = nullptr;
G4UIcmdWithABool* fRandomDirectionCmd = nullptr;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+101 -182
View File
@@ -40,206 +40,125 @@ class G4ParticleDefinition;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Run : public G4Run
{
public:
Run();
~Run() override = default;
public:
Run();
~Run() override = default;
void SetPrimary(G4ParticleDefinition* particle, G4double energy,
G4bool polarized, G4double polarization);
void SetPrimary(G4ParticleDefinition* particle, G4double energy, G4bool polarized,
G4double polarization);
// particle energy
void AddCerenkovEnergy(G4double en) { fCerenkovEnergy += en; }
void AddScintillationEnergy(G4double en) { fScintEnergy += en; }
void AddWLSAbsorptionEnergy(G4double en) { fWLSAbsorptionEnergy += en; }
void AddWLSEmissionEnergy(G4double en) { fWLSEmissionEnergy += en; }
void AddWLS2AbsorptionEnergy(G4double en) { fWLS2AbsorptionEnergy += en; }
void AddWLS2EmissionEnergy(G4double en) { fWLS2EmissionEnergy += en; }
// particle energy
void AddCerenkovEnergy(G4double en) { fCerenkovEnergy += en; }
void AddScintillationEnergy(G4double en) { fScintEnergy += en; }
void AddWLSAbsorptionEnergy(G4double en) { fWLSAbsorptionEnergy += en; }
void AddWLSEmissionEnergy(G4double en) { fWLSEmissionEnergy += en; }
void AddWLS2AbsorptionEnergy(G4double en) { fWLS2AbsorptionEnergy += en; }
void AddWLS2EmissionEnergy(G4double en) { fWLS2EmissionEnergy += en; }
// number of particles
void AddCerenkov() { fCerenkovCount += 1; }
void AddScintillation() { fScintCount += 1; }
void AddRayleigh() { fRayleighCount += 1; }
void AddWLSAbsorption() { fWLSAbsorptionCount += 1; }
void AddWLSEmission() { fWLSEmissionCount += 1; }
void AddWLS2Absorption() { fWLS2AbsorptionCount += 1; }
void AddWLS2Emission() { fWLS2EmissionCount += 1; }
// number of particles
void AddCerenkov() { fCerenkovCount += 1; }
void AddScintillation() { fScintCount += 1; }
void AddRayleigh() { fRayleighCount += 1; }
void AddWLSAbsorption() { fWLSAbsorptionCount += 1; }
void AddWLSEmission() { fWLSEmissionCount += 1; }
void AddWLS2Absorption() { fWLS2AbsorptionCount += 1; }
void AddWLS2Emission() { fWLS2EmissionCount += 1; }
void AddOpAbsorption() { fOpAbsorption += 1; }
void AddOpAbsorptionPrior() { fOpAbsorptionPrior += 1; }
void AddOpAbsorption() { fOpAbsorption += 1; }
void AddOpAbsorptionPrior() { fOpAbsorptionPrior += 1; }
void AddFresnelRefraction() { fBoundaryProcs[FresnelRefraction] += 1; }
void AddFresnelReflection() { fBoundaryProcs[FresnelReflection] += 1; }
void AddTransmission() { fBoundaryProcs[Transmission] += 1; }
void AddTotalInternalReflection()
{
fBoundaryProcs[TotalInternalReflection] += 1;
}
void AddLambertianReflection()
{
fBoundaryProcs[LambertianReflection] += 1;
}
void AddLobeReflection() { fBoundaryProcs[LobeReflection] += 1; }
void AddSpikeReflection() { fBoundaryProcs[SpikeReflection] += 1; }
void AddBackScattering() { fBoundaryProcs[BackScattering] += 1; }
void AddAbsorption() { fBoundaryProcs[Absorption] += 1; }
void AddDetection() { fBoundaryProcs[Detection] += 1; }
void AddNotAtBoundary() { fBoundaryProcs[NotAtBoundary] += 1; }
void AddSameMaterial() { fBoundaryProcs[SameMaterial] += 1; }
void AddStepTooSmall() { fBoundaryProcs[StepTooSmall] += 1; }
void AddNoRINDEX() { fBoundaryProcs[NoRINDEX] += 1; }
void AddFresnelRefraction() { fBoundaryProcs[FresnelRefraction] += 1; }
void AddFresnelReflection() { fBoundaryProcs[FresnelReflection] += 1; }
void AddTransmission() { fBoundaryProcs[Transmission] += 1; }
void AddTotalInternalReflection() { fBoundaryProcs[TotalInternalReflection] += 1; }
void AddLambertianReflection() { fBoundaryProcs[LambertianReflection] += 1; }
void AddLobeReflection() { fBoundaryProcs[LobeReflection] += 1; }
void AddSpikeReflection() { fBoundaryProcs[SpikeReflection] += 1; }
void AddBackScattering() { fBoundaryProcs[BackScattering] += 1; }
void AddAbsorption() { fBoundaryProcs[Absorption] += 1; }
void AddDetection() { fBoundaryProcs[Detection] += 1; }
void AddNotAtBoundary() { fBoundaryProcs[NotAtBoundary] += 1; }
void AddSameMaterial() { fBoundaryProcs[SameMaterial] += 1; }
void AddStepTooSmall() { fBoundaryProcs[StepTooSmall] += 1; }
void AddNoRINDEX() { fBoundaryProcs[NoRINDEX] += 1; }
void AddTotalSurface() { fTotalSurface += 1; }
void AddPolishedLumirrorAirReflection()
{
fBoundaryProcs[PolishedLumirrorAirReflection] += 1;
}
void AddPolishedLumirrorGlueReflection()
{
fBoundaryProcs[PolishedLumirrorGlueReflection] += 1;
}
void AddPolishedAirReflection()
{
fBoundaryProcs[PolishedAirReflection] += 1;
}
void AddPolishedTeflonAirReflection()
{
fBoundaryProcs[PolishedTeflonAirReflection] += 1;
}
void AddPolishedTiOAirReflection()
{
fBoundaryProcs[PolishedTiOAirReflection] += 1;
}
void AddPolishedTyvekAirReflection()
{
fBoundaryProcs[PolishedTyvekAirReflection] += 1;
}
void AddPolishedVM2000AirReflection()
{
fBoundaryProcs[PolishedVM2000AirReflection] += 1;
}
void AddPolishedVM2000GlueReflection()
{
fBoundaryProcs[PolishedVM2000GlueReflection] += 1;
}
void AddTotalSurface() { fTotalSurface += 1; }
void AddPolishedLumirrorAirReflection() { fBoundaryProcs[PolishedLumirrorAirReflection] += 1; }
void AddPolishedLumirrorGlueReflection()
{
fBoundaryProcs[PolishedLumirrorGlueReflection] += 1;
}
void AddPolishedAirReflection() { fBoundaryProcs[PolishedAirReflection] += 1; }
void AddPolishedTeflonAirReflection() { fBoundaryProcs[PolishedTeflonAirReflection] += 1; }
void AddPolishedTiOAirReflection() { fBoundaryProcs[PolishedTiOAirReflection] += 1; }
void AddPolishedTyvekAirReflection() { fBoundaryProcs[PolishedTyvekAirReflection] += 1; }
void AddPolishedVM2000AirReflection() { fBoundaryProcs[PolishedVM2000AirReflection] += 1; }
void AddPolishedVM2000GlueReflection() { fBoundaryProcs[PolishedVM2000GlueReflection] += 1; }
void AddEtchedLumirrorAirReflection()
{
fBoundaryProcs[EtchedLumirrorAirReflection] += 1;
}
void AddEtchedLumirrorGlueReflection()
{
fBoundaryProcs[EtchedLumirrorGlueReflection] += 1;
}
void AddEtchedAirReflection()
{
fBoundaryProcs[EtchedAirReflection] += 1;
}
void AddEtchedTeflonAirReflection()
{
fBoundaryProcs[EtchedTeflonAirReflection] += 1;
}
void AddEtchedTiOAirReflection()
{
fBoundaryProcs[EtchedTiOAirReflection] += 1;
}
void AddEtchedTyvekAirReflection()
{
fBoundaryProcs[EtchedTyvekAirReflection] += 1;
}
void AddEtchedVM2000AirReflection()
{
fBoundaryProcs[EtchedVM2000AirReflection] += 1;
}
void AddEtchedVM2000GlueReflection()
{
fBoundaryProcs[EtchedVM2000GlueReflection] += 1;
}
void AddEtchedLumirrorAirReflection() { fBoundaryProcs[EtchedLumirrorAirReflection] += 1; }
void AddEtchedLumirrorGlueReflection() { fBoundaryProcs[EtchedLumirrorGlueReflection] += 1; }
void AddEtchedAirReflection() { fBoundaryProcs[EtchedAirReflection] += 1; }
void AddEtchedTeflonAirReflection() { fBoundaryProcs[EtchedTeflonAirReflection] += 1; }
void AddEtchedTiOAirReflection() { fBoundaryProcs[EtchedTiOAirReflection] += 1; }
void AddEtchedTyvekAirReflection() { fBoundaryProcs[EtchedTyvekAirReflection] += 1; }
void AddEtchedVM2000AirReflection() { fBoundaryProcs[EtchedVM2000AirReflection] += 1; }
void AddEtchedVM2000GlueReflection() { fBoundaryProcs[EtchedVM2000GlueReflection] += 1; }
void AddGroundLumirrorAirReflection()
{
fBoundaryProcs[GroundLumirrorAirReflection] += 1;
}
void AddGroundLumirrorGlueReflection()
{
fBoundaryProcs[GroundLumirrorGlueReflection] += 1;
}
void AddGroundAirReflection()
{
fBoundaryProcs[GroundAirReflection] += 1;
}
void AddGroundTeflonAirReflection()
{
fBoundaryProcs[GroundTeflonAirReflection] += 1;
}
void AddGroundTiOAirReflection()
{
fBoundaryProcs[GroundTiOAirReflection] += 1;
}
void AddGroundTyvekAirReflection()
{
fBoundaryProcs[GroundTyvekAirReflection] += 1;
}
void AddGroundVM2000AirReflection()
{
fBoundaryProcs[GroundVM2000AirReflection] += 1;
}
void AddGroundVM2000GlueReflection()
{
fBoundaryProcs[GroundVM2000GlueReflection] += 1;
}
void AddGroundLumirrorAirReflection() { fBoundaryProcs[GroundLumirrorAirReflection] += 1; }
void AddGroundLumirrorGlueReflection() { fBoundaryProcs[GroundLumirrorGlueReflection] += 1; }
void AddGroundAirReflection() { fBoundaryProcs[GroundAirReflection] += 1; }
void AddGroundTeflonAirReflection() { fBoundaryProcs[GroundTeflonAirReflection] += 1; }
void AddGroundTiOAirReflection() { fBoundaryProcs[GroundTiOAirReflection] += 1; }
void AddGroundTyvekAirReflection() { fBoundaryProcs[GroundTyvekAirReflection] += 1; }
void AddGroundVM2000AirReflection() { fBoundaryProcs[GroundVM2000AirReflection] += 1; }
void AddGroundVM2000GlueReflection() { fBoundaryProcs[GroundVM2000GlueReflection] += 1; }
void AddDichroic() { fBoundaryProcs[Dichroic] += 1; }
void AddCoatedDielectricRefraction()
{
fBoundaryProcs[CoatedDielectricRefraction] += 1;
}
void AddCoatedDielectricReflection()
{
fBoundaryProcs[CoatedDielectricReflection] += 1;
}
void AddCoatedDielectricFrustratedTransmission()
{
fBoundaryProcs[CoatedDielectricFrustratedTransmission] += 1;
}
void AddDichroic() { fBoundaryProcs[Dichroic] += 1; }
void AddCoatedDielectricRefraction() { fBoundaryProcs[CoatedDielectricRefraction] += 1; }
void AddCoatedDielectricReflection() { fBoundaryProcs[CoatedDielectricReflection] += 1; }
void AddCoatedDielectricFrustratedTransmission()
{
fBoundaryProcs[CoatedDielectricFrustratedTransmission] += 1;
}
void Merge(const G4Run*) override;
void Merge(const G4Run*) override;
void EndOfRun();
void EndOfRun();
private:
// primary particle
G4ParticleDefinition* fParticle = nullptr;
G4double fEkin = -1.;
G4bool fPolarized = false;
G4double fPolarization = 0.;
private:
// primary particle
G4ParticleDefinition* fParticle = nullptr;
G4double fEkin = -1.;
G4bool fPolarized = false;
G4double fPolarization = 0.;
G4double fCerenkovEnergy = 0.;
G4double fScintEnergy = 0.;
G4double fWLSAbsorptionEnergy = 0.;
G4double fWLSEmissionEnergy = 0.;
G4double fWLS2AbsorptionEnergy = 0.;
G4double fWLS2EmissionEnergy = 0.;
G4double fCerenkovEnergy = 0.;
G4double fScintEnergy = 0.;
G4double fWLSAbsorptionEnergy = 0.;
G4double fWLSEmissionEnergy = 0.;
G4double fWLS2AbsorptionEnergy = 0.;
G4double fWLS2EmissionEnergy = 0.;
// number of particles
G4int fCerenkovCount = 0;
G4int fScintCount = 0;
G4int fWLSAbsorptionCount = 0;
G4int fWLSEmissionCount = 0;
G4int fWLS2AbsorptionCount = 0;
G4int fWLS2EmissionCount = 0;
// number of events
G4int fRayleighCount = 0;
// number of particles
G4int fCerenkovCount = 0;
G4int fScintCount = 0;
G4int fWLSAbsorptionCount = 0;
G4int fWLSEmissionCount = 0;
G4int fWLS2AbsorptionCount = 0;
G4int fWLS2EmissionCount = 0;
// number of events
G4int fRayleighCount = 0;
// non-boundary processes
G4int fOpAbsorption = 0;
// non-boundary processes
G4int fOpAbsorption = 0;
// prior to boundary:
G4int fOpAbsorptionPrior = 0;
// prior to boundary:
G4int fOpAbsorptionPrior = 0;
// boundary proc
std::vector<G4int> fBoundaryProcs;
// boundary proc
std::vector<G4int> fBoundaryProcs;
G4int fTotalSurface = 0;
G4int fTotalSurface = 0;
};
#endif /* Run_h */
@@ -34,8 +34,8 @@
#ifndef RunAction_h
#define RunAction_h 1
#include "globals.hh"
#include "G4UserRunAction.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,18 +45,18 @@ class PrimaryGeneratorAction;
class RunAction : public G4UserRunAction
{
public:
RunAction(PrimaryGeneratorAction* = nullptr);
~RunAction() override;
public:
RunAction(PrimaryGeneratorAction* = nullptr);
~RunAction() override;
G4Run* GenerateRun() override;
void BeginOfRunAction(const G4Run*) override;
void EndOfRunAction(const G4Run*) override;
G4Run* GenerateRun() override;
void BeginOfRunAction(const G4Run*) override;
void EndOfRunAction(const G4Run*) override;
private:
Run* fRun = nullptr;
HistoManager* fHistoManager = nullptr;
PrimaryGeneratorAction* fPrimary = nullptr;
private:
Run* fRun = nullptr;
HistoManager* fHistoManager = nullptr;
PrimaryGeneratorAction* fPrimary = nullptr;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -32,30 +32,30 @@
#ifndef SteppingAction_h
#define SteppingAction_h 1
#include "globals.hh"
#include "G4UserSteppingAction.hh"
#include "globals.hh"
class SteppingMessenger;
class SteppingAction : public G4UserSteppingAction
{
public:
SteppingAction();
~SteppingAction() override;
public:
SteppingAction();
~SteppingAction() override;
// method from the base class
void UserSteppingAction(const G4Step*) override;
// method from the base class
void UserSteppingAction(const G4Step*) override;
inline void SetKillOnSecondSurface(G4bool val) { fKillOnSecondSurface = val; }
inline G4bool GetKillOnSecondSurface() { return fKillOnSecondSurface; }
inline void SetKillOnSecondSurface(G4bool val) { fKillOnSecondSurface = val; }
inline G4bool GetKillOnSecondSurface() { return fKillOnSecondSurface; }
private:
SteppingMessenger* fSteppingMessenger = nullptr;
private:
SteppingMessenger* fSteppingMessenger = nullptr;
G4int fVerbose = 0;
size_t fIdxVelocity = 0;
G4int fVerbose = 0;
size_t fIdxVelocity = 0;
G4bool fKillOnSecondSurface = false;
G4bool fKillOnSecondSurface = false;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -33,8 +33,8 @@
#ifndef SteppingMessenger_h
#define SteppingMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "globals.hh"
class SteppingAction;
class G4UIdirectory;
@@ -44,16 +44,16 @@ class G4UIcmdWithABool;
class SteppingMessenger : public G4UImessenger
{
public:
SteppingMessenger(SteppingAction*);
~SteppingMessenger() override;
public:
SteppingMessenger(SteppingAction*);
~SteppingMessenger() override;
void SetNewValue(G4UIcommand*, G4String) override;
void SetNewValue(G4UIcommand*, G4String) override;
private:
G4UIdirectory* fSteppingDir = nullptr;
G4UIcmdWithABool* fKillOnSecondSurfaceCmd = nullptr;
SteppingAction* fSteppingAction = nullptr;
private:
G4UIdirectory* fSteppingDir = nullptr;
G4UIcmdWithABool* fKillOnSecondSurfaceCmd = nullptr;
SteppingAction* fSteppingAction = nullptr;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,14 +43,14 @@ class SteppingVerbose;
class SteppingVerbose : public G4SteppingVerbose
{
public:
SteppingVerbose() = default;
~SteppingVerbose() = default;
public:
SteppingVerbose() = default;
~SteppingVerbose() = default;
virtual G4VSteppingVerbose* Clone() { return new SteppingVerbose; }
virtual G4VSteppingVerbose* Clone() { return new SteppingVerbose; }
void StepInfo();
void TrackingStarted();
void StepInfo();
void TrackingStarted();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -32,51 +32,50 @@
#ifndef TrackInformation_h
#define TrackInformation_h 1
#include "globals.hh"
#include "G4Allocator.hh"
#include "G4VUserTrackInformation.hh"
#include "globals.hh"
class G4Track;
class TrackInformation : public G4VUserTrackInformation
{
public:
TrackInformation();
TrackInformation(const G4Track* aTrack);
TrackInformation(const TrackInformation* aTrackInfo);
~TrackInformation() override;
public:
TrackInformation();
TrackInformation(const G4Track* aTrack);
TrackInformation(const TrackInformation* aTrackInfo);
~TrackInformation() override;
inline void* operator new(size_t);
inline void operator delete(void* aTrackInfo);
inline void* operator new(size_t);
inline void operator delete(void* aTrackInfo);
TrackInformation& operator=(const TrackInformation& right);
TrackInformation& operator=(const TrackInformation& right);
void SetSourceTrackInformation(const G4Track* aTrack);
void Print() const override;
void SetSourceTrackInformation(const G4Track* aTrack);
void Print() const override;
inline G4bool GetIsFirstTankX() const { return fFirstTankX; }
inline void SetIsFirstTankX(G4bool b) { fFirstTankX = b; }
inline G4bool GetIsFirstTankX() const { return fFirstTankX; }
inline void SetIsFirstTankX(G4bool b) { fFirstTankX = b; }
inline G4int GetReflectionNumber() const { return fReflectionNumber; }
inline void IncrementReflectionNumber() { ++fReflectionNumber; }
inline G4int GetReflectionNumber() const { return fReflectionNumber; }
inline void IncrementReflectionNumber() { ++fReflectionNumber; }
private:
G4bool fFirstTankX = false;
G4int fReflectionNumber = 0;
private:
G4bool fFirstTankX = false;
G4int fReflectionNumber = 0;
};
extern G4ThreadLocal G4Allocator<TrackInformation>* aTrackInformationAllocator;
inline void* TrackInformation::operator new(size_t)
{
if(!aTrackInformationAllocator)
aTrackInformationAllocator = new G4Allocator<TrackInformation>;
return (void*) aTrackInformationAllocator->MallocSingle();
if (!aTrackInformationAllocator) aTrackInformationAllocator = new G4Allocator<TrackInformation>;
return (void*)aTrackInformationAllocator->MallocSingle();
}
inline void TrackInformation::operator delete(void* aTrackInfo)
{
aTrackInformationAllocator->FreeSingle((TrackInformation*) aTrackInfo);
aTrackInformationAllocator->FreeSingle((TrackInformation*)aTrackInfo);
}
#endif
@@ -37,12 +37,12 @@
class TrackingAction : public G4UserTrackingAction
{
public:
TrackingAction() = default;
~TrackingAction() override = default;
public:
TrackingAction() = default;
~TrackingAction() override = default;
void PreUserTrackingAction(const G4Track*) override;
void PostUserTrackingAction(const G4Track*) override;
void PreUserTrackingAction(const G4Track*) override;
void PostUserTrackingAction(const G4Track*) override;
};
#endif