|Message: Using density to define geometry||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)|
So I am noticing that when I cout values of variables with units that I get extraordinary large numbers.|
For example if I am defining Kevlar
G4Material* kevlar = new G4Material("kevlar", kevlarDensity = 1.44 * g/cm3, 4);
kevlar -> AddElement(elH, 10); // el* grabbed from NIST manager
kevlar -> AddElement(elC, 14);
kevlar -> AddElement(elO, 2);
kevlar -> AddElement(elN, 2);
G4cout << kevlarDensity;
I get 8.98777e+18 as the output.
Is there a proper way to do this? Really I would like to be able to shift the size of a material based upon the density. For example I am trying to do
G4Material * abs_mat = nist -> FindOrBuildMaterial("kevlar");
G4double density = kevlarDensity;
G4double mass = 1. * g;
G4double Box_y, Box_z = 1. * cm;
G4double thickness = mass/(density * Box_y * Box_z);
G4cout << "density: " << density << G4endl;
G4cout << "thickness: " << thickness << G4endl;
But from G4cout I am getting:
density = 1.22038e+214 (yes, a different number than above)
thickness = 7.38082e+115
But doing it by hand I don't get anywhere near these numbers. I take it that there is something to do with the units here. What is the proper way to do this?
In my header file I have:
defined, and this allows me to use the variable
|Inline Depth:||Outline Depth:||Add message:|