Project

General

Profile

TestBeam2015UCL

Data storage

Data is stored in:

/unix/muons/g-2/jun-2015-testbeam/data

It is split into good and bad data. Can generally ignore the bad data.

Within this directory, the data is spit into:

  • /unix/muons/g-2/jun-2015-testbeam/data/midas/ - MIDAS output files (online data)
  • /unix/muons/g-2/jun-2015-testbeam/data/art - MIDAS to art output from raw MIDAS files

A "good" directory marks data we think is usable. Good is defined as:

  • num MTest spills (4 sec bursts) > 5
  • straw data size > 120k
  • silicon data size > 0
  • more than 50% of the spills have > 1e9 protons.

Unpacking

These commands work with the UCL environment, assuming you have set:

export MIDAS_TESTBEAM_DATA=/unix/muons/g-2/jun-2015-testbeam/data/midas/good/
export ART_TESTBEAM_DATA=/unix/muons/g-2/jun-2015-testbeam/data/art/good/

Using example run number 00344.

RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2midastoart/fcl/midasBankInput.fcl -s $MIDAS_TESTBEAM_DATA/run$RUN_NUM.mid.gz -o midasBankInput_$RUN_NUM.root  # Import MIDAS events to art events
RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2unpackers/fcl/MetaData.fcl -s $ART_TESTBEAM_DATA/midasBankInput_$RUN_NUM.root -o MetaData_$RUN_NUM.root  # Start MetaData record
RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2unpackers/fcl/AllUnpacker.fcl -s MetaData_$RUN_NUM.root -o AllUnpacker_$RUN_NUM.root  # Unpack raw data
RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2unpackers/fcl/DataCleaning.fcl -s AllUnpacker_$RUN_NUM.root -o DataCleaning_$RUN_NUM.root  # Clean unpacked data
RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2unpackers/fcl/SyncTimings.fcl -s DataCleaning_$RUN_NUM.root -o SyncTimings_$RUN_NUM.root  # Sync timings between detectors
RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2unpackers/fcl/RawDigitizer.fcl -s SyncTimings_$RUN_NUM.root -o RawDigitizer_$RUN_NUM.root  # Produce raw digits
RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2tracker/fcl/mtestRawtoDigits.fcl -s RawDigitizer_$RUN_NUM.root -o mtestRawtoDigits_$RUN_NUM.root  # Produce digits

Analysis

For data:

RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2tracker/fcl/mtestDigitsAnalysis.fcl -s mtestRawtoDigits_$RUN_NUM.root
RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2tracker/fcl/mtestReco.fcl -s mtestRawtoDigits_$RUN_NUM.root -o mtestReco_$RUN_NUM.root
RUN_NUM=00344 ; gm2 -c $MRB_SOURCE/gm2tracker/fcl/mtestRecoAnalysis.fcl -s mtestReco_$RUN_NUM.root

For sim:

gm2 -c $MRB_SOURCE/gm2tracker/fcl/mtestDigitsAnalysis.fcl -s mtestSimtoDigits.root
gm2 -c $MRB_SOURCE/gm2tracker/fcl/mtestReco.fcl -s mtestSimtoDigits.root -o mtestReco.root
gm2 -c $MRB_SOURCE/gm2tracker/fcl/mtestRecoAnalysis.fcl -s mtestReco.root

Pushing and pulling

These scripts speed up pushes / pulls to all directories:

#Push all repos

OLD_DIR=`pwd`

#Online
cd $GM2_TRACKER_DAQ_SW
echo "+++ git push gm2-tracker-readout-daq" 
git push

#Offline 
cd $MRB_SOURCE
for i in  gm2geom gm2ringsim  gm2unpackers gm2dataproducts  gm2midastoart  gm2tracker  gm2util ; do
  cd $i
  echo "+++ git push feature/trackerTestbeam $i" 
  git push origin feature/trackerTestBeam
  cd ..
done

cd $OLD_DIR
#Pull all repos

OLD_DIR=`pwd`

#Online
cd $GM2_TRACKER_DAQ_SW
echo "+++ git pull gm2-tracker-readout-daq" 
git pull

#Offline 
cd $MRB_SOURCE
for i in  gm2geom gm2ringsim  gm2unpackers gm2dataproducts  gm2midastoart  gm2tracker  gm2util ; do
  cd $i
  echo "+++ git pull feature/trackerTestbeam $i" 
  git pull origin feature/trackerTestBeam
  cd ..
done

cd $OLD_DIR

Database access at UCL

A cronjob on gm2straw6 running every 24 hours that backs up the mysql database to:

/home/nfs/gm2/mtest/daq/database-backup

A copy of the backups is on the UCL network at:

/unix/muons/g-2/jun-2015-testbeam/database-backup

As well as Mark's comedy large Dropbox account.