37 vname = vname.Strip();
38 TGeoVolume* vcave =
gGeoManager->FindVolumeFast(vname.Data());
41 TGeoVolume* mdt =
new TGeoVolumeAssembly(
"Mdt");
42 new TGeoVolumeAssembly(
"MdtMag");
43 TGeoVolume* mdtBarrel =
new TGeoVolumeAssembly(
"MdtBarrel");
44 TGeoVolume* mdtBL00 =
new TGeoVolumeAssembly(
"MdtBarrelLayer00");
45 TGeoVolume* mdtBL01 =
new TGeoVolumeAssembly(
"MdtBarrelLayer01");
46 TGeoVolume* mdtBL02 =
new TGeoVolumeAssembly(
"MdtBarrelLayer02");
47 TGeoVolume* mdtBL03 =
new TGeoVolumeAssembly(
"MdtBarrelLayer03");
48 TGeoVolume* mdtBL04 =
new TGeoVolumeAssembly(
"MdtBarrelLayer04");
49 TGeoVolume* mdtBL05 =
new TGeoVolumeAssembly(
"MdtBarrelLayer05");
50 TGeoVolume* mdtBL06 =
new TGeoVolumeAssembly(
"MdtBarrelLayer06");
51 TGeoVolume* mdtBL07 =
new TGeoVolumeAssembly(
"MdtBarrelLayer07");
52 TGeoVolume* mdtBL08 =
new TGeoVolumeAssembly(
"MdtBarrelLayer08");
53 TGeoVolume* mdtBL09 =
new TGeoVolumeAssembly(
"MdtBarrelLayer09");
54 TGeoVolume* mdtBL10 =
new TGeoVolumeAssembly(
"MdtBarrelLayer10");
55 TGeoVolume* mdtBL11 =
new TGeoVolumeAssembly(
"MdtBarrelLayer11");
56 TGeoVolume* mdtBL12 =
new TGeoVolumeAssembly(
"MdtBarrelLayer12");
57 TGeoVolume* mdtEndcap =
new TGeoVolumeAssembly(
"MdtEndcap");
58 TGeoVolume* mdtEL00 =
new TGeoVolumeAssembly(
"MdtEndcapLayer00");
59 TGeoVolume* mdtEL01 =
new TGeoVolumeAssembly(
"MdtEndcapLayer01");
60 TGeoVolume* mdtEL02 =
new TGeoVolumeAssembly(
"MdtEndcapLayer02");
61 TGeoVolume* mdtEL03 =
new TGeoVolumeAssembly(
"MdtEndcapLayer03");
62 TGeoVolume* mdtEL04 =
new TGeoVolumeAssembly(
"MdtEndcapLayer04");
63 new TGeoVolumeAssembly(
"MdtEndcapLayer05");
67 Text_t longbuffer[250];
73 TGeoRotation tRot, tRotSlice;
76 FairGeoLoader*
geoLoad = FairGeoLoader::Instance();
77 FairGeoInterface *
geoFace = geoLoad->getGeoInterface();
78 FairGeoMedia *
Media = geoFace->getMedia();
79 FairGeoBuilder *
geobuild=geoLoad->getGeoBuilder();
80 FairGeoMedium *medmdtArCO2 = Media->getMedium(
"MDTMixture");
81 geobuild->createMedium(medmdtArCO2);
96 for(
int i=0;
i<13;
i++)
141 mpx = (my - mpz)*(
TMath::Tan(TMath::ACos(-1.0)/8.0));
143 sprintf(buffer,
"box%i",
i);
144 TGeoBBox* box =
new TGeoBBox(buffer,mpx/10.0,mpy/10.0,mpz/10.0,0);
145 TGeoTranslation* tgt =
new TGeoTranslation(0.0,mz0/10.0,0.0);
147 tgt->RegisterYourself();
148 sprintf(buffer,
"box%i:tgt-hbox1",
i);
149 TGeoCompositeShape* tgcs =
new TGeoCompositeShape(
"tgcs",buffer);
150 for(
int j=0; j<8; j++)
158 sprintf(buffer,
"MDT%is%il%ib%iw%i", 1, j,
i, 0, 0);
159 TGeoVolume* volume =
new TGeoVolume(buffer,tgcs,
gGeoManager->GetMedium(
"MDTMixture"));
160 AddSensitiveVolume(volume);
161 volume->SetLineColor(1);
166 mdtBL00->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
169 mdtBL01->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
172 mdtBL02->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
175 mdtBL03->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
178 mdtBL04->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
181 mdtBL05->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
184 mdtBL06->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
187 mdtBL07->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
190 mdtBL08->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
193 mdtBL09->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
196 mdtBL10->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
199 mdtBL11->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
202 mdtBL12->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,0.0,
new TGeoRotation(tRot)));
208 if(j==2 || j==6) k=j-2;
213 sprintf(buffer,
"MDT%is%il%ib%iw%i", 1, j,
i, 0, 0);
214 TGeoVolume* volume =
new TGeoVolume(buffer,box,
gGeoManager->GetMedium(
"MDTMixture"));
215 AddSensitiveVolume(volume);
216 volume->SetLineColor(1);
221 mdtBL00->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
224 mdtBL01->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
227 mdtBL02->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
230 mdtBL03->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
233 mdtBL04->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
236 mdtBL05->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
239 mdtBL06->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
242 mdtBL07->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
245 mdtBL08->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
248 mdtBL09->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
251 mdtBL10->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
254 mdtBL11->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
257 mdtBL12->AddNode(volume,8*
i+j,
new TGeoCombiTrans(mx0/10.0,my0/10.0,mz0/10.0,
new TGeoRotation(tRot)));
265 mdtBarrel->AddNode(mdtBL00,1);
266 mdtBarrel->AddNode(mdtBL01,1);
267 mdtBarrel->AddNode(mdtBL02,1);
268 mdtBarrel->AddNode(mdtBL03,1);
269 mdtBarrel->AddNode(mdtBL04,1);
270 mdtBarrel->AddNode(mdtBL05,1);
271 mdtBarrel->AddNode(mdtBL06,1);
272 mdtBarrel->AddNode(mdtBL07,1);
273 mdtBarrel->AddNode(mdtBL08,1);
274 mdtBarrel->AddNode(mdtBL09,1);
275 mdtBarrel->AddNode(mdtBL10,1);
276 mdtBarrel->AddNode(mdtBL11,1);
277 mdtBarrel->AddNode(mdtBL12,1);
278 mdt->AddNode(mdtBarrel,1);
285 TGeoRotation* tgr0 =
new TGeoRotation(tgrl);
286 tgr0->SetName(
"tgr0");
287 tgr0->RegisterYourself();
289 TGeoRotation* tgr1 =
new TGeoRotation(tgrl);
290 tgr1->SetName(
"tgr1");
291 tgr1->RegisterYourself();
293 TGeoRotation* tgr2 =
new TGeoRotation(tgrl);
294 tgr2->SetName(
"tgr2");
295 tgr2->RegisterYourself();
297 TGeoRotation* tgr3 =
new TGeoRotation(tgrl);
298 tgr3->SetName(
"tgr3");
299 tgr3->RegisterYourself();
301 TGeoRotation* tgr4 =
new TGeoRotation(tgrl);
302 tgr4->SetName(
"tgr4");
303 tgr4->RegisterYourself();
305 TGeoRotation* tgr5 =
new TGeoRotation(tgrl);
306 tgr5->SetName(
"tgr5");
307 tgr5->RegisterYourself();
309 TGeoRotation* tgr6 =
new TGeoRotation(tgrl);
310 tgr6->SetName(
"tgr6");
311 tgr6->RegisterYourself();
313 TGeoRotation* tgr7 =
new TGeoRotation(tgrl);
314 tgr7->SetName(
"tgr7");
315 tgr7->RegisterYourself();
321 for(
int i=0;
i<5;
i++)
346 TGeoTranslation* tgt1 =
new TGeoTranslation(0.0,0.0,my/(-10.0));
347 tgt1->SetName(
"tgt1");
348 tgt1->RegisterYourself();
349 new TGeoTrd2(
"trd1",dx1/10.0,dx2/10.0,dy1/10.0,dy2/10.0,dz/10.0);
354 TGeoTranslation* tgt2 =
new TGeoTranslation(0.0,0.0,my/(-10.0));
355 tgt2->SetName(
"tgt2");
356 tgt2->RegisterYourself();
357 new TGeoTrd2(
"trd2",dx1/10.0,dx2/10.0,dy1/10.0,dy2/10.0,dz/10.0);
359 for(
int j=0; j<8; j++)
361 sprintf(buffer,
"tgcs%i",(8*
i)+j);
362 if(
i==0) sprintf(longbuffer,
"trd1:tgt1-hbox%i:tgr%i",
i+2,j);
363 else sprintf(longbuffer,
"trd2:tgt2-hbox%i:tgr%i",
i+2,j);
364 TGeoCompositeShape* tgcs =
new TGeoCompositeShape(buffer,longbuffer);
366 sprintf(buffer,
"MDT%is%il%ib%iw%i", 2, j,
i, 0, 0);
367 TGeoVolume* volume =
new TGeoVolume(buffer,tgcs,
gGeoManager->GetMedium(
"MDTMixture"));
368 AddSensitiveVolume(volume);
369 volume->SetLineColor(1);
374 mdtEL00->AddNode(volume,200+8*
i+j,
new TGeoCombiTrans(0.0,0.0,mz0/10.0,
new TGeoRotation(tRot)));
377 mdtEL01->AddNode(volume,200+8*
i+j,
new TGeoCombiTrans(0.0,0.0,mz0/10.0,
new TGeoRotation(tRot)));
380 mdtEL02->AddNode(volume,200+8*
i+j,
new TGeoCombiTrans(0.0,0.0,mz0/10.0,
new TGeoRotation(tRot)));
383 mdtEL03->AddNode(volume,200+8*
i+j,
new TGeoCombiTrans(0.0,0.0,mz0/10.0,
new TGeoRotation(tRot)));
386 mdtEL04->AddNode(volume,200+8*
i+j,
new TGeoCombiTrans(0.0,0.0,mz0/10.0,
new TGeoRotation(tRot)));
393 mdtEndcap->AddNode(mdtEL00,1);
394 mdtEndcap->AddNode(mdtEL01,1);
395 mdtEndcap->AddNode(mdtEL02,1);
396 mdtEndcap->AddNode(mdtEL03,1);
397 mdtEndcap->AddNode(mdtEL04,1);
398 mdt->AddNode(mdtEndcap,1);
401 vcave->AddNode(mdt,1);
#define PndMdt_SVThickness
#define PndMdt_Barrel_Displacement
TGeoManager * gGeoManager
#define PndMdt_Barrel_Length
FairGeoBuilder * geobuild
#define PndMdt_H01_LengthZ
#define PndMdt_H01_LengthX
#define PndMdt_Endcap_Height
FairGeoInterface * geoFace