Skip to content

Commit e59f5cb

Browse files
authored
[ALICE3] TRK: fix extrusions and overlaps b/n staves (#15105)
1 parent d19919c commit e59f5cb

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Detectors/Upgrades/ALICE3/TRK/simulation/include/TRKSimulation/TRKLayer.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,26 @@ class TRKLayer
5151

5252
private:
5353
// TGeo objects outside logical volumes can cause errors. Only used in case of kStaggered and kTurboStaves layouts
54-
static constexpr float mLogicalVolumeThickness = 1;
54+
static constexpr float mLogicalVolumeThickness = 1.3;
5555

56+
// User defined parameters for the layer, to be set in the constructor
5657
int mLayerNumber;
57-
eLayout mLayout;
5858
std::string mLayerName;
5959
float mInnerRadius;
6060
float mOuterRadius;
6161
int mNumberOfModules;
6262
float mX2X0;
63-
float mChipWidth;
64-
float mChipLength;
6563
float mChipThickness;
66-
float mDeadzoneWidth;
67-
float mSensorThickness;
68-
int mHalfNumberOfChips;
64+
65+
// Fixed parameters for the layer, to be set based on the specifications of the chip and module
66+
eLayout mLayout = kCylinder;
67+
float mChipWidth = constants::moduleMLOT::chip::width;
68+
float mChipLength = constants::moduleMLOT::chip::length;
69+
float mDeadzoneWidth = constants::moduleMLOT::chip::passiveEdgeReadOut;
70+
float mSensorThickness = constants::moduleMLOT::silicon::thickness;
71+
int mHalfNumberOfChips = 4;
72+
73+
static constexpr float Si_X0 = 9.5f;
6974

7075
ClassDef(TRKLayer, 2);
7176
};

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,15 @@ namespace o2
2626
namespace trk
2727
{
2828
TRKLayer::TRKLayer(int layerNumber, std::string layerName, float rInn, float rOut, int numberOfModules, float layerX2X0)
29-
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mOuterRadius(rOut), mNumberOfModules(numberOfModules), mX2X0(layerX2X0), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(constants::moduleMLOT::chip::passiveEdgeReadOut), mSensorThickness(constants::moduleMLOT::silicon::thickness), mHalfNumberOfChips(4)
29+
: mLayerNumber(layerNumber), mLayerName(layerName), mInnerRadius(rInn), mOuterRadius(rOut), mNumberOfModules(numberOfModules), mX2X0(layerX2X0)
3030
{
31-
float Si_X0 = 9.5f;
3231
mChipThickness = mX2X0 * Si_X0;
3332
LOGP(info, "Creating layer: id: {} rInner: {} rOuter: {} zLength: {} x2X0: {}", mLayerNumber, mInnerRadius, mOuterRadius, getZ(), mX2X0);
3433
}
3534

3635
TRKLayer::TRKLayer(int layerNumber, std::string layerName, float rInn, int numberOfModules, float thick)
37-
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mNumberOfModules(numberOfModules), mChipThickness(thick), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(constants::moduleMLOT::chip::passiveEdgeReadOut), mSensorThickness(constants::moduleMLOT::silicon::thickness), mHalfNumberOfChips(4)
36+
: mLayerNumber(layerNumber), mLayerName(layerName), mInnerRadius(rInn), mNumberOfModules(numberOfModules), mChipThickness(thick)
3837
{
39-
float Si_X0 = 9.5f;
4038
mOuterRadius = rInn + thick;
4139
mX2X0 = mChipThickness / Si_X0;
4240
LOGP(info, "Creating layer: id: {} rInner: {} rOuter: {} zLength: {} x2X0: {}", mLayerNumber, mInnerRadius, mOuterRadius, getZ(), mX2X0);
@@ -300,12 +298,9 @@ TGeoVolume* TRKLayer::createStave(std::string type)
300298
} else if (type == "staggered") {
301299
double overlap = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true)overlap
302300
double shift = overlap / 2;
303-
304301
double halfstaveWidth = constants::OT::halfstave::width;
305-
double staveWidth = constants::OT::width - overlap;
306302

307-
stave = new TGeoBBox(staveWidth / 2, mLogicalVolumeThickness / 2, staveLength / 2);
308-
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
303+
staveVol = new TGeoVolumeAssembly(staveName.c_str());
309304

310305
// Put the half staves in the correct position
311306
TGeoVolume* halfStaveVolLeft = createHalfStave("flat");
@@ -379,7 +374,7 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
379374
// Put the staves in the correct position and orientation
380375
TGeoCombiTrans* trans = new TGeoCombiTrans();
381376
double theta = 360. * iStave / nStaves;
382-
TGeoRotation* rot = new TGeoRotation("rot", theta - 90 + 3, 0, 0);
377+
TGeoRotation* rot = new TGeoRotation("rot", theta - 90 + 4, 0, 0);
383378
trans->SetRotation(rot);
384379
trans->SetTranslation(mInnerRadius * std::cos(2. * TMath::Pi() * iStave / nStaves), mInnerRadius * std::sin(2 * TMath::Pi() * iStave / nStaves), 0);
385380

@@ -413,7 +408,7 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
413408
// Put the staves in the correct position and orientation
414409
TGeoCombiTrans* trans = new TGeoCombiTrans();
415410
double theta = 360. * iStave / nStaves;
416-
TGeoRotation* rot = new TGeoRotation("rot", theta - 90 + 3, 0, 0);
411+
TGeoRotation* rot = new TGeoRotation("rot", theta - 90, 0, 0);
417412
trans->SetRotation(rot);
418413
trans->SetTranslation(mInnerRadius * std::cos(2. * TMath::Pi() * iStave / nStaves), mInnerRadius * std::sin(2 * TMath::Pi() * iStave / nStaves), 0);
419414

0 commit comments

Comments
 (0)