65 fDensityStack.clear();
68 void G4PhysicalVolumeMassScene::ProcessVolume (
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?"
G4PhysicalVolumeMassScene(G4PhysicalVolumeModel *)
G4Material * GetCurrentMaterial() const
G4double GetDensity() const
G4int GetCurrentDepth() const
G4GLOB_DLL std::ostream G4cout
virtual ~G4PhysicalVolumeMassScene()
const G4String & GetName() const
virtual G4int GetCopyNo() const =0
G4VPhysicalVolume * GetCurrentPV() const