Pemf generation option is obsolete. Removed.
[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
bcf1cd9c 4#include "TFluka.h"
1b904a0d 5#include "TGeoMaterial.h"
6#include "TFlukaCerenkov.h"
1b904a0d 7
8
1b866d4b 9#ifndef WIN32
10# define abscff abscff_
11#else
12# define abscff ABSCFF
13#endif
14extern "C" {
2bc4c610 15Double_t abscff(Double_t& wvlngt, Double_t& /*omgpho*/, Int_t& mmat)
1b866d4b 16{
81f1d030 17// printf("abscff%f %d\n", wvlngt, mmat);
18
1b904a0d 19//
20// Return absorption length for given photon energy and material
21//
42179f55 22
1b904a0d 23 TFluka* fluka = (TFluka*) gMC;
42179f55 24//
25// Check if stopping has been required by user
26//
27 if (fluka->GetStoppingCondition()) {
28 fluka->ResetStoppingCondition();
29 return (1.e15);
30 }
31//
32// Get absorption coefficient for current material
33//
bcf1cd9c 34 TGeoMaterial* material = (TGeoMaterial*) (fluka->GetFlukaMaterials())->At(fluka->GetMaterialIndex(mmat));
1b904a0d 35 TFlukaCerenkov* cerenkov = dynamic_cast<TFlukaCerenkov*> (material->GetCerenkovProperties());
36 Double_t y = (cerenkov->GetAbsorptionCoefficientByWaveLength(wvlngt));
37 return (y);
38
1b866d4b 39}
40}
41
42