##################################################################### # 00README # Feb.27,2006 # I. Nakagawa # pC offline analysis package ##################################################################### Get SRC files from cvs server: export CVSROOT=:pserver:e950@cvs.bnl.gov:/data01/CVS % cvs login CVS password: (standard e950 password) % cvs checkout cnipol sources will be downloaded in ./cnipol directory. Instructions are avaliable on following web site(note password protected) : http://www4.rcf.bnl.gov/~cnipol/Analysis/pC/index.html However, the lastest & up-to-date instruction should be found in 00README from cvs repository. ##################################################################### Here are some directory structure of CNI libraries required to run the program: CNILIB=/usr/local/cnipol % ls $CNIPOL data/ online/ share/ data/ symboric links to 2005 data available on pb2pb.phy.bnl.gov online/ hbook/ : symboric link to online hbook files. log/ : symboric link to online log files. share/ calib/ : database for the energy calibration config/ : configulation database for analysis program Asym dlayer/ : deadlayer database for DeadLayer Monitor macro/ : macro for plotting and deadlayer fits. bin/ : executable binaries and scripts. SRC ./cnipol/src AsymMain.cc "main program. hundle options" AsymRead.cc "read in raw data and decode" AsymRunDB.cc "read in condistions for runs from run.db" AsymHbook.cc "histogram booking" hb_lib.f "utility library to call hbook from c++" AsymProcess.cc "event looop processing program" AsymCalc.cc "end of run routine" RunDBReader.cc "portable RunDB read program" Asym.h AsymMain.h rpoldata.h rhicpol.h WeightedMean.h Executables : Asym "Main analysis program" RunDBReader "portable run.db reader/printer" Set up environment and install executables and macros. 1. Environmental variables (in bash format) # define path to root of your system export ROOTSYS=/usr/local/cern/root export LD_LIBRARY_PATH=$ROOTSYS/lib/ export CNILIB=/usr/local/cnipol export ONLINEDIR=$CNILIB/online export DATADIR=$CNILIB/data export SHAREDIR=$CNILIB/share export CONFDIR=$SHAREDIR/config export CALIBDIR=$SHAREDIR/calib # working directory export ASYMDIR=$HOME/offline # installation destination export INSTALLDIR=$ASYMDIR/bin export MACRODIR=$ASYMDIR/macro # for developers use followings instead of above two lines # export INSTALLDIR=$SHAREDIR/bin # export MACRODIR=$SHAREDIR/macro export PATH=$INSTALLDIR:$PATH export LD_LIBRARY_PATH=$MACRODIR:$LD_LIBRARY_PATH 2. Make and install src files: % cd cnipol % source ~/.bashrc Make src files and install executable binaries and scripts to $INDTALLDIR. % ./install.sh 3. Add following lines to your $HOME/.pawlogon.kumac alias/cr pson 'exe ~/.pawlogon#on' alias/cr psoff 'exe ~/.pawlogon#off' opt zfl1 FILECASE keep defaults ./kumac,$ENV(KUMACDIR) *=================================================== macro on fn=paw.ps met=-111 fortran/file 66 [fn] graphics/metafile 66 [met] return *=================================================== macro off close 66 return *=================================================== macro eon fn=paw.eps met=-113 fortran/file 66 [fn] graphics/metafile 66 [met] return Working directory and Running executables: create working directory % mkdir $ASYMDIR % cd $ASYMDIR copy or symbilic link run.db from the repository % cp $HOME/cnipol/run.db . or % ln -s $HOME/cnipol/run.db . *run.db has to be at working directory* see 00README.rundb for syntax % Asym -f 7069.101.data (try Asym -h for options) output: hbookfile: outsampleex.hbook The utility program to run Asym and browse histograms: %> RHICAna.pl & Some directrories to be created $ASYMDIR/hbook : store hbook files $ASYMDIR/log : offline log directory $ASYMDIR/ps : for postscript outputs * Useful instructions by Osamu: http://www4.rcf.bnl.gov/~cnipol/Analysis/OsamuDocs/index.html o Brief summary of online monitoring scripts o CNI polarimeter monitoring GUI user guide ################################################################### ######### For Calibration and DeadLayer Studies: ########## ################################################################### Create necessary directories: % mkdir $ASYMDIR/douts % mkdir $ASYMDIR/calib % mkdir $ASYMDIR/config % mkdir $ASYMDIR/integ % mkdir $ASYMDIR/dlayer % mkdir $ASYMDIR/ps Energy Calibration 0. Make sure all the environments are defined as described above. Calibration data supposed to be stored at $DATADIR as well as normal data. 1. For energy calibration filename e.g. blue_calib_0513c.data: % cd $ASYMDIR % Calib.pl -f blue_calib_0513c (Try Calib.pl -h for help) 2. The resulting ps and data files are created under $ASYMDIR/calib % ls calib blue_calib_0513c.fit.log blue_calib_0513c.summarytemp.ps blue_calib_0513c.fittemp.ps blue_calib_0513c.temp.dat 3. If the calibration is successful, publish calibration data file to $CALIBDIR % Calib.pl -f blue_calib_0513c -p to use the results for forthcomming polarization measurements, add following line in $ASYMDIR/run.db at adequate [RUNID] location e.g. [7067.001] here: [7067.001] ENERGY_CALIB=blue_calib_0513c; 4. Create new configulation for e.g. run#7067.001: % mkConfig.pl -f 7067.001 (Try mkConfig.pl -h for help) see below "Create new configulation" for more detail. DeadLayer Fit: 1. There are two options for the event selection to be fit: The default is constant time cut. With option -b, banana cut event selection can be selected. E.g. for run#7279.005.data: % cd $ASYMDIR for const. time cut: % dLayer.pl -f 7279.005 for banana cut: % dLayer.pl -b -f 7279.005 Create new configulation: 0. Make sure calibration file is defined in run.db 1. To perform deadlayer fit and make new configulation: (-b option for banana cut) % mkConfig.pl -f 7279.005 -D -b To make configulation file with existing deadlayer data % mkConfig.pl -f 7279.005 New configulation file will be created ./config/7279.005.config.data 2. Copy new configulation file to shared library and update on run.db to use new configulation. %cp ./config/7279.005.config.data $CONFDIR/. or %mkConfig.pl -f 7279.005 -p in run.db add: [7279.005] CONFIG=7279.005.config.dat;