Skip to content

Commit 1fd2328

Browse files
authored
ALICE3 Sensor orientation fix + first try to close in-stave gaps (#15043)
1 parent 1452f31 commit 1fd2328

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void Detector::buildTRKMiddleOuterLayers()
128128
LOGP(info, "TRKLayer created. Name: {}", GeometryTGeo::getTRKLayerPattern() + std::to_string(0));
129129
mLayers.emplace_back(1, GeometryTGeo::getTRKLayerPattern() + std::to_string(1), 11.f, 10, 100.e-3);
130130
mLayers.emplace_back(2, GeometryTGeo::getTRKLayerPattern() + std::to_string(2), 15.f, 10, 100.e-3);
131-
mLayers.emplace_back(3, GeometryTGeo::getTRKLayerPattern() + std::to_string(3), 19.f, 10, 100.e-3);
131+
mLayers.emplace_back(3, GeometryTGeo::getTRKLayerPattern() + std::to_string(3), 20.f, 10, 100.e-3);
132132
mLayers.emplace_back(4, GeometryTGeo::getTRKLayerPattern() + std::to_string(4), 30.f, 10, 100.e-3);
133133
mLayers.emplace_back(5, GeometryTGeo::getTRKLayerPattern() + std::to_string(5), 45.f, 20, 100.e-3);
134134
mLayers.emplace_back(6, GeometryTGeo::getTRKLayerPattern() + std::to_string(6), 60.f, 20, 100.e-3);

Detectors/Upgrades/ALICE3/TRK/simulation/src/TRKLayer.cxx

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ TGeoVolume* TRKLayer::createChip(std::string type)
168168

169169
TGeoVolume* TRKLayer::createModule(std::string type)
170170
{
171-
TGeoMedium* medAir = gGeoManager->GetMedium("TRK_AIR$");
171+
TGeoMedium* medSi = gGeoManager->GetMedium("TRK_SILICON$");
172172
std::string moduleName = GeometryTGeo::getTRKModulePattern() + std::to_string(mLayerNumber);
173173

174174
TGeoShape* module;
175175
TGeoVolume* moduleVol;
176176

177177
if (type == "cylinder") {
178178
module = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, (constants::moduleMLOT::length * mNumberOfModules) / 2);
179-
moduleVol = new TGeoVolume(moduleName.c_str(), module, medAir);
179+
moduleVol = new TGeoVolume(moduleName.c_str(), module, medSi);
180180

181181
TGeoVolume* chipVol = createChip("cylinder");
182182
LOGP(debug, "Inserting {} in {} ", chipVol->GetName(), moduleVol->GetName());
@@ -186,7 +186,7 @@ TGeoVolume* TRKLayer::createModule(std::string type)
186186
double moduleLength = constants::moduleMLOT::length;
187187

188188
module = new TGeoBBox(moduleWidth / 2, mChipThickness / 2, moduleLength / 2); // TO BE CHECKED !!!
189-
moduleVol = new TGeoVolume(moduleName.c_str(), module, medAir);
189+
moduleVol = new TGeoVolume(moduleName.c_str(), module, medSi);
190190

191191
for (int iChip = 0; iChip < mHalfNumberOfChips; iChip++) {
192192
TGeoVolume* chipVolLeft = createChip("flat");
@@ -223,15 +223,15 @@ TGeoVolume* TRKLayer::createModule(std::string type)
223223

224224
TGeoVolume* TRKLayer::createHalfStave(std::string type)
225225
{
226-
TGeoMedium* medAir = gGeoManager->GetMedium("TRK_AIR$");
226+
TGeoMedium* medSi = gGeoManager->GetMedium("TRK_SILICON$");
227227
std::string halfStaveName = GeometryTGeo::getTRKHalfStavePattern() + std::to_string(mLayerNumber);
228228

229229
TGeoShape* halfStave;
230230
TGeoVolume* halfStaveVol;
231231

232232
if (type == "cylinder") {
233233
halfStave = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, mChipLength / 2);
234-
halfStaveVol = new TGeoVolume(halfStaveName.c_str(), halfStave, medAir);
234+
halfStaveVol = new TGeoVolume(halfStaveName.c_str(), halfStave, medSi);
235235

236236
TGeoVolume* moduleVol = createModule("cylinder");
237237
LOGP(debug, "Inserting {} in {} ", moduleVol->GetName(), halfStaveVol->GetName());
@@ -242,7 +242,7 @@ TGeoVolume* TRKLayer::createHalfStave(std::string type)
242242
double halfStaveLength = constants::moduleMLOT::length * mNumberOfModules;
243243

244244
halfStave = new TGeoBBox(halfStaveWidth / 2, mChipThickness / 2, halfStaveLength / 2);
245-
halfStaveVol = new TGeoVolume(halfStaveName.c_str(), halfStave, medAir);
245+
halfStaveVol = new TGeoVolume(halfStaveName.c_str(), halfStave, medSi);
246246

247247
for (int iModule = 0; iModule < mNumberOfModules; iModule++) {
248248
TGeoVolume* moduleVol = createModule("flat");
@@ -257,6 +257,9 @@ TGeoVolume* TRKLayer::createHalfStave(std::string type)
257257
halfStaveVol->AddNode(moduleVol, iModule, trans);
258258
}
259259
}
260+
261+
halfStaveVol->SetLineColor(kYellow);
262+
260263
return halfStaveVol;
261264
}
262265

@@ -296,11 +299,11 @@ TGeoVolume* TRKLayer::createStave(std::string type)
296299
staveVol->AddNode(moduleVol, iModule, trans);
297300
}
298301
} else if (type == "staggered") {
299-
/*double moduleWidth = constants::moduleMLOT::width;
300-
double moduleLength = constants::moduleMLOT::length;*/
302+
double overlap = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true)overlap
303+
double shift = overlap / 2;
301304

