20 #include <TGeoCompositeShape.h>
21 #include <TGeoElement.h>
22 #include <TGeoManager.h>
23 #include <TGeoMaterial.h>
24 #include <TGeoMedium.h>
27 #include <TObjArray.h>
49 TGeoVolume *top = gGeoManager->GetTopVolume();
52 TGeoMaterial *matFe =
new TGeoMaterial(
"Fe", 55.84, 26, 7.9);
55 TGeoMedium *Fe =
new TGeoMedium(
"Fe", 5, matFe);
58 TGeoBBox *magyoke1 =
new TGeoBBox(
"magyoke1", 350, 350, 125);
59 TGeoBBox *magyoke2 =
new TGeoBBox(
"magyoke2", 250, 250, 126);
61 TGeoCompositeShape *magyokec =
new TGeoCompositeShape(
"magyokec",
"magyoke1-magyoke2");
62 TGeoVolume *magyoke =
new TGeoVolume(
"magyoke", magyokec, Fe);
63 magyoke->SetLineColor(kBlue);
65 top->AddNode(magyoke, 1,
new TGeoTranslation(0, 0, 0));
68 TGeoTubeSeg *magnet1a =
new TGeoTubeSeg(
"magnet1a", 250, 300, 35, 45, 135);
69 TGeoTubeSeg *magnet1b =
new TGeoTubeSeg(
"magnet1b", 250, 300, 35, 45, 135);
70 TGeoTubeSeg *magnet1c =
new TGeoTubeSeg(
"magnet1c", 250, 270, 125, 45, 60);
71 TGeoTubeSeg *magnet1d =
new TGeoTubeSeg(
"magnet1d", 250, 270, 125, 120, 135);
74 TGeoTranslation *m1 =
new TGeoTranslation(0, 0, 160);
76 m1->RegisterYourself();
77 TGeoTranslation *m2 =
new TGeoTranslation(0, 0, -160);
79 m2->RegisterYourself();
81 TGeoCompositeShape *magcomp1 =
new TGeoCompositeShape(
"magcomp1",
"magnet1a:m1+magnet1b:m2+magnet1c+magnet1d");
82 TGeoVolume *magnet1 =
new TGeoVolume(
"magnet1", magcomp1, Fe);
83 magnet1->SetLineColor(kYellow);
84 top->AddNode(magnet1, 1,
new TGeoTranslation(0, 0, 0));
87 m3.SetAngles(180, 0, 0);
88 TGeoTranslation m4(0, 0, 0);
89 TGeoCombiTrans m5(m4, m3);
90 TGeoHMatrix *m6 =
new TGeoHMatrix(m5);
91 top->AddNode(magnet1, 2, m6);
ClassImp(FairEventBuilder)
virtual FairModule * CloneModule() const