Skip to content

Commit 68a9560

Browse files
Ft3 tiling bugfixing & module feature update (#15409)
* Change to tolerance based cutting in FT3 for both ML and OT to ensure no overlaps * Change inner radius of services for ML to 38.5cm in line with scoping docs * Add output to DEBUG and INFO about the number of module stack heights use, and change tiling starting point option to use a module instead of sensor. Also update a few outdated comments * Change naming conventions in FT3 for kSegmentedStave: direction now before layer. Also number sensors (and other materials between it and the stave) within stave. * add second circle for maximum radius * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent c8ba413 commit 68a9560

7 files changed

Lines changed: 128 additions & 73 deletions

File tree

Detectors/Upgrades/ALICE3/FT3/base/include/FT3Base/FT3BaseParam.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ struct FT3BaseParam : public o2::conf::ConfigurableParamHelper<FT3BaseParam> {
4040
Float_t etaOut = 1.5;
4141
Float_t Layerx2X0 = 0.01;
4242

43-
// override values from FT3ModuleConstants, inner and outer
44-
bool cutStavesOnNominalRadius_inner = true;
45-
bool cutStavesOnNominalRadius_outer = true;
46-
47-
// What to place over x=0 line in case of full outer-outer stave: Gap or Sensor
48-
bool placeSensorInMiddleOfStave = false;
43+
// define tolerance allowed for staves to go outside nominal radii
44+
double staveTolMLInner = 0.;
45+
double staveTolMLOuter = 0.;
46+
double staveTolOTInner = 0.;
47+
double staveTolOTOuter = 0.;
48+
49+
// What to place over x=0 line in case of full outer-outer stave: Gap or Module
50+
bool placeSensorStackInMiddleOfStave = false;
4951

5052
// Draw reference circles at inner and outer radius of stave layer, for visualisation
5153
bool drawReferenceCircles = false;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,26 @@ 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,
84+
TGeoVolume* motherVolume, std::string volumeName, int color, unsigned volume_count,
8585
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(
8989
TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
90-
unsigned* volume_count, double x_mid, double y_mid, double z_mid,
90+
unsigned volume_count, double x_mid, double y_mid, double z_mid,
9191
std::string element_glued_to);
9292

9393
void add2x1CopperVolume(
9494
TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
95-
unsigned* volume_count, double x_mid, double y_mid, double z_mid);
95+
unsigned volume_count, double x_mid, double y_mid, double z_mid);
9696

9797
void add2x1KaptonVolume(
9898
TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
99-
unsigned* volume_count, double x_mid, double y_mid, double z_mid);
99+
unsigned volume_count, double x_mid, double y_mid, double z_mid);
100100

101101
void addSingleSensorVolume(
102102
TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
103-
unsigned* volume_count, double active_x_mid, double y_mid, double z_mid, bool isLeft);
103+
unsigned volume_count, double active_x_mid, double y_mid, double z_mid, bool isLeft);
104104
};
105105

