Skip to content

dsmiff/AnalysisSoftware

 
 

Repository files navigation

AnalysisSoftware

Analysis software for TTbar+X differential cross section analysis (TOP-12-042)

General Recipe

To setup the stand-alone version of the code:

# this section will be revisited, please use CMSSW setup for now
# get the code from the repository
git clone https://github.com/BristolTopGroup/AnalysisSoftware.git AnalysisSoftware
cd AnalysisSoftware

# on DICE need to source ROOT:
# source /software/root/v5.32.00/bin/thisroot.sh

# create the makefile using cmake (install it if you don't have it: https://github.com/Kitware/CMake)
# minimal cmake version 2.6.0 according to CMakeLists.txt
cmake CMakeLists.txt
#on DICE use cmake28
# cmake28 CMakeLists.txt

# for older versions of boost, e.g. on DICE, you will need to
#sed -i 's/lib64\/lib64/lib64/g' ./CMakeFiles/AnalysisSoftware.dir/build.make
#sed -i 's/lib64\/lib64/lib64/g' ./CMakeFiles/AnalysisSoftware.dir/link.txt
# as the library path is wrong (contains lib64/lib64)

# compile and build
make -j24

# adjust the toolsFolder environment variable
export toolsFolder=$PWD/

# test run the code:
nohup ./AnalysisSoftware python/test_cfg.py &> test.log &

To setup the code using CMSSW:

# on soolin (and other scientific linux 6 machines)
export SCRAM_ARCH=slc6_amd64_gcc491
# This version comes with ROOT 6.02/05
scram p -n CMSSW_7_5_0_pre5_AS CMSSW_7_5_0_pre5
cd CMSSW_7_5_0_pre4_AS/src/
cmsenv
# initialise CMS git
git cms-init

# get the code from the repository
git clone https://github.com/BristolTopGroup/AnalysisSoftware.git BristolAnalysis/Tools
cd BristolAnalysis/Tools

# get submodules:
git submodule init && git submodule update
cd -
ln -s BristolAnalysis/Tools/external/TopQuarkAnalysis TopQuarkAnalysis
# compile
scram b -j2

hash -r #or rehash in case that BAT cannot be found

# test run the code:
#../tmp/slc6_amd64_gcc491/src/BristolAnalysis/Tools/test/BAT_Tests/BAT_Tests
nohup BAT BristolAnalysis/Tools/python/test_cfg.py &> test.log &

Eclipse

If you want like to use Eclipse for the development of the code, initial project files are provided in the eclipse/ folder. You can copy them into the main directory (example for OS X):

# in AnalysisSoftware folder
cp eclipse/.project.osx .project
cp eclipse/.cproject.osx .cproject
cp eclipse/.pydevproject.osx .pydevproject

Code Style

A code style prescription is also available in eclipse/Bristol_C++_CodeStyle.xml. You should import it under Preferences->C/C++->Code Style->Formatter

Notes

More information can be found at Bristol Analysis Tools twiki page

HTCondor

Once the software is set up one can use HTCondor to submit jobs to a cluster. Instructions for this can be found in condor/README.md

Bugs

Please report any problems on our issues page.

Run tests

Boost unit tests

Running all tests

make test
# or
./AnalysisSoftware_test --log_level=message

Running a specific test suite:

./AnalysisSoftware_test --log_level=message --run_test=DataTypeTests

Running a specific test:

./AnalysisSoftware_test --log_level=message --run_test=DataTypeTests/NoAmbiguousMappingHard

Python unit tests

Python tests require nose to be installed:

pip install nose --upgrade

You can then run the tests with:

time nosetests -v test/*.py

About

Analysis software for particle physics analysis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 67.9%
  • Shell 21.5%
  • Python 9.7%
  • Other 0.9%