Skip to content

Commit 4575347

Browse files
[ALICE 3] Properly set FT3 sensitive volumes; improve tiling (#15201)
* [ALICE 3] Properly set FT3 sensitive volumes; improve tiling of v3 geometry (Rin = 30 cm) * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 909c5f9 commit 4575347

File tree

2 files changed

+48
-13
lines changed

2 files changed

+48
-13
lines changed

Detectors/Upgrades/ALICE3/FT3/simulation/src/Detector.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ void Detector::defineSensitiveVolumes()
630630
for (int iLayer = 0; iLayer < getNumberOfLayers(); iLayer++) {
631631
LOG(info) << "Adding FT3 Sensitive Volume for direction " << direction << " layer " << iLayer << "/" << getNumberOfLayers();
632632
volumeName = o2::ft3::GeometryTGeo::getFT3SensorPattern() + std::to_string(iLayer);
633+
int iSens = 0;
633634
if (mLayers[direction][iLayer].getIsInMiddleLayer()) { // ML disks
634635
const std::string sensorName = Form("%s_%d_%d", GeometryTGeo::getFT3SensorPattern(), direction, iLayer);
635636
v = geoManager->GetVolume(sensorName.c_str());
@@ -638,20 +639,24 @@ void Detector::defineSensitiveVolumes()
638639
LOG(fatal) << "Could not find volume " << sensorName << " for direction " << direction << " layer " << iLayer;
639640
}
640641
AddSensitiveVolume(v);
642+
iSens++;
641643
} else { // OT disks
642644
for (int sensor_count = 0; sensor_count < MAX_SENSORS; ++sensor_count) {
643-
std::string sensor_name_front = "FT3sensor_front_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_" + std::to_string(sensor_count);
644-
std::string sensor_name_back = "FT3sensor_back_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_" + std::to_string(sensor_count);
645+
std::string sensor_name_front = "FT3Sensor_front_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_" + std::to_string(sensor_count);
646+
std::string sensor_name_back = "FT3Sensor_back_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_" + std::to_string(sensor_count);
645647
v = geoManager->GetVolume(sensor_name_front.c_str());
646648
if (v) {
647649
AddSensitiveVolume(v);
650+
iSens++;
648651
}
649652
v = geoManager->GetVolume(sensor_name_back.c_str());
650653
if (v) {
651654
AddSensitiveVolume(v);
655+
iSens++;
652656
}
653657
}
654658
}
659+
LOG(info) << iSens << " sensitive volumes added";
655660
}
656661
}
657662
}

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

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double
140140
double bottom_y_pos_value = 0;
141141
double bottom_y_neg_value = 0;
142142

143+
double Rin_offset = (sensor_height == 19.2) ? 1 : 0;
144+
double Rout_offset = (sensor_height == 19.2) ? 1 : 0;
145+
143146
if (Rin == 7 && sensor_height == 9.6 && sensor_width == 5) {
144147
x_condition_min = -Rin - 2;
145148
x_condition_max = Rin;
@@ -198,17 +201,23 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double
198201
x_adjust_bottom_y_pos = 5.5;
199202
bottom_y_pos_value = 3.5;
200203
bottom_y_neg_value = -3.5;
204+
} else if (Rin == 20 && sensor_height == 9.6 && sensor_width == 5.0) {
205+
x_condition_min = -Rin - 4;
206+
x_condition_max = Rin;
207+
dist_offset = 2;
208+
adjust_bottom_y_pos = false;
209+
adjust_bottom_y_neg = false;
210+
x_adjust_bottom_y_pos = 3.5;
211+
bottom_y_pos_value = 3.5;
212+
bottom_y_neg_value = -3.5;
201213
} else {
202214
LOG(warning) << "Different config - to determine offsets needed for " << "Rin = " << Rin << " ; sensor_height = " << sensor_height << " ; sensor_width = " << sensor_width << " layer " << layerNumber;
203-
x_condition_min = -Rin;
215+
x_condition_min = -Rin - sensor_width;
204216
x_condition_max = Rin;
205217
adjust_bottom_y_pos = false;
206218
adjust_bottom_y_neg = false;
207219
}
208220

209-
double Rin_offset = (sensor_height == 19.2) ? 1 : 0;
210-
double Rout_offset = (sensor_height == 19.2) ? 1 : 0;
211-
212221
offset_Rin_lower = Rin - Rin_offset;
213222
offset_Rin_upper = Rout + Rout_offset;
214223

@@ -235,13 +244,34 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double
235244
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};
236245
}
237246
} else {
238-
// filling for sensors with 2x width, each row skipped
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};
247+
if (Rin == 20) { // v3 paving, rough attempt
248+
float overlap = 0.3;
249+
// NB: these are left edges
250+
float X_start = -2.0 - 13.5 * (sensor_width - overlap);
251+
float X_start_pos = 2.0 - 0.5 * (sensor_width - overlap);
252+
if (face == "back") {
253+
X_start += (sensor_width - overlap);
254+
X_start_pos += (sensor_width - overlap);
255+
}
256+
while (X_start < -2) {
257+
X_positions.push_back(X_start);
258+
justSkipped1.push_back(1);
259+
X_start += 2 * (sensor_width - overlap);
260+
}
261+
while (X_start_pos < Rout + x_offset - sensor_width) {
262+
X_positions.push_back(X_start_pos);
263+
justSkipped1.push_back(1);
264+
X_start_pos += 2 * (sensor_width - overlap);
265+
}
266+
} else {
267+
// filling for sensors with 2x width, each row skipped
268+
if (face == "front") {
269+
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};
270+
justSkipped1 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
271+
} else if (face == "back") {
272+
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};
273+
justSkipped1 = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
274+
}
245275
}
246276
}
247277

0 commit comments

Comments
 (0)