12 #include <arich/geometry/GeoARICHCreator.h>
13 #include <arich/dbobjects/tessellatedSolidStr.h>
15 #include <geometry/Materials.h>
16 #include <geometry/CreatorFactory.h>
17 #include <geometry/utilities.h>
18 #include <framework/gearbox/Unit.h>
19 #include <framework/logging/Logger.h>
20 #include <arich/simulation/SensitiveDetector.h>
21 #include <arich/simulation/SensitiveAero.h>
22 #include <simulation/background/BkgSensitiveDetector.h>
23 #include <arich/dbobjects/ARICHPositionElement.h>
26 #include <boost/format.hpp>
27 #include <boost/foreach.hpp>
28 #include <boost/algorithm/string.hpp>
31 #include <G4LogicalVolume.hh>
32 #include <G4PVPlacement.hh>
33 #include <G4AssemblyVolume.hh>
34 #include <G4UnionSolid.hh>
35 #include <G4LogicalSkinSurface.hh>
36 #include <G4OpticalSurface.hh>
43 #include <G4TessellatedSolid.hh>
44 #include <G4TriangularFacet.hh>
46 #include <G4SubtractionSolid.hh>
47 #include <G4Region.hh>
48 #include <G4Material.hh>
52 using namespace boost;
53 using namespace CLHEP;
61 using namespace geometry;
69 geometry::CreatorFactory<GeoARICHCreator> GeoARICHFactory(
"ARICHCreator");
75 GeoARICHCreator::GeoARICHCreator(): m_isBeamBkgStudy(0)
85 G4LogicalSkinSurface::CleanSurfaceTable();
106 if (!material) { B2FATAL(
"Material ARICH_Air required for ARICH master volume could not be found");}
108 B2WARNING(
"Material ARICH_Air required by ARICH master volume has no specified refractive index. Continuing, but no photons in ARICH will be propagated.");
111 G4LogicalVolume* masterLV =
new G4LogicalVolume(envelopeTube, material,
"ARICH.masterVolume");
115 G4Region* aRegion =
new G4Region(
"ARICHEnvelope");
116 masterLV->SetRegion(aRegion);
117 aRegion->AddRootLogicalVolume(masterLV);
119 G4RotationMatrix rotMaster;
127 if (
m_config.useGlobalDisplacement()) {
134 B2WARNING(
"ARICH global displacement parameters from DB will be taken into account.");
136 rotMaster.rotateX(rot_x);
137 rotMaster.rotateX(rot_y);
138 rotMaster.rotateX(rot_z);
140 G4ThreeVector transMaster(tr_x, tr_y, tr_z);
142 new G4PVPlacement(G4Transform3D(rotMaster, transMaster), masterLV,
"ARICH.MasterVolume", &topVolume,
false, 1);
163 G4LogicalVolume* aeroPlaneLV;
167 B2INFO(
"GeoARICHCreator: using simple cosmic test geometry.");
171 G4RotationMatrix rotDetPlane;
179 G4RotationMatrix rotMergerPlane;
180 rotMergerPlane.rotateX(0.0);
181 rotMergerPlane.rotateY(0.0);
182 rotMergerPlane.rotateZ(0.0);
187 G4RotationMatrix rotCablesPlane;
188 rotCablesPlane.rotateX(0.0);
189 rotCablesPlane.rotateY(0.0);
190 rotCablesPlane.rotateZ(0.0);
192 G4RotationMatrix rotCoolingPlane;
193 rotCoolingPlane.rotateX(0.0);
194 rotCoolingPlane.rotateY(0.0);
195 rotCoolingPlane.rotateZ(0.0);
197 G4RotationMatrix rotAeroPlane;
225 new G4PVPlacement(G4Transform3D(rotDetPlane, transDetPlane), detPlaneLV,
"ARICH.detPlane", masterLV,
false, 1);
226 new G4PVPlacement(G4Transform3D(rotDetPlane, transDetSupportPlate), detSupportPlateLV,
"ARICH.detSupportPlane", masterLV,
false, 1);
227 if (mergerLV)
new G4PVPlacement(G4Transform3D(rotMergerPlane, transMergerPlate), mergerLV,
"ARICH.mergerPlane", masterLV,
false, 1);
228 new G4PVPlacement(G4Transform3D(rotCablesPlane, transCablesPlate), cablesLV,
"ARICH.cablesPlane", masterLV,
false, 1);
230 new G4PVPlacement(G4Transform3D(rotAeroPlane, transAeroPlane), aeroPlaneLV,
"ARICH.aeroPlane", masterLV,
false, 1);
257 double angl = mirStart;
258 double dphi = 2 * M_PI / nMirrors;
259 if (
m_config.useMirrorDisplacement()) B2WARNING(
"ARICH mirrors displacement parameters from DB will be used.");
260 for (
int i = 1; i < nMirrors + 1; i++) {
263 double mrot_z = angl;
264 double mtr_x = mirRad * cos(angl);
265 double mtr_y = mirRad * sin(angl);
266 double mtr_z = mirZPos + zShift;
267 if (
m_config.useMirrorDisplacement()) {
269 mrot_x += displ.getAlpha();
270 mrot_y += displ.getBeta();
271 mrot_z += displ.getGamma();
272 mtr_x += displ.getX();
273 mtr_y += displ.getY();
274 mtr_z += displ.getZ();
276 G4RotationMatrix rotMirror;
277 rotMirror.rotateX(mrot_x);
278 rotMirror.rotateY(mrot_y);
279 rotMirror.rotateZ(mrot_z);
280 G4ThreeVector transMirror(mtr_x, mtr_y, mtr_z);
281 new G4PVPlacement(G4Transform3D(rotMirror, transMirror), mirrorLV,
"ARICH.mirrorPlate", masterLV,
false, i);
288 std::vector<G4LogicalVolume*> shieldLV(2);
289 std::vector<double> shieldZ(2);
291 for (
int i = 0; i < nTubes; i++) {
296 if (supportPar.
getTubeName(i) ==
"ARICH.NeutronShield1") {
297 shieldLV[0] =
new G4LogicalVolume(tube, tubeMaterial, supportPar.
getTubeName(i));
300 }
else if (supportPar.
getTubeName(i) ==
"ARICH.NeutronShield2") {
301 shieldLV[1] =
new G4LogicalVolume(tube, tubeMaterial, supportPar.
getTubeName(i));
306 G4LogicalVolume* tubeLV =
new G4LogicalVolume(tube, tubeMaterial, supportPar.
getTubeName(i));
308 new G4PVPlacement(G4Transform3D(G4RotationMatrix(), G4ThreeVector(0, 0,
313 const std::vector<double> wedge1 = supportPar.
getWedge(1);
314 const std::vector<double> wedge2 = supportPar.
getWedge(2);
317 G4AssemblyVolume* assemblyWedge1 =
makeJoint(wedge1Material, wedge1);
318 G4AssemblyVolume* assemblyWedge2 =
makeJoint(wedge2Material, wedge2);
322 for (
int i = 0; i < nWedge; i++) {
329 G4ThreeVector Tb(r * cos(phi), r * sin(phi), z);
334 Tr = G4Transform3D(Rx, Tb);
335 if (wgtype == 1) assemblyWedge1->MakeImprint(shieldLV[0], Tr);
336 else if (wgtype == 2) assemblyWedge2->MakeImprint(shieldLV[0], Tr);
340 Tr = G4Transform3D(Rx, Tb);
341 if (wgtype == 1) assemblyWedge1->MakeImprint(masterLV, Tr);
342 else if (wgtype == 2) assemblyWedge2->MakeImprint(masterLV, Tr);
343 else B2ERROR(
"GeoARICHCreator: invalid support wedge type!");
348 new G4PVPlacement(G4Transform3D(G4RotationMatrix(), G4ThreeVector(0, 0, shieldZ[0])), shieldLV[0],
"ARICH.NeutronShield1", masterLV,
351 new G4PVPlacement(G4Transform3D(G4RotationMatrix(), G4ThreeVector(0, 0, shieldZ[1])), shieldLV[1],
"ARICH.NeutronShield2", masterLV,
415 for (
int i = 0; i < nBoxes; i++) {
417 G4Box* scintBox =
new G4Box(
"scintBox", box.size[0] * 10. / 2., box.size[1] * 10. / 2., box.size[2] * 10. / 2.);
419 G4LogicalVolume* scintLV =
new G4LogicalVolume(scintBox, scintMaterial, box.name);
421 G4RotationMatrix rotScint;
422 rotScint.rotateX(box.rotation[0]);
423 rotScint.rotateY(box.rotation[1]);
424 rotScint.rotateZ(box.rotation[2]);
425 TVector3 transScintTV(box.position[0], box.position[1], box.position[2]);
427 B2INFO(
"GeoARICHCreator: Scintilator " << box.name <<
" placed at global: " << transScintTV.X() <<
" " << transScintTV.Y() <<
" " <<
429 G4ThreeVector transScint(box.position[0] * 10., box.position[1] * 10., box.position[2] * 10.);
430 new G4PVPlacement(G4Transform3D(rotScint, transScint), scintLV,
"scintilator", masterLV,
false, 1);
458 G4Tubs* aerogelTube =
new G4Tubs(
"aerogelTube", rin, rout, (thick + wallHeight) / 2., 0, 2 * M_PI);
459 G4LogicalVolume* aerogelPlaneLV =
new G4LogicalVolume(aerogelTube, gapMaterial,
"ARICH.AaerogelPlane");
462 G4Tubs* supportTube =
new G4Tubs(
"aeroSupportTube", rin, rout, thick / 2., 0, 2 * M_PI);
463 G4LogicalVolume* supportTubeLV =
new G4LogicalVolume(supportTube, supportMaterial,
"ARICH.AerogelSupportPlate");
470 for (
unsigned iLayer = 1; iLayer < nLayer + 1; iLayer++) {
472 std::stringstream tileName;
473 tileName <<
"aerogelTile_" << iLayer;
475 G4Box* tileShape =
new G4Box(tileName.str(), params[0] * 10. / 2., params[1] * 10. / 2., layerThick / 2.);
479 G4LogicalVolume* tileLV =
new G4LogicalVolume(tileShape, aeroMaterial,
string(
"ARICH.") + tileName.str());
481 G4ThreeVector transTile(params[2] * 10., params[3] * 10., (thick + layerThick - wallHeight) / 2. + zLayer);
483 Ra.rotateZ(params[4]);
484 new G4PVPlacement(G4Transform3D(Ra, transTile), tileLV,
string(
"ARICH.") + tileName.str(), aerogelPlaneLV,
false, iLayer);
486 zLayer += layerThick;
489 new G4PVPlacement(G4Translate3D(0., 0., -wallHeight / 2.), supportTubeLV,
"ARICH.AerogelSupportPlate", aerogelPlaneLV,
false, 1);
491 return aerogelPlaneLV;
501 B2ERROR(
"GeoARICHCreator::buildAerogelPlane --> getFullAerogelMaterialDescriptionKey() is wrong");
526 G4Tubs* aerogelTube =
new G4Tubs(
"aerogelTube", rin, rout, (thick + wallHeight + imgTubeLen) / 2., 0, 2 * M_PI);
527 G4LogicalVolume* aerogelPlaneLV =
new G4LogicalVolume(aerogelTube, gapMaterial,
"ARICH.AaerogelPlane");
530 G4Tubs* supportTube =
new G4Tubs(
"aeroSupportTube", rin, rout, thick / 2., 0, 2 * M_PI);
531 G4LogicalVolume* supportTubeLV =
new G4LogicalVolume(supportTube, supportMaterial,
"ARICH.AerogelSupportPlate");
535 G4Tubs* imgTube =
new G4Tubs(
"imgTube", rin, rout, imgTubeLen / 2., 0, 2 * M_PI);
536 G4LogicalVolume* imgTubeLV =
new G4LogicalVolume(imgTube, imgMaterial,
"ARICH.AerogelImgPlate");
541 std::vector<double> wallR;
543 for (
unsigned iRing = 1; iRing < nRing + 1; iRing++) {
549 G4Transform3D transform = G4Translate3D(0., 0., (thick - imgTubeLen) / 2.);
551 for (
unsigned iRing = 0; iRing < nRing; iRing++) {
554 std::stringstream wallName;
555 wallName <<
"supportWallR_" << iRing + 1;
556 G4Tubs* supportWall =
new G4Tubs(wallName.str().c_str(), wallR[iRing], wallR[iRing] + wallThick, wallHeight / 2., 0, 2 * M_PI);
557 G4LogicalVolume* supportWallLV =
new G4LogicalVolume(supportWall, supportMaterial,
string(
"ARICH.") + wallName.str().c_str());
559 new G4PVPlacement(transform, supportWallLV,
string(
"ARICH.") + wallName.str().c_str(), aerogelPlaneLV,
false, 0);
561 if (iRing == 0)
continue;
567 wallName <<
"supportWallPhi_" << iRing + 1;
568 G4Box* wall =
new G4Box(wallName.str(), (wallR[iRing] - wallR[iRing - 1] - wallThick) / 2. - 1., thick / 2., wallHeight / 2.);
569 G4LogicalVolume* wallLV =
new G4LogicalVolume(wall, supportMaterial,
string(
"ARICH.") + wallName.str());
570 double r = (wallR[iRing - 1] + wallThick + wallR[iRing]) / 2.;
575 for (
unsigned iLayer = 1; iLayer < nLayer + 1; iLayer++) {
579 std::stringstream tileName;
580 tileName <<
"aerogelTile_" << iRing <<
"_" << iLayer;
582 G4Tubs* tileShape =
new G4Tubs(tileName.str(), wallR[iRing - 1] + wallThick + tileGap, wallR[iRing] - tileGap, layerThick / 2.,
583 (tileGap + wallThick / 2.) / wallR[iRing], dphi - (2.*tileGap + wallThick) / wallR[iRing]);
586 G4LogicalVolume* tileLV =
new G4LogicalVolume(tileShape, aeroMaterial,
string(
"ARICH.") + tileName.str());
588 while (iphi < 2 * M_PI - 0.0001) {
589 G4ThreeVector trans(r * cos(iphi), r * sin(iphi), (thick - imgTubeLen) / 2.);
593 if (iLayer == 1)
new G4PVPlacement(G4Transform3D(Ra, trans), wallLV,
string(
"ARICH.") + wallName.str(), aerogelPlaneLV,
false,
596 G4ThreeVector transTile(0, 0, (thick + layerThick - wallHeight - imgTubeLen) / 2. + zLayer);
597 new G4PVPlacement(G4Transform3D(Ra, transTile), tileLV,
string(
"ARICH.") + tileName.str(), aerogelPlaneLV,
false, iSlot);
601 zLayer += layerThick;
605 new G4PVPlacement(G4Translate3D(0., 0., -(wallHeight + imgTubeLen) / 2.), supportTubeLV,
"ARICH.AerogelSupportPlate",
609 new G4PVPlacement(G4Translate3D(0., 0., (wallHeight + thick) / 2.), imgTubeLV,
"ARICH.AerogelImgPlate", aerogelPlaneLV,
false, 1);
611 return aerogelPlaneLV;
636 double wallHeight = maxTotalAerogelThick + compensationARICHairVolumeThick_min;
641 G4Material* gapMaterial =
647 G4Tubs* aerogelTube =
new G4Tubs(
"aerogelTube", rin, rout, (thick + wallHeight + imgTubeLen) / 2., 0, 2 * M_PI);
648 G4LogicalVolume* aerogelPlaneLV =
new G4LogicalVolume(aerogelTube, gapMaterial,
"ARICH.AaerogelPlane");
651 G4Tubs* supportTube =
new G4Tubs(
"aeroSupportTube", rin, rout, thick / 2., 0, 2 * M_PI);
652 G4LogicalVolume* supportTubeLV =
new G4LogicalVolume(supportTube, supportMaterial,
"ARICH.AerogelSupportPlate");
656 G4Tubs* imgTube =
new G4Tubs(
"imgTube", rin, rout, imgTubeLen / 2., 0, 2 * M_PI);
657 G4LogicalVolume* imgTubeLV =
new G4LogicalVolume(imgTube, imgMaterial,
"ARICH.AerogelImgPlate");
661 std::vector<double> wallR;
663 for (
unsigned iRing = 1; iRing < nRing + 1; iRing++) {
669 G4Transform3D transform = G4Translate3D(0., 0., (thick - imgTubeLen) / 2.);
671 for (
unsigned iRing = 0; iRing < nRing; iRing++) {
674 std::stringstream wallName;
675 wallName <<
"supportWallR_" << iRing + 1;
677 G4Tubs* supportWall =
new G4Tubs(wallName.str().c_str(), wallR[iRing], wallR[iRing] + wallThick, wallHeight / 2., 0, 2 * M_PI);
678 G4LogicalVolume* supportWallLV =
new G4LogicalVolume(supportWall, supportMaterial,
string(
"ARICH.") + wallName.str().c_str());
679 new G4PVPlacement(transform, supportWallLV,
string(
"ARICH.") + wallName.str().c_str(), aerogelPlaneLV,
false, 0);
683 if (iRing == 0)
continue;
690 wallName <<
"supportWallPhi_" << iRing + 1;
691 G4Box* wall =
new G4Box(wallName.str(), (wallR[iRing] - wallR[iRing - 1] - wallThick) / 2. - 1., thick / 2., wallHeight / 2.);
692 G4LogicalVolume* wallLV =
new G4LogicalVolume(wall, supportMaterial,
string(
"ARICH.") + wallName.str());
693 double r = (wallR[iRing - 1] + wallThick + wallR[iRing]) / 2.;
698 for (
unsigned iLayer = 1; iLayer < nLayer + 1; iLayer++) {
704 while (iphi < 2 * M_PI - 0.0001) {
708 double layerThick = -1.0;
709 double tileUpThick = -1.0;
710 double tileDownThick = -1.0;
714 G4Material* aeroMaterial = NULL;
715 int ati_ring = iRing;
716 int ati_column = iicolumn + 1;
717 int ati_layerN = iLayer - 1;
723 B2ERROR(
"GeoARICHCreator::buildAerogelPlaneWithIndividualTilesProp --> getFullAerogelMaterialDescriptionKey() is wrong");
737 G4ThreeVector trans(r * cos(iphi), r * sin(iphi), (thick - imgTubeLen) / 2.);
741 new G4PVPlacement(G4Transform3D(Ra, trans),
743 string(
"ARICH.") + wallName.str(),
757 double compTileUpThick = wallHeight - tileUpThick - tileDownThick;
758 std::stringstream compTileName;
767 compTileName <<
"aerogelCompTile_" << iLayer <<
"_" << ati_ring <<
"_" << ati_column;
769 G4Tubs* compTileShape =
new G4Tubs(compTileName.str(),
770 wallR[iRing - 1] + wallThick + tileGap,
771 wallR[iRing] - tileGap,
772 compTileUpThick / 2.0,
773 (tileGap + wallThick / 2.0) / wallR[iRing],
774 dphi - (2.0 * tileGap + wallThick) / wallR[iRing]);
777 G4LogicalVolume* compTileLV =
new G4LogicalVolume(compTileShape,
779 string(
"ARICH.") + compTileName.str());
782 G4ThreeVector transCompTile(0, 0, (thick + wallHeight - compTileUpThick - imgTubeLen) / 2.0);
783 G4RotationMatrix compRa;
784 compRa.rotateZ(iphi);
785 new G4PVPlacement(G4Transform3D(compRa, transCompTile),
787 string(
"ARICH.") + compTileName.str(),
794 std::stringstream tileName;
795 tileName <<
"aerogelTile_" << iLayer <<
"_" << ati_ring <<
"_" << ati_column;
797 G4Tubs* tileShape =
new G4Tubs(tileName.str(),
798 wallR[iRing - 1] + wallThick + tileGap,
799 wallR[iRing] - tileGap,
801 (tileGap + wallThick / 2.0) / wallR[iRing],
802 dphi - (2.0 * tileGap + wallThick) / wallR[iRing]);
805 G4LogicalVolume* tileLV =
new G4LogicalVolume(tileShape,
807 string(
"ARICH.") + tileName.str());
812 zLayer = tileUpThick;
813 G4ThreeVector transTile(0, 0, (thick + layerThick - wallHeight - imgTubeLen) / 2.0 + zLayer);
814 new G4PVPlacement(G4Transform3D(Ra, transTile),
816 string(
"ARICH.") + tileName.str(),
831 new G4PVPlacement(G4Translate3D(0., 0., -(wallHeight + imgTubeLen) / 2.),
833 "ARICH.AerogelSupportPlate",
839 new G4PVPlacement(G4Translate3D(0., 0., (wallHeight + thick) / 2.),
841 "ARICH.AerogelImgPlate",
846 return aerogelPlaneLV;
868 if (!wref) B2WARNING(
"Material '" << winMat <<
869 "', required for ARICH photon detector window as no specified refractive index. Continuing, but no photons in ARICH will be detected.");
872 const double hapdSizeX = hapdGeo.
getSizeX();
873 const double hapdSizeY = hapdGeo.
getSizeY();
874 const double hapdSizeZ = hapdGeo.
getSizeZ();
880 const double botThick = wallThick;
884 G4Box* moduleBox =
new G4Box(
"moduleBox", hapdSizeX / 2., hapdSizeY / 2., modHeight / 2.);
885 G4LogicalVolume* lmoduleBox =
new G4LogicalVolume(moduleBox, moduleFill,
"ARICH.HAPDModule");
888 G4Box* hapdBox =
new G4Box(
"hapdBox", hapdSizeX / 2., hapdSizeY / 2., hapdSizeZ / 2.);
889 G4LogicalVolume* lhapdBox =
new G4LogicalVolume(hapdBox, fillMaterial,
"ARICH.HAPD");
892 G4Box* tempBox2 =
new G4Box(
"tempBox2", hapdSizeX / 2. - wallThick, hapdSizeY / 2. - wallThick,
893 hapdSizeZ / 2. + 0.1);
894 G4SubtractionSolid* moduleWall =
new G4SubtractionSolid(
"Box-tempBox", hapdBox, tempBox2);
895 G4LogicalVolume* lmoduleWall =
new G4LogicalVolume(moduleWall, wallMaterial,
"ARICH.HAPDWall");
896 setColor(*lmoduleWall,
"rgb(1.0,0.0,0.0,1.0)");
897 new G4PVPlacement(G4Transform3D(), lmoduleWall,
"ARICH.HAPDWall", lhapdBox,
false, 1);
900 G4Box* winBox =
new G4Box(
"winBox", hapdSizeX / 2. - wallThick, hapdSizeY / 2. - wallThick, winThick / 2.);
901 G4LogicalVolume* lmoduleWin =
new G4LogicalVolume(winBox, windowMaterial,
"ARICH.HAPDWindow");
902 setColor(*lmoduleWin,
"rgb(0.7,0.7,0.7,1.0)");
904 G4Transform3D transform = G4Translate3D(0., 0., (-hapdSizeZ + winThick) / 2.);
905 new G4PVPlacement(transform, lmoduleWin,
"ARICH.HAPDWindow", lhapdBox,
false, 1);
908 G4Box* botBox =
new G4Box(
"botBox", hapdSizeX / 2. - wallThick, hapdSizeY / 2. - wallThick, botThick / 2.);
909 G4LogicalVolume* lmoduleBot =
new G4LogicalVolume(botBox, wallMaterial,
"ARICH.HAPDBottom");
910 setColor(*lmoduleBot,
"rgb(0.0,1.0,0.0,1.0)");
911 G4Transform3D transform1 = G4Translate3D(0., 0., (hapdSizeZ - botThick) / 2.);
912 new G4PVPlacement(transform1, lmoduleBot,
"ARICH.HAPDBottom", lhapdBox,
false, 1);
915 G4Box* apdBox =
new G4Box(
"apdBox", apdSizeX / 2., apdSizeY / 2., apdSizeZ / 2.);
916 G4LogicalVolume* lApd =
new G4LogicalVolume(apdBox, apdMaterial,
"ARICH.HAPDApd");
924 new G4LogicalSkinSurface(
"apdSurface", lApd, optSurf);
925 G4Transform3D transform2 = G4Translate3D(0., 0., (hapdSizeZ - apdSizeZ) / 2. - botThick);
926 new G4PVPlacement(transform2, lApd,
"ARICH.HAPDApd", lhapdBox,
false, 1);
932 G4Box* febBox =
new G4Box(
"febBox", febSizeX / 2., febSizeY / 2., febSizeZ / 2.);
933 G4LogicalVolume* lfeb =
new G4LogicalVolume(febBox, febMaterial,
"ARICH.HAPDFeb");
935 setColor(*lfeb,
"rgb(0.0,0.6,0.0,1.0)");
936 G4Transform3D transform3 = G4Translate3D(0., 0., (modHeight - febSizeZ) / 2.);
937 new G4PVPlacement(transform3, lfeb,
"ARICH.HAPDFeb", lmoduleBox,
false, 1);
938 G4Transform3D transform4 = G4Translate3D(0., 0., - (modHeight - hapdSizeZ) / 2.);
939 new G4PVPlacement(transform4, lhapdBox,
"ARICH.HAPD", lmoduleBox,
false, 1);
949 G4LogicalVolume* hapdLV =
buildHAPD(hapdGeo);
953 G4Tubs* detTube =
new G4Tubs(
"detTube", detGeo.
getRingR(1) - hapdGeo.
getSizeX() * 1.4 / 2.,
955 G4LogicalVolume* detPlaneLV =
new G4LogicalVolume(detTube,
Materials::get(
"ARICH_Air"),
"ARICH.detectorPlane");
959 for (
unsigned iSlot = 1; iSlot < nSlots + 1; iSlot++) {
960 if (!
m_modInfo->isInstalled(iSlot))
continue;
963 G4ThreeVector trans(r * cos(phi), r * sin(phi), 0);
966 G4ThreeVector trans1(r * cos(phi), r * sin(phi), 0.0);
967 new G4PVPlacement(G4Transform3D(Ra, trans1), hapdLV,
"ARICH.HAPDModule", detPlaneLV,
false, iSlot);
986 G4VSolid* screwHoleTubeSubtracted_solid =
new G4Tubs(
"screwHoleTubeSubtracted_solid",
993 G4Box* merger_solid =
new G4Box(
"merger_solid",
998 G4RotationMatrix Ra_sub;
999 G4ThreeVector Ta_sub;
1000 G4Transform3D Tr_sub;
1001 Ta_sub.setX(-mergerGeo.
getSizeW() * mm / 2.0 + screwholedX1);
1002 Ta_sub.setY(mergerGeo.
getSizeL() * mm / 2.0 - screwholedY);
1004 Tr_sub = G4Transform3D(Ra_sub, Ta_sub);
1005 G4SubtractionSolid* substraction_solid =
new G4SubtractionSolid(
"substraction_solid", merger_solid, screwHoleTubeSubtracted_solid,
1007 Ta_sub.setX(mergerGeo.
getSizeW() * mm / 2.0 - screwholedX2);
1008 Ta_sub.setY(mergerGeo.
getSizeL() * mm / 2.0 - screwholedY);
1010 Tr_sub = G4Transform3D(Ra_sub, Ta_sub);
1011 substraction_solid =
new G4SubtractionSolid(
"substraction_solid", substraction_solid, screwHoleTubeSubtracted_solid, Tr_sub);
1012 Ta_sub.setX(mergerGeo.
getSizeW() * mm / 2.0 - screwholedX2);
1013 Ta_sub.setY(-mergerGeo.
getSizeL() * mm / 2.0 + screwholedY);
1015 Tr_sub = G4Transform3D(Ra_sub, Ta_sub);
1016 substraction_solid =
new G4SubtractionSolid(
"substraction_solid", substraction_solid, screwHoleTubeSubtracted_solid, Tr_sub);
1017 Ta_sub.setX(-mergerGeo.
getSizeW() * mm / 2.0 + screwholedX1);
1018 Ta_sub.setY(-mergerGeo.
getSizeL() * mm / 2.0 + screwholedY);
1020 Tr_sub = G4Transform3D(Ra_sub, Ta_sub);
1021 substraction_solid =
new G4SubtractionSolid(
"substraction_solid", substraction_solid, screwHoleTubeSubtracted_solid, Tr_sub);
1031 B2WARNING(
"ARICH geometry: no data available for merger " << iType <<
" cooling body geometry. Cooling body will not be placed.");
1035 std::stringstream shpName;
1036 shpName <<
"TessellatedSolid_" << + iType;
1038 G4TessellatedSolid* volume_solid =
new G4TessellatedSolid(shpName.str().c_str());
1040 G4ThreeVector point_1;
1041 G4ThreeVector point_2;
1042 G4ThreeVector point_3;
1046 if (mergerCoolingStr.nCells == 0) {
1047 B2WARNING(
"ARICH geometry: no data available for merger " << iType <<
" cooling body geometry. Cooling body will not be placed.");
1051 for (
unsigned int i = 0; i < mergerCoolingStr.nCells; i++) {
1053 point_1.setX(mergerCoolingStr.posV1[0][i]);
1054 point_1.setY(mergerCoolingStr.posV1[1][i]);
1055 point_1.setZ(mergerCoolingStr.posV1[2][i]);
1057 point_2.setX(mergerCoolingStr.posV2[0][i]);
1058 point_2.setY(mergerCoolingStr.posV2[1][i]);
1059 point_2.setZ(mergerCoolingStr.posV2[2][i]);
1061 point_3.setX(mergerCoolingStr.posV3[0][i]);
1062 point_3.setY(mergerCoolingStr.posV3[1][i]);
1063 point_3.setZ(mergerCoolingStr.posV3[2][i]);
1065 G4TriangularFacet* facet =
new G4TriangularFacet(point_1, point_2, point_3, ABSOLUTE);
1066 volume_solid->AddFacet((G4VFacet*) facet);
1069 volume_solid->SetSolidClosed(
true);
1070 std::stringstream volName;
1071 volName <<
"ARICH.mergerCooling_" << + iType;
1072 G4LogicalVolume* volume_logical =
new G4LogicalVolume(volume_solid,
1075 setColor(*volume_logical,
"rgb(0.6,0.0,0.2,1.0)");
1077 return volume_logical;
1083 G4Box* singlemergerenvelope_solid =
new G4Box(
"singlemergerenvelope_solid",
1087 std::stringstream volName;
1088 volName <<
"ARICH.singleMergerEnvelope_" << + iType;
1089 return new G4LogicalVolume(singlemergerenvelope_solid,
Materials::get(
"ARICH_Air"), volName.str().c_str());
1098 B2WARNING(
"GeoARICHCreator: Merger and merger cooling geometry will not be build as it is not availible in geometry configuration (ARICHGeometryConfig with ClasDef>4 is needed).");
1105 G4LogicalVolume* envelope_logical =
new G4LogicalVolume(envelope_solid,
Materials::get(
"ARICH_Air"),
"ARICH.mergerEnvelope");
1108 G4LogicalVolume* merger_logical =
buildMerger(mergerGeo);
1109 G4LogicalVolume* mergerCooling_logical[12] = {NULL};
1110 G4LogicalVolume* mergerEnvelope_logical[12] = {NULL};
1113 G4RotationMatrix RaPCB;
1116 G4RotationMatrix RaMergerCooling;
1117 RaMergerCooling.rotateY(180 * deg);
1118 RaMergerCooling.rotateZ(-90 * deg);
1121 for (
int iType = 1; iType < 13; iType++) {
1124 setColor(*mergerEnvelope_logical[iType - 1],
"rgb(0.0,0.0,1.0,1.0)");
1126 new G4PVPlacement(G4Transform3D(RaPCB, TaPCB),
1129 mergerEnvelope_logical[iType - 1],
1133 if (mergerCooling_logical[iType - 1] == NULL)
continue;
1135 new G4PVPlacement(G4Transform3D(RaMergerCooling, TaMergerCooling),
1136 mergerCooling_logical[iType - 1],
1137 "ARICH.mergerCooling",
1138 mergerEnvelope_logical[iType - 1],
1144 for (
unsigned iSlot = 0; iSlot < mergerGeo.
getMergerSlotID().size(); iSlot++) {
1153 G4RotationMatrix Ra;
1155 new G4PVPlacement(G4Transform3D(Ra, Ta),
1156 mergerEnvelope_logical[type - 1],
1157 "ARICH.singleMergerEnvelope",
1163 return envelope_logical;
1170 G4Tubs* cablesEnvelope_solid =
new G4Tubs(
"cablesEnvelope_solid",
1176 G4LogicalVolume* cablesEnvelope_logical =
new G4LogicalVolume(cablesEnvelope_solid,
1178 "ARICH.cablesEnvelope");
1180 return cablesEnvelope_logical;
1190 double feb_alcooling_singleObjectEnvelope_sizeY = feb_alcooling_singleObjectEnvelope_sizeX * mm;
1195 double feb_alcooling_box1_sizeY = feb_alcooling_box1_sizeX;
1199 double feb_alcooling_box2_sizeY = feb_alcooling_box2_sizeX;
1202 double feb_alcooling_box3_sizeX = coolingv2Geo.
getRectangleW() * mm;
1203 double feb_alcooling_box3_sizeY = coolingv2Geo.
getRectangleL() * mm;
1206 double feb_alcooling_box1_X0 = feb_alcooling_box2_sizeX / 2.0 + feb_alcooling_box1_sizeX / 2.0;
1207 double feb_alcooling_box1_Y0 = feb_alcooling_box2_sizeY / 2.0 + feb_alcooling_box1_sizeY / 2.0;
1208 double feb_alcooling_box1_Z0 = 0.0 * mm;
1215 double feb_alcooling_box3_Y0 = feb_alcooling_box3_X0;
1216 double feb_alcooling_box3_Z0 = feb_alcooling_box1_sizeZ / 2.0 + feb_alcooling_box3_sizeZ / 2.0;
1217 double feb_alcooling_box3_angle = 45.0 * deg;
1219 G4RotationMatrix Ra;
1226 G4VSolid* feb_alcoolingEnvelope_solid =
new G4Box(
"feb_alcoolingEnvelope_solid",
1227 feb_alcooling_singleObjectEnvelope_sizeX / 2.0,
1228 feb_alcooling_singleObjectEnvelope_sizeY / 2.0,
1229 feb_alcooling_singleObjectEnvelope_sizeZ / 2.0);
1230 G4LogicalVolume* feb_alcoolingEnvelope_logical =
new G4LogicalVolume(feb_alcoolingEnvelope_solid,
Materials::get(
"Air"),
1231 "feb_alcoolingEnvelope_logical");
1233 G4VSolid* feb_alcooling_box1_solid =
new G4Box(
"feb_alcooling_box1_solid", feb_alcooling_box1_sizeX / 2.0,
1234 feb_alcooling_box1_sizeY / 2.0, feb_alcooling_box1_sizeZ / 2.0);
1235 G4VSolid* feb_alcooling_box2_solid =
new G4Box(
"feb_alcooling_box2_solid", feb_alcooling_box2_sizeX / 2.0,
1236 feb_alcooling_box2_sizeY / 2.0, feb_alcooling_box2_sizeZ / 2.0);
1237 G4VSolid* feb_alcooling_box3_solid =
new G4Box(
"feb_alcooling_box3_solid", feb_alcooling_box3_sizeX / 2.0,
1238 feb_alcooling_box3_sizeY / 2.0, feb_alcooling_box3_sizeZ / 2.0);
1243 Ta.setX(feb_alcooling_box1_X0);
1244 Ta.setY(feb_alcooling_box1_Y0);
1245 Ta.setZ(feb_alcooling_box1_Z0);
1246 Tr = G4Transform3D(Ra, Ta);
1247 G4UnionSolid* feb_alcooling_assembly01_solid =
new G4UnionSolid(
"feb_alcooling_assembly01_solid", feb_alcooling_box2_solid,
1248 feb_alcooling_box1_solid, Tr);
1252 Ta.setX(-feb_alcooling_box1_X0);
1253 Ta.setY(-feb_alcooling_box1_Y0);
1254 Ta.setZ(feb_alcooling_box1_Z0);
1255 Tr = G4Transform3D(Ra, Ta);
1256 G4UnionSolid* feb_alcooling_assembly02_solid =
new G4UnionSolid(
"feb_alcooling_assembly02_solid", feb_alcooling_assembly01_solid,
1257 feb_alcooling_box1_solid, Tr);
1261 Ta.setX(feb_alcooling_box3_X0);
1262 Ta.setY(feb_alcooling_box3_Y0);
1263 Ta.setZ(feb_alcooling_box3_Z0);
1264 Ra.rotateZ(-feb_alcooling_box3_angle);
1265 Tr = G4Transform3D(Ra, Ta);
1266 G4UnionSolid* feb_alcooling_assembly03_solid =
new G4UnionSolid(
"feb_alcooling_assembly03_solid", feb_alcooling_assembly02_solid,
1267 feb_alcooling_box3_solid, Tr);
1268 Ra.rotateZ(feb_alcooling_box3_angle);
1272 Ta.setX(-feb_alcooling_box3_X0);
1273 Ta.setY(-feb_alcooling_box3_Y0);
1274 Ta.setZ(feb_alcooling_box3_Z0);
1275 Ra.rotateZ(-feb_alcooling_box3_angle);
1276 Tr = G4Transform3D(Ra, Ta);
1277 G4UnionSolid* feb_alcooling_assembly_solid =
new G4UnionSolid(
"feb_alcooling_assembly_solid", feb_alcooling_assembly03_solid,
1278 feb_alcooling_box3_solid, Tr);
1279 Ra.rotateZ(feb_alcooling_box3_angle);
1281 G4LogicalVolume* feb_alcooling_assembly_logical =
new G4LogicalVolume(feb_alcooling_assembly_solid,
Materials::get(
"Al"),
1282 "feb_alcooling_assembly_logical");
1285 Ta.setZ(-feb_alcooling_box3_sizeZ / 2.0);
1287 Tr = G4Transform3D(Ra, Ta);
1288 new G4PVPlacement(Tr,
1289 feb_alcooling_assembly_logical,
1290 "feb_alcooling_assembly",
1291 feb_alcoolingEnvelope_logical,
1295 return feb_alcoolingEnvelope_logical;
1301 B2ASSERT(
"ARICH cooling geometry ID (G4Tube) is wrong : coolingGeo.getCoolingGeometryID.at(i_volumeID) != 1",
1303 G4Tubs* coolingTube_solid =
new G4Tubs(
"coolingTube_solid",
1306 coolingGeo.
getCoolingL().at(i_volumeID) * mm / 2.0,
1316 B2ASSERT(
"ARICH cooling geometry ID (G4Torus) is wrong : coolingGeo.getCoolingGeometryID.at(i_volumeID) != 2",
1324 G4Torus* coolingTorus_solid =
new G4Torus(
"coolingTorus_solid",
1338 G4Tubs* coolingEnvelope_solid =
new G4Tubs(
"coolingEnvelope_solid",
1344 G4LogicalVolume* coolingEnvelope_logical =
new G4LogicalVolume(coolingEnvelope_solid,
1346 "ARICH.coolingEnvelope");
1350 for (
unsigned i = 0; i < nComponents; i++) {
1354 G4RotationMatrix Ra;
1355 G4LogicalVolume* coolingComponentLV;
1358 Ta.set(r * cos(phi), r * sin(phi), 0);
1361 Ra.rotateY(90.0 * deg);
1368 B2FATAL(
"ARICH cooling geometry component ID is wrong");
1370 new G4PVPlacement(G4Transform3D(Ra, Ta),
1373 coolingEnvelope_logical,
1378 return coolingEnvelope_logical;
1385 G4Box* coolingTestPlateEnvelop_solid =
new G4Box(
"coolingTestPlateEnvelop_solid",
1389 G4LogicalVolume* coolingTestPlateEnvelop_logical =
new G4LogicalVolume(coolingTestPlateEnvelop_solid,
Materials::get(
"Air"),
1390 "ARICH.coolingTestPlateEnvelop");
1392 G4Box* coolingTestPlate_solid =
new G4Box(
"coolingTestPlate_solid",
1398 G4VSolid* coldTubeSubtracted_solid =
new G4Tubs(
"coldTubeSubtracted_solid",
1405 G4VSolid* coldTube_solid =
new G4Tubs(
"coldTube_solid",
1413 G4RotationMatrix Ra_sub;
1414 G4ThreeVector Ta_sub;
1415 G4Transform3D Tr_sub;
1419 Ra_sub.rotateY(90.0 * deg);
1420 Tr_sub = G4Transform3D(Ra_sub, Ta_sub);
1421 G4SubtractionSolid* substraction_solid =
new G4SubtractionSolid(
"substraction_solid", coolingTestPlate_solid,
1422 coldTubeSubtracted_solid, Tr_sub);
1428 Tr_sub = G4Transform3D(Ra_sub, Ta_sub);
1429 substraction_solid =
new G4SubtractionSolid(
"substraction_solid", substraction_solid, coldTubeSubtracted_solid, Tr_sub);
1432 G4LogicalVolume* coolingTestPlate_logical =
new G4LogicalVolume(substraction_solid,
1435 new G4PVPlacement(G4Transform3D(),
1436 coolingTestPlate_logical,
1437 "ARICH.coolingTestPlate",
1438 coolingTestPlateEnvelop_logical,
1442 G4RotationMatrix Ra;
1445 Ra.rotateY(90.0 * deg);
1451 Tr = G4Transform3D(Ra, Ta);
1452 new G4PVPlacement(Tr,
1455 coolingTestPlateEnvelop_logical,
1460 return coolingTestPlateEnvelop_logical;
1472 G4LogicalVolume* detSupportLV =
new G4LogicalVolume(supportTube, supportMaterial,
"ARICH.detectorSupportPlate");
1479 G4LogicalVolume* holeLV =
new G4LogicalVolume(hole,
Materials::get(
"Air"),
"ARICH.detectorSupportHole");
1482 std::vector<G4LogicalVolume*> hapdBackRadialWallLV;
1486 G4LogicalVolume* hapdSupportPlateLV =
new G4LogicalVolume(supportPlate, supportMaterial,
"hapdSupport");
1488 std::vector<double> wallR;
1489 wallR.assign(nRings + 1, 0);
1490 std::vector<double> thickR;
1491 thickR.assign(nRings + 1, 0);
1493 for (
int i = 1; i < nRings; i++) {
1495 double rp1 = detGeo.
getRingR(i + 1);
1496 wallR[i] = (rp1 + rm1) / 2.;
1498 wallR[0] = rm1 - (rp1 - rm1) / 2.;
1500 if (i == nRings - 1) {
1501 wallR[i + 1] = rp1 + (rp1 - rm1) / 2.;
1505 for (
int i = 0; i < nRings + 1; i++) {
1506 std::stringstream ringName1;
1507 ringName1 <<
"backWall_" << i;
1508 thickR[i] = backWallThick;
1510 thickR[i] = 2.*backWallThick;
1513 G4Tubs* backTube =
new G4Tubs(
"hapdBackRing", wallR[i] - thickR[i] / 2., wallR[i] + thickR[i] / 2., backWallHeight / 2., 0,
1515 G4LogicalVolume* hapdBackTubeLV =
new G4LogicalVolume(backTube, supportMaterial,
"backTube");
1517 new G4PVPlacement(transform3, hapdBackTubeLV,
"backTube", detSupportLV,
false, 1);
1518 if (i == 0)
continue;
1520 G4Box* backRadial =
new G4Box(
"backRadialBox", (wallR[i] - wallR[i - 1] - thickR[i] / 2. - thickR[i - 1] / 2.) / 2. - 1.,
1521 backWallThick / 2., backWallHeight / 2.);
1522 hapdBackRadialWallLV.push_back(
new G4LogicalVolume(backRadial, supportMaterial, ringName1.str().c_str()));
1525 G4SubtractionSolid* substraction = NULL;
1529 B2WARNING(
"GeoARICHCreator: No FEB colling body geometry available so they will not be placed (ARICHGeometryConfig with ClasDef>4 is needed).");
1530 return detSupportLV;
1535 for (
unsigned iSlot = 1; iSlot < nSlots + 1; iSlot++) {
1537 double r = (wallR[iRing] + wallR[iRing - 1]) / 2. - (thickR[iRing] - thickR[iRing - 1]) / 2.;
1540 G4ThreeVector trans(r * cos(phi), r * sin(phi), 0);
1541 G4RotationMatrix Ra;
1544 new G4PVPlacement(G4Transform3D(Ra, trans), holeLV,
"hole", hapdSupportPlateLV,
false, iSlot);
1545 if (substraction) substraction =
new G4SubtractionSolid(
"Box+CylinderMoved", substraction, hole, G4Transform3D(Ra, trans));
1546 else substraction =
new G4SubtractionSolid(
"Box+CylinderMoved", supportPlate, hole, G4Transform3D(Ra, trans));
1550 G4RotationMatrix RaBack;
1551 RaBack.rotateZ(phi);
1552 new G4PVPlacement(G4Transform3D(RaBack, transBack), hapdBackRadialWallLV[iRing - 1],
"hapdBack", detSupportLV,
false, iSlot);
1555 G4ThreeVector febCoolingTa;
1556 G4Transform3D febCoolingTr;
1557 febCoolingTa.setX(r * cos(detGeo.
getSlotPhi(iSlot)));
1558 febCoolingTa.setY(r * sin(detGeo.
getSlotPhi(iSlot)));
1563 double febCooling_envelope_Z0 = -supportTube_envelope_dZ / 2.0 + febCooling_envelope_dZ / 2.0 + detGeo.
getSupportThickness();
1564 febCoolingTa.setZ(febCooling_envelope_Z0);
1568 if (febcoolingv2GeometryID == 2) Ra.rotateZ(90.0 * deg);
1570 febCoolingTr = G4Transform3D(Ra, febCoolingTa);
1572 if (febcoolingv2GeometryID != 0) {
1575 new G4PVPlacement(febCoolingTr,
1586 G4Transform3D transform3 = G4Translate3D(0., 0., - backWallHeight / 2.);
1587 new G4PVPlacement(transform3, hapdSupportPlateLV,
"supportPlate", detSupportLV,
false, 1);
1590 G4Box* shieldBox1 =
new G4Box(
"shieldBox1", 20. / 2., 75. / 2., backWallHeight / 2.);
1591 G4Box* shieldBox2 =
new G4Box(
"shieldBox2", 55. / 2., 40. / 2., backWallHeight / 2.);
1592 G4LogicalVolume* shield1 =
new G4LogicalVolume(shieldBox1,
Materials::get(
"BoratedPoly"),
"ARICH.FWDShield1");
1593 G4LogicalVolume* shield2 =
new G4LogicalVolume(shieldBox2,
Materials::get(
"BoratedPoly"),
"ARICH.FWDShield2");
1594 double dphi = 2 * M_PI / 36.;
1595 double r1 = wallR[0] - 15.;
1596 double r2 = wallR[0] - 15. - 20. / 2. - 55. / 2.;
1597 for (
int i = 0; i < 36; i++) {
1598 double phi = (i + 0.5) * dphi;
1599 G4RotationMatrix rot;
1603 new G4PVPlacement(G4Transform3D(rot, trans), shield1,
"ARICH.FWDShield1", detSupportLV,
false, i);
1604 new G4PVPlacement(G4Transform3D(rot, trans1), shield2,
"ARICH.FWDShield2", detSupportLV,
false, i);
1607 return detSupportLV;
1624 G4Box* mirrPlate =
new G4Box(
"mirrPlate", mThick / 2., mLength / 2., mWidth / 2.);
1626 G4LogicalVolume* lmirror =
new G4LogicalVolume(mirrPlate, mirrorMaterial,
"ARICH.mirrorPlate");
1631 new G4LogicalSkinSurface(
"mirrorSurface", lmirror, optSurf);
1639 G4MaterialPropertiesTable* mTable = material->GetMaterialPropertiesTable();
1640 if (!mTable)
return 0;
1641 G4MaterialPropertyVector* mVector = mTable->GetProperty(
"RINDEX");
1642 if (!mVector)
return 0;
1650 int size = par.size();
1651 if (size < 4 || size > 8) B2ERROR(
"GeoARICHCreator::makeJoint: invalid number of joint wedge parameters");
1652 double lenx = par.at(0);
1653 double leny = par.at(1);
1654 double lenz = par.at(2);
1655 double thick = par.at(3);
1657 G4Box* wedgeBox1 =
new G4Box(
"wedgeBox1", thick / 2., lenx / 2., leny / 2.);
1658 G4Box* wedgeBox2 =
new G4Box(
"wedgeBox2", lenz / 2., lenx / 2., thick / 2.);
1660 G4LogicalVolume* wedgeBox1LV =
new G4LogicalVolume(wedgeBox1, supportMaterial,
"ARICH.supportWedge");
1661 G4LogicalVolume* wedgeBox2LV =
new G4LogicalVolume(wedgeBox2, supportMaterial,
"ARICH.supportWedge");
1663 G4AssemblyVolume* assemblyWedge =
new G4AssemblyVolume();
1665 G4RotationMatrix Rm;
1666 G4ThreeVector Ta(0, 0, 0);
1668 Tr = G4Transform3D(Rm, Ta);
1670 assemblyWedge->AddPlacedVolume(wedgeBox1LV, Tr);
1672 Ta.setX(lenz / 2. + thick / 2.);
1673 Ta.setZ(leny / 2. - thick / 2.);
1674 Tr = G4Transform3D(Rm, Ta);
1675 assemblyWedge->AddPlacedVolume(wedgeBox2LV, Tr);
1677 if (size == 4)
return assemblyWedge;
1678 double edge = par.at(4);
1680 G4Box* wedgeBox3 =
new G4Box(
"wedgeBox3", lenz / 2., edge / 2., thick / 2.);
1681 G4LogicalVolume* wedgeBox3LV =
new G4LogicalVolume(wedgeBox3, supportMaterial,
"ARICH.supportWedge");
1683 Ta.setZ(leny / 2. - thick - thick / 2.);
1684 Tr = G4Transform3D(Rm, Ta);
1685 assemblyWedge->AddPlacedVolume(wedgeBox3LV, Tr);
1687 G4Trap* wedgeBoxTmp =
new G4Trap(
"wedgeBoxTmp", thick, leny - 2 * thick, lenz, edge);
1688 G4LogicalVolume* wedgeBox4LV;
1690 G4Tubs* wedgeBoxTmp1 =
new G4Tubs(
"wedgeBoxTmp1", 0.0, par.at(5), thick, 0, 2.*M_PI);
1691 G4RotationMatrix rotHole;
1692 G4ThreeVector transHole(par.at(6), par.at(7), 0);
1693 G4SubtractionSolid* wedgeBox4 =
new G4SubtractionSolid(
"wedgeBox4", wedgeBoxTmp, wedgeBoxTmp1, G4Transform3D(rotHole, transHole));
1694 wedgeBox4LV =
new G4LogicalVolume(wedgeBox4, supportMaterial,
"ARICH.supportWedge");
1695 }
else wedgeBox4LV =
new G4LogicalVolume(wedgeBoxTmp, supportMaterial,
"ARICH.supportWedge");
1697 Rm.rotateX(-M_PI / 2.);
1698 Ta.setX(thick / 2. + edge / 4. + lenz / 4.);
1699 Ta.setZ(-thick / 2. - edge / 2.);
1700 Tr = G4Transform3D(Rm, Ta);
1701 assemblyWedge->AddPlacedVolume(wedgeBox4LV, Tr);
1703 return assemblyWedge;