Skip to content

joliver92/FactoryTools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

Once you have the FactoryTools package with

git clone https://github.com/rsmith54/FactoryTools.git

you'll still need a few dependencies. You'll need to get Ext_RestFrames and CommonTools. We are using a newer version of SUSYTools than is currently in the release, while depending on a package not in the release we are using yet (todo update when not true anymore). First setup RootCore :

source FactoryTools/util/setup.sh

Now we can checkout our dependencies using the following :

git clone https://github.com/lawrenceleejr/Ext_RestFrames.git; cd Ext_RestFrames; git checkout v1.7; git checkout -b v1.7; cd ..
rc checkout_pkg svn+ssh://svn.cern.ch/reps/atlasinst/Institutes/LBNL/AnalysisToolsRunII/CommonTools/tags/CommonTools-00-00-20 CommonTools
git clone https://github.com/UCATLAS/xAODAnaHelpers.git; cd xAODAnaHelpers; git checkout 2d502e1ecc4e4f45db2c74b34f133641f79a5c59;  git checkout -b localRJbranch; cd ..;

And of course do a normal rc set up procedure

rc find_packages
rc compile

Then you can run a test with e.g.:

python FactoryTools/util/run_tls.py  --doOverwrite --nevents 10 --verbosity debug --inputDS /afs/cern.ch/work/r/rsmith/public/p2613/

(This points to a public directory so this should run for anyone on afs.)

The inputDS option is smart. You can give supply a local directory, txt file with a list of grid datasets, or a pattern which matches a grid pattern. If you use the grid options, obviously you need panda stuff setup, which is setup by the setup script.

PLEASE NOTE : The output will be in

submit_dir/data-TEST_OUTPUTNAME/*.root

by default when doing a test, where TEST_OUTPUTNAME is set in your submission script. The file in submit_dir does not have your output trees!!!

To run on the gird, first setup panda :

lsetup panda

And then you can call

python FactoryTools/util/run_tls.py --doOverwrite --driver grid --inputDS FactoryTools/data/mc15c_13TeV_SM_SUSY2_p2613.ds

This default assumes your system username is the same as your grid/NICE name. If not, you can change it with --gridUser, and the --gridTag defaults to just the date.

Merging Step

Once you've run on the grid, download the tree output and the metadata output to some directory. Then you can use the new merging script to combine them with a new branch added that incorporates the cross section weighting. Simply run

python mergeOutput.py --inDir [path to datasets from grid]

And it will produce combined files containing the trees. One just needs to weight by the branch normweight. The assignment of dataset types is done in discoverInput.py where tags are added to samples based on their names. Then all of one kind of process are combined.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 88.0%
  • Python 10.8%
  • C 1.1%
  • Shell 0.1%