16 TFile*
fi =
new TFile(outfile,
"RECREATE");
18 FairGeoLoader*
geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
19 FairGeoInterface *
geoFace = geoLoad->getGeoInterface();
20 geoFace->setMediaFile(
"../../geometry/media_pnd.geo");
24 FairGeoMedia *
Media = geoFace->getMedia();
25 FairGeoBuilder *
geobuild=geoLoad->getGeoBuilder();
29 FairGeoMedium *CbmMediumCarbonFoam = Media->getMedium(
"carbonfoam");
32 Int_t
nmed=geobuild->createMedium(CbmMediumSilicon);
33 nmed=geobuild->createMedium(CbmMediumCarbon);
34 nmed=geobuild->createMedium(CbmMediumCarbonFoam);
35 nmed=geobuild->createMedium(CbmMediumAluminium);
37 TGeoManager*
gGeoMan = (TGeoManager*)gROOT->FindObject(
"FAIRGeom");
39 TGeoVolume *
top =
new TGeoVolumeAssembly(
"top");
41 gGeoMan->SetTopVolume(top);
43 TGeoVolume *combinedLambdaDisks =
new TGeoVolumeAssembly(
"CombinedLambdaDisks");
44 TGeoVolumeAssembly* lambdaDisk =
new TGeoVolumeAssembly(
"LambdaDisk");
45 TGeoVolumeAssembly* largeRing =
new TGeoVolumeAssembly(
"LargeRing");
46 TGeoVolumeAssembly* smallRing =
new TGeoVolumeAssembly(
"SmallRing");
51 points[0] = -1.7297; points[1] = 2.7833;
52 points[2] = 1.7297; points[3] = 2.7833;
53 points[4] = 0.9968; points[5] = -2.7833;
54 points[6] = -0.9968; points[7] = -2.7833;
56 points[8] = -1.7297; points[9] = 2.7833;
57 points[10] = 1.7297; points[11] = 2.7833;
58 points[12] = 0.9968; points[13] = -2.7833;
59 points[14] = -0.9968; points[15] = -2.7833;
61 TGeoShape* largeSensorShape =
new TGeoArb8(
"StripSensorActiveLargeShape", 0.03/2, points);
62 TGeoVolume* largeSensorVolume =
new TGeoVolume(
"StripSensorActiveLargeTrap",largeSensorShape,gGeoMan->GetMedium(
"silicon"));
65 TGeoRotation rotSensor(
"rotSensor",0,0,0);
66 TGeoTranslation transLargeSensor(0,(14.8669 + 5.5665)/2,0);
67 TGeoCombiTrans combined1(transLargeSensor, rotSensor);
69 for (
int i = 0;
i < 12;
i++){
72 TGeoRotation rotSens(
rotName.Data(), 0,0,
i*2 * 360/24);
73 TGeoHMatrix sens = rotSens * combined1;
74 largeRing->AddNode(largeSensorVolume,
i,
new TGeoHMatrix(sens));
78 pointsSmall[0] = -1.9579/2; pointsSmall[1] = 5.3358/2;
79 pointsSmall[2] = 1.9579/2; pointsSmall[3] = 5.3358/2;
80 pointsSmall[4] = 0.5529/2; pointsSmall[5] = -5.3358/2;
81 pointsSmall[6] = -0.5529/2; pointsSmall[7] = -5.3358/2;
83 pointsSmall[8] = -1.9579/2; pointsSmall[9] = 5.3358/2;
84 pointsSmall[10] = 1.9579/2; pointsSmall[11] = 5.3358/2;
85 pointsSmall[12] = 0.5529/2; pointsSmall[13] = -5.3358/2;
86 pointsSmall[14] = -0.5529/2; pointsSmall[15] = -5.3358/2;
89 TGeoShape* smallSensorShape =
new TGeoArb8(
"StripSensorActiveSmallShape", 0.03/2, pointsSmall);
90 TGeoVolume* smallSensorVolume =
new TGeoVolume(
"StripSensorActiveSmallTrap", smallSensorShape, gGeoMan->GetMedium(
"silicon"));
92 TGeoTranslation transSmallSensor(0,5.3358/2+2.1,0);
93 TGeoCombiTrans combined2(transSmallSensor, rotSensor);
95 for (
int i = 0;
i < 12;
i++){
98 TGeoRotation rotSens(
rotName.Data(), 0,0,
i*2 * 360/24);
99 TGeoHMatrix sens = rotSens * combined2;
100 smallRing->AddNode(smallSensorVolume,
i+12,
new TGeoHMatrix(sens));
103 lambdaDisk->AddNode(largeRing, 0,
new TGeoTranslation(0,0,-0.5));
104 lambdaDisk->AddNode(largeRing, 1,
new TGeoRotation(
"largeRingRot",0,0,360/24));
106 TGeoCombiTrans combiSmallRing2(TGeoTranslation(0,0,-1.5), TGeoRotation(
"smallRingRot",0,0,360/24));
107 lambdaDisk->AddNode(smallRing, 0,
new TGeoTranslation(0,0,-1.0));
108 lambdaDisk->AddNode(smallRing, 1,
new TGeoHMatrix(combiSmallRing2));
110 TGeoVolumeAssembly* supportDisk =
new TGeoVolumeAssembly(
"SupportDisk");
112 TGeoVolumeAssembly* supportLarge =
new TGeoVolumeAssembly(
"SupportLarge");
113 TGeoShape* carbonFoamShape =
new TGeoBBox(3.4/2, 0.2/2, 3.5/2);
114 TGeoVolume* carbonFoam =
new TGeoVolume(
"CarbonFoam", carbonFoamShape, gGeoMan->GetMedium(
"carbonfoam"));
115 TGeoShape* carbonFiberShape =
new TGeoBBox(3.4/2, 0.02/2, 3.5/2);
116 TGeoVolume* carbonFiber =
new TGeoVolume(
"CarbonFiber", carbonFiberShape, gGeoMan->GetMedium(
"carbon"));
117 TGeoShape* siliconReadoutShape =
new TGeoBBox(3.4/2, 0.02/2, 3.5/2);
118 TGeoVolume* siliconReadout =
new TGeoVolume(
"SiliconReadout", siliconReadoutShape, gGeoMan->GetMedium(
"silicon"));
119 TGeoShape* aluCablesShape =
new TGeoBBox(3.4/2, 0.4/2, 3.5/2);
120 TGeoVolume* aluCables =
new TGeoVolume(
"AluCables", aluCablesShape, gGeoMan->GetMedium(
"aluminium"));
122 supportLarge->AddNode(carbonFoam, 1);
123 supportLarge->AddNode(carbonFiber, 1,
new TGeoTranslation(0,(0.2 + 0.02)/2, 0));
124 supportLarge->AddNode(carbonFiber, 2,
new TGeoTranslation(0,-(0.2 + 0.02)/2, 0));
125 supportLarge->AddNode(siliconReadout, 1,
new TGeoTranslation(0,(0.2 + 0.02 + 0.02)/2, 0));
126 supportLarge->AddNode(siliconReadout, 2,
new TGeoTranslation(0,-(0.2 + 0.02 + 0.02)/2, 0));
127 supportLarge->AddNode(aluCables, 1,
new TGeoTranslation(0,(0.2 + 0.02 + 0.02 + 0.4)/2, 0));
128 supportLarge->AddNode(aluCables, 2,
new TGeoTranslation(0,-(0.2 + 0.02 + 0.02 + 0.4)/2, 0));
130 TGeoTranslation transSupportLarge(0,(14.8669)/2 + 5.5665 + 1,0);
132 for (
int i = 0;
i < 24;
i++){
135 TGeoRotation rotSens(
rotName.Data(), 0,0,
i * 360/24);
136 TGeoHMatrix sens = rotSens * transSupportLarge;
137 supportDisk->AddNode(supportLarge,
i+1,
new TGeoHMatrix(sens));
140 TGeoVolumeAssembly* supportSmall =
new TGeoVolumeAssembly(
"SupportSmall");
141 TGeoShape* carbonFoamShapeSmall =
new TGeoBBox(1.8/2, 0.2/2, 3.5/2);
142 TGeoVolume* carbonFoamSmall =
new TGeoVolume(
"CarbonFoamSmall", carbonFoamShapeSmall, gGeoMan->GetMedium(
"carbonfoam"));
143 TGeoShape* carbonFiberShapeSmall =
new TGeoBBox(1.8/2, 0.02/2, 3.5/2);
144 TGeoVolume* carbonFiberSmall =
new TGeoVolume(
"CarbonFiberSmall", carbonFiberShapeSmall, gGeoMan->GetMedium(
"carbon"));
145 TGeoShape* siliconReadoutShapeSmall =
new TGeoBBox(1.8/2, 0.02/2, 3.5/2);
146 TGeoVolume* siliconReadoutSmall =
new TGeoVolume(
"SiliconReadoutSmall", siliconReadoutShapeSmall, gGeoMan->GetMedium(
"silicon"));
147 TGeoShape* aluCablesShapeSmall =
new TGeoBBox(1.8/2, 0.4/2, 3.5/2);
148 TGeoVolume* aluCablesSmall =
new TGeoVolume(
"AluCablesSmall", aluCablesShapeSmall, gGeoMan->GetMedium(
"aluminium"));
150 supportSmall->AddNode(carbonFoamSmall, 1);
151 supportSmall->AddNode(carbonFiberSmall, 1,
new TGeoTranslation(0,(0.2 + 0.02)/2, 0));
152 supportSmall->AddNode(carbonFiberSmall, 2,
new TGeoTranslation(0,-(0.2 + 0.02)/2, 0));
153 supportSmall->AddNode(siliconReadoutSmall, 1,
new TGeoTranslation(0,(0.2 + 0.02 + 0.02)/2, 0));
154 supportSmall->AddNode(siliconReadoutSmall, 2,
new TGeoTranslation(0,-(0.2 + 0.02 + 0.02)/2, 0));
155 supportSmall->AddNode(aluCablesSmall, 1,
new TGeoTranslation(0,(0.2 + 0.02 + 0.02 + 0.4)/2, 0));
156 supportSmall->AddNode(aluCablesSmall, 2,
new TGeoTranslation(0,-(0.2 + 0.02 + 0.02 + 0.4)/2, 0));
158 TGeoTranslation transSupportSmall(0,2.1 + 5.3358 + 0.5,0);
160 for (
int i = 0;
i < 24;
i++){
163 TGeoRotation rotSens(
rotName.Data(), 0,0,
i * 360/24);
164 TGeoHMatrix sens = rotSens * transSupportSmall;
165 supportDisk->AddNode(supportSmall,
i+1,
new TGeoHMatrix(sens));
168 combinedLambdaDisks->AddNode(lambdaDisk,1,
new TGeoTranslation(0,0,positionOfDisk1inZ));
169 combinedLambdaDisks->AddNode(lambdaDisk,2,
new TGeoTranslation(0,0,positionOfDisk2inZ));
170 combinedLambdaDisks->AddNode(supportDisk,1,
new TGeoTranslation(0,0,(positionOfDisk1inZ + positionOfDisk2inZ)/2));
172 top->AddNode(combinedLambdaDisks,0);
174 gGeoMan->CloseGeometry();
FairGeoMedium * CbmMediumCarbon
TGeoManager * gGeoManager
FairGeoMedium * CbmMediumAluminium
FairGeoMedium * CbmMediumSilicon
FairGeoBuilder * geobuild
FairGeoInterface * geoFace