Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ jobs:
uses: rest-for-physics/geant4lib/.github/workflows/validation.yml@master

detectorlib-validation:
uses: rest-for-physics/detectorlib/.github/workflows/validation.yml@master
uses: rest-for-physics/detectorlib/.github/workflows/validation.yml@jgalan-readoutplane-update

connectorslib-validation:
uses: rest-for-physics/connectorslib/.github/workflows/validation.yml@master
Expand Down
48 changes: 20 additions & 28 deletions examples/01.alphaTrack/readout/readouts.rml
Original file line number Diff line number Diff line change
@@ -1,45 +1,37 @@
<?xml version="1.0" ?>
<?xml version="1.0"?>
<readouts>
<globals>
<!-- The pitch value in mm -->
<variable name="PITCH" value="1" overwrite="false" />
<variable name="PITCH" value="1" overwrite="false"/>
<!-- The number of modules per axis MxM -->
<variable name="N_MODULES" value="1" overwrite="false" />
<variable name="N_MODULES" value="1" overwrite="false"/>
<!-- The number of pixels per side PxP -->
<variable name="N_CHANNELS" value="120" overwrite="false" />
<variable name="N_CHANNELS" value="120" overwrite="false"/>
</globals>

<TRestDetectorReadout name="cathode" title="Cathode ${PITCH} mm-Pitch ${N_CHANNELS}+${N_CHANNELS} channels">

<constant name="pitch" value="${PITCH}" overwrite="false" />
<constant name="pitch" value="${PITCH}" overwrite="false"/>
<!-- The number of modules per axis MxM -->
<constant name="nModules" value="${N_MODULES}" overwrite="false" />

<constant name="nModules" value="${N_MODULES}" overwrite="false"/>
<!-- The number of pixels per side PxP -->
<constant name="nChannels" value="${N_CHANNELS}" overwrite="false" />
<constant name="pixelSize" value="${PITCH}/sqrt(2.)" />

<parameter name="mappingNodes" value="400" />
<include file="microbulkModule.rml" />
<readoutPlane position="(0,0,0)mm" planeVector="(0,0,1)" chargeCollection="1" cathodePosition="(0,0,50)mm">
<addReadoutModule id="0" name="module" origin="(-0.5*nChannels*pitch,-0.5*nChannels*pitch)" rotation="0" decodingFile="" firstDaqChannel="0" />
<constant name="nChannels" value="${N_CHANNELS}" overwrite="false"/>
<constant name="pixelSize" value="${PITCH}/sqrt(2.)"/>
<parameter name="mappingNodes" value="400"/>
<include file="microbulkModule.rml"/>
<readoutPlane position="(0,0,0)mm" normal="(0,0,1)" chargeCollection="1" height="50mm">
<addReadoutModule id="0" name="module" origin="(-0.5*nChannels*pitch,-0.5*nChannels*pitch)" rotation="0" decodingFile="" firstDaqChannel="0"/>
</readoutPlane>
</TRestDetectorReadout>

<TRestDetectorReadout name="readout" title="Readout ${PITCH} mm-Pitch ${N_CHANNELS}+${N_CHANNELS} channels">

<constant name="pitch" value="${PITCH}" overwrite="false" />
<constant name="pitch" value="${PITCH}" overwrite="false"/>
<!-- The number of modules per axis MxM -->
<constant name="nModules" value="${N_MODULES}" overwrite="false" />

<constant name="nModules" value="${N_MODULES}" overwrite="false"/>
<!-- The number of pixels per side PxP -->
<constant name="nChannels" value="${N_CHANNELS}" overwrite="false" />
<constant name="pixelSize" value="${PITCH}/sqrt(2.)" />

<parameter name="mappingNodes" value="400" />
<include file="microbulkModule.rml" />
<readoutPlane position="(0,0,50)mm" planeVector="(0,0,-1)" chargeCollection="1" cathodePosition="(0,0,0)mm">
<addReadoutModule id="0" name="module" origin="(-0.5*nChannels*pitch,-0.5*nChannels*pitch)" rotation="0" decodingFile="" firstDaqChannel="0" />
<constant name="nChannels" value="${N_CHANNELS}" overwrite="false"/>
<constant name="pixelSize" value="${PITCH}/sqrt(2.)"/>
<parameter name="mappingNodes" value="400"/>
<include file="microbulkModule.rml"/>
<readoutPlane position="(0,0,50)mm" normal="(0,0,-1)" chargeCollection="1" height="50mm">
<addReadoutModule id="0" name="module" origin="(-0.5*nChannels*pitch,-0.5*nChannels*pitch)" rotation="0" decodingFile="" firstDaqChannel="0"/>
</readoutPlane>
</TRestDetectorReadout>
</readouts>
Binary file modified examples/01.alphaTrack/readout/readouts.root
Binary file not shown.
122 changes: 18 additions & 104 deletions pipeline/pandaxiii_MC/readout-140kg.rml
Original file line number Diff line number Diff line change
@@ -1,137 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

<readouts>

<globals>
<variable name="PITCH" value="3" overwrite="false"/>
<!-- The pitch value in mm -->
<variable name="MODULES" value="10" overwrite="false"/>
<!-- The number of modules per axis MxM -->
<variable name="CHANNELS" value="64" overwrite="false"/>
<!-- The number of pixels per side PxP -->
</globals>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<readouts><globals><variable name="PITCH" value="3" overwrite="false"/><!-- The pitch value in mm --><variable name="MODULES" value="10" overwrite="false"/><!-- The number of modules per axis MxM --><variable name="CHANNELS" value="64" overwrite="false"/><!-- The number of pixels per side PxP --></globals>

//The Microbulk MicroMegas
<readoutModule name="module" size="((nChannels+1)*pitch-1*pitch/2,(nChannels+1)*pitch-pitch/2-pitch/4)"
tolerance="1.e-4">
<readoutModule name="module" size="((nChannels+1)*pitch-1*pitch/2,(nChannels+1)*pitch-pitch/2-pitch/4)" tolerance="1.e-4">

