Re: Properties with units (ABSLENGTH)

From: Ivana Hrivnacova <Ivana.Hrivnacova_at_cern.ch>
Date: Thu, 3 May 2012 23:35:02 +0200

Hi Brett,

The VMC is using fixed units as Geant3 (length in cm, energy in GeV, see all in TG4G4Units class).
That's why all lengths defined via VMC are interpreted as length in cm and in Geant4 you get the factor of 10, as the "default" length unit (=1) in G4 is mm.
The interface function SetMaterialProperty() is quite generic and so the length as RAYLEIGH or WLSABSLENGTH escaped from a control. I will check with Geant4 experts if there is available a list of all material properties which can be defined so that we are sure that there is nothing else forgotten.
Thank you for spotting this.

Best regards,

Ivana

On 05/03/2012 11:00 PM, Brett Viren wrote:
> Hi again,
>
> How are property units supposed to be treated in VMC?
>
> I got a bit of a surprise when I tried to define the ABSLENGTH property
> for a material. I was defining the lengths w/in CLHEP'S SystemOfUnits.
> When I asked G4 to dump what it received the lengths had all gained an
> extra factor of 10.
>
> I'm setting the property via gMC->SetMaterialProperty() and I found this
> code in the definition of that method:
>
> if ( G4String(propertyName) == "ABSLENGTH" ||
> G4String(propertyName) == "MIEHG" )
> val2[i] = val2[i]*TG4G3Units::Length();
>
> Other lengths such as RAYLEIGH or WLSABSLENGTH seem to pass unmolested
> into G4.
>
> -Brett.

-- 
==============================================================
e-mail:  Ivana.Hrivnacova_at_cern.ch
address: Institut de Physique Nucléaire, 91406 Orsay, France
phone:   +33 169156594
==============================================================
Received on Thu May 03 2012 - 23:35:09 CEST

This archive was generated by hypermail 2.2.0 : Fri May 04 2012 - 17:25:01 CEST