1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /** @file AliFMDGeometryBuilder.cxx
17 @author Christian Holm Christensen <cholm@nbi.dk>
18 @date Mon Mar 27 12:41:17 2006
19 @brief Class to build the FMD geometry
21 //____________________________________________________________________
23 // Forward Multiplicity Detector based on Silicon wafers. This class
24 // contains the base procedures for the Forward Multiplicity detector
25 // Detector consists of 3 sub-detectors FMD1, FMD2, and FMD3, each of
26 // which has 1 or 2 rings of silicon sensors.
29 #include "AliFMDGeometryBuilder.h" // ALIFMDGEOSIMULATOR_H
30 #include "AliFMDGeometry.h" // ALIFMDGEOMETRY_H
31 #include "AliFMDDetector.h" // ALIFMDDETECTOR_H
32 #include "AliFMDRing.h" // ALIFMDRING_H
33 #include "AliFMD1.h" // ALIFMD1_H
34 #include "AliFMD2.h" // ALIFMD2_H
35 #include "AliFMD3.h" // ALIFMD3_H
36 #include "AliFMD.h" // ALIFMD_H
37 #include "AliLog.h" // ALILOG_H
38 #include <TGeoVolume.h> // ROOT_TGeoVolume
39 #include <TGeoTube.h> // ROOT_TGeoTube
40 #include <TGeoPcon.h> // ROOT_TGeoPcon
41 #include <TGeoMaterial.h> // ROOT_TGeoMaterial
42 #include <TGeoMedium.h> // ROOT_TGeoMedium
43 #include <TGeoXtru.h> // ROOT_TGeoXtru
44 #include <TGeoPolygon.h> // ROOT_TGeoPolygon
45 #include <TGeoTube.h> // ROOT_TGeoTube
46 #include <TGeoManager.h> // ROOT_TGeoManager
47 #include <TVector2.h> // ROOT_TVector2
48 #include <TArrayD.h> // ROOT_TArrayD
50 //====================================================================
51 ClassImp(AliFMDGeometryBuilder)
53 ; // This is here to keep Emacs for indenting the next line
56 //____________________________________________________________________
57 const Char_t* AliFMDGeometryBuilder::fgkActiveName = "F%cAC";
58 const Char_t* AliFMDGeometryBuilder::fgkSectorName = "F%cSC";
59 const Char_t* AliFMDGeometryBuilder::fgkStripName = "F%cST";
60 const Char_t* AliFMDGeometryBuilder::fgkSensorName = "F%cSE";
61 const Char_t* AliFMDGeometryBuilder::fgkPCBName = "F%cPB";
62 const Char_t* AliFMDGeometryBuilder::fgkCuName = "F%cCU";
63 const Char_t* AliFMDGeometryBuilder::fgkChipName = "F%cCH";
64 const Char_t* AliFMDGeometryBuilder::fgkLongLegName = "F%cLL";
65 const Char_t* AliFMDGeometryBuilder::fgkShortLegName = "F%cSL";
66 const Char_t* AliFMDGeometryBuilder::fgkFrontVName = "F%cFH";
67 const Char_t* AliFMDGeometryBuilder::fgkBackVName = "F%cBH";
68 const Char_t* AliFMDGeometryBuilder::fgkRingTopName = "F%cTV";
69 const Char_t* AliFMDGeometryBuilder::fgkRingBotName = "F%cBV";
70 const Char_t* AliFMDGeometryBuilder::fgkHCName = "F%dH%c";
71 const Char_t* AliFMDGeometryBuilder::fgkIHCName = "F%dI%c";
72 const Char_t* AliFMDGeometryBuilder::fgkNoseName = "F3SN";
73 const Char_t* AliFMDGeometryBuilder::fgkBackName = "F3SB";
74 const Char_t* AliFMDGeometryBuilder::fgkBeamName = "F3SL";
75 const Char_t* AliFMDGeometryBuilder::fgkFlangeName = "F3SF";
76 const Char_t* AliFMDGeometryBuilder::fgkFMDName = "F%dM%c";
78 //____________________________________________________________________
79 AliFMDGeometryBuilder::AliFMDGeometryBuilder()
89 // Default constructor
93 //____________________________________________________________________
94 AliFMDGeometryBuilder::AliFMDGeometryBuilder(Bool_t detailed)
95 : TTask("FMD", "Geometry builder"),
105 // Normal constructor
109 // fmd Pointer to AliFMD object
110 // detailed Whether to make a detailed simulation or not
116 //____________________________________________________________________
118 AliFMDGeometryBuilder::RingGeometry(AliFMDRing* r)
120 // Setup the geometry of a ring. The defined TGeoVolume is
121 // returned, and should be used when setting up the rest of the
127 // r Pointer to ring geometry object
130 // pointer to ring volume
133 AliError("Didn't get a ring object");
136 Char_t id = r->GetId();
137 Double_t siThick = r->GetSiThickness();
138 const Int_t nv = r->GetNVerticies();
139 TVector2* a = r->GetVertex(5);
140 TVector2* b = r->GetVertex(3);
141 TVector2* c = r->GetVertex(4);
142 Double_t theta = r->GetTheta();
143 Double_t off = (TMath::Tan(TMath::Pi() * theta / 180)
144 * r->GetBondingWidth());
145 Double_t rmax = b->Mod();
146 Double_t rmin = r->GetLowR();
147 Double_t pcbThick = r->GetPrintboardThickness();
148 Double_t cuThick = r->GetCopperThickness();
149 Double_t chipThick= r->GetChipThickness();
150 Double_t modSpace = r->GetModuleSpacing();
151 Double_t legr = r->GetLegRadius();
152 Double_t legl = r->GetLegLength();
153 Double_t legoff = r->GetLegOffset();
154 Int_t ns = r->GetNStrips();
155 Double_t stripoff = a->Mod();
156 Double_t dstrip = (rmax - stripoff) / ns;
157 Double_t space = r->GetSpacing();
160 for (Int_t i = 0; i < nv; i++) {
162 TVector2* vv = r->GetVertex(nv - 1 - i);
164 AliError(Form("Failed to get vertex # %d", nv - 1 - i));
171 // Shape of actual sensor
172 TGeoXtru* sensorShape = new TGeoXtru(2);
173 sensorShape->DefinePolygon(nv, xs.fArray, ys.fArray);
174 sensorShape->DefineSection(0, - siThick/2);
175 sensorShape->DefineSection(1, siThick/2);
176 TGeoVolume* sensorVolume = new TGeoVolume(Form(fgkSensorName, id),
178 sensorVolume->VisibleDaughters(kFALSE);
179 Int_t sid = sensorVolume->GetNumber();
189 // Virtual volume shape to divide - This volume is only defined if
190 // the geometry is set to be detailed.
191 TGeoTubeSeg* activeShape = new TGeoTubeSeg(rmin, rmax, siThick/2,
193 TGeoVolume* activeVolume = new TGeoVolume(Form(fgkActiveName, id),
195 TGeoVolume* sectorVolume = activeVolume->Divide(Form(fgkSectorName,id),
196 2, 2, -theta,0,0,"N");
197 TGeoVolume* stripVolume = sectorVolume->Divide(Form(fgkStripName, id),
198 1, ns, stripoff, dstrip,
200 sid = stripVolume->GetNumber();
201 sensorVolume->AddNodeOverlap(activeVolume, 0);
205 case 'i': case 'I': fActiveId[0] = sid; break;
206 case 'o': case 'O': fActiveId[1] = sid; break;
209 // Shape of Printed circuit Board
210 for (Int_t i = 0; i < nv / 2; i++) ys[i] -= off;
211 for (Int_t i = nv / 2; i < nv; i++) ys[i] += off;
212 TGeoXtru* pcbShape = new TGeoXtru(2);
213 pcbShape->DefinePolygon(nv, xs.fArray, ys.fArray);
214 pcbShape->DefineSection(0, - pcbThick/2);
215 pcbShape->DefineSection(1, pcbThick/2);
216 TGeoVolume* pcbVolume = new TGeoVolume(Form(fgkPCBName, id),
220 TGeoXtru* cuShape = new TGeoXtru(2);
221 cuShape->DefinePolygon(6, xs.fArray, ys.fArray);
222 cuShape->DefineSection(0, - cuThick/2);
223 cuShape->DefineSection(1, cuThick/2);
224 TGeoVolume* cuVolume = new TGeoVolume(Form(fgkCuName,id),cuShape,fCopper);
227 TGeoXtru* chipShape = new TGeoXtru(2);
228 chipShape->DefinePolygon(6, xs.fArray, ys.fArray);
229 chipShape->DefineSection(0, - chipThick/2);
230 chipShape->DefineSection(1, chipThick/2);
231 TGeoVolume* chipVolume = new TGeoVolume(Form(fgkChipName,id),
235 TGeoTube* shortLegShape = new TGeoTube(0, legr, legl / 2);
236 TGeoVolume* shortLegVolume = new TGeoVolume(Form(fgkShortLegName, id),
237 shortLegShape, fPlastic);
240 TGeoTube* longLegShape = new TGeoTube(0, legr, (legl + modSpace) / 2);
241 TGeoVolume* longLegVolume = new TGeoVolume(Form(fgkLongLegName, id),
242 longLegShape, fPlastic);
245 // Back container volume
246 TGeoVolume* backVolume = new TGeoVolumeAssembly(Form(fgkBackVName, id));
249 Double_t z = pcbThick / 2;
250 backVolume->AddNode(pcbVolume, 0, new TGeoTranslation(x,y,z));
251 z += (pcbThick + cuThick) / 2;
252 backVolume->AddNode(cuVolume, 0, new TGeoTranslation(0, 0, z));
253 z += (cuThick + chipThick) / 2;
254 backVolume->AddNode(chipVolume, 0, new TGeoTranslation(0, 0, z));
255 x = a->X() + legoff + legr;
257 z += pcbThick / 2 + legl / 2;
258 backVolume->AddNode(shortLegVolume, 0, new TGeoTranslation(x,y,z));
260 y = c->Y() - legoff - legr - off;
261 backVolume->AddNode(shortLegVolume, 1, new TGeoTranslation(x,y,z));
263 backVolume->AddNode(shortLegVolume, 2, new TGeoTranslation(x,y,z));
265 // Front container volume
266 TGeoVolume* frontVolume = new TGeoVolumeAssembly(Form(fgkFrontVName, id));
270 frontVolume->AddNode(pcbVolume, 1, new TGeoTranslation(x,y,z));
271 z += (pcbThick + cuThick) / 2;
272 frontVolume->AddNode(cuVolume, 0, new TGeoTranslation(0, 0, z));
273 z += (cuThick + chipThick) / 2;
274 frontVolume->AddNode(chipVolume, 0, new TGeoTranslation(0, 0, z));
275 x = a->X() + legoff + legr;
277 z += pcbThick / 2 + (legl + modSpace)/ 2;
278 frontVolume->AddNode(longLegVolume, 0, new TGeoTranslation(x,y,z));
280 y = c->Y() - legoff - legr - off;
281 frontVolume->AddNode(longLegVolume, 1, new TGeoTranslation(x,y,z));
283 frontVolume->AddNode(longLegVolume, 2, new TGeoTranslation(x,y,z));
285 // Half ring mother volumes.
286 TGeoVolume* ringTopVolume = new TGeoVolumeAssembly(Form(fgkRingTopName,id));
287 TGeoVolume* ringBotVolume = new TGeoVolumeAssembly(Form(fgkRingBotName,id));
288 TGeoVolume* halfRing = ringTopVolume;
290 // Adding modules to half-rings
291 Int_t nmod = r->GetNModules();
292 AliDebug(10, Form("making %d modules in ring %c", nmod, id));
293 for (Int_t i = 0; i < nmod; i++) {
294 if (i == nmod / 2) halfRing = ringBotVolume;
295 Bool_t front = (i % 2 == 0);
296 Double_t z1 = siThick / 2 + (i % 2) * modSpace;
297 Double_t z2 = z1 + siThick / 2 + space;
298 Double_t th = (2 * i + 1) * theta;
299 TGeoVolume* vol = (front ? frontVolume : backVolume);
300 AliDebug(20, Form("Placing copy %d of %s and %s in %s at z=%f and %f, "
301 "and theta=%f", i, sensorVolume->GetName(),
302 vol->GetName(), halfRing->GetName(), z1, z2, th));
303 TGeoMatrix* mat1 = new TGeoCombiTrans(0,0,z1,0);
305 halfRing->AddNode(sensorVolume, i, mat1);
306 TGeoMatrix* mat2 = new TGeoCombiTrans(0,0,z2,0);
308 halfRing->AddNode(vol, i, mat2);
314 //____________________________________________________________________
316 AliFMDGeometryBuilder::DetectorGeometry(AliFMDDetector* d,
317 TGeoVolume* topMother,
318 TGeoVolume* botMother,
320 TGeoVolume* innerTop,
321 TGeoVolume* innerBot,
322 TGeoVolume* outerTop,
323 TGeoVolume* outerBot)
325 // Common stuff for setting up the FMD1, FMD2, and FMD3 geometries.
326 // This includes putting the Honeycomb support plates and the rings
327 // into the mother volumes.
330 // d The detector geometry to use
331 // mother The mother volume of the detector
332 // zmother The midpoint in global coordinates of detector vol.
333 // inner Pointer to inner ring volume
334 // outer Pointer to outer ring volume
337 // Pointer to mother (detector volume)
340 // Loop over the defined rings
341 for (int i = 0; i < 2; i++) {
346 TGeoVolume* tvol = 0;
347 TGeoVolume* bvol = 0;
351 lowr = d->GetInnerHoneyLowR();
352 highr = d->GetInnerHoneyHighR();
359 lowr = d->GetOuterHoneyLowR();
360 highr = d->GetOuterHoneyHighR();
367 Char_t c = r->GetId();
368 Int_t id = d->GetId();
369 Double_t hcThick = d->GetHoneycombThickness();
370 Double_t alThick = d->GetAlThickness();
371 Double_t z = TMath::Abs(rz - zMother);
373 // Place ring in mother volume
374 // TGeoMatrix*matrix=new TGeoTranslation(Form("FMD%d%c trans",id,c),0,0,0);
375 AliDebug(5, Form("Placing volumes %s and %s in %s and %s at z=%f",
376 tvol->GetName(), bvol->GetName(),
377 topMother->GetName(), botMother->GetName(), z));
378 topMother->AddNode(tvol, Int_t(c), new TGeoTranslation(0,0,z));
379 botMother->AddNode(bvol, Int_t(c), new TGeoTranslation(0,0,z));
382 TGeoTubeSeg* hcSha = new TGeoTubeSeg(lowr, highr, hcThick/2, 0, 180);
383 TGeoVolume* hcVol = new TGeoVolume(Form(fgkHCName,id,c),hcSha,fAl);
384 // Air in top of honeycomb
385 TGeoTubeSeg* ihcSha = new TGeoTubeSeg(lowr+alThick, highr - alThick,
386 (hcThick-alThick)/2, 0, 180);
387 TGeoVolume* ihcVol = new TGeoVolume(Form(fgkIHCName,id,c),ihcSha,fAir);
388 hcVol->AddNode(ihcVol, 0);
389 hcVol->VisibleDaughters(kFALSE);
390 hcVol->SetVisibility(kTRUE);
392 z += (r->GetSiThickness() +
394 r->GetPrintboardThickness() +
395 r->GetCopperThickness() +
396 r->GetChipThickness() +
397 r->GetModuleSpacing() +
401 AliDebug(15, Form("Placing a copy of %s in %s and %s at z=%f",
402 hcVol->GetName(), topMother->GetName(),
403 botMother->GetName(), z));
405 topMother->AddNode(hcVol, 0, new TGeoTranslation(0, 0, z));
408 TGeoMatrix* bhcMatrix = new TGeoCombiTrans(0,0,z,0);
409 bhcMatrix->RotateZ(180);
410 botMother->AddNode(hcVol, 1, bhcMatrix);
415 //____________________________________________________________________
417 AliFMDGeometryBuilder::FMD1Geometry(AliFMD1* fmd1,
418 TGeoVolume* innerTop,
419 TGeoVolume* innerBot)
421 // Setup the FMD1 geometry. The FMD1 only has one ring, and no
422 // special support as it is at the momement.
424 // See also AliFMDGeometryBuilder::DetectorGeometry
426 if (!fmd1 || !innerTop || !innerBot) return 0;
427 Double_t z = fmd1->GetInnerZ();
428 TGeoVolume* fmd1TopVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
429 fmd1->GetId(), 'T'));
430 TGeoVolume* fmd1BotVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
431 fmd1->GetId(), 'B'));
433 // Basic detector geometry
434 DetectorGeometry(fmd1, fmd1TopVolume, fmd1BotVolume, z,
435 innerTop, innerBot, 0, 0);
437 // Must add this after filling the assembly.
438 TGeoVolume* top = gGeoManager->GetVolume("ALIC");
439 TGeoMatrix* matrix = new TGeoTranslation("FMD1 trans", 0, 0, z);
440 AliDebug(5, Form("Placing volumes %s and %s in ALIC at z=%f",
441 fmd1TopVolume->GetName(), fmd1BotVolume->GetName(), z));
442 top->AddNode(fmd1TopVolume, fmd1->GetId(), matrix);
443 top->AddNode(fmd1BotVolume, fmd1->GetId(), matrix);
448 //____________________________________________________________________
450 AliFMDGeometryBuilder::FMD2Geometry(AliFMD2* fmd2,
451 TGeoVolume* innerTop,
452 TGeoVolume* innerBot,
453 TGeoVolume* outerTop,
454 TGeoVolume* outerBot)
456 // Setup the FMD2 geometry. The FMD2 has no
457 // special support as it is at the momement.
459 // See also AliFMDGeometryBuilder::DetectorGeometry
461 if (!fmd2 || !innerTop || !innerBot || !outerTop || !outerBot) return 0;
462 Double_t z = fmd2->GetOuterZ();
463 TGeoVolume* fmd2TopVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
464 fmd2->GetId(), 'T'));
465 TGeoVolume* fmd2BotVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
466 fmd2->GetId(), 'B'));
468 DetectorGeometry(fmd2, fmd2TopVolume, fmd2BotVolume, z,
469 innerTop, innerBot, outerTop, outerBot);
471 // Must be done after filling the assemblies
472 TGeoVolume* top = gGeoManager->GetVolume("ALIC");
473 TGeoMatrix* matrix = new TGeoTranslation("FMD2 trans", 0, 0, z);
474 AliDebug(5, Form("Placing volumes %s and %s in ALIC at z=%f",
475 fmd2TopVolume->GetName(), fmd2BotVolume->GetName(), z));
476 top->AddNode(fmd2TopVolume, fmd2->GetId(), matrix);
477 top->AddNode(fmd2BotVolume, fmd2->GetId(), matrix);
482 //____________________________________________________________________
484 AliFMDGeometryBuilder::FMD3Geometry(AliFMD3* fmd3,
485 TGeoVolume* innerTop,
486 TGeoVolume* innerBot,
487 TGeoVolume* outerTop,
488 TGeoVolume* outerBot)
490 // Setup the FMD3 geometry. The FMD2 has a rather elaborate support
491 // structure, as the support will also support the vacuum
494 // See also AliFMDGeometryBuilder::DetectorGeometry
496 if (!fmd3 || !innerTop || !innerBot || !outerTop || !outerBot) return 0;
497 Double_t nlen = fmd3->GetNoseLength();
498 Double_t nz = fmd3->GetNoseZ();
499 Double_t noser1 = fmd3->GetNoseLowR();
500 Double_t noser2 = fmd3->GetNoseHighR();
501 Double_t conel = fmd3->GetConeLength();
502 Double_t backl = fmd3->GetBackLength();
503 Double_t backr1 = fmd3->GetBackLowR();
504 Double_t backr2 = fmd3->GetBackHighR();
505 Double_t zdist = conel - backl - nlen;
506 Double_t tdist = backr2 - noser2;
507 Double_t beaml = TMath::Sqrt(zdist * zdist + tdist * tdist);
508 Double_t theta = -180. * TMath::ATan2(tdist, zdist) / TMath::Pi();
509 Double_t flanger = fmd3->GetFlangeR();
510 Double_t z = fmd3->GetInnerZ(); // fmd3->GetZ();
513 TGeoVolume* fmd3TopVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
514 fmd3->GetId(), 'T'));
515 TGeoVolume* fmd3BotVolume = new TGeoVolumeAssembly(Form(fgkFMDName,
516 fmd3->GetId(), 'B'));
519 DetectorGeometry(fmd3, fmd3TopVolume, fmd3BotVolume, z,
520 innerTop, innerBot, outerTop, outerBot);
524 TGeoTubeSeg* noseShape = new TGeoTubeSeg(noser1, noser2, nlen / 2, 0, 180);
525 TGeoVolume* noseVolume = new TGeoVolume(fgkNoseName, noseShape, fC);
526 zi = -nz + nlen / 2 + z;
528 fmd3TopVolume->AddNode(noseVolume, 0, new TGeoTranslation(0, 0, zi));
529 TGeoMatrix* nmatrix = new TGeoCombiTrans(0, 0, zi, 0);
530 nmatrix->RotateZ(180);
531 fmd3BotVolume->AddNode(noseVolume, 1, nmatrix);
534 TGeoTubeSeg* backShape = new TGeoTubeSeg(backr1, backr2, backl / 2, 0, 180);
535 TGeoVolume* backVolume = new TGeoVolume(fgkBackName, backShape, fC);
536 zi = -nz + conel - backl / 2 + z;
537 fmd3TopVolume->AddNode(backVolume, 0, new TGeoTranslation(0, 0, zi));
538 TGeoMatrix* bmatrix = new TGeoCombiTrans(0, 0, zi, 0);
539 bmatrix->RotateZ(180);
540 fmd3BotVolume->AddNode(backVolume, 1, bmatrix);
546 TGeoBBox* flangeShape = new TGeoBBox((flanger - backr2) / 2,
547 fmd3->GetBeamWidth() / 2,
549 TGeoVolume* flangeVolume = new TGeoVolume(fgkFlangeName, flangeShape, fC);
550 n = fmd3->GetNFlange();
551 r = backr2 + (flanger - backr2) / 2;
552 TGeoVolume* mother = fmd3TopVolume;
553 for (Int_t i = 0; i < n; i++) {
554 if (i >= n / 2) mother = fmd3BotVolume;
555 Double_t phi = 360. / n * i + 180. / n;
556 Double_t x = r * TMath::Cos(TMath::Pi() / 180 * phi);
557 Double_t y = r * TMath::Sin(TMath::Pi() / 180 * phi);
558 AliDebug(15, Form("Placing flange %d in %s at (%f,%f,%f) r=%f, phi=%f",
559 i, mother->GetName(), x, y, zi, r, phi));
560 TGeoRotation* rot = new TGeoRotation;
562 TGeoMatrix* matrix = new TGeoCombiTrans(x, y, zi, rot);
563 mother->AddNode(flangeVolume, i, matrix);
567 TGeoBBox* beamShape = new TGeoBBox(fmd3->GetBeamThickness() / 2,
568 fmd3->GetBeamWidth() / 2 - .1,
570 TGeoVolume* beamVolume = new TGeoVolume(fgkBeamName, beamShape, fC);
571 n = fmd3->GetNBeam();
572 r = noser2 + tdist / 2;
573 zi = - nz + nlen + zdist / 2 + z;
574 mother = fmd3TopVolume;
575 for (Int_t i = 0; i < n; i++) {
576 if (i >= n / 2) mother = fmd3BotVolume;
577 Double_t phi = 360. / n * i;
578 Double_t x = r * TMath::Cos(TMath::Pi() / 180 * phi);
579 Double_t y = r * TMath::Sin(TMath::Pi() / 180 * phi);
580 TGeoRotation* rot = new TGeoRotation(Form("FMD3 beam rotation %d", i));
581 // Order is important
582 rot->RotateY(-theta);
584 TGeoMatrix* matrix = new TGeoCombiTrans(Form("FMD3 beam trans %d", i),
586 mother->AddNode(beamVolume, i, matrix);
589 z = fmd3->GetInnerZ();
590 TGeoRotation* rot = new TGeoRotation("FMD3 rotatation");
592 TGeoVolume* top = gGeoManager->GetVolume("ALIC");
593 TGeoMatrix* mmatrix = new TGeoCombiTrans("FMD3 trans", 0, 0, z, rot);
594 AliDebug(5, Form("Placing volumes %s and %s in ALIC at z=%f",
595 fmd3TopVolume->GetName(), fmd3BotVolume->GetName(), z));
596 top->AddNode(fmd3TopVolume, fmd3->GetId(), mmatrix);
597 top->AddNode(fmd3BotVolume, fmd3->GetId(), mmatrix);
602 //____________________________________________________________________
604 AliFMDGeometryBuilder::Exec(Option_t*)
606 // Setup up the FMD geometry.
607 AliDebug(1, Form("\tGeometry options: %s",
608 (fDetailed ? "divided into strips" : "one volume")));
610 AliFatal("No TGeoManager defined");
614 fSi = gGeoManager->GetMedium("FMD_Si$");
615 fC = gGeoManager->GetMedium("FMD_Carbon$");
616 fAl = gGeoManager->GetMedium("FMD_Aluminum$");
617 fChip = gGeoManager->GetMedium("FMD_Si Chip$");
618 fAir = gGeoManager->GetMedium("FMD_Air$");
619 fPCB = gGeoManager->GetMedium("FMD_PCB$");
620 fPlastic = gGeoManager->GetMedium("FMD_Plastic$");
621 fCopper = gGeoManager->GetMedium("FMD_Copper$");
623 if (!fSi||!fC||!fAl||!fChip||!fAir||!fPCB||!fPlastic||!fCopper) {
624 AliError("Failed to get some or all tracking mediums");
627 AliFMDGeometry* fmd = AliFMDGeometry::Instance();
628 AliFMDRing* inner = fmd->GetInner();
629 AliFMDRing* outer = fmd->GetOuter();
632 TGeoVolume* innerTop = gGeoManager->GetVolume(Form(fgkRingTopName,
634 TGeoVolume* innerBot = gGeoManager->GetVolume(Form(fgkRingBotName,
636 TGeoVolume* outerTop = gGeoManager->GetVolume(Form(fgkRingTopName,
638 TGeoVolume* outerBot = gGeoManager->GetVolume(Form(fgkRingBotName,
641 FMD1Geometry(fmd->GetFMD1(), innerTop, innerBot);
642 FMD2Geometry(fmd->GetFMD2(), innerTop, innerBot, outerTop, outerBot);
643 FMD3Geometry(fmd->GetFMD3(), innerTop, innerBot, outerTop, outerBot);
645 fmd->SetSectorOff(fSectorOff);
646 fmd->SetModuleOff(fModuleOff);
647 fmd->SetRingOff(fRingOff);
648 fmd->SetDetectorOff(fDetectorOff);
649 fmd->SetActive(fActiveId.fArray, fActiveId.fN);
651 // fmd->ExtractGeomInfo();
656 //____________________________________________________________________