9 #include "TGeoMatrix.h"
12 : FairModule(
"CbmMagnet",
"CbmMagnet"), frot(NULL), fposrot(NULL) {}
22 : FairModule(name, title)
23 , frot(new TGeoRotation(
"", rx, ry, rz))
24 , fposrot(new TGeoCombiTrans(px, py, pz, frot)) {}
29 TString fileName = GetGeometryFileName();
31 if (fileName.EndsWith(
".root")) {
33 LOG(info) <<
"Constructing MAGNET from ROOT file "
40 if (fileName.Contains(
"magnet_v18a.geo.root")) {
41 LOG(info) <<
"Magnet with shift 40 cm";
42 TGeoTranslation* trans =
new TGeoTranslation();
43 trans->SetTranslation(0., 0., 40.);
44 ConstructRootGeometry(trans);
50 else if (fileName.Contains(
"magnet_v18b.geo.root")) {
51 LOG(info) <<
"Constructing magnet with shift -40 cm";
52 TGeoTranslation* trans =
new TGeoTranslation();
53 trans->SetTranslation(0., 0., -40.);
54 ConstructRootGeometry(trans);
58 ConstructRootGeometry();
61 }
else if (fileName.EndsWith(
".gdml")) {
62 LOG(info) <<
"Constructing MAGNET from GDML file "
66 LOG(fatal) <<
"Geometry format of MAGNET file " << fileName.Data()