106106
#endif // FT3MODULE_H

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
namespace o2::ft3::ModuleConstants
2424
{
2525
/* CURRENT STATUS:
26-
* 25x32mm sensors, 2mm inactive on one side
26+
* 25x29mm sensors, 2mm inactive on one side
2727
* Most granular layout is 2x1 sensors, where the one on the right has the inactive region
2828
* on the right, and the one on the left has the inactive region on the left.
2929
* When stacking 2x1 modules, there is a 0.2mm gap between them. By default, we assume this
@@ -35,7 +35,7 @@ namespace o2::ft3::ModuleConstants
3535
* | | | | |
3636
* | | | | |
3737
* | | | | |
38-
* | | | | | 32mm sensor height
38+
* | | | | | 29mm sensor height
3939
* | | | | |
4040
* | | | | |
4141
* ------------------------
@@ -105,8 +105,9 @@ const int CuColor = kOrange;
105105
const int kaptonColor = kYellow;
106106
const int carbonFiberColor = kGray + 1;
107107

108-
// Struct for stave position configuration (varies between IT/OT)
108+
// Struct for stave position configuration (varies between ML/OT)
109109
struct StaveConfig {
110+
const unsigned isML; // whether this config is for ML or OT
110111
/*
111112
* Constants for staves are written for both positive
112113
* and negative x even though they are just mirrored now,
@@ -123,7 +124,10 @@ struct StaveConfig {
123124
// lengths of staves, their midpoint, and their face
124125
const std::vector<double>& y_lengths;
125126
const std::vector<double>& x_midpoints;
126-
double x_midpoint_spacing;
127+
const double x_midpoint_spacing;
128+
// whether staves can be placed outside of nominal radii
129+
const double maxToleranceInner;
130+
const double maxToleranceOuter;
127131
// which side of the disc do we place the stave?
128132
// kSegmentedStave: staggering staves in z (see z_offsetStave)
129133
// accessed via stave index, NOT stave ID
@@ -149,6 +153,8 @@ const std::vector<double> x_midpoints = {
149153
38.25, 42.75, 47.25, 51.75, 56.25, 60.75, 65.25 // R
150154
};
151155
const double x_midpoint_spacing = 4.5; // assume constant for now
156+
const double maxToleranceInner = 0.; // default not allowed inwards
157+
const double maxToleranceOuter = 3.4; // leave 1mm for layer air encapsulation
152158
const std::vector<bool> staveOnFront =
153159
{
154160
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, // L
@@ -174,6 +180,8 @@ const std::vector<double> x_midpoints = {
174180
2.25, 6.75, 11.25, 15.75, 20.25, 24.75, 29.25, 33.75 // R
175181
};
176182
const double x_midpoint_spacing = 4.5;
183+
const double maxToleranceInner = 0.; // default not allowed inwards
184+
const double maxToleranceOuter = 3.4; // leave 1mm for layer air encapsulation
177185
const std::vector<bool> staveOnFront =
178186
{
179187
1, 0, 1, 0, 1, 0, 1, 0, // L
@@ -186,17 +194,23 @@ inline StaveConfig getStaveConfig(bool isInnerDisk)
186194
{
187195
if (isInnerDisk) {
188196
return StaveConfig{
197+
true, // isML
189198
ML_StavePositions::staveID_to_y_midpoint,
190199
ML_StavePositions::y_lengths,
191200
ML_StavePositions::x_midpoints,
192201
ML_StavePositions::x_midpoint_spacing,
202+
ML_StavePositions::maxToleranceInner,
203+
ML_StavePositions::maxToleranceOuter,
193204
ML_StavePositions::staveOnFront};
194205
} else {
195206
return StaveConfig{
207+
false, // isML
196208
OT_StavePositions::staveID_to_y_midpoint,
197209
OT_StavePositions::y_lengths,
198210
OT_StavePositions::x_midpoints,
199211
OT_StavePositions::x_midpoint_spacing,
212+
OT_StavePositions::maxToleranceInner,
213+
OT_StavePositions::maxToleranceOuter,
200214
OT_StavePositions::staveOnFront};
201215
}
202216
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,9 @@ void Detector::defineSensitiveVolumes()
630630
std::string sig2 = "FT3Sensor_front_" + std::to_string(iLayer) + "_" + std::to_string(direction);
631631
std::string sig3 = "FT3Sensor_back_" + std::to_string(iLayer) + "_" + std::to_string(direction);
632632

633-
// 3. SegmentedStave (format: FT3Sensor_<layer>_<dir>_...)
633+
// 3. SegmentedStave (format: FT3Sensor_<dir>_<layer>_...)
634634
// Add the trailing underscore to avoid confusing it with sig1
635-
std::string sig4 = "FT3Sensor_" + std::to_string(iLayer) + "_" + std::to_string(direction) + "_";
635+
std::string sig4 = "FT3Sensor_" + std::to_string(direction) + "_" + std::to_string(iLayer) + "_";
636636

637637
// Iterate over all existing volumes to find matches
638638
for (int i = 0; i < nVolumes; ++i) {

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,21 @@ void FT3Layer::createReferenceCircles(TGeoVolume* motherVolume, const std::strin
233233
// create reference circles at the inner and outer radius of the layer, for visualization purposes
234234
TGeoTube* innerCircle = new TGeoTube(mInnerRadius - 0.1, mInnerRadius + 0.1, 0.01);
235235
TGeoTube* outerCircle = new TGeoTube(mOuterRadius - 0.1, mOuterRadius + 0.1, 0.01);
236+
TGeoTube* outerCircleEdge = new TGeoTube(mOuterRadius + 3.3, mOuterRadius + 3.5, 0.01);
236237

237238
TGeoVolume* innerCircleVol = new TGeoVolume((mLayerName + "_InnerCircle").c_str(), innerCircle, gGeoManager->GetMedium("FT3_AIR$"));
238239
TGeoVolume* outerCircleVol = new TGeoVolume((mLayerName + "_OuterCircle").c_str(), outerCircle, gGeoManager->GetMedium("FT3_AIR$"));
240+
TGeoVolume* outerCircleEdgeVol = new TGeoVolume((mLayerName + "_OuterCircleEdge").c_str(), outerCircleEdge, gGeoManager->GetMedium("FT3_AIR$"));
239241

240242
innerCircleVol->SetLineColor(kRed);
241243
outerCircleVol->SetLineColor(kBlue);
244+
outerCircleEdgeVol->SetLineColor(kBlack);
242245

243246
double z_position = mDirection ? 0.5 : -0.5;
244247

245248
motherVolume->AddNode(innerCircleVol, 1, new TGeoTranslation(0, 0, z_position));
246249
motherVolume->AddNode(outerCircleVol, 1, new TGeoTranslation(0, 0, z_position));
250+
motherVolume->AddNode(outerCircleEdgeVol, 1, new TGeoTranslation(0, 0, z_position));
247251
}
248252

249253
void FT3Layer::createLayer(TGeoVolume* motherVolume)
@@ -459,7 +463,9 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume)
459463

460464
// shift stave volumes into layer volume, since nominal z_{stave face} = 0
461465
double z_local_offset = z_layer_thickness / 2.0;
462-
TGeoTube* layer = new TGeoTube(mInnerRadius - 0.2, mOuterRadius + 2.5, z_layer_thickness / 2); // margins to ensure staves are fully encapsulated in the layer volume
466+
// ensure staves fully encapsulated in the layer volume,
467+
// but don't cross out of max nominal radii of 38.5cm & 71.5cm respectively (3.5cm tolerance)
468+
TGeoTube* layer = new TGeoTube(mInnerRadius - 0.2, mOuterRadius + 3.49, z_layer_thickness / 2);
463469
layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
464470

465471
if (ft3Params.drawReferenceCircles) {

0 commit comments

Comments
 (0)