#include "SolidMaterials.hh" #include "SM1AlFrame.hh" #include "G4Material.hh" #include "G4MaterialTable.hh" #include "G4ThreeVector.hh" #include "G4VisAttributes.hh" #include "G4Transform3D.hh" #include "G4UnionSolid.hh" #include #include #include "G4Box.hh" #include "G4SubtractionSolid.hh" #include "G4Tubs.hh" #include "G4Trd.hh" #include "G4PVPlacement.hh" #include "G4UnitsTable.hh" #include #include "SM1PEReflector.hh" #include "G4SystemOfUnits.hh" #include "G4PhysicalConstants.hh" #include "G4SDManager.hh" SM1AlFrame::SM1AlFrame(G4int verboseLevel){ fverboseLevel = verboseLevel; //x-dimension --> Width //y-dimension --> Length //z-dimension --> Thickness AlFrameWidth = 85.28*cm; // inner measure AlFrameLength = 85.28*cm; // inner measure AlFrameThickness = 5.25*cm; AlFrameSide = 5.75*cm; AlFrameFootLength = 13.11*cm; AlFrameTopLength = 2.25*cm; AlFrameOffSetY = 0.; FootWidth = 1.*cm; FootLength = 6.*cm; FootBaseThickness = 5.*cm; FootBaseWidth = 8.*cm; AlFrameFullLength = AlFrameLength+2.*AlFrameSide+AlFrameFootLength+AlFrameTopLength+FootLength; AlFrameFullWidth = AlFrameWidth+AlFrameSide+FootBaseWidth; AlFrameYbottom = -0.5*AlFrameFullLength+AlFrameFootLength+AlFrameSide+FootLength; AlFrameYtop = 0.5*AlFrameFullLength-AlFrameTopLength-AlFrameSide; HolesDiam = 1.2*cm; HolesOffsetZ = 0.5*AlFrameThickness-21.5*mm; // CShX = 87.5*cm; // CShY = 87.5*cm; CShX = AlFrameWidth; CShY = AlFrameLength; CShThickness = 2.*mm; // with a 1mm indent in the aluminium frame CShDent = 0.5*CShThickness; AlFrameFullThickness=AlFrameThickness+2*(CShThickness-CShDent); PEreflectorConstruction = new SM1PEReflector(fverboseLevel); PEReflectorThickness = PEreflectorConstruction->GetThickness(); } SM1AlFrame::~SM1AlFrame() { } G4LogicalVolume *SM1AlFrame::AlFrameConstruction(G4int NHolesX, G4int NHolesY, G4double HolesGapX, G4double HolesGapY, G4double OffsetX, G4double OffsetY) { G4Material * mate; // make colours ********************************************************* G4Colour white (1.0, 1.0, 1.0) ; G4Colour white_t (1.0, 1.0, 1.0, .95) ; G4Colour grey (0.5, 0.5, 0.5) ; G4Colour lgrey (.75, .75, .75) ; G4Colour red (1.0, 0.0, 0.0, 0.5) ; G4Colour blue (0.0, 0.0, 1.0) ; G4Colour blue_t (0.0, 0.0, 1.0, .75) ; G4Colour cyan (0.0, 1.0, 1.0, 0.5) ; G4Colour magenta (1.0, 0.0, 1.0) ; G4Colour yellow (1.0, 1.0, 0.0, 0.5) ; G4Colour lblue (0.0, 0.0, .75) ; G4Colour black (0.0, 0.0, 0.0) ; G4Colour green (0.0, 1.0, 0.0) ; G4Colour lgreen (0.0, .75, 0.0) ; // construct full Frame box G4Box* Framebox0 = new G4Box("FrameOuter",0.5*AlFrameFullWidth,0.5*AlFrameFullLength,0.5*AlFrameFullThickness); G4Box* TopGap = new G4Box ("TopGap",0.5*AlFrameWidth,0.5*AlFrameTopLength,0.5*AlFrameFullThickness); G4Box* BottomGap = new G4Box("BottomGap",0.5*AlFrameFullWidth-FootBaseWidth,0.5*(AlFrameFootLength+FootLength),0.5*AlFrameFullThickness); G4Box* SideGap = new G4Box("SideGap",0.25*(FootBaseWidth-AlFrameSide),0.5*(AlFrameFullLength-FootLength),0.5*AlFrameFullThickness); G4SubtractionSolid * Framebox1 = new G4SubtractionSolid("Framebox1", Framebox0, TopGap, 0, G4ThreeVector(0,0.5*(AlFrameFullLength-AlFrameTopLength),0)); G4SubtractionSolid * Framebox2 = new G4SubtractionSolid("Framebox2", Framebox1, BottomGap, 0, G4ThreeVector(0,0.5*(AlFrameFootLength+FootLength-AlFrameFullLength),0)); G4SubtractionSolid * Framebox3 = new G4SubtractionSolid("Framebox3", Framebox2, SideGap, 0, G4ThreeVector(-0.5*(AlFrameFullWidth-0.5*(FootBaseWidth-AlFrameSide)),0.5*FootLength,0)); G4SubtractionSolid * Framebox = new G4SubtractionSolid("Framebox", Framebox3, SideGap, 0, G4ThreeVector(0.5*(AlFrameFullWidth-0.5*(FootBaseWidth-AlFrameSide)),0.5*FootLength,0)); mate = G4Material::GetMaterial("Air"); logFrame = new G4LogicalVolume(Framebox, mate,"logFrame",0,0,0); // logFrame->SetVisAttributes(G4VisAttributes::Invisible); // construct the Al frame G4Box* AlFrame_outer = new G4Box("AlFrame_outer",0.5*AlFrameWidth+AlFrameSide,0.5*(AlFrameFullLength-FootLength),0.5*AlFrameThickness); // inner cut-out G4Box* AlFrame_inner1 = new G4Box("AlFrame_inner1",0.5*AlFrameWidth,0.5*AlFrameLength,0.5*AlFrameThickness+1.*mm); // bottom cut-out G4Box* AlFrame_inner2 = new G4Box("AlFrame_inner2",0.5*AlFrameWidth,0.5*AlFrameFootLength+1.*mm,0.5*AlFrameThickness+1.*mm); // top cut-out G4Box* AlFrame_inner3 = new G4Box("AlFrame_inner3",0.5*AlFrameWidth,0.5*AlFrameTopLength+1.*mm,0.5*AlFrameThickness+1.*mm); // cover sheet bedding //G4Box* AlFrame_inner4 = new G4Box("AlFrame_inner4",0.5*CShX,0.5*CShY,0.5*CShDent); G4SubtractionSolid * AlFrame_box1 = new G4SubtractionSolid("AlFrame_box1", AlFrame_outer, AlFrame_inner1, 0, G4ThreeVector(0,0.5*(AlFrameFootLength-AlFrameTopLength),0)); G4SubtractionSolid * AlFrame_box2 = new G4SubtractionSolid("AlFrame_box2", AlFrame_box1, AlFrame_inner2, 0, G4ThreeVector(0,-0.5*AlFrameFullLength+0.5*FootLength+0.5*AlFrameFootLength-0.5*mm,0)); G4SubtractionSolid * AlFrame_box = new G4SubtractionSolid("AlFrame_box", AlFrame_box2, AlFrame_inner3, 0, G4ThreeVector(0,0.5*AlFrameFullLength-0.5*FootLength-0.5*AlFrameTopLength+0.5*mm,0)); /* G4SubtractionSolid * AlFrame_box4 = new G4SubtractionSolid("AlFrame_box4", AlFrame_box3, AlFrame_inner4, 0, G4ThreeVector(0,0.5*(AlFrameFootLength-AlFrameTopLength),0.5*(AlFrameThickness-CShDent))); G4SubtractionSolid * AlFrame_box = new G4SubtractionSolid("AlFrame_box", AlFrame_box4, AlFrame_inner4, 0, G4ThreeVector(0,0.5*(AlFrameFootLength-AlFrameTopLength),-0.5*(AlFrameThickness-CShDent))); */ //Frame Grooves G4double AlFrameGrooveWidth = 34.5*mm; // width of the groove G4double AlFrameGrooveDepth = 18.0*mm; // depth of the groove G4Box* AlFrame_Groove = new G4Box("AlFrame_Groove", 0.5*(AlFrameLength-16.8*mm), 0.5*AlFrameGrooveDepth, 0.5*AlFrameGrooveWidth); // top groove AlFrame_box = new G4SubtractionSolid( "AlFrame_box", AlFrame_box, AlFrame_Groove, 0, G4ThreeVector(0,0.5*AlFrameFullLength-0.5*FootLength-AlFrameTopLength-0.5*AlFrameGrooveDepth,0)); // bottom groove AlFrame_box = new G4SubtractionSolid( "AlFrame_box", AlFrame_box, AlFrame_Groove, 0, G4ThreeVector(0,-0.5*AlFrameFullLength+0.5*FootLength+AlFrameFootLength+0.5*AlFrameGrooveDepth,0)); G4RotationMatrix* rotGroove = new G4RotationMatrix(); rotGroove->rotateZ(90.*deg); // left groove AlFrame_box = new G4SubtractionSolid( "AlFrame_box", AlFrame_box, AlFrame_Groove, rotGroove, G4ThreeVector(-0.5*AlFrameFullWidth+0.5*AlFrameGrooveDepth,AlFrameFootLength-AlFrameTopLength-FootLength,0)); // right groove AlFrame_box = new G4SubtractionSolid( "AlFrame_box", AlFrame_box, AlFrame_Groove, rotGroove, G4ThreeVector(0.5*AlFrameFullWidth-0.5*AlFrameGrooveDepth,AlFrameFootLength-AlFrameTopLength-FootLength,0)); //Frame Holes // G4double AlFrameHoleDiam = 12.0*mm; // diameter of holes G4double HolesLength = AlFrameFullWidth + 6.0*mm; G4Tubs* AlFrame_hole = new G4Tubs("AlFrame_hole", 0., 0.5*HolesDiam, HolesLength, 0.*deg, 360.*deg); G4RotationMatrix* rotHole = new G4RotationMatrix(); rotHole->rotateY(90.*deg); //Holes in the Y direction G4double XPos = 0.; G4double YPos; for (int y=0; yrotateX(90.*deg); //Holes in the X direction YPos = 0.; for (int x=0; xSetVisibility(true); vatAl->SetForceSolid(true); logAl->SetVisAttributes(vatAl); physAl = new G4PVPlacement(0,G4ThreeVector(0,0.5*FootLength,0),logAl,"physAl",logFrame,false,0); if(fverboseLevel>0){ G4cout << "**************VOLUME MASS****************" << G4endl; G4cout << "AlFrame: mass=" << logAl->GetMass()/g << ", volume=" << AlFrame_box->GetCubicVolume()/cm3 << G4endl; G4cout << "AlFrame: TOTmass=" << 9.*logAl->GetMass()/g << ", volume=" << 9.*AlFrame_box->GetCubicVolume()/cm3 << G4endl; G4cout << "**********END VOLUME MASS****************" << G4endl; } //==================================================== // Construct Frame feet //==================================================== // construct foot box G4Box* Footbox = new G4Box("Footbox",0.5*FootBaseWidth,0.5*FootLength,0.5*FootBaseThickness); mate = G4Material::GetMaterial("Air"); logFoot = new G4LogicalVolume(Footbox, mate,"logFoot",0,0,0); logFoot->SetVisAttributes(G4VisAttributes::Invisible); G4Tubs* FootBody = new G4Tubs("FootBody",0,0.5*FootWidth,0.5*FootLength-FootWidth,0,360.*deg); G4RotationMatrix* rot = new G4RotationMatrix(); rot->rotateX(270*deg); mate = G4Material::GetMaterial("Aluminium"); G4LogicalVolume* logFootBody = new G4LogicalVolume(FootBody, mate,"logFootBody",0,0,0); //Set Color G4VisAttributes * vatFootBody= new G4VisAttributes(lgrey); vatFootBody->SetVisibility(true); vatFootBody->SetForceSolid(true); logFootBody->SetVisAttributes(vatFootBody); // G4VPhysicalVolume * physFootBody = new G4PVPlacement(rot, // G4ThreeVector(0,FootWidth,0), // logFootBody, // "physFootBody", // logFoot, // false, // 0); G4Box* FootBase1 = new G4Box("FootBase1",0.5*FootBaseWidth,0.5*FootWidth,0.5*FootBaseThickness); G4Trd* FootBase2 = new G4Trd("FootBase2",0.5*FootWidth,0.5*FootBaseWidth,0.5*FootWidth,0.5*FootBaseThickness,0.5*FootWidth); G4UnionSolid* FootBase = new G4UnionSolid("FootBase",FootBase1, FootBase2,rot, G4ThreeVector(0,FootWidth,0)); mate = G4Material::GetMaterial("HDPE"); G4LogicalVolume* logFootBase = new G4LogicalVolume(FootBase, mate,"logFootBase",0,0,0); //Set Color G4VisAttributes * vatFootBase= new G4VisAttributes(black); vatFootBase->SetVisibility(true); vatFootBase->SetForceSolid(true); logFootBase->SetVisAttributes(vatFootBase); // G4VPhysicalVolume * physFootBase = new G4PVPlacement(0, // G4ThreeVector(0,-0.5*FootLength+0.5*FootWidth,0), // logFootBase, // "physFootBase", // logFoot, // false, // 0); physFoot = new G4PVPlacement(0, G4ThreeVector(-0.5*AlFrameFullWidth+0.5*FootBaseWidth,-0.5*AlFrameFullLength+0.5*FootLength,0), logFoot, "physFoot", logFrame, false, 0); physFoot = new G4PVPlacement(0, G4ThreeVector(0.5*AlFrameFullWidth-0.5*FootBaseWidth,-0.5*AlFrameFullLength+0.5*FootLength,0), logFoot, "physFoot", logFrame, false, 1); //==================================================== // Construct Polyethylene tight sealing reflector bars //==================================================== // G4double PEReflectorLengthX = 84.78*cm; G4double PEReflectorLengthX = AlFrameWidth; //on the drawings appear 84.78*cm, it was increased to fill the AlFrameWidth G4double PEReflectorLengthY = 81.28*cm; // Top and bottom horizontal Reflector bars logPEReflectorX = PEreflectorConstruction->PEReflectorConstruction(PEReflectorLengthX, NHolesX, HolesDiam, HolesGapX, OffsetX, HolesOffsetZ); // Left and right Reflector bars logPEReflectorY = PEreflectorConstruction->PEReflectorConstruction(PEReflectorLengthY, NHolesY, HolesDiam, HolesGapY, OffsetY, -HolesOffsetZ); rotHole = new G4RotationMatrix(); rotHole->rotateZ(270.*deg); physPEReflectorSup = new G4PVPlacement(0,G4ThreeVector(0,AlFrameYtop-0.5*PEReflectorThickness,0), logPEReflectorX,"physPEReflectorSup",logFrame,false,0); physPEReflectorInf = new G4PVPlacement(0,G4ThreeVector(0,AlFrameYbottom+0.5*PEReflectorThickness,0), logPEReflectorX,"physPEReflectorInf",logFrame,false,0); physPEReflectorLeft = new G4PVPlacement(rotHole,G4ThreeVector(-0.5*AlFrameWidth+0.5*PEReflectorThickness,AlFrameYbottom+PEReflectorThickness+0.5*PEReflectorLengthY,0), logPEReflectorY,"physPEReflectorLeft",logFrame,false,0); physPEReflectorRight = new G4PVPlacement(rotHole,G4ThreeVector(0.5*AlFrameWidth-0.5*PEReflectorThickness,AlFrameYbottom+PEReflectorThickness+0.5*PEReflectorLengthY,0), logPEReflectorY,"physPEReflectorRight",logFrame,false,0); //==================================================== // Construct Polyethylene cover sheets //==================================================== G4Box* PECoverSheetBox = new G4Box("PECoverSheetBox",0.5*CShX,0.5*CShY,0.5*CShThickness); mate = G4Material::GetMaterial("HDPE"); logCSh = new G4LogicalVolume(PECoverSheetBox, mate,"logCSh",0,0,0); //Set Color G4VisAttributes* vatPECoverSheet= new G4VisAttributes(black); vatPECoverSheet->SetVisibility(true); vatPECoverSheet->SetForceSolid(true); logCSh->SetVisAttributes(vatPECoverSheet); if(fverboseLevel>0){ G4cout << "**************VOLUME MASS****************" << G4endl; G4cout << "HDPE covers: mass=" << logCSh->GetMass()/g << ", volume=" << PECoverSheetBox->GetCubicVolume()/cm3 << G4endl; G4cout << "HDPE covers: TOTmass=" << 18.*logCSh->GetMass()/g << ", volume=" << 18.*PECoverSheetBox->GetCubicVolume()/cm3 << G4endl; G4cout << "**********END VOLUME MASS****************" << G4endl; } YPos = 0.5*(AlFrameFootLength-AlFrameTopLength+FootLength); physCShFront = new G4PVPlacement(0, G4ThreeVector(0,YPos,-0.5*AlFrameFullThickness+0.5*CShThickness), logCSh,"physCShFront",logFrame,false,0); physCShBack = new G4PVPlacement(0, G4ThreeVector(0,YPos,0.5*AlFrameFullThickness-0.5*CShThickness), logCSh,"physCShBack",logFrame,false,0); AlFrameOffSetY = AlFrameYtop - PEReflectorThickness; return logFrame; }