4 #include "TClonesArray.h"
5 #include "TLorentzVector.h"
11 #include "TGeoCompositeShape.h"
12 #include "TGeoMatrix.h"
13 #include "TGeoManager.h"
14 #include "TVirtualMC.h"
16 #include "FairVolume.h"
17 #include "FairGeoMedia.h"
18 #include "FairGeoInterface.h"
19 #include "FairGeoLoader.h"
20 #include "FairGeoBuilder.h"
21 #include "FairRuntimeDb.h"
23 #include "FairModule.h"
36 vname = vname.Strip();
37 TGeoVolume* vcave =
gGeoManager->FindVolumeFast(vname.Data());
41 TGeoVolume* mdtcoi =
new TGeoVolumeAssembly(
"MdtCoil");
43 FairGeoLoader*
geoLoad = FairGeoLoader::Instance();
44 FairGeoInterface *
geoFace = geoLoad->getGeoInterface();
45 FairGeoMedia *
Media = geoFace->getMedia();
46 FairGeoBuilder *
geobuild=geoLoad->getGeoBuilder();
47 FairGeoMedium *medmdtiron = Media->getMedium(
"iron");
48 geobuild->createMedium(medmdtiron);
60 TGeoTube* s_nbti =
new TGeoTube(
"s_nbti",(1075.-1.3)/10,(1075.2+1.3)/10, (900-130)/20);
61 TGeoVolume* s_nbti_vol =
new TGeoVolume(
"s_nbti_vol",s_nbti,
gGeoManager->GetMedium(
"iron"));
62 TGeoTube* s_nbti1 =
new TGeoTube(
"s_nbti1",(1075.-1.3)/10,(1075.2+1.3)/10, (470-130)/20);
63 TGeoVolume* s_nbti_vol1 =
new TGeoVolume(
"s_nbti_vol1",s_nbti1,
gGeoManager->GetMedium(
"iron"));
64 TGeoTube* s_nbti2 =
new TGeoTube(
"s_nbti2",(1075.-1.3)/10,(1075.2+1.3)/10, (1500-730)/20);
65 TGeoVolume* s_nbti_vol2 =
new TGeoVolume(
"s_nbti_vol2",s_nbti2,
gGeoManager->GetMedium(
"iron"));
67 TGeoTube* s_aldown =
new TGeoTube(
"s_aldown",(1057.-15)/10,(1057.+15.)/10, (900-130)/20);
69 TGeoVolume* s_aldown_vol =
new TGeoVolume(
"s_aldown_vol",s_aldown,
gGeoManager->GetMedium(
"iron"));
70 TGeoTube* s_aldown1 =
new TGeoTube(
"s_aldown1",(1057.-15)/10,(1057.+15.)/10, (470-130)/20);
72 TGeoVolume* s_aldown_vol1 =
new TGeoVolume(
"s_aldown_vol1",s_aldown1,
gGeoManager->GetMedium(
"iron"));
73 TGeoTube* s_aldown2 =
new TGeoTube(
"s_aldown2",(1057.-15)/10,(1057.+15.)/10, (1500-730)/20);
75 TGeoVolume* s_aldown_vol2 =
new TGeoVolume(
"s_aldown_vol2",s_aldown2,
gGeoManager->GetMedium(
"iron"));
77 TGeoTube* s_alup =
new TGeoTube(
"s_alup",(1097.-15.)/10,(1097.+15.)/10, (900-130)/20);
79 TGeoVolume* s_alup_vol =
new TGeoVolume(
"s_alup_vol",s_alup,
gGeoManager->GetMedium(
"iron"));
80 TGeoTube* s_alup1 =
new TGeoTube(
"s_alup1",(1097.-15.)/10,(1097.+15.)/10, (470-130)/20);
82 TGeoVolume* s_alup_vol1 =
new TGeoVolume(
"s_alup_vol1",s_alup1,
gGeoManager->GetMedium(
"iron"));
83 TGeoTube* s_alup2 =
new TGeoTube(
"s_alup2",(1097.-15.)/10,(1097.+15.)/10, (1500-730)/20);
85 TGeoVolume* s_alup_vol2 =
new TGeoVolume(
"s_alup_vol2",s_alup2,
gGeoManager->GetMedium(
"iron"));
87 s_nbti_vol->SetLineColor(4);
88 s_nbti_vol1->SetLineColor(4);
89 s_nbti_vol2->SetLineColor(4);
90 s_alup_vol->SetLineColor(2);
91 s_alup_vol1->SetLineColor(2);
92 s_alup_vol2->SetLineColor(2);
93 s_aldown_vol->SetLineColor(2);
94 s_aldown_vol1->SetLineColor(2);
95 s_aldown_vol2->SetLineColor(2);
97 mdtcoi->AddNode(s_nbti_vol,0,
new TGeoTranslation(0.0,0.0,(-77-22.5)/2));
98 mdtcoi->AddNode(s_nbti_vol1,1,
new TGeoTranslation(0.0,0.0,(47+17/2)/2));
99 mdtcoi->AddNode(s_nbti_vol2,2,
new TGeoTranslation(0.0,0.0,(150+45+77/2)/2));
101 mdtcoi->AddNode(s_aldown_vol,3,
new TGeoTranslation(0.0,0.0,(-77-22.5)/2));
102 mdtcoi->AddNode(s_aldown_vol1,4,
new TGeoTranslation(0.0,0.0,(47+17/2)/2));
103 mdtcoi->AddNode(s_aldown_vol2,5,
new TGeoTranslation(0.0,0.0,(150+45+77/2)/2));
105 mdtcoi->AddNode(s_alup_vol,6,
new TGeoTranslation(0.0,0.0,(-77-22.5)/2));
106 mdtcoi->AddNode(s_alup_vol1,7,
new TGeoTranslation(0.0,0.0,(47+17/2)/2));
107 mdtcoi->AddNode(s_alup_vol2,8,
new TGeoTranslation(0.0,0.0,(150+45+77/2)/2));
112 TGeoTube* cr_fedown =
new TGeoTube(
"cr_fedown",(960-2.)/10,(960+2.)/10, (1100+1790)/20);
113 TGeoVolume* cr_fedown_vol =
new TGeoVolume(
"cr_fedown_vol",cr_fedown,
gGeoManager->GetMedium(
"iron"));
117 TGeoTube* cr_aldown =
new TGeoTube(
"cr_aldown",(990-20.)/10,(990+20.)/10, (1100+1790)/20);
119 TGeoVolume* cr_aldown_vol =
new TGeoVolume(
"cr_aldown_vol",cr_aldown,
gGeoManager->GetMedium(
"iron"));
121 cr_fedown_vol->SetLineColor(5);
122 cr_aldown_vol->SetLineColor(4);
124 mdtcoi->AddNode(cr_fedown_vol,9,
new TGeoTranslation(0.0,0.0,69./2));
125 mdtcoi->AddNode(cr_aldown_vol,10,
new TGeoTranslation(0.0,0.0,69./2));
129 TGeoTube* cr_alup =
new TGeoTube(
"cr_alup",(1180-40.)/10,(1180+40.)/10, (1100+1790)/20);
131 TGeoVolume* cr_alup_vol =
new TGeoVolume(
"cr_alup_vol",cr_alup,
gGeoManager->GetMedium(
"iron"));
134 TGeoTube* cr_feup =
new TGeoTube(
"cr_feup",(1240-6.2)/10,(1240+6.2)/10, (1100+1790)/20);
135 TGeoVolume* cr_feup_vol =
new TGeoVolume(
"cr_feup_vol",cr_feup,
gGeoManager->GetMedium(
"iron"));
137 cr_alup_vol->SetLineColor(5);
138 cr_alup_vol->SetLineColor(4);
140 mdtcoi->AddNode(cr_alup_vol,11,
new TGeoTranslation(0.0,0.0,69./2));
141 mdtcoi->AddNode(cr_feup_vol,12,
new TGeoTranslation(0.0,0.0,69./2));
146 vcave->AddNode(mdtcoi,1);
TGeoManager * gGeoManager
FairGeoBuilder * geobuild
FairGeoInterface * geoFace