65 fDensityStack.clear();
68 void G4PhysicalVolumeMassScene::AccrueMass (
const G4VSolid& solid)
75 if (pCurrentPV != fpLastPV) {
76 fpLastPV = pCurrentPV;
97 if (currentDepth == 0) fVolume = currentVolume;
99 if (currentDepth > fLastDepth) {
100 fDensityStack.push_back (fLastDensity);
101 }
else if (currentDepth < fLastDepth) {
102 fDensityStack.pop_back();
104 fLastDepth = currentDepth;
105 fLastDensity = currentDensity;
107 if (currentDepth > 0) motherDensity = fDensityStack.back();
109 G4double subtractedMass = currentVolume * motherDensity;
110 G4double addedMass = currentVolume * currentDensity;
111 fMass -= subtractedMass;
128 "G4PhysicalVolumeMassScene::AccrueMass: WARNING:"
129 "\n Mass going negative for \""
133 ". Larger than mother?"