|Message: Re: Inconsistent mass and density of volume.||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
On Thu, 08 May 2014 20:38:24 GMT, Joel Klinger wrote:
> [...] > I would like to check that the LiquidArgon volume has an associated mass > of 20kT. I set the density of LiqArgon like this (1.39 g/cm^3): > > G4Material* LiqArgon = new G4Material("LiqArgon", z=18., a=39.948*g/mole, > density=1.3928*g/cm3, kStateLiquid, temperature=87.25*kelvin, > pressure=1.0*atmosphere); > > I set the Liquid Argon volume like this: > > //---- Place LAr target G4ThreeVector positionTarget = > G4ThreeVector(0,0,0); G4double targetInnerRad = 0.0; G4double > targetOuterRad = 15*m; G4double targetHalfLength = 10*m; G4double > targetMinAngle = 0.*deg; G4double targetAngularExtent = 360.*deg; > G4String targetName = "target"; > > solidVolume = new G4Tubs(targetName, targetInnerRad, targetOuterRad, > targetHalfLength,targetMinAngle,targetAngularExtent); > > If I calculate this volume manually I get 1.41372e+13 mm^3, and if I > call solidVolume->GetCubicVolume() I also get 1.41372e+13 mm^3, so this > is good. Furthermore (1.39 g/cm^3)*(.41372e+13 mm^3) = 20kT - which is > great. > > From now on I run into trouble. If I do > logicVolume->GetMaterial()->GetDensity() I get "8.69317e+18", which > looks wrong in any system of units.
You shouldn't make assumptions about Geant4's internal units. They are extremely non-intuitive :-/ Mass is MeV (= 1.), for example; kg = joule*s*s/(m*m), where joule = eV/e_SI, and e_SI=1.602e-19. So g/cm3 = 6.24e+18, which gives a density for LAr of 1.39*6.24e+18 = 8.66e+18 (accounting for my own rounding off).
Could you please try the following?
G4cout << "LAr density from volume " << logicVolume->GetMaterial()->GetDensity() / (g/cm3) << " g/cm3" << G4endl;
G4cout << "LAr mass " << logicVolume->GetMass()/kg << " kg" << G4endl;
I think you'll get the results you expect.
-- Michael Kelsey
|Inline Depth:||Outline Depth:||Add message:|