From b7a7386b23b57ae430a560eddde346098646abfb Mon Sep 17 00:00:00 2001 From: "jihee.kim" <jihee.kim@anl.gov> Date: Fri, 26 Mar 2021 17:26:33 -0500 Subject: [PATCH] Added Sensitive detector type --- src/ffi_ZDC.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ffi_ZDC.cpp b/src/ffi_ZDC.cpp index 82ce448..1c20198 100644 --- a/src/ffi_ZDC.cpp +++ b/src/ffi_ZDC.cpp @@ -24,6 +24,8 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens) // 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.setSensitiveDetector(sens); + sens.setType("calorimeter"); detVol.setVisAttributes(desc.visAttributes(x_det.visStr())); @@ -31,6 +33,7 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens) Volume motherVol = desc.pickMotherVolume(det); Transform3D tr(RotationZYX(rot.z(), rot.y(), rot.x()), Position(pos.x(), pos.y(), pos.z())); PlacedVolume detPV = motherVol.placeVolume(detVol, tr); + detPV.addPhysVolID("system", detID).addPhysVolID("module",0); det.setPlacement(detPV); return det; } -- GitLab