Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 15 additions & 17 deletions Detectors/Upgrades/ALICE3/TRK/simulation/src/TRKLayer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,12 @@ TGeoVolume* TRKLayer::createChip(std::string type)
chipVol = new TGeoVolume(chipName.c_str(), chip, medSi);

sensVol = createSensor("cylinder");
metalVol = createMetalStack("cylinder");

TGeoCombiTrans* transSens = new TGeoCombiTrans();
transSens->SetTranslation(0, -(mChipThickness - mSensorThickness) / 2, 0); // TO BE CHECKED !!!
LOGP(debug, "Inserting {} in {} ", sensVol->GetName(), chipVol->GetName());
chipVol->AddNode(sensVol, 1, transSens);
chipVol->AddNode(sensVol, 1, nullptr);

TGeoCombiTrans* transMetal = new TGeoCombiTrans();
transMetal->SetTranslation(0, mSensorThickness / 2, 0); // TO BE CHECKED !!!
metalVol = createMetalStack("cylinder");
LOGP(debug, "Inserting {} in {} ", metalVol->GetName(), chipVol->GetName());
chipVol->AddNode(metalVol, 1, transMetal);
chipVol->AddNode(metalVol, 1, nullptr);

// deadVol = createDeadzone("cylinder");
} else if (type == "flat") {
Expand Down Expand Up @@ -175,7 +170,9 @@ TGeoVolume* TRKLayer::createModule(std::string type)
TGeoVolume* moduleVol;

if (type == "cylinder") {
module = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, (constants::moduleMLOT::length * mNumberOfModules) / 2);
double moduleLength = constants::moduleMLOT::length * mNumberOfModules;

module = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, moduleLength / 2);
moduleVol = new TGeoVolume(moduleName.c_str(), module, medSi);

TGeoVolume* chipVol = createChip("cylinder");
Expand Down Expand Up @@ -229,8 +226,10 @@ TGeoVolume* TRKLayer::createHalfStave(std::string type)
TGeoShape* halfStave;
TGeoVolume* halfStaveVol;

double halfStaveLength = constants::moduleMLOT::length * mNumberOfModules;

if (type == "cylinder") {
halfStave = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, mChipLength / 2);
halfStave = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, halfStaveLength / 2);
halfStaveVol = new TGeoVolume(halfStaveName.c_str(), halfStave, medSi);

TGeoVolume* moduleVol = createModule("cylinder");
Expand All @@ -239,7 +238,6 @@ TGeoVolume* TRKLayer::createHalfStave(std::string type)
} else if (type == "flat") {
double moduleLength = constants::moduleMLOT::length;
double halfStaveWidth = constants::OT::halfstave::width;
double halfStaveLength = constants::moduleMLOT::length * mNumberOfModules;

halfStave = new TGeoBBox(halfStaveWidth / 2, mChipThickness / 2, halfStaveLength / 2);
halfStaveVol = new TGeoVolume(halfStaveName.c_str(), halfStave, medSi);
Expand Down Expand Up @@ -271,8 +269,10 @@ TGeoVolume* TRKLayer::createStave(std::string type)
TGeoShape* stave;
TGeoVolume* staveVol;

double staveLength = constants::moduleMLOT::length * mNumberOfModules;

if (type == "cylinder") {
stave = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, (constants::moduleMLOT::length * mNumberOfModules) / 2);
stave = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, staveLength / 2);
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);

TGeoVolume* moduleVol = createModule("cylinder");
Expand All @@ -281,7 +281,6 @@ TGeoVolume* TRKLayer::createStave(std::string type)
} else if (type == "flat") {
double moduleLength = constants::moduleMLOT::length;
double staveWidth = constants::ML::width;
double staveLength = constants::moduleMLOT::length * mNumberOfModules;

stave = new TGeoBBox(staveWidth / 2, mChipThickness / 2, staveLength / 2);
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
Expand All @@ -304,7 +303,6 @@ TGeoVolume* TRKLayer::createStave(std::string type)

double halfstaveWidth = constants::OT::halfstave::width;
double staveWidth = constants::OT::width - overlap;
double staveLength = constants::moduleMLOT::length * mNumberOfModules;

stave = new TGeoBBox(staveWidth / 2, mLogicalVolumeThickness / 2, staveLength / 2);
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
Expand Down Expand Up @@ -343,15 +341,16 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
TGeoTube* layer;
TGeoVolume* layerVol;

double layerLength = constants::moduleMLOT::length * mNumberOfModules;

if (mLayout == eLayout::kCylinder) {
layer = new TGeoTube(mInnerRadius - 0.333 * layerThickness, mInnerRadius + 0.667 * layerThickness, (constants::moduleMLOT::length * mNumberOfModules) / 2);
layer = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, layerLength / 2);
layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);

TGeoVolume* staveVol = createStave("cylinder");
LOGP(debug, "Inserting {} in {} ", staveVol->GetName(), layerVol->GetName());
layerVol->AddNode(staveVol, 1, nullptr);
} else if (mLayout == eLayout::kTurboStaves) {
double layerLength = constants::moduleMLOT::length * mNumberOfModules;
double staveWidth = constants::ML::width; // Each stave has two modules (based on the LOI design)

if (mInnerRadius > 25) {
Expand Down Expand Up @@ -390,7 +389,6 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
} else if (mLayout == kStaggered) {
double overlapInStave = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true)overlap

double layerLength = constants::moduleMLOT::length * mNumberOfModules;
double staveWidth = constants::OT::width - overlapInStave;

layer = new TGeoTube(mInnerRadius - 0.333 * layerThickness, mInnerRadius + 0.667 * layerThickness, layerLength / 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void TRKServices::createMiddleServices(TGeoVolume* motherVolume)
// Carbon Fiber Cylinder support for the middle tracker
float rMinMiddleCarbonSupport = 34.8f; // Arbitrary value
float rMaxMiddleCarbonSupport = 35.f; // 2 mm of carbon fiber
const float zLengthMiddleCarbon = 62.f;
const float zLengthMiddleCarbon = 64.2f;
TGeoTube* middleBarrelCarbonSupport = new TGeoTube("TRK_MID_CARBONSUPPORTsh", rMinMiddleCarbonSupport, rMaxMiddleCarbonSupport, zLengthMiddleCarbon);
TGeoVolume* middleBarrelCarbonSupportVolume = new TGeoVolume("TRK_MID_CARBONSUPPORT", middleBarrelCarbonSupport, medCFiber);
middleBarrelCarbonSupportVolume->SetLineColor(kGray);
Expand Down Expand Up @@ -318,7 +318,7 @@ void TRKServices::createMiddleServices(TGeoVolume* motherVolume)
// Middle barrel connection disks
const float rMinMiddleBarrelDisk = 5.68f;
const float rMaxMiddleBarrelDisk = 35.f;
const float zLengthMiddleBarrel = 62.f;
const float zLengthMiddleBarrel = 64.2f;
for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
TGeoTube* middleBarrelConnDiskSIO2 = new TGeoTube(Form("TRK_MIDBARCONN_DISK_SIO2sh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, siO2FiberThick);
TGeoTube* middleBarrelConnDiskPE = new TGeoTube(Form("TRK_MIDBARCONN_DISK_PEsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, peFiberThick);
Expand Down