1 #include "TGeoManager.h"
7 TString outfileWithoutPath =
"hypGeGeoCOSYTarget_";
11 outfileWithoutPath +=TargetThickness_Ext;
13 outfileWithoutPath +=
"cm_";
14 outfileWithoutPath += Angle;
15 outfileWithoutPath +=
"_Degree.root";
16 return outfileWithoutPath;
22 sprintf(buf,
"%sRaw",Name.Data());
23 TGeoBBox *Raw =
new TGeoBBox(buf,1.5,1.5,length/2);
24 sprintf(buf,
"%sHole",Name.Data());
25 TGeoTube *Hole =
new TGeoTube(buf,0,0.6, length);
26 sprintf(buf,
"%sTrapez",Name.Data());
27 TGeoTrd1 *Trapez =
new TGeoTrd1(buf,0.45,0.75,length,0.25);
28 sprintf(buf,
"%sRectangle",Name.Data());
29 TGeoBBox *Rectangle =
new TGeoBBox(buf,0.4,0.4,length);
30 sprintf(buf,
"%sRectangle2",Name.Data());
31 TGeoBBox *Rectangle2 =
new TGeoBBox(buf,0.15,0.5,length);
32 sprintf(buf,
"%sRectangle3",Name.Data());
33 TGeoBBox *Rectangle3 =
new TGeoBBox(buf,0.1,0.1,length);
34 sprintf(buf,
"%sTube",Name.Data());
35 TGeoTubeSeg *Tube =
new TGeoTubeSeg(buf, 0.2 , 1 ,length,0,90);
37 TGeoCombiTrans *TrapezCombiTrans[4];
38 TGeoCombiTrans *RectangleCombiTrans[4];
39 TGeoCombiTrans *Rectangle2CombiTrans[4];
40 TGeoCombiTrans *Rectangle3CombiTrans[4];
41 TGeoCombiTrans *Rectangle3CombiTrans2[4];
42 TGeoCombiTrans *TubeCombiTrans[4];
44 sprintf(buf,
"%sRaw - %sHole",Name.Data(),Name.Data());
48 for (
int i = 0;
i< 4;
i++)
50 sprintf(buf,
"TrapezCombiTrans%d",
i);
52 TrapezCombiTrans[
i] ->RegisterYourself();
53 sprintf(buf,
"-%sTrapez :TrapezCombiTrans%d",Name.Data(),
i);
55 sprintf(buf,
"RectangleCombiTrans%d",
i);
57 RectangleCombiTrans[
i]->RegisterYourself();
58 sprintf(buf,
"-%sRectangle :RectangleCombiTrans%d",Name.Data(),
i);
60 sprintf(buf,
"Rectangle2CombiTrans%d",
i);
61 Rectangle2CombiTrans[
i] =
new TGeoCombiTrans(buf,0.9*pow(-1,
i/2),0.9*pow(-1,(
i+1)/2),0,
new TGeoRotation(
"",-45+
i*90,0,0) );
62 Rectangle2CombiTrans[
i]->RegisterYourself();
63 sprintf(buf,
"-%sRectangle2 :Rectangle2CombiTrans%d",Name.Data(),
i);
65 sprintf(buf,
"Rectangle3CombiTrans%d",
i);
66 Rectangle3CombiTrans[
i] =
new TGeoCombiTrans(buf,0.9*pow(-1,
i/2),1.58*pow(-1,(
i+1)/2),0,
new TGeoRotation(
"",0,0,0) );
67 Rectangle3CombiTrans[
i]->RegisterYourself();
68 sprintf(buf,
"-%sRectangle3 :Rectangle3CombiTrans%d",Name.Data(),
i);
70 sprintf(buf,
"Rectangle3CombiTrans2%d",
i);
71 Rectangle3CombiTrans2[
i] =
new TGeoCombiTrans(buf,1.58*pow(-1,(
i+1)/2),0.9*pow(-1,
i/2),0,
new TGeoRotation(
"",0,0,0) );
72 Rectangle3CombiTrans2[
i]->RegisterYourself();
73 sprintf(buf,
"-%sRectangle3 :Rectangle3CombiTrans2%d",Name.Data(),
i);
75 sprintf(buf,
"TubeCombiTrans%d",
i);
76 TubeCombiTrans[
i] =
new TGeoCombiTrans(buf,1.3*pow(-1,(
i+1)/2),1.3*pow(-1,
i/2),0,
new TGeoRotation(
"",
i*90,0,0) );
77 TubeCombiTrans[
i]->RegisterYourself();
78 sprintf(buf,
"-%sTube :TubeCombiTrans%d",Name.Data(),
i);
82 TGeoCompositeShape *Profile =
new TGeoCompositeShape(Name.Data(), ShapeString.Data());
83 cout << ShapeString.Data() << endl;
92 cout <<
"frame start" << endl;
93 TGeoVolumeAssembly *FrameAssembly=
new TGeoVolumeAssembly(
"FrameAssembly");
100 TGeoVolume *Pillar =
new TGeoVolume (
"Pillar",
makeMaytec(Height,
"Pillar"),Med_ext);
101 TGeoVolume *Pillar2 =
new TGeoVolume (
"Pillar2",
makeMaytec(Height,
"Pillar1"),Med_ext);
102 TGeoVolume *Pillar3 =
new TGeoVolume (
"Pillar3",
makeMaytec(Height,
"Pillar2"),Med_ext);
103 TGeoVolume *Pillar4 =
new TGeoVolume (
"Pillar4",
makeMaytec(Height,
"Pillar3"),Med_ext);
104 Pillar ->SetFillColor(kBlue);
105 Pillar ->SetFillColor(kBlue);
106 Pillar2 ->SetFillColor(kBlue);
107 Pillar2 ->SetFillColor(kBlue);
108 Pillar3 ->SetFillColor(kBlue);
109 Pillar3 ->SetFillColor(kBlue);
110 Pillar4 ->SetFillColor(kBlue);
111 Pillar4 ->SetFillColor(kBlue);
112 TGeoVolume *Beam1 =
new TGeoVolume (
"Beam1",
makeMaytec(Width,
"Beam1"),Med_ext);
113 TGeoVolume *Beam12 =
new TGeoVolume (
"Beam12",
makeMaytec(Width,
"Beam12"),Med_ext);
114 Beam1->SetFillColor(14);
115 Beam1 ->SetFillColor(14);
116 Beam12->SetFillColor(14);
117 Beam12 ->SetFillColor(14);
118 TGeoVolume *Beam2 =
new TGeoVolume (
"Beam2",
makeMaytec(Depth,
"Beam2"),Med_ext);
119 TGeoVolume *Beam22 =
new TGeoVolume (
"Beam22",
makeMaytec(Depth,
"Beam22"),Med_ext);
120 Beam2->SetFillColor(14);
121 Beam2 ->SetFillColor(14);
122 Beam22->SetFillColor(14);
123 Beam22 ->SetFillColor(14);
124 FrameAssembly ->AddNode(Pillar,1,
new TGeoCombiTrans(Height/2,1.5,Width/2-1.5,
new TGeoRotation(
"",90,90,0)));
125 FrameAssembly ->AddNode(Pillar2,2,
new TGeoCombiTrans(Height/2,1.5,-(Width/2-1.5),
new TGeoRotation(
"",90,90,0)));
126 FrameAssembly ->AddNode(Pillar3,3,
new TGeoCombiTrans(Height/2,1.5+Depth+3,-(Width/2-1.5),
new TGeoRotation(
"",90,90,0)));
127 FrameAssembly ->AddNode(Pillar4,4,
new TGeoCombiTrans(Height/2,1.5+Depth+3,(Width/2-1.5),
new TGeoRotation(
"",90,90,0)));
128 FrameAssembly ->AddNode(Beam1,1,
new TGeoCombiTrans(Height+1.5,1.5,0,
new TGeoRotation(
"",0,0,0)));
129 FrameAssembly ->AddNode(Beam12,2,
new TGeoCombiTrans(Height+1.5,1.5+Depth+3,0,
new TGeoRotation(
"",0,0,0)));
130 FrameAssembly ->AddNode(Beam2,1,
new TGeoCombiTrans(Height+1.5,1.5+Depth/2+1.5,(KermitWidth/2+1.5),
new TGeoRotation(
"",0,90,0)));
131 FrameAssembly ->AddNode(Beam22,2,
new TGeoCombiTrans(Height+1.5,1.5+Depth/2+1.5,-(KermitWidth/2+1.5),
new TGeoRotation(
"",0,90,0)));
134 cout <<
"frame built" << endl;
135 return FrameAssembly;
142 TGeoBBox *GlueSampleFrameFrontBox =
new TGeoBBox(
"GlueSampleFrameFrontBox",4,4,0.2);
145 TGeoTranslation *GlueSampleFrontTrans =
new TGeoTranslation(
"GlueSampleFrontTrans",0,0,-0.2);
146 GlueSampleFrontTrans->RegisterYourself();
147 TGeoTranslation *GlueSampleBackTrans =
new TGeoTranslation(
"GlueSampleBackTrans",0,0,-(0.4+BarLength+0.2));
148 GlueSampleBackTrans->RegisterYourself();
150 TGeoBBox *GlueSampleFrameBarBox =
new TGeoBBox(
"GlueSampleFrameBarBox",.4,.4,BarLength/2);
153 TGeoTranslation *GlueSampleFrameBarTrans1 =
new TGeoTranslation(
"GlueSampleFrameBarTrans1",1.4+0.4,1.4+0.4,-(BarLength/2+0.4));
154 GlueSampleFrameBarTrans1->RegisterYourself();
155 TGeoTranslation *GlueSampleFrameBarTrans2 =
new TGeoTranslation(
"GlueSampleFrameBarTrans2",-(1.4+0.4),1.4+0.4,-(BarLength/2+0.4));
156 GlueSampleFrameBarTrans2->RegisterYourself();
157 TGeoTranslation *GlueSampleFrameBarTrans3 =
new TGeoTranslation(
"GlueSampleFrameBarTrans3",-(1.4+0.4),-(1.4+0.4),-(BarLength/2+0.4));
158 GlueSampleFrameBarTrans3->RegisterYourself();
159 TGeoTranslation *GlueSampleFrameBarTrans4 =
new TGeoTranslation(
"GlueSampleFrameBarTrans4",1.4+0.4,-(1.4+0.4),-(BarLength/2+0.4));
160 GlueSampleFrameBarTrans4->RegisterYourself();
162 TString ShapeString =
"GlueSampleFrameFrontBox : GlueSampleFrontTrans + GlueSampleFrameFrontBox : GlueSampleBackTrans + GlueSampleFrameBarBox : GlueSampleFrameBarTrans1 + GlueSampleFrameBarBox : GlueSampleFrameBarTrans2 + GlueSampleFrameBarBox : GlueSampleFrameBarTrans3 + GlueSampleFrameBarBox : GlueSampleFrameBarTrans4";
163 TGeoCompositeShape *GlueStackFrameShape =
new TGeoCompositeShape(
"GlueStackFrameShape", ShapeString.Data());
164 TGeoVolume *GlueSampleFrame =
new TGeoVolume(
"GlueSampleFrame", GlueStackFrameShape);
165 return GlueSampleFrame;
168 TGeoVolume *
makeGlueSample(TGeoMedium *Al_ext,TGeoMedium *Glue_ext, Int_t SampleNumber )
176 sprintf (buf,
"GlueSampleAssembly%d", SampleNumber);
177 TGeoVolume *SampleAssembly =
new TGeoVolumeAssembly (buf);
179 sprintf (buf,
"GlueHolderBox%d", SampleNumber);
180 TGeoBBox *GlueHolderBox =
new TGeoBBox(buf,7.8/2,2.6/2,HolderThickness/2);
181 sprintf (buf,
"GlueSampleBox%d", SampleNumber);
182 TGeoBBox *GlueBox =
new TGeoBBox(buf,7.8/2,2.6/2,GlueThickness/2);
184 sprintf (buf,
"GlueHolder%d", SampleNumber);
185 TGeoVolume *GlueHolder =
new TGeoVolume (buf, GlueHolderBox, Al_ext);
187 sprintf (buf,
"GlueSampleCrystal%d", SampleNumber);
188 TGeoVolume *GlueSampleCrystal =
new TGeoVolume (buf, GlueBox, Glue_ext);
190 sprintf (buf,
"GlueHolderTrans1%d", SampleNumber);
191 TGeoTranslation *GlueHolderTrans1 =
new TGeoTranslation(buf,0,0,-HolderThickness/2);
192 GlueHolderTrans1->RegisterYourself();
193 sprintf (buf,
"GlueHolderTrans2%d", SampleNumber);
194 TGeoTranslation *GlueHolderTrans2 =
new TGeoTranslation(buf,0,0,-(HolderThickness+GlueThickness +HolderThickness/2));
195 GlueHolderTrans2->RegisterYourself();
196 sprintf (buf,
"GlueTransd", SampleNumber);
197 TGeoTranslation *GlueTrans =
new TGeoTranslation(buf,0,0,-(HolderThickness+GlueThickness/2));
198 GlueTrans->RegisterYourself();
200 SampleAssembly->AddNode(GlueHolder,0,GlueHolderTrans1);
201 SampleAssembly->AddNode(GlueHolder,1,GlueHolderTrans2);
202 SampleAssembly->AddNode(GlueSampleCrystal,0,GlueTrans);
204 return SampleAssembly;
211 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
214 gSystem->Load(
"libGeoBase");
215 gSystem->Load(
"libParBase");
216 gSystem->Load(
"libBase");
217 gSystem->Load(
"libPndData");
218 gSystem->Load(
"libPassive");
219 gSystem->Load(
"libHypGe");
221 cout << TargetThickness_Ext;
232 outfile += outfileWithoutPath;
234 cout << outfile << endl;
236 TFile*
fi =
new TFile(outfile,
"RECREATE");
238 FairGeoLoader*
geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
239 FairGeoInterface *
geoFace = geoLoad->getGeoInterface();
240 geoFace->setMediaFile(
"../../../../geometry/media_pnd.geo");
241 geoFace->readMedia();
244 FairGeoMedia *
Media = geoFace->getMedia();
245 FairGeoBuilder *
geobuild=geoLoad->getGeoBuilder();
247 FairGeoMedium *medcarbon = Media->getMedium(
"carbon");
248 Int_t nmedcap=geobuild->createMedium(medcarbon);
249 TGeoMedium *Carbon =
gGeoManager->GetMedium(
"carbon");
251 FairGeoMedium *medcap = Media->getMedium(
"HYPaluminium");
252 Int_t nmedcap=geobuild->createMedium(medcap);
253 TGeoMedium *Al =
gGeoManager->GetMedium(
"HYPaluminium");
255 FairGeoMedium *medGe = Media->getMedium(
"germanium");
256 Int_t nmedGe=geobuild->createMedium(medGe);
257 TGeoMedium *Ge =
gGeoManager->GetMedium(
"germanium");
259 FairGeoMedium *medsteel = Media->getMedium(
"steel");
260 Int_t nmedcap=geobuild->createMedium(medsteel);
261 TGeoMedium *Steel =
gGeoManager->GetMedium(
"steel");
263 FairGeoMedium *medcu = Media->getMedium(
"copper");
264 Int_t nmedcap=geobuild->createMedium(medcu);
267 FairGeoMedium *medpe_bor5 = Media->getMedium(
"pe_bor5");
268 Int_t nmedcap=geobuild->createMedium(medcu);
269 TGeoMedium *pe_bor5 =
gGeoManager->GetMedium(
"pe_bor5");
271 TGeoManager *
geom = (TGeoManager*)gROOT->FindObject(
"FAIRGeom");
272 TGeoVolume *
top =
new TGeoVolumeAssembly(
"hpGe");
273 TGeoVolume *Realtop =
new TGeoVolumeAssembly(
"Realtop");
276 geom->SetTopVolume(top);
279 Double_t TargetThickness = TargetThickness_Ext;
280 TGeoVolume*
Target = geom->MakeBox(
"Target",Carbon,2.4,2.4,TargetThickness/2);
281 Target->SetLineColor(kRed);
282 Target->SetFillColor(kRed);
283 TGeoRotation *TargetRot =
new TGeoRotation(
"TargetRot",0,Angle,0);
285 cout << TargetThickness/2/
TMath::Cos(Angle*
Pi/180) << endl;
286 TGeoVolume* TargetAddition = geom->MakeBox(
"TargetAddition",Carbon,0.5,2.4,2.4);
287 TargetAddition->SetLineColor(kRed);
288 TargetAddition->SetFillColor(kRed);
293 TGeoVolume *AlSupportAssembly =
new TGeoVolumeAssembly(
"AlSupportAssembly");
295 TGeoTube *AlPlateTube =
new TGeoTube(
"AlPlateTube",0,6,0.2);
296 TGeoRotation *AlPlateTubeRotation =
new TGeoRotation (
"AlPlateTubeRotation",90,90,0);
297 AlPlateTubeRotation->RegisterYourself();
298 TGeoBBox *AlPlateBox =
new TGeoBBox(
"AlPlateBox",0.2,6,11.6/2);
299 TGeoTranslation *AlPlateBoxTranslation =
new TGeoTranslation (
"AlPlateBoxTranslation",0,0,+5.8);
300 AlPlateBoxTranslation->RegisterYourself();
301 TGeoCompositeShape *AlPlateShape =
new TGeoCompositeShape(
"AlPlateShape",
"AlPlateTube : AlPlateTubeRotation + AlPlateBox : AlPlateBoxTranslation");
302 TGeoVolume *AlPlate =
new TGeoVolume(
"AlPlate", AlPlateShape, Al);
303 AlPlate->SetLineColor(14);
304 AlPlate->SetFillColor(14);
307 TGeoBBox *AlFrontAngleTop =
new TGeoBBox(
"AlFrontAngleTop",0.5,2.5,0.1);
308 TGeoTranslation *AlFrontAngleTopTranslation =
new TGeoTranslation (
"AlFrontAngleTopTranslation",+0.2+0.5,0,-0.1);
309 AlFrontAngleTopTranslation->RegisterYourself();
310 TGeoBBox *AlFrontAngleBottom =
new TGeoBBox(
"AlFrontAngleBottom",0.1,2.5,1.5);
311 TGeoTranslation *AlFrontAngleBottomTranslation =
new TGeoTranslation (
"AlFrontAngleBottomTranslation",+0.3,0,-1.5);
312 AlFrontAngleBottomTranslation->RegisterYourself();
313 TGeoBBox *AlFrontAngleBottomCutout =
new TGeoBBox(
"AlFrontAngleBottomCutout",1,0.25,1.5);
314 TGeoTranslation *AlFrontAngleBottomCutoutTranslation =
new TGeoTranslation (
"AlFrontAngleBottomCutoutTranslation",+0.3,0,-2.5);
315 AlFrontAngleBottomCutoutTranslation->RegisterYourself();
316 TGeoCompositeShape *AlFrontAngleShape =
new TGeoCompositeShape(
"AlFrontAngleShape",
"(AlFrontAngleTop : AlFrontAngleTopTranslation + AlFrontAngleBottom : AlFrontAngleBottomTranslation ) - ( AlFrontAngleBottomCutout : AlFrontAngleBottomCutoutTranslation)");
317 TGeoVolume *AlFrontAngle =
new TGeoVolume(
"AlFrontAngle", AlFrontAngleShape, Al);
318 AlFrontAngle ->SetLineColor(14);
319 AlFrontAngle ->SetFillColor(14);
322 TGeoBBox *AlBackAngleTop =
new TGeoBBox(
"AlBackAngleTop",0.5,2.5,0.1);
323 TGeoTranslation *AlBackAngleTopTranslation =
new TGeoTranslation (
"AlBackAngleTopTranslation",+0.2+0.5,0,4.9);
324 AlBackAngleTopTranslation->RegisterYourself();
325 TGeoBBox *AlBackAngleBottom =
new TGeoBBox(
"AlBackAngleBottom",0.1,2.5,5);
326 TGeoTranslation *AlBackAngleBottomTranslation =
new TGeoTranslation (
"AlBackAngleBottomTranslation",+0.3,0,4.8+5);
327 AlBackAngleBottomTranslation->RegisterYourself();
328 TGeoBBox *AlBackAngleBottomCutout =
new TGeoBBox(
"AlBackAngleBottomCutout",1,0.25,5);
329 TGeoTranslation *AlBackAngleBottomCutoutTranslation =
new TGeoTranslation (
"AlBackAngleBottomCutoutTranslation",+0.3,0,4.8+7);
330 AlBackAngleBottomCutoutTranslation->RegisterYourself();
331 TGeoCompositeShape *AlBackAngleShape =
new TGeoCompositeShape(
"AlBackAngleShape",
"(AlBackAngleTop : AlBackAngleTopTranslation + AlBackAngleBottom : AlBackAngleBottomTranslation ) - ( AlBackAngleBottomCutout : AlBackAngleBottomCutoutTranslation)");
332 TGeoVolume *AlBackAngle =
new TGeoVolume(
"AlBackAngle", AlBackAngleShape, Al);
333 AlBackAngle ->SetLineColor(14);
334 AlBackAngle ->SetFillColor(14);
337 TGeoTube *AlGoniometerTube =
new TGeoTube(
"AlGoniometerTube",5,6,2);
338 TGeoCombiTrans *AlGoniometerTubeCombiTrans =
new TGeoCombiTrans (
"AlGoniometerTubeCombiTrans",-2.2,0,0,
new TGeoRotation(
"",90,90,0));
339 AlGoniometerTubeCombiTrans->RegisterYourself();
340 TGeoVolume *AlGoniometer =
new TGeoVolume(
"AlGoniometer",AlGoniometerTube,Al);
341 AlGoniometer ->SetLineColor(14);
342 AlGoniometer ->SetFillColor(14);
346 TGeoTube *M5ScrewHeadOut =
new TGeoTube(
"M5ScrewHeadOut",0.45/2,0.4,0.25);
347 TGeoTube *M5ScrewHeadIn =
new TGeoTube(
"M5ScrewHeadIn",0,0.45/2,0.25/2);
348 TGeoTranslation *M5ScrewHeadInTrans =
new TGeoTranslation(
"M5ScrewHeadInTrans",0,0,0.25/2);
350 TGeoCompositeShape *M5ScrewHeadShape =
new TGeoCompositeShape(
"M5SrewHeadShape",
"M5ScrewHeadOut + M5ScrewHeadIn : M5ScrewHeadInTrans");
351 TGeoVolume *M5ScrewHead =
new TGeoVolume(
"M5ScrewHead",M5ScrewHeadShape,Steel);
352 TGeoCombiTrans *M5ScrewHeadCombiTrans =
new TGeoCombiTrans (
"M5ScrewHeadCombiTrans",+0.4+0.25,0,8,
new TGeoRotation(
"",90,270,0));
353 M5ScrewHeadCombiTrans->RegisterYourself();
354 TGeoCombiTrans *M5ScrewHead2CombiTrans =
new TGeoCombiTrans (
"M5ScrewHead2CombiTrans",+0.4+0.25,0,-2,
new TGeoRotation(
"",90,270,0));
355 M5ScrewHead2CombiTrans->RegisterYourself();
356 M5ScrewHead->SetLineColor(36);
357 M5ScrewHead->SetFillColor(36);
359 AlSupportAssembly->AddNode(M5ScrewHead,1, M5ScrewHeadCombiTrans);
360 AlSupportAssembly->AddNode(M5ScrewHead,2, M5ScrewHead2CombiTrans);
364 TGeoBBox *AlBasePlateBox =
new TGeoBBox(
"AlBasePlateBox",0.4,30,40);
365 TGeoCombiTrans *AlBasePlateCombiTrans =
new TGeoCombiTrans (
"AlBasePlateCombiTrans",-4.6,25,-25,
new TGeoRotation(
"",0,60,0));
366 AlBasePlateCombiTrans->RegisterYourself();
367 TGeoVolume *AlBasePlate =
new TGeoVolume(
"AlBasePlate",AlBasePlateBox,Al);
368 AlBasePlate ->SetLineColor(14);
369 AlBasePlate ->SetFillColor(14);
372 AlSupportAssembly->AddNode(AlBasePlate,1, AlBasePlateCombiTrans);
373 AlSupportAssembly->AddNode(AlGoniometer,1, AlGoniometerTubeCombiTrans);
374 AlSupportAssembly->AddNode(AlFrontAngle,1);
375 AlSupportAssembly->AddNode(AlBackAngle,1);
376 AlSupportAssembly->AddNode(AlPlate,1);
392 TGeoVolume *NeutronDetectorAssembly =
new TGeoVolumeAssembly(
"NeutronDetectorAssembly");
394 TGeoTube *KermitTube=
new TGeoTube(
"KermitTube",0,23.5/2,26.4/2);
395 TGeoVolume *KermitVolume =
new TGeoVolume(
"KermitCrystal",KermitTube,pe_bor5);
396 TGeoCombiTrans *KermitCombiTrans =
new TGeoCombiTrans (
"KermitHeadCombiTrans",24.5+23.5/2,15+(26.4/2)*
TMath::Sin(
TMath::Pi()/180*60),-(15+26.4/2)*
TMath::Cos(
TMath::Pi()/180*60),
new TGeoRotation(
"",0,60,0));
397 KermitCombiTrans->RegisterYourself();
398 NeutronDetectorAssembly ->AddNode(KermitVolume,1, KermitCombiTrans);
401 TGeoSphere *NeutronBallSphere =
new TGeoSphere(
"NeutronBallSphere",0,32/2,0,180,0,360);
402 TGeoVolume *NeutronBall =
new TGeoVolume (
"NeutronBallCrystal", NeutronBallSphere,pe_bor5);
403 TGeoCombiTrans *NeutronBallCombiTrans =
new TGeoCombiTrans (
"NeutronBallHeadCombiTrans",20,21.5+32/2,-54,
new TGeoRotation(
"",0,0,0));
404 NeutronBallCombiTrans->RegisterYourself();
405 NeutronDetectorAssembly ->AddNode(NeutronBall,1, NeutronBallCombiTrans);
412 Int_t CrystalNumber = 1;
418 TGeoVolume *GlueStackAssembly =
new TGeoVolumeAssembly(
"GlueStackAssembly");
421 GlueStackAssembly->AddNode(GlueStackFrame,1);
423 TGeoVolume *GlueSamples[23];
426 for (
int i= 0;
i < 1;
i++)
430 GlueStackAssembly->AddNode(GlueSamples[
i],i,
new TGeoCombiTrans (0,0,-(0.4 + (i+0.5)*(0.203)),
new TGeoRotation(
"",0,0,0)));
432 Realtop->AddNode(GlueStackAssembly,1,
new TGeoTranslation (0,0,-100));
433 top->AddNode(Realtop,0);
436 geom->CloseGeometry();
437 cout <<
"# of Nodes: " << Realtop->CountNodes(10,1) << endl;
442 cout <<
"Wrote target geometry to file: " << outfileWithoutPath << endl;
443 Realtop->Draw(
"ogl");
450 return outfileWithoutPath;
TString hypGeGeoCOSYTarget(Double_t TargetThickness_Ext=5, Double_t Angle=0)
TGeoVolume * makeMaytecFrame(TGeoMedium *Med_ext)
TGeoManager * gGeoManager
TString BuildOutputNameTarget(Double_t TargetThickness_Ext, Double_t Angle)
TGeoVolume * makeGlueStackFrame(TGeoMedium *Al_ext, TGeoMedium *Steel_ext)
FairGeoBuilder * geobuild
TGeoShape * makeMaytec(Double_t length, TString Name)
FairGeoInterface * geoFace
TGeoVolume * makeGlueSample(TGeoMedium *Al_ext, TGeoMedium *Glue_ext, Int_t SampleNumber)