16#include <TGeoManager.h>
17#include <TGeoMaterial.h>
18#include <TGeoMedium.h>
20#include <TGeoMatrix.h>
45 LOG(
debug) <<
"FT3Module: initialize_materials";
50 TGeoManager* geoManager = gGeoManager;
52 auto* itsH =
new TGeoElement(
"FT3_H",
"Hydrogen", 1, 1.00794);
53 auto* itsC =
new TGeoElement(
"FT3_C",
"Carbon", 6, 12.0107);
54 auto* itsO =
new TGeoElement(
"FT3_O",
"Oxygen", 8, 15.994);
56 siliconMat =
new TGeoMaterial(
"FT3_Silicon", 28.0855, 14, 2.33);
59 copperMat =
new TGeoMaterial(
"FT3_Copper", 63.546, 29, 8.96);
62 kaptonMat =
new TGeoMaterial(
"FT3_Kapton", 13.84, 6.88, 1.346);
66 auto* itsEpoxy =
new TGeoMixture(
"FT3_Epoxy", 3);
67 itsEpoxy->AddElement(itsC, 18);
68 itsEpoxy->AddElement(itsH, 19);
69 itsEpoxy->AddElement(itsO, 3);
70 itsEpoxy->SetDensity(2.186);
72 epoxyMed =
new TGeoMedium(
"FT3_Epoxy", 4, itsEpoxy);
75 AluminumMat =
new TGeoMaterial(
"Aluminum", 26.98, 13, 2.7);
77 LOG(
debug) <<
"FT3Module: done initialize_materials";
82 return (
x *
x < radius * radius) ? std::sqrt(radius * radius -
x *
x) : 0;
85void FT3Module::create_layout(
double mZ,
int layerNumber,
int direction,
double Rin,
double Rout,
double overlap,
const std::string&
face,
const std::string& layout_type, TGeoVolume* motherVolume)
88 LOG(
debug) <<
"FT3Module: create_layout - Layer " << layerNumber <<
", Direction " << direction <<
", Face " <<
face;
89 TGeoManager* geoManager = gGeoManager;
98 double sensor_width = 5.0;
99 double sensor_height = 9.6;
100 double inactive_width = 0.2;
101 double active_width = 4.6;
102 double active_height = 9.6;
104 double silicon_thickness = 0.01;
105 double copper_thickness = 0.006;
106 double kapton_thickness = 0.03;
107 double epoxy_thickness = 0.0012;
109 double carbonFiberThickness = 0.01;
111 double foamSpacingThickness = 0.5;
118 double z_offset = (
face ==
"front") ? -foamSpacingThickness / 2.0 - carbonFiberThickness : foamSpacingThickness / 2.0 + carbonFiberThickness;
121 if (sensor_height == 3.2 && sensor_width == 2.5) {
124 }
else if (sensor_height == 19.2 && sensor_width == 5) {
129 x_offset = sensor_width / 2;
130 y_offset = sensor_height / 2;
133 double x_condition_min = 0;
134 double x_condition_max = 0;
135 double offset_Rin_lower = 0;
136 double offset_Rin_upper = 0;
137 bool adjust_bottom_y_pos =
false;
138 bool adjust_bottom_y_neg =
false;
139 double x_adjust_bottom_y_pos = 0;
140 double bottom_y_pos_value = 0;
141 double bottom_y_neg_value = 0;
143 if (Rin == 7 && sensor_height == 9.6 && sensor_width == 5) {
144 x_condition_min = -Rin - 2;
145 x_condition_max = Rin;
146 adjust_bottom_y_pos =
true;
147 adjust_bottom_y_neg =
true;
148 x_adjust_bottom_y_pos = 3.5;
149 bottom_y_pos_value = 3.5;
150 bottom_y_neg_value = -3.5;
154 }
else if (Rin == 5 && sensor_height == 9.6 && sensor_width == 5) {
155 x_condition_min = -Rin - 6;
156 x_condition_max = Rin;
157 adjust_bottom_y_pos =
true;
158 adjust_bottom_y_neg =
true;
159 x_adjust_bottom_y_pos = 3.5;
160 bottom_y_pos_value = 3.5;
161 bottom_y_neg_value = -3.5;
162 }
else if ((Rin == 5 || Rin == 7) && sensor_height == 19.2) {
163 x_condition_min = -Rin - 3;
164 x_condition_max = Rin - 0.2;
166 adjust_bottom_y_pos =
false;
167 adjust_bottom_y_neg =
false;
168 }
else if (Rin == 5 && sensor_height == 3.2) {
169 x_condition_min = -(Rin + 2.6);
170 x_condition_max = Rin + 1.5;
171 adjust_bottom_y_pos =
true;
172 adjust_bottom_y_neg =
true;
173 x_adjust_bottom_y_pos = 3.5;
174 bottom_y_pos_value = 3.5;
175 bottom_y_neg_value = -3.5;
176 }
else if (Rin == 7 && sensor_height == 3.2) {
177 x_condition_min = -Rin - 1;
178 x_condition_max = Rin - 0.2;
179 adjust_bottom_y_pos =
true;
180 adjust_bottom_y_neg =
true;
181 x_adjust_bottom_y_pos = 3.5;
182 bottom_y_pos_value = 3.5;
183 bottom_y_neg_value = -3.5;
184 }
else if (Rin == 5 && sensor_height == 9.6 && sensor_width == 2.5) {
185 x_condition_min = -(Rin + 2.6);
186 x_condition_max = Rin;
187 adjust_bottom_y_pos =
true;
188 adjust_bottom_y_neg =
true;
189 x_adjust_bottom_y_pos = 3.5;
190 bottom_y_pos_value = 3.5;
191 bottom_y_neg_value = -3.5;
192 }
else if (Rin == 7 && sensor_height == 9.6 && sensor_width == 2.5) {
193 x_condition_min = -Rin - 2.6;
194 x_condition_max = Rin + 1;
196 adjust_bottom_y_pos =
true;
197 adjust_bottom_y_neg =
true;
198 x_adjust_bottom_y_pos = 5.5;
199 bottom_y_pos_value = 3.5;
200 bottom_y_neg_value = -3.5;
202 std::cout <<
"Different config - to determine offsets needed." << std::endl;
203 x_condition_min = -Rin;
204 x_condition_max = Rin;
205 adjust_bottom_y_pos =
false;
206 adjust_bottom_y_neg =
false;
209 double Rin_offset = (sensor_height == 19.2) ? 1 : 0;
210 double Rout_offset = (sensor_height == 19.2) ? 1 : 0;
212 offset_Rin_lower = Rin - Rin_offset;
213 offset_Rin_upper = Rout + Rout_offset;
215 std::set<std::pair<double, double>> placed_sensors;
216 int sensor_count = 0;
218 int placementCounter = 0;
219 bool justSkipped =
false;
221 std::vector<double> X_positions;
222 std::vector<int> justSkipped1;
224 if (sensor_width == 2.5) {
226 if (
face ==
"front") {
227 X_positions = {-63.4, -60.9, -54.2, -51.7, -45.0, -42.5, -35.8, -33.3, -26.6, -24.1, -17.4, -14.9,
228 -8.2, -5.7, 1.0, 3.5, 10.2, 12.7, 19.4, 21.9, 28.6, 31.1, 37.8, 40.3, 47.0, 49.5,
230 justSkipped1 = {1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1};
231 }
else if (
face ==
"back") {
232 X_positions = {-65.5, -58.8, -56.3, -49.6, -47.1, -40.4, -37.9, -31.2, -28.7, -22.0, -19.5, -12.8,
233 -10.3, -3.6, -1.1, 5.6, 8.1, 14.8, 17.3, 24.0, 26.5, 33.2, 35.7, 42.4, 44.9,
234 51.6, 54.1, 60.8, 63.3};
235 justSkipped1 = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0};
239 if (
face ==
"front") {
240 X_positions = {-63.4, -54.2, -45, -35.8, -26.6, -17.4, -8.2, 1., 10.2, 19.4, 28.6, 37.8, 47., 56.2, 65.4};
241 justSkipped1 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
242 }
else if (
face ==
"back") {
243 X_positions = {-58.8, -49.6, -40.4, -31.2, -22, -12.8, -3.6, 5.6, 14.8, 24, 33.2, 42.4, 51.6, 60.8};
244 justSkipped1 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
248 if (layout_type ==
"rectangular") {
250 double x_start = -Rout;
253 std::vector<double> x_positions;
254 for (
double x = x_start;
x <= x_end;
x += sensor_width) {
255 x_positions.push_back(
x);
259 const int rowsToAlternate = 2;
261 for (
size_t i = 0;
i < X_positions.size(); ++
i) {
263 double x = X_positions[
i];
264 bool justSkippedValue = justSkipped1[
i];
266 std::vector<double> y_positions_positive;
267 std::vector<double> y_positions_negative;
269 for (
double y = -Rout - Rin_offset;
y <= Rout + Rin_offset;
y += sensor_height) {
270 std::vector<std::pair<double, double>> corners = {
272 {
x + sensor_width,
y},
273 {
x,
y + sensor_height},
274 {
x + sensor_width,
y + sensor_height}};
276 bool within_bounds = std::all_of(corners.begin(), corners.end(), [&](
const std::pair<double, double>& corner) {
277 double cx = corner.first;
278 double cy = corner.second;
279 return (offset_Rin_lower <= std::sqrt(cx * cx + cy * cy) && std::sqrt(cx * cx + cy * cy) <= offset_Rin_upper);
284 y_positions_positive.push_back(
y);
286 y_positions_negative.push_back(
y);
292 if (x_condition_min <=
x &&
x <= x_condition_max && !y_positions_positive.empty()) {
293 double first_y_pos = y_positions_positive.front();
294 double last_y_pos = y_positions_positive.back() - sensor_height;
297 double top_distance_pos = top_y_pos - last_y_pos;
299 if (adjust_bottom_y_pos &&
x > x_adjust_bottom_y_pos) {
300 bottom_y_pos = bottom_y_pos_value;
303 double bottom_distance_pos = first_y_pos - bottom_y_pos;
305 if (std::abs(top_distance_pos + bottom_distance_pos) >= sensor_height) {
306 for (
auto&
y : y_positions_positive) {
307 y -= bottom_distance_pos - 0.2;
309 y_positions_positive.push_back(y_positions_positive.back() + sensor_height);
314 if (x_condition_min <=
x &&
x <= x_condition_max && !y_positions_negative.empty()) {
315 double first_y_neg = y_positions_negative.front();
316 double last_y_neg = y_positions_negative.back() + sensor_height;
319 double top_distance_neg = -(top_y_neg - first_y_neg);
321 if (adjust_bottom_y_neg &&
x > x_adjust_bottom_y_pos) {
322 bottom_y_neg = bottom_y_neg_value;
325 double bottom_distance_neg = -(last_y_neg - bottom_y_neg);
327 top_distance_neg = std::abs(top_distance_neg);
328 bottom_distance_neg = std::abs(bottom_distance_neg);
329 std::sort(y_positions_negative.begin(), y_positions_negative.end());
331 if (std::abs(top_distance_neg + bottom_distance_neg) >= sensor_height) {
332 if (sensor_height == 19.2) {
333 for (
auto&
y : y_positions_negative) {
334 y -= bottom_distance_neg;
337 for (
auto&
y : y_positions_negative) {
338 y += bottom_distance_neg - 0.2;
341 y_positions_negative.push_back(y_positions_negative.front() - sensor_height);
346 if ((x < x_condition_min || x > x_condition_max) && !y_positions_negative.empty() && !y_positions_positive.empty()) {
347 double first_y_neg = y_positions_negative.front();
348 double last_y_pos = y_positions_positive.back() + sensor_height;
350 double bottom_y_pos = -top_y_pos;
352 double top_distance_pos = std::abs(top_y_pos - last_y_pos);
353 double bottom_distance_pos = std::abs(first_y_neg - bottom_y_pos);
355 if (top_distance_pos + bottom_distance_pos >= sensor_height) {
356 for (
auto&
y : y_positions_positive) {
357 y += top_distance_pos - 0.2;
359 for (
auto&
y : y_positions_negative) {
360 y += top_distance_pos - 0.2;
362 double new_y = y_positions_negative.front() - sensor_height;
364 if (
static_cast<int>(new_y) >
static_cast<int>(bottom_y_pos)) {
365 y_positions_negative.push_back(new_y);
370 std::sort(y_positions_negative.begin(), y_positions_negative.end());
371 std::sort(y_positions_positive.begin(), y_positions_positive.end());
373 double first_y_pos = y_positions_negative.front();
375 last_y_pos = y_positions_positive.back() + sensor_height;
378 bottom_y_pos = -top_y_pos;
379 top_distance_pos = std::abs(top_y_pos - last_y_pos);
380 bottom_distance_pos = std::abs(first_y_pos - bottom_y_pos);
382 double Lb = (bottom_distance_pos + top_distance_pos) / 2;
384 if (top_distance_pos < Lb) {
385 double shift = Lb - top_distance_pos;
386 for (
auto&
y : y_positions_negative) {
389 for (
auto&
y : y_positions_positive) {
392 }
else if (top_distance_pos > Lb) {
393 double shift = top_distance_pos - Lb;
394 for (
auto&
y : y_positions_negative) {
397 for (
auto&
y : y_positions_positive) {
403 std::vector<double> y_positions = y_positions_positive;
404 y_positions.insert(y_positions.end(), y_positions_negative.begin(), y_positions_negative.end());
406 for (
double y : y_positions) {
409 double R_material_threshold = 0;
411 if (placed_sensors.find({x, y}) == placed_sensors.end()) {
412 placed_sensors.insert({
x,
y});
415 double inactive_width = (sensor_width - active_width) / 2;
416 double left_inactive_x_shift;
417 double right_inactive_x_shift;
418 double active_x_shift_sensor;
420 if (
face ==
"front") {
422 double active_x_shift, inactive_x_shift;
424 if (justSkippedValue) {
425 active_x_shift =
x + inactive_width / 2;
426 active_x_shift_sensor = active_x_shift + inactive_width;
428 inactive_x_shift =
x - active_width / 2 + inactive_width / 2;
430 active_x_shift =
x - inactive_width / 2;
431 active_x_shift_sensor = active_x_shift - inactive_width;
433 inactive_x_shift =
x + active_width / 2 - inactive_width / 2;
436 double inactive_x_shift_left, inactive_x_shift_right;
438 if (sensor_width == 5.0) {
440 inactive_x_shift_left =
x - sensor_width / 2 + inactive_width;
441 inactive_x_shift_right =
x + sensor_width / 2;
444 std::vector<std::pair<double, double>> corners_shifted = {
446 {
x + sensor_width,
y},
447 {
x,
y + sensor_height},
448 {
x + sensor_width,
y + sensor_height}};
450 bool within_bounds =
true;
451 for (
const auto& corner : corners_shifted) {
452 double cx = corner.first;
453 double cy = corner.second;
454 double dist = std::sqrt(cx * cx + cy * cy);
456 if (Rin > dist || dist >= Rout) {
457 within_bounds =
false;
464 double r_squared = (
x + x_offset) * (
x + x_offset) + (
y + y_offset) * (
y + y_offset);
466 if (r_squared < R_material_threshold * R_material_threshold) {
467 silicon_thickness = 0.005;
468 copper_thickness = 0.00475;
469 kapton_thickness = 0.03;
470 epoxy_thickness = 0.0012;
474 silicon_thickness = 0.01;
475 copper_thickness = 0.006;
476 kapton_thickness = 0.03;
477 epoxy_thickness = 0.0012;
482 if (sensor_width == 2.5) {
485 sensor = geoManager->MakeBox(sensor_name.c_str(),
siliconMed, active_width / 2, active_height / 2, silicon_thickness / 2);
486 sensor->SetLineColor(SiColor);
487 sensor->SetFillColorAlpha(SiColor, 0.4);
488 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(active_x_shift_sensor + x_offset,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness - copper_thickness - epoxy_thickness - silicon_thickness / 2));
491 sensor = geoManager->MakeBox(inactive_name.c_str(),
siliconMed, (sensor_width - active_width) / 2, sensor_height / 2, silicon_thickness / 2);
492 sensor->SetLineColor(kRed);
493 sensor->SetFillColorAlpha(kRed, 1.0);
494 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + inactive_x_shift,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness - copper_thickness - epoxy_thickness - silicon_thickness / 2));
499 sensor = geoManager->MakeBox(sensor_name.c_str(),
siliconMed, active_width / 2, sensor_height / 2, silicon_thickness / 2);
500 sensor->SetLineColor(SiColor);
501 sensor->SetFillColorAlpha(SiColor, 0.4);
502 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset +
x + inactive_width / 2,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness - copper_thickness - epoxy_thickness - silicon_thickness / 2));
505 sensor = geoManager->MakeBox(inactive_name_left.c_str(),
siliconMed, inactive_width / 2, sensor_height / 2, silicon_thickness / 2);
506 sensor->SetLineColor(kRed);
507 sensor->SetFillColorAlpha(kRed, 1.0);
508 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + inactive_x_shift_left,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness - copper_thickness - epoxy_thickness - silicon_thickness / 2));
511 sensor = geoManager->MakeBox(inactive_name_right.c_str(),
siliconMed, inactive_width / 2, sensor_height / 2, silicon_thickness / 2);
512 sensor->SetLineColor(kRed);
513 sensor->SetFillColorAlpha(kRed, 1.0);
514 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + inactive_x_shift_right,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness - copper_thickness - epoxy_thickness - silicon_thickness / 2));
519 sensor = geoManager->MakeBox(glue_up_name.c_str(),
epoxyMed, sensor_width / 2, sensor_height / 2, epoxy_thickness / 2);
520 sensor->SetLineColor(kBlue);
521 sensor->SetFillColorAlpha(kBlue, 1.0);
522 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + active_x_shift,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness - copper_thickness - epoxy_thickness / 2));
524 if (r_squared < R_material_threshold * R_material_threshold) {
526 sensor = geoManager->MakeBox(alu_name.c_str(),
AluminumMed, sensor_width / 2, sensor_height / 2, copper_thickness / 2);
527 sensor->SetLineColor(kBlack);
528 sensor->SetFillColorAlpha(kBlack, 0.4);
529 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(active_x_shift + x_offset,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness - copper_thickness / 2));
533 sensor = geoManager->MakeBox(copper_name.c_str(),
copperMed, sensor_width / 2, sensor_height / 2, copper_thickness / 2);
534 sensor->SetLineColor(kBlack);
535 sensor->SetFillColorAlpha(kBlack, 0.4);
536 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(active_x_shift + x_offset,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness - copper_thickness / 2));
541 sensor = geoManager->MakeBox(fpc_name.c_str(),
kaptonMed, sensor_width / 2, sensor_height / 2, kapton_thickness / 2);
542 sensor->SetLineColor(kGreen);
543 sensor->SetFillColorAlpha(kGreen, 0.4);
544 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(active_x_shift + x_offset,
y + y_offset, mZ + z_offset - epoxy_thickness - kapton_thickness / 2));
548 sensor = geoManager->MakeBox(glue_down_name.c_str(),
epoxyMed, sensor_width / 2, sensor_height / 2, epoxy_thickness / 2);
549 sensor->SetLineColor(kBlue);
550 sensor->SetFillColorAlpha(kBlue, 1.0);
551 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + active_x_shift,
y + y_offset, mZ + z_offset - epoxy_thickness / 2));
554 double x_shifted =
x;
555 double inactive_x_shift, active_x_shift;
556 double active_x_shift_sensor;
558 if (justSkippedValue) {
559 active_x_shift =
x + inactive_width / 2;
560 active_x_shift_sensor = active_x_shift + inactive_width;
562 inactive_x_shift =
x - active_width / 2 + inactive_width / 2;
564 active_x_shift =
x - inactive_width / 2;
565 active_x_shift_sensor = active_x_shift - inactive_width;
567 inactive_x_shift =
x + active_width / 2 - inactive_width / 2;
570 double inactive_x_shift_left, inactive_x_shift_right;
572 if (sensor_width == 5.0) {
574 inactive_x_shift_left =
x - sensor_width / 2 + inactive_width;
575 inactive_x_shift_right =
x + sensor_width / 2;
578 std::vector<std::pair<double, double>> corners_shifted = {
580 {x_shifted + sensor_width,
y},
581 {x_shifted,
y + sensor_height},
582 {x_shifted + sensor_width,
y + sensor_height}};
584 bool within_bounds =
true;
585 for (
const auto& corner : corners_shifted) {
586 double cx = corner.first;
587 double cy = corner.second;
588 double dist = std::sqrt(cx * cx + cy * cy);
590 if (Rin > dist + dist_offset || dist >= Rout) {
591 within_bounds =
false;
598 double r_squared = (
x + x_offset) * (
x + x_offset) + (
y + y_offset) * (
y + y_offset);
600 if (r_squared < R_material_threshold * R_material_threshold) {
601 silicon_thickness = 0.005;
602 copper_thickness = 0.00475;
603 kapton_thickness = 0.03;
604 epoxy_thickness = 0.0006;
608 silicon_thickness = 0.01;
609 copper_thickness = 0.006;
610 kapton_thickness = 0.03;
611 epoxy_thickness = 0.0012;
618 sensor = geoManager->MakeBox(glue_down_name.c_str(),
epoxyMed, sensor_width / 2, sensor_height / 2, epoxy_thickness / 2);
619 sensor->SetLineColor(kBlue);
620 sensor->SetFillColorAlpha(kBlue, 1.0);
621 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + active_x_shift,
y + y_offset, mZ + z_offset + epoxy_thickness / 2));
625 sensor = geoManager->MakeBox(fpc_name.c_str(),
kaptonMed, sensor_width / 2, sensor_height / 2, kapton_thickness / 2);
626 sensor->SetLineColor(kGreen);
627 sensor->SetFillColorAlpha(kGreen, 0.4);
628 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(active_x_shift + x_offset,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness / 2));
630 if (r_squared < R_material_threshold * R_material_threshold) {
633 sensor = geoManager->MakeBox(alu_name.c_str(),
AluminumMed, sensor_width / 2, sensor_height / 2, copper_thickness / 2);
634 sensor->SetLineColor(kBlack);
635 sensor->SetFillColorAlpha(kBlack, 0.4);
636 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(active_x_shift + x_offset,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness + copper_thickness / 2));
640 sensor = geoManager->MakeBox(copper_name.c_str(),
copperMed, sensor_width / 2, sensor_height / 2, copper_thickness / 2);
641 sensor->SetLineColor(kBlack);
642 sensor->SetFillColorAlpha(kBlack, 0.4);
643 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(active_x_shift + x_offset,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness + copper_thickness / 2));
648 sensor = geoManager->MakeBox(glue_up_name.c_str(),
epoxyMed, sensor_width / 2, sensor_height / 2, epoxy_thickness / 2);
649 sensor->SetLineColor(kBlue);
650 sensor->SetFillColorAlpha(kBlue, 1.0);
651 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + active_x_shift,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness + copper_thickness + epoxy_thickness / 2));
653 if (sensor_width == 2.5) {
656 sensor = geoManager->MakeBox(sensor_name.c_str(),
siliconMed, active_width / 2, active_height / 2, silicon_thickness / 2);
657 sensor->SetLineColor(SiColor);
658 sensor->SetFillColorAlpha(SiColor, 0.4);
659 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(active_x_shift_sensor + x_offset,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness + copper_thickness + epoxy_thickness + silicon_thickness / 2));
662 sensor = geoManager->MakeBox(inactive_name.c_str(),
siliconMed, (sensor_width - active_width) / 2, sensor_height / 2, silicon_thickness / 2);
663 sensor->SetLineColor(kRed);
664 sensor->SetFillColorAlpha(kRed, 1.0);
665 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + inactive_x_shift,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness + copper_thickness + epoxy_thickness + silicon_thickness / 2));
670 sensor = geoManager->MakeBox(sensor_name.c_str(),
siliconMed, active_width / 2, sensor_height / 2, silicon_thickness / 2);
671 sensor->SetLineColor(SiColor);
672 sensor->SetFillColorAlpha(SiColor, 0.4);
673 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + x_shifted + inactive_width / 2,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness + copper_thickness + epoxy_thickness + silicon_thickness / 2));
677 sensor = geoManager->MakeBox(inactive_name_left.c_str(),
siliconMed, inactive_width / 2, sensor_height / 2, silicon_thickness / 2);
678 sensor->SetLineColor(kRed);
679 sensor->SetFillColorAlpha(kRed, 1.0);
680 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + inactive_x_shift_left,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness + copper_thickness + epoxy_thickness + silicon_thickness / 2));
684 sensor = geoManager->MakeBox(inactive_name_right.c_str(),
siliconMed, inactive_width / 2, sensor_height / 2, silicon_thickness / 2);
685 sensor->SetLineColor(kRed);
686 sensor->SetFillColorAlpha(kRed, 1.0);
687 motherVolume->AddNode(sensor, sensor_count++,
new TGeoTranslation(x_offset + inactive_x_shift_right,
y + y_offset, mZ + z_offset + epoxy_thickness + kapton_thickness + copper_thickness + epoxy_thickness + silicon_thickness / 2));
697 LOG(
debug) <<
"FT3Module: done create_layout";
700void FT3Module::createModule(
double mZ,
int layerNumber,
int direction,
double Rin,
double Rout,
double overlap,
const std::string&
face,
const std::string& layout_type, TGeoVolume* motherVolume)
703 LOG(
debug) <<
"FT3Module: createModule - Layer " << layerNumber <<
", Direction " << direction <<
", Face " <<
face;
704 create_layout(mZ, layerNumber, direction, Rin, Rout, overlap,
face, layout_type, motherVolume);
705 LOG(
debug) <<
"FT3Module: done createModule";
double calculate_y_circle(double x, double radius)
Definition of the FT3Module class.
static TGeoMedium * epoxyMed
static TGeoMaterial * epoxyMat
static TGeoMedium * siliconMed
static void createModule(double mZ, int layerNumber, int direction, double Rin, double Rout, double overlap, const std::string &face, const std::string &layout_type, TGeoVolume *motherVolume)
static TGeoMedium * copperMed
static TGeoMaterial * kaptonMat
static TGeoMaterial * copperMat
static TGeoMaterial * siliconMat
static TGeoMedium * AluminumMed
static TGeoMedium * kaptonMed
static TGeoMaterial * AluminumMat
static void initialize_materials()
GLenum GLuint GLint GLenum face
std::string to_string(gsl::span< T, Size > span)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"