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

modified: compact/display.xml

	modified:   compact/sphere_test.xml
	modified:   src/sphere_test.cpp
parent 54ca4ff5
Branches sphere_tests
No related tags found
1 merge request!103minimal example illustrating sphere overlap issue
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<comment> <comment>
Deprecated colors. Deprecated colors.
</comment> </comment>
<vis name="GreenVis" alpha="1.0" r= "0.0" g="1.0" b="0.0" showDaughters="true" visible="true"/> <vis name="GreenVis" alpha="1.0" r= "0.0" g="1.0" b="0.0" showDaughters="false" visible="true"/>
<vis name="RedVis" alpha="0.2" r= "1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/> <vis name="RedVis" alpha="0.2" r= "1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="RPVis" alpha="0.99" r= "1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/> <vis name="RPVis" alpha="0.99" r= "1.0" g="0.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="RPLayerVis" alpha="0.99" r= "0.0" g="0.7" b="0.3" showDaughters="true" visible="true" lineStyle="solid" drawingStyle="solid" /> <vis name="RPLayerVis" alpha="0.99" r= "0.0" g="0.7" b="0.3" showDaughters="true" visible="true" lineStyle="solid" drawingStyle="solid" />
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<detectors> <detectors>
<detector <detector
id="1000" id="2"
name="sphere_test" name="sphere_test"
type="athena_sphere_test" type="athena_sphere_test"
readout="sphere_test_hits" readout="sphere_test_hits"
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
thetamax="120*deg" thetamax="120*deg"
phimin="-45*deg" phimin="-45*deg"
phimax="45*deg" phimax="45*deg"
yrot="110*deg" yrot="0*deg"
material="AcrylicOptical" material="PyrexGlass"
vis="GreenVis" vis="GreenVis"
/> />
<sensor <sensor
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
halflengthx="1.5*m" halflengthx="1.5*m"
halflengthy="1.5*m" halflengthy="1.5*m"
halflengthz="0.1*m" halflengthz="0.1*m"
material="AcrylicOptical" material="PyrexGlass"
vis="BlueVis" vis="BlueVis"
/> />
</detector> </detector>
......
...@@ -58,26 +58,17 @@ static Ref_t create_detector(Detector& desc, xml::Handle_t handle, SensitiveDete ...@@ -58,26 +58,17 @@ static Ref_t create_detector(Detector& desc, xml::Handle_t handle, SensitiveDete
double ly = detElem.child(_Unicode(sensor)).attr<double>(_Unicode(halflengthy)); double ly = detElem.child(_Unicode(sensor)).attr<double>(_Unicode(halflengthy));
double lz = detElem.child(_Unicode(sensor)).attr<double>(_Unicode(halflengthz)); double lz = detElem.child(_Unicode(sensor)).attr<double>(_Unicode(halflengthz));
Sphere mirror_solid( radius-thickness, radius, thetamin, thetamax, phimin, phimax ); Sphere mirror_solid( radius-thickness, radius);//, thetamin, thetamax, phimin, phimax );
IntersectionSolid mirror_solid2(mirror_solid, Box(lx,ly,lz), Position(0,0,radius-thickness)); IntersectionSolid mirror_solid2(mirror_solid, Box(lx,ly,lz), Position(0,0,radius-thickness));
// volume
Volume sphereVol("mirror_v",mirror_solid2,sphereMat); Volume sphereVol("mirror_v",mirror_solid2,sphereMat);
sphereVol.setVisAttributes(sphereV);
// placement
auto spherePV = envVol.placeVolume(sphereVol, Transform3D(RotationY(yrot))); auto spherePV = envVol.placeVolume(sphereVol, Transform3D(RotationY(yrot)));
DetElement sphereDE(det, "mirror_de", 0); DetElement sphereDE(det, "mirror_de", 0);
sphereDE.setPlacement(spherePV); sphereDE.setPlacement(spherePV);
Box sensor_solid(lx,ly,lz); Box sensor_solid(lx,ly,lz);
// volume
Volume boxVol("sensor_v",sensor_solid,boxMat); Volume boxVol("sensor_v",sensor_solid,boxMat);
boxVol.setVisAttributes(boxVis); boxVol.setVisAttributes(boxVis);
boxVol.setSensitiveDetector(sens);
// placement
auto boxPV = envVol.placeVolume(boxVol); auto boxPV = envVol.placeVolume(boxVol);
boxPV.addPhysVolID("sensor", 0); boxPV.addPhysVolID("sensor", 0);
DetElement boxDE(det, "sensor_de", 0); DetElement boxDE(det, "sensor_de", 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment