diff --git a/NPSimulation/Detectors/Epic/Epic.cc b/NPSimulation/Detectors/Epic/Epic.cc index e28f66c2eee7d3432a1204c64fe51d1d96827c2e..be26e83ca845be37353a5c61232b44c89cd0eeba 100644 --- a/NPSimulation/Detectors/Epic/Epic.cc +++ b/NPSimulation/Detectors/Epic/Epic.cc @@ -214,12 +214,12 @@ G4AssemblyVolume* Epic::BuildEpic(){ // --- Flange in Aluminium double flange_full_width = PCB_width; double flange_full_length = PCB_length; - double flange_full_height = 5.*mm; double posY_flange = posY_PCB - 0.5*PCB_Cu_height - 0.5*flange_full_height ; + double flange_full_height = 5.*mm; double posY_flange = posY_PCB - 0.5*PCB_Cu_height - 0.5*flange_full_height ; double flange_open_width = 150.0*mm; double flange_open_height = 5.1*mm; - double flange_open1_length = 42.0*mm; double posZ_open1 = -73.5*mm; - double flange_open2_length = 85.0*mm; double posZ_open2 = 0.0*mm; - double flange_open3_length = 74.5*mm; double posZ_open3 = 89.5*mm; + double flange_open1_length = 42.0*mm; double posZ_open1 = -73.5*mm; + double flange_open2_length = 85.0*mm; double posZ_open2 = 0.0*mm; + double flange_open3_length = 74.5*mm; double posZ_open3 = 89.5*mm; G4Box* flange_full = new G4Box("flange_full" , 0.5*flange_full_width , 0.5*flange_full_height, 0.5*flange_full_length); G4Box* flange_open1 = new G4Box("flange_open1", 0.5*flange_open_width , 0.5*flange_open_height, 0.5*flange_open1_length); @@ -236,9 +236,71 @@ G4AssemblyVolume* Epic::BuildEpic(){ m_EpicVolume->AddPlacedVolume(flange_vol, Tv, Rv); + // --- Frame in Aluminium + double frame_foot_full_width = flange_full_width; + double frame_foot_full_length = flange_full_length; + double frame_foot_full_height = flange_full_height; double posY_frame_foot = posY_PCB + 0.5*PCB_Cu_height + PCB_Rogers_height + 0.5*frame_foot_full_height ; + double frame_foot_open_width = flange_full_width - 2.*13.*mm; + double frame_foot_open_length = flange_full_length - 2.*13.*mm; + double frame_foot_open_height = flange_open_height; + + G4Box* frame_foot_full = new G4Box("frame_foot_full", 0.5*frame_foot_full_width, 0.5*frame_foot_full_height, 0.5*frame_foot_full_length); + G4Box* frame_foot_open = new G4Box("frame_foot_open", 0.5*frame_foot_open_width, 0.5*frame_foot_open_height, 0.5*frame_foot_open_length); + + G4VSolid* frame_foot = (G4VSolid*) new G4SubtractionSolid("frame_int1",frame_foot_full,frame_foot_open,0,G4ThreeVector(0,0,0)); + + G4LogicalVolume* frame_foot_final_vol = new G4LogicalVolume(frame_foot, Al_material, "frame_foot_logic", 0,0,0); + frame_foot_final_vol->SetVisAttributes(m_VisAl); + Tv.setY(posY_frame_foot); + m_EpicVolume->AddPlacedVolume(frame_foot_final_vol, Tv, Rv); + + double frame_full_width = frame_foot_open_width; + double frame_full_length = frame_foot_open_length; + double frame_full_height = flange_full_height + 155.5*mm; double posY_frame = posY_PCB + 0.5*PCB_Cu_height + PCB_Rogers_height + 0.5*frame_full_height ; + double frame_open_width = frame_full_width - 2.*2.*mm; + double frame_open_length = frame_full_length - 2.*2.*mm; + double frame_open_height = frame_full_height - 2.*mm; + double frame_open_side_width = frame_foot_full_width; + double frame_open_side_length = frame_full_length - 2.*15.*mm; + double frame_open_side_height = frame_full_height - 2.*15.*mm; + double frame_open_front_width = frame_full_width - 2.*15.*mm; + double frame_open_front_length = frame_foot_full_length ; + double frame_open_front_height = frame_full_height - 2.*15.*mm; + double frame_open_top_width = frame_full_width - 2.*15.*mm; + double frame_open_top_length = frame_full_length - 2.*15.*mm; + double frame_open_top_height = 2.1*mm; + + G4Box* frame_full = new G4Box("frame_full" , 0.5*frame_full_width, 0.5*frame_full_height, 0.5*frame_full_length); + G4Box* frame_open1 = new G4Box("frame_open1", 0.5*frame_open_width, 0.5*frame_open_height, 0.5*frame_open_length); + G4Box* frame_open2 = new G4Box("frame_open2", 0.5*frame_open_side_width, 0.5*frame_open_side_height, 0.5*frame_open_side_length); + G4Box* frame_open3 = new G4Box("frame_open3", 0.5*frame_open_front_width, 0.5*frame_open_front_height, 0.5*frame_open_front_length); + G4Box* frame_open4 = new G4Box("frame_open4", 0.5*frame_open_top_width, 0.5*frame_open_top_height, 0.5*frame_open_top_length); + + G4VSolid* frame_int1 = (G4VSolid*) new G4SubtractionSolid("frame_int1",frame_full, frame_open1,0,G4ThreeVector(0,-1.01*mm,0)); + G4VSolid* frame_int2 = (G4VSolid*) new G4SubtractionSolid("frame_int2",frame_int1, frame_open2,0,G4ThreeVector(0,0,0)); + G4VSolid* frame_int3 = (G4VSolid*) new G4SubtractionSolid("frame_int3",frame_int2, frame_open3,0,G4ThreeVector(0,0,0)); + G4VSolid* frame_int4 = (G4VSolid*) new G4SubtractionSolid("frame_int4",frame_int3, frame_open4,0,G4ThreeVector(0,0.5*frame_full_height-1.*mm,0)); + + G4LogicalVolume* frame_final_vol = new G4LogicalVolume(frame_int4, Al_material, "frame_logic", 0,0,0); + frame_final_vol->SetVisAttributes(m_VisAl); + Tv.setY(posY_frame); + m_EpicVolume->AddPlacedVolume(frame_final_vol, Tv, Rv); + + + //--- Cathodes (simple: rajouter les depots) + double posY_first_cathode = -1.*(double)m_nA*m_Distance_AK*mm; + for(int i=0; i<1; i++){ + BuildCathode(posY_first_cathode+i*2.*m_Distance_AK*mm); + } + //double origine_anode = origine_cathode + m_Distance_AK; + //for(int i=0; i<m_nA; i++){ + // BuildAnode(origine_anode+i*2.*m_Distance_AK*mm); + //} -/* + + +/* m_EpicVolume = new G4AssemblyVolume(); G4RotationMatrix *Rv=new G4RotationMatrix(0,0,0); @@ -348,16 +410,6 @@ G4AssemblyVolume* Epic::BuildEpic(){ - //// Cathode and Anode // - //double origine_cathode = -1.*(double)m_nA*m_Distance_AK*mm; - ////double origine_anode = origine_cathode + m_Distance_AK; - ////for(int i=0; i<m_nA; i++){ - //// BuildAnode(origine_anode+i*2.*m_Distance_AK*mm); - ////} - //for(int i=0; i<1; i++){ - // BuildCathode(origine_cathode+i*2.*m_Distance_AK*mm); - //} - return m_EpicVolume; }