diff --git a/README.md b/README.md index 1e50030c985ceadfe101c48b5debf74d6c898839..b386cf703c9ec42f89aa9ca4efc910f2cd2495cf 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,11 @@ The reference detector at IP6 for Electron-Ion Collider experiment. <img src="https://eicweb.phy.anl.gov/api/v4/projects/447/jobs/artifacts/master/raw/images/view01.png?job=report" width="600px" /> </a> +<br /> +<a href="https://eicweb.phy.anl.gov/api/v4/projects/447/jobs/artifacts/master/raw/images/view01_top.pdf?job=report"> +<img src="https://eicweb.phy.anl.gov/api/v4/projects/447/jobs/artifacts/master/raw/images/view01_top.png?job=report" width="600px" /> +</a> + Related useful links -------------------- diff --git a/bin/dawn_tweak b/bin/dawn_tweak index 35eb9581e8b7ceeac45bec9f3028e123d8c7b72d..0b73846536c48023a94d8c6291f6e869c2bac37c 100755 --- a/bin/dawn_tweak +++ b/bin/dawn_tweak @@ -8,12 +8,13 @@ OUT_FILE=".DAWN_1.history" function print_the_help { echo "USAGE: ${0} [-s <skip_events>] -d <dawn_run_dir> " echo " OPTIONS: " - echo " -x targeted x coordinate position" - echo " -y targeted x coordinate position" - echo " -z targeted x coordinate position" - echo " --theta viewing angle" - echo " --phi viewing angle" - echo " -m,--mag magnification" + echo " -x targeted x coordinate position" + echo " -y targeted x coordinate position" + echo " -z targeted x coordinate position" + echo " --theta viewing angle" + echo " --phi viewing angle" + echo " -m,--mag magnification" + echo " --draw draw style " echo " -d,--dawn-dir <dawn_run_dir> Directory with the .DAWN files and a generate script " exit } @@ -91,6 +92,13 @@ do shift # past argument shift # past value ;; + --draw) + echo "updating drawing to ${2}" + sed -i '9d' ${DAWN_RUN_DIR}/${OUT_FILE} + sed -i '9i'${2} ${DAWN_RUN_DIR}/${OUT_FILE} + shift # past argument + shift # past value + ;; -i|--input) OUT_FILE="$2" shift # past argument diff --git a/bin/make_dawn_views b/bin/make_dawn_views index 9bcb46b2b46b0ec31a812ce2421d3f53c8386a2a..e73538794addb67366b555d321128cc9da0b6952 100755 --- a/bin/make_dawn_views +++ b/bin/make_dawn_views @@ -175,90 +175,3 @@ cp *.png ../../images/. popd -#./generate_eps -t view1_ev2 -i ../../g4_0002.prim -#./generate_eps -t view1_ev3 -i ../../g4_0003.prim -#./generate_eps -t view1_ev4 -i ../../g4_0004.prim -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -# -#pushd scripts/view2 -#./generate_eps -t view2 -i ../../g4_0000.prim -##./generate_eps -t view2_ev1 -i ../../g4_0001.prim -##./generate_eps -t view2_ev2 -i ../../g4_0002.prim -##./generate_eps -t view2_ev3 -i ../../g4_0003.prim -##./generate_eps -t view2_ev4 -i ../../g4_0004.prim -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -#pushd scripts/view3 -#./generate_eps ../../g4_0000.prim -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -#pushd scripts/view4 -#./generate_eps ../../g4_0000.prim -#cp *.eps ../../images/. -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -#pushd scripts/view5 -#./generate_eps ../../g4_0000.prim -#cp *.eps ../../images/. -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -#pushd scripts/view6 -#./generate_eps -t view6 -i ../../g4_0000.prim -##./generate_eps -t view6_ev1 -i ../../g4_0001.prim -##./generate_eps -t view6_ev2 -i ../../g4_0002.prim -##./generate_eps -t view6_ev3 -i ../../g4_0003.prim -##./generate_eps -t view6_ev4 -i ../../g4_0004.prim -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -#pushd scripts/view7 -#./generate_eps -t view7 -i ../../g4_0000.prim -##./generate_eps -t view7_ev1 -i ../../g4_0001.prim -##./generate_eps -t view7_ev2 -i ../../g4_0002.prim -##./generate_eps -t view7_ev3 -i ../../g4_0003.prim -##./generate_eps -t view7_ev4 -i ../../g4_0004.prim -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -#pushd scripts/view11 -#./generate_eps -t view11 -i ../../g4_0000.prim -#./generate_eps -t view11_ev1 -i ../../g4_0001.prim -##./generate_eps -t view11_ev2 -i ../../g4_0002.prim -##./generate_eps -t view11_ev3 -i ../../g4_0003.prim -##./generate_eps -t view11_ev4 -i ../../g4_0004.prim -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -#pushd scripts/view12 -#./generate_eps -t view12 -i ../../g4_0000.prim -#./generate_eps -t view12_ev1 -i ../../g4_0001.prim -#./generate_eps -t view12_ev2 -i ../../g4_0002.prim -##./generate_eps -t view12_ev3 -i ../../g4_0003.prim -##./generate_eps -t view12_ev4 -i ../../g4_0004.prim -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd -# -#pushd scripts/view13 -#./generate_eps -t view13 -i ../../g4_0000.prim -#./generate_eps -t view13_ev1 -i ../../g4_0001.prim -##./generate_eps -t view13_ev2 -i ../../g4_0002.prim -##./generate_eps -t view13_ev3 -i ../../g4_0003.prim -##./generate_eps -t view13_ev4 -i ../../g4_0004.prim -#cp *.pdf ../../images/. -#cp *.png ../../images/. -#popd diff --git a/compact/ci_GEM.xml b/compact/ci_GEM.xml deleted file mode 100644 index 4591c4f704b1093852d343ad13e0fa5e589e2e0d..0000000000000000000000000000000000000000 --- a/compact/ci_GEM.xml +++ /dev/null @@ -1,71 +0,0 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> - - <!-- Some information about detector --> - <info name="Central Ion GEM" title="Central Ion GEM" - author="Marshall Scott" - url="https://eicweb.phy.anl.gov/EIC/detectors/reference_detector.git" - status="development" - version="v1 2021-03-23"> - <comment>Central Ion GEM</comment> - </info> - - <!-- Use DD4hep elements and materials definitions --> - <includes> - </includes> - - <define> - <!-- - <constant name="ci_GEM_id" value="1"> - <constant name="ci_GEM_rin" value="10 * cm"> - <constant name="ci_GEM_rout" value="95 * cm"> - <constant name="ci_GEM_sizez" value="30 * cm"> - <constant name="ci_GEM_shiftz" value="0 * cm"> - <constant name="ci_GEM_posz" value="0 * cm"> - <constant name="ci_GEM_posx" value="0 * cm"> - <constant name="ci_GEM_nlayers" value="8"> - --> - </define> - - <limits> - </limits> - - <regions> - </regions> - - <display> - </display> - - <!-- Define detector --> - <detectors> - <comment> - Central Ion GEM - </comment> - <detector id="ci_GEM_id" name="ci_GEM" type="ci_GEM" insideTrackingVolume="false" vis="ci_GEMVis" readout="ci_GEM_Hits"> - <material name="Ar10CO2"/> - <comment> position of the front face of the detector </comment> - <position x="0" y="0" z="SiliconTrackerOuterBarrel_zmax"/> - <dimensions rmin="ci_GEM_rin" rmax="ci_GEM_rout" z_length="ci_GEM_sizez" z_offset="ci_GEM_shiftz" z="ci_GEM_posz" x="ci_GEM_posx" number="ci_GEM_nlayers" rmax1="ci_HCAL_lay_rin -1. * cm"/> - <layer id="0" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 0) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 0) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 0) * cm" dz="1 * cm" /> - <layer id="1" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 1) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 1) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 1) * cm" dz="1 * cm" /> - <layer id="2" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 2) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 2) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 2) * cm" dz="1 * cm" /> - <layer id="3" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 3) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 3) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 3) * cm" dz="1 * cm" /> - <layer id="4" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 4) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 4) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 4) * cm" dz="1 * cm" /> - <layer id="5" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 5) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 5) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 5) * cm" dz="1 * cm" /> - <layer id="6" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 6) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 6) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 6) * cm" dz="1 * cm" /> - <layer id="7" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 7) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 7) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 7) * cm" dz="1 * cm" /> - </detector> - </detectors> - <readouts> - <readout name="ci_GEM_Hits"> - <segmentation type="CartesianGridXY" grid_size_x="1.0*mm" grid_size_y="1.0*mm" /> - <id>system:8,layer:8,x:32:-16,y:-16</id> - </readout> - </readouts> - - - <plugins> - </plugins> - -</lccdd> diff --git a/compact/ci_HCAL.xml b/compact/ci_HCAL.xml deleted file mode 100644 index 4762fe688a361170327283fbebf07f55abf93913..0000000000000000000000000000000000000000 --- a/compact/ci_HCAL.xml +++ /dev/null @@ -1,66 +0,0 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> - - <!-- Some information about detector--> - <info name="Central Ion HCAL" title="Central Ion HCAL" - author="Marshall Scott" - url="https://eicweb.phy.anl.gov/EIC/detectors/reference_detector.git" - status="development" - version="v1 2021-03-31"> - <comment>Central Ion HCAL</comment> - </info> - - <includes> - </includes> - - <limits> - </limits> - - <regions> - </regions> - - <display> - </display> - - <!-- Define detector --> - <detectors> - <comment> - Central Ion HCAL - </comment> - <detector id="ci_HCAL_id" name="ci_HCAL" type="ci_HCAL" insideTrackingVolume="false" vis="ci_HCALVis" readout="ci_HCAL_Hits"> - <material name="Iron"/> - <dimensions rmin="ci_HCAL_rin" rmax="ci_HCAL_rout" z_length="ci_HCAL_sizez" z_offset="ci_HCAL_shiftz" z="ci_HCAL_posz" x="ci_HCAL_posx" number="ci_HCAL_nlayers" rmin1="ci_HCAL_lay_rin" rmax1="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness"/> - <layer id="0" z="-ci_HCAL_sizez * 0.5 + (1 + 0) * ci_HCAL_lay_thickness + (1 + 0) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="1" z="-ci_HCAL_sizez * 0.5 + (1 + 1) * ci_HCAL_lay_thickness + (1 + 1) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="2" z="-ci_HCAL_sizez * 0.5 + (1 + 2) * ci_HCAL_lay_thickness + (1 + 2) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="3" z="-ci_HCAL_sizez * 0.5 + (1 + 3) * ci_HCAL_lay_thickness + (1 + 3) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="4" z="-ci_HCAL_sizez * 0.5 + (1 + 4) * ci_HCAL_lay_thickness + (1 + 4) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="5" z="-ci_HCAL_sizez * 0.5 + (1 + 5) * ci_HCAL_lay_thickness + (1 + 5) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="6" z="-ci_HCAL_sizez * 0.5 + (1 + 6) * ci_HCAL_lay_thickness + (1 + 6) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="7" z="-ci_HCAL_sizez * 0.5 + (1 + 7) * ci_HCAL_lay_thickness + (1 + 7) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="8" z="-ci_HCAL_sizez * 0.5 + (1 + 8) * ci_HCAL_lay_thickness + (1 + 8) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="9" z="-ci_HCAL_sizez * 0.5 + (1 + 9) * ci_HCAL_lay_thickness + (1 + 9) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="10" z="-ci_HCAL_sizez * 0.5 + (1 + 10) * ci_HCAL_lay_thickness + (1 + 10) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="11" z="-ci_HCAL_sizez * 0.5 + (1 + 11) * ci_HCAL_lay_thickness + (1 + 11) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="12" z="-ci_HCAL_sizez * 0.5 + (1 + 12) * ci_HCAL_lay_thickness + (1 + 12) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="13" z="-ci_HCAL_sizez * 0.5 + (1 + 13) * ci_HCAL_lay_thickness + (1 + 13) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="14" z="-ci_HCAL_sizez * 0.5 + (1 + 14) * ci_HCAL_lay_thickness + (1 + 14) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="15" z="-ci_HCAL_sizez * 0.5 + (1 + 15) * ci_HCAL_lay_thickness + (1 + 15) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="16" z="-ci_HCAL_sizez * 0.5 + (1 + 16) * ci_HCAL_lay_thickness + (1 + 16) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="17" z="-ci_HCAL_sizez * 0.5 + (1 + 17) * ci_HCAL_lay_thickness + (1 + 17) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="18" z="-ci_HCAL_sizez * 0.5 + (1 + 18) * ci_HCAL_lay_thickness + (1 + 18) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - <layer id="19" z="-ci_HCAL_sizez * 0.5 + (1 + 19) * ci_HCAL_lay_thickness + (1 + 19) * 5 * cm" inner_r="ci_HCAL_lay_rin" outer_r="ci_HCAL_lay_rout" dz="ci_HCAL_lay_thickness" /> - </detector> - </detectors> - <readouts> - <readout name="ci_HCAL_Hits"> - <segmentation type="CartesianGridXY" grid_size_x="1.0*mm" grid_size_y="1.0*mm" /> - <id>system:8,layer:8,x:32:-16,y:-16</id> - </readout> - </readouts> - - - <plugins> - </plugins> -</lccdd> diff --git a/compact/display.xml b/compact/display.xml index a51b7690debccbc28093e4ae88bc2cc9bc18070f..c945d2b795ca368de10ba65c5bb23990e2c51b52 100644 --- a/compact/display.xml +++ b/compact/display.xml @@ -45,7 +45,7 @@ <vis name="SolenoidCoilVis" alpha="1.0" r="0.55" g="0.55" b="0.7" showDaughters="true" visible="true" lineStyle="solid" drawingStyle="solid" /> <vis name="SolenoidCryostatVis" alpha="0.4" r="0.55" g="0.55" b="0.7" showDaughters="true" visible="true" lineStyle="solid" drawingStyle="solid" /> <vis name="SolenoidYokeVis" alpha="0.2" r="0.8" g="0.1" b="0.1" showDaughters="false" visible="true" lineStyle="solid" drawingStyle="solid" /> - <vis name="RICHVis" alpha="0.5" r="1" g="0" b="1" showDaughters="false"/> + <vis name="RICHVis" alpha="0.5" r="1" g="0" b="1" showDaughters="true"/> <vis name="BeamPipeVis" alpha="1" r= "0.75" g="0.75" b="0.75" showDaughters="true" visible="true"/> <vis name="cb_SolenoidVis" alpha="0.4" r= "0.1" g="0.0" b="0.1" showDaughters="true" visible="true"/> diff --git a/compact/forward_offM_tracker.xml b/compact/far_forward_offM_tracker.xml similarity index 100% rename from compact/forward_offM_tracker.xml rename to compact/far_forward_offM_tracker.xml diff --git a/compact/forward_romanpot.xml b/compact/far_forward_romanpots.xml similarity index 100% rename from compact/forward_romanpot.xml rename to compact/far_forward_romanpots.xml diff --git a/reference_detector.xml b/reference_detector.xml index 137966a474c6363dc4ccc2cba8926ed98b9d4c2e..3e9de26ac5fdb04802838a560d762a8981132520 100644 --- a/reference_detector.xml +++ b/reference_detector.xml @@ -111,31 +111,28 @@ </display> <comment> Include the IP components first </comment> + <include ref="eic/forward_ion_beamline.xml"/> <include ref="ip6/beampipe.xml"/> <include ref="compact/solenoid.xml"/> <include ref="compact/ecal.xml"/> - <include ref="compact/ce_mrich.xml"/> + <include ref="compact/hcal.xml"/> <include ref="compact/ce_GEM.xml"/> - <include ref="compact/forward_trd.xml"/> + <include ref="compact/cb_CTD_Si.xml"/> <include ref="compact/vertex_tracker.xml"/> <include ref="compact/gem_tracker_endcap.xml"/> + <include ref="compact/ce_mrich.xml"/> + <include ref="compact/forward_trd.xml"/> + <include ref="compact/forward_rich.xml"/> <include ref="compact/B0_tracker.xml"/> - <include ref="compact/forward_offM_tracker.xml"/> - <include ref="compact/forward_romanpot.xml"/> + <include ref="compact/far_forward_offM_tracker.xml"/> + <include ref="compact/far_forward_romanpots.xml"/> <include ref="compact/far_forward_detectors.xml"/> - <include ref="eic/forward_ion_beamline.xml"/> - <include ref="compact/hcal.xml"/> - <include ref="compact/forward_rich.xml"/> - <include ref="compact/cb_CTD_Si.xml"/> <!-- <include ref="compact/mm_tracker_barrel.xml"/> - <include ref="compact/ci_GEM.xml"/> <include ref="compact/cb_VTX_Barrel.xml"/> - <include ref="compact/ci_HCAL.xml"/> - <include ref="compact/roman_pots.xml"/> --> diff --git a/src/SiVertexBarrel.cpp b/src/SiVertexBarrel_geo.cpp similarity index 100% rename from src/SiVertexBarrel.cpp rename to src/SiVertexBarrel_geo.cpp diff --git a/src/ci_GEM.cpp b/src/ci_GEM.cpp deleted file mode 100644 index e41642c68479d5236253c20499d9edd4b0275436..0000000000000000000000000000000000000000 --- a/src/ci_GEM.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "DD4hep/DetFactoryHelper.h" -#include "DD4hep/OpticalSurfaces.h" -#include "DD4hep/Printout.h" -#include "DDRec/DetectorData.h" -#include "DDRec/Surface.h" -#include <XML/Helper.h> -/////////////////////////// -// Central Ion GEM -/////////////////////////// - -using namespace dd4hep; - -static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens) -{ - - xml::DetElement detElem = handle; - std::string detName = detElem.nameStr(); - int detID = detElem.id(); - xml::Component dims = detElem.dimensions(); - xml::Component pos = detElem.position(); - double SizeZ = dims.z_length(); // Size in Z direction - double ROut = dims.rmax(); // Outer radius - double RIn = dims.rmin(); // Inner radius - double ShiftZ = dims.z_offset(); - double X = dims.x(); - double Z = dims.z(); - int Nlayers = dims.number(); - double HCAL_rmin = dims.rmax1(); // Maximum radius that the layer can be - Material mat = desc.material(detElem.materialStr()); - Material vac = desc.material("Vacuum"); - - // Outer Volume - Tube ci_GEM_GVol_Solid(RIn, ROut, SizeZ / 2., 0., 360 * deg); - Volume detVol("ci_GEM_GVol_Logic", ci_GEM_GVol_Solid, vac); - - // Adding layers to placed volume - for (xml_coll_t li(detElem, _U(layer)); li; ++li) { - xml_comp_t x_layer = li; - std::string layer_name = detName + _toString(x_layer.id(), "_layer%d"); - double outer_r = x_layer.outer_r(); - if (outer_r > HCAL_rmin) { - outer_r = HCAL_rmin; - } - - Volume layer_vol(layer_name, Tube(x_layer.inner_r(), outer_r, x_layer.dz()), mat); - layer_vol.setVisAttributes(desc.visAttributes(detElem.visStr())); - sens.setType("tracker"); - layer_vol.setSensitiveDetector(sens); - Position layer_pos(0, 0, x_layer.z()); - PlacedVolume layer_phv = detVol.placeVolume(layer_vol, layer_pos); - layer_phv.addPhysVolID("layer", x_layer.id()); - } - - DetElement det(detName, detID); - Volume motherVol = desc.pickMotherVolume(det); - Transform3D tr(RotationZYX(0.0, 0.0, 0.0), Position(pos.x(), pos.x(), pos.z() + SizeZ / 2.0)); - PlacedVolume detPV = motherVol.placeVolume(detVol, tr); - detPV.addPhysVolID("system", detID); - det.setPlacement(detPV); - - return det; -} -// clang-format off -DECLARE_DETELEMENT(ci_GEM, createDetector) diff --git a/src/ci_HCAL.cpp b/src/ci_HCAL.cpp deleted file mode 100644 index 6bd6a705bf2b0a3d5e583f9983823bb0700c5980..0000000000000000000000000000000000000000 --- a/src/ci_HCAL.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "DD4hep/DetFactoryHelper.h" -#include "DD4hep/OpticalSurfaces.h" -#include "DD4hep/Printout.h" -#include "DDRec/DetectorData.h" -#include "DDRec/Surface.h" -#include <XML/Helper.h> -/////////////////////////// -// Central Ion GEM -/////////////////////////// - -using namespace dd4hep; - -static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens) -{ - - xml::DetElement detElem = handle; - std::string detName = detElem.nameStr(); - int detID = detElem.id(); - xml::Component dims = detElem.dimensions(); - double RIn = dims.rmin(); - double ROut = dims.rmax(); - double SizeZ = dims.z_length(); - double ShiftZ = dims.z_offset(); - double PosZ = dims.z(); - double lay_RIn = dims.rmin1(); - double lay_ROut = dims.rmax1(); - double lay_dz = dims.dz(); - Material mat_iron = desc.material("Iron"); - Material mat_vac = desc.material("Vacuum"); - - // Outer volume - Tube ci_Hcal_Solid(RIn, ROut, SizeZ / 2., 0., 360 * dd4hep::deg); - Volume envelopeVol("ci_Hcal_Logic", ci_Hcal_Solid, mat_vac); - - // Iron tube for the layers - Tube ci_Hcal_detSolid(lay_RIn, lay_ROut, lay_dz / 2., 0., 360 * dd4hep::deg); - - // Adding layers to placed detector volume - for (xml_coll_t li(detElem, _U(layer)); li; ++li) { - xml_comp_t x_layer = li; - std::string layer_name = detName + _toString(x_layer.id(), "_layer%d"); - Volume layer_vol(layer_name, ci_Hcal_detSolid, mat_iron); - layer_vol.setVisAttributes(detElem.visStr()); - sens.setType("calorimeter"); - layer_vol.setSensitiveDetector(sens); - Position layer_pos(0, 0, x_layer.z()); - PlacedVolume layer_phv = envelopeVol.placeVolume(layer_vol, layer_pos); - layer_phv.addPhysVolID("layer", x_layer.id()); - } - - DetElement det(detName, detID); - Volume motherVol = desc.pickMotherVolume(det); - Transform3D tr(RotationZYX(0, 0, 0), Position(0, 0, ShiftZ)); - PlacedVolume detPV = motherVol.placeVolume(envelopeVol, tr); - detPV.addPhysVolID("system", detID); - det.setPlacement(detPV); - - return det; -} -// clang-format off -DECLARE_DETELEMENT(ci_HCAL, createDetector)