117 const double carbonFiberThickness = 0.01;
118 const double foamSpacingThickness = 0.5;
120 TGeoTube* carbonFiberLayer =
new TGeoTube(mInnerRadius, mOuterRadius, carbonFiberThickness / 2);
123 TGeoVolume* carbonFiberLayerVol1 =
new TGeoVolume((separationLayerName +
"_CarbonFiber1").c_str(), carbonFiberLayer,
medCarbonFiber);
124 TGeoVolume* carbonFiberLayerVol2 =
new TGeoVolume((separationLayerName +
"_CarbonFiber2").c_str(), carbonFiberLayer,
medCarbonFiber);
126 carbonFiberLayerVol1->SetLineColor(kGray + 2);
127 carbonFiberLayerVol2->SetLineColor(kGray + 2);
129 const double zSeparation = foamSpacingThickness / 2.0 + carbonFiberThickness / 2.0;
131 motherVolume->AddNode(carbonFiberLayerVol1, 1,
new TGeoTranslation(0, 0, mZ - zSeparation));
132 motherVolume->AddNode(carbonFiberLayerVol2, 1,
new TGeoTranslation(0, 0, mZ + zSeparation));
134 const double pipeOuterRadius = 0.20;
135 const double kaptonThickness = 0.0025;
136 const double pipeInnerRadius = pipeOuterRadius - kaptonThickness;
137 const double pipeMaxLength = mOuterRadius * 2.0;
146 std::vector<double> X_pos = {-62.3168, -57.9836, -53.650400000000005, -49.317200000000014, -44.984000000000016, -40.65080000000002, -36.31760000000002, -31.984400000000026, -27.65120000000003, -23.318000000000037, -18.98480000000004, -14.651600000000043, -10.318400000000047, -5.98520000000005, -1.6520000000000519, 2.6811999999999445, 7.014399999999941, 11.347599999999936, 15.680799999999934, 20.01399999999993, 24.347199999999926, 28.68039999999992, 33.013599999999926, 37.34679999999992, 41.980000000000004, 46.613200000000006, 51.246399999999994, 55.87960000000001, 60.5128};
148 for (
double xPos : X_pos) {
150 double pipeLength = pipeMaxLength;
153 TGeoRotation* rotation =
new TGeoRotation();
154 rotation->RotateX(90);
156 if (std::abs(xPos) < mInnerRadius) {
157 double yInner = std::abs(y_circle(xPos, mInnerRadius));
158 double yOuter = std::abs(y_circle(xPos, mOuterRadius));
163 double positiveYLength = yOuter - yInner;
165 TGeoVolume* kaptonPipePos =
new TGeoVolume((separationLayerName +
"_KaptonPipePos_" +
std::to_string(name_it)).c_str(),
new TGeoTube(pipeInnerRadius, pipeOuterRadius, positiveYLength / 2),
kaptonMed);
166 kaptonPipePos->SetLineColor(kGray);
167 TGeoVolume* waterVolumePos =
new TGeoVolume((separationLayerName +
"_WaterVolumePos_" +
std::to_string(name_it)).c_str(),
new TGeoTube(0.0, pipeInnerRadius, positiveYLength / 2),
waterMed);
168 waterVolumePos->SetLineColor(kBlue);
170 motherVolume->AddNode(waterVolumePos, 1,
new TGeoCombiTrans(xPos, (yInner + yOuter) / 2.0, mZ, rotation));
172 TGeoVolume* kaptonPipeNeg =
new TGeoVolume((separationLayerName +
"_KaptonPipeNeg_" +
std::to_string(name_it)).c_str(),
new TGeoTube(pipeInnerRadius, pipeOuterRadius, positiveYLength / 2),
kaptonMed);
173 kaptonPipeNeg->SetLineColor(kGray);
174 TGeoVolume* waterVolumeNeg =
new TGeoVolume((separationLayerName +
"_WaterVolumeNeg_" +
std::to_string(name_it)).c_str(),
new TGeoTube(0.0, pipeInnerRadius, positiveYLength / 2),
waterMed);
175 waterVolumeNeg->SetLineColor(kBlue);
177 motherVolume->AddNode(waterVolumeNeg, 1,
new TGeoCombiTrans(xPos, -(yInner + yOuter) / 2.0, mZ, rotation));
179 motherVolume->AddNode(kaptonPipePos, 1,
new TGeoCombiTrans(xPos, (yInner + yOuter) / 2.0, mZ, rotation));
180 motherVolume->AddNode(kaptonPipeNeg, 1,
new TGeoCombiTrans(xPos, -(yInner + yOuter) / 2.0, mZ, rotation));
184 double yOuter = std::abs(y_circle(xPos, mOuterRadius));
188 TGeoVolume* kaptonPipe =
new TGeoVolume((separationLayerName +
"_KaptonPipe_" +
std::to_string(name_it)).c_str(),
new TGeoTube(pipeInnerRadius, pipeOuterRadius, pipeLength / 2),
kaptonMed);
189 kaptonPipe->SetLineColor(kGray);
190 TGeoVolume* waterVolume =
new TGeoVolume((separationLayerName +
"_WaterVolume_" +
std::to_string(name_it)).c_str(),
new TGeoTube(0.0, pipeInnerRadius, pipeLength / 2),
waterMed);
191 waterVolume->SetLineColor(kBlue);
193 motherVolume->AddNode(waterVolume, 1,
new TGeoCombiTrans(xPos, 0, mZ, rotation));
194 motherVolume->AddNode(kaptonPipe, 1,
new TGeoCombiTrans(xPos, 0, mZ, rotation));
206 constexpr double carbonFiberThickness = 0.01;
207 constexpr double foamSpacingThickness = 1.0;
209 TGeoTube* carbonFiberLayer =
new TGeoTube(mInnerRadius, mOuterRadius, carbonFiberThickness / 2);
210 TGeoTube* foamLayer =
new TGeoTube(mInnerRadius, mOuterRadius, foamSpacingThickness / 2);
213 TGeoVolume* carbonFiberLayerVol1 =
new TGeoVolume((separationLayerName +
"_CarbonFiber1").c_str(), carbonFiberLayer,
medCarbonFiber);
214 TGeoVolume* foamLayerVol =
new TGeoVolume((separationLayerName +
"_Foam").c_str(), foamLayer,
medFoam);
215 TGeoVolume* carbonFiberLayerVol2 =
new TGeoVolume((separationLayerName +
"_CarbonFiber2").c_str(), carbonFiberLayer,
medCarbonFiber);
217 carbonFiberLayerVol1->SetLineColor(kGray + 2);
218 foamLayerVol->SetLineColor(kBlack);
219 foamLayerVol->SetFillColorAlpha(kBlack, 1.0);
220 carbonFiberLayerVol2->SetLineColor(kGray + 2);
222 const double zSeparation = foamSpacingThickness / 2.0 + carbonFiberThickness / 2.0;
224 motherVolume->AddNode(carbonFiberLayerVol1, 1,
new TGeoTranslation(0, 0, 0 - zSeparation));
225 motherVolume->AddNode(foamLayerVol, 1,
new TGeoTranslation(0, 0, 0));
226 motherVolume->AddNode(carbonFiberLayerVol2, 1,
new TGeoTranslation(0, 0, 0 + zSeparation));
233 if (mLayerNumber < 0) {
234 LOG(fatal) <<
"Invalid layer number " << mLayerNumber <<
" for FT3 layer.";
237 LOG(info) <<
"FT3: ft3Params.layoutFT3 = " << ft3Params.layoutFT3;
251 TGeoMedium* medSi = gGeoManager->GetMedium(
"FT3_SILICON$");
252 TGeoMedium* medAir = gGeoManager->GetMedium(
"FT3_AIR$");
254 TGeoTube*
layer =
new TGeoTube(mInnerRadius, mOuterRadius, mChipThickness / 2);
255 TGeoVolume* layerVol =
new TGeoVolume(mLayerName.c_str(),
layer, medAir);
256 layerVol->SetLineColor(kGray);
258 const int NtrapezoidalSegments = ft3Params.nTrapezoidalSegments;
260 const double dz = mChipThickness / 2;
261 const double dzSensor = mSensorThickness / 2;
263 const double dphi = 2.0 * TMath::Pi() / NtrapezoidalSegments;
264 double innerRadiusTrapezoidCorner = mInnerRadius / sin((TMath::Pi() - dphi) / 2);
266 const double rc = 0.5 * (innerRadiusTrapezoidCorner + mOuterRadius) * TMath::Cos(0.5 * dphi);
267 const double h = 0.5 * (mOuterRadius - innerRadiusTrapezoidCorner) * TMath::Cos(0.5 * dphi);
270 const double bl = innerRadiusTrapezoidCorner * TMath::Sin(0.5 * dphi);
271 const double tl = mOuterRadius * TMath::Sin(0.5 * dphi);
274 for (
int iTr = 0; iTr < NtrapezoidalSegments; ++iTr) {
276 auto trdShapeChip =
new TGeoTrap(dz,
286 TGeoVolume* trapezoidChipVolume =
new TGeoVolume(chipName.c_str(), trdShapeChip, medSi);
287 trapezoidChipVolume->SetLineColor(kCyan);
288 trapezoidChipVolume->SetTransparency(50);
291 auto trdShapeSensor =
new TGeoTrap(dzSensor,
301 TGeoVolume* trapezoidSensorVolume =
new TGeoVolume(sensName.c_str(), trdShapeSensor, medSi);
302 trapezoidSensorVolume->SetLineColor(kYellow);
305 const double zSensorInChip = (dz - dzSensor) * (mZ < 0 ? 1 : -1);
306 TGeoCombiTrans* transSens =
new TGeoCombiTrans();
307 transSens->SetTranslation(0, 0, zSensorInChip);
308 trapezoidChipVolume->AddNode(trapezoidSensorVolume, iTr, transSens);
311 auto trdShapePassive =
new TGeoTrap(dz - dzSensor,
321 TGeoVolume* trapezoidPassiveVolume =
new TGeoVolume(passiveName.c_str(), trdShapePassive, medSi);
322 trapezoidPassiveVolume->SetLineColor(kGray);
325 const double zPassiveInChip = (-dzSensor) * (mZ < 0 ? 1 : -1);
326 TGeoCombiTrans* transPassive =
new TGeoCombiTrans();
327 transPassive->SetTranslation(0, 0, zPassiveInChip);
328 trapezoidChipVolume->AddNode(trapezoidPassiveVolume, iTr, transPassive);
331 const double phi_c = (iTr + 0.5) * dphi;
332 const double phi_deg = phi_c * 180.0 / TMath::Pi();
335 const double x = rc * TMath::Cos(phi_c);
336 const double y = rc * TMath::Sin(phi_c);
337 const double z = 0.0;
340 auto rot =
new TGeoRotation();
341 rot->RotateZ(phi_deg - 90.0);
342 auto transf =
new TGeoCombiTrans(
x,
y,
z, rot);
344 layerVol->AddNode(trapezoidChipVolume, iTr, transf);
347 LOG(info) <<
"Inserting " << NtrapezoidalSegments <<
" trapezoidal segments (Rmin="
348 << mInnerRadius <<
", Rmax=" << mOuterRadius <<
", z = " << mZ <<
"cm) inside " << layerVol->GetName();
350 auto* diskRotation =
new TGeoRotation(
"TrapezoidalDiskRotation", 0, 0, 0);
351 auto* diskCombiTrans =
new TGeoCombiTrans(0, 0, mZ, diskRotation);
352 motherVolume->AddNode(layerVol, 1, diskCombiTrans);
358 TGeoTube* sensor =
new TGeoTube(mInnerRadius, mOuterRadius, mChipThickness / 2);
359 TGeoTube* chip =
new TGeoTube(mInnerRadius, mOuterRadius, mChipThickness / 2);
360 TGeoTube*
layer =
new TGeoTube(mInnerRadius, mOuterRadius, mChipThickness / 2);
362 TGeoMedium* medSi = gGeoManager->GetMedium(
"FT3_SILICON$");
363 TGeoMedium* medAir = gGeoManager->GetMedium(
"FT3_AIR$");
365 TGeoVolume* sensVol =
new TGeoVolume(sensName.c_str(), sensor, medSi);
366 sensVol->SetLineColor(kYellow);
367 TGeoVolume* chipVol =
new TGeoVolume(chipName.c_str(), chip, medSi);
368 chipVol->SetLineColor(kYellow);
369 TGeoVolume* layerVol =
new TGeoVolume(mLayerName.c_str(),
layer, medAir);
370 layerVol->SetLineColor(kYellow);
372 LOG(info) <<
"Inserting " << sensVol->GetName() <<
" inside " << chipVol->GetName();
373 chipVol->AddNode(sensVol, 1,
nullptr);
375 LOG(info) <<
"Inserting " << chipVol->GetName() <<
" inside " << layerVol->GetName();
376 layerVol->AddNode(chipVol, 1,
nullptr);
379 auto* FwdDiskRotation =
new TGeoRotation(
"FwdDiskRotation", 0, 0, 180);
380 auto* FwdDiskCombiTrans =
new TGeoCombiTrans(0, 0, mZ, FwdDiskRotation);
382 LOG(info) <<
"Inserting " << layerVol->GetName() <<
" inside " << motherVolume->GetName();
383 motherVolume->AddNode(layerVol, 1, FwdDiskCombiTrans);
384 }
else if (ft3Params.layoutFT3 ==
kSegmented) {
392 TGeoMedium* medAir = gGeoManager->GetMedium(
"FT3_AIR$");
393 TGeoTube*
layer =
new TGeoTube(mInnerRadius, mOuterRadius, 12 * mChipThickness / 2);
394 TGeoVolume* layerVol =
new TGeoVolume(mLayerName.c_str(),
layer, medAir);
395 layerVol->SetLineColor(kYellow + 2);
401 module.createModule(0, mLayerNumber, mDirection, mInnerRadius, mOuterRadius, 0., "front", "rectangular", layerVol);
402 module.createModule(0, mLayerNumber, mDirection, mInnerRadius, mOuterRadius, 0., "back", "rectangular", layerVol);
405 auto* FwdDiskRotation =
new TGeoRotation(
"FwdDiskRotation", 0, 0, 180);
406 auto* FwdDiskCombiTrans =
new TGeoCombiTrans(0, 0, mZ, FwdDiskRotation);
408 LOG(info) <<
"Inserting " << layerVol->GetName() <<
" inside " << motherVolume->GetName();
409 motherVolume->AddNode(layerVol, 1, FwdDiskCombiTrans);
411 LOG(fatal) <<
"Unknown FT3 layout option: " <<
static_cast<int>(ft3Params.layoutFT3);