Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Detectors/Upgrades/ALICE3/FT3/simulation/src/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ void Detector::defineSensitiveVolumes()
LOG(info) << "Adding FT3 Sensitive Volume for direction " << direction << " layer " << iLayer << "/" << getNumberOfLayers();
volumeName = o2::ft3::GeometryTGeo::getFT3SensorPattern() + std::to_string(iLayer);
int iSens = 0;
if (mLayers[direction][iLayer].getIsInMiddleLayer()) { // ML disks
/*if (mLayers[direction][iLayer].getIsInMiddleLayer()) { // ML disks
const std::string sensorName = Form("%s_%d_%d", GeometryTGeo::getFT3SensorPattern(), direction, iLayer);
v = geoManager->GetVolume(sensorName.c_str());
if (!v) {
Expand All @@ -640,22 +640,22 @@ void Detector::defineSensitiveVolumes()
}
AddSensitiveVolume(v);
iSens++;
} else { // OT disks
for (int sensor_count = 0; sensor_count < MAX_SENSORS; ++sensor_count) {
std::string sensor_name_front = "FT3Sensor_front_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_" + std::to_string(sensor_count);
std::string sensor_name_back = "FT3Sensor_back_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_" + std::to_string(sensor_count);
v = geoManager->GetVolume(sensor_name_front.c_str());
if (v) {
AddSensitiveVolume(v);
iSens++;
}
v = geoManager->GetVolume(sensor_name_back.c_str());
if (v) {
AddSensitiveVolume(v);
iSens++;
}
} else { // OT disks*/
for (int sensor_count = 0; sensor_count < MAX_SENSORS; ++sensor_count) {
std::string sensor_name_front = "FT3Sensor_front_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_" + std::to_string(sensor_count);
std::string sensor_name_back = "FT3Sensor_back_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_" + std::to_string(sensor_count);
v = geoManager->GetVolume(sensor_name_front.c_str());
if (v) {
AddSensitiveVolume(v);
iSens++;
}
v = geoManager->GetVolume(sensor_name_back.c_str());
if (v) {
AddSensitiveVolume(v);
iSens++;
}
}
//}
LOG(info) << iSens << " sensitive volumes added";
Comment on lines 631 to 659
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defineSensitiveVolumes() now always searches for FT3Sensor_front_* / FT3Sensor_back_* volumes and no longer registers the single sensor volumes created by the kTrapezoidal/kCylindrical layouts (named via GeometryTGeo::getFT3SensorPattern()), which would result in 0 sensitive volumes (and therefore no hits) when those layouts are selected. Consider branching on FT3BaseParam::layoutFT3 (or detecting which volumes exist): for non-segmented layouts, look up the per-layer sensor volume and fail loudly if it’s missing; for segmented layouts, keep the front/back scan. Also consider treating iSens == 0 as an error to avoid silent misconfiguration.

Copilot uses AI. Check for mistakes.
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume)
LOG(info) << "FT3: ft3Params.layoutFT3 = " << ft3Params.layoutFT3;

// ### options for ML and OT disk layout
if (ft3Params.layoutFT3 == kTrapezoidal || (mIsMiddleLayer && ft3Params.layoutFT3 == kSegmented)) {
if (ft3Params.layoutFT3 == kTrapezoidal /*|| (mIsMiddleLayer && ft3Params.layoutFT3 == kSegmented)*/) {
// trapezoidal ML+OT disks
// (disks with TGeoTubes doesn'n work properly in ACTS, due to polar coordinates on TGeoTube sides)

Expand Down
16 changes: 11 additions & 5 deletions Detectors/Upgrades/ALICE3/FT3/simulation/src/FT3Module.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double
} else if (sensor_height == 19.2 && sensor_width == 5) {
x_offset = 0.7;
y_offset = 9;

} else {
x_offset = sensor_width / 2;
y_offset = sensor_height / 2;
Expand All @@ -146,14 +145,12 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double
if (Rin == 7 && sensor_height == 9.6 && sensor_width == 5) {
x_condition_min = -Rin - 2;
x_condition_max = Rin;
dist_offset = 2;
adjust_bottom_y_pos = true;
adjust_bottom_y_neg = true;
x_adjust_bottom_y_pos = 3.5;
bottom_y_pos_value = 3.5;
bottom_y_neg_value = -3.5;

dist_offset = 2;

} else if (Rin == 5 && sensor_height == 9.6 && sensor_width == 5) {
x_condition_min = -Rin - 6;
x_condition_max = Rin;
Expand Down Expand Up @@ -201,6 +198,15 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double
x_adjust_bottom_y_pos = 5.5;
bottom_y_pos_value = 3.5;
bottom_y_neg_value = -3.5;
} else if (Rin == 10 && sensor_height == 9.6 && sensor_width == 5.0) {
x_condition_min = -Rin - 4;
x_condition_max = Rin;
dist_offset = 2;
adjust_bottom_y_pos = false;
adjust_bottom_y_neg = false;
x_adjust_bottom_y_pos = 3.5;
bottom_y_pos_value = 3.5;
bottom_y_neg_value = -3.5;
} else if (Rin == 20 && sensor_height == 9.6 && sensor_width == 5.0) {
x_condition_min = -Rin - 4;
x_condition_max = Rin;
Expand Down Expand Up @@ -244,7 +250,7 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double
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};
}
} else {
if (Rin == 20) { // v3 paving, rough attempt
if (Rin == 10 || Rin == 20) { // v3 paving, rough attempt
float overlap = 0.3;
// NB: these are left edges
float X_start = -2.0 - 13.5 * (sensor_width - overlap);
Expand Down
Loading