Basic
last modified: 2023-12-13 by Kodai OkawaI would now like to introduce the actual analysis using the CRIB analysis server. There are two ways to enter the analysis server, directly or remotely via ssh. If you come to CRIB and operate the server directly, I think it is quicker to analyse using the server while asking the CRIB members directly as I think they are nearby.
1. SSH configuration
To enter the CRIB server, you need to enter the CNS network. To do this, you need to create an account on the CNS login server. Please contact Okawa (okawa@cns.s.u-tokyo.ac.jp) or the person responsible for CRIB (see here) and tell us that you want a login server account.
The CNS login server uses public key cryptography, so you need to send a shared key when you apply. This section describes how to create the key, especially on MacOS.
cd # move to /Users/yourname/ (home directory)
mkdir .ssh # if there is no .ssh directory
cd .ssh
ssh-keygen
You will be asked a number of interactive questions after this command, all of which are fine by default (Enter). Then you will see the pair of public-key and private-key.
ls
id_rsa id_rsa.pub
id_rsa
is the private-key, and id_rsa.pub
is the public-key.
The private key is important for security reasons and should be kept on your own computer.
Then, please send this public-key to the CNS member.
in MacOS, open .
command will open a finder for that directory, so it is easy to attach it to an email from here.
In the email,
- your fullname (affiliation)
- username
- attached public-key
are needed.
Next, let’s set up multi-stage ssh. As the login server is just a jump server, it is useful to be able to ssh to the CRIB analysis server at once! So create the following config file. The file placed in this directory is automatically read when you ssh.
cd ~/.ssh
vi config
1Host login
2 HostName CNS_loginserver_hostname
3 User username
4 IdentityFile ~/.ssh/id_rsa
5 ForWardX11Timeout 24h
6 ControlPersist 30m
7 ForwardAgent yes
8 ControlMaster auto
9 ControlPath ~/.ssh/mux-%r@%h:%p
10
11# any name is okay
12Host cribana
13 HostName analysisPC_hostname
14 User crib
15 IdentityFile ~/.ssh/id_rsa
16 ProxyCommand ssh login nc %h %p
17 ForwardAgent yes
18 ControlMaster auto
19 ControlPath ~/.ssh/mux-%r@%h:%p
20 ControlPersist 30m
You will be informed of the second and third lines above that we highlighted, so please change this parts. And ask the IP address of the CRIB analysis PC to the CRIB member, and change the 13 line.
Then you can enter the CRIB analysis PC just by
ssh cribana
CRIB member will tell you the passward!
For the VNC server (local forwarding), please see this section.
2. your artemis configuration
When you enter the CRIB computer, please check this is zsh
shell.
> echo $SHELL
/usr/local/bin/zsh
Currently, zsh installed locally is used. It is planned to update the OS in the future, after which it will differ from this path in the future.
If it is not zsh
(like bash), please command
> zsh
Then you can start to configure by
> artlogin yourname
# input your information...
> mkdir build
> cd build
> cmake ..
> make -j4
> make install
> acd
For the detail, please check here.
3. basic usage
- start artemis
> acd # move to your artemis work directory
> a # start artemis!
> a macro/macro.C # run macro script
- important command in the artemis console
# read steering file
artemis [*] add steering/hoge.yaml NAME=hoge NUM=0000
# start event loop
artemis [*] res
artemis [*] start # defined in CRIB artemis
# stop event loop
artemis [*] sus
artemis [*] stop # defined in CRIB artemis
# help
artemis [*] help
# quit from artemis
artemis [*] .q
- commands for checking histograms
# check and move the directory
artemis [*] ls
artemis [*] cd 0 # cd ID
# move to home directory in artemis
artemis [*] cd # cd .. will work?
# draw the histograms
artemis [*] ht 0 colz # ht ID option
artemis [*] hn colz # draw the next histogram object
artemis [*] hb colz # draw the previous histogram object
# divide the canvas
artemis [*] zone 2 2 # 2 x 2 canvas
# save and print the canvas
artemis [*] sa
artemis [*] pri
- analize using TTree
# check the files
artemis [*] fls
# move to the created ROOT file
artemis [*] fcd 0 # fcd fileID
# check the all branches
artemis [*] br
# check the data members or methods
artemis [*] br branchname # ex. artemis [1] br ppaca
# the name of TTree object is "tree" (actually TArtTree object)
artemis [*] tree->Draw("ppaca.fY:ppaca.fX>>ppaca(100,-20.,20., 100,-20.,20.)","","colz")
See here for an example using random numbers.