Skip to content

Commit f7f295b

Browse files
Fix material bug in FT3 (#15780)
* fix material bug where only silicon was used. Also added middle gap in the sensor that I forgot about before * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 868e414 commit f7f295b

3 files changed

Lines changed: 24 additions & 37 deletions

File tree

Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ class FT3Module
8181
std::pair<double, double>& absAllowedYRange,
8282
double x_mid, double y_mid, double z_stave_shift_forward);
8383
void addDetectorVolume(
84-
TGeoVolume* motherVolume, std::string volumeName, int color, unsigned volume_count,
85-
double x_mid, double y_mid, double z_mid,
84+
TGeoVolume* motherVolume, std::string volumeName, int color, TGeoMedium* med,
85+
unsigned volume_count, double x_mid, double y_mid, double z_mid,
8686
double x_half_length, double y_half_length, double z_half_length);
8787

8888
void add2x1GlueVolume(

Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace o2::ft3::ModuleConstants
4545
const double single_sensor_width = 2.5;
4646
const double single_sensor_height = 2.9;
4747
const double inactive_width = 0.2;
48-
const double sensor2x1_gap = 0.02;
48+
const double sensor2x1_gap = 0.02; // both between L&R sensors in 2x1, and between two 2x1s
4949
const double stackGap = sensor2x1_gap; // gap between 2xN module stacks
5050

5151
const double active_width = single_sensor_width - inactive_width;

Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,12 @@ void FT3Module::addStaveVolume(
372372
*/
373373

374374
void FT3Module::addDetectorVolume(
375-
TGeoVolume* motherVolume, std::string volumeName, int color,
375+
TGeoVolume* motherVolume, std::string volumeName, int color, TGeoMedium* med,
376376
unsigned volume_count, double x_mid, double y_mid, double z_mid,
377377
double x_half_length, double y_half_length, double z_half_length)
378378
{
379379
TGeoManager* geoManager = gGeoManager;
380-
TGeoVolume* volume = geoManager->MakeBox(volumeName.c_str(), siliconMed, x_half_length,
380+
TGeoVolume* volume = geoManager->MakeBox(volumeName.c_str(), med, x_half_length,
381381
y_half_length, z_half_length);
382382
volume->SetLineColor(color);
383383
volume->SetFillColorAlpha(color, 0.4);
@@ -402,7 +402,7 @@ void FT3Module::add2x1GlueVolume(
402402
{
403403
std::string glue_name = "FT3glue_" + element_glued_to + "_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
404404
addDetectorVolume(
405-
motherVolume, glue_name, Constants::glueColor, volume_count,
405+
motherVolume, glue_name, Constants::glueColor, epoxyMed, volume_count,
406406
x_mid, y_mid, z_mid,
407407
Constants::sensor2x1_width / 2, Constants::sensor2x1_height / 2, Constants::epoxyThickness / 2);
408408
}
@@ -417,7 +417,7 @@ void FT3Module::add2x1CopperVolume(
417417
{
418418
std::string copper_name = "FT3Copper_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
419419
addDetectorVolume(
420-
motherVolume, copper_name, Constants::CuColor, volume_count,
420+
motherVolume, copper_name, Constants::CuColor, copperMed, volume_count,
421421
x_mid, y_mid, z_mid,
422422
Constants::sensor2x1_width / 2, Constants::sensor2x1_height / 2, Constants::copperThickness / 2);
423423
}
@@ -432,16 +432,16 @@ void FT3Module::add2x1KaptonVolume(
432432
{
433433
std::string kapton_name = "FT3Kapton_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
434434
addDetectorVolume(
435-
motherVolume, kapton_name, Constants::kaptonColor, volume_count,
435+
motherVolume, kapton_name, Constants::kaptonColor, kaptonMed, volume_count,
436436
x_mid, y_mid, z_mid,
437437
Constants::sensor2x1_width / 2, Constants::sensor2x1_height / 2, Constants::kaptonThickness / 2);
438438
}
439439

440440
/*
441-
* This function adds a single sensor (currently 2.5x3.2mm) to the given mother volume
441+
* This function adds a single sensor (currently 2.5x3.2cm) to the given mother volume
442442
* at the given (x,y,z) position of the module.
443443
*
444-
* Because the sensor has an inactive region of 0.2mm on one side, we also add a
444+
* Because the sensor has an inactive region of 2mm on one side, we also add a
445445
* separate volume for the inactive region, which will be either on the left or
446446
* or right dependent on the if the sensor is on the left or right in a 2x1 layout.
447447
* See FT3Module.h for more details on the layout.
@@ -464,36 +464,21 @@ void FT3Module::addSingleSensorVolume(
464464
TGeoManager* geoManager = gGeoManager;
465465
// ACTIVE AREA
466466
std::string sensor_name = "FT3Sensor_Active_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
467-
sensor = geoManager->MakeBox(sensor_name.c_str(), siliconMed, Constants::active_width / 2,
468-
Constants::single_sensor_height / 2, Constants::siliconThickness / 2);
469-
sensor->SetLineColor(Constants::SiColor);
470-
sensor->SetFillColorAlpha(Constants::SiColor, 0.4);
471-
motherVolume->AddNode(
472-
sensor,
473-
volume_count,
474-
new TGeoTranslation( // midpoint of box to add
475-
active_x_mid,
476-
y_mid,
477-
z_mid) // TGeoTranslation
478-
); // addNode
467+
addDetectorVolume(
468+
motherVolume, sensor_name, Constants::SiColor, siliconMed,
469+
volume_count, active_x_mid, y_mid, z_mid,
470+
Constants::active_width / 2, Constants::single_sensor_height / 2, Constants::siliconThickness / 2);
479471

480472
// INACTIVE STRIP ON LEFT OR RIGHT
481473
double inactive_x_mid = isLeft ? (active_x_mid - Constants::active_width / 2 - Constants::inactive_width / 2)
482474
: (active_x_mid + Constants::active_width / 2 + Constants::inactive_width / 2);
483475
std::string sensor_inactive_name = "FT3Sensor_Inactive_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
484476
sensor = geoManager->MakeBox(sensor_inactive_name.c_str(), siliconMed, Constants::inactive_width / 2,
485477
Constants::single_sensor_height / 2, Constants::siliconThickness / 2);
486-
sensor->SetLineColor(Constants::SiInactiveColor);
487-
sensor->SetFillColorAlpha(Constants::SiInactiveColor, 0.4);
488-
motherVolume->AddNode(
489-
sensor,
490-
volume_count,
491-
new TGeoTranslation( // midpoint of box to add
492-
inactive_x_mid,
493-
y_mid,
494-
z_mid) // TGeoTranslation
495-
); // addNode
496-
(volume_count)++;
478+
addDetectorVolume(
479+
motherVolume, sensor_inactive_name, Constants::SiInactiveColor, siliconMed,
480+
volume_count, inactive_x_mid, y_mid, z_mid,
481+
Constants::inactive_width / 2, Constants::single_sensor_height / 2, Constants::siliconThickness / 2);
497482
}
498483

499484
void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction,
@@ -733,15 +718,17 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction
733718
for (unsigned i_sens = 0; i_sens < positions[i_y_pos].second; i_sens++) {
734719
TGeoVolume* sensor;
735720
// ------------ (1) Silicon sensor ------------
736-
// left single sensor of the 2x1
721+
// left single sensor of the 2x1: place right edge half of sensor gap from center
737722
double z_mid = z_offset_to_silicon * z_offset_multiplier + z_stave_shift;
738723
addSingleSensorVolume(
739724
motherVolume, layerNumber, direction, i_stave, sensor_count,
740-
x_mid - Constants::active_width / 2, y_mid, z_mid, true);
741-
// right single sensor of the 2x1
725+
x_mid - Constants::active_width / 2 - Constants::sensor2x1_gap / 2,
726+
y_mid, z_mid, true);
727+
// right single sensor of the 2x1: place left edge half of sensor gap from center
742728
addSingleSensorVolume(
743729
motherVolume, layerNumber, direction, i_stave, sensor_count + 1,
744-
x_mid + Constants::active_width / 2, y_mid, z_mid, false);
730+
x_mid + Constants::active_width / 2 + Constants::sensor2x1_gap / 2,
731+
y_mid, z_mid, false);
745732
// ------------ (2) Epoxy glue layer between silicon and copper (FPC) ------------
746733
z_mid = z_offset_to_glue_Si * z_offset_multiplier + z_stave_shift;
747734
add2x1GlueVolume(

0 commit comments

Comments
 (0)