Pemf generation option is obsolete. Removed.
[u/mrichter/AliRoot.git] / TFluka / rfrndx.cxx
CommitLineData
1b866d4b 1#include "Fdimpar.h" //(DIMPAR) fluka include
2#include "Ftrackr.h" //(TRACKR) fluka common
3#include "Fiounit.h" //(IOUNIT) fluka common
bcf1cd9c 4#include "TFluka.h"
1b904a0d 5#include "TGeoMaterial.h"
1b904a0d 6#include "TFlukaCerenkov.h"
7
1b866d4b 8#ifndef WIN32
9# define rfrndx rfrndx_
10#else
11# define rfrndx RFRNDX
12#endif
13extern "C" {
2bc4c610 14Double_t rfrndx(Double_t& wvlngt, Double_t& /*omgpho*/, Int_t& mmat)
1b866d4b 15{
1b904a0d 16//
17// Return refraction index for given photon energy and material
18//
19 TFluka* fluka = (TFluka*) gMC;
bcf1cd9c 20 TGeoMaterial* material = (TGeoMaterial*) (fluka->GetFlukaMaterials())->At(fluka->GetMaterialIndex(mmat));
1b904a0d 21 TFlukaCerenkov* cerenkov = dynamic_cast<TFlukaCerenkov*> (material->GetCerenkovProperties());
22 Double_t y = (cerenkov->GetRefractionIndexByWaveLength(wvlngt));
23 return (y);
1b866d4b 24}
25}