Various fixes in order to compile the DA source code
[u/mrichter/AliRoot.git] / TFluka / rflctv.cxx
... / ...
CommitLineData
1#include "Fdimpar.h" //(DIMPAR) fluka include
2#include "Ftrackr.h" //(TRACKR) fluka common
3#include "Fiounit.h" //(IOUNIT) fluka common
4#include "TFluka.h"
5#include "TGeoMaterial.h"
6#include "TFlukaCerenkov.h"
7
8
9#ifndef WIN32
10# define rflctv rflctv_
11#else
12# define rflctv RFLCTV
13#endif
14extern "C" {
15Double_t rflctv(Double_t& wvlngt, Double_t& /*omgpho*/, Int_t& mmat)
16{
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());
23 Double_t y = 0.;
24 if (cerenkov->IsMetal()) y = (cerenkov->GetReflectivityByWaveLength(wvlngt));
25 return (y);
26}
27}