-
Notifications
You must be signed in to change notification settings - Fork 53
Add parameters needed for 6.3 lattice and magnet visualization. #890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 8 commits
7dd76a9
e822bb4
fc22c1a
33d5b13
77699be
847f263
6393270
2f9be18
ef9b816
715bc30
e82a1ea
0e3b196
a15c042
1396de1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,7 @@ static Ref_t create_magnet(Detector& description, xml_h e, SensitiveDetector /* | |
| xml_comp_t magnet(magnet_coll); | ||
|
|
||
| string name = getAttrOrDefault<string>(magnet, _Unicode(name), ""); | ||
| int id = getAttrOrDefault<int>(magnet, _Unicode(id), 0); | ||
| double x = getAttrOrDefault<double>(magnet, _Unicode(x), 0); | ||
| double y = getAttrOrDefault<double>(magnet, _Unicode(y), 0); | ||
| double z = getAttrOrDefault<double>(magnet, _Unicode(z), 0); | ||
|
|
@@ -45,9 +46,14 @@ static Ref_t create_magnet(Detector& description, xml_h e, SensitiveDetector /* | |
| Tube yoke_tube(rin, rout, 0.5 * length); | ||
| Volume v_yoke("v_yoke_" + name, yoke_tube, m_Iron); | ||
|
|
||
| v_yoke.setVisAttributes(description.visAttributes(vis_name)); | ||
| v_yoke.setVisAttributes(x_det.visStr()); | ||
|
|
||
| assembly.placeVolume(v_yoke, Transform3D(RotationY(theta), Position(x, y, z))); | ||
| auto yoke_pv = assembly.placeVolume(v_yoke, Transform3D(RotationY(theta), Position(x, y, z))); | ||
|
|
||
| yoke_pv.addPhysVolID("element", id); | ||
| DetElement yoke_de(sdet, name, id); | ||
| yoke_de.setPlacement(yoke_pv); | ||
| yoke_de.setAttributes(description, v_yoke, x_det.regionStr(), x_det.limitsStr(), vis_name); | ||
|
||
| } | ||
|
|
||
| // Final placement | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.