// Y-strips (pixel has fixed x coordinate)
<for variable="nCh" from="0" to="nChannels-2" step="1">
<readoutChannel id="${nCh}" type="y">
<for variable="nPix" from="0" to="nChannels-1" step="1">
<addPixel id="${nPix}" origin="((1+${nCh})*pitch,pitch/4+${nPix}*pitch)"
size="(pixelSize,pixelSize)" rotation="45"/>
</for>
<addPixel id="nChannels" origin="(${nCh}*pitch,pitch/4+(nChannels-1)*pitch+pitch/2)"
size="(pitch+pitch/2,pitch/2)" rotation="0"/>
</readoutChannel>
</for>
<for variable="nCh" from="0" to="nChannels-2" step="1"><readoutChannel id="${nCh}" type="y"><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}" origin="((1+${nCh})*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45"/></for><addPixel id="nChannels" origin="(${nCh}*pitch,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch+pitch/2,pitch/2)" rotation="0"/></readoutChannel></for>

// Last strip is special
<readoutChannel id="nChannels-1" type="y">
<for variable="nPix" from="0" to="nChannels-1" step="1">
<addPixel id="${nPix}" origin="(nChannels*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)"
rotation="45"/>
<addPixel id="nChannels+${nPix}" origin="(nChannels*pitch,pitch/4+${nPix}*pitch)" size="(pitch/2,pitch)"
rotation="0"/>
</for>
<addPixel id="2*nChannels" origin="(nChannels*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)"
size="(pitch,pitch/2)" rotation="0"/>
</readoutChannel>
<readoutChannel id="nChannels-1" type="y"><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}" origin="(nChannels*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45"/><addPixel id="nChannels+${nPix}" origin="(nChannels*pitch,pitch/4+${nPix}*pitch)" size="(pitch/2,pitch)" rotation="0"/></for><addPixel id="2*nChannels" origin="(nChannels*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0"/></readoutChannel>

// X-strips (pixel has fixed y coordinate)

// First strip is special
<readoutChannel id="nChannels" type="x">
<addPixel id="0" origin="(0,0)" size="(nChannels*pitch+pitch/2,3*pitch/4)" rotation="0"/>
</readoutChannel>

<for variable="nCh" from="1" to="nChannels-1" step="1">
<readoutChannel id="nChannels+${nCh}" type="x">
<addPixel id="0" origin="(0,${nCh}*pitch-pitch/4)" size="(pitch/2,pitch)" rotation="0"/>
<for variable="nPix" from="0" to="nChannels-1" step="1">
<addPixel id="${nPix}+1" origin="((0.5+${nPix})*pitch,${nCh}*pitch-pitch/4)"
size="(pixelSize,pixelSize)" rotation="45"/>
</for>
</readoutChannel>
</for>
<readoutChannel id="nChannels" type="x"><addPixel id="0" origin="(0,0)" size="(nChannels*pitch+pitch/2,3*pitch/4)" rotation="0"/></readoutChannel>

<for variable="nCh" from="1" to="nChannels-1" step="1"><readoutChannel id="nChannels+${nCh}" type="x"><addPixel id="0" origin="(0,${nCh}*pitch-pitch/4)" size="(pitch/2,pitch)" rotation="0"/><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}+1" origin="((0.5+${nPix})*pitch,${nCh}*pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="45"/></for></readoutChannel></for>

</readoutModule>

<!-- This readout (Panda-140kg) is the latest design of PandaIII detector_2019.5.28-->
<TRestDetectorReadout name="Panda-140kg"
title="PANDA SJTU Jinping readout. 1 plane 52 modules ${PITCH}mm-Pitch ${CHANNELS}+${CHANNELS} channels">
<constant name="nChannels" value="${CHANNELS}"/>
<constant name="pitch" value="${PITCH}"/>
<constant name="pixelSize" value="${PITCH}/sqrt(2.)"/>

<parameter name="mappingNodes" value="0"/>

<readoutModule name="module" file="readouts.rml"/>

<readoutPlane position="(0,0,600.5)mm" planeVector="(0,0,-1)"
chargeCollection="1"
cathodePosition="(0,0,-601)mm">
<TRestDetectorReadout name="Panda-140kg" title="PANDA SJTU Jinping readout. 1 plane 52 modules ${PITCH}mm-Pitch ${CHANNELS}+${CHANNELS} channels"><constant name="nChannels" value="${CHANNELS}"/><constant name="pitch" value="${PITCH}"/><constant name="pixelSize" value="${PITCH}/sqrt(2.)"/><parameter name="mappingNodes" value="0"/><readoutModule name="module" file="readouts.rml"/><readoutPlane position="(0,0,600.5)mm" normal="(0,0,-1)" chargeCollection="1" height="1201.5mm">

// 4 modules
<for variable="modX" from="1" to="4" step="1">
<addReadoutModule id="${modX}" name="module"
origin="(( (nChannels+1)*pitch-1*pitch/2)*(-2+(${modX}-1)) , 3 * ((nChannels+1)*pitch-pitch/2-pitch/4) )"
rotation="0"/>
</for>
<for variable="modX" from="1" to="4" step="1"><addReadoutModule id="${modX}" name="module" origin="(( (nChannels+1)*pitch-1*pitch/2)*(-2+(${modX}-1)) , 3 * ((nChannels+1)*pitch-pitch/2-pitch/4) )" rotation="0"/></for>

// 6-modules
<for variable="modX" from="5" to="10" step="1">
<addReadoutModule id="${modX}" name="module"
origin="(((nChannels+1)*pitch-1*pitch/2)*(-3+(${modX}-5)) , 2 * ((nChannels+1)*pitch-pitch/2-pitch/4) )"
rotation="0"/>
</for>
<for variable="modX" from="5" to="10" step="1"><addReadoutModule id="${modX}" name="module" origin="(((nChannels+1)*pitch-1*pitch/2)*(-3+(${modX}-5)) , 2 * ((nChannels+1)*pitch-pitch/2-pitch/4) )" rotation="0"/></for>

// 8-modules
<for variable="modX" from="11" to="18" step="1">
<addReadoutModule id="${modX}" name="module"
origin="(((nChannels+1)*pitch-1*pitch/2)*(-4+(${modX}-11)) , 1 * ((nChannels+1)*pitch-pitch/2-pitch/4) )"
rotation="0"/>
</for>
<for variable="modX" from="11" to="18" step="1"><addReadoutModule id="${modX}" name="module" origin="(((nChannels+1)*pitch-1*pitch/2)*(-4+(${modX}-11)) , 1 * ((nChannels+1)*pitch-pitch/2-pitch/4) )" rotation="0"/></for>

// 8-modules
<for variable="modX" from="19" to="26" step="1">
<addReadoutModule id="${modX}" name="module"
origin="(((nChannels+1)*pitch-1*pitch/2)*(-4+(${modX}-19)) , 0.0 * ((nChannels+1)*pitch-pitch/2-pitch/4) )"
rotation="0"/>
</for>
<for variable="modX" from="19" to="26" step="1"><addReadoutModule id="${modX}" name="module" origin="(((nChannels+1)*pitch-1*pitch/2)*(-4+(${modX}-19)) , 0.0 * ((nChannels+1)*pitch-pitch/2-pitch/4) )" rotation="0"/></for>

// 8-modules
<for variable="modX" from="27" to="34" step="1">
<addReadoutModule id="${modX}" name="module"
origin="(((nChannels+1)*pitch-1*pitch/2)*(-4+(${modX}-27)) , -1 * ((nChannels+1)*pitch-pitch/2-pitch/4) )"
rotation="0"/>
</for>
<for variable="modX" from="27" to="34" step="1"><addReadoutModule id="${modX}" name="module" origin="(((nChannels+1)*pitch-1*pitch/2)*(-4+(${modX}-27)) , -1 * ((nChannels+1)*pitch-pitch/2-pitch/4) )" rotation="0"/></for>

// 8-modules
<for variable="modX" from="35" to="42" step="1">
<addReadoutModule id="${modX}" name="module"
origin="(((nChannels+1)*pitch-1*pitch/2)*(-4+(${modX}-35)) , -2 * ((nChannels+1)*pitch-pitch/2-pitch/4) )"
rotation="0"/>
</for>
<for variable="modX" from="35" to="42" step="1"><addReadoutModule id="${modX}" name="module" origin="(((nChannels+1)*pitch-1*pitch/2)*(-4+(${modX}-35)) , -2 * ((nChannels+1)*pitch-pitch/2-pitch/4) )" rotation="0"/></for>

// 6-modules
<for variable="modX" from="43" to="48" step="1">
<addReadoutModule id="${modX}" name="module"
origin="(((nChannels+1)*pitch-1*pitch/2)*(-3+(${modX}-43)) , -3 * ((nChannels+1)*pitch-pitch/2-pitch/4) )"
rotation="0"/>
</for>
<for variable="modX" from="43" to="48" step="1"><addReadoutModule id="${modX}" name="module" origin="(((nChannels+1)*pitch-1*pitch/2)*(-3+(${modX}-43)) , -3 * ((nChannels+1)*pitch-pitch/2-pitch/4) )" rotation="0"/></for>

// 4-modules
<for variable="modX" from="49" to="52" step="1">
<addReadoutModule id="${modX}" name="module"
origin="(((nChannels+1)*pitch-1*pitch/2)*(-2+(${modX}-49)) , -4 * ((nChannels+1)*pitch-pitch/2-pitch/4) )"
rotation="0"/>
</for>

</readoutPlane>

<for variable="modX" from="49" to="52" step="1"><addReadoutModule id="${modX}" name="module" origin="(((nChannels+1)*pitch-1*pitch/2)*(-2+(${modX}-49)) , -4 * ((nChannels+1)*pitch-pitch/2-pitch/4) )" rotation="0"/></for>

</TRestDetectorReadout>
</readoutPlane></TRestDetectorReadout>

</readouts>