Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -6,6 +6,12 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-07-01 John Allison (modeling-V11-01-06)
|
||||
- G4PhysicalVolumeModel: Introduce touchable count.
|
||||
- std::map<G4int,G4int>& GetNumberOfTouchables():
|
||||
- Returns number of touchables by depth of geometry tree.
|
||||
- Used in G4VViewer when deciding whether to expand scene tree.
|
||||
|
||||
## 2023-05-30 John Allison (modeling-V11-01-05)
|
||||
- G4PhysicalVolumeModel.cc: Fix Coverity warnings.
|
||||
|
||||
|
||||
@@ -242,6 +242,9 @@ public: // With description
|
||||
// G4VTrajectory::ShowTrajectory for an example of the use of
|
||||
// G4Atts.
|
||||
|
||||
const std::map<G4int,G4int>& GetNumberOfTouchables() const {return fNTouchables;}
|
||||
// Total number of touchables drawn at each depth
|
||||
|
||||
void SetRequestedDepth (G4int requestedDepth) {
|
||||
fRequestedDepth = requestedDepth;
|
||||
}
|
||||
@@ -309,6 +312,7 @@ protected:
|
||||
G4VSolid* fpClippingSolid;
|
||||
ClippingMode fClippingMode;
|
||||
G4int fNClippers; // No of clipping/cutting solids - only 0 or 1 allowed
|
||||
std::map<G4int,G4int> fNTouchables; // No of touchables at each depth
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -57,10 +57,6 @@
|
||||
|
||||
#define G4warn G4cout
|
||||
|
||||
namespace {
|
||||
G4int volumeCount = 0;
|
||||
}
|
||||
|
||||
G4PhysicalVolumeModel::G4PhysicalVolumeModel
|
||||
(G4VPhysicalVolume* pVPV
|
||||
, G4int requestedDepth
|
||||
@@ -224,7 +220,7 @@ void G4PhysicalVolumeModel::DescribeYourselfTo
|
||||
|
||||
G4Transform3D startingTransformation = fTransform;
|
||||
|
||||
volumeCount = 0;
|
||||
fNTouchables.clear(); // Keeps count of touchable drawn at each depth
|
||||
|
||||
VisitGeometryAndGetVisReps
|
||||
(fpTopPV,
|
||||
@@ -232,11 +228,6 @@ void G4PhysicalVolumeModel::DescribeYourselfTo
|
||||
startingTransformation,
|
||||
sceneHandler);
|
||||
|
||||
// G4cout
|
||||
// << "G4PhysicalVolumeModel::DescribeYourselfTo: volume count: "
|
||||
// << volumeCount
|
||||
// << G4endl;
|
||||
|
||||
// Reset or clear data...
|
||||
fCurrentDepth = 0;
|
||||
fpCurrentPV = fpTopPV;
|
||||
@@ -685,7 +676,9 @@ void G4PhysicalVolumeModel::DescribeAndDescend
|
||||
theNewAT = centering * newTranslation * oldRotation * oldScale;
|
||||
}
|
||||
|
||||
volumeCount++;
|
||||
auto fullDepth = fCurrentDepth + (G4int)fBaseFullPVPath.size();
|
||||
fNTouchables[fullDepth]++; // Increment for every touchable drawn at each depth
|
||||
|
||||
DescribeSolid (theNewAT, pSol, pVisAttribs, sceneHandler);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user