24#include "TGeoMedium.h"
28const int RootGM::Medium::fgkParamSize = 20;
33 :
VGM::IMedium(),
BaseVGM::VMedium(material), fMedium(0)
43 TGeoMaterial* geoMaterial =
46 Double_t* param =
new Double_t[fgkParamSize];
47 for (Int_t i = 0; i < fgkParamSize; i++) {
48 if (i < nofParameters)
49 param[i] = parameters[i];
54 fMedium =
new TGeoMedium(name.data(), mediumId, geoMaterial, param);
92void RootGM::Medium::CheckIndex(
int i)
const
94 if (i < 0 || i >= NofParameters()) {
95 std::cerr <<
" RootGM::Medium::CheckIndex: " << std::endl;
96 std::cerr <<
" Index of parameter outside limits." << std::endl;
97 std::cerr <<
"*** Error: Aborting execution ***" << std::endl;
109 return std::string(fMedium->GetName());
116 return fMedium->GetId();
124 return fMedium->GetParam(i);
The map between VGM and Root material.
TGeoMaterial * GetMaterial(VGM::IMaterial *iMaterial) const
static MaterialMap * Instance()
VGM implementation for Root medium.
virtual std::string Name() const
Return its name.
virtual int Id() const
Return its unique identifier.
virtual double Parameter(int i) const
Return the i-th parameter.
The VGM interface to materials.
VGM implementation for Root.