14#include <TGeoManager.h>
17#include <TGeoCompositeShape.h>
18#include <TGeoMedium.h>
19#include <TGeoVolume.h>
20#include <TGeoMatrix.h>
29 mGeometryType = initType;
35 this->mGeometryType = geom.mGeometryType;
38void Geometry::buildGeometry()
41 LOG(info) <<
"Geometry::buildGeometry()::Volume name = FDD";
46 TGeoRotation* Rx180 =
new TGeoRotation(
"Rx180", 0., 180., 0.);
47 TGeoRotation* Rz180 =
new TGeoRotation(
"Rz180", 180., 0., 0.);
48 TGeoRotation* Ry180 =
new TGeoRotation(
"Ry180", 180., 180., 0.);
53 const Double_t kZbegFrontBar = 1949.1;
56 TGeoMedium* medFDASci = gGeoManager->GetMedium(
"FDD_BC420");
58 TGeoMedium* medFDCSci = gGeoManager->GetMedium(
"FDD_BC420");
61 const Double_t kFDACellSideY = 21.6;
62 const Double_t kFDACellSideX = 18.1;
64 const Double_t kFDCCellSideY = 21.6;
65 const Double_t kFDCCellSideX = 18.1;
72 const Double_t kShiftX = 0.54;
73 const Double_t kShiftY = 0.10;
74 const Double_t kFDACelldz = 2.54;
75 const Double_t kFDCCelldz = 2.54;
76 const Double_t kFDABeamPipeR = 6.20;
77 const Double_t kFDCBeamPipeR = 3.70;
78 const Int_t kColorFDA = kGreen;
79 const Int_t kColorFDC = kGreen;
80 Double_t X = kShiftX + kFDACellSideX * 0.5;
81 Double_t Y = kShiftY + kFDACellSideY * 0.5;
82 Double_t WLS_dx = 0.4;
83 Double_t WLS_dz = 2.5;
84 Double_t WLS_SideA_Long_dy = 24.20;
85 Double_t WLS_SideC_Long_dy = 24.20;
86 Double_t WLS_SideA_Short_dy = 18.20;
87 Double_t WLS_SideC_Short_dy = 20.70;
90 TGeoVolume* vFDA_WLS_s =
new TGeoVolume(
"FDAWLSshort",
new TGeoBBox(
"shFDAWLSbarShort", WLS_dx / 2.0, WLS_SideA_Short_dy / 2.0, WLS_dz / 2.0), medFDASci);
91 TGeoVolume* vFDA_WLS_l =
new TGeoVolume(
"FDAWLSlong",
new TGeoBBox(
"shFDAWLSbarLong", WLS_dx / 2.0, WLS_SideA_Long_dy / 2.0, WLS_dz / 2.0), medFDASci);
92 vFDA_WLS_l->SetLineColor(kRed);
93 vFDA_WLS_s->SetLineColor(kRed);
96 TGeoVolume* vFDC_WLS_s =
new TGeoVolume(
"FDCWLSshort",
new TGeoBBox(
"shFDCWLSbarShort", WLS_dx / 2.0, WLS_SideC_Short_dy / 2.0, WLS_dz / 2.0), medFDCSci);
97 TGeoVolume* vFDC_WLS_l =
new TGeoVolume(
"FDCWLSlong",
new TGeoBBox(
"shFDCWLSbarLong", WLS_dx / 2.0, WLS_SideC_Long_dy / 2.0, WLS_dz / 2.0), medFDCSci);
98 vFDC_WLS_l->SetLineColor(kRed);
99 vFDC_WLS_s->SetLineColor(kRed);
102 new TGeoBBox(
"shFDAbox", kFDACellSideX / 2.0, kFDACellSideY / 2.0, kFDACelldz / 2.0);
103 new TGeoTube(
"shFDAHole", 0., kFDABeamPipeR, kFDACelldz);
104 (
new TGeoTranslation(
"trFDAbox", X, Y, 0.))->RegisterYourself();
106 TGeoVolume* vFDApad =
new TGeoVolume(
"FDApad",
new TGeoCompositeShape(
"shFDApad",
"shFDAbox:trFDAbox-shFDAHole"), medFDASci);
107 vFDApad->SetLineColor(kColorFDA);
109 TGeoVolume* secFDA =
new TGeoVolumeAssembly(
"FDAsec");
111 Double_t fX_FDA_WLS_s = 0.1 + WLS_dx / 2.0;
112 Double_t fX_FDA_WLS_l = kShiftX + WLS_dx / 2.0 + kFDACellSideX + 0.04;
113 secFDA->AddNode(vFDApad, 1);
114 secFDA->AddNode(vFDA_WLS_s, 1,
new TGeoTranslation(fX_FDA_WLS_s, kFDABeamPipeR + WLS_SideA_Short_dy / 2.0, 0.0));
115 secFDA->AddNode(vFDA_WLS_l, 1,
new TGeoTranslation(fX_FDA_WLS_l, kShiftY + WLS_SideA_Long_dy / 2.0, 0.0));
118 TGeoVolume* vFDAarray =
new TGeoVolumeAssembly(
"FDA");
119 vFDAarray->AddNode(secFDA, 1);
120 vFDAarray->AddNode(secFDA, 2, Ry180);
121 vFDAarray->AddNode(secFDA, 3, Rz180);
122 vFDAarray->AddNode(secFDA, 4, Rx180);
126 new TGeoBBox(
"shFDCbox", kFDCCellSideX / 2.0, kFDCCellSideY / 2.0, kFDCCelldz / 2.0);
127 new TGeoTube(
"shFDCHole", 0., kFDCBeamPipeR, kFDCCelldz);
128 X = kShiftX + kFDCCellSideX * 0.5;
129 Y = kShiftY + kFDCCellSideY * 0.5;
130 (
new TGeoTranslation(
"trFDCbox", X, Y, 0.))->RegisterYourself();
131 TGeoVolume* vFDCpad =
new TGeoVolume(
"FDCpad",
new TGeoCompositeShape(
"shFDCpad",
"shFDCbox:trFDCbox-shFDCHole"), medFDCSci);
132 vFDCpad->SetLineColor(kColorFDC);
135 TGeoVolume* voFDC =
new TGeoVolumeAssembly(
"FDCsec");
137 voFDC->AddNode(vFDCpad, 1);
139 voFDC->AddNode(vFDC_WLS_s, 1,
new TGeoTranslation(0.1 + WLS_dx / 2.0, kFDCBeamPipeR + WLS_SideC_Short_dy / 2.0, 0.0));
141 voFDC->AddNode(vFDC_WLS_l, 1,
new TGeoTranslation(0.04 + WLS_dx / 2.0 + kFDCCellSideX + kShiftX, kShiftY + WLS_SideC_Long_dy / 2.0, 0.0));
144 TGeoVolume* vFDCarray =
new TGeoVolumeAssembly(
"FDC");
145 vFDCarray->AddNode(voFDC, 1);
146 vFDCarray->AddNode(voFDC, 2, Ry180);
147 vFDCarray->AddNode(voFDC, 3, Rz180);
148 vFDCarray->AddNode(voFDC, 4, Rx180);
151 TGeoVolume* vCaveRB24 = gGeoManager->GetVolume(
"caveRB24");
153 LOG(fatal) <<
"Could not find the top volume for A-side";
155 const Float_t kPosFDA = 1696.67 - 1313.347;
156 vCaveRB24->AddNode(vFDAarray, 1,
new TGeoTranslation(0., 0., kPosFDA - kFDACelldz / 2. - 0.1));
157 vCaveRB24->AddNode(vFDAarray, 2,
new TGeoTranslation(0., 0., kPosFDA + kFDACelldz / 2. + 0.1));
160 TGeoVolume* vCave = gGeoManager->GetVolume(
"cave");
162 LOG(fatal) <<
"Could not find the top volume for C-side";
164 const Float_t kPosFDC = -kZbegFrontBar - 2. - 3.0 - 0.3;
165 vCave->AddNode(vFDCarray, 1,
new TGeoTranslation(0., 0., kPosFDC - kFDCCelldz / 2. - 0.23));
166 vCave->AddNode(vFDCarray, 2,
new TGeoTranslation(0., 0., kPosFDC + kFDCCelldz / 2. + 0.23));
Base definition of FIT-FDD geometry.
ClassImp(o2::fdd::Geometry)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"