Commit b6dfca05 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: bin/make_dawn_views

	modified:   macro/dawn_picture.mac
	modified:   scripts/input_data/few_events.hepmc
	modified:   scripts/view1/.DAWN_1.default
	modified:   scripts/view1/.DAWN_1.history
	modified:   scripts/view1/generate_eps
	modified:   scripts/view2/generate_eps
	modified:   scripts/view3/.DAWN_1.history
	modified:   scripts/view3/generate_eps
	modified:   scripts/view4/generate_eps
	modified:   scripts/view5/generate_eps
	modified:   src/TopsideIRBeamPipe_geo.cpp
	modified:   topside.xml
	modified:   topside/display.xml
	modified:   topside/vertex_tracker.xml
parent cce59c21
#!/bin/bash
#git clone --depth 1 https://eicweb.phy.anl.gov/EIC/datasets.git
export DAWN_PS_PREVIEWER="ls"
./scripts/run_topside.py -i scripts/input_data/few_events.hepmc \
-o derp.root -n 5 \
--ui csh --ui csh --vis -b -m macro/dawn_picture.mac &
-o derp.root -n 1 \
--ui csh --vis -b -m macro/dawn_picture.mac &
sleep 15
sleep 10
kill %1
./scripts/run_topside.py -i scripts/input_data/few_events.hepmc \
-o derp.root -s 1 -n 1 \
--ui csh --vis -b -m macro/dawn_picture2.mac &
sleep 10
kill %1
./scripts/run_topside.py -i scripts/input_data/few_events.hepmc \
-o derp.root -s 2 -n 1 \
--ui csh --vis -b -m macro/dawn_picture2.mac &
sleep 10
kill %1
#npsim --runType vis \
# -v WARNING \
# --macroFile macro/dawn_picture.mac \
# --numberOfEvents 1 \
# --compactFile topside.xml \
# --inputFiles scripts/input_data/few_events.hepmc \
# --outputFile derp.root \
# --dumpSteeringFile >> derp.out
ls -lrth
mkdir images
pushd scripts/view1
./generate_eps ../../g4_0000.prim
cp *.eps ../../images/.
./generate_eps -t view1 -i ../../g4_0000.prim
cp *.pdf ../../images/.
cp *.png ../../images/.
./generate_eps -t view1_ev1 -i ../../g4_0001.prim
cp *.pdf ../../images/.
cp *.png ../../images/.
./generate_eps -t view1_ev2 -i ../../g4_0002.prim
cp *.pdf ../../images/.
cp *.png ../../images/.
popd
......
......@@ -12,6 +12,7 @@
#/run/beamOn 1
#/vis/viewer/flush
/vis/open DAWNFILE
/vis/viewer/set/lineSegmentsPerCircle 24
/vis/scene/create
/vis/scene/add/volume
/vis/sceneHandler/attach
......@@ -19,6 +20,6 @@
/vis/scene/add/trajectories
/vis/scene/add/hits
/tracking/storeTrajectory 1
/run/beamOn 1
/run/beamOn 5
exit
......@@ -49,5 +49,55 @@ P 6 -3 553 -2.4074047134142244e-02 2.6879165673024504e-02 5.1101881387075991e+00
P 7 -3 2212 3.2179440203073603e-02 -3.9236108587412617e-02 9.2064134846942238e+01 9.2068929908251562e+01 9.3827200000167510e-01 1
P 8 6 -13 3.4101173607658830e+00 -1.3038459453885907e+00 5.9422927439678519e+00 6.9750212423676778e+00 1.0565800000106459e-01 1
P 9 6 13 -3.4341914079000371e+00 1.3307251110616287e+00 -8.3210460525766239e-01 3.7773087819715596e+00 1.0565800000016515e-01 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 8.3077231638512800e-02 3.4688303864359871e-01 -9.3422177831854492e-01 1.0000001305604915e+00 5.1100000015238706e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 7.2104820115711854e-01 1.5628742640734802e-01 -1.8589415622754393e+00 2.0000000652802488e+00 5.1100000036965185e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 -1.4361173664326103e+00 -9.3836236801405426e-01 -2.4611060473140363e+00 3.0000000435201661e+00 5.1100000036965185e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 -2.6126728458756499e-01 2.0189611701651842e+00 -3.4431867796228350e+00 4.0000000326401244e+00 5.1099999515529708e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 8.5091281358231141e-01 -2.4919887833464918e+00 -4.2504046027827407e+00 5.0000000261121000e+00 5.1099999863153363e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 -2.5637625613563038e+00 2.9774447329110156e+00 -4.5345280230083720e+00 6.0000000217600835e+00 5.1100000210777007e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 8.5248676124549916e-01 1.3423464093622672e+00 -6.8169914507188132e+00 7.0000000186514999e+00 5.1100000210777007e-04 1
E 0 1 3
U GEV MM
P 1 0 11 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+01 1.0000000000000000e+01 0.0000000000000000e+00 4
P 2 0 2212 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 9.3799999999999994e-01 9.3799999999999994e-01 4
V -1 0 [1,2]
P 3 -1 11 2.7295844590149682e-01 -1.0660162875541499e+00 -7.9239575315293242e+00 8.0000000163200617e+00 5.1099999515529708e-04 1
E 0 1 3
U GEV MM
HepMC::Asciiv3-END_EVENT_LISTING
......@@ -5,7 +5,7 @@
0
0
0
1.2
1
1
0.001
0
......@@ -21,10 +21,10 @@
0.001
0.001
3
70
71
0.001
1
1
0
0
1
evince
0
......
......@@ -5,7 +5,7 @@
0
0
0
1.2
1
1
0.001
0
......@@ -21,10 +21,10 @@
0.001
0.001
3
70
71
0.001
1
1
0
0
1
evince
0
......
#!/bin/bash
echo "view1 is a slice of the detector along the z-axis 1 mm wide viewed from the side."
export DAWN_PS_PREVIEWER="evince"
dawncut 1 0 0 1 $1 out1.prim
dawncut -1 0 0 1 out1.prim view1.prim
dawn -d view1.prim
ps2pdf view1.eps view1_full.pdf
gs -o view1.pdf -sDEVICE=pdfwrite \
#export DAWN_PS_PREVIEWER="derp"
function print_the_help {
echo "USAGE: $0 <PRIM_FILE> "
echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)"
exit
}
FILE_TAG="view1"
INPUT_FILE="g4_0000.prim"
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift # past argument
print_the_help
;;
-t|--tag)
FILE_TAG="$2"
shift # past argument
shift # past value
;;
-i|--input)
INPUT_FILE="$2"
shift # past argument
shift # past value
;;
*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1"
print_the_help
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
dawncut 1 0 0 1 ${INPUT_FILE} ${FILE_TAG}_temp0.prim
dawncut -1 0 0 1 ${FILE_TAG}_temp0.prim ${FILE_TAG}.prim
dawn ${FILE_TAG}.prim
ps2pdf ${FILE_TAG}.eps ${FILE_TAG}_full.pdf
gs -o ${FILE_TAG}.pdf -sDEVICE=pdfwrite \
-c "[/CropBox [51 250 550 590] /PAGES pdfmark" \
-f view1_full.pdf
-f ${FILE_TAG}_full.pdf
pdftoppm ${FILE_TAG}.pdf ${FILE_TAG} -png -singlefile -cropbox
pdftoppm view1.pdf view1 -png -singlefile -cropbox
......@@ -2,7 +2,6 @@
echo "view2 produces a series of XY slices a different z locations."
export DAWN_PS_PREVIEWER="evince"
# units are mm
dawncut 0 0 -1 1 $1 view2aa.prim
......
......@@ -4,7 +4,7 @@
1
0
0
491.1
154.58
1.2
5
0.001
......
#!/bin/bash
export DAWN_PS_PREVIEWER="evince"
# units are mm
dawncut 0 0 -1 -1500 $1 view3.prim
dawn view3.prim
......
......@@ -2,7 +2,6 @@
# this is a detector slice
export DAWN_PS_PREVIEWER="evince"
# units are mm
dawncut 0 0 -1 -1500 $1 out1.prim
dawncut 0 0 1 1600 out1.prim view4.prim
......
......@@ -2,7 +2,6 @@
# this is a detector slice
export DAWN_PS_PREVIEWER="evince"
# units are mm
dawncut 0 0 1 1500 $1 out1.prim
dawncut 0 0 -1 1600 out1.prim view5.prim
......
......@@ -109,11 +109,11 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector sens) {
sdet.setAttributes(det, v_upstream_conic_section, x_det.regionStr(), x_det.limitsStr(), vis_name);
sdet.setAttributes(det, v_upstream_electron_tube, x_det.regionStr(), x_det.limitsStr(), vis_name);
//Volume v_upstream_conic_section_vacuum("v_upstream_conic_section_vacuum", upstream_electron_tube, m_Al);
auto pv_upstream_conic_section = assembly.placeVolume(
v_upstream_conic_section,
Transform3D(
Position(-upstream_delta_r/2.0,0, -upstream_straight_length - upstream_conic_length / 2.0)) *
Position(-upstream_delta_r/2.0,0, -upstream_straight_length - upstream_conic_length / 2.0-1.0*mm)) *
RotationY(crossing_angle / 2.0) * RotationX(M_PI));
auto pv_upstream_electron_tube =
assembly.placeVolume(v_upstream_electron_tube,
......
......@@ -105,15 +105,15 @@
</display>
<!--
<include ref="topside/silicon_tracker.xml"/>
-->
<include ref="topside/vertex_tracker.xml"/>
<include ref="topside/silicon_tracker.xml"/>
<include ref="topside/beampipe.xml"/>
<!--
<include ref="topside/ecal.xml"/>
<include ref="topside/hcal.xml"/>
<include ref="topside/solenoid.xml"/>
<include ref="topside/topside_rich.xml"/>
<include ref="topside/beampipe.xml"/>
<!--
-->
<!--
<include ref="topside/roman_pots.xml"/>
......
<display>
<vis name="SiVertexVis" alpha="0.9" r="1" g="0" b="1" showDaughters="false" />
<vis name="SiVertexVis" alpha="0.9" r="1" g="0" b="1" showDaughters="true" />
<vis name="SiTrackerBarrelVis" alpha="0.01" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="false"/>
<vis name="SiTrackerVis" alpha="0.5" r="1.0" g="0.0" b="0.0" showDaughters="false" />
<vis name="EcalVis" alpha="0.1" r="0.0" g="0.75" b="0.1" showDaughters="false"/>
......@@ -20,7 +20,7 @@
<vis name="OrangeVis" alpha="1.0" r= "1.0" g="0.45" b="0.0" showDaughters="true" visible="true"/>
<vis name="RedGreenVis" alpha="0.5" r= "1.0" g="1.0" b="0.0" showDaughters="true" visible="true"/>
<vis name="BlueGreenVis" alpha="0.5" r= "0.0" g="1.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="PurpleVis" alpha="0.5" r= "1.0" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="PurpleVis" alpha="1.0" r= "1.0" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="DoubleRedG" alpha="0.5" r= "2.0" g=".10" b="0.0" showDaughters="true" visible="true"/>
<vis name="RBG015" alpha="0.5" r= "0.0" g=".2" b="1.0" showDaughters="true" visible="true"/>
<vis name="RBG510" alpha="0.5" r= "1.0" g=".2" b="0.0" showDaughters="true" visible="true"/>
......
......@@ -35,7 +35,13 @@
</detector>
-->
<detector id="SiVertexBarrel_ID" name="SiVertexBarrel" type="topside_SiVertexBarrel" readout="SiVertexBarrelHits" insideTrackingVolume="true" vis="PurpleVis">
<detector
id="SiVertexBarrel_ID"
name="SiVertexBarrel"
type="topside_SiVertexBarrel"
readout="SiVertexBarrelHits"
insideTrackingVolume="true"
vis="PurpleVis">
<dimensions rmin="VertexTrackerRadius1-5*mm" rmax="VertexTrackerRadius8+5*mm" length="VertexTrackerBarrelLength"/>
<module name="SOIPIXD">
<frame width="15*mm" height="3.0*mm" length="VertexTrackerBarrelLength" thickness="0.1 * mm" material="CarbonFiber_25percent" vis="VertexFrameVis" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment