Skip to content
Snippets Groups Projects
Commit 3d5f1f35 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

Merge branch 'master' of cepcgit.ihep.ac.cn:cepc-prototype/CEPCSW into lcg97

parents c6bf856d ab805278
No related branches found
No related tags found
No related merge requests found
......@@ -32,13 +32,18 @@
<detectors>
<detector id="1" name="CaloDetector" type="EcalMatrix" readout="CaloHitsCollection" vis="VisibleGreen" sensitive="true">
<position x="0" y="0" z="1800*mm"/>
<position x="0" y="0" z="1835*mm+30*cm"/>
<dimensions dx="30*cm" dy="30*cm" dz="30*cm"/>
</detector>
</detectors>
<readouts>
<readout name="CaloHitsCollection">
<id>system:8</id>
<segmentation type="CartesianGridXYZ"
grid_size_x="1*cm"
grid_size_y="1*cm"
grid_size_z="1*cm"/>
<id>system:8,x:32:-6,y:-6,z:-6</id>
</readout>
</readouts>
......
......@@ -27,6 +27,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
MYDEBUGVAL(det_name);
MYDEBUGVAL(det_type);
xml_dim_t pos (x_det.child(_U(position)));
xml_dim_t dim (x_det.child(_U(dimensions)));
dd4hep::DetElement sdet(det_name, x_det.id());
......@@ -34,7 +35,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector,
dd4hep::Volume motherVol = theDetector.pickMotherVolume(sdet);
dd4hep::Material det_mat(theDetector.material("G4_BGO"));
dd4hep::Volume det_vol(det_name+"_vol", dd4hep::Box(60, 60, 60), det_mat);
dd4hep::Volume det_vol(det_name+"_vol", dd4hep::Box(dim.dx(), dim.dy(), dim.dz()), det_mat);
dd4hep::Transform3D transform(dd4hep::Rotation3D(),
dd4hep::Position(pos.x(),pos.y(),pos.z()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment