Skip to content
Snippets Groups Projects
Commit 357a9982 authored by Jihee Kim's avatar Jihee Kim
Browse files

Created global volume for detector and Added VisAttributes

parent 74e39cf7
No related branches found
No related tags found
1 merge request!11Resolve "Implement ffi_ZDC"
Pipeline #7722 failed
......@@ -49,6 +49,7 @@
<vis name="BeamPipeVis" alpha="1" r= "0.75" g="0.75" b="0.75" showDaughters="true" visible="true"/>
<vis name="cb_SolenoidVis" alpha="0.4" r= "0.1" g="0.0" b="0.1" showDaughters="true" visible="true"/>
<vis name="ffi_ZDCVis" alpha="0.1" r= "0.1" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<comment>
Deprecated colors.
......
......@@ -25,12 +25,19 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
double y_rot = dd4hep::getAttrOrDefault(rot, _Unicode(y),0.0);
double z_rot = dd4hep::getAttrOrDefault(rot, _Unicode(z),0.0);
Material Vacuum = desc.material("Vacuum");
std::cout << "positions: " << x_pos << " , " << z_pos << std::endl;
// Create Global Volume
Box ffi_ZDC_GVol_Solid(Width * 0.5, Width * 0.5, Thickness * 0.5);
Volume detVol("ffi_ZDC_GVol_Logic", ffi_ZDC_GVol_Solid, Vacuum);
detVol.setVisAttributes(desc.visAttributes(x_det.visStr()));
DetElement det(detName, detID);
Volume motherVol = desc.pickMotherVolume(det);
Transform3D tr(RotationZYX(0., 0., 0.), Position(0., 0., 0.));
Transform3D tr(RotationZYX(z_rot, y_rot, x_rot), Position(x_pos, 0., z_pos));
PlacedVolume detPV = motherVol.placeVolume(detVol, tr);
det.setPlacement(detPV);
return det;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment