Message: Re: material property table gets wrong number Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: material property table gets wrong number 

Forum: Processes Involving Optical Photons
Re: Question material property table gets wrong number (Yen-Yung Chang)
Date: 23 Feb, 2017
From: Michael H. Kelsey <Michael H. Kelsey>

On Thu, 23 Feb 2017 08:53:12 GMT, Yen-Yung Chang wrote:
> Hi,
> I made a few modifications to G4OpBoundary.cc so it can get
> reflectivity, transmittance, and other optical properties from
> post-step-point material (Material2,) something like
> 
>                  PropertyPointer = aMaterialPropertiesTable->GetProperty("REFLECTIVITY");
>                     if (PropertyPointer) theReflectivity = PropertyPointer->Value(thePhotonMomentum);

[...] Since "theReflectivity" is a data member, if you do not set it explicitly here with an "else" block, you will end up carrying over whatever previous value happened to be set during some other operation with some other volume.

  -- Michael Kelsey

 Add Message Add Message
to: "Re: material property table gets wrong number"

 Subscribe Subscribe

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