No debug message.
[u/mrichter/AliRoot.git] / TFluka / rflctv.cxx
CommitLineData
1b866d4b 1#include "Fdimpar.h" //(DIMPAR) fluka include
2#include "Ftrackr.h" //(TRACKR) fluka common
3#include "Fiounit.h" //(IOUNIT) fluka common
b2be0e73 4#include "TFluka.h"
5#include "TGeoMaterial.h"
6#include "TFlukaCerenkov.h"
7
8
1b866d4b 9#ifndef WIN32
10# define rflctv rflctv_
11#else
12# define rflctv RFLCTV
13#endif
14extern "C" {
b2be0e73 15Double_t rflctv(Double_t& wvlngt, Double_t& /*omgpho*/, Int_t& mmat)
1b866d4b 16{
b2be0e73 17//
18// Return reflectivity (1-r) for given photon energy and material
19//
20 TFluka* fluka = (TFluka*) gMC;
21 TGeoMaterial* material = (TGeoMaterial*) (fluka->GetFlukaMaterials())->At(fluka->GetMaterialIndex(mmat));
22 TFlukaCerenkov* cerenkov = dynamic_cast<TFlukaCerenkov*> (material->GetCerenkovProperties());
30c7827f 23 Double_t y = 0.;
24 if (cerenkov->IsMetal()) y = (cerenkov->GetReflectivityByWaveLength(wvlngt));
b2be0e73 25 return (y);
1b866d4b 26}
27}