-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgcd.tex
231 lines (218 loc) · 12.5 KB
/
gcd.tex
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
% ###### ##### ###
% # # # # #
% # # # #
% ###### ##### #
% # # # #
% # # # # #
% ###### ##### ###
\documentclass{standalone}
\NeedsTeXFormat{LaTeX2e}
\usepackage{tikz}
\usepackage[utf8]{inputenc}
\usepackage{wasysym}
\usepackage{textcomp}
\usepackage{gensymb}
\usepackage{ifthen}
\usepackage{pgf}
% booleans:
\newboolean{passivated}
\newboolean{thin_window}
\newboolean{show_legendbox}
%
% INSERT THE NAME OF THE CONFIG FILE HERE!!!
% ↓
% ↓
% ↓
% ↓
\input{crystals/000_planar} %
%-------
%-------
\newcommand\Scale{4.5} % <--- Scale
% ↑↑↑↑↑
%!!!!!! USUALLY the scale is 4.0-5.0 for BIG crystals (>60% eff) !!!!!!
%!!!!!! and relatively small (3.0-4.0) for <50% efficiency !!!!!!
% # # # # # #
% # # # # # #
% ####### ####### #######
% # # # # # #
% # # # # # #
\newcommand\Diam{\Dia/\Scale} % Detector diameter in mm
\newcommand\Height{\Hei/\Scale} % Detector height in mm
\newcommand\WO{\Gdt/\Scale} % Groove depth
\newcommand\Bullet{\Bult/\Scale} %widow bulletization
\newcommand\FCD{\Cdiam/\Scale} %Contact diam
\newcommand\CDepth{\Cdepth/\Scale} %Cont depth
\newcommand\GrooveExt{\GrvEx/\Scale} %Groove ext. diameter
\newcommand\GrooveInt{\GrvIn/\Scale} %Groove int. diameter
\newcommand\WSH{\Shei/\Scale} %Side wall height
\newcommand\Inr{\Inner/\Scale} %inner radius for planar
\tikzset{ % styles for layers
arrow/.style={<->,>=latex,thin,gray,every rectangle node/.style={fill=white!95!transparent,midway,font=\sffamily}},
arrow_p/.style={<->,>=latex,thin,gray,every rectangle node/.style={fill=white!95!transparent,midway,font=\sffamily\scriptsize}},
dimen/.style={thin,gray, fill=transparent},
caption/.style={font=\sffamily,black,scale=1.3},
lithium/.style={rounded corners,red!90!white,line width=1.5pt},
germanium/.style={rounded corners,black!80,line width=1pt},
passiv/.style={rounded corners,violet!60!white,line width=3pt},
in_window/.style={rounded corners,blue,line width=1pt},
}
\begin{document}
\resizebox{1200pt}{!}{ %<---YOU CAN SET IMAGE SIZE IN PIXELS HERE!
\begin{tikzpicture}[fill=white,thick,scale=0.8, every node/.style={scale=0.8}]
\ifthenelse{\equal{\Dtype}{planar}}
{
\pgfmathsetmacro\Scale{\Scale/1.5} %<---- Scale modificator for planar!!!
% Back fill
\draw[rounded corners=1.5, top color=white!80!black, bottom color=black!50!blue!25,draw=none]
(0,0) -- (\Diam,0) -- (\Diam,-\WSH) -- (\Diam/2+\FCD/2,-\WSH) -- (\Diam/2+\FCD/2,-\Height)
-- (\Diam/2-\FCD/2,-\Height) -- (\Diam/2-\FCD/2,-\WSH) -- (0,-\WSH) -- cycle;
\draw[rounded corners=1, blue!50!gray, line width=0.5pt] (\Diam/2+\Inr/2,-\WSH)
-- (\Diam/2+\Inr/2,-\WO) -- (\Diam/2+\FCD/2,-\WO) -- (\Diam/2+\FCD/2,-\WSH);
\draw[rounded corners=1, blue!50!gray, line width=0.5pt] (\Diam/2-\Inr/2,-\WSH)
-- (\Diam/2-\Inr/2,-\WO) -- (\Diam/2-\FCD/2,-\WO) -- (\Diam/2-\FCD/2,-\WSH);
% --
\draw[lithium] (\Diam/2-\FCD/2,-\Height) -- (\Diam/2+\FCD/2,-\Height); %Li contact
\filldraw[blue,line width=0.5pt] (\Diam/2 - \Inr/2,0) rectangle (\Diam/2+\Inr/2,0.2/\Scale); % Window
%--------Captions--------
\draw (\Diam/2, -\Height) node[caption,anchor=south]{\scriptsize Li diffusion (\char`\~ 500 $\mu$m)};
\draw (\Diam/2, -\Height/1.6) node[caption,anchor=south]{\scriptsize P-type Germanium};
\draw (\Diam/2,0) node[caption,anchor=north]{\scriptsize Thin window (\char`\~ 0.3 $\mu$m)};
%--------Dimensions--------
\draw[dimen] (0,0) -- (0,\Height/5);
\draw[dimen] (\Diam,0) -- (\Diam,\Height/5); %---diameter---
\draw[arrow_p,<->] (0,\Height/5.5) -- (\Diam,\Height/5.5) node[caption]{$\diameter$\pgfmathparse{\Dia}\pgfmathresult};
%---
\draw[dimen] (\Diam/2-\FCD/2,-\Height) -- (\Diam/2-\FCD/2,-\Height-\Height/5);
\draw[dimen] (\Diam/2+\FCD/2,-\Height) -- (\Diam/2+\FCD/2,-\Height-\Height/5); %---contact diameter---
\draw[arrow_p,<->] (\Diam/2-\FCD/2,-\Height-\Height/5.5) -- (\Diam/2+\FCD/2,-\Height-\Height/5.5)
node[caption]{$\diameter$\pgfmathparse{\Cdiam}\pgfmathresult};
%---
\draw[dimen] (\Diam/2-\Inr/2,-\WSH) -- (\Diam/2-\Inr/2,-\Height-\Height/2.6);
\draw[dimen] (\Diam/2+\Inr/2,-\WSH) -- (\Diam/2+\Inr/2,-\Height-\Height/2.6); %---groove diameter---
\draw[arrow_p,<->] (\Diam/2-\Inr/2,-\Height-\Height/2.7) -- (\Diam/2+\Inr/2,-\Height-\Height/2.7)
node[caption]{$\diameter$\pgfmathparse{\Inner}\pgfmathresult};
%---
\draw[dimen] (\Diam,0) -- (\Diam+\Diam/5,0);
\draw[dimen] (\Diam/2+\FCD/2,-\Height) -- (\Diam+\Diam/5,-\Height); %---height---
\draw[arrow_p,<->] (\Diam+\Diam/5.3,0) -- (\Diam+\Diam/5.3,-\Height) node[caption]{\pgfmathparse{\Hei}\pgfmathresult};
%---
\draw[dimen] (0,0) -- (-\Diam/4,0);
\draw[dimen] (0,-\WSH) -- (-\Diam/4,-\WSH); %---Sidewall height---
\draw[arrow_p,<->] (-\Diam/4.2,0) -- (-\Diam/4.2,-\WSH) node[caption]{\pgfmathparse{\Shei}\pgfmathresult};
%---
\draw[dimen] (\Diam/2-\Inr/2,-\WO) -- (-\Diam/7,-\WO); %---???---
\draw[arrow_p,<->] (-\Diam/7.3,0) -- (-\Diam/7.3,-\WO) node[caption]{\tiny \pgfmathparse{\Gdt}\pgfmathresult};
%---
}
{
% Back fill
\draw[rounded corners, top color=gray!5!white, bottom color=black!60!blue!15,draw=none] (0,-\Height) -- (0,-\Bullet) --
(\Bullet,0) -- (\Diam-\Bullet,0) -- (\Diam,-\Bullet) -- (\Diam,-\Height) -- cycle;
\draw[gray!45, line width=0.5pt] (\Diam/2 - \FCD/2,-\Height) -- (\Diam/2 + \FCD/2,-\Height);
\draw[gray!45, line width=0.5pt] (\Diam/2 +\GrooveExt/2,-\Height) -- (\Diam/2 + \FCD /2,-\Height);
\draw[gray!45, line width=0.5pt] (\Diam/2 -\GrooveExt/2,-\Height) -- (\Diam/2 - \FCD /2,-\Height);
% ---
\draw[lithium] (\Diam/2-\GrooveExt/2,-\Height) -- (0,-\Height) -- (0,-\Bullet) -- %Left wall
(\Bullet,0); %bulletize left
\draw[lithium] (\Diam/2+\GrooveExt/2,-\Height) -- (\Diam,-\Height) -- (\Diam,-\Bullet)-- %Right wall
(\Diam-\Bullet,0); %bulletize right
\ifthenelse{\boolean{thin_window}}
{ \draw[in_window] (\Bullet,0) -- (\Diam-\Bullet,0);} % thin window
{ \draw[lithium] (\Bullet,0) -- (\Diam-\Bullet,0);} % window with Li layer
\ifthenelse{\boolean{passivated}}
{
\draw[passiv] (\Diam/2 +\GrooveExt/2,-\Height) -- (\Diam/2 +\GrooveExt/2,-\Height+\WO) --
(\Diam/2 +\GrooveInt/2,-\Height+\WO) -- (\Diam/2 +\GrooveInt/2,-\Height) -- (\Diam/2 + \FCD /2,-\Height); %Groove right
\draw[passiv] (\Diam/2 -\GrooveExt/2,-\Height) -- (\Diam/2 -\GrooveExt/2,-\Height+\WO) --
(\Diam/2 -\GrooveInt/2,-\Height+\WO) -- (\Diam/2 -\GrooveInt/2,-\Height) -- (\Diam/2 - \FCD /2,-\Height); %Groove left
\draw[arrow, ->] (\Diam/2*1.8,-\Height*1.2) -- (\Diam/2+\GrooveInt/2,-\Height+\WO/2);
}
{
\draw[germanium] (\Diam/2 +\GrooveExt/2,-\Height) -- (\Diam/2 +\GrooveExt/2,-\Height+\WO) --
(\Diam/2 +\GrooveInt/2,-\Height+\WO) -- (\Diam/2 +\GrooveInt/2,-\Height) -- (\Diam/2 + \FCD /2,-\Height); %Groove right
\draw[germanium] (\Diam/2 -\GrooveExt/2,-\Height) -- (\Diam/2 -\GrooveExt/2,-\Height+\WO) --
(\Diam/2 -\GrooveInt/2,-\Height+\WO) -- (\Diam/2 -\GrooveInt/2,-\Height) -- (\Diam/2 - \FCD /2,-\Height); %Groove left
}
\ifthenelse{\equal{\Dtype}{coax}}{
\draw[in_window] (\Diam/2 - \FCD/2,-\Height) -- (\Diam/2 - \FCD/2,-\Height + \Cdepth/\Scale) --
(\Diam/2 + \FCD /2,-\Height + \Cdepth/\Scale) -- (\Diam/2 + \FCD /2,-\Height);}{} %Contact hole
\ifthenelse{\equal{\Dtype}{flat}}{
\filldraw[fill=blue!40!white, draw=none] (\Diam/2 - \FCD /2,-\Height) rectangle (\Diam/2 + \FCD /2,-\Height + 0.2/\Scale);}{} % Flat contact
\draw[gray,thin,dashed,opacity=5] (\Diam/2,\Height/15) -- (\Diam/2,-\Height - \Height/15); %Symmetry line
%--------Captions--------
\ifthenelse{\equal{\Dtype}{coax}}{
\draw (\Diam/2 - \FCD/2 -0.6/\Scale, -\Height + \Cdepth/\Scale/2)node[caption,anchor=center,rotate=90]{\footnotesize Central contact (\char`\~ 0.3 $\mu$m)};}{}
\ifthenelse{\equal{\Dtype}{flat}}{
\draw (\Diam/2, -\Height)node[caption,anchor=north]{\small Flat contact $\diameter$\pgfmathparse{int(\Cdiam)}\pgfmathresult};}{}
\draw (0, -\Height*0.5) node[caption,anchor=south,rotate=90]{\small Li diffusion (\char`\~ 700 $\mu$m)};
\draw (\Diam/5, -\Height/1.6) node[caption,anchor=south]{P-type Germanium};
\ifthenelse{\boolean{passivated}}{ \draw (\Diam/2*1.8,-\Height*1.2) node [caption,anchor=west]{Passivation coating};}{}
\ifthenelse{\boolean{thin_window}}{\draw (\Diam/2,0) node[caption,anchor=south]{\small Thin window (\char`\~ 0.3 $\mu$m)};}{}
%--------Dimensions--------
\draw[dimen] (0,-\Bullet) -- (0,\Height/5);
\draw[dimen] (\Diam,-\Bullet) -- (\Diam,\Height/5); %---diameter---
\draw[arrow,<->] (0,\Height/5.5) -- (\Diam,\Height/5.5) node[caption]{$\diameter$\pgfmathparse{\Dia}\pgfmathresult};
%---
\ifthenelse{\equal{\Dtype}{coax}}{
\draw[arrow,<->] (\Diam/2 - \FCD/2, -\Height + 3/\Scale) -- (\Diam/2 + \FCD/2, -\Height + 3/\Scale) node[caption]{\small $\diameter$\pgfmathparse{\Cdiam}\pgfmathresult};}{}
%---
\draw[dimen] (\Bullet,0) -- (-\Diam/5.5,0);
\draw[dimen] (0,-\Height) -- (-\Diam/5.5,-\Height); %---height---
\draw[arrow,<->] (-\Diam/6.0,0) -- (-\Diam/6.0,-\Height) node[caption]{\pgfmathparse{\Hei}\pgfmathresult};
%---
\draw[dimen] (\Diam/2-\GrooveInt/2,-\Height) -- (\Diam/2-\GrooveInt/2,-\Height-\Height/5);
\draw[dimen] (\Diam/2+\GrooveInt/2,-\Height) -- (\Diam/2+\GrooveInt/2,-\Height-\Height/5); %---Groove inner D---
\draw[arrow,<->] (\Diam/2-\GrooveInt/2,-\Height -\Height/5.5) -- (\Diam/2+\GrooveInt/2,-\Height - \Height/5.5) node[caption]{$\diameter$\pgfmathparse{\GrvIn}\pgfmathresult};
%---
\draw[dimen] (\Diam/2-\GrooveExt/2,-\Height) -- (\Diam/2-\GrooveExt/2,-\Height-\Height/3);
\draw[dimen] (\Diam/2+\GrooveExt/2,-\Height) -- (\Diam/2+\GrooveExt/2,-\Height-\Height/3); %---Groove outer D---
\draw[arrow,<->] (\Diam/2-\GrooveExt/2,-\Height -\Height/3.3) -- (\Diam/2+\GrooveExt/2,-\Height - \Height/3.3) node[caption]{$\diameter$\pgfmathparse{\GrvEx}\pgfmathresult};
%---
\ifthenelse{\equal{\Dtype}{coax}}{
\draw[dimen] (\Diam-\Bullet,0) -- (\Diam+\Diam/5,0);
\draw[dimen] (\Diam,-\Bullet) -- (\Diam+\Diam/5,-\Bullet);
\draw[arrow,->] (\Diam+\Diam/5.5,-1.5*\Bullet) -- (\Diam+\Diam/5.5,0);
\draw[dimen] (\Diam+\Diam/5.5,-1.3*\Bullet) node[anchor=west,caption]{$\pgfmathparse{\Bult}\pgfmathresult\times45\degree$};}{} %Bulletize
%---
\draw[dimen] (\Diam/2 +\GrooveExt/2,-\Height+\WO) -- (\Diam/2+\GrooveInt*1.1,-\Height+\WO);
\draw[arrow,<->] (\Diam/2+\GrooveInt,-\Height+\WO) -- (\Diam/2+\GrooveInt,-\Height) node[caption]{\pgfmathparse{\Gdt}\pgfmathresult};
%---
\ifthenelse{\equal{\Dtype}{coax}}{
\draw[dimen] (\Diam/2+\FCD/2, -\Height+\CDepth) -- (\Diam+\Diam/5,-\Height+\CDepth);
\draw[dimen] (\Diam,-\Height) -- (\Diam+\Diam/5,-\Height);
\draw[arrow,<->] (\Diam+\Diam/5.5,-\Height+\CDepth) -- (\Diam+\Diam/5.5,-\Height) node[caption]{\pgfmathparse{\Cdepth}\pgfmathresult};}{}
}
\ifthenelse{\boolean{show_legendbox}}
{
%--- INFO BOX
\ifthenelse{\equal{\Dtype}{planar}}
{
\newcommand\LX{\Diam/1.5} % Legend box horizontal size
\newcommand\LY{\LX/2} % Legend box vertical size
}
{
\newcommand\LX{\Diam/2.5} % Legend box horizontal size
\newcommand\LY{\LX/2} % Legend box vertical size
}
\ifthenelse{\equal{\Dtype}{coax}}{
\newcommand\Xa{\Diam*1.4}}{} % Legend box horizontal position if coax
\ifthenelse{\equal{\Dtype}{flat}}{
\newcommand\Xa{\Diam*1.15}}{} % Legend box horizontal position if flat
\ifthenelse{\equal{\Dtype}{planar}}{
\newcommand\Xa{\Diam*1.5}}{} % Legend box horizontal position if planar
\newcommand\Ya{0/\Scale} % Legend box vertical position
\ifthenelse{\equal{\Dtype}{planar}}{
\filldraw[left color=red!20, right color=red!20, draw=black] (\Xa, \Ya) rectangle (\Xa+\LX, \Ya-\LY);
}
{
\filldraw[left color=green!10, right color=green!10, draw=black] (\Xa, \Ya) rectangle (\Xa+\LX, \Ya-\LY);
}
\draw (\Xa+\LX/2, \Ya) node[anchor=north]{\Large $\Name$};
\draw (\Xa+\LX/2, \Ya-\LY/4) node[anchor=north]{\Large $\Crystal$};
\draw (\Xa+\LX/2, \Ya-\LY/1.8) node[anchor=north]{\normalsize $\mathcal{C}_{HEAD}=~\HEAD\times10^{10}~cm^{-3}$};
\draw (\Xa+\LX/2, \Ya-\LY) node[anchor=south]{\normalsize $\mathcal{C}_{TAIL}=~\TAIL\times10^{10}~cm^{-3}$};
%---
}{}
\end{tikzpicture}
}
\end{document}