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
+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 ){