Skip to content
Snippets Groups Projects
Commit 11dbd405 authored by Jihee Kim's avatar Jihee Kim Committed by Whitney Armstrong
Browse files

Template XML file

parent f16a07b5
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ stages: ...@@ -31,7 +31,7 @@ stages:
env: env:
stage: config stage: config
script: script:
- export JUGGLER_DETECTOR="detector_template" - export JUGGLER_DETECTOR="reference_detector"
- | - |
if [[ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" || "$CI_COMMIT_BRANCH" == "master" ]]; then if [[ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" || "$CI_COMMIT_BRANCH" == "master" ]]; then
export JUGGLER_DETECTOR_VERSION="${CI_COMMIT_REF_NAME}" export JUGGLER_DETECTOR_VERSION="${CI_COMMIT_REF_NAME}"
...@@ -89,7 +89,7 @@ overlap_check: ...@@ -89,7 +89,7 @@ overlap_check:
needs: needs:
- ["compile"] - ["compile"]
script: script:
- checkOverlaps -c detector_template.xml | tee doc/overlap_check.out - checkOverlaps -c reference_detector.xml | tee doc/overlap_check.out
- echo "$(cat doc/overlap_check.out | grep ovlp | wc -l) overlaps..." - echo "$(cat doc/overlap_check.out | grep ovlp | wc -l) overlaps..."
- if [[ "$(cat doc/overlap_check.out | grep ovlp | wc -l)" -gt "1" ]] ; then echo "Overlaps exist!" && false ; fi - if [[ "$(cat doc/overlap_check.out | grep ovlp | wc -l)" -gt "1" ]] ; then echo "Overlaps exist!" && false ; fi
...@@ -98,7 +98,7 @@ detector:config_testing: ...@@ -98,7 +98,7 @@ detector:config_testing:
needs: needs:
- ["compile"] - ["compile"]
script: script:
- checkOverlaps -c detector_template.xml | tee doc/overlap_check.out | wc -l - checkOverlaps -c reference_detector.xml | tee doc/overlap_check.out | wc -l
- cat doc/overlap_check.out - cat doc/overlap_check.out
allow_failure: true allow_failure: true
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
PROJECT(detector_template PROJECT(reference_detector
VERSION 0.0.1 VERSION 0.0.1
LANGUAGES CXX LANGUAGES CXX
DESCRIPTION "A template dd4hep+acts detector" DESCRIPTION "A template dd4hep+acts detector"
...@@ -11,11 +11,11 @@ find_package( DD4hep REQUIRED COMPONENTS DDCore DDG4 ) ...@@ -11,11 +11,11 @@ find_package( DD4hep REQUIRED COMPONENTS DDCore DDG4 )
#find_package(Acts REQUIRED COMPONENTS Core PluginIdentification PluginTGeo PluginDD4hep ) #find_package(Acts REQUIRED COMPONENTS Core PluginIdentification PluginTGeo PluginDD4hep )
#----------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------
set(a_lib_name detector_template) set(a_lib_name reference_detector)
if("${PROJECT_NAME}" STREQUAL "detector_template") if("${PROJECT_NAME}" STREQUAL "reference_detector")
message(WARNING " message(WARNING "
Current project and library is named detector_template! Current project and library is named reference_detector!
Please rename library to match corresponding detector implmentation.") Please rename library to match corresponding detector implmentation.")
endif() endif()
......
TODO
This diff is collapsed.
#/vis/open DAWNFILE 1000x1000+600+400
#/vis/scene/create
#/vis/scene/add/volume
#/vis/sceneHandler/attach
#/vis/viewer/flush
#/vis/scene/add/trajectories
#/vis/scene/add/hits
#/tracking/storeTrajectory 1
#/vis/drawVolume
#/vis/geometry/set/forceSolid all -1 true
#/vis/geometry/set/visibility world_volume 0 0
#/run/beamOn 1
#/vis/viewer/flush
/vis/open DAWNFILE
/vis/viewer/set/lineSegmentsPerCircle 24
/vis/scene/create
/vis/scene/add/volume
/vis/sceneHandler/attach
#/vis/scene/add/scale 1 m x 1 0 0 manual -0.5 -2 0 m
/vis/scene/add/scale 1 m y 1 0 0 manual 2 -0.75 -3 m
#/vis/scene/add/scale 2 m z 1 0 0 manual 0 -2 0 m
#/vis/scene/add/magneticField 6 lightArrow
/vis/viewer/flush
/vis/scene/add/trajectories
/vis/scene/add/hits
/tracking/storeTrajectory 1
/run/beamOn 5
exit
#/vis/open DAWNFILE 1000x1000+600+400
#/vis/scene/create
#/vis/scene/add/volume
#/vis/sceneHandler/attach
#/vis/viewer/flush
#/vis/scene/add/trajectories
#/vis/scene/add/hits
#/tracking/storeTrajectory 1
#/vis/drawVolume
#/vis/geometry/set/forceSolid all -1 true
#/vis/geometry/set/visibility world_volume 0 0
#/run/beamOn 1
#/vis/viewer/flush
/vis/open DAWNFILE
/vis/scene/create
/vis/scene/add/volume
/vis/sceneHandler/attach
#/vis/viewer/flush
/vis/scene/add/trajectories
/vis/scene/add/hits
#/vis/scene/add/scale 1 m x 1 0 0 manual -0.5 -2 0 m
/vis/scene/add/scale 1 m y 1 0 0 manual 2 -0.75 -3 m
#/vis/scene/add/scale 2 m z 1 0 0 manual 0 -2 0 m
/tracking/storeTrajectory 1
/run/beamOn 1
exit
<?xml version="1.0" encoding="UTF-8"?>
<materials>
<!--
Air by weight from
http://www.engineeringtoolbox.com/air-composition-24_212.html
-->
<material name="Air">
<D type="density" unit="g/cm3" value="0.0012"/>
<fraction n="0.754" ref="N"/>
<fraction n="0.234" ref="O"/>
<fraction n="0.012" ref="Ar"/>
</material>
<!-- We model vakuum just as very thin air -->
<material name="Vacuum">
<D type="density" unit="g/cm3" value="0.0000000001"/>
<fraction n="0.754" ref="N"/>
<fraction n="0.234" ref="O"/>
<fraction n="0.012" ref="Ar"/>
</material>
<material name="Epoxy">
<D type="density" value="1.3" unit="g/cm3"/>
<composite n="44" ref="H"/>
<composite n="15" ref="C"/>
<composite n="7" ref="O"/>
</material>
<material name="Quartz">
<D type="density" value="2.2" unit="g/cm3"/>
<composite n="1" ref="Si"/>
<composite n="2" ref="O"/>
</material>
<material name="G10">
<D type="density" value="1.7" unit="g/cm3"/>
<fraction n="0.08" ref="Cl"/>
<fraction n="0.773" ref="Quartz"/>
<fraction n="0.147" ref="Epoxy"/>
</material>
<material name="Polystyrene">
<D value="1.032" unit="g/cm3"/>
<composite n="19" ref="C"/>
<composite n="21" ref="H"/>
</material>
<material name="Steel235">
<D value="7.85" unit="g/cm3"/>
<fraction n="0.998" ref="Fe"/>
<fraction n=".002" ref="C"/>
</material>
<material name="SiliconOxide">
<D type="density" value="2.65" unit="g/cm3"/>
<composite n="1" ref="Si"/>
<composite n="2" ref="O"/>
</material>
<material name="BoronOxide">
<D type="density" value="2.46" unit="g/cm3"/>
<composite n="2" ref="B"/>
<composite n="3" ref="O"/>
</material>
<material name="SodiumOxide">
<D type="density" value="2.65" unit="g/cm3"/>
<composite n="2" ref="Na"/>
<composite n="1" ref="O"/>
</material>
<material name="AluminumOxide">
<D type="density" value="3.89" unit="g/cm3"/>
<composite n="2" ref="Al"/>
<composite n="3" ref="O"/>
</material>
<material name="SiliconNitride">
<D type="density" value="3.17" unit="g/cm3"/>
<composite n="3" ref="Si"/>
<composite n="4" ref="N"/>
</material>
<material name="PyrexGlass">
<D type="density" value="2.23" unit="g/cm3"/>
<fraction n="0.806" ref="SiliconOxide"/>
<fraction n="0.130" ref="BoronOxide"/>
<fraction n="0.040" ref="SodiumOxide"/>
<fraction n="0.023" ref="AluminumOxide"/>
</material>
<material name="CarbonFiber">
<D type="density" value="1.5" unit="g/cm3"/>
<fraction n="0.65" ref="C"/>
<fraction n="0.35" ref="Epoxy"/>
</material>
<material name="CarbonFiber_50D">
<D type="density" value="0.75" unit="g/cm3"/>
<fraction n="0.65" ref="C"/>
<fraction n="0.35" ref="Epoxy"/>
</material>
<material name="Rohacell31">
<D type="density" value="0.032" unit="g/cm3"/>
<composite n="9" ref="C"/>
<composite n="13" ref="H"/>
<composite n="2" ref="O"/>
<composite n="1" ref="N"/>
</material>
<material name="Rohacell31_50D">
<D type="density" value="0.016" unit="g/cm3"/>
<composite n="9" ref="C"/>
<composite n="13" ref="H"/>
<composite n="2" ref="O"/>
<composite n="1" ref="N"/>
</material>
<material name="RPCGasDefault" state="gas">
<D type="density" value="0.0037" unit="g/cm3"/>
<composite n="209" ref="C"/>
<composite n="239" ref="H"/>
<composite n="381" ref="F"/>
</material>
<material name="PolystyreneFoam">
<D type="density" value="0.0056" unit="g/cm3"/>
<fraction n="1.0" ref="Polystyrene"/>
</material>
<material name="Kapton">
<D value="1.43" unit="g/cm3"/>
<composite n="22" ref="C"/>
<composite n="10" ref="H"/>
<composite n="2" ref="N"/>
<composite n="5" ref="O"/>
</material>
<material name="PEEK">
<D value="1.37" unit="g/cm3"/>
<composite n="19" ref="C"/>
<composite n="12" ref="H"/>
<composite n="3" ref="O"/>
</material>
<material name="TungstenDens23">
<D value="17.7" unit="g / cm3"/>
<fraction n="0.925" ref="W"/>
<fraction n="0.066" ref="Ni"/>
<fraction n="0.009" ref="Fe"/>
</material>
<material name="TungstenDens24">
<D value="17.8" unit="g / cm3"/>
<fraction n="0.93" ref="W"/>
<fraction n="0.061" ref="Ni"/>
<fraction n="0.009" ref="Fe"/>
</material>
<material name="TungstenDens25">
<D value="18.2" unit="g / cm3"/>
<fraction n="0.950" ref="W"/>
<fraction n="0.044" ref="Ni"/>
<fraction n="0.006" ref="Fe"/>
</material>
<material name="CarbonFiber_25percent">
<D type="density" value="0.375" unit="g / cm3"/>
<fraction n="1.0" ref="CarbonFiber"/>
</material>
<material name="CarbonFiber_15percent">
<D type="density" value="0.225" unit="g / cm3"/>
<fraction n="1.0" ref="CarbonFiber"/>
</material>
<material name="Rohacell31_50percent">
<D type="density" value="0.016" unit="g / cm3"/>
<fraction n="1.0" ref="Rohacell31"/>
</material>
<material name="Rohacell31_15percent">
<D type="density" value="0.0048" unit="g / cm3"/>
<fraction n="1.0" ref="Rohacell31"/>
</material>
<material name="BoratedPolyethylene5">
<D value="0.93" unit="g / cm3"/>
<fraction n="0.612" ref="C"/>
<fraction n="0.222" ref="O"/>
<fraction n="0.116" ref="H"/>
<fraction n="0.050" ref="B"/>
</material>
<material name="SiliconCarbide">
<D value="3.1" unit="g / cm3"/>
<composite n="1" ref="Si"/>
<composite n="1" ref="C"/>
</material>
<material name="SiliconCarbide_6percent">
<D value="0.186" unit="g / cm3"/>
<fraction n="1.0" ref="SiliconCarbide"/>
</material>
<material name="PlasticScint">
<D type="density" unit="g/cm3" value="1.032"/>
<composite n="9" ref="C"/>
<composite n="10" ref="H"/>
</material>
<material name="PbWO4">
<D type="density" value="8.3" unit="g / cm3"/>
<composite n="1" ref="Pb"/>
<composite n="1" ref="W"/>
<composite n="4" ref="O"/>
</material>
</materials>
<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="Test Detector" title="Test Detector"
author="Jihee Kim"
url="https://eicweb.phy.anl.gov/EIC/detectors/reference_detector.git"
status="development"
version="v1 2021-03-16">
<comment>Test Detector</comment>
</info>
<!-- Use DD4hep elements and materials definitions -->
<includes>
<gdmlFile ref="elements.xml"/>
<gdmlFile ref="materials.xml"/>
</includes>
<!-- Define the dimensions of the world volume -->
<define>
<constant name="world_side" value="50*m"/>
<constant name="world_x" value="world_side"/>
<constant name="world_y" value="world_side"/>
<constant name="world_z" value="world_side"/>
<constant name="tracker_region_zmax" value="6 * m"/>
<constant name="tracker_region_rmax" value="6 * m"/>
<constant name="TestDetector_ID" value="999"/>
<constant name="TestDetector_inner_radius" value="10.0 * cm"/>
<constant name="TestDetector_rmin" value="10.0 * cm"/>
<constant name="TestDetector_thickness" value="100.0 * cm"/>
<constant name="TestDetector_inner_z" value="40.0 * cm"/>
<constant name="TestDetector_angle" value="0.0 * rad"/>
</define>
<limits>
</limits>
<regions>
</regions>
<!-- Common Generic visualization attributes -->
<comment>Common Generic visualization attributes</comment>
<display>
<vis name="TestDetectorVis" alpha="0.4" r= "0.1" g="0.0" b="0.1" showDaughters="true" visible="true"/>
</display>
<!-- Define detector -->
<detectors>
<comment>
Central Barrel Solenoid Magnet
</comment>
<detector id="TestDetector_ID" name="TestDetector" type="TestDetector" vis="TestDetectorVis">
<dimensions inner_radius="TestDetector_inner_radius"
rmin="TestDetector_rmin"
thickness="TestDetector_thickness"
inner_z="TestDetector_inner_z"
angle="TestDetector_angle"/>
<material name="Steel235"/>
</detector>
</detectors>
<plugins>
</plugins>
<fields>
</fields>
</lccdd>
#ReferenceDetector
{% for image_path in images %}
<img src="{{ base_url }}/{{ image_path }}?job=report" width="400px" />
<br \>
{% endfor %}
...@@ -12,7 +12,7 @@ parser = argparse.ArgumentParser( ...@@ -12,7 +12,7 @@ parser = argparse.ArgumentParser(
This program should be run in the "compact" directory. This program should be run in the "compact" directory.
''') ''')
parser.add_argument("-v","--verbose", help="increase output verbosity", type=int, default=0) parser.add_argument("-v","--verbose", help="increase output verbosity", type=int, default=0)
parser.add_argument("--compact", help="compact detector file",default="detector_template.xml") parser.add_argument("--compact", help="compact detector file",default="reference_detector.xml")
parser.add_argument("--vis", help="vis true/false", action="store_true",default=False) parser.add_argument("--vis", help="vis true/false", action="store_true",default=False)
parser.add_argument("--ui", help="ui setting tcsh or qt; default=qt", type=str,default="qt",dest="ui") parser.add_argument("--ui", help="ui setting tcsh or qt; default=qt", type=str,default="qt",dest="ui")
parser.add_argument("-b","--batch", help="batch turns off vis/ui", action="store_true",default=False, dest="batch") parser.add_argument("-b","--batch", help="batch turns off vis/ui", action="store_true",default=False, dest="batch")
...@@ -86,7 +86,7 @@ def run(): ...@@ -86,7 +86,7 @@ def run():
outputfile = args.output outputfile = args.output
if outputfile is None: if outputfile is None:
outputfile = 'data/detector_template_' + time.strftime('%Y-%m-%d_%H-%M') outputfile = 'data/reference_detector_' + time.strftime('%Y-%m-%d_%H-%M')
#rootoutput = geant4.setupROOTOutput('RootOutput', outputfile) #rootoutput = geant4.setupROOTOutput('RootOutput', outputfile)
#rootoutput.HandleMCTruth = True #rootoutput.HandleMCTruth = True
...@@ -214,21 +214,21 @@ def run(): ...@@ -214,21 +214,21 @@ def run():
#seq, act = geant4.setupDetector('HeavyGasCherenkov','PhotoMultiplierSDAction') #seq, act = geant4.setupDetector('HeavyGasCherenkov','PhotoMultiplierSDAction')
#act.adopt(f3) #act.adopt(f3)
seq, act = geant4.setupTracker('SiTrackerBarrel_Layer1') #seq, act = geant4.setupTracker('SiTrackerBarrel_Layer1')
seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer1') #seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer1')
seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer1') #seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer1')
seq, act = geant4.setupTracker('SiTrackerBarrel_Layer2') #seq, act = geant4.setupTracker('SiTrackerBarrel_Layer2')
seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer2') #seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer2')
seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer2') #seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer2')
seq, act = geant4.setupTracker('SiTrackerBarrel_Layer3') #seq, act = geant4.setupTracker('SiTrackerBarrel_Layer3')
seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer3') #seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer3')
seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer3') #seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer3')
seq, act = geant4.setupTracker('SiTrackerBarrel_Layer4') #seq, act = geant4.setupTracker('SiTrackerBarrel_Layer4')
seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer4') #seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer4')
seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer4') #seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer4')
seq, act = geant4.setupTracker('SiTrackerBarrel_Layer5') #seq, act = geant4.setupTracker('SiTrackerBarrel_Layer5')
seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer5') #seq, act = geant4.setupTracker('SiTrackerEndcapP_Layer5')
seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer5') #seq, act = geant4.setupTracker('SiTrackerEndcapN_Layer5')
#seq, act = geant4.setupTracker('SiVertexBarrel') #seq, act = geant4.setupTracker('SiVertexBarrel')
#seq, act = geant4.setupTracker('SiTrackerForward') #seq, act = geant4.setupTracker('SiTrackerForward')
#seq, act = geant4.setupCalorimeter('EcalBarrel') #seq, act = geant4.setupCalorimeter('EcalBarrel')
......
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