302-
double halfstaveWidth = constants::ML::width;
303-
double staveWidth = constants::OT::width; // Each stave has two modules (based on the LOI design)
305+
double halfstaveWidth = constants::OT::halfstave::width;
306+
double staveWidth = constants::OT::width - overlap;
304307
double staveLength = constants::moduleMLOT::length * mNumberOfModules;
305308

306309
stave = new TGeoBBox(staveWidth / 2, mLogicalVolumeThickness / 2, staveLength / 2);
@@ -311,12 +314,12 @@ TGeoVolume* TRKLayer::createStave(std::string type)
311314
TGeoVolume* halfStaveVolRight = createHalfStave("flat");
312315

313316
TGeoCombiTrans* transLeft = new TGeoCombiTrans();
314-
transLeft->SetTranslation(-halfstaveWidth / 2 + 0.05, 0, 0); // TO BE CHECKED !!! 1mm overlap between the modules
317+
transLeft->SetTranslation(-halfstaveWidth / 2 + shift, 0, 0); // TO BE CHECKED !!! 1mm overlap between the modules
315318
LOGP(debug, "Inserting {} in {} ", halfStaveVolLeft->GetName(), staveVol->GetName());
316319
staveVol->AddNode(halfStaveVolLeft, 0, transLeft);
317320

318321
TGeoCombiTrans* transRight = new TGeoCombiTrans();
319-
transRight->SetTranslation(halfstaveWidth / 2 - 0.05, 0.2, 0); // TO BE CHECKED !!! 1mm overlap between the modules
322+
transRight->SetTranslation(halfstaveWidth / 2 - shift, 0.2, 0); // TO BE CHECKED !!! 1mm overlap between the modules
320323
LOGP(debug, "Inserting {} in {} ", halfStaveVolRight->GetName(), staveVol->GetName());
321324
staveVol->AddNode(halfStaveVolRight, 1, transRight);
322325
} else {
@@ -377,21 +380,23 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
377380
// Put the staves in the correct position and orientation
378381
TGeoCombiTrans* trans = new TGeoCombiTrans();
379382
double theta = 360. * iStave / nStaves;
380-
TGeoRotation* rot = new TGeoRotation("rot", theta + 90 + 3, 0, 0);
383+
TGeoRotation* rot = new TGeoRotation("rot", theta - 90 + 3, 0, 0);
381384
trans->SetRotation(rot);
382385
trans->SetTranslation(mInnerRadius * std::cos(2. * TMath::Pi() * iStave / nStaves), mInnerRadius * std::sin(2 * TMath::Pi() * iStave / nStaves), 0);
383386

384387
LOGP(debug, "Inserting {} in {} ", staveVol->GetName(), layerVol->GetName());
385388
layerVol->AddNode(staveVol, iStave, trans);
386389
}
387390
} else if (mLayout == kStaggered) {
391+
double overlapInStave = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true)overlap
392+
388393
double layerLength = constants::moduleMLOT::length * mNumberOfModules;
394+
double staveWidth = constants::OT::width - overlapInStave;
389395

390396
layer = new TGeoTube(mInnerRadius - 0.333 * layerThickness, mInnerRadius + 0.667 * layerThickness, layerLength / 2);
391397
layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
392398

393399
// Compute the number of staves
394-
double staveWidth = constants::OT::width; // Each stave has two modules (based on the LOI design)
395400
int nStaves = (int)std::ceil(mInnerRadius * 2 * TMath::Pi() / staveWidth);
396401
nStaves += nStaves % 2; // Require an even number of staves
397402

@@ -410,7 +415,7 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
410415
// Put the staves in the correct position and orientation
411416
TGeoCombiTrans* trans = new TGeoCombiTrans();
412417
double theta = 360. * iStave / nStaves;
413-
TGeoRotation* rot = new TGeoRotation("rot", theta + 90, 0, 0);
418+
TGeoRotation* rot = new TGeoRotation("rot", theta - 90 + 3, 0, 0);
414419
trans->SetRotation(rot);
415420
trans->SetTranslation(mInnerRadius * std::cos(2. * TMath::Pi() * iStave / nStaves), mInnerRadius * std::sin(2 * TMath::Pi() * iStave / nStaves), 0);
416421

0 commit comments

Comments
 (0)