Difference between revisions of "Software"
(23 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Getting the analysis software= | =Getting the analysis software= | ||
== Minimal CLAS software for EG1 analysis== | == Minimal CLAS software for EG1 analysis== | ||
+ | === download BOS file utilities from the CLAS/packages CVS repositroy=== | ||
download files from the JLAB CVS repository using the command | download files from the JLAB CVS repository using the command | ||
type the command below in order to tell CVS to use ssh | type the command below in order to tell CVS to use ssh | ||
setenv CVS_RSH ssh | setenv CVS_RSH ssh | ||
+ | |||
if you have an account on the JLAB computers you can do | if you have an account on the JLAB computers you can do | ||
− | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages | + | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/fpack |
where USERNAME is your JLab username | where USERNAME is your JLab username | ||
− | + | The above will download packages from JLAB's CVS repository<br> | |
− | |||
− | I only | + | I only needed the following subdirectories under the "packages" subdirectory to compile the EG1 reader code.<br> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/fpack | |
+ | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/cms | ||
+ | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/Makefile | ||
+ | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/bosio | ||
+ | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/include | ||
+ | |||
+ | unless the environmental variable OS_NAME is set the Makefile will default to Linux. | ||
+ | |||
+ | Then "cd" to the "packages" subdirectory and type "make" | ||
+ | |||
+ | If you get the error | ||
+ | |||
+ | cc1: error: unrecognized command line option "-fwritable-strings" | ||
+ | |||
+ | then you need to remove this depreceated switch from the file<br> | ||
+ | |||
+ | flags.Linux.mk<br> | ||
+ | |||
+ | near line 45 in the above file change <br> | ||
+ | |||
+ | CFLAGS += $(CLEVEL) -fwritable-strings <br> | ||
+ | to<br> | ||
+ | CFLAGS += $(CLEVEL) | ||
+ | |||
+ | Re-type "make" within the "packages subdirectory if you got the above error. | ||
+ | |||
+ | otherwise look in the lib subdirectory and see if you have make the fpack library | ||
+ | |||
+ | packages >ls ../lib/Linux/ | ||
+ | bosiodiff.o bosiodump.o bosioserver.o bosiosubjob.o libbosio.a libfpack.a | ||
+ | |||
+ | === Download the EG1 dsts library=== | ||
+ | now checkout the EG1 dst library after moving up a subdirectory back to the "CLAS" subdirectory. | ||
+ | |||
+ | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co eg1_dst/dstlib | ||
+ | |||
+ | |||
+ | Before you can compile the EG1 software using "make" set environmental variable telling the makefile where to look for the Makefile scripts | ||
setenv CLAS_CMS /home/tforest/src/CLAS/packages/cms | setenv CLAS_CMS /home/tforest/src/CLAS/packages/cms | ||
− | + | An also tell the dst make file where to put the libraries it is going to built | |
+ | |||
+ | setenv TOP_DIR /home/tforest/src/CLAS | ||
+ | |||
+ | Now go to the dstlib subdirectory | ||
+ | |||
+ | cd eg1_dst/dstlib | ||
+ | |||
+ | and type | ||
+ | |||
+ | make lib | ||
+ | |||
+ | you should see the dst library in the CLAS/lib subdirectory | ||
+ | dstlib >ls ../../lib/Linux/ | ||
+ | bosiodiff.o bosioserver.o dst_read.o libdstlib.a | ||
+ | bosiodump.o bosiosubjob.o libbosio.a libfpack.a | ||
+ | dstlib > | ||
+ | |||
+ | === Compile the dstdump utility === | ||
+ | |||
+ | now lets compile a program to read the contents of an EG1 dst file called dstdump | ||
+ | |||
+ | return to the CLAS subdirectory | ||
+ | |||
+ | cd ../../ | ||
+ | |||
+ | checkout dtsdump | ||
+ | |||
+ | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co eg1_dst/dstdump | ||
+ | |||
+ | you will also need header include files from packages/bosio to compile dstdump | ||
+ | |||
+ | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/bosio | ||
+ | cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/include | ||
+ | |||
+ | You will need to tell the Makefile where to look for the bosio headers by setting the environmental below | ||
+ | |||
+ | setenv CLAS_PACK /home/tforest/src/CLAS/packages | ||
+ | |||
+ | go the dstdump subdirectory and compile dstdump by typing "make" | ||
+ | |||
+ | cd eg1_dst/dstdump/ | ||
+ | |||
+ | if you get teh erro message | ||
+ | |||
+ | /usr/bin/ld: cannot find -ldstlib | ||
+ | |||
+ | Then you need to edit the Makefile in eg1_dst/dstdump so the line | ||
+ | |||
+ | DSTLIB = -L$(CLAS_LIB) -L$(TOP_DIR)/lib/LinuxRH7 -ldstlib | ||
+ | |||
+ | points to the CLAS/lib/Linux subdirectory or whatever OS name you are using inder CLAS/lib | ||
+ | I changed mine to | ||
+ | |||
+ | DSTLIB = -L$(CLAS_LIB) -L$(TOP_DIR)/lib/Linux -ldstlib | ||
+ | |||
+ | and set the CLAS_LIB environemental variable | ||
+ | |||
+ | setenv CLAS_LIB /home/tforest/src/CLAS/lib/Linux | ||
+ | |||
+ | now when you type "make" under the subdirectory eg1_dst/dstdump you should get and executable | ||
+ | |||
+ | |||
+ | |||
+ | I got the following file from JLAB | ||
− | + | /cache/mss/clas/eg1b/production/pass1/v1/4p2gev/misc/dst/dst28509_00.B00 | |
+ | |||
+ | then I ran dstdump with a switch to dump out events | ||
− | + | dstdump >dstdump -dump 5 ~/dst28509_00.B00 -dump 15 | less | |
− | == EG1 DST | + | == EG1 DST Histogramer HistDST== |
The EG1 dsts reader is used to uncompress the EG1 DST data files for | The EG1 dsts reader is used to uncompress the EG1 DST data files for | ||
analysis. The DST library has at least 3 version now so you must use the correct | analysis. The DST library has at least 3 version now so you must use the correct | ||
− | DST library with your data file. | + | DST library with your data file. |
+ | |||
+ | The source code for HistDST can be checked out from cvs with the following command | ||
+ | cvs -td :ext:tforest@cvs.jlab.org:/group/clas/clas_cvs co eg1_dst/HistDST | ||
+ | |||
+ | You will need to install the c_bos_io package so "cd" to the CLAS subdirectory and do | ||
+ | |||
+ | cvs -td :ext:tforest@cvs.jlab.org:/group/clas/clas_cvs co packages/c_bos_io | ||
+ | |||
+ | then "cd" to the packages subdirectory and type "make" | ||
+ | |||
+ | go to the eg1/HistDST subdirectory | ||
+ | |||
+ | you need to set environmental variables so you can load the CERN libraris | ||
+ | |||
+ | setenv CERN_ROOT /home/tforest/src/CLAS/eg1_dst/HistDST | ||
+ | setenv LD_LIBRARY_PATH $ROOTSYS/lib | ||
== UNIX software == | == UNIX software == | ||
Line 58: | Line 159: | ||
=Getting Data files from JLAB= | =Getting Data files from JLAB= | ||
== downloading to offsite place== | == downloading to offsite place== | ||
+ | |||
+ | scp tforest@ftp.jlab.org:/cache/mss/clas/eg1b/production/pass1/v1/4p2gev/misc/dst/dst28181_03.B00 ~/data/ | ||
+ | |||
==running on JLAB farm== | ==running on JLAB farm== | ||
+ | |||
=Contents of EG1 DST files= | =Contents of EG1 DST files= | ||
Line 160: | Line 265: | ||
|sc_cz||DCPB.SCdir_cos[2]||direction in Z | |sc_cz||DCPB.SCdir_cos[2]||direction in Z | ||
|} | |} | ||
+ | |||
+ | =ROOT color pallete= | ||
+ | const Int_t colNum = 6 ; | ||
+ | Int_t palette[colNum] ; | ||
+ | for(Int_t i=0;i<colNum;i++) palette[i]=colNum-i+1; | ||
+ | gStyle->SetPalette(colNum,palette); | ||
+ | Q2vsNu->SetContour(colNum); | ||
+ | Q2vsNu->Draw("colz"); | ||
+ | Q2vsNu->Draw("col"); | ||
+ | |||
+ | |||
+ | # set ROOTSYS to the `root' directory: | ||
+ | |||
+ | sh family: | ||
+ | export ROOTSYS=<path>/root<br> | ||
+ | csh family: | ||
+ | setenv ROOTSYS <path>/root | ||
+ | |||
+ | # now type the build commands: all shells: | ||
+ | |||
+ | ./configure --help | ||
+ | ./configure [<arch>] [set arch appropriately if not default] | ||
+ | (g)make [or, make -j2 for dual CPU machines] | ||
+ | |||
+ | # add $ROOTSYS/bin to PATH and $ROOTSYS/lib to LD_LIBRARY_PATH:<br> | ||
+ | |||
+ | sh family:<br> | ||
+ | export PATH=$ROOTSYS/bin:$PATH | ||
+ | export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH | ||
+ | export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH (MacOS X only) | ||
+ | csh family:<br> | ||
+ | setenv PATH ${ROOTSYS}/bin:${PATH} | ||
+ | setenv LD_LIBRARY_PATH ${ROOTSYS}/lib:${LD_LIBRARY_PATH} | ||
+ | setenv DYLD_LIBRARY_PATH ${ROOTSYS}/lib:${DYLD_LIBRARY_PATH} (MacOS X only) | ||
+ | rehash | ||
+ | |||
+ | # try running root: all shells:<br> | ||
+ | |||
+ | root | ||
+ | [http://root.cern.ch/twiki/bin/view/ROOT/Installation#Getting_Ready_to_Build Reference] | ||
=FAQ= | =FAQ= | ||
Line 174: | Line 319: | ||
to be | to be | ||
− | + | CFLAGS += $(CLEVEL) -mcpu=pentium | |
we also needed to copy the file <br> | we also needed to copy the file <br> | ||
− | link.LinuxRH.mk to link.Ubuntu.mk | + | link.LinuxRH.mk to link.Ubuntu.mk |
Latest revision as of 14:55, 31 August 2008
Getting the analysis software
Minimal CLAS software for EG1 analysis
download BOS file utilities from the CLAS/packages CVS repositroy
download files from the JLAB CVS repository using the command
type the command below in order to tell CVS to use ssh
setenv CVS_RSH ssh
if you have an account on the JLAB computers you can do
cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/fpack
where USERNAME is your JLab username
The above will download packages from JLAB's CVS repository
I only needed the following subdirectories under the "packages" subdirectory to compile the EG1 reader code.
cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/fpack cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/cms cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/Makefile cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/bosio cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/include
unless the environmental variable OS_NAME is set the Makefile will default to Linux.
Then "cd" to the "packages" subdirectory and type "make"
If you get the error
cc1: error: unrecognized command line option "-fwritable-strings"
then you need to remove this depreceated switch from the file
flags.Linux.mk
near line 45 in the above file change
CFLAGS += $(CLEVEL) -fwritable-strings
to
CFLAGS += $(CLEVEL)
Re-type "make" within the "packages subdirectory if you got the above error.
otherwise look in the lib subdirectory and see if you have make the fpack library
packages >ls ../lib/Linux/ bosiodiff.o bosiodump.o bosioserver.o bosiosubjob.o libbosio.a libfpack.a
Download the EG1 dsts library
now checkout the EG1 dst library after moving up a subdirectory back to the "CLAS" subdirectory.
cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co eg1_dst/dstlib
Before you can compile the EG1 software using "make" set environmental variable telling the makefile where to look for the Makefile scripts
setenv CLAS_CMS /home/tforest/src/CLAS/packages/cms
An also tell the dst make file where to put the libraries it is going to built
setenv TOP_DIR /home/tforest/src/CLAS
Now go to the dstlib subdirectory
cd eg1_dst/dstlib
and type
make lib
you should see the dst library in the CLAS/lib subdirectory dstlib >ls ../../lib/Linux/ bosiodiff.o bosioserver.o dst_read.o libdstlib.a bosiodump.o bosiosubjob.o libbosio.a libfpack.a dstlib >
Compile the dstdump utility
now lets compile a program to read the contents of an EG1 dst file called dstdump
return to the CLAS subdirectory
cd ../../
checkout dtsdump
cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co eg1_dst/dstdump
you will also need header include files from packages/bosio to compile dstdump
cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/bosio cvs -td :ext:USERNAME@cvs.jlab.org:/group/clas/clas_cvs co packages/include
You will need to tell the Makefile where to look for the bosio headers by setting the environmental below
setenv CLAS_PACK /home/tforest/src/CLAS/packages
go the dstdump subdirectory and compile dstdump by typing "make"
cd eg1_dst/dstdump/
if you get teh erro message
/usr/bin/ld: cannot find -ldstlib
Then you need to edit the Makefile in eg1_dst/dstdump so the line
DSTLIB = -L$(CLAS_LIB) -L$(TOP_DIR)/lib/LinuxRH7 -ldstlib
points to the CLAS/lib/Linux subdirectory or whatever OS name you are using inder CLAS/lib I changed mine to
DSTLIB = -L$(CLAS_LIB) -L$(TOP_DIR)/lib/Linux -ldstlib
and set the CLAS_LIB environemental variable
setenv CLAS_LIB /home/tforest/src/CLAS/lib/Linux
now when you type "make" under the subdirectory eg1_dst/dstdump you should get and executable
I got the following file from JLAB
/cache/mss/clas/eg1b/production/pass1/v1/4p2gev/misc/dst/dst28509_00.B00
then I ran dstdump with a switch to dump out events
dstdump >dstdump -dump 5 ~/dst28509_00.B00 -dump 15 | less
EG1 DST Histogramer HistDST
The EG1 dsts reader is used to uncompress the EG1 DST data files for analysis. The DST library has at least 3 version now so you must use the correct DST library with your data file.
The source code for HistDST can be checked out from cvs with the following command
cvs -td :ext:tforest@cvs.jlab.org:/group/clas/clas_cvs co eg1_dst/HistDST
You will need to install the c_bos_io package so "cd" to the CLAS subdirectory and do
cvs -td :ext:tforest@cvs.jlab.org:/group/clas/clas_cvs co packages/c_bos_io
then "cd" to the packages subdirectory and type "make"
go to the eg1/HistDST subdirectory
you need to set environmental variables so you can load the CERN libraris
setenv CERN_ROOT /home/tforest/src/CLAS/eg1_dst/HistDST setenv LD_LIBRARY_PATH $ROOTSYS/lib
UNIX software
apt-get install paw apt-get install paw++ apt-get install xemacs
Getting Data files from JLAB
downloading to offsite place
scp tforest@ftp.jlab.org:/cache/mss/clas/eg1b/production/pass1/v1/4p2gev/misc/dst/dst28181_03.B00 ~/data/
running on JLAB farm
Contents of EG1 DST files
Name | BOS bank | Description |
---|---|---|
p_id | EVNT.ID | Particle ID 1= electron ... |
1= electron | ||
2= proton | ||
3= neutron | ||
4= | ||
5= | ||
6= | ||
7= | ||
8= deuteron | ||
9= Helium 3 | ||
10= Helium 4 | ||
11= photon | ||
12= positron | ||
p_x | EVNT.P*EVNT.dir_cos[o] | Momentum in X direction |
p_y | EVNT.P*EVNT.dir_cos[1] | Momentum in Y direction |
p_z | EVNT.P*EVNT.dir_cos[2] | Momentum along beam pipe |
v_x | EVNT.vertex[0] | position of vertex in X |
v_y | EVNT.vertex[1] | in Y |
v_z | EVNT.vertex[2] | in Z |
q | EVNT.Charge | Particle's Charge |
beta | EVNT.Beta | Beta particle |
sector | DCPB.SCTR or ECPB.ScHT or LCPB.ScHT or SCPB.ScPdHT | sector |
chi_sqr | DCPB.Chi2 | track goodness of fit |
cc_pe | CCPB.Nphe/10 | number of photoelectrons in Cerenkov detector |
cc_chi_sqr | CCPB.Chi2CC | geometrical matching angle between CC hit and nearest SC hit(in rad) |
trl1_theta | TRL1.DC1 | angle on tracking layer one |
trl1_phi | TRL1.DC1 | angle |
trl1_x | TRL1.DC1_pos[0] | position at first DC layer in X |
trl1_y | TRL1.DC1_pos[1] | position at first DC layer in Y |
trl1_z | TRL1.DC1_pos[2] | position at first DC layer in Z |
sc_e | SCPB.Edep | energy deposited in the scintillator |
ec_in | ECPB.Ein | energy deposited into inner part of electron calorimeter |
ec_out | ECPB.Eout | into outer part of electron calorimeter |
ec_tot | ECPB.Etot | total energy deposited into calorimeter |
ec_pos_x | ECPB.Position[0] | the position in electron calorimeter in X |
ec_pos_y | ECPB.Position[1] | the position in electron calorimeter in Y |
ec_pos_z | ECPB.Position[2] | the position in electron calorimeter in Z |
ec_m2hit | ECPB.M2_hit | second moment hit pattern in the calorimeter |
sc_paddle | SCPB.ScPdHt | SC paddle number |
tdc_time | SCPB.Time | flight time |
track_length | SCPB.Path | track length |
flag | based on EVNT.Status and TRL1.hits | If value is > 10 then 6 superlayer were used in track fit |
sc_x | DCPB.SCplane[0] | intersection with SC plane in X |
sc_y | DCPB.SCplane[1] | intersection with SC plane in Y |
sc_z | DCPB.SCplane[2] | intersection with SC plane in Z |
sc_cx | DCPB.SCdir_cos[0] | direction cosine in X at SC plane |
sc_cy | DCPB.SCdir_cos[1] | direction cosine in Y at SC plane |
sc_cz | DCPB.SCdir_cos[2] | direction in Z |
ROOT color pallete
const Int_t colNum = 6 ; Int_t palette[colNum] ; for(Int_t i=0;i<colNum;i++) palette[i]=colNum-i+1; gStyle->SetPalette(colNum,palette); Q2vsNu->SetContour(colNum); Q2vsNu->Draw("colz"); Q2vsNu->Draw("col");
- set ROOTSYS to the `root' directory:
sh family:
export ROOTSYS=<path>/root
csh family:
setenv ROOTSYS <path>/root
- now type the build commands: all shells:
./configure --help ./configure [<arch>] [set arch appropriately if not default] (g)make [or, make -j2 for dual CPU machines]
- add $ROOTSYS/bin to PATH and $ROOTSYS/lib to LD_LIBRARY_PATH:
sh family:
export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH (MacOS X only)
csh family:
setenv PATH ${ROOTSYS}/bin:${PATH} setenv LD_LIBRARY_PATH ${ROOTSYS}/lib:${LD_LIBRARY_PATH} setenv DYLD_LIBRARY_PATH ${ROOTSYS}/lib:${DYLD_LIBRARY_PATH} (MacOS X only) rehash
- try running root: all shells:
root
FAQ
fwriteable-strings error
cclose.c -o /home/didbtama/src/CLAS/obj/Linux/fpack/cclose.o cc1: error: unrecognized command line option "-fwritable-strings"
To get rid of this error we copied flags.LinuxRH.mk to flags.Ubuntu.mk and changed line
CFLAGS += $(CLEVEL) -mcpu=pentium -fwritable-strings
to be
CFLAGS += $(CLEVEL) -mcpu=pentium
we also needed to copy the file
link.LinuxRH.mk to link.Ubuntu.mk