Import Geant4 9.4.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogicalVolume.cc,v 1.34 2009/09/24 13:22:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4LogicalVolume.cc,v 1.35 2010/07/05 09:22:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// class G4LogicalVolume Implementation
|
||||
@@ -210,6 +210,7 @@ G4double G4LogicalVolume::GetMass(G4bool forced,
|
||||
<< fName << " ! Sorry, cannot compute the mass ..." << G4endl;
|
||||
G4Exception("G4LogicalVolume::GetMass()", "InvalidSetup", FatalException,
|
||||
"No material associated to the logical volume !");
|
||||
return 0;
|
||||
}
|
||||
if (!fSolid)
|
||||
{
|
||||
@@ -218,6 +219,7 @@ G4double G4LogicalVolume::GetMass(G4bool forced,
|
||||
<< fName << " ! Sorry, cannot compute the mass ..." << G4endl;
|
||||
G4Exception("G4LogicalVolume::GetMass()", "InvalidSetup", FatalException,
|
||||
"No solid associated to the logical volume !");
|
||||
return 0;
|
||||
}
|
||||
G4double globalDensity = logMaterial->GetDensity();
|
||||
fMass = fSolid->GetCubicVolume() * globalDensity;
|
||||
|
||||
Reference in New Issue
Block a user