diff --git a/NPSimulation/Tiara/Tiara.cc b/NPSimulation/Tiara/Tiara.cc index 95e6749f82c9d4c247d2945b1fdeb2d8e1cd08f7..3bbf988ea3e786880a41eeaf61d36db082b5e7f3 100644 --- a/NPSimulation/Tiara/Tiara.cc +++ b/NPSimulation/Tiara/Tiara.cc @@ -141,7 +141,8 @@ void Tiara::ReadConfiguration(string Path){ void Tiara::ConstructDetector(G4LogicalVolume* world){ ConstructChamber(world); ConstructInnerBarrel(world); - + ConstructOuterBarrel(world); + ConstructHyball(world); } // Read sensitive part and fill the Root tree. // Called at in the EventAction::EndOfEventAvtion @@ -164,7 +165,7 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){ // The Barrel is made of 8 identical resistive strip detector // The PCB is made from a G4ExtrudeSolid, because it has beveled edge // the pcb is a substracted volume - // the wafer goes into the hole + // the wafer goes into the hole, but a 15mm part is still covered by some PCB // the whole things is design so the local reference is the one of the wafer // Start by making a full pcb @@ -190,9 +191,21 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){ // A box having Wafer dimension but thicker than the PCB // Will be used to remove material from the PCB to have space for the wafer - G4Box* WaferShape = new G4Box("WaferShape", + + // Calculate the hole shift within the PCB + G4ThreeVector HoleShift = G4ThreeVector( + 0, + 0, + INNERBARREL_PCB_Offset-(INNERBARREL_PCB_Length/2-INNERBARREL_PCB_HoleLength/2)); + + G4Box* HoleShape = new G4Box("HoleShape", INNERBARREL_Wafer_Width/2., INNERBARREL_PCB_Thickness/2.+0.1*mm, + INNERBARREL_PCB_HoleLength/2.); + + G4Box* WaferShape = new G4Box("WaferShape", + INNERBARREL_Wafer_Width/2., + INNERBARREL_PCB_Thickness/2., INNERBARREL_Wafer_Length/2.); // The Silicon Wafer itself @@ -201,21 +214,19 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){ INNERBARREL_Wafer_Thickness/2, INNERBARREL_Wafer_Length/2.); - // Calculate the wafer shift within the PCB - G4ThreeVector WaferShift = G4ThreeVector( - 0, - 0, - INNERBARREL_PCB_Offset-(INNERBARREL_PCB_Length/2-INNERBARREL_Wafer_Length/2)); + // Substracting the hole Shape from the Stock PCB + G4SubtractionSolid* PCB_1 = new G4SubtractionSolid("PCB_1", PCBFull, HoleShape, + new G4RotationMatrix,HoleShift); - // Substracting the Wafer Shape from the Stock PCB - G4SubtractionSolid* PCB = new G4SubtractionSolid("PCB", PCBFull, WaferShape, - new G4RotationMatrix,WaferShift); + // Substracting the wafer space from the Stock PCB + G4SubtractionSolid* PCB = new G4SubtractionSolid("PCB", PCB_1, WaferShape, + new G4RotationMatrix,G4ThreeVector(0,INNERBARREL_PCB_Thickness/2.+INNERBARREL_PCB_WaferDepth,0)); // Master Volume that encompass everything else G4LogicalVolume* logicBarrelDetector = new G4LogicalVolume(PCBFull,m_MaterialVacuum,"logicBoxDetector", 0, 0, 0); logicBarrelDetector->SetVisAttributes(G4VisAttributes::Invisible); - + // Sub Volume PCB G4LogicalVolume* logicPCB = new G4LogicalVolume(PCB,m_MaterialPCB,"logicPCB", 0, 0, 0); @@ -240,7 +251,7 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){ false,i+1); new G4PVPlacement(new G4RotationMatrix(0,0,0), - WaferShift, + G4ThreeVector(0,0.5*(-INNERBARREL_PCB_WaferDepth-INNERBARREL_Wafer_Thickness),0), logicWafer,"Barrel_Wafer", logicBarrelDetector,false,i+1); @@ -250,9 +261,9 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){ // Detector are rotate by 45deg with each other G4RotationMatrix* DetectorRotation = new G4RotationMatrix(0*deg,0*deg,i*45*deg); - + // There center is also rotated by 45deg - G4ThreeVector DetectorPosition(0,DistanceFromTarget,-WaferShift.z()); + G4ThreeVector DetectorPosition(0,DistanceFromTarget,0); DetectorPosition.rotate(i*45*deg,G4ThreeVector(0,0,-1)); // Place the Master volume with its two daugther volume at the final place diff --git a/NPSimulation/Tiara/Tiara.hh b/NPSimulation/Tiara/Tiara.hh index fc4aa2656fb1c8d23ed5f1385deb2cc83871d883..bdf4870ea49d2a0441faa02c1f17f0489ae67e45 100644 --- a/NPSimulation/Tiara/Tiara.hh +++ b/NPSimulation/Tiara/Tiara.hh @@ -73,12 +73,15 @@ namespace TIARA const G4double INNERBARREL_PCB_Length = 98.00*mm; const G4double INNERBARREL_PCB_Width = 27.76*mm; const G4double INNERBARREL_PCB_Thickness = 1.60*mm; + const G4double INNERBARREL_PCB_HoleLength = 82*mm; + const G4double INNERBARREL_PCB_WaferDepth = 1.1*mm; const G4double INNERBARREL_PCB_Bevel1_Theta = 50*deg ; const G4double INNERBARREL_PCB_Bevel2_Theta = 67.5*deg; - // offset between the edge of the PCB and the Edge of the Waffer - const G4double INNERBARREL_PCB_Offset = 15*mm; + // offset between the edge of the PCB and the Edge of the hole + // 15mm - 1mm for the edge at the top + const G4double INNERBARREL_PCB_Offset = 14*mm; // Different from Marc code, to be checked - const G4double INNERBARREL_Wafer_Length = 82.00*mm; + const G4double INNERBARREL_Wafer_Length = 94.00*mm; const G4double INNERBARREL_Wafer_Width = 24.80*mm; const G4double INNERBARREL_Wafer_Thickness =400*um;