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

Cleaned up some compact files

Paying attention to following items:
* Overall parameterization -- will use for optimization
* Constant naming consistency
* Documentation via the comments
* Added new ci job which concatenates all the `<comment>` tags into `docs/detector.md`
* All comments should now be formatted to fit the appropriate section in the markdown file.
parent fc1c0465
No related branches found
No related tags found
1 merge request!104Cleaning up compact description file
......@@ -119,6 +119,20 @@ dump_geometry:
- dd_web_display --output geo/detector_geo.root ${DETECTOR_PATH}/athena.xml
- echo "Geometry viewer at https://eic.phy.anl.gov/geoviewer/index.htm?file=https://eicweb.phy.anl.gov/EIC/detectors/athena/-/jobs/${CI_JOB_ID}/artifacts/raw/geo/detector_geo_full.root?job=dump_geometry&item=default;1&opt=clipxyz;transp30;zoom75;ROTY290;ROTZ350;trz0;trr0;ctrl;all&"
detector_documentation:
stage: docs
needs:
- common:detector
script:
- mkdir -p doc
- bash bin/build_documentation | tee doc/detector.md
#- |
# xmllint --format --xpath '//comment/text()' ${DETECTOR_PATH}/athena.xml | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/' | tee doc/detector.md
# xmllint --format --xpath '//comment/text()' ${DETECTOR_PATH}/ip6/ip6_defs.xml | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/' | tee -a doc/detector.md || true
# for afile in ${DETECTOR_PATH}/compact/*.xml ; do
# xmllint --format --xpath '//comment/text()' ${afile} | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/' | tee -a doc/detector.md || true
# done
report:
stage: finalize
needs:
......
......@@ -4,6 +4,7 @@
<debug>
<type name="surface" value="1"/>
<type name="material" value="1"/>
<type name="readout" value="1"/>
<type name="segmentation" value="1"/>
<type name="limits" value="1"/>
......@@ -11,11 +12,11 @@
<type name="includes" value="1"/>
</debug>
<documentation><![CDATA[
<documentation level="-1">
# Athena Detector
- https://eicweb.phy.anl.gov/EIC/detectors/athena.git
- https://eicweb.phy.anl.gov/EIC/detectors/ip6.git
]]></documentation>
</documentation>
<!-- Some information about detector -->
<info name="Athena Detector" title="Athena Detector"
......@@ -23,18 +24,19 @@
url="https://eicweb.phy.anl.gov/EIC/detectors/athena.git"
status="development"
version="v1 2021-03-16">
<comment> Athena Detector
- https://eicweb.phy.anl.gov/EIC/detectors/athena.git
- https://eicweb.phy.anl.gov/EIC/detectors/ip6.git
</comment>
<comment> Athena </comment>
</info>
<define>
<include ref="ip6/ip6_defs.xml" /> <comment> IP definitions should be first</comment>
<documentation level="2">
## Main Constant Definitions
The ip6 (or other ip) defines should be included first.
These files have only a define tags.
</documentation>
<include ref="ip6/ip6_defs.xml" />
<include ref="compact/definitions.xml" />
</define>
<includes>
<gdmlFile ref="compact/elements.xml"/>
<gdmlFile ref="compact/materials.xml"/>
......@@ -58,7 +60,26 @@
<include ref="compact/display.xml" />
</display>
<comment> Include the IP components first </comment>
<documentation level="0">
## Detector Subsystems
### IP Subsystems
The interaction point subsystems are included before the central detector subsystems.
This is becuase the IP subsystems, for exmaple the beampipe, will define paramters
which are subsquently used in the central detector construction -- e.g. the vertex tracker
uses the beampipe OD to help define its placement.
The IP subsystems include the Far forward and backward regions. The list of subsystem includes:
- Interaction region beampipe
- B0 tracker
- Off-momentum tracker
- Far forward roman pots
- Zero Degree Calorimeter
- Beam line magnets.
- and more...
</documentation>
<include ref="ip6/forward_ion_beamline.xml"/>
<include ref="ip6/beampipe.xml"/>
......@@ -109,35 +130,6 @@
<composite name="BackwardTOF"/>
</detector>
<!--
<detector id="TrackerBarrelSubAssembly_Inner_ID"
name="TrackerBarrelSubAssembly_Inner"
type="DD4hep_SubdetectorAssembly"
vis="TrackerSubAssemblyVis">
<composite name="TrackerBarrel_Inner"/>
</detector>
<detector id="TrackerEndcapSubAssembly_Inner_ID"
name="TrackerEndcapSubAssembly_Inner"
type="DD4hep_SubdetectorAssembly"
vis="TrackerSubAssemblyVis">
<composite name="TrackerEndcapN_Inner"/>
<composite name="TrackerBarrel_Inner"/>
<composite name="TrackerEndcapP_Inner"/>
</detector>
<detector id="TrackerBarrelSubAssembly_Outer_ID"
name="TrackerBarrelSubAssembly_Outer"
type="DD4hep_SubdetectorAssembly"
vis="TrackerSubAssemblyVis">
<composite name="TrackerBarrel_Outer"/>
</detector>
<detector id="TrackerEndcapSubAssembly_Outer_ID"
name="TrackerEndcapSubAssembly_Outer"
type="DD4hep_SubdetectorAssembly"
vis="TrackerSubAssemblyVis">
<composite name="TrackerEndcapP_Outer"/>
<composite name="TrackerEndcapN_Outer"/>
</detector>
-->
</detectors>
<include ref="compact/vertex_tracker.xml"/>
......@@ -145,10 +137,11 @@
<include ref="compact/central_tracker.xml"/>
<include ref="compact/tof_barrel.xml"/>
<include ref="compact/tof_endcap.xml"/>
<!--include ref="compact/rwell_tracker_barrel.xml"-->
<include ref="compact/cb_DIRC.xml"/>
<!--include ref="compact/dirc.xml"/-->
<!-- When changing magnet, also select dimensions in definitions.xml. -->
<include ref="compact/solenoid.xml"/>
......@@ -166,7 +159,6 @@
<!--include ref="compact/ce_GEM.xml"/-->
<!--include ref="compact/gem_tracker_endcap.xml"/-->
<!--include ref="compact/mrich.xml"/-->
<include ref="compact/tof_endcap.xml"/>
<include ref="compact/forward_trd.xml"/>
<include ref="compact/gaseous_rich.xml"/>
......@@ -175,7 +167,6 @@
<include ref="ip6/far_forward_romanpots.xml"/>
<include ref="ip6/far_forward_detectors.xml"/>
<!--
<include ref="compact/mm_tracker_barrel.xml"/>
<include ref="compact/cb_VTX_Barrel.xml"/>
......@@ -184,5 +175,4 @@
<readouts>
</readouts>
</lccdd>
#!/bin/bash
#included files
detector_file="./athena.xml"
#filelist=$(xmllint --format --xpath '//include/@ref' ${detector_file} | sed 's/ref=\"//g' | sed 's/\"/\n/g' )
#echo $filelist
# Searches for included files two levels down
get_includes() {
local input_file="${1}"
#echo ${1}
local filelist=$(xmllint --format --xpath '//include/@ref' ${input_file} | sed 's/ref=\"//g' | sed 's/\"//g' )
for afile in $filelist ; do
xmllint --format --xpath '//include/@ref' ${input_file} &> /dev/null
local res="$?"
if [ "${res}" == "0" ] ; then
local subincluded=$(xmllint --format --xpath '//include/@ref' ${input_file} 2> /dev/null | sed 's/ref=\"//g' | sed 's/\"//g' )
filelist="${filelist} ${subincluded}"
#echo "sub include $afile"
fi
done
# <includes > <gdmlFile > <file>
local otherfiles=$(xmllint --format --xpath '//includes/file/@ref | //includes/gdmlFile/@ref' ${input_file} | sed 's/ref=\"//g' | sed 's/\"/\n/g' )
#echo $otherfiles
filelist=$(echo "${filelist} ${otherfiles}" | sed 's/ /\n/g' | sort | uniq )
echo "$input_file $filelist"
}
xml_files=$(get_includes ${detector_file})
#echo $xml_files
get_doc_levels() {
# levels
local levels=0
for afile in $xml_files ; do
xmllint --format --xpath '//documentation/@level' $afile &> /dev/null
local res="$?"
if [ "${res}" == "0" ] ; then
local new_levels=$(xmllint --format --xpath '//documentation/@level' $afile 2> /dev/null | sed 's/level=\"/ /g' | sed 's/\"//g' )
levels="${levels} ${new_levels}"
fi
done
echo "$levels" | sed 's/ /\n/g' | sort | uniq
}
all_levels=$(get_doc_levels ${xml_file_array})
#echo " levels: "
#echo $all_levels
for alevel in $(echo ${all_levels} | sed 's/ /\n/g' | sort -n | uniq ) ; do
#echo " doing level $alevel ..."
for afile in $(echo $xml_files | sed 's/ / \n/g') ; do
#echo $afile
#xmllint --format --xpath '//documentation[@level="'"$alevel"'"]/text()' $afile
level_doc=$(xmllint --format --xpath '//documentation[@level="'$alevel'"]' ${afile} 2> /dev/null )
if [ "$?" -eq "0" ] ; then
xmllint --format --xpath '//documentation[@level="'$alevel'"]/text()' ${afile} | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/g'
fi
done
done
#${DETECTOR_PATH}=.
#
#
#xmllint --format --xpath '//
#
#xmllint --format --xpath '//documentation/text()' ${DETECTOR_PATH}/athena.xml | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/' | tee doc/detector.md
#xmllint --format --xpath '//documentation/text()' ${DETECTOR_PATH}/ip6/ip6_defs.xml | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/' | tee -a doc/detector.md || true
#for afile in ${DETECTOR_PATH}/compact/*.xml ; do
# xmllint --format --xpath '//documentation/text()' ${afile} | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/' | tee -a doc/detector.md || true
#done
#
<lccdd>
<comment>Initial implementation of the Athena Detector
DIRC (ported from g4e). Currently constructed around
a fixed radius of 83.65cm (between the uRWEL layers).
TODO: this needs to be properly parameterized.
</comment>
<define>
<constant name="cb_DIRC_length" value="DIRCLength"/>
<constant name="cb_DIRC_rmin" value="82.00*cm"/>
<constant name="cb_DIRC_rmax" value="88.00*cm"/>
</define>
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<detectors>
<detector id="BarrelDIRC_ID" name="cb_DIRC" type="cb_DIRC" readout="DIRCHits" vis="AnlTeal">
<dimensions rmin="cb_DIRC_rmin" rmax="cb_DIRC_rmax" length="cb_DIRC_length" radius="DIRCRadius" dx="DIRCBars_DX" dy="DIRCBars_DY" number="DIRCNum" deltaphi="DIRCDPhi"/>
<position x="0" y="0" z="DIRCOffset"/>
<module name="Module0" R="DIRCRadius" phi="0*DIRCDPhi" />
<module name="Module1" R="DIRCRadius" phi="1*DIRCDPhi" />
<module name="Module2" R="DIRCRadius" phi="2*DIRCDPhi" />
<module name="Module3" R="DIRCRadius" phi="3*DIRCDPhi" />
<module name="Module4" R="DIRCRadius" phi="4*DIRCDPhi" />
<module name="Module5" R="DIRCRadius" phi="5*DIRCDPhi" />
<module name="Module6" R="DIRCRadius" phi="6*DIRCDPhi" />
<module name="Module7" R="DIRCRadius" phi="7*DIRCDPhi" />
<module name="Module8" R="DIRCRadius" phi="8*DIRCDPhi" />
<module name="Module9" R="DIRCRadius" phi="9*DIRCDPhi" />
<module name="Module10" R="DIRCRadius" phi="10*DIRCDPhi" />
<module name="Module11" R="DIRCRadius" phi="11*DIRCDPhi" />
</detector>
</detectors>
<readouts>
<readout name="DIRCHits">
<segmentation type="CartesianGridXY" grid_size_x="3.0*mm" grid_size_y="3.0*mm" />
<id>system:8,barrel:3,module:12,x:32:-16,y:-16</id>
</readout>
</readouts>
<plugins>
</plugins>
<fields>
</fields>
</lccdd>
......@@ -5,7 +5,6 @@
Silicon Tracker
---------------
Some references:
With some added info on ITS3 chip from
https://indico.bnl.gov/event/10677/contributions/45591/attachments/33204/53254/20210318-IR2%40EIC-SVT.pdf
......@@ -17,8 +16,8 @@
<define>
<constant name="TrackerBarrelSpaceFrame_width" value="40.0*mm"/>
<constant name="TrackerBarrelSpaceFrame_height" value="sqrt(3.0)*32.0*mm/2.0"/>
<constant name="TrackerBarrelSpaceFrame_width" value="4.0*cm"/>
<constant name="TrackerBarrelSpaceFrame_height" value="2.5*cm"/>
<constant name="TrackerSensor_thickness" value="0.03*mm"/>
<constant name="TrackerBarrel_thickness" value="0.55/100*9.37*cm"/>
<constant name="TrackerBarrelService_thickness" value="TrackerBarrel_thickness-TrackerSensor_thickness"/>
......
This diff is collapsed.
<lccdd>
<comment>Initial implementation of the Athena Detector
DIRC (ported from g4e). Currently constructed around
a fixed radius of 83.65cm (between the uRWEL layers).
TODO: this needs to be properly parameterized.
</comment>
<define>
<comment>
### DIRC parameters
</comment>
<constant name="DIRC_length" value="CentralTracking_length + BackwardPIDLength"/>
<constant name="DIRC_offset" value="(CentralTracking_length - DIRC_length)/2.0"/>
<constant name="DIRC_rmin" value="83.65*cm"/>
<constant name="DIRCBars_DX" value="1.7*cm"/>
<constant name="DIRCBars_DY" value="42.*cm"/>
<constant name="DIRCNum" value="2*Pi*DIRC_rmin/DIRCBars_DY"/>
<constant name="DIRCDPhi" value="DIRCBars_DY/DIRC_rmin"/>
<constant name="DIRC_rmin" value="82.00*cm"/>
<constant name="DIRC_rmax" value="88.00*cm"/>
</define>
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<detectors>
<detector id="BarrelDIRC_ID" name="DIRC" type="DIRC" readout="DIRCHits" vis="AnlTeal">
<dimensions rmin="DIRC_rmin" rmax="DIRC_rmax" length="DIRC_length" radius="DIRC_rmin" dx="DIRCBars_DX" dy="DIRCBars_DY" number="DIRCNum" deltaphi="DIRCDPhi"/>
<position x="0" y="0" z="DIRC_offset"/>
<module name="Module0" R="DIRC_rmin" phi="0*DIRCDPhi" />
<module name="Module1" R="DIRC_rmin" phi="1*DIRCDPhi" />
<module name="Module2" R="DIRC_rmin" phi="2*DIRCDPhi" />
<module name="Module3" R="DIRC_rmin" phi="3*DIRCDPhi" />
<module name="Module4" R="DIRC_rmin" phi="4*DIRCDPhi" />
<module name="Module5" R="DIRC_rmin" phi="5*DIRCDPhi" />
<module name="Module6" R="DIRC_rmin" phi="6*DIRCDPhi" />
<module name="Module7" R="DIRC_rmin" phi="7*DIRCDPhi" />
<module name="Module8" R="DIRC_rmin" phi="8*DIRCDPhi" />
<module name="Module9" R="DIRC_rmin" phi="9*DIRCDPhi" />
<module name="Module10" R="DIRC_rmin" phi="10*DIRCDPhi" />
<module name="Module11" R="DIRC_rmin" phi="11*DIRCDPhi" />
</detector>
</detectors>
<readouts>
<readout name="DIRCHits">
<segmentation type="CartesianGridXY" grid_size_x="3.0*mm" grid_size_y="3.0*mm" />
<id>system:8,barrel:3,module:12,x:32:-16,y:-16</id>
</readout>
</readouts>
<plugins>
</plugins>
<fields>
</fields>
</lccdd>
......@@ -100,6 +100,10 @@
<fraction n="0.0278" ref="SodiumOxide"/>
<fraction n="0.0050" ref="ArsenicOxide"/>
</material>
<documentation level="3">
#### Carbon fiber
a level 3 doc
</documentation>
<material name="CarbonFiber">
<D type="density" value="1.5" unit="g/cm3"/>
<fraction n="0.65" ref="C"/>
......
......@@ -88,15 +88,11 @@
</material>
</materials>
<surfaces>
<comment> For the values of "finish", model and type, see TGeoOpticalSurface.h !
</comment>
<opticalsurface finish="polished" model="glisur" name="MirrorOpticalSurface" type="dielectric_metal" value="0">
<property name="REFLECTIVITY" ref="REFLECTIVITY_mirror"/>
<property name="RINDEX" coldim="2" values="1.034*eV 1.5 4.136*eV 1.5"/>
<!--<property name="EFFICIENCY" ref="EFFICIENCY0x8b77240"/>-->
</opticalsurface>
<!--
<opticalsurface name="mirror2" finish="polished" model="glisur" type="dielectric_dielectric">
<property name="REFLECTIVITY" coldim="2" values="1.034*eV 0.8 4.136*eV 0.9"/>
......
......@@ -68,4 +68,4 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
return det;
}
DECLARE_DETELEMENT(cb_DIRC, createDetector)
DECLARE_DETELEMENT(DIRC, createDetector)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment