55 std::string railversion =
rdbAccessSvc()->
getChildTag(
"IDDetailedRail",indetVersionKey.tag(),indetVersionKey.node());
56 if(!railversion.empty()) {
103 std::unique_ptr<IRDBQuery> queryUSP =
rdbAccessSvc()->
getQuery(
"IDDetRailUSP",indetVersionKey.tag(), indetVersionKey.node());
111 double yWidthUSP1 = queryUSP->
data<
double>(
"IDDETRAILUSP_DATA.YWIDTH");
113 double xDepthUSP2 = queryUSP->
data<
double>(
"IDDETRAILUSP_DATA.XDEPTH");
116 double epsilon = 0.01;
130 suppLength = railLengthB + 2.*railLengthE;
134 double zLengthB = (*idSupportRails)[0]->getDouble(
"ZLENGTH");
135 double yWidthB = (*idSupportRails)[0]->getDouble(
"YWIDTH");
136 double zLengthE = (suppLength - zLengthB)/2.;
139 if(commonParameters->size()==0)
142 double railEBx = (*commonParameters)[0]->getDouble(
"RAILEBX");
143 double railEBy = (*commonParameters)[0]->getDouble(
"RAILEBY");
145 std::unique_ptr<IRDBQuery> querySP =
rdbAccessSvc()->
getQuery(
"IDDetRailSP",indetVersionKey.tag(), indetVersionKey.node());
153 double railSP1x = querySP->
data<
double>(
"IDDETRAILSP_DATA.SP_X");
154 double railSP1y = querySP->
data<
double>(
"IDDETRAILSP_DATA.SP_Y");
156 double railSP2x = querySP->
data<
double>(
"IDDETRAILSP_DATA.SP_X");
157 double railSP2y = querySP->
data<
double>(
"IDDETRAILSP_DATA.SP_Y");
159 double railSP3x = querySP->
data<
double>(
"IDDETRAILSP_DATA.SP_X");
160 double railSP3y = querySP->
data<
double>(
"IDDETRAILSP_DATA.SP_Y");
164 double exactPl = (*commonParameters)[0]->getDouble(
"EXACTPL");
165 double gapOfRSF = (*commonParameters)[0]->getDouble(
"GAPOFRSF");
168 std::unique_ptr<IRDBQuery> querySRBP =
rdbAccessSvc()->
getQuery(
"IDDetRailSRBP",indetVersionKey.tag(), indetVersionKey.node());
176 double trackerSRBP1x = querySRBP->
data<
double>(
"IDDETRAILSRBP_DATA.SRBP_X");
177 double trackerSRBP1y = yWidthB;
179 double trackerSRBP2x = querySRBP->
data<
double>(
"IDDETRAILSRBP_DATA.SRBP_X");
180 double trackerSRBP2y = querySRBP->
data<
double>(
"IDDETRAILSRBP_DATA.SRBP_Y");
182 double trackerSRBP3x = querySRBP->
data<
double>(
"IDDETRAILSRBP_DATA.SRBP_X");
183 double trackerSRBP3y = querySRBP->
data<
double>(
"IDDETRAILSRBP_DATA.SRBP_Y");
185 double trackerSRBP4x = querySRBP->
data<
double>(
"IDDETRAILSRBP_DATA.SRBP_X");
186 double trackerSRBP4y = querySRBP->
data<
double>(
"IDDETRAILSRBP_DATA.SRBP_Y");
190 double distBottom = (*commonParameters)[0]->getDouble(
"DISTBOTTOM");
191 double distTop = (*commonParameters)[0]->getDouble(
"DISTTOP");
194 std::unique_ptr<IRDBQuery> querySREP =
rdbAccessSvc()->
getQuery(
"IDDetRailSREP",indetVersionKey.tag(), indetVersionKey.node());
201 double trackerSREP1x = querySREP->
data<
double>(
"IDDETRAILSREP_DATA.SREP_X");
202 double trackerSREP1y = querySREP->
data<
double>(
"IDDETRAILSREP_DATA.SREP_Y");
204 double trackerSREP2x = querySREP->
data<
double>(
"IDDETRAILSREP_DATA.SREP_X");
205 double trackerSREP2y = querySREP->
data<
double>(
"IDDETRAILSREP_DATA.SREP_Y");
207 double trackerSREP3x = querySREP->
data<
double>(
"IDDETRAILSREP_DATA.SREP_X");
208 double trackerSREP3y = querySREP->
data<
double>(
"IDDETRAILSREP_DATA.SREP_Y");
213 RMAX_ID = sqrt(RMAX_ID*RMAX_ID-suppWidth*suppWidth/4.)-epsilon;
217 const GeoBox* railBarrel =
new GeoBox(railThickB/2., railWidthB/2., railLengthB/2.);
221 const int numberOfPieces = 10;
224 GeoBox* railEndcap[numberOfPieces];
229 GeoBox* railEndcapFirst =
new GeoBox(railEBx/2., railEBy/2., railLengthE/2);
235 for (
int i = 0;
i < numberOfPieces;
i++)
237 double xa = (railEBx/2.)/(numberOfPieces + 2) * (
i+1);
238 double ya =
xa - startY;
243 railEndcap[
i] =
new GeoBox(railEBx/2. -
xa, ya/2, railLengthE/2);
246 vectorForTrans[0] =
GeoTrf::Vector3D(0., railEBy/2. + ya/2, 0.) + vectorForTransFirst;
257 const GeoShape* elementOfRailSupport1 =
new GeoBox(railSP1x/2., railSP1y/2., suppLength/2);
258 const GeoShape* elementOfRailSupport2 =
new GeoBox(railSP2x/2., railSP2y/2., suppLength/2);
259 const GeoShape* elementOfRailSupport3 =
new GeoBox(railSP3x/2., railSP3y/2., suppLength/2);
262 GeoTrf::Vector3D transRailSupport2Part1(-railSP1x/2. + railSP2x/2., railSP1y/2. + railSP2y/2. ,0.);
263 GeoTrf::Vector3D transRailSupport3Part1(-railSP1x/2. - railSP3x/2., railSP1y/2. + railSP2y - railSP3y/2. , 0.);
265 GeoTrf::Vector3D transRailSupport2Part2(railSP1x/2. - railSP2x/2., railSP1y/2. + railSP2y/2. ,0.);
266 GeoTrf::Vector3D transRailSupport3Part2(railSP1x/2. + railSP3x/2., railSP1y/2. + railSP2y - railSP3y/2. ,0.);
270 const GeoBox* trackerSRBP1 =
new GeoBox(trackerSRBP1x/2., trackerSRBP1y/2., zLengthB/2);
271 const GeoBox* trackerSRBP2 =
new GeoBox(trackerSRBP2x/2., trackerSRBP2y/2., zLengthB/2);
272 const GeoBox* trackerSRBP3 =
new GeoBox(trackerSRBP3x/2., trackerSRBP3y/2., zLengthB/2);
273 const GeoBox* trackerSRBP4 =
new GeoBox(trackerSRBP4x/2., trackerSRBP4y/2., zLengthB/2);
278 GeoTrf::Vector3D trans1TSRBP2(trackerSRBP1x/2. + trackerSRBP2x/2., - (trackerSRBP1y/2. - trackerSRBP2y/2. - distBottom), 0.);
279 GeoTrf::Vector3D trans2TSRBP2(-trackerSRBP1x/2. - trackerSRBP2x/2., - (trackerSRBP1y/2. - trackerSRBP2y/2. - distBottom), 0.);
281 GeoTrf::Vector3D trans1TSRBP3(trackerSRBP1x/2. + trackerSRBP2x + trackerSRBP3x/2., - (trackerSRBP1y/2. - trackerSRBP3y/2. - distBottom), 0.);
282 GeoTrf::Vector3D trans2TSRBP3(- trackerSRBP1x/2. - trackerSRBP2x - trackerSRBP3x/2., - (trackerSRBP1y/2. - trackerSRBP3y/2. - distBottom), 0.);
284 GeoTrf::Vector3D trans1TSRBP4(trackerSRBP1x/2. + trackerSRBP2x + trackerSRBP4x/2., trackerSRBP1y/2. - trackerSRBP4y/2. - distTop, 0.);
285 GeoTrf::Vector3D trans2TSRBP4(- trackerSRBP1x/2. - trackerSRBP2x - trackerSRBP4x/2.,trackerSRBP1y/2. - trackerSRBP4y/2. - distTop, 0.);
289 const GeoBox* trackerSREP1 =
new GeoBox(trackerSREP1x/2., trackerSREP1y/2.,zLengthE/2.);
290 const GeoBox* trackerSREP2 =
new GeoBox(trackerSREP2x/2., trackerSREP2y/2.,zLengthE/2.);
291 const GeoBox* trackerSREP3 =
new GeoBox(trackerSREP3x/2., trackerSREP3y/2.,zLengthE/2.);
296 GeoTrf::Vector3D trans1TSREP2(trackerSREP1x/2. + trackerSREP2x/2., -trackerSREP1y/2. + trackerSREP2y/2., 0.);
297 GeoTrf::Vector3D trans2TSREP2(- trackerSREP1x/2. - trackerSREP2x/2., -trackerSREP1y/2. + trackerSREP2y/2., 0.);
299 GeoTrf::Vector3D trans1TSREP3(trackerSREP1x/2. + trackerSREP3x/2., trackerSREP1y/2. - trackerSREP3y/2., 0.);
300 GeoTrf::Vector3D trans2TSREP3(- trackerSREP1x/2. - trackerSREP3x/2., trackerSREP1y/2. - trackerSREP3y/2., 0.);
306 const GeoLogVol* railBarrelLog =
new GeoLogVol(
"railBarrel",railBarrel,steel);
307 const GeoLogVol* railSupportLogPart1 =
new GeoLogVol(
"RailSupportPart1", elementOfRailSupport1, alum);
308 const GeoLogVol* railSupportLogPart2 =
new GeoLogVol(
"RailSupportPart2", elementOfRailSupport2, alum);
309 const GeoLogVol* railSupportLogPart3 =
new GeoLogVol(
"RailSupportPart3", elementOfRailSupport3, alum);
311 const GeoLogVol* railEndcapFirstLog =
new GeoLogVol(
"railEndcap", railEndcapFirst, steel);
313 GeoVPhysVol* railEndcapFirstPhys =
new GeoPhysVol(railEndcapFirstLog);
317 GeoLogVol* railEndcapLog[numberOfPieces];
318 GeoVPhysVol* railEndcapPhys[numberOfPieces];
320 for (
int i = 0;
i < numberOfPieces;
i++)
322 railEndcapLog[
i] =
new GeoLogVol(
"railEndcap", railEndcap[
i], steel);
323 railEndcapPhys[
i] =
new GeoPhysVol(railEndcapLog[
i]);
327 GeoVPhysVol* railBarrelPhys =
new GeoPhysVol(railBarrelLog);
329 GeoVPhysVol* railSupportPhysPart1 =
new GeoPhysVol(railSupportLogPart1);
330 GeoVPhysVol* railSupportPhysPart2 =
new GeoPhysVol(railSupportLogPart2);
331 GeoVPhysVol* railSupportPhysPart3 =
new GeoPhysVol(railSupportLogPart3);
334 const GeoLogVol* trackerSRBLP1 =
new GeoLogVol(
"TrackerSupportRailBarrelPart1", trackerSRBP1, alum);
335 const GeoLogVol* trackerSRBLP2 =
new GeoLogVol(
"TrackerSupportRailBarrelPart2", trackerSRBP2, alum);
336 const GeoLogVol* trackerSRBLP3 =
new GeoLogVol(
"TrackerSupportRailBarrelPart3", trackerSRBP3, alum);
337 const GeoLogVol* trackerSRBLP4 =
new GeoLogVol(
"TrackerSupportRailBarrelPart3", trackerSRBP4, alum);
339 const GeoLogVol* trackerSRELP1 =
new GeoLogVol(
"TrackerSupportRailEndPart1", trackerSREP1, alum);
340 const GeoLogVol* trackerSRELP2 =
new GeoLogVol(
"TrackerSupportRailEndPart2", trackerSREP2, alum);
341 const GeoLogVol* trackerSRELP3 =
new GeoLogVol(
"TrackerSupportRailEndPart3", trackerSREP3, alum);
343 GeoVPhysVol* trackerSRBPP1 =
new GeoPhysVol(trackerSRBLP1);
344 GeoVPhysVol* trackerSRBPP2 =
new GeoPhysVol(trackerSRBLP2);
345 GeoVPhysVol* trackerSRBPP3 =
new GeoPhysVol(trackerSRBLP3);
346 GeoVPhysVol* trackerSRBPP4 =
new GeoPhysVol(trackerSRBLP4);
348 GeoVPhysVol* trackerSREPP1 =
new GeoPhysVol(trackerSRELP1);
349 GeoVPhysVol* trackerSREPP2 =
new GeoPhysVol(trackerSRELP2);
350 GeoVPhysVol* trackerSREPP3 =
new GeoPhysVol(trackerSRELP3);
356 double coordY = yWidthUSP1/2. - railSP1y - railSP2y + (railSP3y - gapOfRSF/2.);
360 GeoTrf::Vector3D suppPos1Part1(rminInt + xDepthUSP2 + railSP2x - railSP1x/2., - yWidthUSP1/2. + railSP1y/2. + coordY, 0.);
361 GeoTrf::Vector3D suppPos2Part1( - rminInt - xDepthUSP2 - railSP2x + railSP1x/2., - yWidthUSP1/2. + railSP1y/2. + coordY, 0.);
363 pos =
new GeoTransform(GeoTrf::Translate3D(suppPos1Part1.x(),suppPos1Part1.y(),suppPos1Part1.z()));
365 mother->add(railSupportPhysPart1);
367 pos =
new GeoTransform(GeoTrf::Translate3D(suppPos2Part1.x(),suppPos2Part1.y(),suppPos2Part1.z()));
369 mother->add(railSupportPhysPart1);
372 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
374 mother->add(railSupportPhysPart2);
376 tmpVec = suppPos2Part1 + transRailSupport2Part1;
377 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
379 mother->add(railSupportPhysPart2);
381 tmpVec = suppPos1Part1+ transRailSupport3Part2;
382 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
384 mother->add(railSupportPhysPart3);
386 tmpVec = suppPos2Part1+ transRailSupport3Part1;
387 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
389 mother->add(railSupportPhysPart3);
399 GeoTrf::Vector3D railBpos1(railSP1x/2. - railThickB/2. - railSP2x, railSP1y/2. + railWidthB/2., 0.);
400 GeoTrf::Vector3D railBpos2(- railSP1x/2. + railThickB/2. + railSP2x, railSP1y/2. + railWidthB/2., 0.);
401 tmpVec = railBpos1 + suppPos1Part1;
402 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
404 mother->add(railBarrelPhys);
405 tmpVec = railBpos2 + suppPos2Part1;
406 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
408 mother->add(railBarrelPhys);
413 GeoTrf::Vector3D railEpos1( railSP1x/2 + railSP3x - exactPl, railSP1y/2. + railEBy/2., (railLengthB+railLengthE)/2.);
414 GeoTrf::Vector3D railEpos2( -railSP1x/2 - railSP3x + exactPl, railSP1y/2. + railEBy/2., (railLengthB+railLengthE)/2.);
415 GeoTrf::Vector3D railEpos3( railSP1x/2 + railSP3x - exactPl, railSP1y/2. + railEBy/2.,-(railLengthB+railLengthE)/2.);
416 GeoTrf::Vector3D railEpos4( -railSP1x/2 - railSP3x + exactPl, railSP1y/2. + railEBy/2.,-(railLengthB+railLengthE)/2.);
417 tmpVec = railEpos1 + vectorForTransFirst + suppPos1Part1;
418 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
420 mother->add(railEndcapFirstPhys);
422 for (
int i = 0;
i < numberOfPieces;
i++)
424 tmpVec = railEpos1 + vectorForTrans[
i] + suppPos1Part1;
425 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
427 mother->add(railEndcapPhys[
i]);
430 tmpVec = railEpos2 + vectorForTransFirst + suppPos2Part1;
431 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
433 mother->add(railEndcapFirstPhys);
435 for (
int i = 0;
i < numberOfPieces;
i++)
437 tmpVec = railEpos2 + vectorForTrans[
i] + suppPos2Part1;
438 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
440 mother->add(railEndcapPhys[
i]);
443 tmpVec = railEpos3 + vectorForTransFirst + suppPos1Part1;
444 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
446 mother->add(railEndcapFirstPhys);
448 for (
int i = 0;
i < numberOfPieces;
i++)
450 tmpVec = railEpos3 + vectorForTrans[
i] + suppPos1Part1;
451 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
453 mother->add(railEndcapPhys[
i]);
456 tmpVec = railEpos4 + vectorForTransFirst + suppPos2Part1;
457 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
459 mother->add(railEndcapFirstPhys);
461 for (
int i = 0;
i < numberOfPieces;
i++)
463 tmpVec = railEpos4 + vectorForTrans[
i] + suppPos2Part1;
464 pos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
466 mother->add(railEndcapPhys[
i]);
469 GeoTrf::Vector3D transToInnerWall(rminInt + xDepthUSP2 + railSP2x + railSP3x + trackerSRBP2x + trackerSRBP1x, 0, 0);
475 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans2TSRBP1 + transMalePart;
476 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
477 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSRBP1x/2., 0,0) + trans1TSRBP1 + transMalePart;
478 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
480 mother->add(trackerSRBPP1);
482 mother->add(trackerSRBPP1);
484 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans2TSRBP2 + transMalePart;
485 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
486 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans1TSRBP2 + transMalePart;
487 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
489 mother->add(trackerSRBPP2);
491 mother->add(trackerSRBPP2);
493 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSRBP1x/2., 0,0) + trans2TSRBP3 + transMalePart;
494 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
495 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans1TSRBP3 + transMalePart;
496 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
498 mother->add(trackerSRBPP3);
500 mother->add(trackerSRBPP3);
502 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSRBP1x/2., 0,0) + trans2TSRBP4 + transMalePart;
503 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
504 tmpVec = -transToInnerWall +
GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans1TSRBP4 + transMalePart;
505 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
507 mother->add(trackerSRBPP4);
509 mother->add(trackerSRBPP4);
512 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP1 + transMalePart;
513 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
514 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP1 + transMalePart;
515 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
517 mother->add(trackerSREPP1);
519 mother->add(trackerSREPP1);
521 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP2 + transMalePart;
522 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
523 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP2 + transMalePart;
524 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
526 mother->add(trackerSREPP2);
528 mother->add(trackerSREPP2);
530 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP3 + transMalePart;
531 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
532 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP3 + transMalePart;
533 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
535 mother->add(trackerSREPP3);
537 mother->add(trackerSREPP3);
540 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP1 + transMalePart;
541 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
542 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP1 + transMalePart;
543 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
545 mother->add(trackerSREPP1);
547 mother->add(trackerSREPP1);
549 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP2 + transMalePart;
550 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
551 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP2 + transMalePart;
552 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
554 mother->add(trackerSREPP2);
556 mother->add(trackerSREPP2);
558 tmpVec = transToInnerWall -
GeoTrf::Vector3D(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP3 + transMalePart;
559 xfPos =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
560 tmpVec = - transToInnerWall +
GeoTrf::Vector3D(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP3 + transMalePart;
561 xfNeg =
new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z()));
563 mother->add(trackerSREPP3);
565 mother->add(trackerSREPP3);
617 double epsilon = 0.01;
630 suppLength = railLengthB + 2.*railLengthE;
635 RMAX_ID = sqrt(RMAX_ID*RMAX_ID-suppWidth*suppWidth/4.)-epsilon;
639 const GeoBox* railBarrel =
new GeoBox(railThickB/2., railWidthB/2., railLengthB/2.);
640 const GeoBox* railEndcap =
new GeoBox(railThickE/2., railWidthE/2., railLengthE/2.);
641 const GeoBox* support =
new GeoBox(suppThick/2., suppWidth/2., suppLength/2.);
643 const GeoLogVol* railBarrelLog =
new GeoLogVol(
"railBarrel",railBarrel,steel);
644 const GeoLogVol* railEndcapLog =
new GeoLogVol(
"railEndcap",railEndcap,steel);
645 const GeoLogVol* supportLog =
new GeoLogVol(
"RailSupport",support,alum);
646 GeoVPhysVol* railBarrelPhys =
new GeoPhysVol(railBarrelLog);
647 GeoVPhysVol* railEndcapPhys =
new GeoPhysVol(railEndcapLog);
648 GeoVPhysVol* supportPhys =
new GeoPhysVol(supportLog);
657 GeoTrf::Translate3D railBpos1( ( RMAX_ID-suppThick-railThickB/2.-safety), 0., 0.);
658 GeoTrf::Translate3D railBpos2( (-RMAX_ID+suppThick+railThickB/2.+safety), 0., 0.);
659 pos =
new GeoTransform(railBpos1);
661 mother->add(railBarrelPhys);
662 pos =
new GeoTransform(railBpos2);
664 mother->add(railBarrelPhys);
668 GeoTrf::Translate3D railEpos1( ( RMAX_ID-suppThick-railThickE/2.-safety), 0., (railLengthB+railLengthE)/2.);
669 GeoTrf::Translate3D railEpos2( (-RMAX_ID+suppThick+railThickE/2.+safety), 0., (railLengthB+railLengthE)/2.);
670 GeoTrf::Translate3D railEpos3( ( RMAX_ID-suppThick-railThickE/2.-safety), 0.,-(railLengthB+railLengthE)/2.);
671 GeoTrf::Translate3D railEpos4( (-RMAX_ID+suppThick+railThickE/2.+safety), 0.,-(railLengthB+railLengthE)/2.);
672 pos =
new GeoTransform(railEpos1);
674 mother->add(railEndcapPhys);
675 pos =
new GeoTransform(railEpos2);
677 mother->add(railEndcapPhys);
678 pos =
new GeoTransform(railEpos3);
680 mother->add(railEndcapPhys);
681 pos =
new GeoTransform(railEpos4);
683 mother->add(railEndcapPhys);
688 GeoTrf::Translate3D suppPos1( ( RMAX_ID-suppThick/2.), 0., 0.);
689 GeoTrf::Translate3D suppPos2( (-RMAX_ID+suppThick/2.), 0., 0.);
690 pos =
new GeoTransform(suppPos1);
692 mother->add(supportPhys);
693 pos =
new GeoTransform(suppPos2);
695 mother->add(supportPhys);