Skip to content
Snippets Groups Projects
Commit 153863f3 authored by Chao Peng's avatar Chao Peng
Browse files

add surfaces and sens

parent 60e263d8
No related branches found
No related tags found
No related merge requests found
Pipeline #90697 passed with warnings
...@@ -37,13 +37,6 @@ ...@@ -37,13 +37,6 @@
<placement x="0*cm" y="211.411*cm" z="50.6678*cm"/> <placement x="0*cm" y="211.411*cm" z="50.6678*cm"/>
<rotation x="85.0*degree" y="180*degree" z="180*degree"/> <rotation x="85.0*degree" y="180*degree" z="180*degree"/>
</piece> </piece>
<!--
<piece id="3" >
<comment>Mirror 3 is the combination of winston cone and PMT assembly</comment>
<placement x="0*cm" y="255*cm" z="-40*cm"/>
<rotation x="55.0*degree" y="0" z="0"/>
</piece>
-->
</mirrors> </mirrors>
<comment> <comment>
...@@ -53,6 +46,7 @@ ...@@ -53,6 +46,7 @@
<placement x="0*cm" y="255*cm" z="-40*cm"/> <placement x="0*cm" y="255*cm" z="-40*cm"/>
<rotation x="55.0*degree" y="0" z="0"/> <rotation x="55.0*degree" y="0" z="0"/>
<cone_dimensions thickness="4*mm" length="30.*cm" radius1="7.0*cm" radius2="21.0*cm"/> <cone_dimensions thickness="4*mm" length="30.*cm" radius1="7.0*cm" radius2="21.0*cm"/>
<cone_dimensions thickness="4*mm" length="30.*cm" radius1="7.0*cm" radius2="15.0*cm"/>
<tube_dimensions radius="11.28*cm" length="30.*cm"/> <tube_dimensions radius="11.28*cm" length="30.*cm"/>
</winston_cone> </winston_cone>
......
...@@ -76,6 +76,11 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec ...@@ -76,6 +76,11 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
envPV.addPhysVolID("system", det_id); envPV.addPhysVolID("system", det_id);
det.setPlacement(envPV); det.setPlacement(envPV);
// optical surfaces
OpticalSurfaceManager surfMgr = desc.surfaceManager();
OpticalSurface mirrorSurf = surfMgr.opticalSurface("MirrorOpticalSurface");
OpticalSurface pmtSurf = surfMgr.opticalSurface("PMTOpticalSurface");
// mirrors // mirrors
auto x_mirrors = x_det.child(_Unicode(mirrors)); auto x_mirrors = x_det.child(_Unicode(mirrors));
int i = 1; int i = 1;
...@@ -93,6 +98,15 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec ...@@ -93,6 +98,15 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
Volume v_mir("vol_mirror_" + std::to_string(i), IntersectionSolid(mir_cutout, mir_shell, mir_trans), mmat); Volume v_mir("vol_mirror_" + std::to_string(i), IntersectionSolid(mir_cutout, mir_shell, mir_trans), mmat);
auto mir_trans2 = Transform3D(Position(mloc.x(), mloc.y(), mloc.z()))*RotationZYX(mrot.z(), mrot.y(), mrot.x()); auto mir_trans2 = Transform3D(Position(mloc.x(), mloc.y(), mloc.z()))*RotationZYX(mrot.z(), mrot.y(), mrot.x());
PlacedVolume pv_mir = v_sector.placeVolume(v_mir, mir_trans2); PlacedVolume pv_mir = v_sector.placeVolume(v_mir, mir_trans2);
DetElement de_mir(det, "de_mirror" + std::to_string(i) + "_shape", 1);
pv_mir.addPhysVolID("mirror", 1);
de_mir.setPlacement(pv_mir);
sens.setType("photoncounter");
v_mir.setSensitiveDetector(sens);
// optical surface
SkinSurface mirrorBorder_Surf(desc, de_mir, "LGCmirror", mirrorSurf, v_mir);
mirrorBorder_Surf.isValid();
} }
// sectors // sectors
...@@ -124,7 +138,7 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec ...@@ -124,7 +138,7 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
double tube_radius = tdims.radius(); double tube_radius = tdims.radius();
double tube_length = tdims.length(); double tube_length = tdims.length();
DetElement de_wcone(det, "de_winston_cone1", 1); DetElement de_winston_cone(det, "de_winston_cone1", 1);
Tube winston_tube(tube_radius, tube_radius + cone_thickness, tube_length / 2.0); Tube winston_tube(tube_radius, tube_radius + cone_thickness, tube_length / 2.0);
Paraboloid winston_cone1(cone_radius1 + cone_thickness, cone_radius2 + cone_thickness, cone_length / 2.0 ); Paraboloid winston_cone1(cone_radius1 + cone_thickness, cone_radius2 + cone_thickness, cone_length / 2.0 );
Paraboloid winston_cone2(cone_radius1, cone_radius2, cone_length / 2.0 ); Paraboloid winston_cone2(cone_radius1, cone_radius2, cone_length / 2.0 );
...@@ -135,19 +149,10 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec ...@@ -135,19 +149,10 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
v_winston_cone_solid, Transform3D(Position(wpl.x(), wpl.y(), wpl.z())) * v_winston_cone_solid, Transform3D(Position(wpl.x(), wpl.y(), wpl.z())) *
RotationZYX(wrot.z(), wrot.y(), wrot.x()) * RotationZYX(wrot.z(), wrot.y(), wrot.x()) *
Transform3D(Position(0, 0, tube_length / 2.0 + 5.0 * mm))); Transform3D(Position(0, 0, tube_length / 2.0 + 5.0 * mm)));
de_winston_cone.setPlacement(pv_winston_cone_solid);
//// --------------- // optical surface
return det; SkinSurface winstonBorder_Surf(desc, de_winston_cone, "LGCWinstonCone", mirrorSurf, v_winston_cone_solid);
} winstonBorder_Surf.isValid();
/*
//std::cout << " LGC_pmt_y_pos/cm " << LGC_pmt_y_pos/cm << "\n";
//std::cout << " LGC_pmt_z_pos/cm " << LGC_pmt_z_pos/cm << "\n";
//mirrorPV.addPhysVolID("layer", 2).addPhysVolID("module", 1);
//mirror_DE.setPlacement(mirrorPV);
//sens.setType("photoncounter");
//mirrorVol.setSensitiveDetector(sens);
//// ---------------
//// --------------- //// ---------------
//// Dummy PMT surface //// Dummy PMT surface
...@@ -155,36 +160,26 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec ...@@ -155,36 +160,26 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
Box pmt_array(LGC_pmt_array_size / 2.0, LGC_pmt_array_size / 2.0, 5 * mm / 2.0); Box pmt_array(LGC_pmt_array_size / 2.0, LGC_pmt_array_size / 2.0, 5 * mm / 2.0);
Volume v_pmt_array("v_pmt_array", pmt_array, rad_mat); Volume v_pmt_array("v_pmt_array", pmt_array, rad_mat);
PlacedVolume pv_pmt_array = PlacedVolume pv_pmt_array =
v_sector.placeVolume(v_pmt_array, Transform3D(Position(0, LGC_pmt_y_pos, LGC_pmt_z_pos)) * v_sector.placeVolume(v_pmt_array, Transform3D(Position(wpl.x(), wpl.y(), wpl.z())) *
RotationX(LGC_pmt_tilt_angle)); RotationZYX(wrot.z(), wrot.y(), wrot.x()));
pv_pmt_array.addPhysVolID("mirror", 3); pv_pmt_array.addPhysVolID("mirror", 3);
de_pmt_array.setPlacement(pv_pmt_array); de_pmt_array.setPlacement(pv_pmt_array);
sens.setType("photoncounter"); sens.setType("photoncounter");
v_pmt_array.setSensitiveDetector(sens); v_pmt_array.setSensitiveDetector(sens);
// optical surface
SkinSurface pmtBorder_Surf(desc, de_pmt_array, "LGCPMTsurface", pmtSurf, v_pmt_array);
pmtBorder_Surf.isValid();
// copper layer inside to stop photons // copper layer inside to stop photons
Box pmt_array_backing(LGC_pmt_array_size/2.0, LGC_pmt_array_size/2.0, 1*mm/2.0); Box pmt_array_backing(LGC_pmt_array_size/2.0, LGC_pmt_array_size/2.0, 1*mm/2.0);
auto Copper = desc.material("Copper");
Volume v_pmt_array_backing("v_pmt_array_backing", pmt_array_backing, Copper); Volume v_pmt_array_backing("v_pmt_array_backing", pmt_array_backing, Copper);
PlacedVolume pv_pmt_array_backing = v_pmt_array.placeVolume(v_pmt_array_backing, Position(0,0,0)); PlacedVolume pv_pmt_array_backing = v_pmt_array.placeVolume(v_pmt_array_backing, Position(0,0,0));
// Optical Surfaces return det;
OpticalSurfaceManager surfMgr = desc.surfaceManager();
OpticalSurface mirrorSurf = surfMgr.opticalSurface("MirrorOpticalSurface");
OpticalSurface pmtSurf = surfMgr.opticalSurface("PMTOpticalSurface");
//BorderSurface mirrorBorder_Surf = BorderSurface(desc, det, "RICHmirror", mirrorSurf, mirrorPV, envPV);
SkinSurface mirrorBorder_Surf(desc,de_mirror1_shape,"LGCmirror", mirrorSurf, v_mirror1_shape);
SkinSurface winstonBorder_Surf(desc,de_winston_cone,"LGCWinstonCone", mirrorSurf, v_winston_cone_solid);
SkinSurface pmtBorder_Surf(desc,de_pmt_array,"LGCPMTsurface", pmtSurf, v_pmt_array);
//BorderSurface bubbleSurf = BorderSurface(description, sdet, "TankBubble", airSurf, bubblePlace, tankPlace);
mirrorBorder_Surf.isValid();
winstonBorder_Surf.isValid();
pmtBorder_Surf.isValid();
//tankSurf.isValid();
} }
*/
//@} //@}
// clang-format off // clang-format off
DECLARE_DETELEMENT(SoLID_GasCherenkov, createDetector) DECLARE_DETELEMENT(SoLID_GasCherenkov, createDetector)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment