-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRHEA.tex
357 lines (329 loc) · 14 KB
/
RHEA.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
\documentclass[oneside,uplatex]{jsbook}
\usepackage{multirow}
\usepackage[dvipdfmx]{pdflscape}
\usepackage[deluxe]{otf} % Avoid using Hira-Kaku W6
\usepackage{enumitem} % Adjust description items
\usepackage[dvipdfmx]{graphicx}
\usepackage{times}
\usepackage{amsmath}
\usepackage{fancybox}
% PDF 内で外部リンクや文書内リンクを生成したい場合に使う(好みによる)
\usepackage[dvipdfmx,
colorlinks=true,
urlcolor=blue,
linkcolor=blue,
citecolor=blue,
bookmarks=true,
bookmarksnumbered=false,
bookmarkstype=toc]{hyperref}
% PDF 内のしおりの文字化けを防ぐ
\usepackage{pxjahyper}
% color より新しいらしい
\usepackage[dvipdfmx]{xcolor}
\usepackage{listings}
% enable correct copy & paste for ` from PDF
% https://tex.stackexchange.com/questions/341004/backward-quote-in-listings
\usepackage{upquote}
\newcommand{\conted}{\texttt{cont'ed}} % for ROOT 6 prompt
\usepackage[T1]{fontenc}
\usepackage{makeidx}
\definecolor{stringcolor}{rgb}{0.20,0.50,0.20}
\definecolor{commentcolor}{rgb}{0.40,0.40,0.40}
\definecolor{keywordcolor}{rgb}{0.50,0.10,0.10}
\definecolor{idcolor}{rgb}{0.10,0.10,0.50}
\definecolor{bgcolor}{rgb}{0.97,0.97,0.97}
\definecolor{rulecolor}{rgb}{0.8,0.8,0.8}
\lstset{language=bash,
breaklines=true
}
\lstset{language=c++,
basicstyle={\small\ttfamily},
ndkeywordstyle={\small},
keywordstyle={\small\color{keywordcolor}},
commentstyle={\small\color{commentcolor}\itshape},
stringstyle={\small\color{stringcolor}},
identifierstyle={\small\color{idcolor}},
xleftmargin=2em,
xrightmargin=2em,
framerule=0.8pt,
frame=tlrb,
showstringspaces=false,
tabsize=2,
backgroundcolor=\color{bgcolor},
rulecolor=\color{rulecolor},
classoffset=1,
morekeywords={Double_t,Int_t,Char_t,Short_t,Long_t,Float_t,ULong_t,UInt_t,UShort_t,UChar_t},
classoffset=0
}
\def\lstlistingname{コード}
\setlength{\textwidth}{\fullwidth}
\setlength{\evensidemargin}{\oddsidemargin}
\usepackage[abs]{overpic}
\newcounter{appendix}
\usepackage[nooneline]{subfigure}
\subfiguretopcaptrue
% Apple key symbols
% https://herbs.github.io
\DeclareRobustCommand{\cmdkey}{\raisebox{-.035em}{\includegraphics[height=.75em]{fig/applekeys/command}}}
\DeclareRobustCommand{\optkey}{\raisebox{-.005em}{\includegraphics[height=.65em]{fig/applekeys/option}}}
\DeclareRobustCommand{\shiftkey}{\raisebox{-.04em}{\includegraphics[height=.83em]{fig/applekeys/shift}}}
\DeclareRobustCommand{\ctlkey}{\raisebox{.27em}{\includegraphics[height=.45em]{fig/applekeys/control}}}
\DeclareRobustCommand{\delkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{fig/applekeys/delete}}}
\DeclareRobustCommand{\applekey}{\raisebox{-0.01em}{\includegraphics[height=.90em]{fig/applekeys/apple}}}
\DeclareRobustCommand{\openapplekey}{\raisebox{-0.01em}{\includegraphics[height=.90em]{fig/applekeys/apple_outline}}}
\DeclareRobustCommand{\capslockkey}{\raisebox{-0.02em}{\includegraphics[height=.88em]{fig/applekeys/capslock}}}
\DeclareRobustCommand{\ejectkey}{\raisebox{0.01em}{\includegraphics[height=.7em]{fig/applekeys/eject}}}
\DeclareRobustCommand{\pencilkey}{\raisebox{-0.01em}{\includegraphics[height=.8em]{fig/applekeys/pencil}}}
\DeclareRobustCommand{\esckey}{\raisebox{-0.03em}{\includegraphics[height=.75em]{fig/applekeys/escape}}}
\DeclareRobustCommand{\tabkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{fig/applekeys/tab}}}
\DeclareRobustCommand{\revtabkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{fig/applekeys/revtab}}}
\DeclareRobustCommand{\returnkey}{\raisebox{-0.06em}{\includegraphics[height=.65em]{fig/applekeys/return}}}
\DeclareRobustCommand{\revreturnkey}{\raisebox{-0.06em}{\includegraphics[height=.65em]{fig/applekeys/revreturn}}}
\DeclareRobustCommand{\powerkey}{\raisebox{-0.04em}{\includegraphics[height=.83em]{fig/applekeys/power}}}
\newcommand{\emphasize}[1]{\textsf{\textbf{#1}}}
\newcommand{\cmd}{\UTF{2318}}
\renewcommand{\prechaptername}{} % Do not print ``第''
\renewcommand{\postchaptername}{} % Do not print ``章''
\renewcommand{\labelitemi}{$\circ$}
% external link symbol
% https://tex.stackexchange.com/questions/99316/symbol-for-external-links
\usepackage{tikz}
\newcommand{\ExternalLink}{%
\tikz[x=1.2ex, y=1.2ex, baseline=-0.05ex]{%
\begin{scope}[x=1ex, y=1ex]
\clip (-0.1,-0.1)
--++ (-0, 1.2)
--++ (0.6, 0)
--++ (0, -0.6)
--++ (0.6, 0)
--++ (0, -1);
\path[draw,
line width = 0.5,
rounded corners=0.5]
(0,0) rectangle (1,1);
\end{scope}
\path[draw, line width = 0.5] (0.5, 0.5)
-- (1, 1);
\path[draw, line width = 0.5] (0.6, 1)
-- (1, 1) -- (1, 0.6);
}
}
\newcommand{\myhref}[2]{\href{#1}{#2 \ExternalLink}}
\makeatletter
% Do not print ``\n'' before a chapter title
\def\@makechapterhead#1{
\vspace*{2\Cvs}
{\parindent \z@ \raggedright \normalfont
\Huge\headfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\@chapapp\thechapter\@chappos
\hskip1zw
\fi
\fi
#1\par\nobreak
\vskip 3\Cvs}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{NoFloat}{}
% Do not put figures inside source code
% by latexcat
% http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=373
\def\@listoflistenv{[NoFloat][listings][lstlisting]}
\newif\if@expire@floats \@expire@floatsfalse
\def\begin#1{%
\@ifundefined{#1}%
{\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
{\def\reserved@a{\def\@currenvir{#1}%
\edef\@currenvline{\on@line}%
\@check@listenv
\csname #1\endcsname}}%
\@ignorefalse
\begingroup\@endpefalse\reserved@a}
\def\@check@listenv{%
\@expandtwoargs\in@{[\@currenvir]}{\@listoflistenv}%
\ifin@ \@expire@floatstrue \fi}
\def\@tryfcolumn#1{%
\global\@fcolmadefalse
\ifnum\outputpenalty<-\@M \@expire@floatsfalse \fi%%% The case of \clearpage etc.
\if@expire@floats\else
\ifx#1\@empty\else
\xdef\@trylist{#1}%
\global\let\@failedlist\@empty
\begingroup
\let\@elt\@xtryfc \@trylist
\endgroup
\if@fcolmade \@vtryfc #1\fi
\fi
\fi}
\def\@floatplacement{%
\if@expire@floats \global\@topnum\z@
\else \global\@topnum\c@topnumber
\fi
% Textpage bit, global:
\global\@toproom \topfraction\@colht
\global\@botnum \c@bottomnumber
\global\@botroom \bottomfraction\@colht
\global\@colnum \c@totalnumber
% Floatpage bit, local:
\@fpmin \floatpagefraction\@colht}
\def\@dblfloatplacement{%
\if@expire@floats \global\@dbltopnum\z@
\else \global\@dbltopnum\c@dbltopnumber
\fi
\global \@dbltoproom \dbltopfraction\@colht
\@textmin \@colht
\advance \@textmin -\@dbltoproom
\@fpmin \dblfloatpagefraction\textheight
\@fptop \@dblfptop
\@fpsep \@dblfpsep
\@fpbot \@dblfpbot}
\def\@combinefloats{%
\def\@combinefloats@next{\@@combinefloats}%
\ifx\@botlist\@empty\else
\if@expire@floats
\def\@combinefloats@next{\@conbinefloats@remove@bot@floats}%
\fi
\fi
\@combinefloats@next}
\def\@@combinefloats{%
\global\@do@outputtrue
\ifx\@toplist\@empty\else \@cflt \fi
\ifx\@botlist\@empty\else \@cflb \fi}
\newif\if@do@output
\global\@do@outputtrue
\def\@conbinefloats@remove@bot@floats{%
\begingroup
\dimen@\z@
\def\@elt##1{%
\advance\dimen@\ht##1\relax
\advance\dimen@\floatsep}%
\@botlist
\advance\dimen@\textfloatsep \advance\dimen@-\floatsep
\edef\@tempa{\dimen@=\the\dimen@\relax}%
\expandafter\endgroup\@tempa
\global\advance\@colroom\dimen@
\global\advance\vsize\dimen@
\global\@topnum\z@ \global\@botnum\z@ \global\@colnum\z@
\begingroup
\let\@elt\relax
\xdef\@deferlist{\@botlist\@deferlist}%
\endgroup
\global\let\@botlist\@empty
\global\@do@outputfalse}
\gdef\@makecol{%
\setbox\@outputbox\box\@cclv%
\xdef\@freelist{\@freelist\@midlist}%
\global\let\@midlist\@empty
\@combinefloats
\if@do@output
\ifvbox\@kludgeins
\@makespecialcolbox
\else
\setbox\@outputbox \vbox to\@colht {%
\@texttop
\dimen@ \dp\@outputbox
\unvbox \@outputbox
\iftdir\hskip\z@
\else\vskip -\dimen@\fi
\@textbottom
\ifvoid\footins\else % for pLaTeX
\vskip \skip\footins
\color@begingroup
\normalcolor
\footnoterule
\unvbox \footins
\color@endgroup
\fi
}%
\fi
\else
\unvbox\@outputbox
\@reinserts
\fi
\global\maxdepth\@maxdepth}
\def\@opcol{%
\if@do@output
\if@twocolumn \@outputdblcol \else \@outputpage \fi
\global\@mparbottom\z@ \global\@textfloatsheight\z@
\@floatplacement
\else
\global\@do@outputtrue
\def\@startcolumn{\let\@startcolumn\@@startcolumn}%
\fi}
\let\@@startcolumn\@startcolumn
\makeatother
\title{{\huge 高エネルギー宇宙物理学のためのROOT入門\\ROOT for High-Energy Astrophysics}}
\author{{\Large 奥村 曉} \\ 名古屋大学 宇宙地球環境研究所 \\ oxon@mac.com}
\begin{document}
\maketitle
\frontmatter
\section*{本書の入手方法について}
この入門書は GitHub\footnote{\url{https://github.com/}} 上で公開されています。作成に用いた\LaTeX コード、図、また\texttt{C++}のコードなどは、すべて\url{https://github.com/akira-okumura/RHEA}から入手可能です。
また、PDF として生成済みのものは\url{https://github.com/akira-okumura/RHEA/releases}で公開されています。必ずしも Git レポジトリの最新版とは対応していませんので、最新版は以下のコマンドを実行することで生成してください。\texttt{git clone}と\texttt{make}を実行すると、\texttt{RHEA.pdf}が作られます。\texttt{make}コマンド実行中に\texttt{platex}コマンドを使用しますので、日本語\LaTeX 環境を用意してください(付録~\ref{chap:package}と\ref{chap:LaTeX}を参照)。
\begin{lstlisting}[language=bash]
$ git clone https://github.com/akira-okumura/RHEA.git
$ cd RHEA
$ ls
Makefile RHEA.bib RHEA.tex misc tex
README.md RHEA.bst fig src
$ make
$ ls
Makefile RHEA.bbl RHEA.bst RHEA.out RHEA.toc src
README.md RHEA.bib RHEA.dvi RHEA.pdf fig tex
RHEA.aux RHEA.blg RHEA.log RHEA.tex misc
$ open RHEA.pdf # macOS の場合
$ xdg-open RHEA.pdf # Linux の場合
\end{lstlisting}
\section*{本書の再配布について}
PDFでの再配布を禁止します。これは以下の理由のためです。
\begin{itemize}
\item[$\circ$]最新版でない PDF の流布を避け、ROOT などに関する情報をなるべく新しいもので伝えるため
\item[$\circ$]読者に\texttt{git}や\texttt{make}コマンドに慣れてもらうため
\item[$\circ$]注意書きや著作権表記などの変更が生じうるため
\end{itemize}
\section*{本書の著作権について}
奥村曉が著作権を保持します。GitHub 上で\LaTeX コード等を公開していますが、これは著作権の放棄を意味しません。GitHub 上でのレポジトリの複製・改変は自由ですが、改変したもののGitHub以外での再配布や、改変した内容で生成したPDFの再配布を禁止します。
\section*{間違いの指摘や改善の要望}
多くの間違いや説明の足りない箇所が本書には含まれていると思います。その場合、ぜひ GitHub から issue report\footnote{\url{https://github.com/akira-okumura/RHEA/issues}} を作成するか、同じく GitHub で pull request を出すか、もしくはメールなどでご連絡いただけると助かります。
\begin{flushright}
©2009--2021 Akira Okumura All Rights Reserved
\end{flushright}
\pagebreak
\section*{著者について}
{\large 奥村 曉(名古屋大学 宇宙地球環境研究所 講師)}
\begin{description}
\item[\quad1993年]中学 1 年生で初めての Mac(LC475)を購入し、HyperCard で遊び始める
\item[\quad2004年]ROOTの前身であるPAWの利用を開始
\item[\quad2005年]PAWの限界と時代遅れであることに気が付きROOTへ移行
\item[\quad2007年]ROOTを使った光線追跡ライブラリROBASTの開発を開始し、2010年に一般公開\footnote{\url{https://robast.github.io/}}
\item[\quad2009年]東京大学大学院理学系研究科物理学専攻で博士号取得
\item[\quad2012年]名古屋大学 太陽地球環境研究所 助教
\item[\quad2015年]名古屋大学 宇宙地球環境研究所 助教(改組による)
\item[\quad2018年]名古屋大学 宇宙地球環境研究所 講師
\end{description}
2020 年現在、Cherenkov Telescope Array の小口径望遠鏡の開発で、焦点面カメラのデータ収集・カメラ制御ソフトウェア開発責任者などを担当している。専門は宇宙線物理学、ガンマ線天文学、光学系設計。2016年から「宇宙素粒子若手の会」と連携し、「ROOT講習会」を開催している。
\begin{description}[labelwidth=2.cm]
\item[\quad 電子メール]\url{oxon@mac.com}
\item[\quad GitHub]\href{https://github.com/akira-okumura}{@akira-okumura}
\item[\quad blog]\url{http://oxon.hatenablog.com/}
\item[\quad Twitter]\href{https://twitter.com/AkiraOkumura}{AkiraOkumura}
\item[\quad Flickr]\href{https://www.flickr.com/photos/akiraokumura/}{akiraokumura}
\item[\quad 個人ページ]\url{https://www.isee.nagoya-u.ac.jp/~okumura/}
\item[\quad 宇宙線物理学研究室(CR研)]\url{https://www.isee.nagoya-u.ac.jp/CR/}
\end{description}
\tableofcontents
\mainmatter
\include{tex/Introduction}
\include{tex/Install}
\include{tex/C++}
\include{tex/C++inROOT}
\include{tex/Histogram}
\include{tex/Graph}
\include{tex/Tree}
\include{tex/Python}
\include{tex/Technique}
\include{tex/Statistics}
\include{tex/Appendix}
\bibliographystyle{RHEA}
\bibliography{RHEA}
\end{document}