Message: Re: From geant 9.4 to geant 9.6 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: From geant 9.4 to geant 9.6 

Forum: Processes Involving Optical Photons
Re: None From geant 9.4 to geant 9.6 (Beatrice Panico)
Date: 03 Jul, 2013
From: Zach Hartwig <Zach Hartwig>

Hi Beatrice,

> 
>         G4MaterialPropertiesTable* aMaterialPropertiesTable;
>         G4MaterialPropertyVector* Rindex;
>         aMaterialPropertiesTable = Material1->GetMaterialPropertiesTable();
>         if (aMaterialPropertiesTable) {
>                 Rindex = aMaterialPropertiesTable->GetProperty("RINDEX");
>         }
> 
>         if (Rindex) {
>                 Rindex1 = Rindex->GetProperty(thePhotonMomentum);
>         }
> 
> and I have no problem. If I use geant 9.6 the following error appears:
> 
> G4MaterialPropertyVector has no member named GetProperty(). I see that
> in G4PhysicsOrderedFreeVector there is a method named GetEnergy(), but I
> want the value of property associated to the corresponding energy. So,
> anyone can help me? Thanks

Geant4.9.5 replaced the original G4MaterialPropertyVector class with a typedef to G4PhysicsOrderedFreeVector, which inherits from G4PhysicsVector class. This was done, I believe, to utilize the more powerful methods of G4Physics*Vector classes, as well as to prevent code redundancy. I believe that the correct access method you are looking for is the G4PhysicsOrderedFreeVector::Value() method, which is inherited:

    http://www-geant4.kek.jp/lxr/source/global/management/include/G4PhysicsVector.hh#L96

Thus your code would read:

   Rindex1 = Rindex->Value(thePhotonMomentum)

Hope this helps.

~Zach

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

1 None: Re: From geant 9.4 to geant 9.6   (Beatrice Panico - 04 Jul, 2013)
 Add Message Add Message
to: "Re: From geant 9.4 to geant 9.6"

 Subscribe Subscribe

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