Skip to content
Snippets Groups Projects
Commit a434aebe authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: compact/gem_tracker_endcap.xml

	modified:   src/TrapEndcapTracker_geo.cpp
parent 20fea4e4
Branches
No related tags found
No related merge requests found
......@@ -74,7 +74,7 @@
<detector
id="GEMTrackerEndcap_ID"
name="GEMTrackerEndcap"
type="refdet_GEMTrackerEndcap"
type="MyGEMTrackerEndcap"
readout="GEMTrackerEndcapHits"
vis="BlueVis"
reflect="false">
......@@ -124,7 +124,7 @@
<detector
id="GEMTrackerEndcapN_ID"
name="GEMTrackerEndcapN"
type="refdet_GEMTrackerEndcap"
type="MyGEMTrackerEndcap"
readout="GEMTrackerEndcapHits"
vis="RedVis"
reflect="true">
......
......@@ -68,7 +68,13 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
string c_name = _toString(c_id, "component%d");
Volume c_vol(c_name, Trapezoid(comp_x1, comp_x2, c_thick / 2e0, c_thick / 2e0, comp_height), c_mat);
c_vol.setVisAttributes(description.visAttributes(c.visStr()));
// use the module vis attributes if not set for component.
auto comp_vis = x_mod.visStr();
if(( c.visStr().size() >0 ) ) {
comp_vis = c.visStr();
}
c_vol.setVisAttributes(description.visAttributes(comp_vis));
pv = m_volume.placeVolume(c_vol, Position(0, posY + c_thick / 2, 0));
if (c.isSensitive()) {
sdet.check(n_sensor > 2, "SiTrackerEndcap2::fromCompact: " + c_name + " Max of 2 modules allowed!");
......@@ -141,5 +147,5 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
}
// clang-format off
DECLARE_DETELEMENT(refdet_TrapEndcapTracker, create_detector)
DECLARE_DETELEMENT(refdet_GEMTrackerEndcap, create_detector)
DECLARE_DETELEMENT(TrapEndcapTracker, create_detector)
DECLARE_DETELEMENT(MyGEMTrackerEndcap, create_detector)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment