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

Added Sensitive detector type

parent 41ca68bd
No related branches found
No related tags found
1 merge request!11Resolve "Implement ffi_ZDC"
This commit is part of merge request !11. Comments created here will be created in the context of that merge request.
...@@ -24,6 +24,8 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens) ...@@ -24,6 +24,8 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
// Create Global Volume // Create Global Volume
Box ffi_ZDC_GVol_Solid(Width * 0.5, Width * 0.5, Thickness * 0.5); 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); Volume detVol("ffi_ZDC_GVol_Logic", ffi_ZDC_GVol_Solid, Vacuum);
detVol.setSensitiveDetector(sens);
sens.setType("calorimeter");
detVol.setVisAttributes(desc.visAttributes(x_det.visStr())); detVol.setVisAttributes(desc.visAttributes(x_det.visStr()));
...@@ -31,6 +33,7 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens) ...@@ -31,6 +33,7 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
Volume motherVol = desc.pickMotherVolume(det); Volume motherVol = desc.pickMotherVolume(det);
Transform3D tr(RotationZYX(rot.z(), rot.y(), rot.x()), Position(pos.x(), pos.y(), pos.z())); Transform3D tr(RotationZYX(rot.z(), rot.y(), rot.x()), Position(pos.x(), pos.y(), pos.z()));
PlacedVolume detPV = motherVol.placeVolume(detVol, tr); PlacedVolume detPV = motherVol.placeVolume(detVol, tr);
detPV.addPhysVolID("system", detID).addPhysVolID("module",0);
det.setPlacement(detPV); det.setPlacement(detPV);
return det; return det;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment