Re: Properties with units (ABSLENGTH)

From: Brett Viren <bv_at_bnl.gov>
Date: Fri, 4 May 2012 10:25:33 -0400


I see. Some questions:

Are the VMC units documented somewhere? If not, can you please add something to:

  http://root.cern.ch/drupal/content/vmc

Can VMC get something equivalent to CLHEP's SystemOfUnits.h? Developers can then explicitly give units to literal values (eg, "100*meter", "3*eV") and not need to care what VMC's unit convention is.

Does user code need to provide implementation-specific calls to SetMaterialProperty() in order to set implementation-specific property names? Ie, does the G3 VMC know what the string "ABSLENGTH" means?

Regards,
-Brett.

Ivana Hrivnacova <Ivana.Hrivnacova_at_cern.ch> writes:

> 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.

Received on Fri May 04 2012 - 16:25:38 CEST

This archive was generated by hypermail 2.2.0 : Mon May 07 2012 - 17:25:01 CEST