# Confusion: Unit system

Hi,

I am trying to adjust the atomic concentration per cm3 for the target material.
For example, when I am using G4_He and trying to check what is the material density, I am getting the next values

G4cout<<"Target density: "<< logicTarget->GetMaterial()->GetDensity()/(g/cm3) <<endl;
0.000166322 g/cm3 //good!

G4cout<<"Target volume is "<< logicTarget->GetSolid()->GetCubicVolume()/cm3 <<endl;
The target volume is 16.9646 // good cm3

G4cout<<"Target atomic concentration: "<< logicTarget->GetMaterial()->GetTotNbOfAtomsPerVolume() <<endl;
Target atomic concentration: 2.50238e+16 //Volume units cm3?
But simple calculation: Avogadro (Na/mole)*density(0.000166322 g/cm3) /A (4 g/mole) gives 2.5e+19

G4cout<<"Target A is "<< logicTarget->GetMaterial()->GetA() <<endl;
Target A is 2.49825e+22 // Probably N_atoms/m3

Also, why do I have a small difference between concentrations in cm3 and m3 cases?

Best wishes,

Volodymyr

G4cout<<"Target atomic concentration: "<< logicTarget->GetMaterial()->GetTotNbOfAtomsPerVolume() <<endl;
Target atomic concentration: 2.50238e+16 //Volume units cm3?
But simple calculation: Avogadro (Na/mole)*density(0.000166322 g/cm3) /A (4 g/mole) gives 2.5e+19

Here, you do not force the unit. Therefore you print the total number of atoms per geant4 internal unit of volume, which is mm3

Hi maire,

Thanks! Now it is completely reasonable.
After adding GetTotNbOfAtomsPerVolume()/(1/cm3) , I got the same value.

Best wishes,
Volodymyr

Idem for A : it is the mass of a mole, expressed in internal unit of mass, which is not gramme !
To force gramme, print GetA()/g