#include "SolidMaterials.hh" #include "SM1MuVeto.hh" #include "G4Material.hh" #include "G4MaterialTable.hh" #include "G4LogicalBorderSurface.hh" #include "G4OpBoundaryProcess.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 "G4PVPlacement.hh" #include "G4UnitsTable.hh" #include #include "G4LogicalBorderSurface.hh" #include "G4SystemOfUnits.hh" #include "G4PhysicalConstants.hh" //#include "SM1MuVetoSD.hh" #include "G4SDManager.hh" SM1MuVeto::SM1MuVeto(){ } SM1MuVeto::~SM1MuVeto() { } // Type=1 -> 1m length plane with fiber 90cm length // Type>=2 -> shorter plane with MPPCs on the extremes G4LogicalVolume *SM1MuVeto::MuVetoConstruction(G4int Type, G4double MuVetoWidth, G4double MuVetoThickness, G4double MuVetoLength) { 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) ; G4double FiberGroove = 4.*mm; G4double FiberGrooveLength = MuVetoLength+1.*mm; G4double ConnectorGrooveLength = 15.5*mm; G4double ConnectorGrooveWidth = 31.*mm+0.1*mm; G4double ConnectorGrooveThickness = 12.*mm+0.1*mm; G4double HDPEThickness = 2.*mm; G4double TyvekThickness = 0.186*mm; //---------------------------------------------------------------- //Complete detector module (PVT + Tyvek Wrapping + HDEP Wrapping) //---------------------------------------------------------------- MuModX = MuVetoWidth + 2.*TyvekThickness + 2.*HDPEThickness; MuModY = MuVetoThickness + 2.*TyvekThickness + 2.*HDPEThickness; MuModZ = MuVetoLength + 2.*TyvekThickness + 2.*HDPEThickness; G4Box* MuVetoDetModBox = new G4Box("MuVetoDetModBox",0.5*MuModX,0.5*MuModY,0.5*MuModZ); //Create MuVetoDetMod Solid mate = G4Material::GetMaterial("Air"); logMuVetoMod = new G4LogicalVolume(MuVetoDetModBox, mate,"logMuVetoMod",0,0,0); //------------------------ // PVT plane //------------------------ G4Box* MuVeto_box1 = new G4Box("MuVeto_box1",0.5*MuVetoWidth,0.5*MuVetoThickness,0.5*MuVetoLength); // groove for optical fiber G4Box* FiberGroove_box = new G4Box("FiberGroove_box",0.5*FiberGroove,0.5*FiberGroove,0.5*FiberGrooveLength); G4SubtractionSolid * MuVeto_box2 = new G4SubtractionSolid("MuVeto_box2", MuVeto_box1, FiberGroove_box, 0, G4ThreeVector(0.5*MuVetoWidth-0.5*FiberGroove+0.5*mm,0,0)); // grooves for the MPPC connectors G4double XPos = 0.5*MuVetoWidth-0.5*(ConnectorGrooveWidth-0.5*ConnectorGrooveLength)+0.05*mm; G4double YPos = 0.5*(MuVetoThickness-ConnectorGrooveThickness)+0.1*mm; G4double ZPos, ZPosTube; G4RotationMatrix* rotGroove = new G4RotationMatrix(); rotGroove->rotateX(90.*deg); G4Box* ConectorGroove_box = new G4Box("ConectorGroove_box",0.5*(ConnectorGrooveWidth-0.5*ConnectorGrooveLength),0.5*ConnectorGrooveThickness,0.5*ConnectorGrooveLength); G4Tubs* ConectorGroove_tube; if(Type==1){ ZPos = 0.5*MuVetoLength-0.5*ConnectorGrooveLength-42.5*mm; ZPosTube = ZPos; ConectorGroove_tube = new G4Tubs("ConectorGroove_tube",0.,0.5*ConnectorGrooveLength,0.5*ConnectorGrooveThickness,0.*deg,360.*deg); }else{ ZPosTube = 0.5*MuVetoLength; ZPos = ZPosTube-0.5*ConnectorGrooveLength; ConectorGroove_tube = new G4Tubs("ConectorGroove_tube",0.,ConnectorGrooveLength,0.5*ConnectorGrooveThickness,0.*deg,360.*deg); } G4SubtractionSolid * MuVeto_box3 = new G4SubtractionSolid("MuVeto_box3", MuVeto_box2, ConectorGroove_box, 0, G4ThreeVector(XPos,YPos,ZPos)); G4SubtractionSolid * MuVeto_box4 = new G4SubtractionSolid("MuVeto_box4", MuVeto_box3, ConectorGroove_tube, rotGroove, G4ThreeVector(XPos-0.5*(ConnectorGrooveWidth-0.5*ConnectorGrooveLength),YPos,ZPosTube)); G4SubtractionSolid * MuVeto_box5 = new G4SubtractionSolid("MuVeto_box5", MuVeto_box4, ConectorGroove_box, 0, G4ThreeVector(XPos,YPos,-ZPos)); G4SubtractionSolid * MuVetoBox = new G4SubtractionSolid("MuVetoBox", MuVeto_box5, ConectorGroove_tube, rotGroove, G4ThreeVector(XPos-0.5*(ConnectorGrooveWidth-0.5*ConnectorGrooveLength),YPos,-ZPosTube)); mate = G4Material::GetMaterial("PVT_mixture"); logMuVetoPVT = new G4LogicalVolume(MuVetoBox, mate,"logMuVetoPVT",0,0,0); //Set Color G4VisAttributes* vatMuVetoPVT= new G4VisAttributes(magenta); vatMuVetoPVT->SetVisibility(true); vatMuVetoPVT->SetForceSolid(true); logMuVetoPVT->SetVisAttributes(vatMuVetoPVT); physMuVetoPVT = new G4PVPlacement(0, G4ThreeVector(0,0,0), logMuVetoPVT, "physMuVetoPVT", logMuVetoMod, false, 0); //------------------------ // Tyvek Wrapping //------------------------ G4double TyvekX = MuVetoWidth + 2.*TyvekThickness; G4double TyvekY = MuVetoThickness + 2.*TyvekThickness; G4double TyvekZ = MuVetoLength + 2.*TyvekThickness; G4Box* TyvekBoxOuter = new G4Box("TyvekBoxOuter",0.5*TyvekX,0.5*TyvekY,0.5*TyvekZ); G4Box* TyvekBoxInner = new G4Box("TyvekBoxInner",(0.5*TyvekX)-TyvekThickness,(0.5*TyvekY)-TyvekThickness,(0.5*TyvekZ)-TyvekThickness); //Remove inner G4SubtractionSolid * TyvekBox = new G4SubtractionSolid("TyvekBox",TyvekBoxOuter,TyvekBoxInner,0,G4ThreeVector(0,0,0)); //Create Tyvek Solid mate = G4Material::GetMaterial("Tyvek"); logMuVetoTyvek = new G4LogicalVolume(TyvekBox, mate,"logMuVetoTyvek",0,0,0); //Color Settings G4VisAttributes* vatTyvek = new G4VisAttributes(white_t); vatTyvek->SetVisibility(true); vatTyvek->SetForceSolid(true); logMuVetoTyvek->SetVisAttributes(vatTyvek); physMuVetoTyvek = new G4PVPlacement(0, G4ThreeVector(0,0,0), logMuVetoTyvek, "physMuVetoTyvek", logMuVetoMod, false, 0); //------------------------ // HDPE Wrapping //------------------------ G4double PEX = MuVetoWidth + 2.*TyvekThickness + 2.*HDPEThickness; G4double PEY = MuVetoThickness + 2.*TyvekThickness + 2.*HDPEThickness; G4double PEZ = MuVetoLength + 2.*TyvekThickness + 2.*HDPEThickness; G4Box* PEBoxOuter = new G4Box("PEBoxOuter",0.5*PEX,0.5*PEY,0.5*PEZ); G4Box* PEBoxInner = new G4Box("PEBoxInner",(0.5*PEX)-HDPEThickness,(0.5*PEY)-HDPEThickness,(0.5*PEZ)-HDPEThickness); //Remove inner G4SubtractionSolid * PEBox = new G4SubtractionSolid("PEBox",PEBoxOuter,PEBoxInner,0,G4ThreeVector(0,0,0)); mate = G4Material::GetMaterial("HDPE"); logMuVetoHDPE = new G4LogicalVolume(PEBox, mate,"logMuVetoHDPE",0,0,0); //Set Color G4VisAttributes* vatPECoverSheet= new G4VisAttributes(black); vatPECoverSheet->SetVisibility(true); vatPECoverSheet->SetForceSolid(true); logMuVetoHDPE->SetVisAttributes(vatPECoverSheet); physMuVetoHDPE = new G4PVPlacement(0, G4ThreeVector(0,0,0), logMuVetoHDPE, "physMuVetoHDPE", logMuVetoMod, false, 0); return logMuVetoMod; }