113 double carbonFiberThickness = 0.01;
114 double foamSpacingThickness = 0.5;
116 TGeoTube* carbonFiberLayer =
new TGeoTube(mInnerRadius, mOuterRadius, carbonFiberThickness / 2);
119 TGeoVolume* carbonFiberLayerVol1 =
new TGeoVolume((separationLayerName +
"_CarbonFiber1").c_str(), carbonFiberLayer,
medCarbonFiber);
120 TGeoVolume* carbonFiberLayerVol2 =
new TGeoVolume((separationLayerName +
"_CarbonFiber2").c_str(), carbonFiberLayer,
medCarbonFiber);
122 carbonFiberLayerVol1->SetLineColor(kGray + 2);
123 carbonFiberLayerVol2->SetLineColor(kGray + 2);
125 double zSeparation = foamSpacingThickness / 2.0 + carbonFiberThickness / 2.0;
127 motherVolume->AddNode(carbonFiberLayerVol1, 1,
new TGeoTranslation(0, 0, mZ - zSeparation));
128 motherVolume->AddNode(carbonFiberLayerVol2, 1,
new TGeoTranslation(0, 0, mZ + zSeparation));
130 double pipeOuterRadius = 0.20;
131 double kaptonThickness = 0.0025;
132 double pipeInnerRadius = pipeOuterRadius - kaptonThickness;
133 double pipeMaxLength = mOuterRadius * 2.0;
142 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};
144 for (
double xPos : X_pos) {
146 double pipeLength = pipeMaxLength;
149 TGeoRotation* rotation =
new TGeoRotation();
150 rotation->RotateX(90);
152 if (std::abs(xPos) < mInnerRadius) {
153 double yInner = std::abs(y_circle(xPos, mInnerRadius));
154 double yOuter = std::abs(y_circle(xPos, mOuterRadius));
159 double positiveYLength = yOuter - yInner;
161 TGeoVolume* kaptonPipePos =
new TGeoVolume((separationLayerName +
"_KaptonPipePos_" +
std::to_string(name_it)).c_str(),
new TGeoTube(pipeInnerRadius, pipeOuterRadius, positiveYLength / 2),
kaptonMed);
162 kaptonPipePos->SetLineColor(kGray);
163 TGeoVolume* waterVolumePos =
new TGeoVolume((separationLayerName +
"_WaterVolumePos_" +
std::to_string(name_it)).c_str(),
new TGeoTube(0.0, pipeInnerRadius, positiveYLength / 2),
waterMed);
164 waterVolumePos->SetLineColor(kBlue);
166 motherVolume->AddNode(waterVolumePos, 1,
new TGeoCombiTrans(xPos, (yInner + yOuter) / 2.0, mZ, rotation));
168 TGeoVolume* kaptonPipeNeg =
new TGeoVolume((separationLayerName +
"_KaptonPipeNeg_" +
std::to_string(name_it)).c_str(),
new TGeoTube(pipeInnerRadius, pipeOuterRadius, positiveYLength / 2),
kaptonMed);
169 kaptonPipeNeg->SetLineColor(kGray);
170 TGeoVolume* waterVolumeNeg =
new TGeoVolume((separationLayerName +
"_WaterVolumeNeg_" +
std::to_string(name_it)).c_str(),
new TGeoTube(0.0, pipeInnerRadius, positiveYLength / 2),
waterMed);
171 waterVolumeNeg->SetLineColor(kBlue);
173 motherVolume->AddNode(waterVolumeNeg, 1,
new TGeoCombiTrans(xPos, -(yInner + yOuter) / 2.0, mZ, rotation));
175 motherVolume->AddNode(kaptonPipePos, 1,
new TGeoCombiTrans(xPos, (yInner + yOuter) / 2.0, mZ, rotation));
176 motherVolume->AddNode(kaptonPipeNeg, 1,
new TGeoCombiTrans(xPos, -(yInner + yOuter) / 2.0, mZ, rotation));
180 double yOuter = std::abs(y_circle(xPos, mOuterRadius));
184 TGeoVolume* kaptonPipe =
new TGeoVolume((separationLayerName +
"_KaptonPipe_" +
std::to_string(name_it)).c_str(),
new TGeoTube(pipeInnerRadius, pipeOuterRadius, pipeLength / 2),
kaptonMed);
185 kaptonPipe->SetLineColor(kGray);
186 TGeoVolume* waterVolume =
new TGeoVolume((separationLayerName +
"_WaterVolume_" +
std::to_string(name_it)).c_str(),
new TGeoTube(0.0, pipeInnerRadius, pipeLength / 2),
waterMed);
187 waterVolume->SetLineColor(kBlue);
189 motherVolume->AddNode(waterVolume, 1,
new TGeoCombiTrans(xPos, 0, mZ, rotation));
190 motherVolume->AddNode(kaptonPipe, 1,
new TGeoCombiTrans(xPos, 0, mZ, rotation));
202 double carbonFiberThickness = 0.01;
203 double foamSpacingThickness = 1.0;
205 TGeoTube* carbonFiberLayer =
new TGeoTube(mInnerRadius, mOuterRadius, carbonFiberThickness / 2);
206 TGeoTube* foamLayer =
new TGeoTube(mInnerRadius, mOuterRadius, foamSpacingThickness / 2);
209 TGeoVolume* carbonFiberLayerVol1 =
new TGeoVolume((separationLayerName +
"_CarbonFiber1").c_str(), carbonFiberLayer,
medCarbonFiber);
210 TGeoVolume* foamLayerVol =
new TGeoVolume((separationLayerName +
"_Foam").c_str(), foamLayer,
medFoam);
211 TGeoVolume* carbonFiberLayerVol2 =
new TGeoVolume((separationLayerName +
"_CarbonFiber2").c_str(), carbonFiberLayer,
medCarbonFiber);
213 carbonFiberLayerVol1->SetLineColor(kGray + 2);
214 foamLayerVol->SetLineColor(kBlack);
215 foamLayerVol->SetFillColorAlpha(kBlack, 1.0);
216 carbonFiberLayerVol2->SetLineColor(kGray + 2);
218 double zSeparation = foamSpacingThickness / 2.0 + carbonFiberThickness / 2.0;
220 motherVolume->AddNode(carbonFiberLayerVol1, 1,
new TGeoTranslation(0, 0, mZ - zSeparation));
221 motherVolume->AddNode(foamLayerVol, 1,
new TGeoTranslation(0, 0, mZ));
222 motherVolume->AddNode(carbonFiberLayerVol2, 1,
new TGeoTranslation(0, 0, mZ + zSeparation));
227 if (mLayerNumber >= 0 && mLayerNumber < 3) {
231 TGeoTube* sensor =
new TGeoTube(mInnerRadius, mOuterRadius, mChipThickness / 2);
232 TGeoTube* chip =
new TGeoTube(mInnerRadius, mOuterRadius, mChipThickness / 2);
233 TGeoTube*
layer =
new TGeoTube(mInnerRadius, mOuterRadius, mChipThickness / 2);
235 TGeoMedium* medSi = gGeoManager->GetMedium(
"FT3_SILICON$");
236 TGeoMedium* medAir = gGeoManager->GetMedium(
"FT3_AIR$");
238 TGeoVolume* sensVol =
new TGeoVolume(sensName.c_str(), sensor, medSi);
239 sensVol->SetLineColor(kYellow);
240 TGeoVolume* chipVol =
new TGeoVolume(chipName.c_str(), chip, medSi);
241 chipVol->SetLineColor(kYellow);
242 TGeoVolume* layerVol =
new TGeoVolume(mLayerName.c_str(),
layer, medAir);
243 layerVol->SetLineColor(kYellow);
245 LOG(info) <<
"Inserting " << sensVol->GetName() <<
" inside " << chipVol->GetName();
246 chipVol->AddNode(sensVol, 1,
nullptr);
248 LOG(info) <<
"Inserting " << chipVol->GetName() <<
" inside " << layerVol->GetName();
249 layerVol->AddNode(chipVol, 1,
nullptr);
252 auto* FwdDiskRotation =
new TGeoRotation(
"FwdDiskRotation", 0, 0, 180);
253 auto* FwdDiskCombiTrans =
new TGeoCombiTrans(0, 0, mZ, FwdDiskRotation);
255 LOG(info) <<
"Inserting " << layerVol->GetName() <<
" inside " << motherVolume->GetName();
256 motherVolume->AddNode(layerVol, 1, FwdDiskCombiTrans);
258 }
else if (mLayerNumber >= 3) {
271 module.createModule(mZ, mLayerNumber, mDirection, mInnerRadius, mOuterRadius, 0., "front", "rectangular", motherVolume);
272 module.createModule(mZ, mLayerNumber, mDirection, mInnerRadius, mOuterRadius, 0., "back", "rectangular", motherVolume);