Project
Loading...
Searching...
No Matches
PCBSupport.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
16
17#include "MFTBase/Constants.h"
18#include "MFTBase/PCBSupport.h"
19#include "MFTBase/Geometry.h"
20
21using namespace o2::mft;
22
26
27 //_____________________________________________________________________________
28 PCBSupport::PCBSupport() : mHalfDisk(nullptr),
29 mDiskGap(1.4),
30 mPCBRad{17.5, 17.5, 17.5, 23.0, 23.0},
31 mCuThickness(0.0124),
32 mFR4Thickness(.113),
33 mPhi0(0.),
34 mPhi1(180.),
35 mT_delta(0.01)
36//mOuterCut{15.5,15.5,16.9,20.5,21.9}
37{
38
39 initParameters();
40}
41
42//_____________________________________________________________________________
43TGeoVolumeAssembly* PCBSupport::create(Int_t half, Int_t disk)
44{
45
46 //Info("Create", Form("Creating PCB_H%d_D%d", half, disk), 0, 0);
47 mHalfDisk = new TGeoVolumeAssembly(Form("PCB_H%d_D%d", half, disk));
48 // auto *PCB = new TGeoVolumeAssembly(Form("PCB_VA_H%d_D%d",half,disk));
49 auto* PCBCu = new TGeoTubeSeg(Form("PCBCu_H%d_D%d", half, disk), 0, mPCBRad[disk], mCuThickness / 2., mPhi0, mPhi1);
50 auto* PCBFR4 = new TGeoTubeSeg(Form("PCBFR4_H%d_D%d", half, disk), 0, mPCBRad[disk], mFR4Thickness / 2., mPhi0, mPhi1);
51
52 // Cutting boxes
53 //Info("Create",Form("Cutting Boxes PCB_H%d_D%d", half,disk),0,0);
54 for (auto cut = 0; cut < mNumberOfBoxCuts[disk]; cut++) {
55 auto* boxName = Form("PCBBoxCut_%d_H%d_D%d", cut, half, disk);
56 auto* boxCSName = Form("PCBBoxCS_%d_H%d_D%d", cut, half, disk);
57 mSomeBox = new TGeoBBox(boxName, mBoxCuts[disk][cut][0] / 2. + 2 * mT_delta, mBoxCuts[disk][cut][1] / 2. + 2 * mT_delta, mFR4Thickness + mT_delta);
58 mSomeTranslation = new TGeoTranslation(mBoxCuts[disk][cut][2], mBoxCuts[disk][cut][3], 0.);
59 //The first subtraction needs a shape, the base tube
60 if (cut == 0) {
61 mSomeSubtraction = new TGeoSubtraction(PCBCu, mSomeBox, nullptr, mSomeTranslation);
62 } else {
63 mSomeSubtraction = new TGeoSubtraction(mPCBCu, mSomeBox, nullptr, mSomeTranslation);
64 }
65 mPCBCu = new TGeoCompositeShape(boxCSName, mSomeSubtraction);
66
67 if (cut == 0) {
68 mSomeSubtraction = new TGeoSubtraction(PCBFR4, mSomeBox, nullptr, mSomeTranslation);
69 } else {
70 mSomeSubtraction = new TGeoSubtraction(mPCBFR4, mSomeBox, nullptr, mSomeTranslation);
71 }
72 mPCBFR4 = new TGeoCompositeShape(boxCSName, mSomeSubtraction);
73 }
74
75 //Info("Create",Form("Cutting Boxes PCB_H%d_D%d", half,disk),0,0);
76 if (mNumberOfBoxAdd[disk] != 0) {
77 for (auto iBox = 0; iBox < mNumberOfBoxAdd[disk]; iBox++) {
78 auto* boxName = Form("PCBBoxAdd_%d_H%d_D%d", iBox, half, disk);
79 auto* boxCSName = Form("PCBBoxAddCS_%d_H%d_D%d", iBox, half, disk);
80 mSomeBox = new TGeoBBox(boxName, mBoxAdd[disk][iBox][0] / 2., mBoxAdd[disk][iBox][1] / 2., mFR4Thickness / 2.);
81 mSomeTranslation = new TGeoTranslation(mBoxAdd[disk][iBox][2], mBoxAdd[disk][iBox][3], 0.);
82 mSomeUnion = new TGeoUnion(mPCBFR4, mSomeBox, nullptr, mSomeTranslation);
83 mPCBFR4 = new TGeoCompositeShape(boxCSName, mSomeUnion);
84 mSomeBox = new TGeoBBox(boxName, mBoxAdd[disk][iBox][0] / 2., mBoxAdd[disk][iBox][1] / 2., mCuThickness / 2.);
85 mSomeUnion = new TGeoUnion(mPCBCu, mSomeBox, nullptr, mSomeTranslation);
86 mPCBCu = new TGeoCompositeShape(boxCSName, mSomeUnion);
87 }
88 }
89
90 // ================= Holes ==================
91
92 // Digging Holes
93 //Info("Create",Form("Cutting holes PCB_H%d_D%d", half,disk),0,0);
94 for (auto iHole = 0; iHole < mNumberOfHoles[disk]; iHole++) {
95 auto* tubeName = Form("PCBHole_%d_H%d_D%d", iHole, half, disk);
96 auto* tubeCSName = Form("PCBHoleCS_%d_H%d_D%d", iHole, half, disk);
97 mSomeTube = new TGeoTube(tubeName, 0, mHoles[disk][iHole][0] / 2.0, mFR4Thickness + 10 * mT_delta); // TODO: Adjust thickness
98 mSomeTranslation = new TGeoTranslation(mHoles[disk][iHole][1], mHoles[disk][iHole][2], 0.);
99 mSomeSubtraction = new TGeoSubtraction(mPCBCu, mSomeTube, nullptr, mSomeTranslation);
100 mPCBCu = new TGeoCompositeShape(tubeCSName, mSomeSubtraction);
101 mSomeSubtraction = new TGeoSubtraction(mPCBFR4, mSomeTube, nullptr, mSomeTranslation);
102 mPCBFR4 = new TGeoCompositeShape(tubeCSName, mSomeSubtraction);
103 }
104
105 // ======= Prepare PCB volume and add to HalfDisk =========
106
107 auto* PCB_Cu_vol = new TGeoVolume(Form("PCBCu_H%d_D%d", half, disk), mPCBCu, mPCBMediumCu);
108 auto* PCB_FR4_vol = new TGeoVolume(Form("PCBFR4_H%d_D%d", half, disk), mPCBFR4, mPCBMediumFR4);
109 // auto *tr1 = new TGeoTranslation(0., 0., 10.);
110 auto* rot1 = new TGeoRotation("rot", 180, 0, 0);
111 auto* rot2 = new TGeoRotation("rot", 180., 180., 180.);
112 auto* tr_rot1_Cu = new TGeoCombiTrans(0., 0., 0.4 + mFR4Thickness + mCuThickness / 2., rot1);
113 auto* tr_rot1_FR4 = new TGeoCombiTrans(0., 0., 0.4 + mFR4Thickness / 2., rot1);
114 auto* tr_rot2_Cu = new TGeoCombiTrans(0., 0., -(0.4 + mFR4Thickness + mCuThickness / 2.), rot2);
115 auto* tr_rot2_FR4 = new TGeoCombiTrans(0., 0., -(0.4 + mFR4Thickness / 2.), rot2);
116 mHalfDisk->AddNode(PCB_Cu_vol, 0, tr_rot1_Cu);
117 mHalfDisk->AddNode(PCB_FR4_vol, 0, tr_rot1_FR4);
118 mHalfDisk->AddNode(PCB_Cu_vol, 0, tr_rot2_Cu);
119 mHalfDisk->AddNode(PCB_FR4_vol, 0, tr_rot2_FR4);
120 return mHalfDisk;
121}
122
123//_____________________________________________________________________________
124void PCBSupport::initParameters()
125{
126
127 mPCBMediumCu = gGeoManager->GetMedium("MFT_Cu$");
128 mPCBMediumFR4 = gGeoManager->GetMedium("MFT_FR4$");
129
130 // # PCB parametrization =====
131 // ================================================
132 // ## Cut boxes (squares)
133 // ### PCB 00
134 mNumberOfBoxCuts[0] = 10;
135 // Cut boxes {Width, Height, x_center, y_center}
136 mBoxCuts[00] = new Double_t[mNumberOfBoxCuts[0]][4]{
137 {35.0, 8.91, 0., 4.455},
138 {15.9, 0.49, 0., 9.155},
139 {15.0, 2.52, 0.25, 10.66},
140 {4.8, 2.1, 0.25, 12.97},
141 {8.445, 1.4, 0., 16.8},
142 {4.2775, 2., -6.36125, 16.5},
143 {4.2775, 2., 6.36125, 16.5},
144 {1.0, 1.0, -15.2, 9.41},
145 {1.0, 1.0, 15.2, 9.41},
146 {0.3, 0.3, -14.0, 9.5}};
147
148 // ### PCB 01
149 mNumberOfBoxCuts[1] = mNumberOfBoxCuts[0];
150 mBoxCuts[01] = mBoxCuts[00];
151
152 // ### PCB 02
153 mNumberOfBoxCuts[2] = 9;
154 mBoxCuts[02] = new Double_t[mNumberOfBoxCuts[2]][4]{
155 {35, 8.91, 0.0, 4.455},
156 {19.4, 0.49, 0.0, 9.155},
157 {18.4, 2.52, .25, 10.66},
158 {12.6, 0.48, 0.0, 12.16},
159 {11.6, 1.62, 0.25, 13.21},
160 {3.1, 0.91, 4.5, 14.475},
161 {3.1, 0.91, -4.0, 14.475},
162 {0.5, 0.69, 14.95, 9.255},
163 {0.5, 0.69, -14.95, 9.255}};
164
165 // ### PCB 03
166 mNumberOfBoxCuts[3] = 14;
167 mBoxCuts[03] = new Double_t[mNumberOfBoxCuts[3]][4]{
168 {46, 5.0, 0, 2.5},
169 {32, 5.0, 0, 7.5},
170 {26.9, 1.92, -0.6, 10.96},
171 {19.4, 0.48, 0, 12.16},
172 {18.4, 2.53, 0.25, 13.665},
173 {8.2, 1.8, 0.25, 15.83},
174 {4.8, 1.4, 0.25, 17.43},
175 {1.7, 0.46, -3, 16.96},
176 {1.6, 0.6, 9.8, 20.8},
177 {1.6, 0.6, -9.8, 20.8},
178 {18.0, 1.9, 0, 22.05},
179 {1.0, 2, 22.5, 6},
180 {1.0, 2, -22.5, 6},
181 {0.4, 0.3, -19.5, 10}};
182
183 // ### PCB 04
184 mNumberOfBoxCuts[4] = 14;
185 mBoxCuts[04] = new Double_t[mNumberOfBoxCuts[4]][4]{
186 {46.0, 5.0, 0.0, 2.5},
187 {33.0, 5.0, 0.0, 7.5},
188 {28.55, 1.92, .225, 10.96},
189 {22.8, 0.48, 0.0, 12.16},
190 {21.8, 2.53, 0.25, 13.665},
191 {16.0, 0.42, 0.0, 15.14},
192 {15.0, 2.01, 0.25, 16.355},
193 {3.1, 0.58, 6.2, 17.65},
194 {4.8, 1.17, 0.25, 17.945},
195 {5.1, 0.58, -4.7, 17.65},
196 {9.8, 0.5, 0.0, 22.75},
197 {1.0, 1.8, 22.5, 5.9},
198 {1.0, 1.8, -22.5, 5.9},
199 {0.4, 0.3, -19.5, 10}};
200
201 // ## Add boxes (squares)
202 // Add boxes {Width, Height, x_center, y_center}
203 // ### PCB 00
204 mNumberOfBoxAdd[0] = 0;
205 mBoxAdd[00] = nullptr;
206
207 // ### PCB 01
208 mNumberOfBoxAdd[1] = mNumberOfBoxAdd[0];
209 mBoxAdd[01] = mBoxAdd[00];
210
211 // ### PCB 02
212 mNumberOfBoxAdd[2] = 4;
213 mBoxAdd[02] = new Double_t[mNumberOfBoxAdd[2]][4]{
214 {1.51, 2.59, 13.945, 10.205},
215 {1.51, 2.59, -13.945, 10.205},
216 {13.5, 0.9, 0.0, 16.45},
217 {10.2, 0.6, 0.0, 17.2}};
218
219 // ### PCB 03
220 mNumberOfBoxAdd[3] = 0;
221 mBoxAdd[03] = nullptr;
222
223 // ### PCB 04
224 mNumberOfBoxAdd[4] = 1;
225 mBoxAdd[04] = new Double_t[mNumberOfBoxAdd[4]][4]{
226 {22, 2.339, 0.0, 21.3305}};
227
228 // Holes {Radius, x_center, y_center}
229 // ### PCB 00
230 mNumberOfHoles[0] = 7;
231 mHoles[00] = new Double_t[mNumberOfHoles[0]][3]{
232 {.3, 14.0, 9.5},
233 {.3, -13.85, 9.5},
234 {.3, -14.15, 9.5},
235 {1., -11.0, 11.5},
236 {1., 11.0, 11.5},
237 {.35, -9.0, 11.5},
238 {.35, 9.0, 11.5}};
239
240 // ### PCB 01
241 mNumberOfHoles[1] = mNumberOfHoles[0];
242 mHoles[01] = mHoles[00];
243
244 // ### PCB 02
245 mNumberOfHoles[2] = 7;
246 mHoles[02] = new Double_t[mNumberOfHoles[2]][3]{
247 {.35, 12.5, 11.5},
248 {.35, -12.5, 11.5},
249 {1.0, -11.0, 11.5},
250 {1.0, 11.0, 11.5},
251 {0.3, 7.5, 14.5},
252 {0.3, -7.5, 14.5},
253 {0.3, -7.35, 14.5}};
254
255 // ### PCB 03
256 mNumberOfHoles[3] = 13;
257 mHoles[03] = new Double_t[mNumberOfHoles[3]][3]{
258 {0.3, 19.5, 10.0},
259 {0.3, -19.7, 10.0},
260 {0.3, -19.3, 10.0},
261 {0.35, 16.5, 10.0},
262 {0.35, -16.5, 10.0},
263 {0.35, 6.0, 18.0},
264 {0.35, -6.0, 18.0},
265 {1.0, 10.0, 19.0},
266 {1.0, -10.0, 19.0},
267 {.424, 7.899, 20.415},
268 {.424, -7.899, 20.415},
269 {.424, 0.5, 20.415},
270 {.424, -0.5, 20.415}};
271
272 // ### PCB 04
273 mNumberOfHoles[4] = 15;
274 mHoles[04] = new Double_t[mNumberOfHoles[4]][3]{
275 {0.3, 19.5, 10},
276 {0.3, -19.7, 10},
277 {0.3, -19.3, 10},
278 {0.35, 17, 10},
279 {0.35, -17, 10},
280 {0.35, 9, 17.5},
281 {0.35, -9, 17.5},
282 {1, 10, 19},
283 {1, -10, 19},
284 {0.424, 10.098, 21.815},
285 {0.424, -10.098, 21.815},
286 {0.424, 2.699, 21.815},
287 {0.424, -2.699, 21.815},
288 {0.424, 1.699, 21.815},
289 {0.424, -1.699, 21.815}};
290}
Constants for the MFT; distance unit is cm.
Class handling both virtual segmentation and real volumes.
ClassImp(IdPath)
Class describing geometry of one MFT half-disk PCBsupport.
TGeoVolumeAssembly * create(Int_t kHalf, Int_t disk)