17CbmMagnet::CbmMagnet(
const char* name,
const char* title, Double_t px, Double_t py, Double_t pz, Double_t rx,
18 Double_t ry, Double_t rz)
19 : FairModule(name, title)
20 ,
frot(new TGeoRotation(
"", rx, ry, rz))
29 TString fileName = GetGeometryFileName();
31 if (fileName.EndsWith(
".root")) {
33 LOG(info) <<
"Constructing MAGNET from ROOT file " << fileName.Data();
39 if (fileName.Contains(
"magnet_v18a.geo.root")) {
40 LOG(info) <<
"Magnet with shift 40 cm";
41 TGeoTranslation* trans =
new TGeoTranslation();
42 trans->SetTranslation(0., 0., 40.);
43 ConstructRootGeometry(trans);
49 else if (fileName.Contains(
"magnet_v18b.geo.root")) {
50 LOG(info) <<
"Constructing magnet with shift -40 cm";
51 TGeoTranslation* trans =
new TGeoTranslation();
52 trans->SetTranslation(0., 0., -40.);
53 ConstructRootGeometry(trans);
57 ConstructRootGeometry();
59 else if (fileName.EndsWith(
".gdml")) {
60 LOG(info) <<
"Constructing MAGNET from GDML file " << fileName.Data();
64 LOG(fatal) <<
"Geometry format of MAGNET file " << fileName.Data() <<
" not supported.";