Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -69,11 +69,11 @@ G4PSCellFluxForCylinder3D::G4PSCellFluxForCylinder3D(G4String name,
|
||||
|
||||
G4PSCellFluxForCylinder3D::~G4PSCellFluxForCylinder3D() { ; }
|
||||
|
||||
void G4PSCellFluxForCylinder3D::SetCylinderSize(G4double dr, G4double dz)
|
||||
void G4PSCellFluxForCylinder3D::SetCylinderSize(G4ThreeVector cylSize, G4double StartAng, G4double AngSpan)
|
||||
{
|
||||
cylinderSize.setX(dz); // Z Phi R
|
||||
cylinderSize.setY(twopi); // Z Phi R
|
||||
cylinderSize.setZ(dr); // Z Phi R
|
||||
cylinderSize = cylSize; // rMin, rMax, halfZ
|
||||
fAngle[0] = StartAng;
|
||||
fAngle[1] = AngSpan;
|
||||
}
|
||||
void G4PSCellFluxForCylinder3D::SetNumberOfSegments(G4int nSeg[3])
|
||||
{
|
||||
@@ -84,13 +84,14 @@ void G4PSCellFluxForCylinder3D::SetNumberOfSegments(G4int nSeg[3])
|
||||
|
||||
G4double G4PSCellFluxForCylinder3D::ComputeVolume(G4Step*, G4int idx)
|
||||
{
|
||||
G4double r0 = (cylinderSize[2] / nSegment[2]) * (idx);
|
||||
G4double r1 = (cylinderSize[2] / nSegment[2]) * (idx + 1);
|
||||
G4double dr = (cylinderSize[1] - cylinderSize[0]) / nSegment[2];
|
||||
G4double r0 = cylinderSize[0] + dr * (idx);
|
||||
G4double r1 = cylinderSize[0] + dr * (idx + 1);
|
||||
G4double dRArea = (r1 * r1 - r0 * r0) * pi;
|
||||
|
||||
// cylinderSize is given in Half Size
|
||||
G4double fullz = cylinderSize[0] / nSegment[0] * 2.;
|
||||
G4double phiRatio = 1. / nSegment[1];
|
||||
G4double fullz = cylinderSize[2] / nSegment[0] * 2.;
|
||||
G4double phiRatio = (fAngle[1] / (CLHEP::twopi*rad)) / nSegment[1];
|
||||
G4double v = dRArea * fullz * phiRatio;
|
||||
|
||||
if(verboseLevel > 9)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
// G4PSDoseDepositForCylinder3D
|
||||
#include "G4PSDoseDepositForCylinder3D.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
@@ -60,11 +61,11 @@ G4PSDoseDepositForCylinder3D::G4PSDoseDepositForCylinder3D(G4String name,
|
||||
|
||||
G4PSDoseDepositForCylinder3D::~G4PSDoseDepositForCylinder3D() { ; }
|
||||
|
||||
void G4PSDoseDepositForCylinder3D::SetCylinderSize(G4double dr, G4double dz)
|
||||
void G4PSDoseDepositForCylinder3D::SetCylinderSize(G4ThreeVector cylSize, G4double StartAng, G4double AngSpan)
|
||||
{
|
||||
cylinderSize.setX(dz); // Z Phi R
|
||||
cylinderSize.setY(twopi); // Z Phi R
|
||||
cylinderSize.setZ(dr); // Z Phi R
|
||||
cylinderSize = cylSize; // rMin, rMax, halfZ
|
||||
fAngle[0] = StartAng;
|
||||
fAngle[1] = AngSpan;
|
||||
}
|
||||
void G4PSDoseDepositForCylinder3D::SetNumberOfSegments(G4int nSeg[3])
|
||||
{
|
||||
@@ -74,14 +75,22 @@ void G4PSDoseDepositForCylinder3D::SetNumberOfSegments(G4int nSeg[3])
|
||||
}
|
||||
G4double G4PSDoseDepositForCylinder3D::ComputeVolume(G4Step*, G4int idx)
|
||||
{
|
||||
G4double r0 = (cylinderSize[2] / nSegment[2]) * (idx);
|
||||
G4double r1 = (cylinderSize[2] / nSegment[2]) * (idx + 1);
|
||||
G4double dr = (cylinderSize[1] - cylinderSize[0]) / nSegment[2];
|
||||
G4double r0 = cylinderSize[0] + dr * (idx);
|
||||
G4double r1 = cylinderSize[0] + dr * (idx + 1);
|
||||
G4double dRArea = (r1 * r1 - r0 * r0) * pi;
|
||||
|
||||
// cylinderSize is given in Half Size
|
||||
G4double fullz = cylinderSize[0] / nSegment[0] * 2.;
|
||||
G4double phiRatio = 1. / nSegment[1];
|
||||
G4double fullz = cylinderSize[2] / nSegment[0] * 2.;
|
||||
G4double phiRatio = (fAngle[1] / (CLHEP::twopi*rad)) / nSegment[1];
|
||||
G4double v = dRArea * fullz * phiRatio;
|
||||
|
||||
if(verboseLevel > 9)
|
||||
{
|
||||
G4cout << " r0= " << r0 / cm << " r1= " << r1 / cm
|
||||
<< " fullz=" << fullz / cm << G4endl;
|
||||
G4cout << " idx= " << idx << " v(cm3)= " << v / cm3 << G4endl;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
// G4PSPassageCellFluxForCylinder3D
|
||||
#include "G4PSPassageCellFluxForCylinder3D.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (Description)
|
||||
@@ -60,11 +61,11 @@ G4PSPassageCellFluxForCylinder3D::G4PSPassageCellFluxForCylinder3D(
|
||||
|
||||
G4PSPassageCellFluxForCylinder3D::~G4PSPassageCellFluxForCylinder3D() { ; }
|
||||
|
||||
void G4PSPassageCellFluxForCylinder3D::SetCylinderSize(G4double dr, G4double dz)
|
||||
void G4PSPassageCellFluxForCylinder3D::SetCylinderSize(G4ThreeVector cylSize, G4double StartAng, G4double AngSpan)
|
||||
{
|
||||
cylinderSize.setX(dz); // Z Phi R
|
||||
cylinderSize.setY(twopi); // Z Phi R
|
||||
cylinderSize.setZ(dr); // Z Phi R
|
||||
cylinderSize = cylSize; // rMin, rMax, halfZ
|
||||
fAngle[0] = StartAng;
|
||||
fAngle[1] = AngSpan;
|
||||
}
|
||||
void G4PSPassageCellFluxForCylinder3D::SetNumberOfSegments(G4int nSeg[3])
|
||||
{
|
||||
@@ -74,14 +75,22 @@ void G4PSPassageCellFluxForCylinder3D::SetNumberOfSegments(G4int nSeg[3])
|
||||
}
|
||||
G4double G4PSPassageCellFluxForCylinder3D::ComputeVolume(G4Step*, G4int idx)
|
||||
{
|
||||
G4double r0 = (cylinderSize[2] / nSegment[2]) * (idx);
|
||||
G4double r1 = (cylinderSize[2] / nSegment[2]) * (idx + 1);
|
||||
G4double dr = (cylinderSize[1] - cylinderSize[0]) / nSegment[2];
|
||||
G4double r0 = cylinderSize[0] + dr * (idx);
|
||||
G4double r1 = cylinderSize[0] + dr * (idx + 1);
|
||||
G4double dRArea = (r1 * r1 - r0 * r0) * pi;
|
||||
|
||||
// cylinderSize is given in Half Size
|
||||
G4double fullz = cylinderSize[0] / nSegment[0] * 2.;
|
||||
G4double phiRatio = 1. / nSegment[1];
|
||||
G4double fullz = cylinderSize[2] / nSegment[0] * 2.;
|
||||
G4double phiRatio = (fAngle[1] / (CLHEP::twopi*rad)) / nSegment[1];
|
||||
G4double v = dRArea * fullz * phiRatio;
|
||||
|
||||
if(verboseLevel > 9)
|
||||
{
|
||||
G4cout << " r0= " << r0 / cm << " r1= " << r1 / cm
|
||||
<< " fullz=" << fullz / cm << G4endl;
|
||||
G4cout << " idx= " << idx << " v(cm3)= " << v / cm3 << G4endl;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user