-
Notifications
You must be signed in to change notification settings - Fork 0
/
microbulkModule.rml
61 lines (52 loc) · 3.05 KB
/
microbulkModule.rml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<readoutModule name="module" size="((nChannels+1)*pitch-1*pitch/2,(nChannels+1)*pitch-pitch/2-pitch/4)" tolerance="1.e-4" >
// Y-strips
<for variable="nCh" from="1" to="nChannels-2" step="1" >
<readoutChannel id="${nCh}" >
<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="((1+${nCh})*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0" />
</readoutChannel>
</for>
//First strip is special (upper left corner)
<readoutChannel id="0">
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}" origin="((1)*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45" />
</for>
<addPixel id="nChannels" origin="((1)*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0" />
<addPixel id="nChannels+1" origin="(pitch/2,pitch/4+(nChannels-1)*pitch+pitch)" size="(pitch/2,pitch/2)" rotation="180" triangle="true"/>
</readoutChannel>
// Last strip is special
<readoutChannel id="nChannels-1" >
<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
// First strip is special
<readoutChannel id="nChannels" >
<addPixel id="0" origin="(0,0)" size="(pitch/2,3*pitch/4)" rotation="0" />
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}+1" origin="((0.5+${nPix})*pitch,pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="-135" triangle="true"/>
</for>
<addPixel id="nChannels+1" origin="(0,0)" size="(nChannels*pitch+pitch/2,pitch/4)" rotation="0" />
</readoutChannel>
<for variable="nCh" from="1" to="nChannels-2" step="1" >
<readoutChannel id="nChannels+${nCh}" >
<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>
//Last strip is special (upper left corner)
<readoutChannel id="nChannels+nChannels-1" >
<addPixel id="0" origin="(0,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch/2,pitch/2)" rotation="0" triangle="true"/>
<addPixel id="1" origin="(0,(nChannels-1)*pitch-pitch/4)" size="(pitch/2,pitch)" rotation="0" />
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}+2" origin="((0.5+${nPix})*pitch,(nChannels-1)*pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="45" />
</for>
</readoutChannel>
</readoutModule>