Skip to content
Snippets Groups Projects
Commit d6ad59b6 authored by Marshall Scott's avatar Marshall Scott
Browse files

changed ci_GEM

parent 7b503f39
Branches
Tags v1.1.0
No related merge requests found
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
......@@ -38,7 +38,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
for (cml_coll_t c(detElem, _U(layer)); c; c++)
{
xml_comp_t x_layer = c;
string layer_name = detName + _toString(c.id(), "_layer%d");
std::string layer_name = detName + _toString(c.id(), "_layer%d");
Volume layer_vol(layer_name, Tube(c.rmin(), c.rmax(), c.z() ), mat );
layer_vol.
Position layer_pos(0, 0, 0);
......@@ -74,17 +74,17 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
//Adding layers to placed volume
xml_comp_t x_layer = detElem.child(_U(layer));
for (int layerNum = 0; layerNum < Nlayers; layerNum++){
xml_comp_t x_layer = c;
string layer_name = detName + _toString(layerNum, "_layer%d");
std::string layer_name = detName + _toString(layerNum, "_layer%d");
double lrmin, lrmax, lz;
lrmin = RIn + (1.0 + 0.5 * layerNum) * dd4hep::cm;
lrmax = ROut + (-25.0 + 2.0 * layerNum) * dd4hep::cm;
lz = sizez * 0.5 + (5.0 + 3. * layerNum) * dd4hep::cm;
lz = SizeZ * 0.5 + (5.0 + 3. * layerNum) * dd4hep::cm;
Volume layer_vol(layer_name, Tube(lrmin, lrmax, 1.0 * dd4hep::cm), mat);
Position layer_pos(0, 0, lz);
DetElement layer(det, layer_name, detID);
layer.setVisAttributes(desc.visAttributes(det.visStr()));
layer.setVisAttributes(desc.visAttributes(detElem.visStr()));
//layer.setAttributes(desc, layer_vol, desc.region(), desc.limits(), );//(region, limits, visable).
PlacedVolume layer_phv = detVol.placeVolume(layer_vol, layer_pos);
layer_phv.addPhysVolID("layer", layerNum);
......@@ -92,6 +92,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
layerNum++;
}
DetElement det(detName, detID);
return det;
}
// clang-format off
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment