Solid cherenkov readout

From Hall A Wiki
Revision as of 15:31, 18 September 2020 by Zwzhao (Talk | contribs) (coda data analysis)

Jump to: navigation, search


MAPMT test with laser, maroc pixel by PC and sum by fadc, at CLAS12 laser test stand



MAPMT test with LED, both maroc pixel and sum by fadc

crate 1 has fadc in slot 3 and ssp in slot 15

15 pmts and 5 fibers 0 - 4

coda data taking

both solid@tunl11 and daq@sbsvme22 use ~/.tcshrc for coda env setup coda config is at daq@sbsvme22:git/rol

to start coda, at solid@tunl11
> vncserver (start vnc)
> vncviewer localhost :1 &  (login with same password of solid user)
inside vnc
> kcoda
> startCoda

If the crate is down, the xterms should have remained up while the crates were down If they are closed, just start them up again. If you think the ROCs need restarted: "restartStuff"

The xterms for the ROCS and PEB should remain up until you kcoda. refer to

when coda running, the processes below are present

[daq@sbsvme22 ~]$ ps -ef | grep coda
daq       5911  5893  0 12:40 pts/0    00:00:00 /bin/bash /home/daq/coda_scripts/ ROC1
daq       5913  5911 99 12:40 pts/0    01:13:25 coda_roc -i -v -name ROC1 -session solidhgc
[solid@tunl11 ~]$ ps -ef | grep coda
solid     8423  8390  0 12:45 pts/17   00:00:00 /bin/bash /home/solid/coda_scripts/
solid     8428  8423  0 12:45 pts/17   00:00:00 /bin/csh -f /home/solid/coda3/3.10/Linux-x86_64/bin/coda_emu_peb PEB1
solid     8430  8428  1 12:45 pts/17   00:00:44 /home/solid/jdk1.8.0_152/bin/java -cp /home/solid/coda3/3.10/common/jar/* -XX:+PerfDisableSharedMem -XX:+UseG1GC -Djava.library.path=/home/solid/coda3/3.10/Linux-x86_64/lib -DcmsgUDL=rc://multicast/solidhgc -Dname=PEB1 -Dtype=PEB org.jlab.coda.emu.EmuFactory
solid    19258  3339  0 13:51 pts/2    00:00:00 grep --color=auto coda
solid    31228 31221  0 12:06 pts/14   00:00:00 /bin/csh -f /home/solid/coda3/3.10/Linux-x86_64/bin/platform
solid    31231 31228  2 12:06 pts/14   00:02:50 /home/solid/jdk1.8.0_152/bin/java -Xms200m -Xmx2048m -XX:-UseConcMarkSweepGC org.jlab.coda.afecs.platform.APlatform
solid    31291     1  0 12:06 pts/15   00:00:00 /bin/csh -f /home/solid/coda3/3.10/Linux-x86_64/bin/rcgui
solid    31296 31291 44 12:06 pts/15   00:47:26 /home/solid/jdk1.8.0_152/bin/java -Xms200m -Xmx500m -Dprism.order=sw -Dsun.java2d.pmoffscreen=false org.jlab.coda.afecs.ui.rcgui.RcGuiApplication
solid    31315 31297  0 12:06 pts/12   00:00:00 /bin/bash /home/solid/coda_scripts/remote_vme tunl11 nobody
solid    31328 31310  0 12:06 pts/16   00:00:00 /bin/bash /home/solid/coda_scripts/remote_vme sbsvme22 nobody ROC1

coda data analysis



in evio, fadc tag=3, ssp tag=18
maroc sum has sum signal of fadc value as it is, but quad fadc signal needs 4095-fadc, this is like MAPMT simple sum readout

coda output location tunl11:/home/solid/data

evio on ifarm /work/halla/solid/cc_pro/benchtest/coda/data

evio on ifarm /work/halla/solid/cc_pro/benchtest/coda/root

plot on web

how to use decoder and do fadc analysis

cd /work/halla/solid/cc_pro/fadc_decoder-revamp_latest
source /work/hallb/prad/apps/set_env_CUE_modern.csh
source env/setup_env.csh
build/src/analyze -m database/modules/mapmt_maroc_bench_20200903.json ../benchtest/coda/data/solidhgc_73.evio.0 ../benchtest/coda/root/solidhgc_73.root

cd /work/halla/solid/cc_pro/fadc_decoder-revamp
source /work/hallb/prad/apps/set_env_CUE_modern.csh
source env/setup_env.csh
build/src/analyze --config-module="config/mapmt_maroc_bench_20200903.conf" -c 1 ../benchtest/coda/data/solidhgc_73.evio.0 ../benchtest/coda/root/solidhgc_73.root

make raw fadc plot
python scripts/ ../benchtest/root/solidhgc_73.root MAPMT_SUMS -o plots/run73 -e 100,200
python scripts/ ../benchtest/root/solidhgc_73.root MAPMT_QUADS -o plots/run73 -e 100,200

cd /work/halla/solid/cc_pro/
git clone fadc_decoder-revamp_latest
cd fadc_decoder-revamp_latest
git checkout revamp
source /work/hallb/prad/apps/set_env_CUE_modern.csh
source env/setup_env.csh
mkdir build && cd build
cmake ..
make -j8


cp -rpv /w/hallb-scifs17exp/general/prad/jz/hgc/decoder/fadc_decoder /work/halla/solid/cc_pro
cd fadc_decoder 
source /work/hallb/prad/apps/set_env_CUE_modern.csh
source env/setup_env.csh
rm -rf build
mkdir build && cd build
cmake ..
make -j4
build/src/analyze ../test_esb/data/solidhgc_67.evio.0 ../test_esb/root/solidhgc_67.root

source /work/hallb/prad/apps/set_env_CUE_modern.csh
git clone
cd fadc_decoder/
git checkout revamp
mkdir build && cd build
cmake ..
cd ..
./build/ssp/ssp_analyze /w/hallb-scifs17exp/general/prad/jz/fadc_decoder-master/solidhgc_50.evio.0 solidhgc_50.root

maroc analysis

root -b -q 'mRICH_reco.C("/w/halla-scifs17exp/solid/cc_pro/fadc_decoder/solidhgc_67.root" )'

scaler data taking and analysis

desktop tunl11, user solid
crate sbsvme22, user root
ask password from Zhiwen or Alex

=== maroc coda  ======================================


=== run maroc scaler test  ====================
refer to

** take scalar data at sbsvme22 ********************
ssh root@sbsvme22

#check if three dir is mounted from tunl11
ps -ef |grep sshfs
#mount them if needed, for example, after either sbsvme22 or tunl11 reboot

#set env
source /usr/clas12/release/1.4.0/setup
setenv RICH_SUITE /home/clasrun/rich/suite1.0

cd $RICH_SUITE/sw/daq

#check connection, this will turn on green lights on ssp board for each connected fiber
ssptest_ConfigureAll 230 64 0  
(it will create setup.txt in its running dir)

#to check light leak, turn HV on at -1kV, then run
./ 300 64 | grep -A15 Counting
(the resulting rate per pixel should be 100-200Hz at used threshold 300 when there is no lightleak)

# scan with constant gain
ssptest_ConfigureAll 230 64 0
./ 170 220 64  #ped scan
./ 150 650 64  #dark scan

# scan with gain map at $RICH_SUITE/maps/gain.txt
ssptest_ConfigureAll 230 0 0
./ 170 220 0  #ped scan
./ 150 650 0  #dark scan

edit to change scan step size if needed

#change and compile code
cd /usr/clas12/release/1.4.0/coda/src/rol
edit /usr/clas12/release/1.4.0/coda/src/rol/main/ssptest_ConfigureAll.c
edit /usr/clas12/release/1.4.0/coda/src/rol/main/ssptest_ScalarAll.c
(put all other source code in dir tmp, otherwise they will be recompiled also)
make -j4
make install

** analyze data at tunl11 ********************
source /apps/root/5.34.36/setroot_CUE.csh
setenv RICH_SUITE /home/clasrun/rich/suite1.0

cd $RICH_SUITE/sw/ana/ped
./ ../../../data/ped/rich_pedestal_20200814_140522.txt 0
./ ../../../data/ped/rich_pedestal_20200814_191511.txt 1

see results at $RICH_SUITE/results/scalers

clas12 rich result example

=== setup clas12 coda at desktop tunl11 and vxs crate sbsvme22==========================

make a copy of clas12 coda code at tunl11
then mount this copy from tunl11 onto sbsvme22 using sshfs, because sbsvme22 has very limit disk size

** at tunl11 as user solid **********

at clasrun@clondaq6
tar zcfv clas12_1.4.0_coda.tgz /usr/clas12/release/1.4.0/coda
tar zcfv clas12_1.4.0_clon.tgz /usr/clas12/release/1.4.0/clon
tar zcfv clas12_1.4.0_parms.tgz /usr/clas12/release/1.4.0/parms
scp to tunl11 and extract at /usr/clas12/release/1.4.0/

at clasrun@clondaq6
tar zcfv activemq.tgz /usr/local/activemq
scp to tunl11 and extract at /usr/local/activemq

at clasrun@clondaq6
tar zcfv gcc_8.3.0.tgz /apps/gcc/8.3.0
scp to tunl11 and extract at /home/clasrun/apps/gcc/8.3.0

at clasrun@clondaq6
scp /usr/clas12/release/1.4.0/.setup solid@tunl11:/usr/clas12/release/1.4.0/
cp .setup setup
edit "setup" to have new gcc and root location

at clasrun@rich4
tar zcfv rich_1.0.tgz --exclude='results/*' rich/suite1.0
scp to tunl11 and extract at /home/clasrun/rich/suite1.0

** at sbsvme22 as user root  **************************

/home/mysshfs #mount file from tunl11 like the following
sshfs   solid@tunl11:/usr/clas12/release/1.4.0 /usr/clas12/release/1.4.0
sshfs   solid@tunl11:/usr/local/activemq /usr/local/activemq
sshfs   solid@tunl11:/home/clasrun /home/clasrun

To match latest activemq 3.9.5
donwload and install the following from

cd /usr/clas12/release/1.4.0/coda/src
edit /usr/clas12/release/1.4.0/coda/src/Makefile.include to use this gcc
   ifeq ("$(OSTYPE_PLATFORM)","Linux_i686")
    CC = /home/clasrun/apps/gcc/8.3.0/bin/gcc
    CXX = /home/clasrun/apps/gcc/8.3.0/bin/g++ 
     SHLD = $(CXX) -shared -g

note in general

LED275W anode should connect to coaxil cable core, cathod should connect to coaxil cable skin
This way it can driven by a postive charge

function generator controllering LED is set with 1kHz 5ns width positive pulse at output1
If the light at output1 is off, turn it on by press "shift",then "utput1"

OM4 optical cables from has 12 ends
The pairing are L-R or Yellow-White: 1-12,2-11,3-10,4-9, while 4 others are unused.
Other company may do it differently

To control the Lecroy HV power supply
swtich its power on at back of crate, turn the turn key at front of crate to position "remote" and 
wait for display "remote" stable
connect it to USB port at the back of tunl11 using the blue network to USB converter
check if /dev/ttyUSB0 show up
run "minicom" as root, then type return, type 1450, type vt100
see help manual on right side, set target V and enable channel by "[", power on by "{"
or use "h" for help and "q" to quit help
keysight E336313A LV power supply
4.5-5.5V and 0.9A need for each board
840mA is typically once they fully boot and run, but you definitely want a bit of margin otherwise it can trip during startup and be in an endless startup oscillation

ssp runs with 125Mhz clock at right side of vxs crate, fadc run at 250Mhz at left side of crate

To check ticard, run "tiint" at sbsvme22

== other info  ==

=== ssp decoding info ===

For the SoLID Cerenkov test in HallC, maroc electronics will be read out
by ssp which can be recorded by coda into evio file

For GEM in HallA/C, it will be readout by ssp also

If we use analyzer to read evio, we would need to make it read ssp bank.

Then interpret its content of maroc or GEM separately.

general info
* clas12 rich wiki
* clas12 rich NIM paper;O=D
* gluex dirc


* c++ example from Danning Di
** code to read evio file for GEM detector
** sample evio file 

* example from hall D
** C++ code in DANA/JANA to read the SSP data from evio file for DIRC detector
** sample evio file /work/halla/solid/cc_pro/hd_rawdata_071507_012.DIRC-LED.evio
** ssp data bank structure for DIRC [[File:DIRC_SSPDataFormat.pdf]]

* example from clas12
** java code to read ssp data bank from evio file for RICH detector and covert to hipo file
** java reconstruction code in coatjava/CLARA to analyze ssp data bank in hipo file
** calibration 
*** manual
*** code 
*** hipo4 needed
*** test hipo4 file /cache/clas12/rg-b/production/recon/pass0/v21.8.1/mon/recon/

* example from mRICH of EIC
** /work/halla/solid/cc_pro/maroc_mirazita