Coding conventions.
[u/mrichter/AliRoot.git] / TFluka / abscff.cxx
CommitLineData
1b866d4b 1#include "Fdimpar.h" //(DIMPAR) fluka include
2#include "Ftrackr.h" //(TRACKR) fluka common
3#include "Fiounit.h" //(IOUNIT) fluka common
1b904a0d 4#include "TFlukaGeo.h"
5#include "TGeoMaterial.h"
6#include "TFlukaCerenkov.h"
7#include "TGeoManager.h"
8
9
1b866d4b 10#ifndef WIN32
11# define abscff abscff_
12#else
13# define abscff ABSCFF
14#endif
15extern "C" {
2bc4c610 16Double_t abscff(Double_t& wvlngt, Double_t& /*omgpho*/, Int_t& mmat)
1b866d4b 17{
1b904a0d 18//
19// Return absorption length for given photon energy and material
20//
21 TFluka* fluka = (TFluka*) gMC;
22 TGeoMaterial* material = (TGeoMaterial*) (gGeoManager->GetListOfMaterials())->At(fluka->GetMaterialIndex(mmat));
23 TFlukaCerenkov* cerenkov = dynamic_cast<TFlukaCerenkov*> (material->GetCerenkovProperties());
24 Double_t y = (cerenkov->GetAbsorptionCoefficientByWaveLength(wvlngt));
25 return (y);
26
1b866d4b 27}
28}
29
30