Message: Re: density definition Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: density definition 

Forum: Geometry
Re: Question density definition (Leila Moghadasi)
Date: 19 Sep, 2012
From: John Allison <John Allison>

On Wed, 19 Sep 2012 09:25:22 GMT, Leila Moghadasi wrote: > "G4cout<<"Density:"<<density<<G4endl;"

Should be


or you could use

  #include "G4UnitsTable.hh"
  G4cout<<"Density:"<<G4BestUnit(density,"Volumic Mass")<<G4endl;

"density = 1*g/cm3" converts it to internal units, so you have to convert back again.

(I think "Volumic Mass" is a literal translation of the French for density!)

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: density definition   (Leila Moghadasi - 19 Sep, 2012)
(_ None: Re: density definition   (Michael H. Kelsey - 19 Sep, 2012)
 Add Message Add Message
to: "Re: density definition"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]