Commit 27cfad64 authored by Paul Schütze's avatar Paul Schütze
Browse files

Merge branch 'gdml' into 'master'

Passive Material: Add Possibility to Read GDML FIles

Closes #175

See merge request allpix-squared/allpix-squared!604
parents 376cffa4 c8f151af
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ The following authors, in alphabetical order, have developed or contributed to A
* Edoardo Rossi, DESY, @edrossi
* Andre Sailer, CERN, @sailer
* Enrico Jr. Schioppa, Unisalento and INFN Lecce, @schioppa
* Sebastian Schmidt, FAU Erlangen, @schmidtseb
* Sanchit Sharma, Kansas State University, @SanchitKratos
* Xin Shi, Institute of High Energy Physics Beijing, @xshi
* Viktor Sonesten, GSOC2018 Student, @tmplt
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ The following authors, in alphabetical order, have developed or contributed to \
\item Edoardo Rossi, DESY
\item Andre Sailer, CERN
\item Enrico Jr. Schioppa, Unisalento and INFN Lecce
\item Sebastian Schmidt, FAU Erlangen
\item Sanchit Sharma, Kansas State University
\item Xin Shi, Institute of High Energy Physics Beijing
\item Viktor Sonesten, GSOC2018 Student
+5 −0
Original line number Diff line number Diff line
@@ -136,6 +136,11 @@
    title = {Geant4 Material Database},
    url = {https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Appendix/materialNames.html}
}
@online{gdml,
    author = {{GDML Authors}},
    title = {Geometry Description Markup Language (GDML)},
    url = {https://gdml.web.cern.ch/GDML/}
}
@online{g4gps,
    author = {{Geant4 Collaboration}},
    title = {Geant4 GPS},
+8 −0
Original line number Diff line number Diff line
# GDML Passive Material Example

This example demonstrates how to load passive material structures defined in GDML files into the simulation.
Two separate GDML files are placed via the detector setup description file and loaded at startup.
All contained volumes are added to the simulation

The setup consists of two silicon detectors and the additional volumes from the GDML files.
Some of the volumes are placed between the particle beam origin and the detectors in order to have the pions interact with the material.
+78 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8" ?>
<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd" >

<define>
  <constant name="HALFPI" value="pi/2."/>
  <constant name="PI" value="1.*pi"/>
  <constant name="TWOPI" value="2.*pi"/>
  <position name="center" x="0" y="0" z="0"/>
  <rotation name="identity" x="0" y="0" z="0"/>
  <rotation name="alignSurfX" y="HALFPI" />
  <rotation name="alignSurfY" x="HALFPI" />
</define>

<materials>

  <element name="Oxygen"   formula="O"  Z="8.">
    <atom value="16.0"/>
  </element>
  <element name="Nitrogen" formula="N"  Z="7.">
    <atom value="14.01"/>
  </element>

  <material name="Al" Z="13.0">
   <D value="2.70"/>
   <atom value="26.98"/>
  </material>

  <material name="Air">
   <D value="1.290" unit="mg/cm3"/>
   <fraction n="0.7" ref="Nitrogen"/>
   <fraction n="0.3" ref="Oxygen"/>
  </material>

</materials>

<solids>
  <box  name="WorldBox" x="1.0" y="1.0" z="1.0" lunit="cm"/>
  <tube name="TubeSol" rmin="0.1075" rmax="0.1875" z="0.1875" deltaphi="TWOPI" startphi="0" aunit="rad" lunit="cm"/>
</solids>

<structure>

  <volume name="TubeVol">
    <materialref ref="Al"/>
    <solidref ref="TubeSol"/>
    <auxiliary auxtype="Color" auxvalue="#00CDCD22"/>
  </volume>

  <assembly name="AssemblyVol">
    <physvol>
      <volumeref ref="TubeVol"/>
      <position name="pos1" unit="cm" x="0" y="0" z="0.5"/>
      <rotationref ref="alignSurfX"/>
    </physvol>
    <physvol>
      <volumeref ref="TubeVol"/>
      <position name="pos2" unit="cm" x="0" y="0" z="-0.5"/>
      <rotationref ref="alignSurfY"/>
    </physvol>
  </assembly>

  <volume name="WorldBox">
    <materialref ref="Air"/>
    <solidref ref="WorldBox"/>
    <physvol>
       <volumeref ref="AssemblyVol"/>
       <positionref ref="center"/>
       <rotationref ref="identity"/>
    </physvol>
  </volume>

</structure>

<setup name="Default" version="1.0">
  <world ref="WorldBox"/>
</setup>

</gdml>
Loading