Skip to content

Commit 5efdfee

Browse files
committed
Removed mModuleWidth and fixed createLayer
1 parent 280f928 commit 5efdfee

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class TRKLayer
5757
float mOuterRadius;
5858
float mZ;
5959
float mX2X0;
60-
float mModuleWidth; // u.m. = cm
6160
float mChipWidth;
6261
float mChipLength;
6362
float mChipThickness;

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ namespace o2
2626
namespace trk
2727
{
2828
TRKLayer::TRKLayer(int layerNumber, std::string layerName, float rInn, float rOut, float zLength, float layerX2X0)
29-
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mOuterRadius(rOut), mZ(zLength), mX2X0(layerX2X0), mModuleWidth(4.54), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(1.5 * 1e-1)
29+
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mOuterRadius(rOut), mZ(zLength), mX2X0(layerX2X0), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(1.5 * 1e-1)
3030
{
3131
float Si_X0 = 9.5f;
3232
mChipThickness = mX2X0 * Si_X0;
3333
LOGP(info, "Creating layer: id: {} rInner: {} rOuter: {} zLength: {} x2X0: {}", mLayerNumber, mInnerRadius, mOuterRadius, mZ, mX2X0);
3434
}
3535

3636
TRKLayer::TRKLayer(int layerNumber, std::string layerName, float rInn, float zLength, float thick)
37-
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mZ(zLength), mChipThickness(thick), mModuleWidth(4.54), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(1.5 * 1e-1)
37+
: mLayerNumber(layerNumber), mLayout(kCylinder), mLayerName(layerName), mInnerRadius(rInn), mZ(zLength), mChipThickness(thick), mChipWidth(constants::moduleMLOT::chip::width), mChipLength(constants::moduleMLOT::chip::length), mDeadzoneWidth(1.5 * 1e-1)
3838
{
3939
float Si_X0 = 9.5f;
4040
mOuterRadius = rInn + thick;
@@ -281,19 +281,19 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
281281
layerVol->AddNode(staveVol, 1, nullptr);
282282
} else if (mLayout == eLayout::kTurboStaves) {
283283
// Compute the number of staves
284-
double width = mModuleWidth; // Each stave has two modules (based on the LOI design)
284+
double staveWidth = constants::ML::width; // Each stave has two modules (based on the LOI design)
285285
if (mInnerRadius > 25) {
286-
width *= 2; // Outer layers have two modules per stave
286+
staveWidth = constants::OT::width; // Outer layers have two modules per stave
287287
}
288-
int nStaves = (int)std::ceil(mInnerRadius * 2 * TMath::Pi() / width);
288+
int nStaves = (int)std::ceil(mInnerRadius * 2 * TMath::Pi() / staveWidth);
289289
nStaves += nStaves % 2; // Require an even number of staves
290290

291291
// Compute the size of the overlap region
292292
double theta = 2 * TMath::Pi() / nStaves;
293-
double theta1 = std::atan(width / 2 / mInnerRadius);
293+
double theta1 = std::atan(staveWidth / 2 / mInnerRadius);
294294
double st = std::sin(theta);
295295
double ct = std::cos(theta);
296-
double theta2 = std::atan((mInnerRadius * st - width / 2 * ct) / (mInnerRadius * ct + width / 2 * st));
296+
double theta2 = std::atan((mInnerRadius * st - staveWidth / 2 * ct) / (mInnerRadius * ct + staveWidth / 2 * st));
297297
double overlap = (theta1 - theta2) * mInnerRadius;
298298
LOGP(info, "Creating a layer with {} staves and {} mm overlap", nStaves, overlap * 10);
299299

@@ -312,16 +312,16 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
312312
}
313313
} else if (mLayout == kStaggered) {
314314
// Compute the number of staves
315-
double width = mModuleWidth * 2; // Each stave has two modules (based on the LOI design)
316-
int nStaves = (int)std::ceil(mInnerRadius * 2 * TMath::Pi() / width);
315+
double staveWidth = constants::OT::width; // Each stave has two modules (based on the LOI design)
316+
int nStaves = (int)std::ceil(mInnerRadius * 2 * TMath::Pi() / staveWidth);
317317
nStaves += nStaves % 2; // Require an even number of staves
318318

319319
// Compute the size of the overlap region
320320
double theta = 2 * TMath::Pi() / nStaves;
321-
double theta1 = std::atan(width / 2 / mInnerRadius);
321+
double theta1 = std::atan(staveWidth / 2 / mInnerRadius);
322322
double st = std::sin(theta);
323323
double ct = std::cos(theta);
324-
double theta2 = std::atan((mInnerRadius * st - width / 2 * ct) / (mInnerRadius * ct + width / 2 * st));
324+
double theta2 = std::atan((mInnerRadius * st - staveWidth / 2 * ct) / (mInnerRadius * ct + staveWidth / 2 * st));
325325
double overlap = (theta1 - theta2) * mInnerRadius;
326326
LOGP(info, "Creating a layer with {} staves and {} mm overlap", nStaves, overlap * 10);
327327

0 commit comments

Comments
 (0)