Project
Loading...
Searching...
No Matches
Geometry.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#include <iomanip>
12#include "FDDBase/Geometry.h"
13
14#include <TGeoManager.h>
15#include <TGeoBBox.h>
16#include <TGeoTube.h>
17#include <TGeoCompositeShape.h>
18#include <TGeoMedium.h>
19#include <TGeoVolume.h>
20#include <TGeoMatrix.h>
21#include "Framework/Logger.h"
22
24
25using namespace o2::fdd;
26//_____________________________________________________________________________
28{
29 mGeometryType = initType;
30 buildGeometry();
31}
32//_____________________________________________________________________________
34{
35 this->mGeometryType = geom.mGeometryType;
36}
37//_____________________________________________________________________________
38void Geometry::buildGeometry()
39{
40
41 LOG(info) << "Geometry::buildGeometry()::Volume name = FDD";
42
43 //Rotations used
44 //TGeoRotation* Rx90m = new TGeoRotation("Rx90m", 0., -90., 0.);
45 //TGeoRotation* Rx90 = new TGeoRotation("Rx90", 0., 90., 0.);
46 TGeoRotation* Rx180 = new TGeoRotation("Rx180", 0., 180., 0.); // 4 | 1
47 TGeoRotation* Rz180 = new TGeoRotation("Rz180", 180., 0., 0.); // ---------------> x
48 TGeoRotation* Ry180 = new TGeoRotation("Ry180", 180., 180., 0.); // 3 | 2
49 //TGeoRotation* Ry90m = new TGeoRotation("Ry90m", 90., -90., -90.);
50 //TGeoRotation* Ry90 = new TGeoRotation("Ry90", 90., 90., -90.);
51 //TGeoRotation* Rz90 = new TGeoRotation("Rz90", 90., 0., 0.);
52
53 const Double_t kZbegFrontBar = 1949.1; // Begining of Front Bar
54
55 //Medium for FDA
56 TGeoMedium* medFDASci = gGeoManager->GetMedium("FDD_BC420");
57 //Medium for FDC
58 TGeoMedium* medFDCSci = gGeoManager->GetMedium("FDD_BC420");
59
60 // FDA Scintillator Pad
61 const Double_t kFDACellSideY = 21.6;
62 const Double_t kFDACellSideX = 18.1;
63 // FDC Scintillator Pad
64 const Double_t kFDCCellSideY = 21.6;
65 const Double_t kFDCCellSideX = 18.1;
66 // WLS bar : 0.40 cm ( 4.0 mm )
67 // Wrapping : 0.20 cm ( 2.0 mm )
68 // Aluminnized Mylar: 0.01 cm ( 0.1 mm )
69 // Fishing line : 0.04 cm ( 0.4 mm )
70 // total shift on X : 0.65 cm
71 // total shift on Y : 0.21 cm
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; // Radius of beam pipe hole for FDD_A (Diameter 12.4 cm)
77 const Double_t kFDCBeamPipeR = 3.70; // Radius of beam pipe hole for FDD_C (Diameter 7.4 cm)
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; // 24.2;
85 Double_t WLS_SideC_Long_dy = 24.20; // 24.2;
86 Double_t WLS_SideA_Short_dy = 18.20; // 18.41;
87 Double_t WLS_SideC_Short_dy = 20.70; // 20.91;
88
89 // Creating FDA WLS bars
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);
94
95 // Creating FDC WLS bars
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);
100
101 // Make FDA scintillator pad
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();
105
106 TGeoVolume* vFDApad = new TGeoVolume("FDApad", new TGeoCompositeShape("shFDApad", "shFDAbox:trFDAbox-shFDAHole"), medFDASci);
107 vFDApad->SetLineColor(kColorFDA);
108
109 TGeoVolume* secFDA = new TGeoVolumeAssembly("FDAsec");
110 // Add PAD
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));
116
118 TGeoVolume* vFDAarray = new TGeoVolumeAssembly("FDA"); // ^ y
119 vFDAarray->AddNode(secFDA, 1); // |
120 vFDAarray->AddNode(secFDA, 2, Ry180); // 2 | 1
121 vFDAarray->AddNode(secFDA, 3, Rz180); // ---------------> x
122 vFDAarray->AddNode(secFDA, 4, Rx180); // 3 | 4
123
125
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);
133
135 TGeoVolume* voFDC = new TGeoVolumeAssembly("FDCsec");
136 // Add PAD
137 voFDC->AddNode(vFDCpad, 1);
138 // Add FDC WLS Short bar
139 voFDC->AddNode(vFDC_WLS_s, 1, new TGeoTranslation(0.1 + WLS_dx / 2.0, kFDCBeamPipeR + WLS_SideC_Short_dy / 2.0, 0.0));
140 // Add FDC WLS Long bar
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));
142
144 TGeoVolume* vFDCarray = new TGeoVolumeAssembly("FDC"); // ^ y
145 vFDCarray->AddNode(voFDC, 1); // |
146 vFDCarray->AddNode(voFDC, 2, Ry180); // 2 | 1
147 vFDCarray->AddNode(voFDC, 3, Rz180); // ---------------> x
148 vFDCarray->AddNode(voFDC, 4, Rx180); // 3 | 4
149 // |
150 // A side
151 TGeoVolume* vCaveRB24 = gGeoManager->GetVolume("caveRB24");
152 if (!vCaveRB24) {
153 LOG(fatal) << "Could not find the top volume for A-side";
154 }
155 const Float_t kPosFDA = 1696.67 - 1313.347; // z-center of assembly (cm)
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));
158
159 // C side
160 TGeoVolume* vCave = gGeoManager->GetVolume("cave");
161 if (!vCave) {
162 LOG(fatal) << "Could not find the top volume for C-side";
163 }
164 const Float_t kPosFDC = -kZbegFrontBar - 2. - 3.0 - 0.3; // 3.0 = (5.6 + 0.2 + 0.2)/2.;
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));
167}
Base definition of FIT-FDD geometry.
ClassImp(o2::fdd::Geometry)
FIT-FDD Geometry.
Definition Geometry.h:30
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"