Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
-17
View File
@@ -1,17 +0,0 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4detscorer
# Package: Geant4.src.G4digits_hits.G4detscorer
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
+128 -163
View File
@@ -1,174 +1,139 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4detscorer
# Package: Geant4.src.G4digits_hits.G4detscorer
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
include_directories(${USOLIDS_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/detector/include)
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/digits/include)
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/CSG/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4detscorer
HEADERS
G4PSCellCharge.hh
G4PSCellCharge3D.hh
G4PSCellFlux.hh
G4PSCellFlux3D.hh
G4PSCellFluxForCylinder3D.hh
G4PSCylinderSurfaceCurrent.hh
G4PSCylinderSurfaceCurrent3D.hh
G4PSCylinderSurfaceFlux.hh
G4PSCylinderSurfaceFlux3D.hh
G4PSDirectionFlag.hh
G4PSDoseDeposit.hh
G4PSDoseDeposit3D.hh
G4PSDoseDepositForCylinder3D.hh
G4PSEnergyDeposit.hh
G4PSEnergyDeposit3D.hh
G4PSFlatSurfaceCurrent.hh
G4PSFlatSurfaceCurrent3D.hh
G4PSFlatSurfaceFlux.hh
G4PSFlatSurfaceFlux3D.hh
G4PSMinKinEAtGeneration.hh
G4PSMinKinEAtGeneration3D.hh
G4PSNofCollision.hh
G4PSNofCollision3D.hh
G4PSNofSecondary.hh
G4PSNofSecondary3D.hh
G4PSNofStep.hh
G4PSNofStep3D.hh
G4PSPassageCellCurrent.hh
G4PSPassageCellCurrent3D.hh
G4PSPassageCellFlux.hh
G4PSPassageCellFlux3D.hh
G4PSPassageCellFluxForCylinder3D.hh
G4PSPassageTrackLength.hh
G4PSPassageTrackLength3D.hh
G4PSPopulation.hh
G4PSPopulation3D.hh
G4PSSphereSurfaceCurrent.hh
G4PSSphereSurfaceCurrent3D.hh
G4PSSphereSurfaceFlux.hh
G4PSSphereSurfaceFlux3D.hh
G4PSStepChecker.hh
G4PSStepChecker3D.hh
G4PSTermination.hh
G4PSTermination3D.hh
G4PSTrackCounter.hh
G4PSTrackCounter3D.hh
G4PSTrackLength.hh
G4PSTrackLength3D.hh
G4SDChargedFilter.hh
G4SDKineticEnergyFilter.hh
G4SDNeutralFilter.hh
G4SDParticleFilter.hh
G4SDParticleWithEnergyFilter.hh
SOURCES
G4PSCellCharge.cc
G4PSCellCharge3D.cc
G4PSCellFlux.cc
G4PSCellFlux3D.cc
G4PSCellFluxForCylinder3D.cc
G4PSCylinderSurfaceCurrent.cc
G4PSCylinderSurfaceCurrent3D.cc
G4PSCylinderSurfaceFlux.cc
G4PSCylinderSurfaceFlux3D.cc
G4PSDoseDeposit.cc
G4PSDoseDeposit3D.cc
G4PSDoseDepositForCylinder3D.cc
G4PSEnergyDeposit.cc
G4PSEnergyDeposit3D.cc
G4PSFlatSurfaceCurrent.cc
G4PSFlatSurfaceCurrent3D.cc
G4PSFlatSurfaceFlux.cc
G4PSFlatSurfaceFlux3D.cc
G4PSMinKinEAtGeneration.cc
G4PSMinKinEAtGeneration3D.cc
G4PSNofCollision.cc
G4PSNofCollision3D.cc
G4PSNofSecondary.cc
G4PSNofSecondary3D.cc
G4PSNofStep.cc
G4PSNofStep3D.cc
G4PSPassageCellCurrent.cc
G4PSPassageCellCurrent3D.cc
G4PSPassageCellFlux.cc
G4PSPassageCellFlux3D.cc
G4PSPassageCellFluxForCylinder3D.cc
G4PSPassageTrackLength.cc
G4PSPassageTrackLength3D.cc
G4PSPopulation.cc
G4PSPopulation3D.cc
G4PSSphereSurfaceCurrent.cc
G4PSSphereSurfaceCurrent3D.cc
G4PSSphereSurfaceFlux.cc
G4PSSphereSurfaceFlux3D.cc
G4PSStepChecker.cc
G4PSStepChecker3D.cc
G4PSTermination.cc
G4PSTermination3D.cc
G4PSTrackCounter.cc
G4PSTrackCounter3D.cc
G4PSTrackLength.cc
G4PSTrackLength3D.cc
G4SDChargedFilter.cc
G4SDKineticEnergyFilter.cc
G4SDNeutralFilter.cc
G4SDParticleFilter.cc
G4SDParticleWithEnergyFilter.cc
GRANULAR_DEPENDENCIES
G4csg
G4detector
G4digits
G4geometrymng
G4globman
G4hits
G4intercoms
G4materials
G4navigation
G4partman
G4track
G4volumes
GLOBAL_DEPENDENCIES
G4geometry
G4global
G4intercoms
G4materials
G4particles
G4track
LINK_LIBRARIES
geant4_define_module(NAME G4detscorer
HEADERS
G4PSCellCharge.hh
G4PSCellCharge3D.hh
G4PSCellFlux.hh
G4PSCellFlux3D.hh
G4PSCellFluxForCylinder3D.hh
G4PSCylinderSurfaceCurrent.hh
G4PSCylinderSurfaceCurrent3D.hh
G4PSCylinderSurfaceFlux.hh
G4PSCylinderSurfaceFlux3D.hh
G4PSDirectionFlag.hh
G4PSDoseDeposit.hh
G4PSDoseDeposit3D.hh
G4PSDoseDepositForCylinder3D.hh
G4PSEnergyDeposit.hh
G4PSEnergyDeposit3D.hh
G4PSFlatSurfaceCurrent.hh
G4PSFlatSurfaceCurrent3D.hh
G4PSFlatSurfaceFlux.hh
G4PSFlatSurfaceFlux3D.hh
G4PSMinKinEAtGeneration.hh
G4PSMinKinEAtGeneration3D.hh
G4PSNofCollision.hh
G4PSNofCollision3D.hh
G4PSNofSecondary.hh
G4PSNofSecondary3D.hh
G4PSNofStep.hh
G4PSNofStep3D.hh
G4PSPassageCellCurrent.hh
G4PSPassageCellCurrent3D.hh
G4PSPassageCellFlux.hh
G4PSPassageCellFlux3D.hh
G4PSPassageCellFluxForCylinder3D.hh
G4PSPassageTrackLength.hh
G4PSPassageTrackLength3D.hh
G4PSPopulation.hh
G4PSPopulation3D.hh
G4PSSphereSurfaceCurrent.hh
G4PSSphereSurfaceCurrent3D.hh
G4PSSphereSurfaceFlux.hh
G4PSSphereSurfaceFlux3D.hh
G4PSStepChecker.hh
G4PSStepChecker3D.hh
G4PSTermination.hh
G4PSTermination3D.hh
G4PSTrackCounter.hh
G4PSTrackCounter3D.hh
G4PSTrackLength.hh
G4PSTrackLength3D.hh
G4SDChargedFilter.hh
G4SDKineticEnergyFilter.hh
G4SDNeutralFilter.hh
G4SDParticleFilter.hh
G4SDParticleWithEnergyFilter.hh
SOURCES
G4PSCellCharge.cc
G4PSCellCharge3D.cc
G4PSCellFlux.cc
G4PSCellFlux3D.cc
G4PSCellFluxForCylinder3D.cc
G4PSCylinderSurfaceCurrent.cc
G4PSCylinderSurfaceCurrent3D.cc
G4PSCylinderSurfaceFlux.cc
G4PSCylinderSurfaceFlux3D.cc
G4PSDoseDeposit.cc
G4PSDoseDeposit3D.cc
G4PSDoseDepositForCylinder3D.cc
G4PSEnergyDeposit.cc
G4PSEnergyDeposit3D.cc
G4PSFlatSurfaceCurrent.cc
G4PSFlatSurfaceCurrent3D.cc
G4PSFlatSurfaceFlux.cc
G4PSFlatSurfaceFlux3D.cc
G4PSMinKinEAtGeneration.cc
G4PSMinKinEAtGeneration3D.cc
G4PSNofCollision.cc
G4PSNofCollision3D.cc
G4PSNofSecondary.cc
G4PSNofSecondary3D.cc
G4PSNofStep.cc
G4PSNofStep3D.cc
G4PSPassageCellCurrent.cc
G4PSPassageCellCurrent3D.cc
G4PSPassageCellFlux.cc
G4PSPassageCellFlux3D.cc
G4PSPassageCellFluxForCylinder3D.cc
G4PSPassageTrackLength.cc
G4PSPassageTrackLength3D.cc
G4PSPopulation.cc
G4PSPopulation3D.cc
G4PSSphereSurfaceCurrent.cc
G4PSSphereSurfaceCurrent3D.cc
G4PSSphereSurfaceFlux.cc
G4PSSphereSurfaceFlux3D.cc
G4PSStepChecker.cc
G4PSStepChecker3D.cc
G4PSTermination.cc
G4PSTermination3D.cc
G4PSTrackCounter.cc
G4PSTrackCounter3D.cc
G4PSTrackLength.cc
G4PSTrackLength3D.cc
G4SDChargedFilter.cc
G4SDKineticEnergyFilter.cc
G4SDNeutralFilter.cc
G4SDParticleFilter.cc
G4SDParticleWithEnergyFilter.cc
GRANULAR_DEPENDENCIES
G4csg
G4detector
G4digits
G4geometrymng
G4globman
G4hits
G4intercoms
G4materials
G4navigation
G4partman
G4track
G4volumes
GLOBAL_DEPENDENCIES
G4geometry
G4global
G4intercoms
G4materials
G4particles
G4track
)
# List any source specific properties here
+4 -21
View File
@@ -131,26 +131,9 @@ void G4PSCellFlux::DefineUnitAndCategory(){
new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2));
}
G4double G4PSCellFlux::ComputeVolume(G4Step* aStep, G4int idx){
G4VPhysicalVolume* physVol = aStep->GetPreStepPoint()->GetPhysicalVolume();
G4VPVParameterisation* physParam = physVol->GetParameterisation();
G4VSolid* solid = 0;
if(physParam)
{ // for parameterized volume
if(idx<0)
{
G4ExceptionDescription ED;
ED << "Incorrect replica number --- GetReplicaNumber : " << idx << G4endl;
G4Exception("G4PSCellFlux::ComputeVolume","DetPS0001",JustWarning,ED);
}
solid = physParam->ComputeSolid(idx, physVol);
solid->ComputeDimensions(physParam,idx,physVol);
}
else
{ // for ordinary volume
solid = physVol->GetLogicalVolume()->GetSolid();
}
G4double G4PSCellFlux::ComputeVolume(G4Step* aStep, G4int idx)
{
G4VSolid* solid = ComputeSolid( aStep, idx );
assert(solid);
return solid->GetCubicVolume();
}
@@ -76,26 +76,13 @@ G4PSCylinderSurfaceCurrent::G4PSCylinderSurfaceCurrent(G4String name,
G4PSCylinderSurfaceCurrent::~G4PSCylinderSurfaceCurrent()
{;}
G4bool G4PSCylinderSurfaceCurrent::ProcessHits(G4Step* aStep,G4TouchableHistory*)
{
G4StepPoint* preStep = aStep->GetPreStepPoint();
G4VPhysicalVolume* physVol = preStep->GetPhysicalVolume();
G4VPVParameterisation* physParam = physVol->GetParameterisation();
G4VSolid * solid = 0;
if(physParam)
{ // for parameterized volume
G4int idx = ((G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()))
->GetReplicaNumber(indexDepth);
solid = physParam->ComputeSolid(idx, physVol);
solid->ComputeDimensions(physParam,idx,physVol);
}
else
{ // for ordinary volume
solid = physVol->GetLogicalVolume()->GetSolid();
}
G4Tubs* tubsSolid = (G4Tubs*)(solid);
G4StepPoint* preStep = aStep->GetPreStepPoint();
G4VSolid* solid= ComputeCurrentSolid(aStep);
G4Tubs* tubsSolid = static_cast<G4Tubs*>(solid);
G4int dirFlag =IsSelectedSurface(aStep,tubsSolid);
// G4cout << " pos " << preStep->GetPosition() <<" dirFlag " << G4endl;
if ( dirFlag > 0 ) {
@@ -80,23 +80,10 @@ G4PSCylinderSurfaceFlux::~G4PSCylinderSurfaceFlux()
G4bool G4PSCylinderSurfaceFlux::ProcessHits(G4Step* aStep,G4TouchableHistory*)
{
G4StepPoint* preStep = aStep->GetPreStepPoint();
G4VSolid* solid= ComputeCurrentSolid(aStep);
assert( dynamic_cast<G4Tubs*>(solid) );
G4VPhysicalVolume* physVol = preStep->GetPhysicalVolume();
G4VPVParameterisation* physParam = physVol->GetParameterisation();
G4VSolid * solid = 0;
if(physParam)
{ // for parameterized volume
G4int idx = ((G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()))
->GetReplicaNumber(indexDepth);
solid = physParam->ComputeSolid(idx, physVol);
solid->ComputeDimensions(physParam,idx,physVol);
}
else
{ // for ordinary volume
solid = physVol->GetLogicalVolume()->GetSolid();
}
G4Tubs* tubsSolid = (G4Tubs*)(solid);
G4Tubs* tubsSolid = static_cast<G4Tubs*>(solid);
G4int dirFlag =IsSelectedSurface(aStep,tubsSolid);
@@ -68,7 +68,6 @@ G4bool G4PSDoseDeposit::ProcessHits(G4Step* aStep,G4TouchableHistory*)
->GetReplicaNumber(indexDepth);
G4double cubicVolume = ComputeVolume(aStep, idx);
G4double density = aStep->GetTrack()->GetStep()->GetPreStepPoint()->GetMaterial()->GetDensity();
G4double dose = edep / ( density * cubicVolume );
dose *= aStep->GetPreStepPoint()->GetWeight();
@@ -116,27 +115,9 @@ void G4PSDoseDeposit::SetUnit(const G4String& unit)
CheckAndSetUnit(unit,"Dose");
}
G4double G4PSDoseDeposit::ComputeVolume(G4Step* aStep, G4int idx){
G4VPhysicalVolume* physVol = aStep->GetPreStepPoint()->GetPhysicalVolume();
G4VPVParameterisation* physParam = physVol->GetParameterisation();
G4VSolid* solid = 0;
if(physParam)
{ // for parameterized volume
if(idx<0)
{
G4ExceptionDescription ED;
ED << "Incorrect replica number --- GetReplicaNumber : " << idx << G4endl;
G4Exception("G4PSDoseDeposit::ComputeVolume","DetPS0004",JustWarning,ED);
}
solid = physParam->ComputeSolid(idx, physVol);
solid->ComputeDimensions(physParam,idx,physVol);
}
else
{ // for ordinary volume
solid = physVol->GetLogicalVolume()->GetSolid();
}
G4double G4PSDoseDeposit::ComputeVolume(G4Step* aStep, G4int idx)
{
G4VSolid* solid = ComputeSolid(aStep, idx);
return solid->GetCubicVolume();
}
@@ -165,27 +165,7 @@ void G4PSPassageCellFlux::DefineUnitAndCategory(){
new G4UnitDefinition("permeter2","perm2","Per Unit Surface",(1./m2));
}
G4double G4PSPassageCellFlux::ComputeVolume(G4Step* aStep, G4int idx){
G4VPhysicalVolume* physVol = aStep->GetPreStepPoint()->GetPhysicalVolume();
G4VPVParameterisation* physParam = physVol->GetParameterisation();
G4VSolid* solid = 0;
if(physParam)
{ // for parameterized volume
if(idx<0)
{
G4ExceptionDescription ED;
ED << "Incorrect replica number --- GetReplicaNumber : " << idx << G4endl;
G4Exception("G4PSPassageCellFlux::ComputeVolume","DetPS0013",JustWarning,ED);
}
solid = physParam->ComputeSolid(idx, physVol);
solid->ComputeDimensions(physParam,idx,physVol);
}
else
{ // for ordinary volume
solid = physVol->GetLogicalVolume()->GetSolid();
}
return solid->GetCubicVolume();
G4double G4PSPassageCellFlux::ComputeVolume(G4Step* aStep, G4int idx )
{
return ComputeSolid(aStep, idx)->GetCubicVolume();
}
@@ -78,23 +78,11 @@ G4PSSphereSurfaceCurrent::~G4PSSphereSurfaceCurrent()
G4bool G4PSSphereSurfaceCurrent::ProcessHits(G4Step* aStep,G4TouchableHistory*)
{
G4StepPoint* preStep = aStep->GetPreStepPoint();
G4VPhysicalVolume* physVol = preStep->GetPhysicalVolume();
G4VPVParameterisation* physParam = physVol->GetParameterisation();
G4VSolid * solid = 0;
if(physParam)
{ // for parameterized volume
G4int idx = ((G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()))
->GetReplicaNumber(indexDepth);
solid = physParam->ComputeSolid(idx, physVol);
solid->ComputeDimensions(physParam,idx,physVol);
}
else
{ // for ordinary volume
solid = physVol->GetLogicalVolume()->GetSolid();
}
G4Sphere* sphereSolid = (G4Sphere*)(solid);
G4VSolid * solid= ComputeCurrentSolid(aStep);
assert( dynamic_cast<G4Sphere*>(solid) != nullptr );
G4Sphere* sphereSolid = static_cast<G4Sphere*>(solid);
G4int dirFlag =IsSelectedSurface(aStep,sphereSolid);
if ( dirFlag > 0 ) {
if ( fDirection == fCurrent_InOut || fDirection == dirFlag ){